linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: avorontsov@ru.mvista.com
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [RFC][PATCH] MPC832x_RDB: update dts to use spi, register mmc_spi stub
Date: Tue, 7 Aug 2007 18:11:42 +0200	[thread overview]
Message-ID: <2cc0345aaf781a6d01e33df08f12bc97@kernel.crashing.org> (raw)
In-Reply-To: <20070807105346.GB13606@localhost.localdomain>

>>>> 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?

Not at all, I think.  You just copied a bad example that
shouldn't exist like that at all :-(

> 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.

Yeah.  It however contains lots more information that really
should be implicit in the driver using it (like, GPIO output
lines that are marked "no interrupt" -- what a surprise, duh).

As far as I can see the devices that need some GPIOs should
just say which GPIOs (on what GPIO controller) they use, and
that's about it, the kernel device drivers can handle the
rest (since they need to know lots more implicit information
_anyway_, there is no point in describing more details in the
device tree, esp. since many of those details describe only
how a device is used, not what it _is_).

Anyway, not your fault, I'd prefer not to see the madness
spread though :-)

> 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. ;-)

:-)


Segher

  reply	other threads:[~2007-08-07 16:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26 13:57 [RFC][PATCH] MPC832x_RDB: update dts to use spi, register mmc_spi stub Anton Vorontsov
2007-07-26 15:36 ` Joakim Tjernlund
2007-07-26 15:47   ` Anton Vorontsov
2007-07-26 19:40     ` [RFC][PATCH] MPC832x_RDB: update dts to use spi, registermmc_spi stub Joakim Tjernlund
2007-07-27  7:55       ` Kumar Gala
2007-07-31 21:47       ` Segher Boessenkool
2007-07-27  8:14 ` [RFC][PATCH] MPC832x_RDB: update dts to use spi, register mmc_spi stub Kumar Gala
2007-07-27 11:45   ` Anton Vorontsov
2007-07-27 13:55     ` Kumar Gala
2007-07-27 16:40     ` Scott Wood
2007-07-31 22:00       ` Segher Boessenkool
2007-08-01 17:43         ` Scott Wood
2007-08-06 18:24           ` Segher Boessenkool
2007-07-31 22:06     ` Segher Boessenkool
2007-08-01 13:29       ` Anton Vorontsov
2007-08-06 18:18         ` Segher Boessenkool
2007-08-07 10:53           ` Anton Vorontsov
2007-08-07 16:11             ` Segher Boessenkool [this message]
2007-08-01 19:16       ` Kim Phillips
2007-08-06 18:25         ` Segher Boessenkool
2007-08-06 21:31           ` Kim Phillips
2007-08-06 22:08             ` Segher Boessenkool
2007-07-31 22:10 ` Segher Boessenkool
2007-08-01 12:34   ` Anton Vorontsov
2007-08-06 18:09     ` Segher Boessenkool
2007-08-06 18:50       ` Scott Wood

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=2cc0345aaf781a6d01e33df08f12bc97@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=avorontsov@ru.mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).