netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Alessandro Rubini <rubini@gnudd.com>
Cc: bhupesh.sharma@st.com, federico.vaga@gmail.com,
	alan@lxorguk.ukuu.org.uk, wg@grandegger.com,
	giancarlo.asnaghi@st.com, alan@linux.intel.com,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] c_can_pci: generic module for c_can on PCI
Date: Tue, 05 Jun 2012 15:21:50 +0200	[thread overview]
Message-ID: <4FCE07EE.40003@pengutronix.de> (raw)
In-Reply-To: <20120605131337.GA15432@mail.gnudd.com>

[-- Attachment #1: Type: text/plain, Size: 1928 bytes --]

On 06/05/2012 03:13 PM, Alessandro Rubini wrote:
>>> My implementation is align to 32, but I'm trying to make a generic PCI
>>> wrapper (some other could be aligned to 16)
>  
>> So it means your implementation is also flaky and you are probably
>> wasting HW memory space while integrating the Bosch C_CAN module in
>> your SoC :)
> 
> Then I may say _your_ implementation is flaky because it wastes one
> bit in the address decoder and a lot of logic gates in the data
> bus. It's normal to align registers at 32 bits, as it's simpler and
> faster.  Most SoCs have only 32-bit aligned registers, for a reason.
> 
>> I am not a big fan of adding platform specific flakes in any core
>> file, that why we keep the platform file separate from the core
>> ones.
> 
> A number of other drivers have a shift parameter, because it's very
> common for the hardware integrator to feel free to choose the easiest
> wiring for the device.  The choice to keep the platform driver
> separate from the core driver only adds complication in my opinion:
> you need to export 4 symbols and yhen every user must duplicate code
> (like federico is replicating theplatform driver in the pci driver).
> 
> I'd really prefer to have the core driver be a platform driver, and
> the others just add platform data to describe how it is wired. That's
> actually the reason why the platform bus exists.
> 
>> But I will left Marc and Wolfgang to further comment on the same.
> 
> I agree: let them decide.

I personally like the "pci device sets up a platform device" idea.

My question is, is this considered being a good practise?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-06-05 13:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 20:59 [PATCH] STA2X11 CAN: CAN driver for the STA2X11 board Federico Vaga
2012-05-18  6:00 ` Wolfgang Grandegger
2012-05-26  8:36   ` Federico Vaga
2012-05-26 19:57     ` Wolfgang Grandegger
2012-06-04 13:32       ` generic module for c-can on pci Federico Vaga
2012-06-04 13:32         ` [PATCH RFC] c_can_pci: generic module for c_can on PCI Federico Vaga
2012-06-04 14:04           ` Marc Kleine-Budde
2012-06-12 14:25             ` Federico Vaga
2012-06-12 14:46               ` Marc Kleine-Budde
2012-06-12 14:53                 ` Federico Vaga
2012-06-04 15:56           ` Alan Cox
2012-06-04 16:45             ` Federico Vaga
2012-06-05  3:42               ` Bhupesh SHARMA
2012-06-05 11:19                 ` Federico Vaga
2012-06-05 13:04                   ` Bhupesh SHARMA
2012-06-05 13:13                   ` Alessandro Rubini
2012-06-05 13:21                     ` Marc Kleine-Budde [this message]
2012-06-05 13:22                     ` Bhupesh SHARMA
2012-06-05 13:30                     ` Alessandro Rubini
2012-06-05 15:12                       ` AnilKumar, Chimata
2012-06-05 16:50                       ` Alessandro Rubini
2012-06-06  3:50                         ` Bhupesh SHARMA
2012-06-11 13:18                           ` Federico Vaga
2012-06-11 14:21                             ` Wolfgang Grandegger
2012-06-04 16:45           ` Alessandro Rubini
2012-06-11 13:51             ` Wolfgang Grandegger
2012-06-11 14:23             ` Alessandro Rubini
2012-06-11 14:09           ` Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FCE07EE.40003@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=alan@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bhupesh.sharma@st.com \
    --cc=federico.vaga@gmail.com \
    --cc=giancarlo.asnaghi@st.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rubini@gnudd.com \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).