[U-Boot] OMAP MUX handling improvement (was: Add support for the KwikByte KBOC OMAP35xx board)

Nishanth Menon menon.nishanth at gmail.com
Sun Jul 12 16:50:17 CEST 2009


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..
* Boards tend to enable *every* mux even if u-boot uses or not.

Proposal stage 1:
* move common mux out to a mux.h, where board files can use the defaults
if they like -> 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.


This is just my 2 cents..
Regards,
Nishanth Menon


More information about the U-Boot mailing list