Skip to contentSkip to conversation

Platform support MSP onchip USB controller.

PATCH Applied Anoop P.A 2 participants 4 messages Jan 25, 2011 – Feb 11, 2011 MIPS

lore
Share & tools
lore

Anoop P.A

author
#0 lore raw

PATCH 4/6 Platform support MSP onchip USB controller.

From: Anoop P A <[email protected]>

Following patch add platform support for onchip USB controller.

---
 .../mips/include/asm/pmc-sierra/msp71xx/msp_regs.h |   17 +-
 arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h |  144 ++++++++++++
 arch/mips/pmc-sierra/Kconfig                       |    5 +
 arch/mips/pmc-sierra/msp71xx/Makefile              |    2 +-
 arch/mips/pmc-sierra/msp71xx/msp_usb.c             |  239 ++++++++++++++-----
 5 files changed, 335 insertions(+), 72 deletions(-)
 create mode 100644 arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h
arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h +9 -8
index 603eb73..692c1b6 100644
@@ -91,12 +91,10 @@
 					/* MAC C device registers       */
 #define MSP_ADSL2_BASE		(MSP_MSB_BASE + 0xA80000)
 					/* ADSL2 device registers       */
-#define MSP_USB_BASE		(MSP_MSB_BASE + 0xB40000)
-					/* USB device registers         */
-#define MSP_USB_BASE_START	(MSP_MSB_BASE + 0xB40100)
-					/* USB device registers         */
-#define MSP_USB_BASE_END	(MSP_MSB_BASE + 0xB401FF)
-					/* USB device registers         */
+#define MSP_USB0_BASE		(MSP_MSB_BASE + 0xB00000)
+					/* USB0 device registers        */
+#define MSP_USB1_BASE		(MSP_MSB_BASE + 0x300000)
+					/* USB1 device registers	*/
 #define MSP_CPUIF_BASE		(MSP_MSB_BASE + 0xC00000)
 					/* CPU interface registers      */
 
@@ -319,8 +317,11 @@
 #define CPU_ERR2_REG		regptr(MSP_SLP_BASE + 0x184)
 					/* CPU/SLP Error status 1       */
 
-#define EXTENDED_GPIO_REG	regptr(MSP_SLP_BASE + 0x188)
-					/* Extended GPIO register       */
+/* Extended GPIO registers       */
+#define EXTENDED_GPIO1_REG	regptr(MSP_SLP_BASE + 0x188)
+#define EXTENDED_GPIO2_REG	regptr(MSP_SLP_BASE + 0x18c)
+#define EXTENDED_GPIO_REG	EXTENDED_GPIO1_REG
+					/* Backward-compatibility	*/
 
 /* System Error registers */
 #define SLP_ERR_STS_REG		regptr(MSP_SLP_BASE + 0x190)
arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h new file +144 -0

144 lines not on this page · raw message

arch/mips/pmc-sierra/Kconfig +5 -0
index c139988..af41cda 100644
@@ -27,6 +27,7 @@ config PMC_MSP7120_GW
 	select SYS_SUPPORTS_MULTITHREADING
 	select IRQ_MSP_CIC
 	select HW_HAS_PCI
+	select MSP_HAS_USB
 
 config PMC_MSP7120_FPGA
 	bool "PMC-Sierra MSP7120 FPGA"
@@ -39,3 +40,7 @@ endchoice
 config HYPERTRANSPORT
 	bool "Hypertransport Support for PMC-Sierra Yosemite"
 	depends on PMC_YOSEMITE
+
+config MSP_HAS_USB
+	boolean
+	depends on PMC_MSP
arch/mips/pmc-sierra/msp71xx/Makefile +1 -1
index a002fa2..f26cab3 100644
@@ -9,6 +9,6 @@ obj-$(CONFIG_IRQ_MSP_SLP) += msp_irq_slp.o
 obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o msp_irq_per.o
 obj-$(CONFIG_PCI) += msp_pci.o
 obj-$(CONFIG_MSPETH) += msp_eth.o
-obj-$(CONFIG_USB_MSP71XX) += msp_usb.o
+obj-$(CONFIG_MSP_HAS_USB) += msp_usb.o
 obj-$(CONFIG_MIPS_MT_SMP) += msp_smp.o
 obj-$(CONFIG_MIPS_MT_SMTC) += msp_smtc.o
arch/mips/pmc-sierra/msp71xx/msp_usb.c +176 -63

307 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#1 lore raw

arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h line 32

Quoted 5 lines · Anoop P.A
arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h new file +5 -0
+#ifdef CONFIG_MSP_HAS_DUAL_USB
+#define NUM_USB_DEVS   2
+#else
+#define NUM_USB_DEVS   1
+#endif

I thought you meant to replace CONFIG_MSP_HAS_DUAL_USB with a runtime check?

Ralf

author
#2 lore raw
Quoted 10 lines · Ralf Baechle

arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h line 32

Quoted 5 lines · Anoop P.A
arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h new file +5 -0
+#ifdef CONFIG_MSP_HAS_DUAL_USB
+#define NUM_USB_DEVS   2
+#else
+#define NUM_USB_DEVS   1
+#endif

I thought you meant to replace CONFIG_MSP_HAS_DUAL_USB with a runtime check?

No. I added that as an configuration option will be used in future.

Quoted 2 lines

Ralf

#3 lore raw
In reply to Anoop P.A

On Tue, Jan 25, 2011 at 01:52:05PM +0530, Anoop P.A wrote:

I put this one into the 2.6.39 queue for now but I still wonder what your plan about CONFIG_MSP_HAS_DUAL_USB is.

Ralf