lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1294670535-9059-1-git-send-email-gadiyar@ti.com>
Date:	Mon, 10 Jan 2011 20:12:15 +0530
From:	Anand Gadiyar <gadiyar@...com>
To:	linux-omap@...r.kernel.org, linux-next@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	Greg KH <gregkh@...e.de>, Felipe Balbi <balbi@...com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Anand Gadiyar <gadiyar@...com>,
	Benoit Cousson <b-cousson@...com>,
	Paul Walmsley <paul@...an.com>,
	Tony Lindgren <tony@...mide.com>
Subject: [PATCH] arm: omap4: pandaboard: turn on PHY reference clock at init

The SMSC 3320 USB PHY on the OMAP4 Pandaboard needs a 19.2 MHz
reference clock. This clock is provided from the OMAP4's fref_clk3
pad.

Recent changes to clock44xx_data.c made the clock framework aware
of the existence of these fref_clk[i] lines. If the option
CONFIG_OMAP_RESET_CLOCKS is enabled in the kernel, then the
clock framework will turn these clocks off during bootup.

Explicitly request and keep this clock enabled at init for the
Pandaboard, so that the PHY receives this clock at all times.

Reported-by: Ming Lei <tom.leiming@...il.com>
Signed-off-by: Anand Gadiyar <gadiyar@...com>
Cc: Benoit Cousson <b-cousson@...com>
Cc: Paul Walmsley <paul@...an.com>
Cc: Tony Lindgren <tony@...mide.com>
---
Tony,

The clock database changes were merged just before Christmas, so
we did not detect this sooner. Would be nice to get this merged in
the -rc series, so that we get EHCI and ethernet functional on the Panda.

Ming Lei,

Could you please test this and confirm it fixes the issue for you?

- Anand

 arch/arm/mach-omap2/board-omap4panda.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/board-omap4panda.c
+++ linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
@@ -19,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/leds.h>
 #include <linux/gpio.h>
@@ -95,7 +96,16 @@ static const struct ehci_hcd_omap_platfo
 static void __init omap4_ehci_init(void)
 {
 	int ret;
+	struct clk *phy_ref_clk;
 
+	/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
+	phy_ref_clk = clk_get(NULL, "auxclk3_ck");
+	if (IS_ERR(phy_ref_clk)) {
+		pr_err("Cannot request auxclk3\n");
+		goto error1;
+	}
+	clk_set_rate(phy_ref_clk, 19200000);
+	clk_enable(phy_ref_clk);
 
 	/* disable the power to the usb hub prior to init */
 	ret = gpio_request(GPIO_HUB_POWER, "hub_power");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