linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More updates to bcm63xx support (resend)
@ 2009-06-01 17:21 Maxime Bizon
  2009-06-01 17:21 ` [PATCH 01/10] bcm63xx: remove duplicate init fields Maxime Bizon
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli


[Resend, I forgot to generate an actual patch series and missed one
patch doing so, sorry for the noise]

Hi Ralf,

The following patch series (on top of Florian's latest post) are
mostly trivial fixes & cleanup requested by subsystem maintainers.

Patch 2 and 4 are actual bugfixes.

Florian has some more patches to send to you, I will wait for them to
be folded in the bcm63xx tree and then repost the whole serie.

I only got feedback from USB maintainer, and addressed most of them.
Davem has accidentally dropped the patch from its patchwork, so I
think just resubmitting will do. Nothing from serial & pcmcia.

The ethernet PHY support patch should be dropped, the only feature we
get is IRQ support which after field testing seems to be buggy. Maybe
later.

Is it ok for you if I ask for the patches to go through your tree once
they get acked ?

Thanks !

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 01/10] bcm63xx: remove duplicate init fields.
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:07   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete Maxime Bizon
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

This patch removes duplicate init fields in resource.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 arch/mips/bcm63xx/dev-enet.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c
index 51c2e5a..188fa66 100644
--- a/arch/mips/bcm63xx/dev-enet.c
+++ b/arch/mips/bcm63xx/dev-enet.c
@@ -42,12 +42,10 @@ static struct resource enet0_res[] = {
 	},
 	{
 		.start		= -1, /* filled at runtime */
-		.start		= IRQ_ENET0_RXDMA,
 		.flags		= IORESOURCE_IRQ,
 	},
 	{
 		.start		= -1, /* filled at runtime */
-		.start		= IRQ_ENET0_TXDMA,
 		.flags		= IORESOURCE_IRQ,
 	},
 };
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
  2009-06-01 17:21 ` [PATCH 01/10] bcm63xx: remove duplicate init fields Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:09   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops Maxime Bizon
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

We're not disabling IRQ, so we must call the irq safe flavour of
napi_complete.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/net/bcm63xx_enet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index a91f909..20e08ef 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -450,7 +450,7 @@ static int bcm_enet_poll(struct napi_struct *napi, int budget)
 
 	/* no more packet in rx/tx queue, remove device from poll
 	 * queue */
-	__napi_complete(napi);
+	napi_complete(napi);
 
 	/* restore rx/tx interrupt */
 	enet_dma_writel(priv, ENETDMA_IR_PKTDONE_MASK,
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops.
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
  2009-06-01 17:21 ` [PATCH 01/10] bcm63xx: remove duplicate init fields Maxime Bizon
  2009-06-01 17:21 ` [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:10   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 04/10] bcm63xx: limit number of usb port to 1 Maxime Bizon
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

This patch makes bcm63xx_enet driver use netdevice ops.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/net/bcm63xx_enet.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index 20e08ef..36324b3 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -1551,6 +1551,19 @@ static void bcm_enet_hw_preinit(struct bcm_enet_priv *priv)
 	enet_writel(priv, val, ENET_MIBCTL_REG);
 }
 
+static const struct net_device_ops bcm_enet_ops = {
+	.ndo_open		= bcm_enet_open,
+	.ndo_stop		= bcm_enet_stop,
+	.ndo_start_xmit		= bcm_enet_start_xmit,
+	.ndo_get_stats		= bcm_enet_get_stats,
+	.ndo_set_mac_address	= bcm_enet_set_mac_address,
+	.ndo_set_multicast_list = bcm_enet_set_multicast_list,
+	.ndo_do_ioctl		= bcm_enet_ioctl,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	.ndo_poll_controller = bcm_enet_netpoll,
+#endif
+};
+
 /*
  * allocate netdevice, request register memory and register device.
  */
@@ -1716,17 +1729,8 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
 		enet_writel(priv, 0, ENET_MIB_REG(i));
 
 	/* register netdevice */
