Skip to contentSkip to conversation

musb: get rid of unneeded musb->config->dyn_fifo

PATCH Applied Ajay Kumar Gupta 5 participants 17 messages Dec 15, 2009 – Dec 18, 2009 7 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 musb: get rid of unneeded musb->config->dyn_fifo

We can get dynamic FIFO information from CONFIGDATA register and thus there is no need for any user defiend dyn_fifo.

---
 drivers/usb/musb/musb_core.c |   19 ++++---------------
 include/linux/usb/musb.h     |    1 -
 2 files changed, 4 insertions(+), 16 deletions(-)
drivers/usb/musb/musb_core.c +4 -15
index 49f2346..2858940 100644
@@ -1404,21 +1404,10 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
 	musb->nr_endpoints = 1;
 	musb->epmask = 1;
 
-	if (reg & MUSB_CONFIGDATA_DYNFIFO) {
-		if (musb->config->dyn_fifo)
-			status = ep_config_from_table(musb);
-		else {
-			ERR("reconfigure software for Dynamic FIFOs\n");
-			status = -ENODEV;
-		}
-	} else {
-		if (!musb->config->dyn_fifo)
-			status = ep_config_from_hw(musb);
-		else {
-			ERR("reconfigure software for static FIFOs\n");
-			return -ENODEV;
-		}
-	}
+	if (reg & MUSB_CONFIGDATA_DYNFIFO)
+		status = ep_config_from_table(musb);
+	else
+		status = ep_config_from_hw(musb);
 
 	if (status < 0)
 		return status;
include/linux/usb/musb.h +0 -1
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
 	/* MUSB configuration-specific details */
 	unsigned	multipoint:1;	/* multipoint device */
-	unsigned	dyn_fifo:1;	/* supports dynamic fifo sizing */
 	unsigned	soft_con:1;	/* soft connect required */
 	unsigned	utm_16:1;	/* utm data witdh is 16 bits */
 	unsigned	big_endian:1;	/* true if CPU uses big-endian */
Signature · 6 lines
1.6.2.4

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

A message that is not in the archive (sent off-list or not yet received): 1260883909-26836-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org

#2 lore raw

PATCH 2/4 musb: save dynfifo in musb struct

Save dynamic FIFO read only information for later uses during musb_save/restore_context functions.

---
 drivers/usb/musb/musb_core.c |    4 +++-
 drivers/usb/musb/musb_core.h |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)
drivers/usb/musb/musb_core.c +3 -1
index 2858940..9d3b97d 100644
@@ -1328,8 +1328,10 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
 	reg = musb_read_configdata(mbase);
 
 	strcpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8");
