Dear Stefano Babic, In message <1295012124-15551-6-git-send-email-sba...@denx.de> you wrote: > Signed-off-by: Stefano Babic <sba...@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: w...@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_ _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot