Changeset 18337


Ignore:
Timestamp:
01/31/12 02:06:35 (16 months ago)
Author:
BrainSlayer
Message:

kernel boots on wasp/ar934x, rest is untested

Location:
src/linux/universal/linux-3.2
Files:
3 added
26 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.2/.config_ag7240

    r18313 r18337  
    5757# CONFIG_WR741 is not set 
    5858# CONFIG_AR7240_EMULATION is not set 
     59# CONFIG_WASP_SUPPORT is not set 
    5960# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
    6061CONFIG_LOONGSON_UART_BASE=y 
     
    918919CONFIG_AR7242_RGMII_PHY=y 
    919920# CONFIG_AR7242_S16_PHY is not set 
     921# CONFIG_ATHRS27_PHY is not set 
    920922# CONFIG_AR7242_VIR_PHY is not set 
    921923# CONFIG_AR7242_RTL8309G_PHY is not set 
     
    923925CONFIG_AG7240_GE1_IS_CONNECTED=y 
    924926CONFIG_AG7240_GE1_MII=y 
     927# CONFIG_AG7240_GE1_GMII is not set 
     928# CONFIG_AG7240_GE1_RGMII is not set 
     929CONFIG_GE1_EXTERNAL_PHY=y 
    925930CONFIG_AR7240_S26_PHY=y 
    926931# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_ar7240

    r18313 r18337  
    11# 
    22# Automatically generated file; DO NOT EDIT. 
    3 # Linux/mips 3.2.0 Kernel Configuration 
     3# Linux/mips 3.2.2 Kernel Configuration 
    44# 
    55CONFIG_MIPS=y 
     
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061# CONFIG_AR7100_USB_GPIO_LED is not set 
    6162# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
     
    475476# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set 
    476477# CONFIG_NETFILTER_XT_TARGET_LED is not set 
     478CONFIG_NETFILTER_XT_TARGET_IMQ=y 
    477479CONFIG_NETFILTER_XT_TARGET_MARK=y 
    478480CONFIG_NETFILTER_XT_TARGET_NFLOG=y 
     
    792794# CONFIG_MTD_DOC2001PLUS is not set 
    793795# CONFIG_MTD_DOCG3 is not set 
    794 # CONFIG_MTD_AR7100_SPI_FLASH is not set 
    795796# CONFIG_MTD_FLASH_16MB is not set 
    796797CONFIG_MTD_FLASH_8MB=y 
    797 # CONFIG_MTD_AR9100_PARALLEL_FLASH is not set 
    798798# CONFIG_WZRG450NH is not set 
    799799CONFIG_MTD_AR7240_SPI_FLASH=y 
     
    808808# CONFIG_PARPORT is not set 
    809809# CONFIG_BLK_DEV is not set 
    810 # CONFIG_BLK_CPQ_DA is not set 
    811 # CONFIG_BLK_CPQ_CISS_DA is not set 
    812 # CONFIG_BLK_DEV_DAC960 is not set 
    813 # CONFIG_BLK_DEV_UMEM is not set 
    814 # CONFIG_BLK_DEV_COW_COMMON is not set 
    815 # CONFIG_BLK_DEV_LOOP is not set 
    816  
    817 # 
    818 # DRBD disabled because PROC_FS, INET or CONNECTOR not selected 
    819 # 
    820 # CONFIG_BLK_DEV_NBD is not set 
    821 # CONFIG_BLK_DEV_SX8 is not set 
    822 # CONFIG_BLK_DEV_UB is not set 
    823 # CONFIG_BLK_DEV_RAM is not set 
    824 # CONFIG_CDROM_PKTCDVD is not set 
    825 # CONFIG_ATA_OVER_ETH is not set 
    826 # CONFIG_BLK_DEV_HD is not set 
    827 # CONFIG_BLK_DEV_RBD is not set 
    828810# CONFIG_MISC_DEVICES is not set 
    829811CONFIG_HAVE_IDE=y 
     
    893875# CONFIG_NETPOLL is not set 
    894876# CONFIG_NET_POLL_CONTROLLER is not set 
    895 CONFIG_NETFILTER_XT_TARGET_IMQ=y 
    896877CONFIG_IMQ=y 
    897878# CONFIG_IMQ_BEHAVIOR_AA is not set 
     
    937918CONFIG_AG7240_GE1_IS_CONNECTED=y 
    938919CONFIG_AG7240_GE1_MII=y 
     920# CONFIG_AG7240_GE1_GMII is not set 
     921# CONFIG_AG7240_GE1_RGMII is not set 
     922CONFIG_GE1_EXTERNAL_PHY=y 
    939923CONFIG_AR7240_S26_PHY=y 
    940924# CONFIG_S26_SWITCH_ONLY_MODE is not set 
     
    945929CONFIG_AG7240_MAC_LOCATION=0xbfff0000 
    946930# CONFIG_AG7240_USE_TRC is not set 
    947 CONFIG_AG7100_LEN_PER_TX_DS=1536 
    948931# CONFIG_AG71XX is not set 
    949932# CONFIG_NET_VENDOR_MARVELL is not set 
     
    12361219# CONFIG_USB_WHCI_HCD is not set 
    12371220# CONFIG_USB_HWA_HCD is not set 
    1238 # CONFIG_USB_DWC_OTG is not set 
    12391221 
    12401222# 
  • src/linux/universal/linux-3.2/.config_ar7240_nousb

    r18313 r18337  
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061# CONFIG_AR7100_USB_GPIO_LED is not set 
    6162# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
  • src/linux/universal/linux-3.2/.config_ar7242

    r18313 r18337  
    5656# CONFIG_WR741 is not set 
    5757# CONFIG_AR7240_EMULATION is not set 
     58# CONFIG_WASP_SUPPORT is not set 
    5859# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
    5960CONFIG_LOONGSON_UART_BASE=y 
     
    917918# CONFIG_AR7242_RGMII_PHY is not set 
    918919CONFIG_AR7242_S16_PHY=y 
     920# CONFIG_ATHRS27_PHY is not set 
    919921# CONFIG_AR7242_VIR_PHY is not set 
    920922# CONFIG_AR7242_RTL8309G_PHY is not set 
     
    922924CONFIG_AG7240_GE1_IS_CONNECTED=y 
    923925CONFIG_AG7240_GE1_MII=y 
     926# CONFIG_AG7240_GE1_GMII is not set 
     927# CONFIG_AG7240_GE1_RGMII is not set 
     928CONFIG_GE1_EXTERNAL_PHY=y 
    924929CONFIG_AR7240_S26_PHY=y 
    925930CONFIG_S26_SWITCH_ONLY_MODE=y 
  • src/linux/universal/linux-3.2/.config_dir615e

    r18313 r18337  
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061# CONFIG_AR7100_USB_GPIO_LED is not set 
    6162# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
     
    868869CONFIG_AG7240_GE1_IS_CONNECTED=y 
    869870CONFIG_AG7240_GE1_MII=y 
     871# CONFIG_AG7240_GE1_GMII is not set 
     872# CONFIG_AG7240_GE1_RGMII is not set 
     873CONFIG_GE1_EXTERNAL_PHY=y 
    870874CONFIG_AR7240_S26_PHY=y 
    871875# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_dir632

    r18313 r18337  
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061CONFIG_AR7100_USB_GPIO_LED=y 
    6162CONFIG_AP_USB_LED_GPIO=17 
     
    942943# CONFIG_AR7242_RGMII_PHY is not set 
    943944# CONFIG_AR7242_S16_PHY is not set 
     945# CONFIG_ATHRS27_PHY is not set 
    944946# CONFIG_AR7242_VIR_PHY is not set 
    945947CONFIG_AR7242_RTL8309G_PHY=y 
     
    947949CONFIG_AG7240_GE1_IS_CONNECTED=y 
    948950CONFIG_AG7240_GE1_MII=y 
     951# CONFIG_AG7240_GE1_GMII is not set 
     952# CONFIG_AG7240_GE1_RGMII is not set 
     953CONFIG_GE1_EXTERNAL_PHY=y 
    949954CONFIG_AR7240_S26_PHY=y 
    950955# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_g450

    r18313 r18337  
    5555# CONFIG_DIR615E is not set 
    5656# CONFIG_AR7240_EMULATION is not set 
     57# CONFIG_WASP_SUPPORT is not set 
    5758CONFIG_AR7100_USB_GPIO_LED=y 
    5859CONFIG_AP_USB_LED_GPIO=17 
  • src/linux/universal/linux-3.2/.config_hornet

    r18313 r18337  
    874874CONFIG_AG7240_GE1_IS_CONNECTED=y 
    875875CONFIG_AG7240_GE1_MII=y 
     876# CONFIG_AG7240_GE1_GMII is not set 
     877# CONFIG_AG7240_GE1_RGMII is not set 
     878CONFIG_GE1_EXTERNAL_PHY=y 
    876879CONFIG_AR7240_S26_PHY=y 
    877880# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_ubntm

    r18313 r18337  
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061# CONFIG_AR7100_USB_GPIO_LED is not set 
    6162# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
     
    893894CONFIG_AG7240_GE1_IS_CONNECTED=y 
    894895CONFIG_AG7240_GE1_MII=y 
     896# CONFIG_AG7240_GE1_GMII is not set 
     897# CONFIG_AG7240_GE1_RGMII is not set 
     898CONFIG_GE1_EXTERNAL_PHY=y 
    895899CONFIG_AR7240_S26_PHY=y 
    896900# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_wlae

    r18313 r18337  
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061# CONFIG_AR7100_USB_GPIO_LED is not set 
    6162# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
     
    850851CONFIG_AG7240_GE1_IS_CONNECTED=y 
    851852CONFIG_AG7240_GE1_MII=y 
     853# CONFIG_AG7240_GE1_GMII is not set 
     854# CONFIG_AG7240_GE1_RGMII is not set 
     855CONFIG_GE1_EXTERNAL_PHY=y 
    852856CONFIG_AR7240_S26_PHY=y 
    853857# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_wr741

    r18313 r18337  
    5858CONFIG_WR741=y 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061# CONFIG_AR7100_USB_GPIO_LED is not set 
    6162# CONFIG_ALCHEMY_GPIO_INDIRECT is not set 
     
    864865CONFIG_AG7240_GE1_IS_CONNECTED=y 
    865866CONFIG_AG7240_GE1_MII=y 
     867# CONFIG_AG7240_GE1_GMII is not set 
     868# CONFIG_AG7240_GE1_RGMII is not set 
     869CONFIG_GE1_EXTERNAL_PHY=y 
    866870CONFIG_AR7240_S26_PHY=y 
    867871# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_wzrg300nh2

    r18313 r18337  
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061CONFIG_AR7100_USB_GPIO_LED=y 
    6162CONFIG_AP_USB_LED_GPIO=17 
     
    942943CONFIG_AR7242_S16_PHY=y 
    943944CONFIG_WZRG450=y 
     945# CONFIG_ATHRS27_PHY is not set 
    944946# CONFIG_AR7242_VIR_PHY is not set 
    945947# CONFIG_AR7242_RTL8309G_PHY is not set 
     
    947949CONFIG_AG7240_GE1_IS_CONNECTED=y 
    948950CONFIG_AG7240_GE1_MII=y 
     951# CONFIG_AG7240_GE1_GMII is not set 
     952# CONFIG_AG7240_GE1_RGMII is not set 
     953CONFIG_GE1_EXTERNAL_PHY=y 
    949954CONFIG_AR7240_S26_PHY=y 
    950955# CONFIG_S26_SWITCH_ONLY_MODE is not set 
  • src/linux/universal/linux-3.2/.config_wzrg450

    r18313 r18337  
    11# 
    22# Automatically generated file; DO NOT EDIT. 
    3 # Linux/mips 3.2.0 Kernel Configuration 
     3# Linux/mips 3.2.2 Kernel Configuration 
    44# 
    55CONFIG_MIPS=y 
     
    5858# CONFIG_WR741 is not set 
    5959# CONFIG_AR7240_EMULATION is not set 
     60# CONFIG_WASP_SUPPORT is not set 
    6061CONFIG_AR7100_USB_GPIO_LED=y 
    6162CONFIG_AP_USB_LED_GPIO=17 
     
    477478# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set 
    478479# CONFIG_NETFILTER_XT_TARGET_LED is not set 
     480CONFIG_NETFILTER_XT_TARGET_IMQ=y 
    479481CONFIG_NETFILTER_XT_TARGET_MARK=y 
    480482CONFIG_NETFILTER_XT_TARGET_NFLOG=y 
     
    611613CONFIG_L2TP_IP=y 
    612614CONFIG_L2TP_ETH=y 
    613 CONFIG_STP=m 
     615CONFIG_STP=y 
    614616CONFIG_BRIDGE=y 
    615617# CONFIG_BRIDGE_IGMP_SNOOPING is not set 
     
    618620# CONFIG_VLAN_8021Q_GVRP is not set 
    619621# CONFIG_DECNET is not set 
    620 CONFIG_LLC=m 
     622CONFIG_LLC=y 
    621623# CONFIG_LLC2 is not set 
    622624# CONFIG_IPX is not set 
     
    798800# CONFIG_MTD_DOC2001PLUS is not set 
    799801# CONFIG_MTD_DOCG3 is not set 
    800 # CONFIG_MTD_AR7100_SPI_FLASH is not set 
    801 # CONFIG_MTD_AR9100_PARALLEL_FLASH is not set 
    802802CONFIG_WZRG450NH=y 
    803803# CONFIG_WZRG300NH2 is not set 
     
    813813# CONFIG_PARPORT is not set 
    814814# CONFIG_BLK_DEV is not set 
    815 # CONFIG_BLK_CPQ_DA is not set 
    816 # CONFIG_BLK_CPQ_CISS_DA is not set 
    817 # CONFIG_BLK_DEV_DAC960 is not set 
    818 # CONFIG_BLK_DEV_UMEM is not set 
    819 # CONFIG_BLK_DEV_COW_COMMON is not set 
    820 # CONFIG_BLK_DEV_LOOP is not set 
    821  
    822 # 
    823 # DRBD disabled because PROC_FS, INET or CONNECTOR not selected 
    824 # 
    825 # CONFIG_BLK_DEV_NBD is not set 
    826 # CONFIG_BLK_DEV_SX8 is not set 
    827 # CONFIG_BLK_DEV_UB is not set 
    828 # CONFIG_BLK_DEV_RAM is not set 
    829 # CONFIG_CDROM_PKTCDVD is not set 
    830 # CONFIG_ATA_OVER_ETH is not set 
    831 # CONFIG_BLK_DEV_HD is not set 
    832 # CONFIG_BLK_DEV_RBD is not set 
    833815# CONFIG_MISC_DEVICES is not set 
    834816CONFIG_HAVE_IDE=y 
     
    898880# CONFIG_NETPOLL is not set 
    899881# CONFIG_NET_POLL_CONTROLLER is not set 
    900 CONFIG_NETFILTER_XT_TARGET_IMQ=y 
    901882CONFIG_IMQ=y 
    902883# CONFIG_IMQ_BEHAVIOR_AA is not set 
     
    942923CONFIG_AR7242_S16_PHY=y 
    943924CONFIG_WZRG450=y 
     925# CONFIG_ATHRS27_PHY is not set 
    944926# CONFIG_AR7242_VIR_PHY is not set 
    945927# CONFIG_AR7242_RTL8309G_PHY is not set 
     
    947929CONFIG_AG7240_GE1_IS_CONNECTED=y 
    948930CONFIG_AG7240_GE1_MII=y 
     931# CONFIG_AG7240_GE1_GMII is not set 
     932# CONFIG_AG7240_GE1_RGMII is not set 
     933CONFIG_GE1_EXTERNAL_PHY=y 
    949934CONFIG_AR7240_S26_PHY=y 
    950935# CONFIG_S26_SWITCH_ONLY_MODE is not set 
     
    955940CONFIG_AG7240_MAC_LOCATION=0xbfff0000 
    956941# CONFIG_AG7240_USE_TRC is not set 
    957 CONFIG_AG7100_LEN_PER_TX_DS=1536 
    958942# CONFIG_AG71XX is not set 
    959943# CONFIG_NET_VENDOR_MARVELL is not set 
     
    12501234# CONFIG_USB_WHCI_HCD is not set 
    12511235# CONFIG_USB_HWA_HCD is not set 
    1252 # CONFIG_USB_DWC_OTG is not set 
    12531236 
    12541237# 
     
    12811264# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set 
    12821265# CONFIG_USB_STORAGE_ENE_UB6250 is not set 
    1283 CONFIG_USB_UAS=y 
     1266CONFIG_USB_UAS=m 
    12841267# CONFIG_USB_LIBUSUAL is not set 
    12851268 
  • src/linux/universal/linux-3.2/arch/mips/Kconfig

    r18294 r18337  
    874874    depends on MACH_AR7240 
    875875 
     876config WASP_SUPPORT 
     877        bool "build system for WASP based board" 
     878        depends on MACH_AR7240 
    876879 
    877880config AR7100_USB_GPIO_LED 
  • src/linux/universal/linux-3.2/arch/mips/ar7240/gpio_driver.c

    r18312 r18337  
    7474        spin_lock_irqsave(&ar71xx_gpio_lock, flags); 
    7575 
     76#ifdef CONFIG_WASP_SUPPORT 
     77        __raw_writel(__raw_readl(base + GPIO_REG_OE) | (1 << offset), 
     78                     base + GPIO_REG_OE); 
     79 
     80#else 
    7681        __raw_writel(__raw_readl(base + GPIO_REG_OE) & ~(1 << offset), 
    7782                     base + GPIO_REG_OE); 
    78  
     83#endif 
    7984        spin_unlock_irqrestore(&ar71xx_gpio_lock, flags); 
    8085 
     
    99104        else 
    100105                __raw_writel(1 << offset, base + GPIO_REG_CLEAR); 
    101  
     106#ifdef CONFIG_WASP_SUPPORT 
     107        __raw_writel(__raw_readl(base + GPIO_REG_OE) & ~(1 << offset), 
     108                     base + GPIO_REG_OE); 
     109 
     110#else 
    102111        __raw_writel(__raw_readl(base + GPIO_REG_OE) | (1 << offset), 
    103112                     base + GPIO_REG_OE); 
    104113 
     114 
     115#endif 
    105116        spin_unlock_irqrestore(&ar71xx_gpio_lock, flags); 
    106117 
  • src/linux/universal/linux-3.2/arch/mips/ar7240/platform.c

    r18294 r18337  
    243243        /* need to set clock appropriately */ 
    244244#ifdef CONFIG_MACH_HORNET 
    245 //      ath_uart_data[0].uartclk = ar7240_ahb_freq; 
    246 //      ar933x_uart_data.uartclk = ar7240_ahb_freq; 
    247245 
    248246        ath_uart_data[0].uartclk = ar71xx_ref_freq; 
  • src/linux/universal/linux-3.2/arch/mips/ar7240/setup.c

    r18309 r18337  
    177177                chip = "9341"; 
    178178                rev = 0; 
     179                break; 
     180        case AR9344_REV_1_1: 
     181                chip = "9344"; 
     182                rev = 1; 
     183                break; 
     184        case AR9342_REV_1_1: 
     185                chip = "9342"; 
     186                rev = 1; 
     187                break; 
     188        case AR9341_REV_1_1: 
     189                chip = "9341"; 
     190                rev = 1; 
    179191                break; 
    180192        default: 
  • src/linux/universal/linux-3.2/arch/mips/include/asm/mach-ar7240/ar7240.h

    r18312 r18337  
    528528#define AR7240_RESET                  AR7240_RESET_BASE+0x1c 
    529529#define AR7240_OBSERVATION_ENABLE     AR7240_RESET_BASE+0x28 
     530 
     531#define ATH_BOOTSTRAP_REG               (AR7240_RESET_BASE + 0xb0) 
     532#define ATH_REF_CLK_40                  (1 << 4) /* 0 - 25MHz   1 - 40 MHz */ 
     533#define ATH_DDR_WIDTH_32                (1 << 3) 
     534 
     535#define AR7240_PCIE_WMAC_INT_STATUS     AR7240_RESET_BASE+0xac 
     536#       define WMAC_MISC_INT    (1 << 0)        /* Indicates there is a WMAC Intr */ 
     537#       define WMAC_TX_INT      (1 << 1)        /* Reason of interrupt */ 
     538#       define WMAC_RXLP_INT    (1 << 2) 
     539#       define WMAC_RXHP_INT    (1 << 3) 
     540#       define PCIE_RC_INT      (1 << 4) 
     541#       define PCIE_RC_INT0     (1 << 5) 
     542#       define PCIE_RC_INT1     (1 << 6) 
     543#       define PCIE_RC_INT2     (1 << 7) 
     544#       define PCIE_RC_INT3     (1 << 8) 
     545 
     546#       define PCI_WMAC_INTR    (PCIE_RC_INT | PCIE_RC_INT0 | PCIE_RC_INT1 | \ 
     547                                 PCIE_RC_INT2 | PCIE_RC_INT3) 
    530548 
    531549 
  • src/linux/universal/linux-3.2/arch/mips/pci/pci-ar71xx.c

    r18171 r18337  
    384384        void __iomem *ddr_base = ar71xx_ddr_base; 
    385385 
     386 
    386387        ar71xx_device_stop(RESET_MODULE_PCI_BUS | RESET_MODULE_PCI_CORE); 
    387388        ar71xx_pci_delay(); 
  • src/linux/universal/linux-3.2/arch/mips/pci/pci-ar724x.c

    r18171 r18337  
    2121#include <asm/mach-ar71xx/ar71xx.h> 
    2222#include <asm/mach-ar71xx/pci.h> 
     23 
     24#include "ar7240.h" 
    2325 
    2426#undef DEBUG 
     
    356358        int ret = -ENOMEM; 
    357359 
     360#ifdef CONFIG_WASP_SUPPORT 
     361        if (is_ar9341()) { 
     362                return 0; 
     363        } 
     364#endif 
     365 
    358366        ar724x_pci_localcfg_base = ioremap_nocache(AR724X_PCI_CRP_BASE, 
    359367                                                   AR724X_PCI_CRP_SIZE); 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/Kconfig

    r18190 r18337  
    279279    depends on AR7242_S16_PHY 
    280280 
     281config ATHRS27_PHY 
     282        bool "Atheros S27 Phy" 
     283 
    281284config AR7242_VIR_PHY 
    282285    bool "AR7242 Vitual Switch" 
     
    302305    bool "MII mode" 
    303306 
    304 endchoice 
     307config AG7240_GE1_GMII 
     308        bool "GMII mode" 
     309 
     310config AG7240_GE1_RGMII 
     311        bool "RGMII mode" 
     312 
     313endchoice 
     314 
     315config GE1_EXTERNAL_PHY 
     316        bool "GE1 is connected to different PHY" 
     317        depends on AG7240_GE1_IS_CONNECTED 
    305318 
    306319choice   
    307320    prompt "PHY or switch used" 
    308     depends on AG7240 
     321    depends on GE1_EXTERNAL_PHY 
    309322 
    310323config AR7240_S26_PHY 
    311324    bool "Atheros S26 Phy" 
     325    depends on GE1_EXTERNAL_PHY 
    312326 
    313327config S26_SWITCH_ONLY_MODE 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240/Makefile

    r18171 r18337  
    55 
    66obj-phy-$(CONFIG_AR7240_S26_PHY)        += ar7240_s26_phy.o 
    7 obj-phy-$(CONFIG_AR7240_S26_VLAN_IGMP)          += python_vlan_igmp.o 
     7obj-phy-$(CONFIG_AR7240_S26_VLAN_IGMP)  += python_vlan_igmp.o 
    88obj-phy-$(CONFIG_AR7242_RGMII_PHY)      += athrf1_phy.o 
    99obj-phy-$(CONFIG_AR7242_S16_PHY)        += athrs16_phy.o 
    10 obj-phy-$(CONFIG_AR7242_RTL8309G_PHY)        += rtl8309g_phy.o 
     10obj-phy-$(CONFIG_ATHRS27_PHY)           += athrs27_phy.o 
     11obj-phy-$(CONFIG_AR7242_RTL8309G_PHY)   += rtl8309g_phy.o 
    1112obj-phy-$(CONFIG_AR7242_VIR_PHY)        += athr_vir_phy.o 
    1213 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240/ag7240.c

    r18295 r18337  
    7070#endif 
    7171void ar7240_s26_intr(void); 
     72void ar7240_s27_intr(void); 
    7273void ag7240_dma_reset(ag7240_mac_t *mac); 
    7374 
     
    8586extern void athrs26_reg_dev(ag7240_mac_t **mac); 
    8687extern void athrs26_enable_linkIntrs(int ethUnit); 
     88extern void athrs27_enable_linkintrs(int ethUnit); 
    8789extern void athrs26_disable_linkIntrs(int ethUnit); 
     90extern void athrs27_disable_linkintrs(int ethUnit); 
     91#ifdef CONFIG_ATHRS27_PHY 
     92extern int athrs27_phy_is_link_alive(int phyUnit); 
     93extern void athrs27_phy_stab_wr(int phy_id, int phy_up, int phy_speed); 
     94extern uint32_t athrs27_reg_read(unsigned int s26_addr); 
     95extern void athrs27_reg_write(unsigned int s26_addr, unsigned int s26_write_data); 
     96void s27_wr_phy(unsigned int phy_addr, unsigned int reg_addr, unsigned int write_data); 
     97#define athrs26_phy_is_link_alive athrs27_phy_is_link_alive 
     98#define athrs26_phy_stab_wr athrs27_phy_stab_wr 
     99#define s26_wr_phy s27_wr_phy 
     100#define s26_rd_phy s27_rd_phy 
     101#define athrs26_reg_write athrs27_reg_write 
     102#define athrs26_reg_read athrs27_reg_read 
     103#else 
    88104extern int athrs26_phy_is_link_alive(int phyUnit); 
    89105extern void athrs26_phy_stab_wr(int phy_id, int phy_up, int phy_speed); 
     
    91107extern void athrs26_reg_write(unsigned int s26_addr, unsigned int s26_write_data); 
    92108extern void s26_wr_phy(unsigned int phy_addr, unsigned int reg_addr, unsigned int write_data); 
    93  
     109#endif 
    94110char *mii_str[2][4] = { 
    95111    {"GMii", "Mii", "RGMii", "RMii"}, 
     
    310326#endif 
    311327     
    312     if (is_ar7240() || is_ar7241() || is_ar933x() || (is_ar7242() && mac->mac_unit == 1)) 
     328    if (is_ar7240() || is_ar7241() || is_ar933x() || is_ar934x() || (is_ar7242() && mac->mac_unit == 1)) 
     329#ifdef CONFIG_ATHRS27_PHY 
     330        athrs27_enable_linkintrs(mac->mac_unit); 
     331#else 
    313332        athrs26_enable_linkIntrs(mac->mac_unit); 
    314  
     333#endif 
    315334    ag7240_rx_start(mac);        
    316335    netif_start_queue(dev); 
     
    466485    if (mac_has_flag(mac,ATHR_S26_HEADER) || mac_has_flag(mac,ATHR_S16_HEADER)) 
    467486        ag7240_reg_rmw_clear(mac, AG7240_MAC_CFG2, AG7240_MAC_CFG2_LEN_CHECK) 
     487 
     488    if (is_ar934x() && is_s27()) { 
     489        if (!is_emu()) { 
     490            printk("WASP ----> S27 PHY MDIO\n"); 
     491            mgmt_cfg_val = 7; 
     492            //athr_swap_phy(); 
     493            ar7240_reg_wr(ATHR_SWITCH_CLK_SPARE,(ar7240_reg_rd(ATHR_SWITCH_CLK_SPARE)|0x40)); 
     494            ag7240_reg_wr(ag7240_macs[1], AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val | (1 << 31)); 
     495            ag7240_reg_wr(ag7240_macs[1], AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val); 
     496 
     497            if (mac_has_flag(mac,ETH_SWONLY_MODE)) { 
     498                ar7240_reg_rmw_set(AG7240_ETH_CFG, AG7240_ETH_CFG_SW_ONLY_MODE);  
     499                ag7240_reg_rmw_set(ag7240_macs[0], AG7240_MAC_CFG1, AG7240_MAC_CFG1_SOFT_RST);; 
     500            } 
     501            //athr_reg_rmw_set(ATHR_GMAC_ETH_CFG, ATHR_GMAC_ETH_CFG_SW_APB_ACCESS); 
     502        } 
     503        else { 
     504           printk("WASP EMULATION ----> S27 PHY\n"); 
     505           mgmt_cfg_val = 7; 
     506           ag7240_reg_wr(ag7240_macs[1], AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val | (1 << 31)); 
     507           ag7240_reg_wr(ag7240_macs[1], AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val); 
     508        } 
     509        return; 
     510 
     511    } 
     512 
     513 
    468514    /* 
    469515    * set the mii if type - NB reg not in the gigE space 
     
    554600                    ag7240_reg_wr(mac, AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val | (1 << 31)); 
    555601                    ag7240_reg_wr(mac, AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val); 
    556                     if(athrs26_mdc_check() == 0)  
    557                         break; 
     602//                    if(athrs26_mdc_check() == 0)  
     603//                        break; 
    558604                } 
    559605                if(check_cnt == 11) 
     
    645691    ag7240_tx_stop(mac); 
    646692    ag7240_int_disable(mac); 
     693#ifdef CONFIG_ATHRS27_PHY 
     694    athrs27_disable_linkintrs(mac->mac_unit); 
     695#else 
    647696    athrs26_disable_linkIntrs(mac->mac_unit); 
     697 
     698#endif 
    648699    /* 
    649700    * put everything into reset. 
     
    15731624ag7240_link_intr(int cpl, void *dev_id) { 
    15741625 
     1626#ifdef CONFIG_ATHRS27_PHY 
     1627        ar7240_s27_intr(); 
     1628#else 
    15751629        ar7240_s26_intr(); 
     1630#endif 
    15761631        return IRQ_HANDLED; 
    15771632} 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240/ag7240.h

    r18171 r18337  
    152152    struct napi_struct mac_napi; 
    153153#endif 
    154     uint16_t                mac_flags; 
     154    uint32_t                mac_flags; 
    155155}ag7240_mac_t; 
    156156 
     
    424424#define AG7240_ETH_CFG_SW_PHY_ADDR_SWAP (1<<8) 
    425425 
     426#define ATHR_SWITCH_CLK_SPARE                0x18050024 
     427 
    426428/* 
    427429 * Everything but TX 
     
    644646#define ATHR_S16_HEADER         0x0020 
    645647#define ETH_PKT_INSPECT         0x0040 
     648#define ATHR_S27_HEADER         0x00010000 
     649#define ATHR_DUAL_PHY           0x00040000 
    646650 
    647651static inline int 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/ag7240/ag7240_phy.h

    r18294 r18337  
    2424 
    2525#include "ar7240_s26_phy.h"  
     26#endif 
    2627#ifdef CONFIG_AR7242_RGMII_PHY 
    2728#include "athrf1_phy.h" 
     
    2930#ifdef CONFIG_AR7242_S16_PHY 
    3031#include "athrs16_phy.h" 
     32#endif 
     33#define is_emu() (0) 
     34 
     35#ifdef CONFIG_ATHRS27_PHY 
     36#include "athrs27_phy.h" 
     37#undef is_s27  
     38#ifdef CONFIG_ATHR_SUPPORT_DUAL_PHY 
     39#define is_s27()(mac->mac_unit == 1) 
     40#else 
     41#define is_s27()(1) 
     42#endif 
     43#else 
     44#define is_s27() (0) 
    3145#endif 
    3246 
     
    4559static inline void athrs_reg_dev(ag7240_mac_t **ag7240_macs) 
    4660{ 
     61#ifdef CONFIG_ATHRS27_PHY 
     62  athrs27_reg_dev(ag7240_macs); 
     63 
     64#else 
    4765#if defined(CONFIG_AR7242_S16_PHY) 
    4866  if (is_ar7242()) 
     
    5068#endif 
    5169  athrs26_reg_dev(ag7240_macs); 
    52  
     70#endif 
    5371  return ; 
    5472 
     
    5977  ag7240_mac_t *mac = (ag7240_mac_t *)netdev_priv(dev); 
    6078  int ret = -1; 
    61  
     79#ifdef CONFIG_ATHRS27_PHY 
     80    ret = 0;//athrs27_ioctl(dev,ifr, cmd); 
     81#else 
    6282  if (is_ar7240() || mac->mac_unit == 1) 
    6383    ret = athrs26_ioctl(dev,ifr, cmd); 
     84#endif 
    6485#ifdef CONFIG_AR7242_S16_PHY 
    6586  else if(is_ar7242()) 
     
    80101  else 
    81102#else 
     103#ifdef CONFIG_ATHRS27_PHY 
     104  if (unit == 0) 
     105    athrs27_reg_init(unit); 
     106#else 
    82107#ifndef CONFIG_AR7242_S16_PHY 
    83108  if (unit == 0) 
     
    87112    athrs16_reg_init(unit); 
    88113#endif 
     114#endif 
    89115  else 
    90116#endif 
     117#ifdef CONFIG_ATHRS27_PHY 
     118    athrs27_reg_init_lan(unit); 
     119#else 
    91120    athrs26_reg_init_lan(unit); 
     121#endif 
    92122}  
    93123 
     
    100130    } else  
    101131#endif  
     132#ifdef CONFIG_ATHRS27_PHY 
     133    athrs27_phy_setup (unit); 
     134#else 
    102135  if (is_ar7241() || is_ar7240() || is_ar933x()) 
    103136    athrs26_phy_setup (unit); 
    104137  else if (is_ar7242() && unit == 1)  
    105138    athrs26_phy_setup (unit); 
     139#endif 
    106140#ifdef CONFIG_AR7242_RGMII_PHY 
    107141  else if (is_ar7242() && unit == 0) 
     
    126160    else 
    127161#endif 
    128  
     162#ifdef CONFIG_ATHRS27_PHY 
     163    *link=athrs27_phy_is_up(unit); 
     164    *fdx=athrs27_phy_is_fdx(unit, phyUnit); 
     165    *speed=athrs27_phy_speed(unit, phyUnit); 
     166#else 
    129167  if (is_ar7240() || is_ar7241() || (is_ar7242() && unit == 1) || is_ar933x()) { 
    130168    *link=ag7240_phy_is_up(unit); 
     
    132170    *speed=ag7240_phy_speed(unit, phyUnit); 
    133171  }  
     172#endif 
    134173#ifdef CONFIG_AR7242_RGMII_PHY 
    135174  else if(is_ar7242() && unit == 0){ 
     
    162201  return -1; 
    163202} 
    164 #else 
    165 #error unknown PHY type PHY not configured in config.h 
    166 #endif 
    167  
    168 #endif 
    169  
     203 
     204#endif 
     205 
  • src/linux/universal/linux-3.2/init/main.c

    r18294 r18337  
    574574         * this. But we do want output early, in case something goes wrong. 
    575575         */ 
    576          printk(KERN_EMERG "console initcall\n"); 
    577576        console_init(); 
    578          printk(KERN_EMERG "console initcall done\n"); 
    579577        if (panic_later) 
    580578                panic(panic_later, panic_param); 
Note: See TracChangeset for help on using the changeset viewer.