-	dev->open = bcm_enet_open;
-	dev->stop = bcm_enet_stop;
-	dev->hard_start_xmit = bcm_enet_start_xmit;
-	dev->get_stats = bcm_enet_get_stats;
-	dev->set_mac_address = bcm_enet_set_mac_address;
-	dev->set_multicast_list = bcm_enet_set_multicast_list;
+	dev->netdev_ops = &bcm_enet_ops;
 	netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
-	dev->do_ioctl = bcm_enet_ioctl;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	dev->poll_controller = bcm_enet_netpoll;
-#endif
 
 	SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 04/10] bcm63xx: limit number of usb port to 1.
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (2 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:10   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c Maxime Bizon
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

This patch disables the use of more than one USB port. Hardware has
two ports, but one may be shared with USB slave port.

Until we have this information in the platform data, don't use the
second port.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ohci-bcm63xx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ohci-bcm63xx.c b/drivers/usb/host/ohci-bcm63xx.c
index 08807d9..74f432f 100644
--- a/drivers/usb/host/ohci-bcm63xx.c
+++ b/drivers/usb/host/ohci-bcm63xx.c
@@ -20,6 +20,8 @@ static int __devinit ohci_bcm63xx_start(struct usb_hcd *hcd)
 	struct ohci_hcd *ohci = hcd_to_ohci(hcd);
 	int ret;
 
+	ohci->num_ports = 1;
+
 	ret = ohci_init(ohci);
 	if (ret < 0)
 		return ret;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (3 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 04/10] bcm63xx: limit number of usb port to 1 Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:11   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 06/10] bcm63xx: don't set bus type " Maxime Bizon
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

