[U-Boot] [PATCH 1/4] SPI: Add SPI driver support for Marvell Armada100

Mike Frysinger vapier at gentoo.org
Mon Sep 19 16:22:00 CEST 2011


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 


More information about the U-Boot mailing list