This patch makes musb framework can support blackfin bf60x series soc 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 <lliu...@gmail.com>
---
 drivers/usb/musb/Kconfig     |    2 +-
 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 +-
 8 files changed, 11 insertions(+), 9 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)
 
 config USB_MUSB_UX500
        tristate "U8500 and U5500"
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)
 
 /*
  * Load an endpoint's FIFO
@@ -1039,7 +1039,9 @@ static void musb_shutdown(struct platform_device *pdev)
        || defined(CONFIG_USB_MUSB_AM35X)               \
        || defined(CONFIG_USB_MUSB_AM35X_MODULE)        \
        || defined(CONFIG_USB_MUSB_DSPS)                \
-       || defined(CONFIG_USB_MUSB_DSPS_MODULE)
+       || defined(CONFIG_USB_MUSB_DSPS_MODULE)         \
+       || defined(CONFIG_USB_MUSB_BLACKFIN)
+
 static ushort fifo_mode = 4;
 #elif defined(CONFIG_USB_MUSB_UX500)                   \
        || defined(CONFIG_USB_MUSB_UX500_MODULE)
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 7fb4819..a46ec5d 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -449,7 +449,7 @@ static inline struct musb *gadget_to_musb(struct usb_gadget 
*g)
        return container_of(g, struct musb, g);
 }
 
-#ifdef CONFIG_BLACKFIN
+#if defined(CONFIG_BLACKFIN) && !defined(CONFIG_BF60x)
 static inline int musb_read_fifosize(struct musb *musb,
                struct musb_hw_ep *hw_ep, u8 epnum)
 {
diff --git a/drivers/usb/musb/musb_dma.h b/drivers/usb/musb/musb_dma.h
index 1b6b827..6bb84df 100644
--- a/drivers/usb/musb/musb_dma.h
+++ b/drivers/usb/musb/musb_dma.h
@@ -84,7 +84,7 @@ struct musb_hw_ep;
  *     Only allow DMA mode 1 to be used when the USB will actually generate the
  *     interrupts we expect.
  */
-#ifdef CONFIG_BLACKFIN
+#if defined(CONFIG_BLACKFIN) && !defined(CONFIG_BF60x)
 # undef USE_MODE1
 # if !ANOMALY_05000456
 #  define USE_MODE1
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index eebeed7..d28b789 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -37,7 +37,7 @@
 
 #include <linux/io.h>
 
-#ifndef CONFIG_BLACKFIN
+#if !defined(CONFIG_BLACKFIN) || defined(CONFIG_BF60x)
 
 /* NOTE:  these offsets are all in bytes */
 
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h
index 03f2655..bffa4a1 100644
--- a/drivers/usb/musb/musb_regs.h
+++ b/drivers/usb/musb/musb_regs.h
@@ -214,7 +214,7 @@
 #define MUSB_HUBADDR_MULTI_TT          0x80
 
 
-#ifndef CONFIG_BLACKFIN
+#if !defined(CONFIG_BLACKFIN) || defined(CONFIG_BF60x)
 
 /*
  * Common USB registers
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index 3d1fd52..d53715f 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -269,7 +269,7 @@ static irqreturn_t dma_controller_irq(int irq, void 
*private_data)
 
        int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
 
-#ifdef CONFIG_BLACKFIN
+#if defined(CONFIG_BLACKFIN) && !defined(CONFIG_BF60x)
        /* Clear DMA interrupt flags */
        musb_writeb(mbase, MUSB_HSDMA_INTR, int_hsdma);
 #endif
diff --git a/drivers/usb/musb/musbhsdma.h b/drivers/usb/musb/musbhsdma.h
index f7b13fd2..2a8e082 100644
--- a/drivers/usb/musb/musbhsdma.h
+++ b/drivers/usb/musb/musbhsdma.h
@@ -31,7 +31,7 @@
  *
  */
 
-#ifndef CONFIG_BLACKFIN
+#if !defined(CONFIG_BLACKFIN) || defined(CONFIG_BF60x)
 
 #define MUSB_HSDMA_BASE                0x200
 #define MUSB_HSDMA_INTR                (MUSB_HSDMA_BASE + 0)
-- 
1.7.9.5


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

Reply via email to