As requested by USB maintainer, use platform_get_irq instead of
platform_get_resource.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ohci-bcm63xx.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/ohci-bcm63xx.c b/drivers/usb/host/ohci-bcm63xx.c
index 74f432f..f0e4639 100644
--- a/drivers/usb/host/ohci-bcm63xx.c
+++ b/drivers/usb/host/ohci-bcm63xx.c
@@ -58,15 +58,15 @@ static const struct hc_driver ohci_bcm63xx_hc_driver = {
 
 static int __devinit ohci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 {
-	struct resource *res_mem, *res_irq;
+	struct resource *res_mem;
 	struct usb_hcd *hcd;
 	struct ohci_hcd *ohci;
 	u32 reg;
-	int ret;
+	int ret, irq;
 
 	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res_mem || !res_irq)
+	irq = platform_get_irq(pdev, 0);
+	if (!res_mem || irq < 0)
 		return -ENODEV;
 
 	if (BCMCPU_IS_6348()) {
@@ -114,7 +114,7 @@ static int __devinit ohci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 		OHCI_QUIRK_FRAME_NO;
 	ohci_hcd_init(ohci);
 
-	ret = usb_add_hcd(hcd, res_irq->start, IRQF_DISABLED);
+	ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
 	if (ret)
 		goto out2;
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 06/10] bcm63xx: don't set bus type in ohci-bcm63xx.c
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (4 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:11   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 07/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

The platform code already sets the bus type, so don't do it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ohci-bcm63xx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-bcm63xx.c b/drivers/usb/host/ohci-bcm63xx.c
index f0e4639..d48c8ac 100644
--- a/drivers/usb/host/ohci-bcm63xx.c
+++ b/drivers/usb/host/ohci-bcm63xx.c
@@ -154,7 +154,6 @@ static struct platform_driver ohci_hcd_bcm63xx_driver = {
 	.driver		= {
 		.name	= "bcm63xx_ohci",
 		.owner	= THIS_MODULE,
-		.bus	= &platform_bus_type
 	},
 };
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 07/10] bcm63xx: clarify meaning of the magical value in ohci-bcm63xx.c
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (5 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 06/10] bcm63xx: don't set bus type " Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:11   ` Florian Fainelli
  2009-06-01 18:38   ` [PATCH 07/10 (v2)] " Maxime Bizon
  2009-06-01 17:21 ` [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c Maxime Bizon
                   ` (3 subsequent siblings)
  10 siblings, 2 replies; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

USB maintainer asked for clarification  of the magic value used during
USB init. Be clear about the source of it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ohci-bcm63xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-bcm63xx.c b/drivers/usb/host/ohci-bcm63xx.c
index d48c8ac..bd66d5a 100644
--- a/drivers/usb/host/ohci-bcm63xx.c
+++ b/drivers/usb/host/ohci-bcm63xx.c
@@ -85,7 +85,9 @@ static int __devinit ohci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 		reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
 		reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
 		bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
-		/* don't ask... */
+		/* the magic value comes for the original vendor BSP
+		 * and is needed for USB to work. Datasheet does not
+		 * help, so the magic value is used as-is. */
 		bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
 	} else
 		return 0;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (6 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 07/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:12   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 09/10] bcm63xx: don't set bus type " Maxime Bizon
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

As requested by USB maintainer, use platform_get_irq instead of
platform_get_resource.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ehci-bcm63xx.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/ehci-bcm63xx.c b/drivers/usb/host/ehci-bcm63xx.c
index 2fef571..0aba0f9 100644
--- a/drivers/usb/host/ehci-bcm63xx.c
+++ b/drivers/usb/host/ehci-bcm63xx.c
@@ -62,15 +62,15 @@ static const struct hc_driver ehci_bcm63xx_hc_driver = {
 
 static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 {
-	struct resource *res_mem, *res_irq;
+	struct resource *res_mem;
 	struct usb_hcd *hcd;
 	struct ehci_hcd *ehci;
 	u32 reg;
-	int ret;
+	int ret, irq;
 
 	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res_mem || !res_irq)
+	irq = platform_get_irq(pdev, 0);;
+	if (!res_mem || irq < 0)
 		return -ENODEV;
 
 	reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_REG);
@@ -109,7 +109,7 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 	ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
 	ehci->sbrn = 0x20;
 
-	ret = usb_add_hcd(hcd, res_irq->start, IRQF_DISABLED);
+	ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
 	if (ret)
 		goto out2;
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 09/10] bcm63xx: don't set bus type in ehci-bcm63xx.c
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (7 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 18:12   ` Florian Fainelli
  2009-06-01 17:21 ` [PATCH 10/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
  2009-06-02  9:41 ` More updates to bcm63xx support (resend) Ralf Baechle
  10 siblings, 1 reply; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

The platform code already sets the bus type, so don't do it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ehci-bcm63xx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-bcm63xx.c b/drivers/usb/host/ehci-bcm63xx.c
index 0aba0f9..8a62c0a 100644
--- a/drivers/usb/host/ehci-bcm63xx.c
+++ b/drivers/usb/host/ehci-bcm63xx.c
@@ -145,7 +145,6 @@ static struct platform_driver ehci_hcd_bcm63xx_driver = {
 	.driver		= {
 		.name	= "bcm63xx_ehci",
 		.owner	= THIS_MODULE,
-		.bus	= &platform_bus_type
 	},
 };
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 10/10] bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (8 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 09/10] bcm63xx: don't set bus type " Maxime Bizon
@ 2009-06-01 17:21 ` Maxime Bizon
  2009-06-01 17:57   ` Sergei Shtylyov
  2009-06-01 18:12   ` [PATCH 10/10] " Florian Fainelli
  2009-06-02  9:41 ` More updates to bcm63xx support (resend) Ralf Baechle
  10 siblings, 2 replies; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 17:21 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

USB maintainer asked for clarification of the magic value used during
USB init. Be clear about the source of it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ehci-bcm63xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-bcm63xx.c b/drivers/usb/host/ehci-bcm63xx.c
index 8a62c0a..5a03fdd 100644
--- a/drivers/usb/host/ehci-bcm63xx.c
+++ b/drivers/usb/host/ehci-bcm63xx.c
@@ -78,7 +78,9 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 	reg |= USBH_PRIV_SWAP_EHCI_ENDN_MASK;
 	bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
 
-	/* don't ask... */
+	/* the magic value comes for the original vendor BSP and is
+	 * needed for USB to work. Datasheet does not help, so the
+	 * magic value is used as-is. */
 	bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
 
 	hcd = usb_create_hcd(&ehci_bcm63xx_hc_driver, &pdev->dev, "bcm63xx");
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/10] bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 10/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
@ 2009-06-01 17:57   ` Sergei Shtylyov
  2009-06-01 18:36     ` [PATCH 10/10 (v2)] " Maxime Bizon
  2009-06-01 18:12   ` [PATCH 10/10] " Florian Fainelli
  1 sibling, 1 reply; 25+ messages in thread
From: Sergei Shtylyov @ 2009-06-01 17:57 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle, Florian Fainelli

Hello.

Maxime Bizon wrote:

> USB maintainer asked for clarification of the magic value used during
> USB init. Be clear about the source of it.

> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
> ---
>  drivers/usb/host/ehci-bcm63xx.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

> diff --git a/drivers/usb/host/ehci-bcm63xx.c b/drivers/usb/host/ehci-bcm63xx.c
> index 8a62c0a..5a03fdd 100644
> --- a/drivers/usb/host/ehci-bcm63xx.c
> +++ b/drivers/usb/host/ehci-bcm63xx.c
> @@ -78,7 +78,9 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
>  	reg |= USBH_PRIV_SWAP_EHCI_ENDN_MASK;
>  	bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
>  
> -	/* don't ask... */
> +	/* the magic value comes for the original vendor BSP and is
> +	 * needed for USB to work. Datasheet does not help, so the
> +	 * magic value is used as-is. */
>  	bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
>  
>  	hcd = usb_create_hcd(&ehci_bcm63xx_hc_driver, &pdev->dev, "bcm63xx");

    Documentation/CodingStyle, chapter 8:

The preferred style for long (multi-line) comments is:
 

         /*
          * This is the preferred style for multi-line
          * comments in the Linux kernel source code.
          * Please use it consistently.
          *
          * Description:  A column of asterisks on the left side,
          * with beginning and ending almost-blank lines.
          */

WBR, Sergei

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/10] bcm63xx: remove duplicate init fields.
  2009-06-01 17:21 ` [PATCH 01/10] bcm63xx: remove duplicate init fields Maxime Bizon
