public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] S5P: new spi gpio bitbang driver
Date: Thu, 16 Sep 2010 02:17:34 -0400	[thread overview]
Message-ID: <201009160217.36172.vapier@gentoo.org> (raw)
In-Reply-To: <4C91831A.50508@samsung.com>

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 

      reply	other threads:[~2010-09-16  6:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  7:38 [U-Boot] [PATCH] S5P: new spi gpio bitbang driver Donghwa Lee
2010-09-14 11:48 ` Mike Frysinger
2010-09-15  5:15   ` Donghwa Lee
2010-09-15 18:06     ` Mike Frysinger
2010-09-16  2:38       ` Donghwa Lee
2010-09-16  6:17         ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009160217.36172.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox