Re: [PATCH v3] musb: blackfin: add bf60x support

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

 



On 29-01-2013 15:20, Sergei Shtylyov wrote:

This patch makes musb can work on blackfin bf60x series platform.
Bf60x uses MHDRC RTL version 2.0 musb ip core which don't need a lot of
blackfin
specific anomalies anymore.

Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx>
---
  drivers/usb/musb/Kconfig     |    2 +-
  drivers/usb/musb/blackfin.c  |   52
++++++++++++++++++++++++++++--------------
  drivers/usb/musb/musb_core.c |    6 +++--
  drivers/usb/musb/musb_core.h |    2 +-
  drivers/usb/musb/musb_dma.h  |    2 +-
  drivers/usb/musb/musb_io.h   |    2 +-
  drivers/usb/musb/musb_regs.h |    2 +-
  drivers/usb/musb/musbhsdma.c |    2 +-
  drivers/usb/musb/musbhsdma.h |    2 +-
  10 files changed, 52 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 23a0b7f..4d416bc 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -60,7 +60,7 @@ config USB_MUSB_DSPS

  config USB_MUSB_BLACKFIN
      tristate "Blackfin"
-    depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
+    depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523) || (BF60x)

    Why parens around BF60x?

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 14dab9f..74dd8cf 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
[...]
@@ -523,18 +542,12 @@ static int bfin_remove(struct platform_device *pdev)
  #ifdef CONFIG_PM
  static int bfin_suspend(struct device *dev)
  {
-    struct bfin_glue    *glue = dev_get_drvdata(dev);
-    struct musb        *musb = glue_to_musb(glue);
-
-    if (is_host_active(musb))
-        /*
-         * During hibernate gpio_vrsel will change from high to low
-         * low which will generate wakeup event resume the system
-         * immediately.  Set it to 0 before hibernate to avoid this
-         * wakeup event.
-         */
-        gpio_set_value(musb->config->gpio_vrsel, 0);
-
+#ifdef CONFIG_BF60x
+    int aphy = 0;

    Need empty line here.

+    aphy = bfin_read_USB_APHY_CNTRL();

    Why init to 0 if you immediately override it?

@@ -542,7 +555,12 @@ static int bfin_resume(struct device *dev)
  {
      struct bfin_glue    *glue = dev_get_drvdata(dev);
      struct musb        *musb = glue_to_musb(glue);
-
+#ifdef CONFIG_BF60x
+    int aphy;

    Need empty line here.

+    aphy = bfin_read_USB_APHY_CNTRL();
+    bfin_write_USB_APHY_CNTRL(aphy | 0x2);
+    SSYNC();
+#endif
      bfin_musb_reg_init(musb);

      return 0;
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f1c6c54..4dd18a9 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -226,7 +226,7 @@ static struct usb_phy_io_ops musb_ulpi_access = {

  /*-------------------------------------------------------------------------*/

-#if !defined(CONFIG_USB_MUSB_TUSB6010) && !defined(CONFIG_USB_MUSB_BLACKFIN)
+#if !defined(CONFIG_USB_MUSB_TUSB6010) &&
(!defined(CONFIG_USB_MUSB_BLACKFIN) || CONFIG_BF60x)

    You mean defined(CONFIG_BF60x)? Otherwise it's not correct.

The same comments applies to the recasted series of 2 patches, as far as I could see. BTW, it's not clear why you split the patch.

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