@ 2009-06-01 18:07   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:07 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:49 Maxime Bizon, vous avez écrit :
> This patch removes duplicate init fields in resource.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  arch/mips/bcm63xx/dev-enet.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c
> index 51c2e5a..188fa66 100644
> --- a/arch/mips/bcm63xx/dev-enet.c
> +++ b/arch/mips/bcm63xx/dev-enet.c
> @@ -42,12 +42,10 @@ static struct resource enet0_res[] = {
>  	},
>  	{
>  		.start		= -1, /* filled at runtime */
> -		.start		= IRQ_ENET0_RXDMA,
>  		.flags		= IORESOURCE_IRQ,
>  	},
>  	{
>  		.start		= -1, /* filled at runtime */
> -		.start		= IRQ_ENET0_TXDMA,
>  		.flags		= IORESOURCE_IRQ,
>  	},
>  };

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete
  2009-06-01 17:21 ` [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete Maxime Bizon
@ 2009-06-01 18:09   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:09 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:50 Maxime Bizon, vous avez écrit :
> We're not disabling IRQ, so we must call the irq safe flavour of
> napi_complete.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Tested-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/net/bcm63xx_enet.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
> index a91f909..20e08ef 100644
> --- a/drivers/net/bcm63xx_enet.c
> +++ b/drivers/net/bcm63xx_enet.c
> @@ -450,7 +450,7 @@ static int bcm_enet_poll(struct napi_struct *napi, int
> budget)
>
>  	/* no more packet in rx/tx queue, remove device from poll
>  	 * queue */
> -	__napi_complete(napi);
> +	napi_complete(napi);
>
>  	/* restore rx/tx interrupt */
>  	enet_dma_writel(priv, ENETDMA_IR_PKTDONE_MASK,

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops.
  2009-06-01 17:21 ` [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops Maxime Bizon
@ 2009-06-01 18:10   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:10 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:51 Maxime Bizon, vous avez écrit :
> This patch makes bcm63xx_enet driver use netdevice ops.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/net/bcm63xx_enet.c |   24 ++++++++++++++----------
>  1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
> index 20e08ef..36324b3 100644
> --- a/drivers/net/bcm63xx_enet.c
> +++ b/drivers/net/bcm63xx_enet.c
> @@ -1551,6 +1551,19 @@ static void bcm_enet_hw_preinit(struct bcm_enet_priv
> *priv) enet_writel(priv, val, ENET_MIBCTL_REG);
>  }
>
> +static const struct net_device_ops bcm_enet_ops = {
> +	.ndo_open		= bcm_enet_open,
> +	.ndo_stop		= bcm_enet_stop,
> +	.ndo_start_xmit		= bcm_enet_start_xmit,
> +	.ndo_get_stats		= bcm_enet_get_stats,
> +	.ndo_set_mac_address	= bcm_enet_set_mac_address,
> +	.ndo_set_multicast_list = bcm_enet_set_multicast_list,
> +	.ndo_do_ioctl		= bcm_enet_ioctl,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +	.ndo_poll_controller = bcm_enet_netpoll,
> +#endif
> +};
> +
>  /*
>   * allocate netdevice, request register memory and register device.
>   */
> @@ -1716,17 +1729,8 @@ static int __devinit bcm_enet_probe(struct
> platform_device *pdev) enet_writel(priv, 0, ENET_MIB_REG(i));
>
>  	/* register netdevice */
> -	dev->open = bcm_enet_open;
> -	dev->stop = bcm_enet_stop;
> -	dev->hard_start_xmit = bcm_enet_start_xmit;
> -	dev->get_stats = bcm_enet_get_stats;
> -	dev->set_mac_address = bcm_enet_set_mac_address;
> -	dev->set_multicast_list = bcm_enet_set_multicast_list;
> +	dev->netdev_ops = &bcm_enet_ops;
>  	netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
> -	dev->do_ioctl = bcm_enet_ioctl;
> -#ifdef CONFIG_NET_POLL_CONTROLLER
> -	dev->poll_controller = bcm_enet_netpoll;
> -#endif
>
>  	SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 04/10] bcm63xx: limit number of usb port to 1.
  2009-06-01 17:21 ` [PATCH 04/10] bcm63xx: limit number of usb port to 1 Maxime Bizon
@ 2009-06-01 18:10   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:10 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:52 Maxime Bizon, vous avez écrit :
> This patch disables the use of more than one USB port. Hardware has
> two ports, but one may be shared with USB slave port.
>
> Until we have this information in the platform data, don't use the
> second port.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/usb/host/ohci-bcm63xx.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-bcm63xx.c
> b/drivers/usb/host/ohci-bcm63xx.c index 08807d9..74f432f 100644
> --- a/drivers/usb/host/ohci-bcm63xx.c
> +++ b/drivers/usb/host/ohci-bcm63xx.c
> @@ -20,6 +20,8 @@ static int __devinit ohci_bcm63xx_start(struct usb_hcd
> *hcd) struct ohci_hcd *ohci = hcd_to_ohci(hcd);
>  	int ret;
>
> +	ohci->num_ports = 1;
> +
>  	ret = ohci_init(ohci);
>  	if (ret < 0)
>  		return ret;



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c Maxime Bizon
@ 2009-06-01 18:11   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:11 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:53 Maxime Bizon, vous avez écrit :
> As requested by USB maintainer, use platform_get_irq instead of
> platform_get_resource.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>
> ---
>  drivers/usb/host/ohci-bcm63xx.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-bcm63xx.c
> b/drivers/usb/host/ohci-bcm63xx.c index 74f432f..f0e4639 100644
> --- a/drivers/usb/host/ohci-bcm63xx.c
> +++ b/drivers/usb/host/ohci-bcm63xx.c
> @@ -58,15 +58,15 @@ static const struct hc_driver ohci_bcm63xx_hc_driver =
> {
>
>  static int __devinit ohci_hcd_bcm63xx_drv_probe(struct platform_device
> *pdev) {
> -	struct resource *res_mem, *res_irq;
> +	struct resource *res_mem;
>  	struct usb_hcd *hcd;
>  	struct ohci_hcd *ohci;
>  	u32 reg;
> -	int ret;
> +	int ret, irq;
>
>  	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res_mem || !res_irq)
> +	irq = platform_get_irq(pdev, 0);
> +	if (!res_mem || irq < 0)
>  		return -ENODEV;
>
>  	if (BCMCPU_IS_6348()) {
> @@ -114,7 +114,7 @@ static int __devinit ohci_hcd_bcm63xx_drv_probe(struct
> platform_device *pdev) OHCI_QUIRK_FRAME_NO;
>  	ohci_hcd_init(ohci);
>
> -	ret = usb_add_hcd(hcd, res_irq->start, IRQF_DISABLED);
> +	ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
>  	if (ret)
>  		goto out2;



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 06/10] bcm63xx: don't set bus type in ohci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 06/10] bcm63xx: don't set bus type " Maxime Bizon
@ 2009-06-01 18:11   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:11 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:54 Maxime Bizon, vous avez écrit :
> The platform code already sets the bus type, so don't do it.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/usb/host/ohci-bcm63xx.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-bcm63xx.c
> b/drivers/usb/host/ohci-bcm63xx.c index f0e4639..d48c8ac 100644
> --- a/drivers/usb/host/ohci-bcm63xx.c
> +++ b/drivers/usb/host/ohci-bcm63xx.c
> @@ -154,7 +154,6 @@ static struct platform_driver ohci_hcd_bcm63xx_driver =
> { .driver		= {
>  		.name	= "bcm63xx_ohci",
>  		.owner	= THIS_MODULE,
> -		.bus	= &platform_bus_type
>  	},
>  };



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 07/10] bcm63xx: clarify meaning of the magical value in ohci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 07/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
@ 2009-06-01 18:11   ` Florian Fainelli
  2009-06-01 18:38   ` [PATCH 07/10 (v2)] " Maxime Bizon
  1 sibling, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:11 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:55 Maxime Bizon, vous avez écrit :
> USB maintainer asked for clarification  of the magic value used during
> USB init. Be clear about the source of it.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>
> ---
>  drivers/usb/host/ohci-bcm63xx.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-bcm63xx.c
> b/drivers/usb/host/ohci-bcm63xx.c index d48c8ac..bd66d5a 100644
> --- a/drivers/usb/host/ohci-bcm63xx.c
> +++ b/drivers/usb/host/ohci-bcm63xx.c
> @@ -85,7 +85,9 @@ static int __devinit ohci_hcd_bcm63xx_drv_probe(struct
> platform_device *pdev) reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
>  		reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
>  		bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
> -		/* don't ask... */
> +		/* the magic value comes for the original vendor BSP
> +		 * and is needed for USB to work. Datasheet does not
> +		 * help, so the magic value is used as-is. */
>  		bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
>  	} else
>  		return 0;



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c Maxime Bizon
@ 2009-06-01 18:12   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:12 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:56 Maxime Bizon, vous avez écrit :
> As requested by USB maintainer, use platform_get_irq instead of
> platform_get_resource.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/usb/host/ehci-bcm63xx.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-bcm63xx.c
> b/drivers/usb/host/ehci-bcm63xx.c index 2fef571..0aba0f9 100644
> --- a/drivers/usb/host/ehci-bcm63xx.c
> +++ b/drivers/usb/host/ehci-bcm63xx.c
> @@ -62,15 +62,15 @@ static const struct hc_driver ehci_bcm63xx_hc_driver =
> {
>
>  static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device
> *pdev) {
> -	struct resource *res_mem, *res_irq;
> +	struct resource *res_mem;
>  	struct usb_hcd *hcd;
>  	struct ehci_hcd *ehci;
>  	u32 reg;
> -	int ret;
> +	int ret, irq;
>
>  	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res_mem || !res_irq)
> +	irq = platform_get_irq(pdev, 0);;
> +	if (!res_mem || irq < 0)
>  		return -ENODEV;
>
>  	reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_REG);
> @@ -109,7 +109,7 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct
> platform_device *pdev) ehci->hcs_params = ehci_readl(ehci,
> &ehci->caps->hcs_params);
>  	ehci->sbrn = 0x20;
>
> -	ret = usb_add_hcd(hcd, res_irq->start, IRQF_DISABLED);
> +	ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
>  	if (ret)
>  		goto out2;



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 09/10] bcm63xx: don't set bus type in ehci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 09/10] bcm63xx: don't set bus type " Maxime Bizon
@ 2009-06-01 18:12   ` Florian Fainelli
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:12 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:57 Maxime Bizon, vous avez écrit :
> The platform code already sets the bus type, so don't do it.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Acked-by: Florian Fainelli <florian@openwrt.org>


