From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Quadros Date: Fri, 19 Jul 2013 12:30:54 +0300 Subject: [U-Boot] [PATCH v3 2/7] ARM: OMAP5: USB: Add OMAP5 common USB EHCI information In-Reply-To: <51E82A77.6090105@ti.com> References: <1374092167-27645-1-git-send-email-dmurphy@ti.com> <1374092167-27645-3-git-send-email-dmurphy@ti.com> <51E794D9.6050306@ti.com> <51E82A77.6090105@ti.com> Message-ID: <51E9074E.3080403@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/18/2013 08:48 PM, Dan Murphy wrote: > Dear Roger > > On 07/18/2013 02:10 AM, Roger Quadros wrote: >> Dan, >> >> On 07/17/2013 11:16 PM, Dan Murphy wrote: >>> * Enable the OMAP5 EHCI host clocks >>> * Add OMAP5 EHCI register definitions >>> * Add OMAP5 ES2 host revision >>> >>> Signed-off-by: Dan Murphy >>> --- >>> v3 - Updated per comments - http://patchwork.ozlabs.org/patch/258230/ >>> >>> arch/arm/cpu/armv7/omap5/hw_data.c | 17 ++++++++++++ >>> arch/arm/include/asm/arch-omap5/clock.h | 6 +++++ >>> arch/arm/include/asm/arch-omap5/ehci.h | 43 +++++++++++++++++++++++++++++++ >>> arch/arm/include/asm/ehci-omap.h | 1 + >>> drivers/usb/host/ehci-omap.c | 2 +- >>> 5 files changed, 68 insertions(+), 1 deletion(-) >>> create mode 100644 arch/arm/include/asm/arch-omap5/ehci.h >>> >>> diff --git a/arch/arm/cpu/armv7/omap5/hw_data.c b/arch/arm/cpu/armv7/omap5/hw_data.c >>> index 07b1108..b1be748 100644 >>> --- a/arch/arm/cpu/armv7/omap5/hw_data.c >>> +++ b/arch/arm/cpu/armv7/omap5/hw_data.c >>> @@ -414,6 +414,10 @@ void enable_basic_clocks(void) >>> (*prcm)->cm_l4per_gpio6_clkctrl, >>> (*prcm)->cm_l4per_gpio7_clkctrl, >>> (*prcm)->cm_l4per_gpio8_clkctrl, >>> +#ifdef CONFIG_USB_EHCI_OMAP >>> + (*prcm)->cm_clksel_usb_60mhz, >>> + (*prcm)->cm_l3init_hsusbtll_clkctrl, >>> +#endif >>> 0 >>> }; >>> >>> @@ -425,6 +429,9 @@ void enable_basic_clocks(void) >>> (*prcm)->cm_wkup_wdtimer2_clkctrl, >>> (*prcm)->cm_l4per_uart3_clkctrl, >>> (*prcm)->cm_l4per_i2c1_clkctrl, >>> +#ifdef CONFIG_USB_EHCI_OMAP >>> + (*prcm)->cm_l3init_hsusbhost_clkctrl, >>> +#endif >>> 0 >>> }; >>> >>> @@ -448,6 +455,16 @@ void enable_basic_clocks(void) >>> setbits_le32((*prcm)->cm_wkup_gptimer1_clkctrl, >>> GPTIMER1_CLKCTRL_CLKSEL_MASK); >>> >>> +#ifdef CONFIG_USB_EHCI >>> + /* Enable port 2 and 3 clocks*/ >>> + setbits_le32((*prcm)->cm_l3init_hsusbhost_clkctrl, >>> + USB_HOST_HS_CLKCTRL_MASK); >> For consistency, maybe you should enable all 3 port clocks >> since you are enabling all 3 TLL clocks below? > So I thought about this we should enable all 3 clocks since it is a common file and disable the unused clocks in the board file. > > Or we should enable the specific port clocks during ehci_hcd_init in the board file only since it is a board implementation detail. > > Thoughts? IMHO enabling the clocks based on board is best. cheers, -roger