From: Cristian Birsan <[email protected]>
This patch series provides fixes, based on the feedback received on the mailing list, for
the following:
- fifo table parameters validation against device tree values
- coding style
- message display for EP configuration error
- Kconfig comments for fifo_mode=0
Changes since v1:
- Removed static for usba_config_fifo_table() function from "Check fifo
configuration values against device tree" patch
Changes since v2:
- Use shorter warning message if the fifo table size is greather than device
tree value
- replace dev_warn() with dev_err() for hardware fifo allocation error
Changes since v3:
- rebase the code on testing/next branch as requested
- remove from patch series the patches that are already in testing/next branch
Cristian Birsan (2):
usb: gadget: udc: atmel: Use dev_err() to display EP configuration
error
usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0
drivers/usb/gadget/udc/Kconfig | 5 +++--
drivers/usb/gadget/udc/atmel_usba_udc.c | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
--
2.7.4
From: Cristian Birsan <[email protected]>
Update Kconfig help for fifo_mode = 0 to explain the behavior better.
Signed-off-by: Cristian Birsan <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
---
drivers/usb/gadget/udc/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
index 707814d..c90a4a2 100644
--- a/drivers/usb/gadget/udc/Kconfig
+++ b/drivers/usb/gadget/udc/Kconfig
@@ -62,8 +62,9 @@ config USB_ATMEL_USBA
The fifo_mode parameter is used to select endpoint allocation mode.
fifo_mode = 0 is used to let the driver autoconfigure the endpoints.
- In this case 2 banks are allocated for isochronous endpoints and
- only one bank is allocated for the rest of the endpoints.
+ In this case, for ep1 2 banks are allocated if it works in isochronous
+ mode and only 1 bank otherwise. For the rest of the endpoints
+ only 1 bank is allocated.
fifo_mode = 1 is a generic maximum fifo size (1024 bytes) configuration
allowing the usage of ep1 - ep6
--
2.7.4
From: Cristian Birsan <[email protected]>
Use dev_err() to display EP configuration error to avoid silent failure.
Signed-off-by: Cristian Birsan <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
---
drivers/usb/gadget/udc/atmel_usba_udc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 8bc0b52a..3ccc341 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1851,8 +1851,8 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
* but it's clearly harmless...
*/
if (!(usba_ep_readl(ep0, CFG) & USBA_EPT_MAPPED))
- dev_dbg(&udc->pdev->dev,
- "ODD: EP0 configuration is invalid!\n");
+ dev_err(&udc->pdev->dev,
+ "ODD: EP0 configuration is invalid!\n");
/* Preallocate other endpoints */
n = fifo_mode ? udc->num_ep : udc->configured_ep;
@@ -1860,8 +1860,8 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
ep = &udc->usba_ep[i];
usba_ep_writel(ep, CFG, ep->ept_cfg);
if (!(usba_ep_readl(ep, CFG) & USBA_EPT_MAPPED))
- dev_dbg(&udc->pdev->dev,
- "ODD: EP%d configuration is invalid!\n", i);
+ dev_err(&udc->pdev->dev,
+ "ODD: EP%d configuration is invalid!\n", i);
}
}
--
2.7.4