More updates to bcm63xx support (resend)
Subsystems (5)
[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 !
PATCH 1/10 bcm63xx: remove duplicate init fields.
This patch removes duplicate init fields in resource.
--- arch/mips/bcm63xx/dev-enet.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/mips/bcm63xx/dev-enet.c +0 -2
@@ -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, }, };
Signature · 1 line
1.6.0.4
Re: [PATCH 01/10] bcm63xx: remove duplicate init fields.
Le Monday 01 June 2009 19:21:49 Maxime Bizon, vous avez écrit :
Quoted 3 lines
This patch removes duplicate init fields in resource.
Signed-off-by Maxime Bizon <[email protected]>
Quoted 21 lines
--- arch/mips/bcm63xx/dev-enet.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)arch/mips/bcm63xx/dev-enet.c +0
-2@@ -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, }, };
PATCH 2/10 bcm63xx: use napi_complete instead of __napi_complete
In reply to Maxime BizonWe're not disabling IRQ, so we must call the irq safe flavour of napi_complete.
--- drivers/net/bcm63xx_enet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/bcm63xx_enet.c +1 -1
@@ -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,
Signature · 1 line
1.6.0.4
Re: [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete
Le Monday 01 June 2009 19:21:50 Maxime Bizon, vous avez écrit :
Quoted 4 lines
We're not disabling IRQ, so we must call the irq safe flavour of
napi_complete.Signed-off-by Maxime Bizon <[email protected]>
Quoted 18 lines
--- drivers/net/bcm63xx_enet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/bcm63xx_enet.c +1
-1@@ -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,
PATCH 3/10 bcm63xx: convert bcm63xx_enet to netdev ops.
In reply to Maxime BizonThis patch makes bcm63xx_enet driver use netdevice ops.
--- drivers/net/bcm63xx_enet.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-)
drivers/net/bcm63xx_enet.c +14 -10
@@ -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);
Signature · 1 line
1.6.0.4
Re: [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops.
Le Monday 01 June 2009 19:21:51 Maxime Bizon, vous avez écrit :
Quoted 3 lines
This patch makes
bcm63xx_enetdriver use netdevice ops.Signed-off-by Maxime Bizon <[email protected]>
Quoted 46 lines
--- drivers/net/bcm63xx_enet.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-)drivers/net/bcm63xx_enet.c +14
-10@@ -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);
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 4/10 bcm63xx: limit number of usb port to 1.
In reply to Maxime BizonThis 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.
--- drivers/usb/host/ohci-bcm63xx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/usb/host/ohci-bcm63xx.c +2 -0
@@ -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;
Signature · 1 line
1.6.0.4
Re: [PATCH 04/10] bcm63xx: limit number of usb port to 1.
Le Monday 01 June 2009 19:21:52 Maxime Bizon, vous avez écrit :
Quoted 7 lines
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 <[email protected]>
Quoted 17 lines
--- drivers/usb/host/ohci-bcm63xx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ohci-bcm63xx.cindex 08807d9..74f432f 100644drivers/usb/host/ohci-bcm63xx.c +2
-0@@ -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;
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 5/10 bcm63xx: use platform_get_irq in ohci-bcm63xx.c
In reply to Maxime BizonAs requested by USB maintainer, use platform_get_irq instead of platform_get_resource.
--- drivers/usb/host/ohci-bcm63xx.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/usb/host/ohci-bcm63xx.c +5 -5
@@ -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;
Signature · 1 line
1.6.0.4
Re: [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c
Le Monday 01 June 2009 19:21:53 Maxime Bizon, vous avez écrit :
Quoted 4 lines
As requested by USB maintainer, use
platform_get_irqinstead ofplatform_get_resource.Signed-off-by Maxime Bizon <[email protected]>
Quoted 37 lines
--- drivers/usb/host/ohci-bcm63xx.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ohci-bcm63xx.cindex 74f432f..f0e4639 100644drivers/usb/host/ohci-bcm63xx.c +4
-4@@ -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 ;drivers/usb/host/ohci-bcm63xx.c +1
-1if (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;
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 6/10 bcm63xx: don't set bus type in ohci-bcm63xx.c
In reply to Maxime BizonThe platform code already sets the bus type, so don't do it.
--- drivers/usb/host/ohci-bcm63xx.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/usb/host/ohci-bcm63xx.c +0 -1
@@ -154,7 +154,6 @@ static struct platform_driver ohci_hcd_bcm63xx_driver = { .driver = { .name = "bcm63xx_ohci", .owner = THIS_MODULE, - .bus = &platform_bus_type }, };
Signature · 1 line
1.6.0.4
Re: [PATCH 06/10] bcm63xx: don't set bus type in ohci-bcm63xx.c
Le Monday 01 June 2009 19:21:54 Maxime Bizon, vous avez écrit :
Quoted 3 lines
The platform code already sets the bus type, so don't do it.
Signed-off-by Maxime Bizon <[email protected]>
Quoted 15 lines
--- drivers/usb/host/ohci-bcm63xx.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ohci-bcm63xx.cindex f0e4639..d48c8ac 100644drivers/usb/host/ohci-bcm63xx.c +0
-1@@ -154,7 +154,6 @@ static struct platform_driver ohci_hcd_bcm63xx_driver = { .driver = { .name = "bcm63xx_ohci", .owner = THIS_MODULE, - .bus = &platform_bus_type }, };
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 7/10 bcm63xx: clarify meaning of the magical value in ohci-bcm63xx.c
In reply to Maxime BizonUSB maintainer asked for clarification of the magic value used during USB init. Be clear about the source of it.
--- drivers/usb/host/ohci-bcm63xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/usb/host/ohci-bcm63xx.c +3 -1
@@ -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 ;
Signature · 1 line
1.6.0.4
Re: [PATCH 07/10] bcm63xx: clarify meaning of the magical value in ohci-bcm63xx.c
Le Monday 01 June 2009 19:21:55 Maxime Bizon, vous avez écrit :
Quoted 4 lines
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 <[email protected]>
Quoted 19 lines
--- drivers/usb/host/ohci-bcm63xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ohci-bcm63xx.cindex d48c8ac..bd66d5a 100644drivers/usb/host/ohci-bcm63xx.c +3
-1@@ -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 ;
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 7/10 bcm63xx: clarify meaning of the magical value in ohci-bcm63xx.c
In reply to Maxime BizonUSB maintainer asked for clarification of the magic value used during USB init. Be clear about the source of it.
--- drivers/usb/host/ohci-bcm63xx.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/host/ohci-bcm63xx.c +5 -1
@@ -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 ;
Signature · 1 line
1.6.0.4
PATCH 8/10 bcm63xx: use platform_get_irq in ehci-bcm63xx.c
In reply to Maxime BizonAs requested by USB maintainer, use platform_get_irq instead of platform_get_resource.
--- drivers/usb/host/ehci-bcm63xx.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/usb/host/ehci-bcm63xx.c +5 -5
@@ -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;
Signature · 1 line
1.6.0.4
Re: [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c
Le Monday 01 June 2009 19:21:56 Maxime Bizon, vous avez écrit :
Quoted 4 lines
As requested by USB maintainer, use
platform_get_irqinstead ofplatform_get_resource.Signed-off-by Maxime Bizon <[email protected]>
Quoted 38 lines
--- drivers/usb/host/ehci-bcm63xx.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ehci-bcm63xx.cindex 2fef571..0aba0f9 100644drivers/usb/host/ehci-bcm63xx.c +4
-4@@ -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 ;drivers/usb/host/ehci-bcm63xx.c +1
-1reg =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;
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 9/10 bcm63xx: don't set bus type in ehci-bcm63xx.c
In reply to Maxime BizonThe platform code already sets the bus type, so don't do it.
--- drivers/usb/host/ehci-bcm63xx.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-bcm63xx.c +0 -1
@@ -145,7 +145,6 @@ static struct platform_driver ehci_hcd_bcm63xx_driver = { .driver = { .name = "bcm63xx_ehci", .owner = THIS_MODULE, - .bus = &platform_bus_type }, };
Signature · 1 line
1.6.0.4
Re: [PATCH 09/10] bcm63xx: don't set bus type in ehci-bcm63xx.c
Le Monday 01 June 2009 19:21:57 Maxime Bizon, vous avez écrit :
Quoted 3 lines
The platform code already sets the bus type, so don't do it.
Signed-off-by Maxime Bizon <[email protected]>
Quoted 15 lines
--- drivers/usb/host/ehci-bcm63xx.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ehci-bcm63xx.cindex 0aba0f9..8a62c0a 100644drivers/usb/host/ehci-bcm63xx.c +0
-1@@ -145,7 +145,6 @@ static struct platform_driver ehci_hcd_bcm63xx_driver = { .driver = { .name = "bcm63xx_ehci", .owner = THIS_MODULE, - .bus = &platform_bus_type }, };
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
PATCH 10/10 bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
In reply to Maxime BizonUSB maintainer asked for clarification of the magic value used during USB init. Be clear about the source of it.
--- drivers/usb/host/ehci-bcm63xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-bcm63xx.c +3 -1
@@ -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" );
Signature · 1 line
1.6.0.4
Re: [PATCH 10/10] bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
Hello.
Quoted 13 lines · 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 <[email protected]>--- drivers/usb/host/ehci-bcm63xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/usb/host/ehci-bcm63xx.c +0
-0
drivers/usb/host/ehci-bcm63xx.c static int __devinit ehci_hcd_bcm63xx_drv_probe(struct platform_device *pdev) · line 86
Quoted 10 lines
drivers/usb/host/ehci-bcm63xx.c +3
-1@@ -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
PATCH 10/10 bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
USB maintainer asked for clarification of the magic value used during USB init. Be clear about the source of it.
--- drivers/usb/host/ehci-bcm63xx.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-bcm63xx.c +5 -1
@@ -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" );
Signature · 1 line
1.6.0.4
Re: [PATCH 10/10] bcm63xx: clarify meaning of the magical value in ehci-bcm63xx.c
In reply to Maxime BizonLe Monday 01 June 2009 19:21:58 Maxime Bizon, vous avez écrit :
Quoted 4 lines
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 <[email protected]>
Quoted 19 lines
--- drivers/usb/host/ehci-bcm63xx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/ehci-bcm63xx.cindex 8a62c0a..5a03fdd 100644drivers/usb/host/ehci-bcm63xx.c +3
-1@@ -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" );
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
On Mon, Jun 01, 2009 at 07:21:48PM +0200, Maxime Bizon wrote:
Whole series folded into the existing series.
Thanks guys,
Ralf