Changeset 19047


Ignore:
Timestamp:
2010-01-05T21:12:12+01:00 (8 years ago)
Author:
juhosg
Message:

ar71xx: init PCI on the WRT400N board (thanks to Ben Pfountz for testing)

Location:
trunk/target/linux/ar71xx/files/arch/mips/ar71xx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig

    r18984 r19047  
    8787config AR71XX_MACH_WRT400N 
    8888        bool "Linksys WRT400N board support" 
     89        select AR71XX_DEV_AP94_PCI if PCI 
    8990        select AR71XX_DEV_M25P80 
    9091        select AR71XX_DEV_GPIO_BUTTONS 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c

    r18985 r19047  
    22 *  Linksys WRT400N board support 
    33 * 
    4  *  Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org> 
     4 *  Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org> 
    55 *  Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org> 
    66 * 
     
    1717#include "machtype.h" 
    1818#include "devices.h" 
     19#include "dev-ap94-pci.h" 
    1920#include "dev-m25p80.h" 
    2021#include "dev-gpio-buttons.h" 
    2122#include "dev-leds-gpio.h" 
     23#include "nvram.h" 
    2224 
    2325#define WRT400N_GPIO_LED_ORANGE 5 
     
    3032 
    3133#define WRT400N_BUTTONS_POLL_INTERVAL   20 
     34 
     35#define WRT400N_MAC_ADDR_OFFSET         0x120c 
     36#define WRT400N_CALDATA0_OFFSET         0x1000 
     37#define WRT400N_CALDATA1_OFFSET         0x5000 
    3238 
    3339#ifdef CONFIG_MTD_PARTITIONS 
     
    126132static void __init wrt400n_setup(void) 
    127133{ 
     134        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); 
     135        u8 mac[6]; 
     136        int i; 
     137 
     138        memcpy(mac, art + WRT400N_MAC_ADDR_OFFSET, 6); 
     139        for (i = 5; i >= 3; i--) 
     140                if (++mac[i] != 0x00) break; 
     141 
     142        ar71xx_set_mac_base(mac); 
     143 
    128144        ar71xx_add_device_mdio(0x0); 
    129145 
     
    149165                                        wrt400n_gpio_buttons); 
    150166 
    151         /* TODO: PCI support */ 
     167        ap94_pci_init(art + WRT400N_CALDATA0_OFFSET, NULL, 
     168                      art + WRT400N_CALDATA1_OFFSET, NULL); 
    152169} 
    153170 
Note: See TracChangeset for help on using the changeset viewer.