From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Date: Mon, 23 Feb 2009 14:30:40 +0200 Subject: [U-Boot] [PATCH 6/7 v2] OMAP3: Add OMAP3 core changes for MUSB In-Reply-To: <6ed0b2680902230413o33f98059q7239cbba0114c2b3@mail.gmail.com> References: <1234464946-20400-1-git-send-email-dirk.behme@googlemail.com> <1234464946-20400-2-git-send-email-dirk.behme@googlemail.com> <1234464946-20400-3-git-send-email-dirk.behme@googlemail.com> <1234464946-20400-4-git-send-email-dirk.behme@googlemail.com> <1234464946-20400-5-git-send-email-dirk.behme@googlemail.com> <1234464946-20400-6-git-send-email-dirk.behme@googlemail.com> <1234464946-20400-7-git-send-email-dirk.behme@googlemail.com> <20090222155940.GD9867@game.jcrosoft.org> <49A17BCD.1030803@googlemail.com> <6ed0b2680902230413o33f98059q7239cbba0114c2b3@mail.gmail.com> Message-ID: <49A296F0.4000509@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 Grazvydas Ignotas said the following on 02/23/2009 02:13 PM: >>>> +#ifdef CONFIG_MUSB >>>> + /* Enable the MUSB interface clock */ >>>> + sr32(&prcm_base->iclken1_core, 4, 1, 0x1); >>>> +#endif >>>> >>> the design of u-boot is to enagle the IP only when he use it >>> so please do not enable the clock every time just when you want to use >>> (in the USB driver init) >>> >> This is already answered in >> >> http://lists.denx.de/pipermail/u-boot/2009-February/047452.html >> > > He probably wants to say that clocks should be enabled only when "usb > start" is issued, as you might have u-boot compiled with USB defines > set, but never actually use USB. > Comparing having all clock initialization at a central point (clock.c) - which seems simple vs having get-put kind of clock apis in U-boot : I might go for the simple solution of all clocks in a single place.. u-boot is supposed to "keep it simple", enable/disable clocks on a need basis is elegant, though could end up getting extended to i2c and other peripherals too(if I were to stretch is pretty hard ;) ).. makes more sense in kernel(which is already there) than here - my 2 cents.. Regards, Nishanth Menon