From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Date: Sun, 12 Jul 2009 09:50:17 -0500 Subject: [U-Boot] OMAP MUX handling improvement (was: Add support for the KwikByte KBOC OMAP35xx board) In-Reply-To: <4A59F3C6.2060607@googlemail.com> References: <20090709170309.dzm4q9q74kk0sc04@host302.hostmonster.com> <782515bb0907091806h40164862td187a1973200e559@mail.gmail.com> <20090712131357.GE7218@game.jcrosoft.org> <4A59F251.1050801@gmail.com> <4A59F3C6.2060607@googlemail.com> Message-ID: <4A59F829.5010203@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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