[U-Boot] [PATCH] S5P: new spi gpio bitbang driver

Mike Frysinger vapier at gentoo.org
Thu Sep 16 08:17:34 CEST 2010


On Wednesday, September 15, 2010 22:38:18 Donghwa Lee wrote:
> I had checked blackfin gpio framework. Blackfin includes only maximum 20
> ports, 160 pins, but, s5pc110 includes about 53 banks and 415 gpio pins.

why does the # of pins matter ?  the id is an "unsigned" value which easily 
accommodates 415 pins.  the current blackfin "max" for the bf54x is 160 only 
because that is how many gpios it has, not because of any limitation in the 
software architecture.

> If it will be included s5pc100, amounts of gpio pins are tremendous. And
> construction of arch-s5pc1xx gpio framework is not similar with blackfin.

the internals arent terribly relevant.  you simply need to support the generic 
gpio layer just like under Linux.

> And actually, I think arch-blackfin doesn't use gpio pins that implemented
> in arch/blackpin/include/asm/mach-*/gpio.h as spi initialization parameter
> probably. It maybe coded in bf518f-ezbrd.c only specific fixed number '0'
> and '1' by cs and bus number, not using gpio framework.

the blackfin spi driver is not built on top of gpios because it doesnt make 
any sense to.  there is already a hardware spi peripheral to take care of the 
pins.  and it supports both hardware cs (0..7) as well as a gpio as cs.

> But I want to use gpio framework to spi interface by setting platform data.
> It can easily use cs, bus and data line by modifying in platform data. I
> want to use without modifying arch-s5p gpio framework and want to use
> appropriately for arch-s5p.

and if your gpio layer were properly architected behind the common gpio layer, 
the spi code would not care what gpio implementation it is sitting on top of.  
and you could simply put into your board config ("platform data") something 
like "#define CONFIG_SPI_GPIO_MOSI GPIO_xxx".
-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/20100916/e7e74476/attachment.pgp 


More information about the U-Boot mailing list