-	if (reg & MUSB_CONFIGDATA_DYNFIFO)
+	if (reg & MUSB_CONFIGDATA_DYNFIFO) {
 		strcat(aInfo, ", dyn FIFOs");
+		musb->dyn_fifo = true;
+	}
 	if (reg & MUSB_CONFIGDATA_MPRXE) {
 		strcat(aInfo, ", bulk combine");
 #ifdef C_MP_RX
drivers/usb/musb/musb_core.h +1 -0
index 03d5090..969287c 100644
@@ -411,6 +411,7 @@ struct musb {
 
 	unsigned		hb_iso_rx:1;	/* high bandwidth iso rx? */
 	unsigned		hb_iso_tx:1;	/* high bandwidth iso tx? */
+	unsigned		dyn_fifo:1;	/* dynamic FIFO supported? */
 
 #ifdef C_MP_TX
 	unsigned bulk_split:1;
Signature · 6 lines
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH v4 3/4 musb: Add context save and restore support

Adding support for MUSB register save and restore during system suspend and resume.

Changes:
- Added musb_save/restore_context() functions
- Added platform specific musb_platform_save/restore_context() to handle platform specific jobs.
- Maintaining BlackFin compatibility by adding read/write functions for registers which are not available in BlackFin

Tested system suspend and resume on OMAP3EVM board.

---
Changes from v3:
- Removed force disconnect in gadget mode.

 drivers/usb/musb/musb_core.c |  146 ++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/musb/musb_core.h |   39 +++++++++++
 drivers/usb/musb/musb_regs.h |   90 ++++++++++++++++++++++++++
 drivers/usb/musb/omap2430.c  |   16 +++++
 4 files changed, 291 insertions(+), 0 deletions(-)
drivers/usb/musb/musb_core.c +146 -0
index 9d3b97d..39ce125 100644
@@ -2156,6 +2156,148 @@ static int __devexit musb_remove(struct platform_device *pdev)
 
 #ifdef	CONFIG_PM
 
+static struct musb_context_registers musb_context;
+
+void musb_save_context(struct musb *musb)
+{
+	int i;
+	void __iomem *musb_base = musb->mregs;
+
+	if (is_host_enabled(musb)) {
+		musb_context.frame = musb_readw(musb_base, MUSB_FRAME);
+		musb_context.testmode = musb_readb(musb_base, MUSB_TESTMODE);
+	}
+	musb_context.power = musb_readb(musb_base, MUSB_POWER);
+	musb_context.intrtxe = musb_readw(musb_base, MUSB_INTRTXE);
+	musb_context.intrrxe = musb_readw(musb_base, MUSB_INTRRXE);
+	musb_context.intrusbe = musb_readb(musb_base, MUSB_INTRUSBE);
+	musb_context.index = musb_readb(musb_base, MUSB_INDEX);
+	musb_context.devctl = musb_readb(musb_base, MUSB_DEVCTL);
+
+	for (i = 0; i < MUSB_C_NUM_EPS; ++i) {
+		musb_writeb(musb_base, MUSB_INDEX, i);
+		musb_context.index_regs[i].txmaxp =
+			musb_readw(musb_base, 0x10 + MUSB_TXMAXP);
+		musb_context.index_regs[i].txcsr =
+			musb_readw(musb_base, 0x10 + MUSB_TXCSR);
+		musb_context.index_regs[i].rxmaxp =
+			musb_readw(musb_base, 0x10 + MUSB_RXMAXP);
+		musb_context.index_regs[i].rxcsr =
+			musb_readw(musb_base, 0x10 + MUSB_RXCSR);
+
+		if (musb->dyn_fifo) {
+			musb_context.index_regs[i].txfifoadd =
+					musb_read_txfifoadd(musb_base);
+			musb_context.index_regs[i].rxfifoadd =
+					musb_read_rxfifoadd(musb_base);
+			musb_context.index_regs[i].txfifosz =
+					musb_read_txfifosz(musb_base);
+			musb_context.index_regs[i].rxfifosz =
+					musb_read_rxfifosz(musb_base);
+		}
+		if (is_host_enabled(musb)) {
+			musb_context.index_regs[i].txtype =
+				musb_readb(musb_base, 0x10 + MUSB_TXTYPE);
+			musb_context.index_regs[i].txinterval =
+				musb_readb(musb_base, 0x10 + MUSB_TXINTERVAL);
+			musb_context.index_regs[i].rxtype =
+				musb_readb(musb_base, 0x10 + MUSB_RXTYPE);
+			musb_context.index_regs[i].rxinterval =
+				musb_readb(musb_base, 0x10 + MUSB_RXINTERVAL);
+
+			musb_context.index_regs[i].txfunaddr =
+				musb_read_txfunaddr(musb_base, i);
+			musb_context.index_regs[i].txhubaddr =
+				musb_read_txhubaddr(musb_base, i);
+			musb_context.index_regs[i].txhubport =
+				musb_read_txhubport(musb_base, i);
+
+			musb_context.index_regs[i].rxfunaddr =
+				musb_read_rxfunaddr(musb_base, i);
+			musb_context.index_regs[i].rxhubaddr =
+				musb_read_rxhubaddr(musb_base, i);
+			musb_context.index_regs[i].rxhubport =
+				musb_read_rxhubport(musb_base, i);
+		}
+	}
+
+	musb_writeb(musb_base, MUSB_INDEX, musb_context.index);
+
+	musb_platform_save_context(&musb_context);
+}
+
+void musb_restore_context(struct musb *musb)
+{
+	int i;
+	void __iomem *musb_base = musb->mregs;
+	void __iomem *ep_target_regs;
+
+	musb_platform_restore_context(&musb_context);
+
+	if (is_host_enabled(musb)) {
+		musb_writew(musb_base, MUSB_FRAME, musb_context.frame);
+		musb_writeb(musb_base, MUSB_TESTMODE, musb_context.testmode);
+	}
+	musb_writeb(musb_base, MUSB_POWER, musb_context.power);
+	musb_writew(musb_base, MUSB_INTRTXE, musb_context.intrtxe);
+	musb_writew(musb_base, MUSB_INTRRXE, musb_context.intrrxe);
+	musb_writeb(musb_base, MUSB_INTRUSBE, musb_context.intrusbe);
+	musb_writeb(musb_base, MUSB_DEVCTL, musb_context.devctl);
+
+	for (i = 0; i < MUSB_C_NUM_EPS; ++i) {
+		musb_writeb(musb_base, MUSB_INDEX, i);
+		musb_writew(musb_base, 0x10 + MUSB_TXMAXP,
+			musb_context.index_regs[i].txmaxp);
+		musb_writew(musb_base, 0x10 + MUSB_TXCSR,
+			musb_context.index_regs[i].txcsr);
+		musb_writew(musb_base, 0x10 + MUSB_RXMAXP,
+			musb_context.index_regs[i].rxmaxp);
+		musb_writew(musb_base, 0x10 + MUSB_RXCSR,
+			musb_context.index_regs[i].rxcsr);
+
+		if (musb->dyn_fifo) {
+			musb_write_txfifosz(musb_base,
+				musb_context.index_regs[i].txfifosz);
+			musb_write_rxfifosz(musb_base,
+				musb_context.index_regs[i].rxfifosz);
+			musb_write_txfifoadd(musb_base,
+				musb_context.index_regs[i].txfifoadd);
+			musb_write_rxfifoadd(musb_base,
+				musb_context.index_regs[i].rxfifoadd);
+		}
+
+		if (is_host_enabled(musb)) {
+			musb_writeb(musb_base, 0x10 + MUSB_TXTYPE,
+				musb_context.index_regs[i].txtype);
+			musb_writeb(musb_base, 0x10 + MUSB_TXINTERVAL,
+				musb_context.index_regs[i].txinterval);
+			musb_writeb(musb_base, 0x10 + MUSB_RXTYPE,
+				musb_context.index_regs[i].rxtype);
+			musb_writeb(musb_base, 0x10 + MUSB_RXINTERVAL,
+
+			musb_context.index_regs[i].rxinterval);
+			musb_write_txfunaddr(musb_base, i,
+				musb_context.index_regs[i].txfunaddr);
+			musb_write_txhubaddr(musb_base, i,
+				musb_context.index_regs[i].txhubaddr);
+			musb_write_txhubport(musb_base, i,
+				musb_context.index_regs[i].txhubport);
+
+			ep_target_regs =
+				musb_read_target_reg_base(i, musb_base);
+
+			musb_write_rxfunaddr(ep_target_regs,
+				musb_context.index_regs[i].rxfunaddr);
+			musb_write_rxhubaddr(ep_target_regs,
+				musb_context.index_regs[i].rxhubaddr);
+			musb_write_rxhubport(ep_target_regs,
+				musb_context.index_regs[i].rxhubport);
+		}
+	}
+
+	musb_writeb(musb_base, MUSB_INDEX, musb_context.index);
+}
+
 static int musb_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -2177,6 +2319,8 @@ static int musb_suspend(struct device *dev)
 		 */
 	}
 
+	musb_save_context(musb);
+
 	if (musb->set_clock)
 		musb->set_clock(musb->clock, 0);
 	else
@@ -2198,6 +2342,8 @@ static int musb_resume_noirq(struct device *dev)
 	else
 		clk_enable(musb->clock);
 
+	musb_restore_context(musb);
+
 	/* for static cmos like DaVinci, register values were preserved
 	 * unless for some reason the whole soc powered down or the USB
 	 * module got reset through the PSC (vs just being disabled).
drivers/usb/musb/musb_core.h +39 -0
index 969287c..38de1be 100644
@@ -462,6 +462,45 @@ struct musb {
 #endif
 };
 
+#ifdef CONFIG_PM
+struct musb_csr_regs {
+	/* FIFO registers */
+	u16 txmaxp, txcsr, rxmaxp, rxcsr;
+	u16 rxfifoadd, txfifoadd;
+	u8 txtype, txinterval, rxtype, rxinterval;
+	u8 rxfifosz, txfifosz;
+	u8 txfunaddr, txhubaddr, txhubport;
+	u8 rxfunaddr, rxhubaddr, rxhubport;
+};
+
+struct musb_context_registers {
+
+#if defined(CONFIG_ARCH_OMAP34XX)
+	u32 otg_sysconfig, otg_forcestandby;
+#endif
+	u8 power;
+	u16 intrtxe, intrrxe;
+	u8 intrusbe;
+	u16 frame;
+	u8 index, testmode;
+
+	u8 devctl, misc;
+
+	struct musb_csr_regs index_regs[MUSB_C_NUM_EPS];
+};
+
+#if defined(CONFIG_ARCH_OMAP34XX) || defined(CONFIG_ARCH_OMAP2430)
+extern void musb_platform_save_context(struct musb_context_registers
+		*musb_context);
+extern void musb_platform_restore_context(struct musb_context_registers
+		*musb_context);
+#else
+#define musb_platform_save_context(x)		do {} while (0)
+#define musb_platform_restore_context(x)	do {} while (0)
+#endif
+
+#endif
+
 static inline void musb_set_vbus(struct musb *musb, int is_on)
 {
 	musb->board_set_vbus(musb, is_on);
drivers/usb/musb/musb_regs.h +90 -0

114 lines not on this page · raw message

drivers/usb/musb/omap2430.c +16 -0
index 83beeac..15a3f27 100644
@@ -255,6 +255,22 @@ int __init musb_platform_init(struct musb *musb)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+void musb_platform_save_context(struct musb_context_registers
+		*musb_context)
+{
+	musb_context->otg_sysconfig = omap_readl(OTG_SYSCONFIG);
+	musb_context->otg_forcestandby = omap_readl(OTG_FORCESTDBY);
+}
+
+void musb_platform_restore_context(struct musb_context_registers
+		*musb_context)
+{
+	omap_writel(musb_context->otg_sysconfig, OTG_SYSCONFIG);
+	omap_writel(musb_context->otg_forcestandby, OTG_FORCESTDBY);
+}
+#endif
+
 int musb_platform_suspend(struct musb *musb)
 {
 	u32 l;
Signature · 1 line
1.6.2.4

A message that is not in the archive (sent off-list or not yet received): 1260883909-26836-3-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org

#5 lore raw

PATCH 4/4 musb: Add 'extvbus' in musb_hdrc_platform_data

Some of the board might use external Vbus power supply on musb interface which would require to program ULPI_BUSCONTROL register.

Adding 'extvbus' flag which can be set from such boards which will be checked at musb driver files before programming ULPI_BUSCONTROL.

---
Appended MUSB_ before bot definitions.

 drivers/usb/musb/musb_core.c |    8 ++++++++
 drivers/usb/musb/musb_regs.h |    5 +++++
 include/linux/usb/musb.h     |    3 +++
 3 files changed, 16 insertions(+), 0 deletions(-)
drivers/usb/musb/musb_core.c +8 -0
index 39ce125..479468e 100644
@@ -2016,6 +2016,7 @@ bad_config:
 	/* host side needs more setup */
 	if (is_host_enabled(musb)) {
 		struct usb_hcd	*hcd = musb_to_hcd(musb);
+		u8 busctl;
 
 		otg_set_host(musb->xceiv, &hcd->self);
 
@@ -2023,6 +2024,13 @@ bad_config:
 			hcd->self.otg_port = 1;
 		musb->xceiv->host = &hcd->self;
 		hcd->power_budget = 2 * (plat->power ? : 250);
+
+		/* program PHY to use external vBus if required */
+		if (plat->extvbus) {
+			busctl = musb_readb(musb->mregs, MUSB_ULPI_BUSCONTROL);
+			busctl |= MUSB_ULPI_USE_EXTVBUS;
+			musb_writeb(musb->mregs, MUSB_ULPI_BUSCONTROL, busctl);
+		}
 	}
 
 	/* For the host-only role, we can activate right away.
drivers/usb/musb/musb_regs.h +5 -0
index 8ca8f23..895fb05 100644
@@ -72,6 +72,10 @@
 #define MUSB_DEVCTL_HR		0x02
 #define MUSB_DEVCTL_SESSION	0x01
 
+/* MUSB ULPI VBUSCONTROL */
+#define MUSB_ULPI_USE_EXTVBUS	0x01
+#define MUSB_ULPI_USE_EXTVBUSIND 0x02
+
 /* TESTMODE */
 #define MUSB_TEST_FORCE_HOST	0x80
 #define MUSB_TEST_FIFO_ACCESS	0x40
@@ -246,6 +250,7 @@
 
 /* REVISIT: vctrl/vstatus: optional vendor utmi+phy register at 0x68 */
 #define MUSB_HWVERS		0x6C	/* 8 bit */
+#define MUSB_ULPI_BUSCONTROL	0x70	/* 8 bit */
 
 #define MUSB_EPINFO		0x78	/* 8 bit */
 #define MUSB_RAMINFO		0x79	/* 8 bit */
include/linux/usb/musb.h +3 -0
index c5f006e..d77d532 100644
@@ -75,6 +75,9 @@ struct musb_hdrc_platform_data {
 	/* (HOST or OTG) msec/2 after VBUS on till power good */
 	u8		potpgt;
 
+	/* (HOST or OTG) program PHY for external Vbus */
+	unsigned	extvbus:1;
+
 	/* Power the device on or off */
 	int		(*set_power)(int state);
 
Signature · 6 lines
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#6 lore raw

Re: [PATCH 4/4] musb: Add 'extvbus' in musb_hdrc_platform_data

Quoted 7 lines · ext Ajay Kumar Gupta

Some of the board might use external Vbus power supply on musb interface which would require to program ULPI_BUSCONTROL register.

Adding 'extvbus' flag which can be set from such boards which will be checked at musb driver files before programming ULPI_BUSCONTROL.

applied, thanks

Signature · 1 line
balbi
Applied
#7 lore raw

Re: [PATCH 3/4 v4] musb: Add context save and restore support

In reply to a message not in the archive
Quoted 10 lines · ext Ajay Kumar Gupta

Adding support for MUSB register save and restore during system suspend and resume.

Changes:
- Added musb_save/restore_context() functions
- Added platform specific musb_platform_save/restore_context() to handle platform specific jobs.
- Maintaining BlackFin compatibility by adding read/write functions for registers which are not available in BlackFin

Quoted 4 lines

Tested system suspend and resume on OMAP3EVM board.

applied, thanks

Signature · 5 lines
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw

Re: [PATCH 3/4 v4] musb: Add context save and restore support

In reply to Ajay Kumar Gupta
Quoted 10 lines · ext Ajay Kumar Gupta

Adding support for MUSB register save and restore during system suspend and resume.

Changes:
- Added musb_save/restore_context() functions
- Added platform specific musb_platform_save/restore_context() to handle platform specific jobs.
- Maintaining BlackFin compatibility by adding read/write functions for registers which are not available in BlackFin

Quoted 4 lines

Tested system suspend and resume on OMAP3EVM board.

for this, I'm waiting you and Arnaud to agree on what you both need.

Signature · 1 line
balbi
#10 lore raw
In reply to a message not in the archive
Quoted 2 lines · Ajay Kumar Gupta

We can get dynamic FIFO information from CONFIGDATA register and thus there is no need for any user defiend dyn_fifo.

Have you tested this?

$ grep dyn_fifo arch/arm/mach-omap2/*.c
arch/arm/mach-omap2/usb-musb.c: .dyn_fifo       = 1,

Tony

Quoted 55 lines
---
 drivers/usb/musb/musb_core.c |   19 ++++---------------
 include/linux/usb/musb.h     |    1 -
 2 files changed, 4 insertions(+), 16 deletions(-)
drivers/usb/musb/musb_core.c +4 -15
index 49f2346..2858940 100644
@@ -1404,21 +1404,10 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
 	musb->nr_endpoints = 1;
 	musb->epmask = 1;
 
-	if (reg & MUSB_CONFIGDATA_DYNFIFO) {
-		if (musb->config->dyn_fifo)
-			status = ep_config_from_table(musb);
-		else {
-			ERR("reconfigure software for Dynamic FIFOs\n");
-			status = -ENODEV;
-		}
-	} else {
-		if (!musb->config->dyn_fifo)
-			status = ep_config_from_hw(musb);
-		else {
-			ERR("reconfigure software for static FIFOs\n");
-			return -ENODEV;
-		}
-	}
+	if (reg & MUSB_CONFIGDATA_DYNFIFO)
+		status = ep_config_from_table(musb);
+	else
+		status = ep_config_from_hw(musb);
 
 	if (status < 0)
 		return status;
include/linux/usb/musb.h +0 -1
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
 	/* MUSB configuration-specific details */
 	unsigned	multipoint:1;	/* multipoint device */
-	unsigned	dyn_fifo:1;	/* supports dynamic fifo sizing */
 	unsigned	soft_con:1;	/* soft connect required */
 	unsigned	utm_16:1;	/* utm data witdh is 16 bits */
 	unsigned	big_endian:1;	/* true if CPU uses big-endian */
Signature · 6 lines
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw
Quoted 8 lines

-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Tuesday, December 15, 2009 11:10 PM
To: Gupta, Ajay Kumar
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/4] musb: get rid of unneeded musb->config->dyn_fifo

Quoted 8 lines
Quoted 2 lines · Ajay Kumar Gupta

We can get dynamic FIFO information from CONFIGDATA register and thus there is no need for any user defiend dyn_fifo.

Have you tested this?

$ grep dyn_fifo arch/arm/mach-omap2/*.c
arch/arm/mach-omap2/usb-musb.c: .dyn_fifo       = 1,

I did test but with this arch specific compilation fixes.

We are still waiting a response from Greg if he will accept these arch specific changes with USB patch set.

-Ajay

Quoted 55 lines

Tony

drivers/usb/musb/musb_core.c static int __init musb_core_init(u16 musb_type,

Quoted 11 lines
---
 drivers/usb/musb/musb_core.c |   19 ++++---------------
 include/linux/usb/musb.h     |    1 -
 2 files changed, 4 insertions(+), 16 deletions(-)
drivers/usb/musb/musb_core.c +0 -0
index 49f2346..2858940 100644
@@ -1404,21 +1404,10 @@ static int __init musb_core_init(u16 musb_type,

struct musb *musb)

Quoted 40 lines
drivers/usb/musb/musb_core.c +4 -15
 	musb->nr_endpoints = 1;
 	musb->epmask = 1;
 
-	if (reg & MUSB_CONFIGDATA_DYNFIFO) {
-		if (musb->config->dyn_fifo)
-			status = ep_config_from_table(musb);
-		else {
-			ERR("reconfigure software for Dynamic FIFOs\n");
-			status = -ENODEV;
-		}
-	} else {
-		if (!musb->config->dyn_fifo)
-			status = ep_config_from_hw(musb);
-		else {
-			ERR("reconfigure software for static FIFOs\n");
-			return -ENODEV;
-		}
-	}
+	if (reg & MUSB_CONFIGDATA_DYNFIFO)
+		status = ep_config_from_table(musb);
+	else
+		status = ep_config_from_hw(musb);
 
 	if (status < 0)
 		return status;
include/linux/usb/musb.h +0 -2
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
 	/* MUSB configuration-specific details */
 	unsigned	multipoint:1;	/* multipoint device */
-	unsigned	dyn_fifo:1;	/* supports dynamic fifo sizing */
 	unsigned	soft_con:1;	/* soft connect required */
 	unsigned	utm_16:1;	/* utm data witdh is 16 bits */
 	unsigned	big_endian:1;	/* true if CPU uses big-endian */
--

1.6.2.4

Quoted 4 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

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

#13 lore raw
In reply to Ajay Kumar Gupta

Hi,

include/linux/usb/musb.h struct musb_hdrc_eps_bits { · line 35

Quoted 12 lines · ext Ajay Kumar Gupta
include/linux/usb/musb.h +0 -1
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
 	/* MUSB configuration-specific details */
 	unsigned	multipoint:1;	/* multipoint device */
-	unsigned	dyn_fifo:1;	/* supports dynamic fifo sizing */
 	unsigned	soft_con:1;	/* soft connect required */
 	unsigned	utm_16:1;	/* utm data witdh is 16 bits */
 	unsigned	big_endian:1;	/* true if CPU uses big-endian */

same problem as the other patch I sent:

$ git grep -w dyn_fifo arch/
arch/arm/mach-davinci/usb.c:    .dyn_fifo       = true,
arch/arm/mach-omap2/usb-musb.c: .dyn_fifo       = 1,
arch/blackfin/mach-bf527/boards/cm_bf527.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezbrd.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezkit.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/cm_bf548.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/ezkit.c:        .dyn_fifo       = 0,

we have to agree who will carry the arch changes.

Signature · 1 line
balbi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 27 lines · Balbi Felipe (Nokia-D/Helsinki)

Hi,

include/linux/usb/musb.h struct musb_hdrc_eps_bits { · line 35

Quoted 12 lines · ext Ajay Kumar Gupta
include/linux/usb/musb.h +0 -1
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
 	/* MUSB configuration-specific details */
 	unsigned	multipoint:1;	/* multipoint device */
-	unsigned	dyn_fifo:1;	/* supports dynamic fifo sizing */
 	unsigned	soft_con:1;	/* soft connect required */
 	unsigned	utm_16:1;	/* utm data witdh is 16 bits */
 	unsigned	big_endian:1;	/* true if CPU uses big-endian */

same problem as the other patch I sent:

$ git grep -w dyn_fifo arch/
arch/arm/mach-davinci/usb.c:    .dyn_fifo       = true,
arch/arm/mach-omap2/usb-musb.c: .dyn_fifo       = 1,
arch/blackfin/mach-bf527/boards/cm_bf527.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezbrd.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezkit.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/cm_bf548.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/ezkit.c:        .dyn_fifo       = 0,
Quoted 1 line

we have to agree who will carry the arch changes.

what we can do is mark that field as deprecated and give one major release for people to remove that from their boards, then we send a patch finally removing it.

I'm talking about:

include/linux/usb/musb.h +1 -1
index d437556..c3ca147 100644
@@ -30,7 +30,7 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
        /* MUSB configuration-specific details */
        unsigned        multipoint:1;   /* multipoint device */
-       unsigned        dyn_fifo:1;     /* supports dynamic fifo sizing */
+       unsigned        dyn_fifo:1 __deprecated;        /* supports dynamic fifo sizing */
        unsigned        soft_con:1;     /* soft connect required */
        unsigned        utm_16:1;       /* utm data witdh is 16 bits */
        unsigned        big_endian:1;   /* true if CPU uses big-endian */

how do you feel about that ?

Signature · 5 lines
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#17 lore raw
Quoted 28 lines

Hi,

include/linux/usb/musb.h struct musb_hdrc_eps_bits { · line 35

Quoted 12 lines · ext Ajay Kumar Gupta
include/linux/usb/musb.h +0 -1
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
     /* MUSB configuration-specific details */
     unsigned        multipoint:1;   /* multipoint device */
-     unsigned        dyn_fifo:1;     /* supports dynamic fifo sizing */
     unsigned        soft_con:1;     /* soft connect required */
     unsigned        utm_16:1;       /* utm data witdh is 16 bits */
     unsigned        big_endian:1;   /* true if CPU uses big-endian */

same problem as the other patch I sent:

$ git grep -w dyn_fifo arch/
arch/arm/mach-davinci/usb.c:    .dyn_fifo       = true,
arch/arm/mach-omap2/usb-musb.c: .dyn_fifo       = 1,
arch/blackfin/mach-bf527/boards/cm_bf527.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezbrd.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezkit.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/cm_bf548.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/ezkit.c:        .dyn_fifo       = 0,
Quoted 5 lines

we have to agree who will carry the arch changes.

what we can do is mark that field as deprecated and give one major release for people to remove that from their boards, then we send a patch finally removing it.

Even with one major release window someone has to submit patch removing them from arch/ files. So I think it's better to remove them now itself. we can seperately submit patches to respective maintainers. Or best is if Greg can accept those changes which are mostly trivial.

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

#18 lore raw
Quoted 44 lines

-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of Gupta, Ajay Kumar
Sent: Tuesday, December 15, 2009 8:45 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: RE: [PATCH 1/4] musb: get rid of unneeded musb->config->dyn_fifo

Quoted 27 lines

Hi,

include/linux/usb/musb.h struct musb_hdrc_eps_bits { · line 35

Quoted 12 lines · ext Ajay Kumar Gupta
include/linux/usb/musb.h +0 -1
index d437556..c5f006e 100644
@@ -30,7 +30,6 @@ struct musb_hdrc_eps_bits {
 struct musb_hdrc_config {
     /* MUSB configuration-specific details */
     unsigned        multipoint:1;   /* multipoint device */
-     unsigned        dyn_fifo:1;     /* supports dynamic fifo sizing */
     unsigned        soft_con:1;     /* soft connect required */
     unsigned        utm_16:1;       /* utm data witdh is 16 bits */
     unsigned        big_endian:1;   /* true if CPU uses big-endian */

same problem as the other patch I sent:

$ git grep -w dyn_fifo arch/
arch/arm/mach-davinci/usb.c:    .dyn_fifo       = true,
arch/arm/mach-omap2/usb-musb.c: .dyn_fifo       = 1,
arch/blackfin/mach-bf527/boards/cm_bf527.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezbrd.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf527/boards/ezkit.c:        .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/cm_bf548.c:     .dyn_fifo       = 0,
arch/blackfin/mach-bf548/boards/ezkit.c:        .dyn_fifo       = 0,
Quoted 5 lines

we have to agree who will carry the arch changes.

what we can do is mark that field as deprecated and give one major release for people to remove that from their boards, then we send a patch finally removing it.

Quoted 7 lines

Even with one major release window someone has to submit patch removing them
from arch/ files. So I think it's better to remove them now itself. we can seperately
submit patches to respective maintainers. Or best is if Greg can accept those changes
which are mostly trivial.

Felipe,

Any update on this ? Shall I send the series again with __deprecated ? or If you can just add it on your own?

Thanks,
Ajay

Quoted 5 lines

-Ajay--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 19F8576C6E063C45BE387C64729E73940449F4399B-/tLxBxkBPtCIQmiDNMet8wC/[email protected]

#20 lore raw

Hi,

Quoted 2 lines · Ajay Kumar

Any update on this ? Shall I send the series again with __deprecated ? or If you can just add it on your own?

I guess we have to do that and start sending patches to arch maintainers removing the dyn_fifo stuff from board-files.

we should have all fixed by the end of .33-final, then we send a patch finally removing dyn_fifo from musb's platform_data.

Signature · 5 lines
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#21 lore raw
Quoted 11 lines

-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Thursday, December 17, 2009 6:40 PM
To: Gupta, Ajay Kumar
Cc: Balbi Felipe (Nokia-D/Helsinki); [email protected]; linux- [email protected]
Subject: Re: [PATCH 1/4] musb: get rid of unneeded musb->config->dyn_fifo

Hi,

On Thu, Dec 17, 2009 at 02:01:27PM +0100, ext Gupta, Ajay Kumar wrote:

Quoted 8 lines
Quoted 2 lines

Any update on this ? Shall I send the series again with __deprecated ? or If you can just add it on your own?

I guess we have to do that and start sending patches to arch maintainers removing the dyn_fifo stuff from board-files.

we should have all fixed by the end of .33-final, then we send a patch finally removing dyn_fifo from musb's platform_data.

Ok fine, then please drop that specific patch from series and pick the Others.

-Ajay

Quoted 3 lines

--
balbi

A message that is not in the archive (sent off-list or not yet received): 19F8576C6E063C45BE387C64729E73940449F439A1-/tLxBxkBPtCIQmiDNMet8wC/[email protected]

#23 lore raw

Hi,

Quoted 2 lines · Ajay Kumar

Ok fine, then please drop that specific patch from series and pick the Others.

will do :-)

Signature · 5 lines
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html