From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] mxc_spi: add support for i.MX35 processor
Date: Wed, 19 Jan 2011 08:48:48 +0100 [thread overview]
Message-ID: <20110119074848.B5BE52FC@gemini.denx.de> (raw)
In-Reply-To: <1295012124-15551-6-git-send-email-sbabic@denx.de>
Dear Stefano Babic,
In message <1295012124-15551-6-git-send-email-sbabic@denx.de> you wrote:
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> ---
> drivers/spi/mxc_spi.c | 96 +++++++++++++++++++++++++++++++++++++------------
> 1 files changed, 73 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
> index d558137..b353c83 100644
> --- a/drivers/spi/mxc_spi.c
> +++ b/drivers/spi/mxc_spi.c
> @@ -70,6 +70,8 @@ static unsigned long spi_bases[] = {
> 0x53f84000,
> };
>
> +#define spi_cfg spi_cfg_mx3
...
> +#define spi_cfg spi_cfg_mx51
Hm... this repeats below, but in the end both spi_cfg_mx3() and
spi_cfg_mx51() are just static functions within the same source file,
with #ifdef's around them so only one can ever be enabled at a time.
I suggest you omit all these "#define spi_cfg" lines and rename both
versions of these functions into spi_cfg_mx().
> +#define MXC_CSPIRXDATA 0x00
> +#define MXC_CSPITXDATA 0x04
> +#define MXC_CSPICTRL 0x08
> +#define MXC_CSPIINT 0x0C
> +#define MXC_CSPIDMA 0x10
> +#define MXC_CSPISTAT 0x14
> +#define MXC_CSPIPERIOD 0x18
> +#define MXC_CSPITEST 0x1C
As mentioned before: please use a C struct.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If you own a machine, you are in turn owned by it, and spend your
time serving it..." - Marion Zimmer Bradley, _The Forbidden Tower_
next prev parent reply other threads:[~2011-01-19 7:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 13:35 [U-Boot] [PATCH 1/7] Add support for MX35 processor Stefano Babic
2011-01-14 13:35 ` [U-Boot] [PATCH 2/7] serial_mxc: add support for Freescale's i.MX35 processor Stefano Babic
2011-01-19 7:19 ` Wolfgang Denk
2011-01-14 13:35 ` [U-Boot] [PATCH 3/7] mxc_i2c: Add support for the " Stefano Babic
2011-01-19 7:37 ` Wolfgang Denk
2011-01-19 9:46 ` Stefano Babic
2011-01-14 13:35 ` [U-Boot] [PATCH 4/7] mxc_nand: add support for " Stefano Babic
2011-01-14 18:33 ` Scott Wood
2011-01-14 13:35 ` [U-Boot] [PATCH 5/7] Add basic support for Freescale's mc9sdz60 Stefano Babic
2011-01-19 7:40 ` Wolfgang Denk
2011-01-14 13:35 ` [U-Boot] [PATCH 6/7] mxc_spi: add support for i.MX35 processor Stefano Babic
2011-01-19 7:48 ` Wolfgang Denk [this message]
2011-01-19 10:09 ` Stefano Babic
2011-01-19 11:40 ` Wolfgang Denk
2011-01-14 13:35 ` [U-Boot] [PATCH 7/7] Add support for Freescale's mx35pdk board Stefano Babic
2011-01-17 16:43 ` Jason Liu
2011-01-17 16:54 ` Stefano Babic
2011-01-17 17:29 ` Stefano Babic
2011-01-18 9:40 ` Wolfgang Denk
2011-01-18 10:18 ` Stefano Babic
2011-01-19 8:06 ` Wolfgang Denk
2011-01-19 10:01 ` Stefano Babic
2011-01-19 7:35 ` [U-Boot] [PATCH 1/7] Add support for MX35 processor Wolfgang Denk
2011-01-19 9:45 ` Stefano Babic
2011-01-19 11:37 ` Wolfgang Denk
2011-01-19 11:54 ` Stefano Babic
2011-01-21 9:36 ` Detlev Zundel
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=20110119074848.B5BE52FC@gemini.denx.de \
--to=wd@denx.de \
--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