From patchwork Thu Oct 27 14:47:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 79694 Delivered-To: patch@linaro.org Received: by 10.80.142.83 with SMTP id 19csp685999edx; Thu, 27 Oct 2016 07:48:56 -0700 (PDT) X-Received: by 10.194.102.165 with SMTP id fp5mr7085255wjb.134.1477579736726; Thu, 27 Oct 2016 07:48:56 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id y5si8970578wjc.17.2016.10.27.07.48.56; Thu, 27 Oct 2016 07:48:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D5D8DB384C; Thu, 27 Oct 2016 16:48:15 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6vyuLQ866C_U; Thu, 27 Oct 2016 16:48:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D4BACB3831; Thu, 27 Oct 2016 16:48:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 300EC4B98B for ; Thu, 27 Oct 2016 16:47:34 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id byt4rFV1vJdO for ; Thu, 27 Oct 2016 16:47:34 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by theia.denx.de (Postfix) with ESMTPS id 1DEAB4B624 for ; Thu, 27 Oct 2016 16:47:29 +0200 (CEST) Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-07.nifty.com with ESMTP id u9RElDVO017011; Thu, 27 Oct 2016 23:47:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u9RElDVO017011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1477579644; bh=plofoObY5UyKUqTS8X+ROoJKeMhqn3b+bIMIj2wOJkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmFy88m9o9UfWUsaJ0kX0jgzSpvT8G9jZzTTHd/ObVqO7OFeCudBs6QISIFKiYyDR Es/vNPK7KMDkYZaZ90ZNZPeCyNbCJIe9aGY3CbQ/hj9QzpR98UI7NVn7EzA2nj21i8 MJ7iX4nGrMEaQDzX+Uzbz/8aajfZI0VYt1XrKrtUDkSZp/AH6cbQrvddwmcC8r6rkU md7PyM1D0p/e3uxmi29bfV0j1ZZbw+bMFR7NuXo7LAifh7MqvhisUeXm2tD/TOGiH3 E9cljHF7NEB1l3eNcPYiON0jGVLiuUCxSgcWo4Bo6TPPQWdsUUmS0CYYWEvyPlyroT 8kVrmAZcngdcg== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 27 Oct 2016 23:47:05 +0900 Message-Id: <1477579630-9692-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477579630-9692-1-git-send-email-yamada.masahiro@socionext.com> References: <1477579630-9692-1-git-send-email-yamada.masahiro@socionext.com> Cc: Albert Aribaud Subject: [U-Boot] [PATCH 06/11] ARM: uniphier: enable clocks to MIO/STDMAC on LD11 if USB is enabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" At the moment, the clk driver is not clever enough to automatically enable parent clocks like Linux. Enable the STDMAC clock explicitly if USB is enabled. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/clk/clk-ld11.c | 11 +++++++++++ arch/arm/mach-uniphier/sc64-regs.h | 2 ++ 2 files changed, 13 insertions(+) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/clk/clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-ld11.c index 92a0733..ca8737d 100644 --- a/arch/arm/mach-uniphier/clk/clk-ld11.c +++ b/arch/arm/mach-uniphier/clk/clk-ld11.c @@ -9,6 +9,7 @@ #include #include "../init.h" +#include "../sc64-regs.h" #include "../sg-regs.h" void uniphier_ld11_clk_init(void) @@ -25,4 +26,14 @@ void uniphier_ld11_clk_init(void) writel(3, SG_ETPHYPSHUT); writel(7, SG_ETPHYCNT); } + +#ifdef CONFIG_USB_EHCI + { + /* FIXME: the current clk driver can not handle parents */ + u32 tmp; + tmp = readl(SC_CLKCTRL4); + tmp |= SC_CLKCTRL4_MIO | SC_CLKCTRL4_STDMAC; + writel(tmp, SC_CLKCTRL4); + } +#endif } diff --git a/arch/arm/mach-uniphier/sc64-regs.h b/arch/arm/mach-uniphier/sc64-regs.h index b0a4281..d3aa185 100644 --- a/arch/arm/mach-uniphier/sc64-regs.h +++ b/arch/arm/mach-uniphier/sc64-regs.h @@ -52,6 +52,8 @@ #define SC_CLKCTRL (SC_BASE_ADDR | 0x2100) #define SC_CLKCTRL3 (SC_BASE_ADDR | 0x2108) #define SC_CLKCTRL4 (SC_BASE_ADDR | 0x210c) +#define SC_CLKCTRL4_MIO (1 << 10) +#define SC_CLKCTRL4_STDMAC (1 << 8) #define SC_CLKCTRL4_PERI (1 << 7) #define SC_CLKCTRL4_ETHER (1 << 6) #define SC_CLKCTRL4_NAND (1 << 0)