On Mon, 19 May 2008 09:57:21 -0600
"Grant Likely" <grant.likely@secretlab.ca> wrote:
I sort of hesitate to hijack this thread, but since we're discussing SPI
and chip selects...
I have a driver for the SPI controller in the 440EPx. This controller
is very simple and does not have any internal support for a chip select.
The controller seems to also be in the 440GR and 440EP, and may be in
other AMCC CPUs too.
All chip selects must be done using GPIO. In fact, the board for which
I developed this driver, a modified sequoia, actually uses 2 chip selects.
My problem was, and is, that there's no generic GPIO support for powerpc.
At least, not that I'm aware of. Please tell me if I'm wrong.
So the driver has great gobs of GPIO code in it, most of which I took
from u-boot. The code is pretty generic, but some 440EPx-specific
stuff may have crept in without my being aware of it.
My real question is - should this code be in a platform-specific file
such as sequoia.c, which could result in lots of duplicated code, or is
it better to leave it in the driver for now until some day we hopefully
get generic GPIO support for powerpc?
I want to get this driver upstream ASAP.
---
Gary Jennejohn
*********************************************************************
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
*********************************************************************
--