> ---
>  drivers/usb/host/ehci-bcm63xx.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-bcm63xx.c
> b/drivers/usb/host/ehci-bcm63xx.c index 0aba0f9..8a62c0a 100644
> --- a/drivers/usb/host/ehci-bcm63xx.c
> +++ b/drivers/usb/host/ehci-bcm63xx.c
> @@ -145,7 +145,6 @@ static struct platform_driver ehci_hcd_bcm63xx_driver =
> { .driver		= {
>  		.name	= "bcm63xx_ehci",
>  		.owner	= THIS_MODULE,
> -		.bus	= &platform_bus_type
>  	},
>  };



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 10/10] bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 10/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
  2009-06-01 17:57   ` Sergei Shtylyov
@ 2009-06-01 18:12   ` Florian Fainelli
  1 sibling, 0 replies; 25+ messages in thread
From: Florian Fainelli @ 2009-06-01 18:12 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Ralf Baechle

Le Monday 01 June 2009 19:21:58 Maxime Bizon, vous avez écrit :
> USB maintainer asked for clarification of the magic value used during
> USB init. Be clear about the source of it.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/usb/host/ehci-bcm63xx.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-bcm63xx.c
> b/drivers/usb/host/ehci-bcm63xx.c index 8a62c0a..5a03fdd 100644
> --- a/drivers/usb/host/ehci-bcm63xx.c
> +++ b/drivers/usb/host/ehci-bcm63xx.c
> @@ -78,7 +78,9 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct
> platform_device *pdev) reg |= USBH_PRIV_SWAP_EHCI_ENDN_MASK;
>  	bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
>
> -	/* don't ask... */
> +	/* the magic value comes for the original vendor BSP and is
> +	 * needed for USB to work. Datasheet does not help, so the
> +	 * magic value is used as-is. */
>  	bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
>
>  	hcd = usb_create_hcd(&ehci_bcm63xx_hc_driver, &pdev->dev, "bcm63xx");



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 10/10 (v2)] bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
  2009-06-01 17:57   ` Sergei Shtylyov
@ 2009-06-01 18:36     ` Maxime Bizon
  0 siblings, 0 replies; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 18:36 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-mips, Ralf Baechle, Florian Fainelli


