Re: [PATCH 2/2] usb: musb: add support for u8500 platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 07-12-2010 17:00, Mian Yousaf Kaukab wrote:

Initial support for u8500 platform.

Signed-off-by: Mian Yousaf Kaukab<mian.yousaf.kaukab@xxxxxxxxxxxxxx>
Acked-by: Linus Walleij<linus.walleij@xxxxxxxxxxxxxx>
[...]

diff --git a/drivers/usb/musb/abx500.c b/drivers/usb/musb/abx500.c
new file mode 100644
index 0000000..95668ff
--- /dev/null
+++ b/drivers/usb/musb/abx500.c
@@ -0,0 +1,62 @@
[...]
+int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
+{
+	u8 devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
+
+	musb_writeb(musb->mregs, MUSB_DEVCTL, devctl | MUSB_DEVCTL_SESSION);
+
+	return 0;

You probably copied this from omap2430.c? This is incorrect way of inplemeting this method. See drivers/usb/musb/da8xx.c for the correct one. The method should enforce host/gadget/OTG mode.

+int __init musb_platform_init(struct musb *musb, void *board_data)
+{
+	clk_enable(musb->clock);
+
+	musb->xceiv = otg_get_transceiver();
+	if (!musb->xceiv) {
+		pr_err("no transceiver configured\n");
+		return -ENODEV;;

   You forgot to call clk_disable()...

+	}

   Better yet, call clk_enable() after otg_get_trransceiver().

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux