Ignore:
Timestamp:
2010-12-14T14:02:49+01:00 (5 years ago)
Author:
blogic
Message:

[lantiq]

  • make the usb gpio configurable
  • 105-header_xway.patch has a corrupt line count in it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/lantiq/patches/700-dwc_otg.patch

    r24526 r24564  
    56945694--- /dev/null 
    56955695+++ b/drivers/usb/dwc_otg/dwc_otg_driver.c 
    5696 @@ -0,0 +1,1264 @@ 
     5696@@ -0,0 +1,1269 @@ 
    56975697+/* ========================================================================== 
    56985698+ * $File: //dwh/usb_iip/dev/software/otg_ipmate/linux/drivers/dwc_otg_driver.c $ 
     
    57495749+#include <linux/moduleparam.h> 
    57505750+#include <linux/init.h> 
     5751+#include <linux/gpio.h> 
    57515752+ 
    57525753+#include <linux/device.h> 
     
    63406341+       struct resource *res; 
    63416342+       gusbcfg_data_t usbcfg = {.d32 = 0}; 
     6343+ 
     6344+       // GPIOs 
     6345+       gpio_request(_dev->dev.platform_data, "USB_POWER"); 
     6346+       gpio_direction_output(_dev->dev.platform_data, 1); 
    63426347+ 
    63436348+       dev_dbg(&_dev->dev, "dwc_otg_driver_probe (%p)\n", _dev); 
     
    1324113246--- /dev/null 
    1324213247+++ b/drivers/usb/dwc_otg/dwc_otg_ifx.c 
    13243 @@ -0,0 +1,176 @@ 
     13248@@ -0,0 +1,150 @@ 
    1324413249+/****************************************************************************** 
    1324513250+** 
     
    1330313308+void dwc_otg_power_on (void) 
    1330413309+{ 
    13305 +       // GPIOs 
    13306 +       gpio_request(28, "USB_POWER"); 
    13307 +       gpio_direction_output(28, 1); 
    13308 +       /* 
    13309 +       writel(readl(IFXMIPS_GPIO_P0_DIR) | (0x4000), IFXMIPS_GPIO_P0_DIR); 
    13310 +       writel(readl(IFXMIPS_GPIO_P0_OD) | (0x4000), IFXMIPS_GPIO_P0_OD); 
    13311 +       writel(readl(IFXMIPS_GPIO_P0_ALTSEL0) & ~(0x4000), IFXMIPS_GPIO_P0_ALTSEL0); 
    13312 +       writel(readl(IFXMIPS_GPIO_P0_ALTSEL1) & ~(0x4000), IFXMIPS_GPIO_P0_ALTSEL1); 
    13313 +       writel(readl(IFXMIPS_GPIO_P0_OUT) | (0x4000), IFXMIPS_GPIO_P0_OUT); 
    13314 +*/ 
    13315 +/*     writel(readl(IFXMIPS_GPIO_P1_DIR) | (0x1000), IFXMIPS_GPIO_P1_DIR); 
    13316 +       writel(readl(IFXMIPS_GPIO_P1_OD) | (0x1000), IFXMIPS_GPIO_P1_OD); 
    13317 +       writel(readl(IFXMIPS_GPIO_P1_ALTSEL0) & ~(0x1000), IFXMIPS_GPIO_P1_ALTSEL0); 
    13318 +       writel(readl(IFXMIPS_GPIO_P1_ALTSEL1) & ~(0x1000), IFXMIPS_GPIO_P1_ALTSEL1); 
    13319 +       writel(readl(IFXMIPS_GPIO_P1_OUT) | (0x1000), IFXMIPS_GPIO_P1_OUT); 
    13320 +*/ 
    1332113310+       // clear power 
    13322 +       //set_bit (0, DANUBE_PMU_PWDCR); 
    13323 +       //set_bit (6, DANUBE_PMU_PWDCR); 
    1332413311+       writel(readl(DANUBE_PMU_PWDCR) | 0x41, DANUBE_PMU_PWDCR); 
    13325 + 
    1332613312+       // set clock gating 
    13327 +       //set_bit (4, (volatile unsigned long *)DANUBE_CGU_IFCCR); 
    13328 +       //set_bit (5, (volatile unsigned long *)DANUBE_CGU_IFCCR); 
    1332913313+       writel(readl(DANUBE_CGU_IFCCR) | 0x30, DANUBE_CGU_IFCCR); 
    13330 + 
    1333113314+       // set power 
    13332 +       //clear_bit (0, (volatile unsigned long *)DANUBE_PMU_PWDCR); 
    1333313315+       writel(readl(DANUBE_PMU_PWDCR) & ~0x1, DANUBE_PMU_PWDCR); 
    13334 +       //clear_bit (6, (volatile unsigned long *)DANUBE_PMU_PWDCR); 
    1333513316+       writel(readl(DANUBE_PMU_PWDCR) & ~0x40, DANUBE_PMU_PWDCR); 
    13336 +       //clear_bit (15, (volatile unsigned long *)DANUBE_PMU_PWDCR); 
    1333713317+       writel(readl(DANUBE_PMU_PWDCR) & ~0x8000, DANUBE_PMU_PWDCR); 
    13338 +       //writel(readl(DANUBE_PMU_PWDCR) & ~0x8041, DANUBE_PMU_PWDCR); 
    1333913318+ 
    1334013319+#if 1//defined (DWC_HOST_ONLY) 
     
    1557815557 obj-$(CONFIG_LANTIQ_MACH_EASY4010) += mach-easy4010.o 
    1557915558 obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o 
    15580 +onj-y += dev-dwc_otg.o 
     15559+obj-y += dev-dwc_otg.o 
    1558115560--- /dev/null 
    1558215561+++ b/arch/mips/lantiq/xway/dev-dwc_otg.c 
    15583 @@ -0,0 +1,64 @@ 
     15562@@ -0,0 +1,68 @@ 
    1558415563+/* 
    1558515564+ * This program is free software; you can redistribute it and/or modify 
     
    1561415593+#include <lantiq_platform.h> 
    1561515594+ 
     15595+#define LQ_USB_IOMEM_BASE 0x1e101000 
     15596+#define LQ_USB_IOMEM_SIZE 0x00040000 
     15597+ 
    1561615598+static struct resource resources[] = 
    1561715599+{ 
    1561815600+       [0] = { 
    1561915601+               .name    = "dwc_otg_membase", 
    15620 +               .start   = IFX_USB_IOMEM_BASE, 
    15621 +               .end       = IFX_USB_IOMEM_BASE + IFX_USB_IOMEM_SIZE - 1, 
     15602+               .start   = LQ_USB_IOMEM_BASE, 
     15603+               .end       = LQ_USB_IOMEM_BASE + LQ_USB_IOMEM_SIZE - 1, 
    1562215604+               .flags   = IORESOURCE_MEM, 
    1562315605+       }, 
    1562415606+       [1] = { 
    1562515607+               .name    = "dwc_otg_irq", 
    15626 +               .start   = IFX_USB_IRQ, 
     15608+               .start   = LQ_USB_INT, 
    1562715609+               .flags   = IORESOURCE_IRQ, 
    1562815610+       }, 
     
    1564415626+{ 
    1564515627+       lq_enable_irq(resources[1].start); 
     15628+       platform_dev.dev.platform_data = pin; 
    1564615629+       return platform_device_register(&platform_dev); 
    1564715630+} 
     
    1566815651--- a/arch/mips/lantiq/xway/mach-arv45xx.c 
    1566915652+++ b/arch/mips/lantiq/xway/mach-arv45xx.c 
    15670 @@ -24,6 +24,7 @@ 
     15653@@ -23,6 +23,7 @@ 
    1567115654 #include <lantiq_platform.h> 
    1567215655  
     
    1567615659 #define ARV452_LATCH_SWITCH            (1 << 10) 
    1567715660  
    15678 @@ -133,6 +134,7 @@ 
     15661@@ -132,6 +133,7 @@ 
    1567915662        lq_register_pci(&lq_pci_data); 
    1568015663        lq_register_wdt(); 
     
    1568415667  
    1568515668 MIPS_MACHINE(LANTIQ_MACH_ARV4518, 
    15686 @@ -152,6 +154,7 @@ 
     15669@@ -151,6 +153,7 @@ 
    1568715670        lq_register_pci(&lq_pci_data); 
    1568815671        lq_register_wdt(); 
Note: See TracChangeset for help on using the changeset viewer.