Changeset 37547


Ignore:
Timestamp:
2013-07-26T09:31:57+02:00 (3 years ago)
Author:
juhosg
Message:

ar71xx: add kernel support for the TL-MR10U board

Based on andelf's patch:
http://andelf.diandian.com/post/2013-05-22/40050677370

[juhosg: extend WR703N code to handle the TL-MR10U
instead of adding a separate mach-tl-mr10u file]]

Signed-off-by: Oleg Titov <oleg.titov@…>
Patchwork: http://patchwork.openwrt.org/patch/3840/
Signed-off-by: Gabor Juhos <juhosg@…>

Location:
trunk/target/linux/ar71xx
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c

    r35037 r37547  
    11/* 
    2  *  TP-LINK TL-WR703N board support 
     2 *  TP-LINK TL-WR703N/TL-MR10U board support 
    33 * 
    44 *  Copyright (C) 2011 dongyuqi <729650915@qq.com> 
     
    2626 
    2727#define TL_WR703N_GPIO_USB_POWER        8 
     28 
     29#define TL_MR10U_GPIO_USB_POWER         18 
    2830 
    2931#define TL_WR703N_KEYS_POLL_INTERVAL    20      /* msecs */ 
     
    5860}; 
    5961 
    60 static void __init tl_wr703n_setup(void) 
     62static void __init common_setup(unsigned usb_power_gpio) 
    6163{ 
    6264        u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); 
     
    7375                                        tl_wr703n_gpio_keys); 
    7476 
    75         gpio_request_one(TL_WR703N_GPIO_USB_POWER, 
     77        gpio_request_one(usb_power_gpio, 
    7678                         GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, 
    7779                         "USB power"); 
     
    8688} 
    8789 
     90static void __init tl_mr10u_setup(void) 
     91{ 
     92        common_setup(TL_MR10U_GPIO_USB_POWER); 
     93} 
     94 
     95MIPS_MACHINE(ATH79_MACH_TL_MR10U, "TL-MR10U", "TP-LINK TL-MR10U", 
     96             tl_mr10u_setup); 
     97 
     98static void __init tl_wr703n_setup(void) 
     99{ 
     100        common_setup(TL_WR703N_GPIO_USB_POWER); 
     101} 
     102 
    88103MIPS_MACHINE(ATH79_MACH_TL_WR703N, "TL-WR703N", "TP-LINK TL-WR703N v1", 
    89104             tl_wr703n_setup); 
Note: See TracChangeset for help on using the changeset viewer.