Ignore:
Timestamp:
2011-08-10T20:50:12+02:00 (5 years ago)
Author:
nbd
Message:

ar71xx: backport ar7241/ar7242 fixes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/target/linux/ar71xx/files/arch/mips/ar71xx/dev-usb.c

    r20494 r27949  
    6565 
    6666/* 
    67  * EHCI (USB full speed host controller) 
     67 * EHCI (USB high/full speed host controller) 
    6868 */ 
    6969static struct resource ar71xx_ehci_resources[] = { 
     
    129129        ar71xx_usb_ctrl_wr(USB_CTRL_REG_FLADJ, 0x3); 
    130130 
    131         if (ar71xx_soc == AR71XX_SOC_AR7241 || ar71xx_soc == AR71XX_SOC_AR7242) { 
    132                 ar71xx_ehci_data.is_ar91xx = 1; 
    133                 ar71xx_ehci_device.resource = ar7240_ohci_resources; 
    134                 ar71xx_ehci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources); 
    135                 platform_device_register(&ar71xx_ehci_device); 
    136         } else { 
    137                 ar71xx_ohci_device.resource = ar7240_ohci_resources; 
    138                 ar71xx_ohci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources); 
    139                 platform_device_register(&ar71xx_ohci_device); 
    140         } 
     131        ar71xx_ohci_device.resource = ar7240_ohci_resources; 
     132        ar71xx_ohci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources); 
     133        platform_device_register(&ar71xx_ohci_device); 
     134} 
     135 
     136static void __init ar7241_usb_setup(void) 
     137{ 
     138        ar71xx_device_start(AR724X_RESET_USBSUS_OVERRIDE); 
     139        mdelay(10); 
     140 
     141        ar71xx_device_start(AR724X_RESET_USB_HOST); 
     142        mdelay(10); 
     143 
     144        ar71xx_device_start(AR724X_RESET_USB_PHY); 
     145        mdelay(10); 
     146 
     147        ar71xx_ehci_data.is_ar91xx = 1; 
     148        ar71xx_ehci_device.resource = ar7240_ohci_resources; 
     149        ar71xx_ehci_device.num_resources = ARRAY_SIZE(ar7240_ohci_resources); 
     150        platform_device_register(&ar71xx_ehci_device); 
    141151} 
    142152 
     
    160170        switch (ar71xx_soc) { 
    161171        case AR71XX_SOC_AR7240: 
     172                ar7240_usb_setup(); 
     173                break; 
     174 
    162175        case AR71XX_SOC_AR7241: 
    163176        case AR71XX_SOC_AR7242: 
    164                 ar7240_usb_setup(); 
     177                ar7241_usb_setup(); 
    165178                break; 
    166179 
Note: See TracChangeset for help on using the changeset viewer.