[RFC][PATCH] MPC832x_RDB: update dts to use spi, register mmc_spi stub

Anton Vorontsov avorontsov at ru.mvista.com
Tue Aug 7 20:53:46 EST 2007


On Mon, Aug 06, 2007 at 08:18:47PM +0200, Segher Boessenkool wrote:
[...]
>>> The hardware should be described in the device tree.  This isn't
>>> the same as simply copying all your Linux code into it ;-)
>>
>> Ugh. SD/MMC slot is the hardware, isn't it? It have wired SPI pins,
>> and chip select pin. To set up this pin, I need mmc node, which means
>> that I can't completely move mmc definitions to the board file, as
>> suggested by Kumar Gala.
>>
>> Advices?
>
> You need to declare in the SPI node which GPIOs it uses for
> what.  You shouldn't have the actual values to put into the
> GPIO registers in the device tree; the kernel driver can
> figure it out.

Well, how SPI differs from UCC in that regard? This is how mpc832x_mds.dts,
mpc832x_rdb.dts, mpc836x_mds.dts, ... doing things already for UCC pins.
And then what pio-map exists for?.. In my understanding pio-map tries to
describe hardware (GPIO) wiring, exactly how SPI (and UCC) nodes trying
to use it.

Heh.. anyway, it's really hard to find proper logic around device tree,
do's and don'ts, so I'll just follow your suggestions in hope that I'll
get it as time goes by. ;-)

> Hope this helps,

Thanks!

-- 
Anton Vorontsov
email: cbou at mail.ru
backup email: ya-cbou at yandex.ru
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list