USB maintainer asked for clarification of the magic value used during
USB init. Be clear about the source of it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ehci-bcm63xx.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-bcm63xx.c b/drivers/usb/host/ehci-bcm63xx.c
index 8a62c0a..c2b3e7f 100644
--- a/drivers/usb/host/ehci-bcm63xx.c
+++ b/drivers/usb/host/ehci-bcm63xx.c
@@ -78,7 +78,11 @@ static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 	reg |= USBH_PRIV_SWAP_EHCI_ENDN_MASK;
 	bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
 
-	/* don't ask... */
+	/*
+	 * The magic value comes for the original vendor BSP and is
+	 * needed for USB to work. Datasheet does not help, so the
+	 * magic value is used as-is.
+	 */
 	bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
 
 	hcd = usb_create_hcd(&ehci_bcm63xx_hc_driver, &pdev->dev, "bcm63xx");
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 07/10 (v2)] bcm63xx: clarify meaning of the magical value in ohci-bcm63xx.c
  2009-06-01 17:21 ` [PATCH 07/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
  2009-06-01 18:11   ` Florian Fainelli
@ 2009-06-01 18:38   ` Maxime Bizon
  1 sibling, 0 replies; 25+ messages in thread
From: Maxime Bizon @ 2009-06-01 18:38 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Florian Fainelli

USB maintainer asked for clarification  of the magic value used during
USB init. Be clear about the source of it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/usb/host/ohci-bcm63xx.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-bcm63xx.c b/drivers/usb/host/ohci-bcm63xx.c
index d48c8ac..668808e 100644
--- a/drivers/usb/host/ohci-bcm63xx.c
+++ b/drivers/usb/host/ohci-bcm63xx.c
@@ -85,7 +85,11 @@ static int __devinit ohci_hcd_bcm63xx_drv_probe(struct platform_device *pdev)
 		reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
 		reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
 		bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_REG);
-		/* don't ask... */
+		/*
+		 * The magic value comes for the original vendor BSP
+		 * and is needed for USB to work. Datasheet does not
+		 * help, so the magic value is used as-is.
+		 */
 		bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, USBH_PRIV_TEST_REG);
 	} else
 		return 0;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: More updates to bcm63xx support (resend)
  2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
                   ` (9 preceding siblings ...)
  2009-06-01 17:21 ` [PATCH 10/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
@ 2009-06-02  9:41 ` Ralf Baechle
  10 siblings, 0 replies; 25+ messages in thread
