public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] OMAP MUX handling improvement
Date: Sun, 12 Jul 2009 17:28:36 +0200	[thread overview]
Message-ID: <4A5A0124.2010108@googlemail.com> (raw)
In-Reply-To: <4A59F829.5010203@gmail.com>

Nishanth Menon wrote:
> Dirk Behme said the following on 07/12/2009 09:31 AM:
>> Nishanth Menon wrote:
>>> Jean-Christophe PLAGNIOL-VILLARD said the following on 07/12/2009
>>> 08:13 AM:
>>>>>> _sread*/\
>>>>>> + MUX_VAL(CP(D2D_MBUSFLAG),     (IEN  | PTD | DIS | M0))
>>>>>> /*d2d_mbusflag*/\
>>>>>> + MUX_VAL(CP(D2D_SBUSFLAG),     (IEN  | PTD | DIS | M0))
>>>>>> /*d2d_sbusflag*/\
>>>>>> + MUX_VAL(CP(SDRC_CKE0),                (IDIS | PTU | EN  | M0))
>>>>>> /*sdrc_cke0*/\
>>>>>> + MUX_VAL(CP(SDRC_CKE1),                (IDIS | PTU | EN  | M0))
>>>>>> /*sdrc_cke1*/
>>>>>>       
>>>>> one more reason why the mux needs a big change in mux handling :( I
>>>>> think we will end up with 1/2 a dozen crazy and code repetition for
>>>>> each board... Arrggghhh...
>>>>>     
>>>> NM: yes, it's really not easy to follow here
>>>> do you plan to do it soon?
>>>>   
>>> Been a little tied up recent days with "work load" hoping things to ease
>>> down.. will try to send out a mux cleanup rev next weekend..
>> Btw, I like the way we do pin mux in U-Boot at the moment (*). Or
>> better: I can't imagine a way how to do it even better without
>> introducing other disadvantages. But I will enjoy to have a look to
>> your changes ;) Maybe you can give us already an idea of how you like
>> to change it?
>>
>> (*) What I like:
>>
>> Having everything in one file for each board. With this, you can get a
>> complete overview of board's pin mux with looking only in one file.
>> And you can see immediately for each pin what is configured and how.
> Here are few quick things i like and dont like about the mux handling
> Pros:
> * Simple interface - just a #define
> Cons:
> * Repetition for every single board for common stuff such as Sdrc dat
> regs etc..

This isn't a con for me. Having this in each board directory, you know 
that it is exactly right for this board and that you don't 
(accidentally) use some other (generic) code from somewhere else that 
you never checked. And you have it in one, easy maintainable file. You 
don't have to search for pin mux in x files scattered around in the 
source tree, with chance that you miss one if you want to check the 
pin mux for your board.

> * Boards tend to enable *every* mux even if u-boot uses or not.

This is a very big pro for me. Again, with this, you can be sure that 
the pin mux, which you have in one place, is done right for exactly 
this board. And you don't have to rely on broken kernel pin mux of 
anything else. With this, you can be sure that your board boots fine 
without burning something due to wrong pin mux. Even if you don't use 
all interfaces.

> Proposal stage 1:
> * move common mux out to a mux.h, where board files can use the defaults
> if they like 

Con:

Configuration scattered around in several files, see above.

> -> i recollect having send such a patch out some time
> back.. but I never got the time to follow up on it.
> 
> Proposal stage 2:
> * kick out mux settings from each board, which does not belong there ->
> e.g. if the board does not do camera at u-boot level ->move that out to
> kernel.

Then you first have to fix totally broken kernel pin mux before we can 
do this ;)

Best regards

Dirk

  reply	other threads:[~2009-07-12 15:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 23:03 [U-Boot] [PATCH] Add support for the KwikByte KBOC OMAP35xx board christian at kwikbyte.com
2009-07-10  1:06 ` Nishanth Menon
2009-07-10 16:27   ` christian at kwikbyte.com
2009-07-12 13:13   ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-12 13:35     ` Dirk Behme
2009-07-12 14:48       ` Wolfgang Denk
2009-07-12 15:06         ` Dirk Behme
2009-07-12 15:52           ` Wolfgang Denk
2009-07-12 15:20       ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-12 15:34         ` Dirk Behme
2009-07-12 14:25     ` Nishanth Menon
2009-07-12 14:31       ` Dirk Behme
2009-07-12 14:50         ` [U-Boot] OMAP MUX handling improvement (was: Add support for the KwikByte KBOC OMAP35xx board) Nishanth Menon
2009-07-12 15:28           ` Dirk Behme [this message]
2009-07-12 14:45     ` [U-Boot] [PATCH] Add support for the KwikByte KBOC OMAP35xx board Wolfgang Denk

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=4A5A0124.2010108@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --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