diff options
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0025-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch')
-rw-r--r--[-rwxr-xr-x] | target/linux/brcm2708/patches-3.18/0025-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch | 262 |
1 files changed, 104 insertions, 158 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0025-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch b/target/linux/brcm2708/patches-3.18/0025-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch index 822f8dacd8..8d3464fefe 100755..100644 --- a/target/linux/brcm2708/patches-3.18/0025-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch +++ b/target/linux/brcm2708/patches-3.18/0025-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch @@ -282,8 +282,6 @@ incarnations. create mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c create mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 6283d7d..ba9c18e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -395,6 +395,7 @@ config ARCH_BCM2708 @@ -294,11 +292,9 @@ index 6283d7d..ba9c18e 100644 help This enables support for Broadcom BCM2708 boards. -diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h -index 3b763d6..5770408 100644 --- a/arch/arm/include/asm/irqflags.h +++ b/arch/arm/include/asm/irqflags.h -@@ -145,12 +145,22 @@ static inline unsigned long arch_local_save_flags(void) +@@ -145,12 +145,22 @@ static inline unsigned long arch_local_s } /* @@ -324,8 +320,6 @@ index 3b763d6..5770408 100644 : : "r" (flags) : "memory", "cc"); -diff --git a/arch/arm/kernel/fiqasm.S b/arch/arm/kernel/fiqasm.S -index 8dd26e1..eef4847 100644 --- a/arch/arm/kernel/fiqasm.S +++ b/arch/arm/kernel/fiqasm.S @@ -47,3 +47,7 @@ ENTRY(__get_fiq_regs) @@ -336,11 +330,9 @@ index 8dd26e1..eef4847 100644 +ENTRY(__FIQ_Branch) + mov pc, r8 +ENDPROC(__FIQ_Branch) -diff --git a/arch/arm/mach-bcm2708/armctrl.c b/arch/arm/mach-bcm2708/armctrl.c -index ef1c8d5..96fa9b9 100644 --- a/arch/arm/mach-bcm2708/armctrl.c +++ b/arch/arm/mach-bcm2708/armctrl.c -@@ -52,8 +52,12 @@ static void armctrl_mask_irq(struct irq_data *d) +@@ -52,8 +52,12 @@ static void armctrl_mask_irq(struct irq_ 0 }; @@ -355,7 +347,7 @@ index ef1c8d5..96fa9b9 100644 } static void armctrl_unmask_irq(struct irq_data *d) -@@ -65,8 +69,14 @@ static void armctrl_unmask_irq(struct irq_data *d) +@@ -65,8 +69,14 @@ static void armctrl_unmask_irq(struct ir 0 }; @@ -372,18 +364,16 @@ index ef1c8d5..96fa9b9 100644 } #if defined(CONFIG_PM) -@@ -204,5 +214,6 @@ int __init armctrl_init(void __iomem * base, unsigned int irq_start, +@@ -204,5 +214,6 @@ int __init armctrl_init(void __iomem * b } armctrl_pm_register(base, irq_start, resume_sources); + init_FIQ(FIQ_START); return 0; } -diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 7dd89a7f..dc59a6b 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -321,12 +321,32 @@ static struct resource bcm2708_usb_resources[] = { +@@ -321,12 +321,32 @@ static struct resource bcm2708_usb_resou .flags = IORESOURCE_MEM, }, [1] = { @@ -430,8 +420,6 @@ index 7dd89a7f..dc59a6b 100644 bcm_register_device(&bcm2708_usb_device); bcm_register_device(&bcm2708_uart1_device); bcm_register_device(&bcm2708_powerman_device); -diff --git a/arch/arm/mach-bcm2708/include/mach/irqs.h b/arch/arm/mach-bcm2708/include/mach/irqs.h -index 3a88a1a..45152ed 100644 --- a/arch/arm/mach-bcm2708/include/mach/irqs.h +++ b/arch/arm/mach-bcm2708/include/mach/irqs.h @@ -106,87 +106,90 @@ @@ -600,11 +588,9 @@ index 3a88a1a..45152ed 100644 #define GPIO_IRQS (32*5) #define SPARE_ALLOC_IRQS 64 #define BCM2708_ALLOC_IRQS (HARD_IRQS+FIQ_IRQS+GPIO_IRQS+SPARE_ALLOC_IRQS) -diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c -index 1668f10..5c50a8b 100644 --- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c -@@ -580,7 +580,13 @@ void DWC_WRITE_REG64(uint64_t volatile *reg, uint64_t value) +@@ -580,7 +580,13 @@ void DWC_WRITE_REG64(uint64_t volatile * void DWC_MODIFY_REG32(uint32_t volatile *reg, uint32_t clear_mask, uint32_t set_mask) { @@ -618,7 +604,7 @@ index 1668f10..5c50a8b 100644 } #if 0 -@@ -995,6 +1001,11 @@ void DWC_TASK_SCHEDULE(dwc_tasklet_t *task) +@@ -995,6 +1001,11 @@ void DWC_TASK_SCHEDULE(dwc_tasklet_t *ta tasklet_schedule(&task->t); } @@ -630,8 +616,6 @@ index 1668f10..5c50a8b 100644 /* workqueues - run in process context (can sleep) -diff --git a/drivers/usb/host/dwc_common_port/dwc_list.h b/drivers/usb/host/dwc_common_port/dwc_list.h -index 89cc325..4ce560d 100644 --- a/drivers/usb/host/dwc_common_port/dwc_list.h +++ b/drivers/usb/host/dwc_common_port/dwc_list.h @@ -384,17 +384,17 @@ struct { \ @@ -659,11 +643,9 @@ index 89cc325..4ce560d 100644 /* * Tail queue functions. -diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h -index 8117731..a2bbe23 100644 --- a/drivers/usb/host/dwc_common_port/dwc_os.h +++ b/drivers/usb/host/dwc_common_port/dwc_os.h -@@ -982,6 +982,8 @@ extern void DWC_TASK_FREE(dwc_tasklet_t *task); +@@ -982,6 +982,8 @@ extern void DWC_TASK_FREE(dwc_tasklet_t extern void DWC_TASK_SCHEDULE(dwc_tasklet_t *task); #define dwc_task_schedule DWC_TASK_SCHEDULE @@ -672,11 +654,9 @@ index 8117731..a2bbe23 100644 /** @name Timer * -diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile -index 236c47c..a56f193 100644 --- a/drivers/usb/host/dwc_otg/Makefile +++ b/drivers/usb/host/dwc_otg/Makefile -@@ -36,6 +36,7 @@ dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o +@@ -36,6 +36,7 @@ dwc_otg-objs += dwc_otg_cil.o dwc_otg_ci dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o dwc_otg-objs += dwc_otg_hcd.o dwc_otg_hcd_linux.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o dwc_otg_hcd_ddma.o dwc_otg-objs += dwc_otg_adp.o @@ -684,11 +664,9 @@ index 236c47c..a56f193 100644 ifneq ($(CFI),) dwc_otg-objs += dwc_otg_cfi.o endif -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -index fab2961..9da0c92 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_attr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -@@ -909,7 +909,7 @@ static ssize_t regdump_show(struct device *_dev, +@@ -909,7 +909,7 @@ static ssize_t regdump_show(struct devic return sprintf(buf, "Register Dump\n"); } @@ -697,7 +675,7 @@ index fab2961..9da0c92 100644 /** * Dump global registers and either host or device registers (depending on the -@@ -920,12 +920,12 @@ static ssize_t spramdump_show(struct device *_dev, +@@ -920,12 +920,12 @@ static ssize_t spramdump_show(struct dev { dwc_otg_device_t *otg_dev = dwc_otg_drvdev(_dev); @@ -712,7 +690,7 @@ index fab2961..9da0c92 100644 /** * Dump the current hcd state. -@@ -940,7 +940,7 @@ static ssize_t hcddump_show(struct device *_dev, +@@ -940,7 +940,7 @@ static ssize_t hcddump_show(struct devic return sprintf(buf, "HCD Dump\n"); } @@ -721,7 +699,7 @@ index fab2961..9da0c92 100644 /** * Dump the average frame remaining at SOF. This can be used to -@@ -958,7 +958,7 @@ static ssize_t hcd_frrem_show(struct device *_dev, +@@ -958,7 +958,7 @@ static ssize_t hcd_frrem_show(struct dev return sprintf(buf, "HCD Dump Frame Remaining\n"); } @@ -730,7 +708,7 @@ index fab2961..9da0c92 100644 /** * Displays the time required to read the GNPTXFSIZ register many times (the -@@ -986,7 +986,7 @@ static ssize_t rd_reg_test_show(struct device *_dev, +@@ -986,7 +986,7 @@ static ssize_t rd_reg_test_show(struct d RW_REG_COUNT, time * MSEC_PER_JIFFIE, time); } @@ -739,7 +717,7 @@ index fab2961..9da0c92 100644 /** * Displays the time required to write the GNPTXFSIZ register many times (the -@@ -1014,7 +1014,7 @@ static ssize_t wr_reg_test_show(struct device *_dev, +@@ -1014,7 +1014,7 @@ static ssize_t wr_reg_test_show(struct d RW_REG_COUNT, time * MSEC_PER_JIFFIE, time); } @@ -748,8 +726,6 @@ index fab2961..9da0c92 100644 #ifdef CONFIG_USB_DWC_OTG_LPM -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c -index 59fc862..2f8b3bd 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -45,6 +45,7 @@ @@ -760,7 +736,7 @@ index 59fc862..2f8b3bd 100644 #ifdef DEBUG inline const char *op_state_str(dwc_otg_core_if_t * core_if) -@@ -1318,7 +1319,7 @@ static int32_t dwc_otg_handle_lpm_intr(dwc_otg_core_if_t * core_if) +@@ -1318,7 +1319,7 @@ static int32_t dwc_otg_handle_lpm_intr(d /** * This function returns the Core Interrupt register. */ @@ -769,7 +745,7 @@ index 59fc862..2f8b3bd 100644 { gahbcfg_data_t gahbcfg = {.d32 = 0 }; gintsts_data_t gintsts; -@@ -1335,26 +1336,45 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if) +@@ -1335,26 +1336,45 @@ static inline uint32_t dwc_otg_read_comm gintmsk_common.b.lpmtranrcvd = 1; #endif gintmsk_common.b.restoredone = 1; @@ -824,7 +800,7 @@ index 59fc862..2f8b3bd 100644 } -@@ -1386,6 +1406,7 @@ int32_t dwc_otg_handle_common_intr(void *dev) +@@ -1386,6 +1406,7 @@ int32_t dwc_otg_handle_common_intr(void { int retval = 0; gintsts_data_t gintsts; @@ -832,7 +808,7 @@ index 59fc862..2f8b3bd 100644 gpwrdn_data_t gpwrdn = {.d32 = 0 }; dwc_otg_device_t *otg_dev = dev; dwc_otg_core_if_t *core_if = otg_dev->core_if; -@@ -1407,7 +1428,7 @@ int32_t dwc_otg_handle_common_intr(void *dev) +@@ -1407,7 +1428,7 @@ int32_t dwc_otg_handle_common_intr(void } if (core_if->hibernation_suspend <= 0) { @@ -841,7 +817,7 @@ index 59fc862..2f8b3bd 100644 if (gintsts.b.modemismatch) { retval |= dwc_otg_handle_mode_mismatch_intr(core_if); -@@ -1504,8 +1525,12 @@ int32_t dwc_otg_handle_common_intr(void *dev) +@@ -1504,8 +1525,12 @@ int32_t dwc_otg_handle_common_intr(void gintsts.b.portintr = 1; DWC_WRITE_REG32(&core_if->core_global_regs->gintsts,gintsts.d32); retval |= 1; @@ -854,11 +830,9 @@ index 59fc862..2f8b3bd 100644 } else { DWC_DEBUGPL(DBG_ANY, "gpwrdn=%08x\n", gpwrdn.d32); -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h -index 8900318..ccc24e0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h -@@ -49,6 +49,7 @@ static inline uint32_t SET_DEBUG_LEVEL(const uint32_t new) +@@ -49,6 +49,7 @@ static inline uint32_t SET_DEBUG_LEVEL(c return old; } @@ -866,8 +840,6 @@ index 8900318..ccc24e0 100644 /** When debug level has the DBG_CIL bit set, display CIL Debug messages. */ #define DBG_CIL (0x2) /** When debug level has the DBG_CILV bit set, display CIL Verbose debug -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index ac2c846..f06c3d22 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -64,6 +64,8 @@ bool microframe_schedule=true; @@ -879,7 +851,7 @@ index ac2c846..f06c3d22 100644 extern int pcd_init( #ifdef LM_INTERFACE struct lm_device *_dev -@@ -238,6 +240,14 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { +@@ -238,6 +240,14 @@ static struct dwc_otg_driver_module_para .adp_enable = -1, }; @@ -933,7 +905,7 @@ index ac2c846..f06c3d22 100644 #else { struct map_desc desc = { -@@ -1044,6 +1070,12 @@ static int __init dwc_otg_driver_init(void) +@@ -1044,6 +1070,12 @@ static int __init dwc_otg_driver_init(vo int retval = 0; int error; struct device_driver *drv; @@ -946,7 +918,7 @@ index ac2c846..f06c3d22 100644 printk(KERN_INFO "%s: version %s (%s bus)\n", dwc_driver_name, DWC_DRIVER_VERSION, #ifdef LM_INTERFACE -@@ -1063,6 +1095,9 @@ static int __init dwc_otg_driver_init(void) +@@ -1063,6 +1095,9 @@ static int __init dwc_otg_driver_init(vo printk(KERN_ERR "%s retval=%d\n", __func__, retval); return retval; } @@ -956,7 +928,7 @@ index ac2c846..f06c3d22 100644 error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1343,6 +1378,13 @@ MODULE_PARM_DESC(otg_ver, "OTG revision supported 0=OTG 1.3 1=OTG 2.0"); +@@ -1343,6 +1378,13 @@ MODULE_PARM_DESC(otg_ver, "OTG revision module_param(microframe_schedule, bool, 0444); MODULE_PARM_DESC(microframe_schedule, "Enable the microframe scheduler"); @@ -970,8 +942,6 @@ index ac2c846..f06c3d22 100644 /** @page "Module Parameters" * * The following parameters may be specified when starting the module. -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 1e89549..986d361 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -40,10 +40,14 @@ @@ -990,7 +960,7 @@ index 1e89549..986d361 100644 //#define DEBUG_HOST_CHANNELS #ifdef DEBUG_HOST_CHANNELS -@@ -53,6 +57,13 @@ static int last_sel_trans_num_avail_hc_at_start = 0; +@@ -53,6 +57,13 @@ static int last_sel_trans_num_avail_hc_a static int last_sel_trans_num_avail_hc_at_end = 0; #endif /* DEBUG_HOST_CHANNELS */ @@ -1004,7 +974,7 @@ index 1e89549..986d361 100644 dwc_otg_hcd_t *dwc_otg_hcd_alloc_hcd(void) { return DWC_ALLOC(sizeof(dwc_otg_hcd_t)); -@@ -162,31 +173,43 @@ static void del_timers(dwc_otg_hcd_t * hcd) +@@ -162,31 +173,43 @@ static void del_timers(dwc_otg_hcd_t * h /** * Processes all the URBs in a single list of QHs. Completes them with @@ -1053,7 +1023,7 @@ index 1e89549..986d361 100644 * and periodic schedules. The QTD associated with each URB is removed from * the schedule and freed. This function may be called when a disconnect is * detected or when the HCD is being stopped. -@@ -272,7 +295,8 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) +@@ -272,7 +295,8 @@ static int32_t dwc_otg_hcd_disconnect_cb */ dwc_otg_hcd->flags.b.port_connect_status_change = 1; dwc_otg_hcd->flags.b.port_connect_status = 0; @@ -1063,7 +1033,7 @@ index 1e89549..986d361 100644 /* * Shutdown any transfers in process by clearing the Tx FIFO Empty * interrupt mask and status bits and disabling subsequent host -@@ -368,8 +392,22 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) +@@ -368,8 +392,22 @@ static int32_t dwc_otg_hcd_disconnect_cb channel->qh = NULL; } } @@ -1094,7 +1064,7 @@ index 1e89549..986d361 100644 /** * HCD Callback function for Remote Wakeup. * -@@ -457,10 +496,12 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, +@@ -457,10 +496,12 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ dwc_otg_hcd_urb_t * dwc_otg_urb, void **ep_handle, int atomic_alloc) { @@ -1108,7 +1078,7 @@ index 1e89549..986d361 100644 #ifdef DEBUG /* integrity checks (Broadcom) */ if (NULL == hcd->core_if) { -@@ -475,6 +516,16 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, +@@ -475,6 +516,16 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ return -DWC_E_NO_DEVICE; } @@ -1125,7 +1095,7 @@ index 1e89549..986d361 100644 qtd = dwc_otg_hcd_qtd_create(dwc_otg_urb, atomic_alloc); if (qtd == NULL) { DWC_ERROR("DWC OTG HCD URB Enqueue failed creating QTD\n"); -@@ -490,32 +541,27 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, +@@ -490,32 +541,27 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ return -DWC_E_NO_MEMORY; } #endif @@ -1168,7 +1138,7 @@ index 1e89549..986d361 100644 return retval; } -@@ -524,6 +570,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, +@@ -524,6 +570,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_ { dwc_otg_qh_t *qh; dwc_otg_qtd_t *urb_qtd; @@ -1177,7 +1147,7 @@ index 1e89549..986d361 100644 #ifdef DEBUG /* integrity checks (Broadcom) */ -@@ -540,14 +588,17 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, +@@ -540,14 +588,17 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_ return -DWC_E_INVALID; } urb_qtd = dwc_otg_urb->qtd; @@ -1195,7 +1165,7 @@ index 1e89549..986d361 100644 if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) { if (urb_qtd->in_process) { dump_channel_info(hcd, qh); -@@ -571,6 +622,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, +@@ -571,6 +622,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_ */ dwc_otg_hc_halt(hcd->core_if, qh->channel, DWC_OTG_HC_XFER_URB_DEQUEUE); @@ -1204,7 +1174,7 @@ index 1e89549..986d361 100644 } } -@@ -687,6 +740,33 @@ static void reset_tasklet_func(void *data) +@@ -687,6 +740,33 @@ static void reset_tasklet_func(void *dat dwc_otg_hcd->flags.b.port_reset_change = 1; } @@ -1238,7 +1208,7 @@ index 1e89549..986d361 100644 static void qh_list_free(dwc_otg_hcd_t * hcd, dwc_list_link_t * qh_list) { dwc_list_link_t *item; -@@ -819,12 +899,14 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -819,12 +899,14 @@ static void dwc_otg_hcd_free(dwc_otg_hcd } else if (dwc_otg_hcd->status_buf != NULL) { DWC_FREE(dwc_otg_hcd->status_buf); } @@ -1253,7 +1223,7 @@ index 1e89549..986d361 100644 #ifdef DWC_DEV_SRPCAP if (dwc_otg_hcd->core_if->power_down == 2 && -@@ -874,7 +956,7 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) +@@ -874,7 +956,7 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd DWC_LIST_INIT(&hcd->periodic_sched_ready); DWC_LIST_INIT(&hcd->periodic_sched_assigned); DWC_LIST_INIT(&hcd->periodic_sched_queued); @@ -1262,7 +1232,7 @@ index 1e89549..986d361 100644 /* * Create a host channel descriptor for each host channel implemented * in the controller. Initialize the channel descriptor array. -@@ -912,6 +994,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) +@@ -912,6 +994,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd /* Initialize reset tasklet. */ hcd->reset_tasklet = DWC_TASK_ALLOC("reset_tasklet", reset_tasklet_func, hcd); @@ -1272,7 +1242,7 @@ index 1e89549..986d361 100644 #ifdef DWC_DEV_SRPCAP if (hcd->core_if->power_down == 2) { /* Initialize Power on timer for Host power up in case hibernation */ -@@ -944,6 +1029,12 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) +@@ -944,6 +1029,12 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd hcd->frame_list = NULL; hcd->frame_list_dma = 0; hcd->periodic_qh_count = 0; @@ -1285,7 +1255,7 @@ index 1e89549..986d361 100644 out: return retval; } -@@ -1089,7 +1180,12 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -1089,7 +1180,12 @@ static void assign_and_init_hc(dwc_otg_h uint32_t hub_addr, port_addr; hc->do_split = 1; hc->xact_pos = qtd->isoc_split_pos; @@ -1299,7 +1269,7 @@ index 1e89549..986d361 100644 hcd->fops->hub_info(hcd, urb->priv, &hub_addr, &port_addr); hc->hub_addr = (uint8_t) hub_addr; hc->port_addr = (uint8_t) port_addr; -@@ -1236,6 +1332,65 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -1236,6 +1332,65 @@ static void assign_and_init_hc(dwc_otg_h hc->qh = qh; } @@ -1365,7 +1335,7 @@ index 1e89549..986d361 100644 /** * This function selects transactions from the HCD transfer schedule and * assigns them to available host channels. It is called from HCD interrupt -@@ -1249,9 +1404,10 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1249,9 +1404,10 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s { dwc_list_link_t *qh_ptr; dwc_otg_qh_t *qh; @@ -1377,7 +1347,7 @@ index 1e89549..986d361 100644 dwc_otg_transaction_type_e ret_val = DWC_OTG_TRANSACTION_NONE; #ifdef DEBUG_SOF -@@ -1269,11 +1425,29 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1269,11 +1425,29 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s while (qh_ptr != &hcd->periodic_sched_ready && !DWC_CIRCLEQ_EMPTY(&hcd->free_hc_list)) { @@ -1407,7 +1377,7 @@ index 1e89549..986d361 100644 break; } hcd->available_host_channels--; -@@ -1294,8 +1468,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1294,8 +1468,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_assigned, &qh->qh_list_entry); DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); @@ -1416,7 +1386,7 @@ index 1e89549..986d361 100644 } /* -@@ -1310,6 +1482,31 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1310,6 +1482,31 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s num_channels - hcd->periodic_channels) && !DWC_CIRCLEQ_EMPTY(&hcd->free_hc_list)) { @@ -1448,7 +1418,7 @@ index 1e89549..986d361 100644 if (microframe_schedule) { DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); if (hcd->available_host_channels < 1) { -@@ -1322,7 +1519,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1322,7 +1519,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s last_sel_trans_num_nonper_scheduled++; #endif /* DEBUG_HOST_CHANNELS */ } @@ -1456,7 +1426,7 @@ index 1e89549..986d361 100644 assign_and_init_hc(hcd, qh); -@@ -1336,21 +1532,22 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1336,21 +1532,22 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s &qh->qh_list_entry); DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); @@ -1486,7 +1456,7 @@ index 1e89549..986d361 100644 return ret_val; } -@@ -1464,6 +1661,15 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) +@@ -1464,6 +1661,15 @@ static void process_periodic_channels(dw qh = DWC_LIST_ENTRY(qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -1502,7 +1472,7 @@ index 1e89549..986d361 100644 /* * Set a flag if we're queuing high-bandwidth in slave mode. * The flag prevents any halts to get into the request queue in -@@ -1593,6 +1799,15 @@ static void process_non_periodic_channels(dwc_otg_hcd_t * hcd) +@@ -1593,6 +1799,15 @@ static void process_non_periodic_channel qh = DWC_LIST_ENTRY(hcd->non_periodic_qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -1518,7 +1488,7 @@ index 1e89549..986d361 100644 status = queue_transaction(hcd, qh->channel, tx_status.b.nptxfspcavail); -@@ -3118,17 +3333,13 @@ dwc_otg_hcd_urb_t *dwc_otg_hcd_urb_alloc(dwc_otg_hcd_t * hcd, +@@ -3118,17 +3333,13 @@ dwc_otg_hcd_urb_t *dwc_otg_hcd_urb_alloc else dwc_otg_urb = DWC_ALLOC(size); @@ -1542,8 +1512,6 @@ index 1e89549..986d361 100644 return dwc_otg_urb; } -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index bb4f67a..0007fa1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -168,10 +168,10 @@ typedef enum dwc_otg_control_phase { @@ -1620,7 +1588,7 @@ index bb4f67a..0007fa1 100644 /** Frame List DMA address */ dma_addr_t frame_list_dma; -@@ -589,6 +612,10 @@ extern dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t +@@ -589,6 +612,10 @@ extern dwc_otg_transaction_type_e dwc_ot extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, dwc_otg_transaction_type_e tr_type); @@ -1631,11 +1599,9 @@ index bb4f67a..0007fa1 100644 /** @} */ /** @name Interrupt Handler Functions */ -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c -index 274967b..ee920c4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c -@@ -276,7 +276,7 @@ void dump_frame_list(dwc_otg_hcd_t * hcd) +@@ -276,7 +276,7 @@ void dump_frame_list(dwc_otg_hcd_t * hcd static void release_channel_ddma(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) { dwc_irqflags_t flags; @@ -1644,7 +1610,7 @@ index 274967b..ee920c4 100644 dwc_hc_t *hc = qh->channel; if (dwc_qh_is_non_per(qh)) { -@@ -306,7 +306,6 @@ static void release_channel_ddma(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -306,7 +306,6 @@ static void release_channel_ddma(dwc_otg dwc_memset(qh->desc_list, 0x00, sizeof(dwc_otg_host_dma_desc_t) * max_desc_num(qh)); } @@ -1652,11 +1618,9 @@ index 274967b..ee920c4 100644 } /** -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h -index 4823167..fb57db0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h -@@ -113,6 +113,11 @@ extern void dwc_otg_hcd_remove(dwc_otg_hcd_t * hcd); +@@ -113,6 +113,11 @@ extern void dwc_otg_hcd_remove(dwc_otg_h */ extern int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd); @@ -1668,8 +1632,6 @@ index 4823167..fb57db0 100644 /** * Returns private data set by * dwc_otg_hcd_set_priv_data function. -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index b41e164..64d33a5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -34,6 +34,12 @@ @@ -2184,7 +2146,7 @@ index b41e164..64d33a5 100644 /* Don't print debug message in the interrupt handler on SOF */ #ifndef DEBUG_SOF if (gintsts.d32 != DWC_SOF_INTR_MASK) -@@ -88,10 +543,16 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -88,10 +543,16 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ "DWC OTG HCD Interrupt Detected gintsts&gintmsk=0x%08x core_if=%p\n", gintsts.d32, core_if); #endif @@ -2203,7 +2165,7 @@ index b41e164..64d33a5 100644 if (gintsts.b.rxstsqlvl) { retval |= dwc_otg_hcd_handle_rx_status_q_level_intr -@@ -106,7 +567,10 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -106,7 +567,10 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ /** @todo Implement i2cintr handler. */ } if (gintsts.b.portintr) { @@ -2214,7 +2176,7 @@ index b41e164..64d33a5 100644 } if (gintsts.b.hcintr) { retval |= dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd); -@@ -138,11 +602,48 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -138,11 +602,48 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ #endif } @@ -2263,7 +2225,7 @@ index b41e164..64d33a5 100644 #warning Compiling code to track missed SOFs #define FRAME_NUM_ARRAY_SIZE 1000 /** -@@ -188,7 +689,8 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) +@@ -188,7 +689,8 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_ dwc_list_link_t *qh_entry; dwc_otg_qh_t *qh; dwc_otg_transaction_type_e tr_type; @@ -2273,7 +2235,7 @@ index b41e164..64d33a5 100644 hfnum.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hfnum); -@@ -212,17 +714,31 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) +@@ -212,17 +714,31 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_ qh = DWC_LIST_ENTRY(qh_entry, dwc_otg_qh_t, qh_list_entry); qh_entry = qh_entry->next; if (dwc_frame_num_le(qh->sched_frame, hcd->frame_number)) { @@ -2305,7 +2267,7 @@ index b41e164..64d33a5 100644 } /* Clear interrupt */ -@@ -511,6 +1027,15 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -511,6 +1027,15 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_o haint.d32 = dwc_otg_read_host_all_channels_intr(dwc_otg_hcd->core_if); @@ -2321,7 +2283,7 @@ index b41e164..64d33a5 100644 for (i = 0; i < dwc_otg_hcd->core_if->core_params->host_channels; i++) { if (haint.b2.chint & (1 << i)) { retval |= dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd, i); -@@ -551,7 +1076,10 @@ static uint32_t get_actual_xfer_length(dwc_hc_t * hc, +@@ -551,7 +1076,10 @@ static uint32_t get_actual_xfer_length(d *short_read = (hctsiz.b.xfersize != 0); } } else if (hc->qh->do_split) { @@ -2333,7 +2295,7 @@ index b41e164..64d33a5 100644 } else { length = hc->xfer_len; } -@@ -595,7 +1123,6 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, +@@ -595,7 +1123,6 @@ static int update_urb_state_xfer_comp(dw DWC_OTG_HC_XFER_COMPLETE, &short_read); @@ -2341,7 +2303,7 @@ index b41e164..64d33a5 100644 /* non DWORD-aligned buffer case handling. */ if (hc->align_buff && xfer_length && hc->ep_is_in) { dwc_memcpy(urb->buf + urb->actual_length, hc->qh->dw_align_buf, -@@ -797,11 +1324,24 @@ static void release_channel(dwc_otg_hcd_t * hcd, +@@ -797,11 +1324,24 @@ static void release_channel(dwc_otg_hcd_ dwc_otg_transaction_type_e tr_type; int free_qtd; dwc_irqflags_t flags; @@ -2401,7 +2363,7 @@ index b41e164..64d33a5 100644 } /** -@@ -1295,6 +1852,17 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, +@@ -1295,6 +1852,17 @@ static int32_t handle_hc_nak_intr(dwc_ot "NAK Received--\n", hc->hc_num); /* @@ -2419,7 +2381,7 @@ index b41e164..64d33a5 100644 * Handle NAK for IN/OUT SSPLIT/CSPLIT transfers, bulk, control, and * interrupt. Re-start the SSPLIT transfer. */ -@@ -1316,7 +1884,11 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, +@@ -1316,7 +1884,11 @@ static int32_t handle_hc_nak_intr(dwc_ot * transfers in DMA mode for the sole purpose of * resetting the error count after a transaction error * occurs. The core will continue transferring data. @@ -2431,7 +2393,7 @@ index b41e164..64d33a5 100644 qtd->error_count = 0; goto handle_nak_done; } -@@ -1428,6 +2000,15 @@ static int32_t handle_hc_ack_intr(dwc_otg_hcd_t * hcd, +@@ -1428,6 +2000,15 @@ static int32_t handle_hc_ack_intr(dwc_ot halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_ACK); } } else { @@ -2447,7 +2409,7 @@ index b41e164..64d33a5 100644 qtd->error_count = 0; if (hc->qh->ping_state) { -@@ -1490,8 +2071,10 @@ static int32_t handle_hc_nyet_intr(dwc_otg_hcd_t * hcd, +@@ -1490,8 +2071,10 @@ static int32_t handle_hc_nyet_intr(dwc_o hc->ep_type == DWC_OTG_EP_TYPE_ISOC) { int frnum = dwc_otg_hcd_get_frame_number(hcd); @@ -2459,7 +2421,7 @@ index b41e164..64d33a5 100644 /* * No longer in the same full speed frame. * Treat this as a transaction error. -@@ -1778,13 +2361,28 @@ static int32_t handle_hc_datatglerr_intr(dwc_otg_hcd_t * hcd, +@@ -1778,13 +2361,28 @@ static int32_t handle_hc_datatglerr_intr dwc_otg_qtd_t * qtd) { DWC_DEBUGPL(DBG_HCDI, "--Host Channel %d Interrupt: " @@ -2493,7 +2455,7 @@ index b41e164..64d33a5 100644 } disable_hc_int(hc_regs, datatglerr); -@@ -1862,10 +2460,10 @@ static inline int halt_status_ok(dwc_otg_hcd_t * hcd, +@@ -1862,10 +2460,10 @@ static inline int halt_status_ok(dwc_otg static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_hc_regs_t * hc_regs, @@ -2507,7 +2469,7 @@ index b41e164..64d33a5 100644 int out_nak_enh = 0; /* For core with OUT NAK enhancement, the flow for high- -@@ -1897,8 +2495,11 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, +@@ -1897,8 +2495,11 @@ static void handle_hc_chhltd_intr_dma(dw } /* Read the HCINTn register to determine the cause for the halt. */ @@ -2521,7 +2483,7 @@ index b41e164..64d33a5 100644 if (hcint.b.xfercomp) { /** @todo This is here because of a possible hardware bug. Spec -@@ -1937,6 +2538,8 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, +@@ -1937,6 +2538,8 @@ static void handle_hc_chhltd_intr_dma(dw handle_hc_babble_intr(hcd, hc, hc_regs, qtd); } else if (hcint.b.frmovrun) { handle_hc_frmovrun_intr(hcd, hc, hc_regs, qtd); @@ -2530,7 +2492,7 @@ index b41e164..64d33a5 100644 } else if (!out_nak_enh) { if (hcint.b.nyet) { /* -@@ -1986,12 +2589,24 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, +@@ -1986,12 +2589,24 @@ static void handle_hc_chhltd_intr_dma(dw DWC_READ_REG32(&hcd-> core_if->core_global_regs-> gintsts)); @@ -2555,7 +2517,7 @@ index b41e164..64d33a5 100644 } } -@@ -2009,13 +2624,15 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, +@@ -2009,13 +2624,15 @@ static void handle_hc_chhltd_intr_dma(dw static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_hc_regs_t * hc_regs, @@ -2573,7 +2535,7 @@ index b41e164..64d33a5 100644 } else { #ifdef DEBUG if (!halt_status_ok(hcd, hc, hc_regs, qtd)) { -@@ -2032,7 +2649,7 @@ static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, +@@ -2032,7 +2649,7 @@ static int32_t handle_hc_chhltd_intr(dwc int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) { int retval = 0; @@ -2582,7 +2544,7 @@ index b41e164..64d33a5 100644 hcintmsk_data_t hcintmsk; dwc_hc_t *hc; dwc_otg_hc_regs_t *hc_regs; -@@ -2042,15 +2659,33 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) +@@ -2042,15 +2659,33 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc hc = dwc_otg_hcd->hc_ptr_array[num]; hc_regs = dwc_otg_hcd->core_if->host_if->hc_regs[num]; @@ -2616,7 +2578,7 @@ index b41e164..64d33a5 100644 if (!dwc_otg_hcd->core_if->dma_enable) { if (hcint.b.chhltd && hcint.d32 != 0x2) { hcint.b.chhltd = 0; -@@ -2068,7 +2703,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) +@@ -2068,7 +2703,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc hcint.b.nyet = 0; } if (hcint.b.chhltd) { @@ -2625,7 +2587,7 @@ index b41e164..64d33a5 100644 } if (hcint.b.ahberr) { retval |= handle_hc_ahberr_intr(dwc_otg_hcd, hc, hc_regs, qtd); -@@ -2080,7 +2715,8 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) +@@ -2080,7 +2715,8 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc retval |= handle_hc_nak_intr(dwc_otg_hcd, hc, hc_regs, qtd); } if (hcint.b.ack) { @@ -2635,14 +2597,12 @@ index b41e164..64d33a5 100644 } if (hcint.b.nyet) { retval |= handle_hc_nyet_intr(dwc_otg_hcd, hc, hc_regs, qtd); -@@ -2102,5 +2738,4 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) +@@ -2102,5 +2738,4 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc return retval; } - #endif /* DWC_DEVICE_ONLY */ -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index e4787f5..ee8eec9 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -1,3 +1,4 @@ @@ -2676,7 +2636,7 @@ index e4787f5..ee8eec9 100644 /** @name Linux HC Driver API Functions */ /** @{ */ /* manage i/o requests, device state */ -@@ -259,13 +265,15 @@ static void free_bus_bandwidth(struct usb_hcd *hcd, uint32_t bw, +@@ -259,13 +265,15 @@ static void free_bus_bandwidth(struct us /** * Sets the final status of an URB and returns it to the device driver. Any @@ -2694,7 +2654,7 @@ index e4787f5..ee8eec9 100644 if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) { DWC_PRINTF("%s: urb %p, device %d, ep %d %s, status=%d\n", __func__, urb, usb_pipedevice(urb->pipe), -@@ -279,7 +287,7 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, +@@ -279,7 +287,7 @@ static int _complete(dwc_otg_hcd_t * hcd } } } @@ -2703,7 +2663,7 @@ index e4787f5..ee8eec9 100644 urb->actual_length = dwc_otg_hcd_urb_get_actual_length(dwc_otg_urb); /* Convert status value. */ switch (status) { -@@ -301,6 +309,9 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, +@@ -301,6 +309,9 @@ static int _complete(dwc_otg_hcd_t * hcd case -DWC_E_OVERFLOW: status = -EOVERFLOW; break; @@ -2713,7 +2673,7 @@ index e4787f5..ee8eec9 100644 default: if (status) { DWC_PRINTF("Uknown urb status %d\n", status); -@@ -342,18 +353,33 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, +@@ -342,18 +353,33 @@ static int _complete(dwc_otg_hcd_t * hcd } DWC_FREE(dwc_otg_urb); @@ -2754,7 +2714,7 @@ index e4787f5..ee8eec9 100644 return 0; } -@@ -366,6 +392,16 @@ static struct dwc_otg_hcd_function_ops hcd_fops = { +@@ -366,6 +392,16 @@ static struct dwc_otg_hcd_function_ops h .get_b_hnp_enable = _get_b_hnp_enable, }; @@ -2831,7 +2791,7 @@ index e4787f5..ee8eec9 100644 /* Initialize the DWC OTG HCD. */ dwc_otg_hcd = dwc_otg_hcd_alloc_hcd(); if (!dwc_otg_hcd) { -@@ -607,9 +682,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, +@@ -607,9 +682,7 @@ static int dwc_otg_urb_enqueue(struct us #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) struct usb_host_endpoint *ep = urb->ep; #endif @@ -2841,7 +2801,7 @@ index e4787f5..ee8eec9 100644 void **ref_ep_hcpriv = &ep->hcpriv; dwc_otg_hcd_t *dwc_otg_hcd = hcd_to_dwc_otg_hcd(hcd); dwc_otg_hcd_urb_t *dwc_otg_urb; -@@ -661,9 +734,8 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, +@@ -661,9 +734,8 @@ static int dwc_otg_urb_enqueue(struct us if(dwc_otg_urb == NULL) return -ENOMEM; @@ -2853,7 +2813,7 @@ index e4787f5..ee8eec9 100644 dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe), usb_pipeendpoint(urb->pipe), ep_type, -@@ -703,37 +775,42 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, +@@ -703,37 +775,42 @@ static int dwc_otg_urb_enqueue(struct us iso_frame_desc[i].length); } @@ -2897,13 +2857,14 @@ index e4787f5..ee8eec9 100644 - DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags); - usb_hcd_unlink_urb_from_ep(hcd, urb); - DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags); -+ usb_hcd_unlink_urb_from_ep(hcd, urb); - #endif +-#endif - if (retval == -DWC_E_NO_DEVICE) { - retval = -ENODEV; - } - } - } ++ usb_hcd_unlink_urb_from_ep(hcd, urb); ++#endif + DWC_FREE(dwc_otg_urb); + urb->hcpriv = NULL; + if (retval == -DWC_E_NO_DEVICE) @@ -2921,7 +2882,7 @@ index e4787f5..ee8eec9 100644 return retval; } -@@ -777,6 +854,8 @@ static int dwc_otg_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) +@@ -777,6 +854,8 @@ static int dwc_otg_urb_dequeue(struct us usb_hcd_unlink_urb_from_ep(hcd, urb); #endif DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); @@ -2930,8 +2891,6 @@ index e4787f5..ee8eec9 100644 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) usb_hcd_giveback_urb(hcd, urb); #else -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index 0a1cbb7..5c22b6c 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -41,6 +41,7 @@ @@ -2942,7 +2901,7 @@ index 0a1cbb7..5c22b6c 100644 extern bool microframe_schedule; -@@ -182,6 +183,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) +@@ -182,6 +183,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_ot if (microframe_schedule) qh->speed = dev_speed; @@ -2950,7 +2909,7 @@ index 0a1cbb7..5c22b6c 100644 if (((dev_speed == USB_SPEED_LOW) || (dev_speed == USB_SPEED_FULL)) && -@@ -191,6 +193,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) +@@ -191,6 +193,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_ot dwc_otg_hcd_get_ep_num(&urb->pipe_info), hub_addr, hub_port); qh->do_split = 1; @@ -2958,7 +2917,7 @@ index 0a1cbb7..5c22b6c 100644 } if (qh->ep_type == UE_INTERRUPT || qh->ep_type == UE_ISOCHRONOUS) { -@@ -573,6 +576,9 @@ static int check_max_xfer_size(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -573,6 +576,9 @@ static int check_max_xfer_size(dwc_otg_h return status; } @@ -2968,7 +2927,7 @@ index 0a1cbb7..5c22b6c 100644 /** * Schedules an interrupt or isochronous transfer in the periodic schedule. * -@@ -631,8 +637,13 @@ static int schedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -631,8 +637,13 @@ static int schedule_periodic(dwc_otg_hcd DWC_LIST_INSERT_TAIL(&hcd->periodic_sched_ready, &qh->qh_list_entry); } else { @@ -2984,7 +2943,7 @@ index 0a1cbb7..5c22b6c 100644 } if (!microframe_schedule) { -@@ -646,6 +657,7 @@ static int schedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -646,6 +657,7 @@ static int schedule_periodic(dwc_otg_hcd return status; } @@ -2992,7 +2951,7 @@ index 0a1cbb7..5c22b6c 100644 /** * This function adds a QH to either the non periodic or periodic schedule if * it is not already in the schedule. If the QH is already in the schedule, no -@@ -668,6 +680,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -668,6 +680,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * h /* Always start in the inactive schedule. */ DWC_LIST_INSERT_TAIL(&hcd->non_periodic_sched_inactive, &qh->qh_list_entry); @@ -3000,7 +2959,7 @@ index 0a1cbb7..5c22b6c 100644 } else { status = schedule_periodic(hcd, qh); if ( !hcd->periodic_qh_count ) { -@@ -727,6 +740,9 @@ void dwc_otg_hcd_qh_remove(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -727,6 +740,9 @@ void dwc_otg_hcd_qh_remove(dwc_otg_hcd_t hcd->non_periodic_qh_ptr->next; } DWC_LIST_REMOVE_INIT(&qh->qh_list_entry); @@ -3010,7 +2969,7 @@ index 0a1cbb7..5c22b6c 100644 } else { deschedule_periodic(hcd, qh); hcd->periodic_qh_count--; -@@ -755,6 +771,24 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, +@@ -755,6 +771,24 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h int sched_next_periodic_split) { if (dwc_qh_is_non_per(qh)) { @@ -3035,7 +2994,7 @@ index 0a1cbb7..5c22b6c 100644 dwc_otg_hcd_qh_remove(hcd, qh); if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list)) { /* Add back to inactive non-periodic schedule. */ -@@ -768,6 +802,7 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, +@@ -768,6 +802,7 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h if (sched_next_periodic_split) { qh->sched_frame = frame_number; @@ -3043,7 +3002,7 @@ index 0a1cbb7..5c22b6c 100644 if (dwc_frame_num_le(frame_number, dwc_frame_num_inc (qh->start_split_frame, -@@ -816,6 +851,11 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, +@@ -816,6 +851,11 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_ready, &qh->qh_list_entry); } else { @@ -3055,7 +3014,7 @@ index 0a1cbb7..5c22b6c 100644 DWC_LIST_MOVE_HEAD (&hcd->periodic_sched_inactive, &qh->qh_list_entry); -@@ -880,6 +920,7 @@ void dwc_otg_hcd_qtd_init(dwc_otg_qtd_t * qtd, dwc_otg_hcd_urb_t * urb) +@@ -880,6 +920,7 @@ void dwc_otg_hcd_qtd_init(dwc_otg_qtd_t * QH to place the QTD into. If it does not find a QH, then it will create a * new QH. If the QH to which the QTD is added is not currently scheduled, it * is placed into the proper schedule based on its EP type. @@ -3063,7 +3022,7 @@ index 0a1cbb7..5c22b6c 100644 * * @param[in] qtd The QTD to add * @param[in] hcd The DWC HCD structure -@@ -892,8 +933,6 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, +@@ -892,8 +933,6 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * dwc_otg_hcd_t * hcd, dwc_otg_qh_t ** qh, int atomic_alloc) { int retval = 0; @@ -3072,7 +3031,7 @@ index 0a1cbb7..5c22b6c 100644 dwc_otg_hcd_urb_t *urb = qtd->urb; /* -@@ -903,18 +942,16 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, +@@ -903,18 +942,16 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * if (*qh == NULL) { *qh = dwc_otg_hcd_qh_create(hcd, urb, atomic_alloc); if (*qh == NULL) { @@ -3093,9 +3052,6 @@ index 0a1cbb7..5c22b6c 100644 done: return retval; -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c -new file mode 100755 -index 0000000..50b94a8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c @@ -0,0 +1,113 @@ @@ -3212,9 +3168,6 @@ index 0000000..50b94a8 + + return; +} -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h -new file mode 100755 -index 0000000..ca17379 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h @@ -0,0 +1,48 @@ @@ -3266,8 +3219,6 @@ index 0000000..ca17379 +extern bool fiq_fix_enable, nak_holdoff_enable, fiq_split_enable; + +#endif -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h -index e46d9bb..6b2c7d0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -97,6 +97,9 @@ typedef struct os_dependent { @@ -3280,8 +3231,6 @@ index e46d9bb..6b2c7d0 100644 #ifdef LM_INTERFACE struct lm_device *lmdev; #elif defined(PCI_INTERFACE) -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c -index 1b1f83c..c8590b5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -4276,7 +4276,7 @@ do { \ @@ -3293,6 +3242,3 @@ index 1b1f83c..c8590b5 100644 out_desc_addr->status.d32; if (status.b.sr) { --- -1.8.3.2 - |