public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] mx6q: Add support for ECSPI through mxc_spi driver
Date: Wed, 18 Jan 2012 02:47:47 +0100	[thread overview]
Message-ID: <201201180247.47571.marek.vasut@gmail.com> (raw)
In-Reply-To: <4F16241B.5050007@boundarydevices.com>

> On 01/17/2012 06:27 PM, Marek Vasut wrote:
> >> On 01/17/2012 04:19 PM, Marek Vasut wrote:
> >>>> Signed-off-by: Eric Nelson<eric.nelson@boundarydevices.com>
> >>>> +/* ECSPI registers */
> >>>> +struct cspi_regs {
> >>>> +	u32 rxdata;
> >>>> +	u32 txdata;
> >>>> +	u32 ctrl;
> >>>> +	u32 cfg;
> >>>> +	u32 intr;
> >>>> +	u32 dma;
> >>>> +	u32 stat;
> >>>> +	u32 period;
> >>>> +};
> >>> 
> >>> Sigh ... it's no fun I can have only one remark :-)
> >>> 
> >>> Is this part common for all imx-es ?
> >> 
> >> All i.MX6's
> >> 
> >> This is a cut&  paste from MX51.
> >> 
> >> I was tempted to introduce an 'mxc_ecspi.h' to merge the declaration
> >> for i.MX5x and i.MX6 which share the ECSPI peripheral and 'mxc_cspi.h'
> >> for i.MX31 and i.MX35 that share the CSPI peripheral.
> > 
> > But you don't even need this outside of the spi driver so just put it
> > into the spi driver and be done with it. That'll solve your duplication
> > issue.
> > 
> > M
> 
> I'll defer to Stefano on this one, since I did this in response
> 
> to his request:
> > Right - and we already discussed in the past how to avoid to put
> > specific SOC code inside the driver. In fact, the cspi_regs structure
> > was already moved into the specific SOC header (imx-regs.h) - but the
> > definitions of the single bits of the registers are still inside the
> > driver, as well as the base address of the (e)cspi controllers.
> > 
> > They should also be moved - take into acoount by implementing your
> > changes for i.mx6
> 
> The struct cspi_regs is already present in mx31, mx35, and mx51 headers,
> so I'm not breaking new ground here, only in the bitfield declarations.
> 
> 	http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/include/asm/arch-
mx31/i
> mx-regs.h;h=6a517ddd931ca0d1e598bd7456c4c611741602eb;hb=HEAD#l60
> http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/include/asm/arch-mx35/i
> mx-regs.h;h=df74508a93ee87ae986f7c2f48f6c5fb36626070;hb=HEAD#l279
> http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/include/asm/arch-mx5/im
> x-regs.h;h=0ee88d25b7800ae9e6aed809d02dd19d9cac9c82;hb=HEAD#l423
> 
> My interpretation of Stefano's intent is to clean up the driver at the
> expense of extra defines in the arch-specific headers.

But they're all the same, right? So we have now the same structure defined 
thrice?

M
> 
> Regards,
> 
> 
> Eric

  reply	other threads:[~2012-01-18  1:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 22:09 [U-Boot] mxc_spi refactoring (for mx6q) Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 1/6] mxc_spi: move machine specifics into CPU headers Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 2/6] mx6q: Add support for ECSPI through mxc_spi driver Eric Nelson
2012-01-17 23:19   ` Marek Vasut
2012-01-18  0:36     ` Eric Nelson
2012-01-18  1:27       ` Marek Vasut
2012-01-18  1:44         ` Eric Nelson
2012-01-18  1:47           ` Marek Vasut [this message]
2012-01-18  2:02             ` Eric Nelson
2012-01-18  8:39           ` Stefano Babic
2012-01-18 16:08             ` Marek Vasut
2012-01-18 16:41               ` Stefano Babic
2012-01-18 20:05             ` Eric Nelson
2012-01-19 10:33               ` Stefano Babic
2012-01-17 22:09 ` [U-Boot] [PATCH 3/6] mx6q: mx6qsabrelite: Add ECSPI support to the Sabrelite platform Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 4/6] sf command: allow default chip select through CONFIG_SPI_FLASH_CS Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 5/6] mx6q: mx6qsabrelite: Provide default chip-select for serial flash Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 6/6] mx6q: mx6qsabrelite: Provide defaults for placing environment in " Eric Nelson
2012-01-20  3:27   ` Jason Hui
2012-01-20  7:06     ` Dirk Behme
2012-01-20  7:48       ` Jason Hui
2012-01-20  8:47         ` Stefano Babic
2012-01-20 13:47           ` Eric Nelson
2012-01-20 13:43     ` Eric Nelson
2012-01-17 23:16 ` [U-Boot] mxc_spi refactoring (for mx6q) Marek Vasut
2012-01-18 11:51 ` Dirk Behme

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=201201180247.47571.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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