changed irq number and pmu settings. little bit of fiddling to get the now variable irq into resources.
Signed-off-by: Conor O'Gorman <i...@conorogorman.net> --- .../patches-3.2/303-fix-dwc-otg-usb-for-ase.patch | 65 ++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 target/linux/lantiq/patches-3.2/303-fix-dwc-otg-usb-for-ase.patch diff --git a/target/linux/lantiq/patches-3.2/303-fix-dwc-otg-usb-for-ase.patch b/target/linux/lantiq/patches-3.2/303-fix-dwc-otg-usb-for-ase.patch new file mode 100644 index 0000000..5d146f4 --- /dev/null +++ b/target/linux/lantiq/patches-3.2/303-fix-dwc-otg-usb-for-ase.patch @@ -0,0 +1,65 @@ +--- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_irq.h ++++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_irq.h +@@ -39,7 +39,8 @@ + #define LTQ_MEI_INT (INT_NUM_IM1_IRL0 + 23) + + #define LTQ_TIMER6_INT (INT_NUM_IM1_IRL0 + 23) +-#define LTQ_USB_INT (INT_NUM_IM1_IRL0 + 22) ++#define LTQ_USB_INT ((ltq_is_ase()) ? (INT_NUM_IM0_IRL0 + 31) :\ ++ (INT_NUM_IM1_IRL0 + 22)) + #define LTQ_USB_OC_INT (INT_NUM_IM4_IRL0 + 23) + + #define MIPS_CPU_TIMER_IRQ 7 +--- a/drivers/usb/dwc_otg/dwc_otg_driver.c ++++ b/drivers/usb/dwc_otg/dwc_otg_driver.c +@@ -80,7 +80,7 @@ + const char dwc_driver_name[] = "dwc_otg"; + + static unsigned long dwc_iomem_base = IFX_USB_IOMEM_BASE; +-int dwc_irq = LTQ_USB_INT; ++int dwc_irq = -1; + //int dwc_irq = 54; + //int dwc_irq = IFXMIPS_USB_OC_INT; + +@@ -860,6 +860,9 @@ static int __init dwc_otg_init(void) + + printk(KERN_INFO "%s: version %s\n", dwc_driver_name, DWC_DRIVER_VERSION); + ++ if (dwc_irq == -1) ++ dwc_irq = LTQ_USB_INT; ++ + // ifxmips setup + retval = ifx_usb_hc_init(dwc_iomem_base, dwc_irq); + if (retval < 0) +--- a/drivers/usb/dwc_otg/dwc_otg_ifx.c ++++ b/drivers/usb/dwc_otg/dwc_otg_ifx.c +@@ -61,7 +61,10 @@ void dwc_otg_power_on (void) + // clear power + writel(readl(DANUBE_PMU_PWDCR) | 0x41, DANUBE_PMU_PWDCR); + // set clock gating +- writel(readl(DANUBE_CGU_IFCCR) | 0x30, DANUBE_CGU_IFCCR); ++ if (ltq_is_ase()) ++ writel(readl(DANUBE_CGU_IFCCR) & ~0x20, DANUBE_CGU_IFCCR); ++ else ++ writel(readl(DANUBE_CGU_IFCCR) | 0x30, DANUBE_CGU_IFCCR); + // set power + writel(readl(DANUBE_PMU_PWDCR) & ~0x1, DANUBE_PMU_PWDCR); + writel(readl(DANUBE_PMU_PWDCR) & ~0x40, DANUBE_PMU_PWDCR); +--- a/arch/mips/lantiq/xway/dev-dwc_otg.c ++++ b/arch/mips/lantiq/xway/dev-dwc_otg.c +@@ -43,7 +43,6 @@ static struct resource resources[] = + }, + [1] = { + .name = "dwc_otg_irq", +- .start = LTQ_USB_INT, + .flags = IORESOURCE_IRQ, + }, + }; +@@ -63,6 +62,7 @@ int __init + xway_register_dwc(int pin) + { + struct irq_data d; ++ resources[1].start = LTQ_USB_INT; + d.irq = resources[1].start; + ltq_enable_irq(&d); + platform_dev.dev.platform_data = (void*) pin; -- 1.7.4.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel