aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/xilinx_spi_of.c
AgeCommit message (Collapse)Author
2010-01-20spi: make Open Firmware device id constantMárton Németh
The match_table field of the struct of_device_id is constant in <linux/of_platform.h> so it is worth to make the initialization data constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2009-12-08xilinx_spi: add support for the DS570 IP.Richard Röjfors
This patch adds in support for the DS570 IP. It's register compatible with the DS464, but adds support for 8/16/32 SPI. The 8/16/32 support is added by attaching callbacks reading/writing the proper amount of data. To indicate to the driver which amount of bits to use a new field is introduced in the platform data struct. Acked-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: John Linn <John.Linn@xilinx.com> Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2009-12-08xilinx_spi: Split into of driver and generic part.Richard Röjfors
This patch splits the xilinx_spi driver into a generic part and a OF driver part. The reason for this is to later add in a platform driver as well. Tested-by: John Linn <John.Linn@xilinx.com> Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>