From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 19 Sep 2011 10:22:00 -0400 Subject: [U-Boot] [PATCH 1/4] SPI: Add SPI driver support for Marvell Armada100 In-Reply-To: <1316429230-5957-1-git-send-email-ajay.bhargav@einfochips.com> References: <1316429230-5957-1-git-send-email-ajay.bhargav@einfochips.com> Message-ID: <201109191022.01391.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, September 19, 2011 06:47:07 Ajay Bhargav wrote: > --- /dev/null > +++ b/arch/arm/include/asm/arch-armada100/spi.h > > +struct armd_spi_slave { > + struct spi_slave slave; > + struct ssp_reg *spi_reg; > + u32 cr0, cr1; > + u32 int_cr1; > + u32 clear_sr; > + const void *tx; > + void *rx; > + int gpio_cs_inverted; > + > + void (*write)(struct armd_spi_slave *pss); > + void (*read)(struct armd_spi_slave *pss); > +}; > + > +#define to_armd_spi_slave(s) container_of(s, struct armd_spi_slave, slave) i dont think internal driver details should be in a header. these should be moved to armada100_spi.c. > --- /dev/null > +++ b/drivers/spi/armada100_spi.c > > +static void null_writer(struct armd_spi_slave *pss) > +static void null_reader(struct armd_spi_slave *pss) > +static void u8_writer(struct armd_spi_slave *pss) > +static void u8_reader(struct armd_spi_slave *pss) > +static int flush(struct armd_spi_slave *pss) please prefix these with something like "spi_armd_". generic names like this are often hard to trace back when debugging. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110919/76c98fca/attachment.pgp