From: Ralf Baechle @ 2009-06-02  9:41 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Florian Fainelli

On Mon, Jun 01, 2009 at 07:21:48PM +0200, Maxime Bizon wrote:

Whole series folded into the existing series.

Thanks guys,

  Ralf

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2009-06-02  9:42 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
2009-06-01 17:21 ` [PATCH 01/10] bcm63xx: remove duplicate init fields Maxime Bizon
2009-06-01 18:07   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete Maxime Bizon
2009-06-01 18:09   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops Maxime Bizon
2009-06-01 18:10   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 04/10] bcm63xx: limit number of usb port to 1 Maxime Bizon
2009-06-01 18:10   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c Maxime Bizon
2009-06-01 18:11   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 06/10] bcm63xx: don't set bus type " Maxime Bizon
2009-06-01 18:11   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 07/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
2009-06-01 18:11   ` Florian Fainelli
2009-06-01 18:38   ` [PATCH 07/10 (v2)] " Maxime Bizon
2009-06-01 17:21 ` [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c Maxime Bizon
2009-06-01 18:12   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 09/10] bcm63xx: don't set bus type " Maxime Bizon
2009-06-01 18:12   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 10/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
2009-06-01 17:57   ` Sergei Shtylyov
2009-06-01 18:36     ` [PATCH 10/10 (v2)] " Maxime Bizon
2009-06-01 18:12   ` [PATCH 10/10] " Florian Fainelli
2009-06-02  9:41 ` More updates to bcm63xx support (resend) Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).