From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Mon, 22 Mar 2010 11:25:44 +0100 Subject: [U-Boot] [PATCH] SPI: added support for MX51 to mxc_spi In-Reply-To: <4BA564F8.9070806@windriver.com> References: <1263835130-13141-1-git-send-email-sbabic@denx.de> <1268756501-2124-1-git-send-email-sbabic@denx.de> <4BA564F8.9070806@windriver.com> Message-ID: <4BA745A8.8010009@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Tom wrote: >> +#define MXC_CSPIRXDATA 0x00 >> +#define MXC_CSPITXDATA 0x04 >> +#define MXC_CSPICTRL 0x08 >> +#define MXC_CSPIPERIOD_32KHZ (1 << 15) >> + > > Pulling these out and making them common may not be the best thing to do. > Located here, it hides the > > #ifdef CONFIG_MX27 > #elif defined (CONFIG_MX31) > #elif defined (CONFIG_MX51) > #else > #endif > > I would prefer if you just kept the copies in the mx31, mx51 locations You are right - I will move them. > > In 'Add SPI support to mx51evk board' > The MAX_SPI_BYTES was defined in the config file. > Here it is defined for mx31 generally. > You should be consistent. > These would be a better place for the mx51 values as you only have to do > it once. That is correct. And the value is not related to a particular board, setting this define in config file is definetely wrong. I will move it. > Be constistent with mx31 > Move the #includes to the first lines after the #elif > The other #defines to follow. Ok, thanks. Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================