From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yoshihiro Shimoda Date: Wed, 19 Jan 2011 17:16:33 +0900 Subject: [U-Boot] [PATCH] spi: add support SuperH SPI module In-Reply-To: <20110118092838.62C7036C@gemini.denx.de> References: <4D33C089.8040007@renesas.com> <20110118092838.62C7036C@gemini.denx.de> Message-ID: <4D369DE1.2030704@renesas.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, Thank you very much for your review. 2011/01/18 18:28, Wolfgang Denk wrote: >> @@ -37,6 +37,7 @@ COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o >> COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o >> COBJS-$(CONFIG_OMAP3_SPI) += omap3_spi.o >> COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o >> +COBJS-$(CONFIG_SH_SPI) += sh_spi.o > > Please keep list sorted. I will fix it. >> +#define SPI_TBR 0x00 >> +#define SPI_RBR 0x00 >> +#define SPI_CR1 0x08 >> +#define SPI_CR2 0x10 >> +#define SPI_CR3 0x18 >> +#define SPI_CR4 0x20 > > Please declare a poper C struct instead. I will modify it. >> +/* CR4 */ >> +#define SPI_TBEI 0x80 >> +#define SPI_TBFI 0x40 >> +#define SPI_RBEI 0x20 >> +#define SPI_RBFI 0x10 >> +#define SPI_WPABRT 0x04 >> +#define SPI_SSS 0x01 >> + >> +#define SPI_FIFO_SIZE 32 > > All this stuff should better go into a separate header file. OK, I will create the sh_spi.h file. >> +static void sh_spi_write(unsigned long data, unsigned long offset) >> +{ >> + writel(data, CONFIG_SH_SPI_BASE + offset); > > NAK. We do not allow the base + offset notation. Pleaseuse a proper > C struct instead. > > Please fix globally. Yes, I will fix the driver. Best regards, Yoshihiro Shimoda