Changeset 18190


Ignore:
Timestamp:
01/16/12 00:21:14 (16 months ago)
Author:
BrainSlayer
Message:

xscale port

Location:
src/linux/universal/linux-3.2
Files:
645 added
4 deleted
53 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.2/arch/arm/boot/compressed/head-xscale.S

    r18171 r18190  
    3333                mcr     p15, 0, r0, c1, c0, 0 
    3434 
     35#ifdef CONFIG_NOP8670 
     36                mov     r7, #MACH_TYPE_IXDP425 
     37#endif 
     38#ifdef CONFIG_MACH_WG302V2 
     39               mov     r7, #(MACH_TYPE_WG302V2 & 0xff) 
     40               orr     r7, r7, #(MACH_TYPE_WG302V2 & 0xff00) 
     41#endif 
     42#ifdef CONFIG_MACH_WG302V1 
     43               mov     r7, #(MACH_TYPE_WG302V1 & 0xff) 
     44               orr     r7, r7, #(MACH_TYPE_WG302V1 & 0xff00) 
     45#endif 
     46 
    3547#ifdef CONFIG_ARCH_IXP2000 
    3648                mov     r1, #-1 
  • src/linux/universal/linux-3.2/arch/arm/include/asm/gpio.h

    r18171 r18190  
    33 
    44/* not all ARM platforms necessarily support this API ... */ 
     5#define gpio_get_value  __gpio_get_value 
     6#define gpio_set_value  __gpio_set_value 
     7#define gpio_cansleep   __gpio_cansleep 
    58#include <mach/gpio.h> 
    69 
     
    1013 
    1114/* The trivial gpiolib dispatchers */ 
    12 #define gpio_get_value  __gpio_get_value 
    13 #define gpio_set_value  __gpio_set_value 
    14 #define gpio_cansleep   __gpio_cansleep 
    1515#endif 
    1616 
  • src/linux/universal/linux-3.2/arch/arm/kernel/setup.c

    r18171 r18190  
    10141014        seq_printf(m, "Processor\t: %s rev %d (%s)\n", 
    10151015                   cpu_name, read_cpuid_id() & 15, elf_platform); 
     1016#ifdef CONFIG_MACH_GW2388 
    10161017        seq_printf(m, "CPUClock\t: %d\n",get_cns3xxx_cpu_clock()); 
     1018#endif 
    10171019 
    10181020#if defined(CONFIG_SMP) 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/Kconfig

    r18171 r18190  
    2020config MACH_AVILA 
    2121        bool "Avila" 
     22        select PCI 
     23        help 
     24          Say 'Y' here if you want your kernel to support the Gateworks 
     25          Avila Network Platform. For more information on this platform, 
     26          see <file:Documentation/arm/IXP4xx>. 
     27 
     28config MACH_CAMBRIA 
     29        bool "Cambria" 
    2230        select PCI 
    2331        help 
     
    3442          Gateworks Avila Network Platform). 
    3543 
     44config ARCH_LOFT 
     45        bool "Loft" 
     46        depends on ARCH_AVILA 
     47        help 
     48          Say 'Y' here if you want your kernel to support the Giant 
     49          Shoulder Inc Loft board (a minor variation on the standard 
     50          Gateworks Avila Network Platform).   
     51 
     52 
    3653config ARCH_ADI_COYOTE 
    3754        bool "Coyote" 
     
    4259          information on this platform, see <file:Documentation/arm/IXP4xx>. 
    4360 
     61config ARCH_ADI_COYOTE_WRT300N 
     62        bool "Coyote (WRT300N)" 
     63        select PCI 
     64        depends on ARCH_ADI_COYOTE 
     65        help 
     66          Say 'Y' here if you want your kernel to support the ADI  
     67          Engineering Coyote Gateway Reference Platform. For more 
     68          information on this platform, see <file:Documentation/arm/IXP4xx>. 
     69 
     70 
    4471config MACH_GATEWAY7001 
    4572        bool "Gateway 7001" 
     
    5077          see http://openwrt.org 
    5178 
     79config MACH_WG302V1 
     80        bool "Netgear WG302 v1 / WAG302 v1" 
     81        select PCI 
     82        help 
     83          Say 'Y' here if you want your kernel to support Netgear's 
     84          WG302 v1 or WAG302 v1 Access Points. For more information 
     85          on this platform, see http://openwrt.org 
     86 
     87 
    5288config MACH_WG302V2 
    5389        bool "Netgear WG302 v2 / WAG302 v2" 
     
    5894          on this platform, see http://openwrt.org 
    5995 
     96config MACH_WRT300NV2 
     97        bool "Linksys WRT300N v2" 
     98        select PCI 
     99        help 
     100          Say 'Y' here if you want your kernel to support Linksys'  
     101          WRT300N v2 router. For more information on this 
     102          platform, see http://openwrt.org 
     103 
     104config MACH_USR8200 
     105        bool "USRobotics USR8200" 
     106        select PCI 
     107        help 
     108          Say 'Y' here if you want your kernel to support the USRobotics 
     109          USR8200 router board. For more information on this platform, see 
     110          http://openwrt.org 
     111 
     112 
     113config MACH_COMPEX 
     114        bool "Compex WP18 / NP18A" 
     115        select PCI 
     116        help 
     117          Say 'Y' here if you want your kernel to support Compex'  
     118          WP18 or NP18A boards. For more information on this 
     119          platform, see http://openwrt.org 
     120 
     121config MACH_WG302V2 
     122        bool "Netgear WG302 v2 / WAG302 v2" 
     123        select PCI 
     124        help 
     125          Say 'Y' here if you want your kernel to support Netgear's  
     126          WG302 v2 or WAG302 v2 Access Points. For more information 
     127          on this platform, see http://openwrt.org 
     128 
     129config MACH_GATEWAY7001 
     130        bool "Gateway 7001" 
     131        select PCI 
     132        help 
     133          Say 'Y' here if you want your kernel to support Gateway's  
     134          7001 Access Point. For more information on this platform, 
     135          see http://openwrt.org 
     136 
     137config MACH_PRONGHORNMETRO 
     138        bool "Pronghorn Metro" 
     139        select PCI 
     140        help 
     141          Say 'Y' here if you want your kernel to support the ADI  
     142          Engineering Pronghorn Metro Platform. For more 
     143          information on this platform, see <file:Documentation/arm/IXP4xx>. 
     144 
    60145config ARCH_IXDP425 
    61146        bool "IXDP425" 
     
    65150          For more information on this platform, see <file:Documentation/arm/IXP4xx>. 
    66151 
     152config TONZE 
     153        bool "TONZE IXP425" 
     154        depends on ARCH_IXDP425 
     155 
     156config NOP8670 
     157        bool "NOP8670 (quirks)" 
     158        depends on ARCH_IXDP425 
     159 
    67160config MACH_IXDPG425 
    68161        bool "IXDPG425" 
     
    78171          IXDP465 Development Platform (Also known as BMP). 
    79172          For more information on this platform, see <file:Documentation/arm/IXP4xx>. 
    80  
    81 config MACH_GORAMO_MLR 
    82         bool "GORAMO Multi Link Router" 
    83         help 
    84           Say 'Y' here if you want your kernel to support GORAMO 
    85           MultiLink router. 
    86173 
    87174config MACH_KIXRP435 
     
    132219        default y 
    133220 
    134 config MACH_FSG 
    135         bool 
    136         prompt "Freecom FSG-3" 
    137         select PCI 
    138         help 
    139           Say 'Y' here if you want your kernel to support Freecom's 
    140           FSG-3 device. For more information on this platform, 
    141           see http://www.nslu2-linux.org/wiki/FSG3/HomePage 
    142  
    143 config MACH_ARCOM_VULCAN 
    144         bool 
    145         prompt "Arcom/Eurotech Vulcan" 
    146         select PCI 
    147         help 
    148           Say 'Y' here if you want your kernel to support Arcom's 
    149           Vulcan board. 
    150  
    151221# 
    152222# Certain registers and IRQs are only enabled if supporting IXP465 CPUs 
     
    159229config CPU_IXP43X 
    160230        bool 
    161         depends on MACH_KIXRP435 
     231        depends on MACH_KIXRP435 || MACH_CAMBRIA 
    162232        default y 
    163233 
     
    180250                20 Pin ARM/Xscale JTAG interface on J2 
    181251 
    182 config MACH_DEVIXP 
    183         bool "Omicron DEVIXP" 
    184         help 
    185           Say 'Y' here if you want your kernel to support the DEVIXP 
    186           board from OMICRON electronics GmbH. 
    187  
    188 config MACH_MICCPT 
    189         bool "Omicron MICCPT" 
    190         select PCI 
    191         help 
    192           Say 'Y' here if you want your kernel to support the MICCPT 
    193           board from OMICRON electronics GmbH. 
    194  
    195 config MACH_MIC256 
    196         bool "Omicron MIC256" 
    197         help 
    198           Say 'Y' here if you want your kernel to support the MIC256 
    199           board from OMICRON electronics GmbH. 
     252config MACH_MI424WR 
     253        bool "Actiontec MI424WR" 
     254        depends on ARCH_IXP4XX 
     255        select PCI 
     256        help 
     257                Add support for the Actiontec MI424-WR. 
     258 
     259 
    200260 
    201261comment "IXP4xx Options" 
     262 
     263config DMABOUNCE 
     264        bool 
     265        default y 
     266        depends on PCI 
     267 
     268config DMABOUNCE_DEBUG 
     269        bool "Enable DMABounce debuging" 
     270        default n 
     271        depends on DMABOUNCE 
    202272 
    203273config IXP4XX_INDIRECT_PCI 
     
    207277          IXP4xx provides two methods of accessing PCI memory space: 
    208278 
    209           1) A direct mapped window from 0x48000000 to 0x4BFFFFFF (64MB). 
     279          1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB). 
    210280             To access PCI via this space, we simply ioremap() the BAR 
    211281             into the kernel and we can use the standard read[bwl]/write[bwl] 
    212282             macros. This is the preferred method due to speed but it 
    213              limits the system to just 64MB of PCI memory. This can be 
     283             limits the system to just 64MB of PCI memory. This can be  
    214284             problematic if using video cards and other memory-heavy devices. 
    215  
    216           2) If > 64MB of memory space is required, the IXP4xx can be 
    217              configured to use indirect registers to access the whole PCI 
    218              memory space. This currently allows for up to 1 GB (0x10000000 
    219              to 0x4FFFFFFF) of memory on the bus. The disadvantage of this 
    220              is that every PCI access requires three local register accesses 
    221              plus a spinlock, but in some cases the performance hit is 
    222              acceptable. In addition, you cannot mmap() PCI devices in this 
    223              case due to the indirect nature of the PCI window. 
     285           
     286          2) If > 64MB of memory space is required, the IXP4xx can be  
     287             configured to use indirect registers to access PCI This allows  
     288             for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus.  
     289             The disadvantage of this is that every PCI access requires  
     290             three local register accesses plus a spinlock, but in some  
     291             cases the performance hit is acceptable. In addition, you cannot  
     292             mmap() PCI devices in this case due to the indirect nature 
     293             of the PCI window. 
    224294 
    225295          By default, the direct method is used. Choose this option if you 
     
    227297          what you need, leave this option unselected. 
    228298 
    229 config IXP4XX_QMGR 
    230         tristate "IXP4xx Queue Manager support" 
    231         help 
    232           This driver supports IXP4xx built-in hardware queue manager 
    233           and is automatically selected by Ethernet and HSS drivers. 
    234  
    235 config IXP4XX_NPE 
    236         tristate "IXP4xx Network Processor Engine support" 
    237         select HOTPLUG 
    238         select FW_LOADER 
    239         help 
    240           This driver supports IXP4xx built-in network coprocessors 
    241           and is automatically selected by Ethernet and HSS drivers. 
     299config IXP4XX_LEGACY_DMABOUNCE 
     300        bool "legacy PCI DMA bounce support" 
     301        depends on PCI 
     302        default n 
     303        select DMABOUNCE 
     304        help 
     305          The IXP4xx is limited to a 64MB window for PCI DMA, which 
     306          requires that PCI accesses above 64MB are bounced via buffers 
     307          below 64MB. Furthermore the IXP4xx has an erratum where PCI 
     308          read prefetches just below the 64MB limit can trigger lockups. 
     309 
     310          The kernel has traditionally handled these two issue by using 
     311          ARM specific DMA bounce support code for all accesses >= 64MB. 
     312          That code causes problems of its own, so it is desirable to 
     313          disable it. As the kernel now has a workaround for the PCI read 
     314          prefetch erratum, it no longer requires the ARM bounce code. 
     315 
     316          Enabling this option makes IXP4xx continue to use the problematic 
     317          ARM DMA bounce code. Disabling this option makes IXP4xx use the 
     318          kernel's generic bounce code. 
     319 
     320          Say 'N'. 
     321 
     322config IXP4XX_ZONE_DMA 
     323        bool "Support > 64MB RAM" 
     324        depends on !IXP4XX_LEGACY_DMABOUNCE 
     325        default y 
     326        select ZONE_DMA 
     327        help 
     328          The IXP4xx is limited to a 64MB window for PCI DMA, which 
     329          requires that PCI accesses above 64MB are bounced via buffers 
     330          below 64MB. 
     331 
     332          Disabling this option allows you to omit the support code for 
     333          DMA-able memory allocations and DMA bouncing, but the kernel 
     334          will then not work properly if more than 64MB of RAM is present. 
     335 
     336          Say 'Y' unless your platform is limited to <= 64MB of RAM. 
     337 
     338 
     339 
     340config IXP400_LIB 
     341        tristate 'Build IXP400 Access Library'  
     342        depends on ARCH_IXP4XX 
     343        default m 
     344        help 
     345          IXP400 Access Library: 
     346 
     347          If you select M here, the Intel IXP400 Access Library will be 
     348          compiled as part of the build. 
     349         
     350          In order for the library to build correctly you must set up some 
     351          environment variables before building the kernel. See the README 
     352          files included in the IXP400 software distribution for details. 
     353         
     354          Note that this library is Intel proprietary code and must be 
     355          obtained from Intel Corp. See the README files included in the 
     356          IXP400 software distribution for details. 
     357         
     358          The library can be compiled only as a module, as linking it 
     359          statically into the kernel would violate the GPL. The library module 
     360          will be called ixp400.o. The demo codelets included with the library 
     361          will be built in seperate modules. See the documentation included in 
     362          the IXP400 software distribution for details. 
     363         
     364          Note that the access library build is not compatible with the 
     365          CONFIG_MODVERSIONS option (Controlled by the "set version information 
     366          on all symbols" option in the "loadable module support" section). 
     367         
     368          Select M if you have the IXP400 source code and wish to include it 
     369          in your build. 
     370 
    242371 
    243372endmenu 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/Makefile

    r18171 r18190  
    88obj-pci-$(CONFIG_ARCH_IXDP4XX)          += ixdp425-pci.o 
    99obj-pci-$(CONFIG_MACH_AVILA)            += avila-pci.o 
     10obj-pci-$(CONFIG_MACH_CAMBRIA)          += cambria-pci.o 
    1011obj-pci-$(CONFIG_MACH_IXDPG425)         += ixdpg425-pci.o 
    1112obj-pci-$(CONFIG_ARCH_ADI_COYOTE)       += coyote-pci.o 
    1213obj-pci-$(CONFIG_MACH_GTWX5715)         += gtwx5715-pci.o 
    13 obj-pci-$(CONFIG_MACH_MICCPT)           += miccpt-pci.o 
    1414obj-pci-$(CONFIG_MACH_NSLU2)            += nslu2-pci.o 
    1515obj-pci-$(CONFIG_MACH_NAS100D)          += nas100d-pci.o 
     16obj-pci-$(CONFIG_MACH_COMPEX)           += ixdp425-pci.o 
     17obj-pci-$(CONFIG_MACH_WRT300NV2)        += wrt300nv2-pci.o 
     18obj-pci-$(CONFIG_MACH_WG302V1)          += wg302v1-pci.o 
     19obj-pci-$(CONFIG_MACH_WG302V2)          += wg302v2-pci.o 
     20obj-pci-$(CONFIG_MACH_GATEWAY7001)      += gateway7001-pci.o 
     21obj-pci-$(CONFIG_MACH_PRONGHORNMETRO)   += pronghornmetro-pci.o 
    1622obj-pci-$(CONFIG_MACH_DSMG600)          += dsmg600-pci.o 
    1723obj-pci-$(CONFIG_MACH_GATEWAY7001)      += gateway7001-pci.o 
    1824obj-pci-$(CONFIG_MACH_WG302V2)          += wg302v2-pci.o 
    19 obj-pci-$(CONFIG_MACH_FSG)              += fsg-pci.o 
    20 obj-pci-$(CONFIG_MACH_ARCOM_VULCAN)     += vulcan-pci.o 
     25obj-pci-$(CONFIG_MACH_MI424WR)          += mi424wr-pci.o 
     26obj-pci-$(CONFIG_MACH_USR8200)          += usr8200-pci.o 
    2127 
    2228obj-y   += common.o 
     
    2430obj-$(CONFIG_ARCH_IXDP4XX)      += ixdp425-setup.o 
    2531obj-$(CONFIG_MACH_AVILA)        += avila-setup.o 
     32obj-$(CONFIG_MACH_CAMBRIA)      += cambria-setup.o 
    2633obj-$(CONFIG_MACH_IXDPG425)     += coyote-setup.o 
    2734obj-$(CONFIG_ARCH_ADI_COYOTE)   += coyote-setup.o 
    2835obj-$(CONFIG_MACH_GTWX5715)     += gtwx5715-setup.o 
    29 obj-$(CONFIG_MACH_DEVIXP)       += omixp-setup.o 
    30 obj-$(CONFIG_MACH_MICCPT)       += omixp-setup.o 
    31 obj-$(CONFIG_MACH_MIC256)       += omixp-setup.o 
    32 obj-$(CONFIG_MACH_NSLU2)        += nslu2-setup.o 
    33 obj-$(CONFIG_MACH_NAS100D)      += nas100d-setup.o 
    34 obj-$(CONFIG_MACH_DSMG600)      += dsmg600-setup.o 
     36obj-$(CONFIG_MACH_NSLU2)        += nslu2-setup.o nslu2-power.o 
     37obj-$(CONFIG_MACH_NAS100D)      += nas100d-setup.o nas100d-power.o 
     38obj-$(CONFIG_MACH_COMPEX)       += compex-setup.o 
     39obj-$(CONFIG_MACH_WRT300NV2)    += wrt300nv2-setup.o 
    3540obj-$(CONFIG_MACH_GATEWAY7001)  += gateway7001-setup.o 
     41obj-$(CONFIG_MACH_PRONGHORNMETRO)       += pronghornmetro-setup.o 
     42obj-$(CONFIG_MACH_DSMG600)      += dsmg600-setup.o dsmg600-power.o 
     43obj-$(CONFIG_MACH_GATEWAY7001)  += gateway7001-setup.o 
     44obj-$(CONFIG_MACH_WG302V1)      += wg302v1-setup.o 
    3645obj-$(CONFIG_MACH_WG302V2)      += wg302v2-setup.o 
    37 obj-$(CONFIG_MACH_FSG)          += fsg-setup.o 
    38 obj-$(CONFIG_MACH_GORAMO_MLR)   += goramo_mlr.o 
    39 obj-$(CONFIG_MACH_ARCOM_VULCAN) += vulcan-setup.o 
     46obj-$(CONFIG_MACH_MI424WR)      += mi424wr-setup.o 
     47obj-$(CONFIG_MACH_USR8200)      += usr8200-setup.o 
    4048 
    4149obj-$(CONFIG_PCI)               += $(obj-pci-$(CONFIG_PCI)) common-pci.o 
    42 obj-$(CONFIG_IXP4XX_QMGR)       += ixp4xx_qmgr.o 
    43 obj-$(CONFIG_IXP4XX_NPE)        += ixp4xx_npe.o 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/avila-pci.c

    r18171 r18190  
    2323#include <linux/irq.h> 
    2424#include <linux/delay.h> 
     25 
    2526#include <asm/mach/pci.h> 
    2627#include <asm/irq.h> 
     
    2829#include <asm/mach-types.h> 
    2930 
    30 #define AVILA_MAX_DEV   4 
    31 #define LOFT_MAX_DEV    6 
    32 #define IRQ_LINES       4 
    33  
    34 /* PCI controller GPIO to IRQ pin mappings */ 
    35 #define INTA            11 
    36 #define INTB            10 
    37 #define INTC            9 
    38 #define INTD            8 
    39  
    4031void __init avila_pci_preinit(void) 
    4132{ 
    42         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
    43         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
    44         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW); 
    45         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW); 
     33        set_irq_type(IRQ_AVILA_PCI_INTA, IRQT_LOW); 
     34        set_irq_type(IRQ_AVILA_PCI_INTB, IRQT_LOW); 
     35        set_irq_type(IRQ_AVILA_PCI_INTC, IRQT_LOW); 
     36        set_irq_type(IRQ_AVILA_PCI_INTD, IRQT_LOW); 
     37 
    4638        ixp4xx_pci_preinit(); 
    4739} 
    4840 
    49 static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     41static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    5042{ 
    51         static int pci_irq_table[IRQ_LINES] = { 
    52                 IXP4XX_GPIO_IRQ(INTA), 
    53                 IXP4XX_GPIO_IRQ(INTB), 
    54                 IXP4XX_GPIO_IRQ(INTC), 
    55                 IXP4XX_GPIO_IRQ(INTD) 
     43        static int pci_irq_table[AVILA_PCI_IRQ_LINES] = { 
     44                IRQ_AVILA_PCI_INTA, 
     45                IRQ_AVILA_PCI_INTB, 
     46                IRQ_AVILA_PCI_INTC, 
     47                IRQ_AVILA_PCI_INTD 
    5648        }; 
    5749 
     50        int irq = -1; 
     51 
    5852        if (slot >= 1 && 
    59             slot <= (machine_is_loft() ? LOFT_MAX_DEV : AVILA_MAX_DEV) && 
    60             pin >= 1 && pin <= IRQ_LINES) 
    61                 return pci_irq_table[(slot + pin - 2) % 4]; 
     53        slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) && 
     54                pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) { 
     55                irq = pci_irq_table[(slot + pin - 2) % 4]; 
     56        } 
    6257 
    63         return -1; 
     58        return irq; 
    6459} 
    6560 
     
    7570int __init avila_pci_init(void) 
    7671{ 
    77         if (machine_is_avila() || machine_is_loft()) 
     72        if (machine_is_avila() || machine_is_wavesat_avila() || machine_is_loft()) 
    7873                pci_common_init(&avila_pci); 
    7974        return 0; 
     
    8176 
    8277subsys_initcall(avila_pci_init); 
     78 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/avila-setup.c

    r18171 r18190  
    1818#include <linux/tty.h> 
    1919#include <linux/serial_8250.h> 
    20 #include <linux/i2c-gpio.h> 
     20#include <linux/slab.h> 
     21#include <linux/i2c.h> 
     22#include <linux/i2c/at24.h> 
     23#include <linux/delay.h> 
     24#include <linux/spi/spi_gpio_old.h> 
     25 
    2126#include <asm/types.h> 
    2227#include <asm/setup.h> 
     
    2833#include <asm/mach/flash.h> 
    2934 
    30 #define AVILA_SDA_PIN   7 
    31 #define AVILA_SCL_PIN   6 
    32  
    3335static struct flash_platform_data avila_flash_data = { 
    3436        .map_name       = "cfi_probe", 
     
    5052}; 
    5153 
    52 static struct i2c_gpio_platform_data avila_i2c_gpio_data = { 
     54#define IXDP425_KSSPI_SELECT    4 
     55#define IXDP425_KSSPI_TXD       3 
     56#define IXDP425_KSSPI_CLOCK     2 
     57#define IXDP425_KSSPI_RXD       0 
     58 
     59#define IXDP425_GW2355_KSSPI_SELECT     3 
     60#define IXDP425_GW2355_KSSPI_TXD        2 
     61#define IXDP425_GW2355_KSSPI_CLOCK      1 
     62#define IXDP425_GW2355_KSSPI_RXD        0 
     63 
     64 
     65 
     66static int avila_spi_boardinfo_setup(struct spi_board_info *bi, 
     67                struct spi_master *master, void *data) 
     68{ 
     69 
     70        strlcpy(bi->modalias, "spi-ks8995", sizeof(bi->modalias)); 
     71 
     72        bi->max_speed_hz = 5000000 /* Hz */; 
     73        bi->bus_num = master->bus_num; 
     74        bi->mode = SPI_MODE_0; 
     75 
     76        return 0; 
     77} 
     78 
     79static struct spi_gpio_platform_data avila_spi_bus_data = { 
     80        .pin_cs                 = IXDP425_KSSPI_SELECT, 
     81        .pin_clk                = IXDP425_KSSPI_CLOCK, 
     82        .pin_miso               = IXDP425_KSSPI_RXD, 
     83        .pin_mosi               = IXDP425_KSSPI_TXD, 
     84        .cs_activelow           = 1, 
     85        .no_spi_delay           = 1, 
     86        .boardinfo_setup        = avila_spi_boardinfo_setup, 
     87}; 
     88 
     89static struct spi_gpio_platform_data avilagw2355_spi_bus_data = { 
     90        .pin_cs                 = IXDP425_GW2355_KSSPI_SELECT, 
     91        .pin_clk                = IXDP425_GW2355_KSSPI_CLOCK, 
     92        .pin_miso               = IXDP425_GW2355_KSSPI_RXD, 
     93        .pin_mosi               = IXDP425_GW2355_KSSPI_TXD, 
     94        .cs_activelow           = 1, 
     95        .no_spi_delay           = 1, 
     96        .boardinfo_setup        = avila_spi_boardinfo_setup, 
     97}; 
     98 
     99static struct platform_device avila_spi_bus = { 
     100        .name           = "spi-ixp4xx", 
     101        .id             = 0, 
     102        .dev            = { 
     103                .platform_data = &avila_spi_bus_data, 
     104        }, 
     105}; 
     106 
     107static struct platform_device avilagw2355_spi_bus = { 
     108        .name           = "spi-ixp4xx-gw2355", 
     109        .id             = 0, 
     110        .dev            = { 
     111                .platform_data = &avilagw2355_spi_bus_data, 
     112        }, 
     113}; 
     114 
     115 
     116 
     117 
     118static struct ixp4xx_i2c_pins avila_i2c_gpio_pins = { 
    53119        .sda_pin        = AVILA_SDA_PIN, 
    54120        .scl_pin        = AVILA_SCL_PIN, 
    55121}; 
    56122 
    57 static struct platform_device avila_i2c_gpio = { 
    58         .name           = "i2c-gpio", 
     123static struct platform_device avila_i2c_controller = { 
     124        .name           = "IXP4XX-I2C", 
    59125        .id             = 0, 
    60         .dev     = { 
    61                 .platform_data  = &avila_i2c_gpio_data, 
    62         }, 
     126        .dev            = { 
     127                .platform_data = &avila_i2c_gpio_pins, 
     128        }, 
     129        .num_resources  = 0 
    63130}; 
    64131 
     
    134201}; 
    135202 
     203 
    136204static struct platform_device *avila_devices[] __initdata = { 
    137         &avila_i2c_gpio, 
     205        &avila_i2c_controller, 
    138206        &avila_flash, 
    139         &avila_uart 
     207        &avila_uart, 
     208        &avila_spi_bus, 
     209        &avilagw2355_spi_bus, 
     210}; 
     211 
     212 
     213 
     214 
     215 
     216#define GPIO_EEPROM_SCL 6 
     217#define GPIO_EEPROM_SDA 7 
     218#define CLK_LO()      gpio_line_set(GPIO_EEPROM_SCL, IXP4XX_GPIO_LOW); 
     219#define CLK_HI()      gpio_line_set(GPIO_EEPROM_SCL, IXP4XX_GPIO_HIGH); 
     220#define DATA_LO()     gpio_line_set(GPIO_EEPROM_SDA, IXP4XX_GPIO_LOW); 
     221#define DATA_HI()     gpio_line_set(GPIO_EEPROM_SDA, IXP4XX_GPIO_HIGH); 
     222#define hal_delay_us(a) udelay(a) 
     223#define HAL_GPIO_OUTPUT_DISABLE(gpio) gpio_line_config(gpio, IXP4XX_GPIO_IN); 
     224#define HAL_GPIO_OUTPUT_ENABLE(gpio) gpio_line_config(gpio, IXP4XX_GPIO_OUT); 
     225#define HAL_GPIO_OUTPUT_SET(gpio) gpio_line_set(gpio, IXP4XX_GPIO_HIGH); 
     226typedef unsigned char cyg_uint8; 
     227 
     228// returns non-zero if ACK bit seen 
     229static int __init 
     230eeprom_start(cyg_uint8 b) 
     231{ 
     232    int i; 
     233 
     234    CLK_HI(); 
     235    hal_delay_us(5); 
     236    DATA_LO(); 
     237    hal_delay_us(5); 
     238    CLK_LO(); 
     239 
     240    for (i = 7; i >= 0; i--) { 
     241        if (b & (1 << i)) 
     242        { 
     243            DATA_HI(); 
     244        } 
     245        else{ 
     246         
     247            DATA_LO(); 
     248        } 
     249        hal_delay_us(5); 
     250        CLK_HI(); 
     251        hal_delay_us(5); 
     252        CLK_LO(); 
     253    } 
     254    hal_delay_us(5); 
     255    HAL_GPIO_OUTPUT_DISABLE(GPIO_EEPROM_SDA); 
     256    CLK_HI(); 
     257    hal_delay_us(5); 
     258    i = (*IXP4XX_GPIO_GPINR & (1 << GPIO_EEPROM_SDA)) ? 0 : 1; 
     259    CLK_LO(); 
     260    hal_delay_us(5); 
     261    HAL_GPIO_OUTPUT_ENABLE(GPIO_EEPROM_SDA); 
     262 
     263    return i; 
     264} 
     265 
     266 
     267static void __init 
     268eeprom_stop(void) 
     269{ 
     270    hal_delay_us(5); 
     271    DATA_LO(); 
     272    hal_delay_us(5); 
     273    CLK_HI(); 
     274    hal_delay_us(5); 
     275    DATA_HI(); 
     276    hal_delay_us(5); 
     277    CLK_LO(); 
     278    hal_delay_us(5); 
     279    CLK_HI(); 
     280    hal_delay_us(5); 
     281} 
     282 
     283 
     284static int __init 
     285eeprom_putb(cyg_uint8 b) 
     286{ 
     287    int i; 
     288 
     289    for (i = 7; i >= 0; i--) { 
     290        if (b & (1 << i)) { 
     291            DATA_HI(); 
     292        } 
     293        else{ 
     294            DATA_LO(); 
     295        } 
     296        CLK_HI(); 
     297        hal_delay_us(5); 
     298        CLK_LO(); 
     299        hal_delay_us(5); 
     300    } 
     301    HAL_GPIO_OUTPUT_DISABLE(GPIO_EEPROM_SDA); 
     302    CLK_HI(); 
     303    hal_delay_us(5); 
     304    i = (*IXP4XX_GPIO_GPINR & (1 << GPIO_EEPROM_SDA)) ? 0 : 1; 
     305    CLK_LO(); 
     306    hal_delay_us(5); 
     307 
     308    DATA_HI(); 
     309    HAL_GPIO_OUTPUT_ENABLE(GPIO_EEPROM_SDA); 
     310 
     311    return i; 
     312} 
     313 
     314 
     315static cyg_uint8 __init 
     316eeprom_getb(int more) 
     317{ 
     318    int i; 
     319    cyg_uint8 b = 0; 
     320 
     321    HAL_GPIO_OUTPUT_DISABLE(GPIO_EEPROM_SDA); 
     322    hal_delay_us(5); 
     323 
     324    for (i = 7; i >= 0; i--) { 
     325        b <<= 1; 
     326        if (*IXP4XX_GPIO_GPINR & (1 << GPIO_EEPROM_SDA)) 
     327            b |= 1; 
     328        CLK_HI(); 
     329        hal_delay_us(5); 
     330        CLK_LO(); 
     331        hal_delay_us(5); 
     332    } 
     333    HAL_GPIO_OUTPUT_ENABLE(GPIO_EEPROM_SDA); 
     334    if (more) 
     335    { 
     336        DATA_LO(); 
     337    } 
     338    else{ 
     339        DATA_HI(); 
     340    } 
     341    hal_delay_us(5); 
     342    CLK_HI(); 
     343    hal_delay_us(5); 
     344    CLK_LO(); 
     345    hal_delay_us(5); 
     346 
     347    return b; 
     348} 
     349 
     350 
     351int 
     352eeprom_read(int addr, cyg_uint8 *buf, int nbytes) 
     353{ 
     354    cyg_uint8 start_byte; 
     355    int i; 
     356 
     357    start_byte = 0xA0;  // write 
     358 
     359    if (addr & (1 << 8)) 
     360        start_byte |= 2; 
     361 
     362     
     363    for (i = 0; i < 10; i++) 
     364        if (eeprom_start(start_byte)) 
     365            break; 
     366 
     367    if (i == 10) { 
     368        printk(KERN_WARNING "eeprom_read: Can't get write start ACK\n"); 
     369        return 0; 
     370    } 
     371 
     372    if (!eeprom_putb(addr & 0xff)) { 
     373        printk(KERN_WARNING "eeprom_read: Can't get address ACK\n"); 
     374        return 0; 
     375    } 
     376 
     377    start_byte |= 1; // READ command 
     378    if (!eeprom_start(start_byte)) { 
     379        printk(KERN_WARNING "eeprom_read: Can't get read start ACK\n"); 
     380        return 0; 
     381    } 
     382 
     383    for (i = 0; i < (nbytes - 1); i++) 
     384        *buf++ = eeprom_getb(1); 
     385 
     386    *buf++ = eeprom_getb(0); 
     387    hal_delay_us(5); 
     388    eeprom_stop(); 
     389 
     390    return nbytes; 
     391} 
     392 
     393 
     394 
     395 
     396 
     397static struct at24_platform_data avila_eeprom_info = { 
     398        .byte_len       = 1024, 
     399        .page_size      = 16, 
     400        .flags          = AT24_FLAG_READONLY, 
     401//      .setup          = at24_setup, 
     402}; 
     403 
     404static struct i2c_board_info __initdata avila_i2c_board_info[] = { 
     405        { 
     406                I2C_BOARD_INFO("ds1672", 0x68), 
     407        }, 
     408        { 
     409                I2C_BOARD_INFO("ad7418", 0x28), 
     410        }, 
     411        { 
     412                I2C_BOARD_INFO("24c08", 0x51), 
     413                .platform_data  = &avila_eeprom_info 
     414        }, 
    140415}; 
    141416 
     
    143418{ 
    144419        ixp4xx_sys_init(); 
    145  
     420        char model[16]; 
     421        memset(model,0,16); 
     422 
     423    HAL_GPIO_OUTPUT_SET(GPIO_EEPROM_SCL); 
     424    HAL_GPIO_OUTPUT_ENABLE(GPIO_EEPROM_SCL); 
     425 
     426    HAL_GPIO_OUTPUT_SET(GPIO_EEPROM_SDA); 
     427    HAL_GPIO_OUTPUT_ENABLE(GPIO_EEPROM_SDA); 
     428 
     429 
     430        eeprom_read(0x120, model, 16); 
     431        printk(KERN_INFO "Gateworks Model %s detected!\n",model); 
    146432        avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); 
    147         avila_flash_resource.end = 
    148                 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 
    149  
     433        if (!strncmp(model,"GW2369",6) || !strncmp(model,"GW2373",6)) 
     434        { 
     435        /* required for 32 mb flash access. do not enable cf driver here, this will collide with each other */ 
     436        avila_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1; 
     437        }else 
     438        { 
     439        avila_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_16M - 1;  
     440        } 
    150441        platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices)); 
    151  
     442                i2c_register_board_info(0, avila_i2c_board_info, 
     443                                ARRAY_SIZE(avila_i2c_board_info)); 
    152444        avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); 
    153445        avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); 
     
    165457MACHINE_START(AVILA, "Gateworks Avila Network Platform") 
    166458        /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ 
     459        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     460        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    167461        .map_io         = ixp4xx_map_io, 
    168462        .init_irq       = ixp4xx_init_irq, 
    169463        .timer          = &ixp4xx_timer, 
    170         .atag_offset    = 0x100, 
     464        .boot_params    = 0x0100, 
    171465        .init_machine   = avila_init, 
    172 #if defined(CONFIG_PCI) 
    173         .dma_zone_size  = SZ_64M, 
    174 #endif 
    175466MACHINE_END 
     467 
     468MACHINE_START(WAVESAT_AVILA, "Gateworks/Wavesat Avila Network Platform") 
     469        /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ 
     470        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     471        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
     472        .map_io         = ixp4xx_map_io, 
     473        .init_irq       = ixp4xx_init_irq, 
     474        .timer          = &ixp4xx_timer, 
     475        .boot_params    = 0x0100, 
     476        .init_machine   = avila_init, 
     477MACHINE_END 
     478 
    176479 
    177480 /* 
    178481  * Loft is functionally equivalent to Avila except that it has a 
    179482  * different number for the maximum PCI devices.  The MACHINE 
    180   * structure below is identical to Avila except for the comment. 
     483 * structure below is identical to Avila except for the comment. 
    181484  */ 
    182485#ifdef CONFIG_MACH_LOFT 
    183486MACHINE_START(LOFT, "Giant Shoulder Inc Loft board") 
    184487        /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */ 
     488        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     489        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    185490        .map_io         = ixp4xx_map_io, 
    186491        .init_irq       = ixp4xx_init_irq, 
    187492        .timer          = &ixp4xx_timer, 
    188         .atag_offset    = 0x100, 
     493        .boot_params    = 0x0100, 
    189494        .init_machine   = avila_init, 
    190 #if defined(CONFIG_PCI) 
    191         .dma_zone_size  = SZ_64M, 
    192 #endif 
    193495MACHINE_END 
    194496#endif 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/common-pci.c

    r18171 r18190  
    351351        pcibios_min_mem = 0x10000000; /* 1 GB of indirect PCI MMIO space */ 
    352352#else 
    353         pcibios_min_mem = 0x48000000; /* 64 MB of PCI MMIO space */ 
     353        pcibios_min_mem = (cpu_is_ixp43x() ? 0x40000000 : 0x48000000); /* 64 MB of PCI MMIO space */ 
    354354#endif 
    355355        /* 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/coyote-pci.c

    r18171 r18190  
    1919#include <linux/init.h> 
    2020#include <linux/irq.h> 
     21 
    2122#include <asm/mach-types.h> 
    2223#include <mach/hardware.h> 
    2324#include <asm/irq.h> 
     25 
    2426#include <asm/mach/pci.h> 
    25  
    26 #define SLOT0_DEVID     14 
    27 #define SLOT1_DEVID     15 
    28  
    29 /* PCI controller GPIO to IRQ pin mappings */ 
    30 #define SLOT0_INTA      6 
    31 #define SLOT1_INTA      11 
    3227 
    3328void __init coyote_pci_preinit(void) 
    3429{ 
    35         irq_set_irq_type(IXP4XX_GPIO_IRQ(SLOT0_INTA), IRQ_TYPE_LEVEL_LOW); 
    36         irq_set_irq_type(IXP4XX_GPIO_IRQ(SLOT1_INTA), IRQ_TYPE_LEVEL_LOW); 
     30        set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQT_LOW); 
     31        set_irq_type(IRQ_COYOTE_PCI_SLOT1, IRQT_LOW); 
     32 
    3733        ixp4xx_pci_preinit(); 
    3834} 
    3935 
    40 static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     36static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    4137{ 
    42         if (slot == SLOT0_DEVID) 
    43                 return IXP4XX_GPIO_IRQ(SLOT0_INTA); 
    44         else if (slot == SLOT1_DEVID) 
    45                 return IXP4XX_GPIO_IRQ(SLOT1_INTA); 
     38        if (slot == COYOTE_PCI_SLOT0_DEVID) 
     39                return IRQ_COYOTE_PCI_SLOT0; 
     40        else if (slot == COYOTE_PCI_SLOT1_DEVID) 
     41                return IRQ_COYOTE_PCI_SLOT1; 
    4642        else return -1; 
    4743} 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/coyote-setup.c

    r18171 r18190  
    1515#include <linux/tty.h> 
    1616#include <linux/serial_8250.h> 
     17#include <linux/slab.h> 
    1718 
    1819#include <asm/types.h> 
     
    2425#include <asm/mach/arch.h> 
    2526#include <asm/mach/flash.h> 
    26  
    27 #define COYOTE_IDE_BASE_PHYS    IXP4XX_EXP_BUS_BASE(3) 
    28 #define COYOTE_IDE_BASE_VIRT    0xFFFE1000 
    29 #define COYOTE_IDE_REGION_SIZE  0x1000 
    30  
    31 #define COYOTE_IDE_DATA_PORT    0xFFFE10E0 
    32 #define COYOTE_IDE_CTRL_PORT    0xFFFE10FC 
    33 #define COYOTE_IDE_ERROR_PORT   0xFFFE10E2 
    34 #define IRQ_COYOTE_IDE          IRQ_IXP4XX_GPIO5 
    3527 
    3628static struct flash_platform_data coyote_flash_data = { 
     
    110102MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote") 
    111103        /* Maintainer: MontaVista Software, Inc. */ 
     104        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     105        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    112106        .map_io         = ixp4xx_map_io, 
    113107        .init_irq       = ixp4xx_init_irq, 
    114108        .timer          = &ixp4xx_timer, 
    115         .atag_offset    = 0x100, 
     109        .boot_params    = 0x0100, 
    116110        .init_machine   = coyote_init, 
    117 #if defined(CONFIG_PCI) 
    118         .dma_zone_size  = SZ_64M, 
    119 #endif 
    120111MACHINE_END 
    121112#endif 
     
    128119MACHINE_START(IXDPG425, "Intel IXDPG425") 
    129120        /* Maintainer: MontaVista Software, Inc. */ 
     121        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     122        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    130123        .map_io         = ixp4xx_map_io, 
    131124        .init_irq       = ixp4xx_init_irq, 
    132125        .timer          = &ixp4xx_timer, 
    133         .atag_offset    = 0x100, 
     126        .boot_params    = 0x0100, 
    134127        .init_machine   = coyote_init, 
    135128MACHINE_END 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/dsmg600-setup.c

    r18171 r18190  
    22 * DSM-G600 board-setup 
    33 * 
    4  * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au> 
    54 * Copyright (C) 2006 Tower Technologies 
     5 * Author: Alessandro Zummo <a.zummo@towertech.it> 
    66 * 
    7  * based on ixdp425-setup.c: 
     7 * based ixdp425-setup.c: 
    88 *      Copyright (C) 2003-2004 MontaVista Software, Inc. 
    9  * based on nslu2-power.c: 
    10  *      Copyright (C) 2005 Tower Technologies 
    11  * based on nslu2-io.c: 
    12  *      Copyright (C) 2004 Karen Spearel 
    139 * 
    1410 * Author: Alessandro Zummo <a.zummo@towertech.it> 
    15  * Author: Michael Westerhof <mwester@dls.net> 
    16  * Author: Rod Whitby <rod@whitby.id.au> 
    1711 * Maintainers: http://www.nslu2-linux.org/ 
    1812 */ 
    19 #include <linux/gpio.h> 
    20 #include <linux/irq.h> 
    21 #include <linux/jiffies.h> 
    22 #include <linux/timer.h> 
     13 
     14#include <linux/kernel.h> 
    2315#include <linux/serial.h> 
    2416#include <linux/serial_8250.h> 
    25 #include <linux/leds.h> 
    26 #include <linux/reboot.h> 
    27 #include <linux/i2c.h> 
    28 #include <linux/i2c-gpio.h> 
    2917 
    3018#include <asm/mach-types.h> 
     
    3220#include <asm/mach/flash.h> 
    3321#include <asm/mach/time.h> 
    34  
    35 #define DSMG600_SDA_PIN         5 
    36 #define DSMG600_SCL_PIN         4 
    37  
    38 /* DSM-G600 Timer Setting */ 
    39 #define DSMG600_FREQ            66000000 
    40  
    41 /* Buttons */ 
    42 #define DSMG600_PB_GPIO         15      /* power button */ 
    43 #define DSMG600_RB_GPIO         3       /* reset button */ 
    44  
    45 /* Power control */ 
    46 #define DSMG600_PO_GPIO         2       /* power off */ 
    47  
    48 /* LEDs */ 
    49 #define DSMG600_LED_PWR_GPIO    0 
    50 #define DSMG600_LED_WLAN_GPIO   14 
    5122 
    5223static struct flash_platform_data dsmg600_flash_data = { 
     
    6738}; 
    6839 
    69 static struct i2c_gpio_platform_data dsmg600_i2c_gpio_data = { 
     40static struct ixp4xx_i2c_pins dsmg600_i2c_gpio_pins = { 
    7041        .sda_pin                = DSMG600_SDA_PIN, 
    7142        .scl_pin                = DSMG600_SCL_PIN, 
    7243}; 
    7344 
    74 static struct platform_device dsmg600_i2c_gpio = { 
    75         .name                   = "i2c-gpio", 
     45static struct platform_device dsmg600_i2c_controller = { 
     46        .name                   = "IXP4XX-I2C", 
    7647        .id                     = 0, 
    77         .dev     = { 
    78                 .platform_data  = &dsmg600_i2c_gpio_data, 
     48        .dev.platform_data      = &dsmg600_i2c_gpio_pins, 
     49}; 
     50 
     51#ifdef CONFIG_LEDS_CLASS 
     52static struct resource dsmg600_led_resources[] = { 
     53        { 
     54                .name           = "power", 
     55                .start          = DSMG600_LED_PWR_GPIO, 
     56                .end            = DSMG600_LED_PWR_GPIO, 
     57                .flags          = IXP4XX_GPIO_HIGH, 
     58        }, 
     59        { 
     60                .name           = "wlan", 
     61                .start          = DSMG600_LED_WLAN_GPIO, 
     62                .end            = DSMG600_LED_WLAN_GPIO, 
     63                .flags          = IXP4XX_GPIO_LOW, 
    7964        }, 
    8065}; 
    8166 
    82 static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = { 
    83         { 
    84                 I2C_BOARD_INFO("pcf8563", 0x51), 
    85         }, 
     67static struct platform_device dsmg600_leds = { 
     68        .name                   = "IXP4XX-GPIO-LED", 
     69        .id                     = -1, 
     70        .num_resources          = ARRAY_SIZE(dsmg600_led_resources), 
     71        .resource               = dsmg600_led_resources, 
    8672}; 
    87  
    88 static struct gpio_led dsmg600_led_pins[] = { 
    89         { 
    90                 .name           = "dsmg600:green:power", 
    91                 .gpio           = DSMG600_LED_PWR_GPIO, 
    92         }, 
    93         { 
    94                 .name           = "dsmg600:green:wlan", 
    95                 .gpio           = DSMG600_LED_WLAN_GPIO, 
    96                 .active_low     = true, 
    97         }, 
    98 }; 
    99  
    100 static struct gpio_led_platform_data dsmg600_led_data = { 
    101         .num_leds               = ARRAY_SIZE(dsmg600_led_pins), 
    102         .leds                   = dsmg600_led_pins, 
    103 }; 
    104  
    105 static struct platform_device dsmg600_leds = { 
    106         .name                   = "leds-gpio", 
    107         .id                     = -1, 
    108         .dev.platform_data      = &dsmg600_led_data, 
    109 }; 
     73#endif 
    11074 
    11175static struct resource dsmg600_uart_resources[] = { 
     
    153117 
    154118static struct platform_device *dsmg600_devices[] __initdata = { 
    155         &dsmg600_i2c_gpio, 
     119        &dsmg600_i2c_controller, 
    156120        &dsmg600_flash, 
    157         &dsmg600_leds, 
    158121}; 
    159122 
     
    165128        /* poweroff */ 
    166129        gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH); 
    167 } 
    168  
    169 /* This is used to make sure the power-button pusher is serious.  The button 
    170  * must be held until the value of this counter reaches zero. 
    171  */ 
    172 static int power_button_countdown; 
    173  
    174 /* Must hold the button down for at least this many counts to be processed */ 
    175 #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ 
    176  
    177 static void dsmg600_power_handler(unsigned long data); 
    178 static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler, 0, 0); 
    179  
    180 static void dsmg600_power_handler(unsigned long data) 
    181 { 
    182         /* This routine is called twice per second to check the 
    183          * state of the power button. 
    184          */ 
    185  
    186         if (gpio_get_value(DSMG600_PB_GPIO)) { 
    187  
    188                 /* IO Pin is 1 (button pushed) */ 
    189                 if (power_button_countdown > 0) 
    190                         power_button_countdown--; 
    191  
    192         } else { 
    193  
    194                 /* Done on button release, to allow for auto-power-on mods. */ 
    195                 if (power_button_countdown == 0) { 
    196                         /* Signal init to do the ctrlaltdel action, 
    197                          * this will bypass init if it hasn't started 
    198                          * and do a kernel_restart. 
    199                          */ 
    200                         ctrl_alt_del(); 
    201  
    202                         /* Change the state of the power LED to "blink" */ 
    203                         gpio_line_set(DSMG600_LED_PWR_GPIO, IXP4XX_GPIO_LOW); 
    204                 } else { 
    205                         power_button_countdown = PBUTTON_HOLDDOWN_COUNT; 
    206                 } 
    207         } 
    208  
    209         mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500)); 
    210 } 
    211  
    212 static irqreturn_t dsmg600_reset_handler(int irq, void *dev_id) 
    213 { 
    214         /* This is the paper-clip reset, it shuts the machine down directly. */ 
    215         machine_power_off(); 
    216  
    217         return IRQ_HANDLED; 
    218130} 
    219131 
     
    242154                IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 
    243155 
    244         i2c_register_board_info(0, dsmg600_i2c_board_info, 
    245                                 ARRAY_SIZE(dsmg600_i2c_board_info)); 
     156        pm_power_off = dsmg600_power_off; 
    246157 
    247158        /* The UART is required on the DSM-G600 (Redboot cannot use the 
     
    253164        platform_add_devices(dsmg600_devices, ARRAY_SIZE(dsmg600_devices)); 
    254165 
    255         pm_power_off = dsmg600_power_off; 
    256  
    257         if (request_irq(gpio_to_irq(DSMG600_RB_GPIO), &dsmg600_reset_handler, 
    258                 IRQF_DISABLED | IRQF_TRIGGER_LOW, 
    259                 "DSM-G600 reset button", NULL) < 0) { 
    260  
    261                 printk(KERN_DEBUG "Reset Button IRQ %d not available\n", 
    262                         gpio_to_irq(DSMG600_RB_GPIO)); 
    263         } 
    264  
    265         /* The power button on the D-Link DSM-G600 is on GPIO 15, but 
    266          * it cannot handle interrupts on that GPIO line.  So we'll 
    267          * have to poll it with a kernel timer. 
    268          */ 
    269  
    270         /* Make sure that the power button GPIO is set up as an input */ 
    271         gpio_line_config(DSMG600_PB_GPIO, IXP4XX_GPIO_IN); 
    272  
    273         /* Set the initial value for the power button IRQ handler */ 
    274         power_button_countdown = PBUTTON_HOLDDOWN_COUNT; 
    275  
    276         mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500)); 
     166#ifdef CONFIG_LEDS_CLASS 
     167        /* We don't care whether or not this works. */ 
     168        (void)platform_device_register(&dsmg600_leds); 
     169#endif 
    277170} 
    278171 
    279172MACHINE_START(DSMG600, "D-Link DSM-G600 RevA") 
    280173        /* Maintainer: www.nslu2-linux.org */ 
    281         .atag_offset    = 0x100, 
     174        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     175        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
     176        .boot_params    = 0x00000100, 
    282177        .map_io         = ixp4xx_map_io, 
    283178        .init_irq       = ixp4xx_init_irq, 
    284179        .timer          = &dsmg600_timer, 
    285180        .init_machine   = dsmg600_init, 
    286 #if defined(CONFIG_PCI) 
    287         .dma_zone_size  = SZ_64M, 
    288 #endif 
    289181MACHINE_END 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/fsg-pci.c

    r18171 r18190  
    3333void __init fsg_pci_preinit(void) 
    3434{ 
    35         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
    36         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
    37         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW); 
     35        set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
     36        set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
     37        set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW); 
    3838        ixp4xx_pci_preinit(); 
    3939} 
    4040 
    41 static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     41static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    4242{ 
    4343        static int pci_irq_table[IRQ_LINES] = { 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/fsg-setup.c

    r18171 r18190  
    1515 * 
    1616 */ 
    17 #include <linux/gpio.h> 
     17 
    1818#include <linux/if_ether.h> 
    1919#include <linux/irq.h> 
     
    2828#include <asm/mach/arch.h> 
    2929#include <asm/mach/flash.h> 
     30#include <asm/gpio.h> 
    3031 
    3132#define FSG_SDA_PIN             12 
     
    270271MACHINE_START(FSG, "Freecom FSG-3") 
    271272        /* Maintainer: www.nslu2-linux.org */ 
     273        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     274        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    272275        .map_io         = ixp4xx_map_io, 
    273276        .init_irq       = ixp4xx_init_irq, 
    274277        .timer          = &ixp4xx_timer, 
    275         .atag_offset    = 0x100, 
     278        .boot_params    = 0x0100, 
    276279        .init_machine   = fsg_init, 
    277 #if defined(CONFIG_PCI) 
    278         .dma_zone_size  = SZ_64M, 
    279 #endif 
    280280MACHINE_END 
    281281 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/gateway7001-pci.c

    r18171 r18190  
    3030void __init gateway7001_pci_preinit(void) 
    3131{ 
    32         irq_set_irq_type(IRQ_IXP4XX_GPIO10, IRQ_TYPE_LEVEL_LOW); 
    33         irq_set_irq_type(IRQ_IXP4XX_GPIO11, IRQ_TYPE_LEVEL_LOW); 
     32        set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW); 
     33        set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW); 
    3434 
    3535        ixp4xx_pci_preinit(); 
    3636} 
    3737 
    38 static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot, 
    39         u8 pin) 
     38static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    4039{ 
    4140        if (slot == 1) 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/gateway7001-setup.c

    r18171 r18190  
    1818#include <linux/tty.h> 
    1919#include <linux/serial_8250.h> 
     20#include <linux/slab.h> 
    2021 
    2122#include <asm/types.h> 
     
    9798MACHINE_START(GATEWAY7001, "Gateway 7001 AP") 
    9899        /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ 
     100        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     101        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    99102        .map_io         = ixp4xx_map_io, 
    100103        .init_irq       = ixp4xx_init_irq, 
    101104        .timer          = &ixp4xx_timer, 
    102         .atag_offset    = 0x100, 
     105        .boot_params    = 0x0100, 
    103106        .init_machine   = gateway7001_init, 
    104 #if defined(CONFIG_PCI) 
    105         .dma_zone_size  = SZ_64M, 
    106 #endif 
    107107MACHINE_END 
    108108#endif 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/goramo_mlr.c

    r18171 r18190  
    421421        gpio_line_config(GPIO_HSS0_DCD_N, IXP4XX_GPIO_IN); 
    422422        gpio_line_config(GPIO_HSS1_DCD_N, IXP4XX_GPIO_IN); 
    423         irq_set_irq_type(IXP4XX_GPIO_IRQ(GPIO_HSS0_DCD_N), IRQ_TYPE_EDGE_BOTH); 
    424         irq_set_irq_type(IXP4XX_GPIO_IRQ(GPIO_HSS1_DCD_N), IRQ_TYPE_EDGE_BOTH); 
     423        set_irq_type(IXP4XX_GPIO_IRQ(GPIO_HSS0_DCD_N), IRQ_TYPE_EDGE_BOTH); 
     424        set_irq_type(IXP4XX_GPIO_IRQ(GPIO_HSS1_DCD_N), IRQ_TYPE_EDGE_BOTH); 
    425425 
    426426        set_control(CONTROL_HSS0_DTR_N, 1); 
     
    442442static void __init gmlr_pci_preinit(void) 
    443443{ 
    444         irq_set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA), IRQ_TYPE_LEVEL_LOW); 
    445         irq_set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHB), IRQ_TYPE_LEVEL_LOW); 
    446         irq_set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_NEC), IRQ_TYPE_LEVEL_LOW); 
    447         irq_set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_MPCI), IRQ_TYPE_LEVEL_LOW); 
     444        set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA), IRQ_TYPE_LEVEL_LOW); 
     445        set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHB), IRQ_TYPE_LEVEL_LOW); 
     446        set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_NEC), IRQ_TYPE_LEVEL_LOW); 
     447        set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_MPCI), IRQ_TYPE_LEVEL_LOW); 
    448448        ixp4xx_pci_preinit(); 
    449449} 
     
    463463} 
    464464 
    465 static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     465static int __init gmlr_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    466466{ 
    467467        switch(slot) { 
     
    497497MACHINE_START(GORAMO_MLR, "MultiLink") 
    498498        /* Maintainer: Krzysztof Halasa */ 
     499        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     500        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
    499501        .map_io         = ixp4xx_map_io, 
    500502        .init_irq       = ixp4xx_init_irq, 
    501503        .timer          = &ixp4xx_timer, 
    502         .atag_offset    = 0x100, 
     504        .boot_params    = 0x0100, 
    503505        .init_machine   = gmlr_init, 
    504 #if defined(CONFIG_PCI) 
    505         .dma_zone_size  = SZ_64M, 
    506 #endif 
    507506MACHINE_END 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/gtwx5715-pci.c

    r18171 r18190  
    2727#include <linux/delay.h> 
    2828#include <linux/irq.h> 
     29 
    2930#include <asm/mach-types.h> 
    3031#include <mach/hardware.h> 
     32#include <asm/arch/gtwx5715.h> 
    3133#include <asm/mach/pci.h> 
    3234 
    33 #define SLOT0_DEVID     0 
    34 #define SLOT1_DEVID     1 
    35 #define INTA            10 /* slot 1 has INTA and INTB crossed */ 
    36 #define INTB            11 
    37  
    3835/* 
     36 * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h 
    3937 * Slot 0 isn't actually populated with a card connector but 
    4038 * we initialize it anyway in case a future version has the 
     
    4442void __init gtwx5715_pci_preinit(void) 
    4543{ 
    46         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
    47         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
     44        set_irq_type(GTWX5715_PCI_SLOT0_INTA_IRQ, IRQT_LOW); 
     45        set_irq_type(GTWX5715_PCI_SLOT0_INTB_IRQ, IRQT_LOW); 
     46        set_irq_type(GTWX5715_PCI_SLOT1_INTA_IRQ, IRQT_LOW); 
     47        set_irq_type(GTWX5715_PCI_SLOT1_INTB_IRQ, IRQT_LOW); 
     48 
    4849        ixp4xx_pci_preinit(); 
    4950} 
    5051 
    5152 
    52 static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     53static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    5354{ 
    54         int rc = -1; 
     55        int rc; 
     56        static int gtwx5715_irqmap 
     57                        [GTWX5715_PCI_SLOT_COUNT] 
     58                        [GTWX5715_PCI_INT_PIN_COUNT] = { 
     59        {GTWX5715_PCI_SLOT0_INTA_IRQ, GTWX5715_PCI_SLOT0_INTB_IRQ}, 
     60        {GTWX5715_PCI_SLOT1_INTA_IRQ, GTWX5715_PCI_SLOT1_INTB_IRQ}, 
     61}; 
    5562 
    56         if ((slot == SLOT0_DEVID && pin == 1) || 
    57             (slot == SLOT1_DEVID && pin == 2)) 
    58                 rc = IXP4XX_GPIO_IRQ(INTA); 
    59         else if ((slot == SLOT0_DEVID && pin == 2) || 
    60                  (slot == SLOT1_DEVID && pin == 1)) 
    61                 rc = IXP4XX_GPIO_IRQ(INTB); 
     63        if (slot >= GTWX5715_PCI_SLOT_COUNT || 
     64                        pin >= GTWX5715_PCI_INT_PIN_COUNT) rc = -1; 
     65        else 
     66                rc = gtwx5715_irqmap[slot][pin-1]; 
    6267 
    63         printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n", 
    64                __func__, slot, pin, rc); 
    65         return rc; 
     68        printk("%s: Mapped slot %d pin %d to IRQ %d\n", __FUNCTION__,slot, pin, rc); 
     69        return(rc); 
    6670} 
    6771 
     
    7882{ 
    7983        if (machine_is_gtwx5715()) 
     84        { 
    8085                pci_common_init(&gtwx5715_pci); 
     86        } 
    8187 
    8288        return 0; 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/gtwx5715-setup.c

    r18171 r18190  
    2828#include <linux/tty.h> 
    2929#include <linux/serial_8250.h> 
     30#include <linux/slab.h> 
     31 
    3032#include <asm/types.h> 
    3133#include <asm/setup.h> 
     
    3638#include <asm/mach/arch.h> 
    3739#include <asm/mach/flash.h> 
    38  
    39 /* GPIO 5,6,7 and 12 are hard wired to the Kendin KS8995M Switch 
    40    and operate as an SPI type interface.  The details of the interface 
    41    are available on Kendin/Micrel's web site. */ 
    42  
    43 #define GTWX5715_KSSPI_SELECT   5 
    44 #define GTWX5715_KSSPI_TXD      6 
    45 #define GTWX5715_KSSPI_CLOCK    7 
    46 #define GTWX5715_KSSPI_RXD      12 
    47  
    48 /* The "reset" button is wired to GPIO 3. 
    49    The GPIO is brought "low" when the button is pushed. */ 
    50  
    51 #define GTWX5715_BUTTON_GPIO    3 
    52  
    53 /* Board Label      Front Label 
    54    LED1             Power 
    55    LED2             Wireless-G 
    56    LED3             not populated but could be 
    57    LED4             Internet 
    58    LED5 - LED8      Controlled by KS8995M Switch 
    59    LED9             DMZ */ 
    60  
    61 #define GTWX5715_LED1_GPIO      2 
    62 #define GTWX5715_LED2_GPIO      9 
    63 #define GTWX5715_LED3_GPIO      8 
    64 #define GTWX5715_LED4_GPIO      1 
    65 #define GTWX5715_LED9_GPIO      4 
     40#include <asm/arch/gtwx5715.h> 
    6641 
    6742/* 
     
    165140MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)") 
    166141        /* Maintainer: George Joseph */ 
     142        .phys_io        = IXP4XX_UART2_BASE_PHYS, 
     143        .io_pg_offst    = ((IXP4XX_UART2_BASE_VIRT) >> 18) & 0xfffc, 
    167144        .map_io         = ixp4xx_map_io, 
    168145        .init_irq       = ixp4xx_init_irq, 
    169146        .timer          = &ixp4xx_timer, 
    170         .atag_offset    = 0x100, 
     147        .boot_params    = 0x0100, 
    171148        .init_machine   = gtwx5715_init, 
    172 #if defined(CONFIG_PCI) 
    173         .dma_zone_size  = SZ_64M, 
    174 #endif 
    175149MACHINE_END 
    176150 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/include/mach/hardware.h

    r18171 r18190  
    3636#include "platform.h" 
    3737 
     38/* Platform specific details */ 
     39#include "ixdp425.h" 
     40#include "avila.h" 
     41#include "cambria.h" 
     42#include "coyote.h" 
     43#include "pronghornmetro.h" 
     44#include "prpmc1100.h" 
     45#include "nslu2.h" 
     46#include "nas100d.h" 
     47#include "dsmg600.h" 
     48#include "ap71.h" 
     49 
    3850#endif  /* _ASM_ARCH_HARDWARE_H */ 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/include/mach/irqs.h

    r18171 r18190  
    7373#define XSCALE_PMU_IRQ          (IRQ_IXP4XX_XSCALE_PMU) 
    7474 
     75/* 
     76 * IXDP425 board IRQs 
     77 */ 
     78#define IRQ_IXDP425_PCI_INTA    IRQ_IXP4XX_GPIO11 
     79#define IRQ_IXDP425_PCI_INTB    IRQ_IXP4XX_GPIO10 
     80#define IRQ_IXDP425_PCI_INTC    IRQ_IXP4XX_GPIO9 
     81#define IRQ_IXDP425_PCI_INTD    IRQ_IXP4XX_GPIO8 
     82 
     83/* 
     84 * Gateworks Avila board IRQs 
     85 */ 
     86#define IRQ_AVILA_PCI_INTA      IRQ_IXP4XX_GPIO11 
     87#define IRQ_AVILA_PCI_INTB      IRQ_IXP4XX_GPIO10 
     88#define IRQ_AVILA_PCI_INTC      IRQ_IXP4XX_GPIO9 
     89#define IRQ_AVILA_PCI_INTD      IRQ_IXP4XX_GPIO8 
     90 
     91/* 
     92 * Gateworks Cambria board IRQs 
     93 */ 
     94#define IRQ_CAMBRIA_PCI_INTA    IRQ_IXP4XX_GPIO11 
     95#define IRQ_CAMBRIA_PCI_INTB    IRQ_IXP4XX_GPIO10 
     96#define IRQ_CAMBRIA_PCI_INTC    IRQ_IXP4XX_GPIO9 
     97#define IRQ_CAMBRIA_PCI_INTD    IRQ_IXP4XX_GPIO8 
     98 
     99 
     100/* 
     101 * PrPMC1100 Board IRQs 
     102 */ 
     103#define IRQ_PRPMC1100_PCI_INTA  IRQ_IXP4XX_GPIO11 
     104#define IRQ_PRPMC1100_PCI_INTB  IRQ_IXP4XX_GPIO10 
     105#define IRQ_PRPMC1100_PCI_INTC  IRQ_IXP4XX_GPIO9 
     106#define IRQ_PRPMC1100_PCI_INTD  IRQ_IXP4XX_GPIO8 
     107 
     108/* 
     109 * ADI Coyote Board IRQs 
     110 */ 
     111 
     112#ifdef CONFIG_MTD_IXP4XXWRT 
     113 
     114#define IRQ_COYOTE_PCI_SLOT0    IRQ_IXP4XX_GPIO8 //John_Wei for pumori 
     115#define IRQ_COYOTE_PCI_SLOT1    IRQ_IXP4XX_GPIO11 
     116#define IRQ_COYOTE_IDE          IRQ_IXP4XX_GPIO5 
     117#else 
     118#define IRQ_COYOTE_PCI_SLOT0    IRQ_IXP4XX_GPIO6 
     119#define IRQ_COYOTE_PCI_SLOT1    IRQ_IXP4XX_GPIO11 
     120#define IRQ_COYOTE_IDE          IRQ_IXP4XX_GPIO5 
    75121#endif 
     122 
     123 
     124/* 
     125 * ADI Pronghorn Metro Board IRQs 
     126 */ 
     127#if defined(CONFIG_MACH_PRONGHORNMETRO) 
     128#define IRQ_PCI_SLOT0    IRQ_IXP4XX_GPIO4 
     129#define IRQ_PCI_SLOT1    IRQ_IXP4XX_GPIO6 
     130#define IRQ_PCI_SLOT2    IRQ_IXP4XX_GPIO11 
     131#define IRQ_PCI_SLOT3    IRQ_IXP4XX_GPIO1 
     132#define IRQ_IDE                  IRQ_IXP4XX_GPIO0 
     133#elif defined (CONFIG_MACH_PRONGHORN) 
     134#define IRQ_PCI_SLOT0    IRQ_IXP4XX_GPIO11 
     135#define IRQ_PCI_SLOT1    IRQ_IXP4XX_GPIO6 
     136#define IRQ_IDE                  IRQ_IXP4XX_GPIO0 
     137#endif 
     138 
     139/* 
     140 * NSLU2 board IRQs 
     141 */ 
     142#define        IRQ_NSLU2_PCI_INTA      IRQ_IXP4XX_GPIO11 
     143#define        IRQ_NSLU2_PCI_INTB      IRQ_IXP4XX_GPIO10 
     144#define        IRQ_NSLU2_PCI_INTC      IRQ_IXP4XX_GPIO9 
     145 
     146/* 
     147 * NAS100D board IRQs 
     148 */ 
     149#define        IRQ_NAS100D_PCI_INTA    IRQ_IXP4XX_GPIO11 
     150#define        IRQ_NAS100D_PCI_INTB    IRQ_IXP4XX_GPIO10 
     151#define        IRQ_NAS100D_PCI_INTC    IRQ_IXP4XX_GPIO9 
     152#define        IRQ_NAS100D_PCI_INTD    IRQ_IXP4XX_GPIO8 
     153#define        IRQ_NAS100D_PCI_INTE    IRQ_IXP4XX_GPIO7 
     154 
     155/* 
     156 * D-Link DSM-G600 RevA board IRQs 
     157 */ 
     158#define        IRQ_DSMG600_PCI_INTA    IRQ_IXP4XX_GPIO11 
     159#define        IRQ_DSMG600_PCI_INTB    IRQ_IXP4XX_GPIO10 
     160#define        IRQ_DSMG600_PCI_INTC    IRQ_IXP4XX_GPIO9 
     161#define        IRQ_DSMG600_PCI_INTD    IRQ_IXP4XX_GPIO8 
     162#define        IRQ_DSMG600_PCI_INTE    IRQ_IXP4XX_GPIO7 
     163#define        IRQ_DSMG600_PCI_INTF    IRQ_IXP4XX_GPIO6 
     164 
     165#endif 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h

    r18171 r18190  
    211211#define IXP4XX_GPIO_GPCLKR_OFFSET       0x18 
    212212#define IXP4XX_GPIO_GPDBSELR_OFFSET     0x1C 
     213 
     214#define GPIO_GET_BIT  0x0000001 
     215#define GPIO_SET_BIT  0x0000002 
     216#define GPIO_GET_CONFIG 0x0000003 
     217#define GPIO_SET_CONFIG 0x0000004 
    213218 
    214219/*  
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/include/mach/platform.h

    r18171 r18190  
    7575#define IXP4XX_PERIPHERAL_BUS_CLOCK     (66) /* 66Mhzi APB BUS   */  
    7676#define IXP4XX_UART_XTAL                14745600 
     77 
     78 
     79/* 
     80 * The IXP4xx chips do not have an I2C unit, so GPIO lines are just 
     81 * used to  
     82 * Used as platform_data to provide GPIO pin information to the ixp42x 
     83 * I2C driver. 
     84 */ 
     85struct ixp4xx_i2c_pins { 
     86        unsigned long sda_pin; 
     87        unsigned long scl_pin; 
     88}; 
     89 
     90#define IXDP425_KSSPI_SELECT    4 
     91#define IXDP425_KSSPI_TXD       3 
     92#define IXDP425_KSSPI_CLOCK     2 
     93#define IXDP425_KSSPI_RXD       0 
     94 
     95/* 
     96 * This structure provide a means for the board setup code 
     97 * to give information to th pata_ixp4xx driver. It is 
     98 * passed as platform_data. 
     99 */ 
     100struct ixp4xx_spi_pins { 
     101  unsigned long spis_pin; 
     102  unsigned long spic_pin; 
     103  unsigned long spid_pin; 
     104  unsigned long spiq_pin; 
     105}; 
     106 
    77107 
    78108/* 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/include/mach/uncompress.h

    r18171 r18190  
    3838static __inline__ void __arch_decomp_setup(unsigned long arch_id) 
    3939{ 
    40         /* 
    41          * Some boards are using UART2 as console 
    42          */ 
    43         if (machine_is_adi_coyote() || machine_is_gtwx5715() || 
    44             machine_is_gateway7001() || machine_is_wg302v2() || 
    45             machine_is_devixp() || machine_is_miccpt() || machine_is_mic256()) 
     40//              uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; 
     41#if defined(CONFIG_TONZE) || defined(CONFIG_NOP8670) 
     42                uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; 
     43#else 
     44        if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_wrt300nv2() || machine_is_wg302v2() || machine_is_gateway7001() || machine_is_pronghorn() || machine_is_pronghorn_metro() || machine_is_usr8200()) 
    4645                uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; 
    4746        else 
    4847                uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS; 
     48#endif 
    4949} 
    5050 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/ixdp425-pci.c

    r18171 r18190  
    11/* 
    2  * arch/arm/mach-ixp4xx/ixdp425-pci.c 
     2 * arch/arm/mach-ixp4xx/ixdp425-pci.c  
    33 * 
    44 * IXDP425 board-level PCI initialization 
     
    2020#include <linux/irq.h> 
    2121#include <linux/delay.h> 
     22 
    2223#include <asm/mach/pci.h> 
    2324#include <asm/irq.h> 
     
    2526#include <asm/mach-types.h> 
    2627 
    27 #define MAX_DEV         4 
    28 #define IRQ_LINES       4 
    29  
    30 /* PCI controller GPIO to IRQ pin mappings */ 
    31 #define INTA            11 
    32 #define INTB            10 
    33 #define INTC            9 
    34 #define INTD            8 
    35  
    36  
    3728void __init ixdp425_pci_preinit(void) 
    3829{ 
    39         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
    40         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
    41         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW); 
    42         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW); 
     30        set_irq_type(IRQ_IXDP425_PCI_INTA, IRQT_LOW); 
     31        set_irq_type(IRQ_IXDP425_PCI_INTB, IRQT_LOW); 
     32        set_irq_type(IRQ_IXDP425_PCI_INTC, IRQT_LOW); 
     33        set_irq_type(IRQ_IXDP425_PCI_INTD, IRQT_LOW); 
     34 
    4335        ixp4xx_pci_preinit(); 
    4436} 
    4537 
    46 static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     38static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    4739{ 
    48         static int pci_irq_table[IRQ_LINES] = { 
    49                 IXP4XX_GPIO_IRQ(INTA), 
    50                 IXP4XX_GPIO_IRQ(INTB), 
    51                 IXP4XX_GPIO_IRQ(INTC), 
    52                 IXP4XX_GPIO_IRQ(INTD) 
     40        static int pci_irq_table[AVILA_PCI_IRQ_LINES] = { 
     41                IRQ_IXDP425_PCI_INTA, 
     42                IRQ_IXDP425_PCI_INTB, 
     43                IRQ_IXDP425_PCI_INTC, 
     44                IRQ_IXDP425_PCI_INTD 
    5345        }; 
    5446 
    55         if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES) 
    56                 return pci_irq_table[(slot + pin - 2) % 4]; 
     47        int irq = -1; 
    5748 
    58         return -1; 
     49        if (slot >= 1 && slot <= AVILA_PCI_MAX_DEV &&  
     50                pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) { 
     51                irq = pci_irq_table[(slot + pin - 2) % 4]; 
     52        } 
     53 
     54        return irq; 
    5955} 
    6056 
     
    7167{ 
    7268        if (machine_is_ixdp425() || machine_is_ixcdp1100() || 
    73                         machine_is_ixdp465() || machine_is_kixrp435()) 
     69                        machine_is_ixdp465() || machine_is_kixrp435() || 
     70                        machine_is_compex()) 
    7471                pci_common_init(&ixdp425_pci); 
    7572        return 0; 
     
    7774 
    7875subsys_initcall(ixdp425_pci_init); 
     76 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/ixdp425-setup.c

    r18171 r18190  
    22 * arch/arm/mach-ixp4xx/ixdp425-setup.c 
    33 * 
    4  * IXDP425/IXCDP1100 board-setup 
     4 * IXDP425/IXCDP1100 board-setup  
    55 * 
    66 * Copyright (C) 2003-2005 MontaVista Software, Inc. 
     
    1515#include <linux/tty.h> 
    1616#include <linux/serial_8250.h> 
    17 #include <linux/i2c-gpio.h> 
     17#include <linux/slab.h> 
     18#include <linux/i2c.h> 
     19#include <linux/i2c/at24.h> 
    1820#include <linux/io.h> 
    1921#include <linux/mtd/mtd.h> 
    2022#include <linux/mtd/nand.h> 
    2123#include <linux/mtd/partitions.h> 
    22 #include <linux/delay.h> 
     24 
    2325#include <asm/types.h> 
    2426#include <asm/setup.h> 
     
    2931#include <asm/mach/arch.h> 
    3032#include <asm/mach/flash.h> 
    31  
    32 #define IXDP425_SDA_PIN         7 
    33 #define IXDP425_SCL_PIN         6 
    34  
    35 /* NAND Flash pins */ 
    36 #define IXDP425_NAND_NCE_PIN    12 
    37  
    38 #define IXDP425_NAND_CMD_BYTE   0x01 
    39 #define IXDP425_NAND_ADDR_BYTE  0x02 
     33#include <asm/delay.h> 
    4034 
    4135static struct flash_platform_data ixdp425_flash_data = { 
     
    6155    defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 
    6256 
     57#ifdef CONFIG_MTD_PARTITIONS 
    6358const char *part_probes[] = { "cmdlinepart", NULL }; 
    6459 
     
    7469        }, 
    7570}; 
     71#endif 
    7672 
    7773static void 
     
    9995static struct platform_nand_data ixdp425_flash_nand_data = { 
    10096        .chip = { 
    101                 .nr_chips               = 1, 
    10297                .chip_delay             = 30, 
    10398                .options                = NAND_NO_AUTOINCR, 
     99#ifdef CONFIG_MTD_PARTITIONS 
    104100                .part_probe_types       = part_probes, 
    105101                .partitions             = ixdp425_partitions, 
    106102                .nr_partitions          = ARRAY_SIZE(ixdp425_partitions), 
     103#endif 
    107104        }, 
    108105        .ctrl = { 
     
    126123#endif  /* CONFIG_MTD_NAND_PLATFORM */ 
    127124 
    128 static struct i2c_gpio_platform_data ixdp425_i2c_gpio_data = { 
     125static struct ixp4xx_spi_pins ixdp425_spi_gpio_pins = { 
     126        .spis_pin       = IXDP425_KSSPI_SELECT, 
     127        .spic_pin       = IXDP425_KSSPI_CLOCK, 
     128        .spid_pin       = IXDP425_KSSPI_TXD, 
     129        .spiq_pin       = IXDP425_KSSPI_RXD 
     130}; 
     131 
     132static struct platform_device ixdp425_spi_controller = { 
     133    .name               = "IXP4XX-SPI", 
     134        .id                 = 0, 
     135        .dev                = { 
     136                .platform_data  = &ixdp425_spi_gpio_pins, 
     137        }, 
     138        .num_resources      = 0 
     139}; 
     140 
     141 
     142static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = { 
    129143        .sda_pin        = IXDP425_SDA_PIN, 
    130144        .scl_pin        = IXDP425_SCL_PIN, 
    131145}; 
    132146 
    133 static struct platform_device ixdp425_i2c_gpio = { 
    134         .name           = "i2c-gpio", 
     147static struct platform_device ixdp425_i2c_controller = { 
     148        .name           = "IXP4XX-I2C", 
    135149        .id             = 0, 
    136         .dev     = { 
    137                 .platform_data  = &ixdp425_i2c_gpio_data, 
    138         }, 
     150        .dev            = { 
     151                .platform_data = &ixdp425_i2c_gpio_pins, 
     152        }, 
     153        .num_resources  = 0 
    139154}; 
    140155 
    141156static struct resource ixdp425_uart_resources[] = { 
     157#ifndef CONFIG_TONZE 
    142158        { 
    143159                .start          = IXP4XX_UART1_BASE_PHYS, 
     
    145161                .flags          = IORESOURCE_MEM 
    146162        }, 
     163#endif 
    147164        { 
    148165                .start          = IXP4XX_UART2_BASE_PHYS, 
     
    153170 
    154171static struct plat_serial8250_port ixdp425_uart_data[] = { 
     172#ifndef CONFIG_TONZE 
    155173        { 
    156174                .mapbase        = IXP4XX_UART1_BASE_PHYS, 
     
    162180                .uartclk        = IXP4XX_UART_XTAL, 
    163181        }, 
     182#endif 
    164183        { 
    165184                .mapbase        = IXP4XX_UART2_BASE_PHYS, 
     
    178197        .id                     = PLAT8250_DEV_PLATFORM, 
    179198        .dev.platform_data      = ixdp425_uart_data, 
     199#ifndef CONFIG_TONZE 
    180200        .num_resources          = 2, 
     201#else 
     202        .num_resources          = 1, 
     203#endif 
    181204        .resource               = ixdp425_uart_resources 
    182205}; 
    183206 
    184 /* Built-in 10/100 Ethernet MAC interfaces */ 
    185 static struct eth_plat_info ixdp425_plat_eth[] = { 
    186         { 
    187                 .phy            = 0, 
    188                 .rxq            = 3, 
    189                 .txreadyq       = 20, 
    190         }, { 
    191                 .phy            = 1, 
    192                 .rxq            = 4, 
    193                 .txreadyq       = 21, 
    194         } 
    195 }; 
    196  
    197 static struct platform_device ixdp425_eth[] = { 
    198         { 
    199                 .name                   = "ixp4xx_eth", 
    200                 .id                     = IXP4XX_ETH_NPEB, 
    201                 .dev.platform_data      = ixdp425_plat_eth, 
    202         }, { 
    203                 .name                   = "ixp4xx_eth", 
    204                 .id                     = IXP4XX_ETH_NPEC, 
    205                 .dev.platform_data      = ixdp425_plat_eth + 1, 
    206         } 
    207 }; 
    208  
    209207static struct platform_device *ixdp425_devices[] __initdata = { 
    210         &ixdp425_i2c_gpio, 
     208        &ixdp425_i2c_controller, 
    211209        &ixdp425_flash, 
    212210#if defined(CONFIG_MTD_NAND_PLATFORM) || \ 
     
    215213#endif 
    216214        &ixdp425_uart, 
    217         &ixdp425_eth[0], 
    218         &ixdp425_eth[1], 
    219 }; 
     215        &ixdp425_spi_controller 
     216}; 
     217 
     218static struct at24_platform_data avila_eeprom_info = { 
     219        .byte_len       = 1024, 
     220        .page_size      = 16, 
     221        .flags          = AT24_FLAG_READONLY, 
     222//      .setup          = at24_setup, 
     223}; 
     224 
     225static struct i2c_board_info __initdata avila_i2c_board_info[] = { 
     226        { 
     227                I2C_BOARD_INFO("ds1672", 0x68), 
     228        }, 
     229        { 
     230                I2C_BOARD_INFO("ad7418", 0x28), 
     231        }, 
     232        { 
     233                I2C_BOARD_INFO("24c08", 0x51), 
     234                .platform_data  = &avila_eeprom_info 
     235        }, 
     236}; 
     237 
     238static struct resource avila_pata_resources[] = { 
     239        { 
     240                .flags  = IORESOURCE_MEM 
     241        }, 
     242        { 
     243                .flags  = IORESOURCE_MEM, 
     244        }, 
     245        { 
     246                .name   = "intrq", 
     247                .start  = IRQ_IXP4XX_GPIO12, 
     248                .end    = IRQ_IXP4XX_GPIO12, 
     249                .flags  = IORESOURCE_IRQ, 
     250        }, 
     251}; 
     252 
     253static struct ixp4xx_pata_data avila_pata_data = { 
     254        .cs0_bits       = 0xbfff0043, 
     255        .cs1_bits       = 0xbfff0043, 
     256}; 
     257 
     258static struct platform_device avila_pata = { 
     259        .name                   = "pata_ixp4xx_cf", 
     260        .id                     = 0, 
     261        .dev.platform_data      = &avila_pata_data, 
     262        .num_resources          = ARRAY_SIZE(avila_pata_resources), 
     263        .resource               = avila_pata_resources, 
     264}; 
     265 
    220266 
    221267static void __init ixdp425_init(void) 
     
    249295 
    250296        platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices)); 
     297        avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1); 
     298        avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1); 
     299 
     300        avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2); 
     301        avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2); 
     302 
     303        avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1; 
     304        avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2; 
     305 
     306        platform_device_register(&avila_pata); 
     307 
     308                i2c_register_board_info(0, avila_i2c_board_info, 
     309                                ARRAY_SIZE(avila_i2c_board_info)); 
    251310} 
    252311 
     
    254313MACHINE_START(IXDP425, "Intel IXDP425 Development Platform") 
    255314        /* Maintainer: MontaVista Software, Inc. */ 
     315        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     316        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    256317        .map_io         = ixp4xx_map_io, 
    257318        .init_irq       = ixp4xx_init_irq, 
    258319        .timer          = &ixp4xx_timer, 
    259         .atag_offset    = 0x100, 
     320        .boot_params    = 0x0100, 
    260321        .init_machine   = ixdp425_init, 
    261 #if defined(CONFIG_PCI) 
    262         .dma_zone_size  = SZ_64M, 
    263 #endif 
    264322MACHINE_END 
    265323#endif 
     
    268326MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") 
    269327        /* Maintainer: MontaVista Software, Inc. */ 
     328        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     329        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    270330        .map_io         = ixp4xx_map_io, 
    271331        .init_irq       = ixp4xx_init_irq, 
    272332        .timer          = &ixp4xx_timer, 
    273         .atag_offset    = 0x100, 
     333        .boot_params    = 0x0100, 
    274334        .init_machine   = ixdp425_init, 
    275 #if defined(CONFIG_PCI) 
    276         .dma_zone_size  = SZ_64M, 
    277 #endif 
    278335MACHINE_END 
    279336#endif 
     
    282339MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform") 
    283340        /* Maintainer: MontaVista Software, Inc. */ 
     341        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     342        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    284343        .map_io         = ixp4xx_map_io, 
    285344        .init_irq       = ixp4xx_init_irq, 
    286345        .timer          = &ixp4xx_timer, 
    287         .atag_offset    = 0x100, 
     346        .boot_params    = 0x0100, 
    288347        .init_machine   = ixdp425_init, 
    289 #if defined(CONFIG_PCI) 
    290         .dma_zone_size  = SZ_64M, 
    291 #endif 
    292348MACHINE_END 
    293349#endif 
     
    296352MACHINE_START(KIXRP435, "Intel KIXRP435 Reference Platform") 
    297353        /* Maintainer: MontaVista Software, Inc. */ 
     354        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     355        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    298356        .map_io         = ixp4xx_map_io, 
    299357        .init_irq       = ixp4xx_init_irq, 
    300358        .timer          = &ixp4xx_timer, 
    301         .atag_offset    = 0x100, 
     359        .boot_params    = 0x0100, 
    302360        .init_machine   = ixdp425_init, 
    303 #if defined(CONFIG_PCI) 
    304         .dma_zone_size  = SZ_64M, 
    305 #endif 
    306361MACHINE_END 
    307362#endif 
     363 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/ixdpg425-pci.c

    r18171 r18190  
    2626void __init ixdpg425_pci_preinit(void) 
    2727{ 
    28         irq_set_irq_type(IRQ_IXP4XX_GPIO6, IRQ_TYPE_LEVEL_LOW); 
    29         irq_set_irq_type(IRQ_IXP4XX_GPIO7, IRQ_TYPE_LEVEL_LOW); 
     28        set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW); 
     29        set_irq_type(IRQ_IXP4XX_GPIO7, IRQT_LOW); 
    3030 
    3131        ixp4xx_pci_preinit(); 
    3232} 
    3333 
    34 static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     34static int __init ixdpg425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    3535{ 
    3636        if (slot == 12 || slot == 13) 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c

    r18171 r18190  
    266266        qmgr_queue_descs[queue][0] = '\x0'; 
    267267#endif 
    268  
    269         while ((addr = qmgr_get_entry(queue))) 
    270                 printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n", 
    271                        queue, addr); 
    272  
    273268        __raw_writel(0, &qmgr_regs->sram[queue]); 
    274269 
     
    281276 
    282277        module_put(THIS_MODULE); 
     278 
     279        while ((addr = qmgr_get_entry(queue))) 
     280                printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n", 
     281                       queue, addr); 
    283282} 
    284283 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/nas100d-pci.c

    r18171 r18190  
    1919#include <linux/init.h> 
    2020#include <linux/irq.h> 
     21 
    2122#include <asm/mach/pci.h> 
    2223#include <asm/mach-types.h> 
    2324 
    24 #define MAX_DEV         3 
    25 #define IRQ_LINES       3 
    26  
    27 /* PCI controller GPIO to IRQ pin mappings */ 
    28 #define INTA            11 
    29 #define INTB            10 
    30 #define INTC            9 
    31 #define INTD            8 
    32 #define INTE            7 
    33  
    3425void __init nas100d_pci_preinit(void) 
    3526{ 
    36         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
    37         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
    38         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW); 
    39         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW); 
    40         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTE), IRQ_TYPE_LEVEL_LOW); 
     27        set_irq_type(IRQ_NAS100D_PCI_INTA, IRQT_LOW); 
     28        set_irq_type(IRQ_NAS100D_PCI_INTB, IRQT_LOW); 
     29        set_irq_type(IRQ_NAS100D_PCI_INTC, IRQT_LOW); 
     30        set_irq_type(IRQ_NAS100D_PCI_INTD, IRQT_LOW); 
     31        set_irq_type(IRQ_NAS100D_PCI_INTE, IRQT_LOW); 
     32 
    4133        ixp4xx_pci_preinit(); 
    4234} 
    4335 
    44 static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     36static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    4537{ 
    46         static int pci_irq_table[MAX_DEV][IRQ_LINES] = { 
    47                 { IXP4XX_GPIO_IRQ(INTA), -1, -1 }, 
    48                 { IXP4XX_GPIO_IRQ(INTB), -1, -1 }, 
    49                 { IXP4XX_GPIO_IRQ(INTC), IXP4XX_GPIO_IRQ(INTD), 
    50                   IXP4XX_GPIO_IRQ(INTE) }, 
     38        static int pci_irq_table[NAS100D_PCI_MAX_DEV][NAS100D_PCI_IRQ_LINES] = 
     39        { 
     40                { IRQ_NAS100D_PCI_INTA, -1, -1 }, 
     41                { IRQ_NAS100D_PCI_INTB, -1, -1 }, 
     42                { IRQ_NAS100D_PCI_INTC, IRQ_NAS100D_PCI_INTD, IRQ_NAS100D_PCI_INTE }, 
    5143        }; 
    5244 
    53         if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES) 
    54                 return pci_irq_table[slot - 1][pin - 1]; 
     45        int irq = -1; 
    5546 
    56         return -1; 
     47        if (slot >= 1 && slot <= NAS100D_PCI_MAX_DEV && 
     48                pin >= 1 && pin <= NAS100D_PCI_IRQ_LINES) 
     49                irq = pci_irq_table[slot-1][pin-1]; 
     50 
     51        return irq; 
    5752} 
    5853 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/nas100d-setup.c

    r18171 r18190  
    44 * NAS 100d board-setup 
    55 * 
    6  * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au> 
    7  * 
    8  * based on ixdp425-setup.c: 
     6 * based ixdp425-setup.c: 
    97 *      Copyright (C) 2003-2004 MontaVista Software, Inc. 
    10  * based on nas100d-power.c: 
    11  *      Copyright (C) 2005 Tower Technologies 
    12  * based on nas100d-io.c 
    13  *      Copyright (C) 2004 Karen Spearel 
    148 * 
    159 * Author: Alessandro Zummo <a.zummo@towertech.it> 
     
    1812 * 
    1913 */ 
    20 #include <linux/gpio.h> 
    21 #include <linux/if_ether.h> 
    22 #include <linux/irq.h> 
    23 #include <linux/jiffies.h> 
    24 #include <linux/timer.h> 
     14 
     15#include <linux/kernel.h> 
    2516#include <linux/serial.h> 
    2617#include <linux/serial_8250.h> 
    2718#include <linux/leds.h> 
    28 #include <linux/reboot.h> 
    29 #include <linux/i2c.h> 
    30 #include <linux/i2c-gpio.h> 
    31 #include <linux/io.h> 
     19 
    3220#include <asm/mach-types.h> 
    3321#include <asm/mach/arch.h> 
    3422#include <asm/mach/flash.h> 
    35  
    36 #define NAS100D_SDA_PIN         5 
    37 #define NAS100D_SCL_PIN         6 
    38  
    39 /* Buttons */ 
    40 #define NAS100D_PB_GPIO         14   /* power button */ 
    41 #define NAS100D_RB_GPIO         4    /* reset button */ 
    42  
    43 /* Power control */ 
    44 #define NAS100D_PO_GPIO         12   /* power off */ 
    45  
    46 /* LEDs */ 
    47 #define NAS100D_LED_WLAN_GPIO   0 
    48 #define NAS100D_LED_DISK_GPIO   3 
    49 #define NAS100D_LED_PWR_GPIO    15 
    5023 
    5124static struct flash_platform_data nas100d_flash_data = { 
     
    6639}; 
    6740 
    68 static struct i2c_board_info __initdata nas100d_i2c_board_info [] = { 
     41#ifdef CONFIG_LEDS_IXP4XX 
     42static struct resource nas100d_led_resources[] = { 
    6943        { 
    70                 I2C_BOARD_INFO("pcf8563", 0x51), 
     44                .name           = "wlan",   /* green led */ 
     45                .start          = 0, 
     46                .end            = 0, 
     47                .flags          = IXP4XX_GPIO_LOW, 
     48        }, 
     49        { 
     50                .name           = "ready",  /* blue power led (off is flashing!) */ 
     51                .start          = 15, 
     52                .end            = 15, 
     53                .flags          = IXP4XX_GPIO_LOW, 
     54        }, 
     55        { 
     56                .name           = "disk",   /* yellow led */ 
     57                .start          = 3, 
     58                .end            = 3, 
     59                .flags          = IXP4XX_GPIO_LOW, 
    7160        }, 
    7261}; 
    7362 
    74 static struct gpio_led nas100d_led_pins[] = { 
    75         { 
    76                 .name           = "nas100d:green:wlan", 
    77                 .gpio           = NAS100D_LED_WLAN_GPIO, 
    78                 .active_low     = true, 
    79         }, 
    80         { 
    81                 .name           = "nas100d:blue:power",  /* (off=flashing) */ 
    82                 .gpio           = NAS100D_LED_PWR_GPIO, 
    83                 .active_low     = true, 
    84         }, 
    85         { 
    86                 .name           = "nas100d:yellow:disk", 
    87                 .gpio           = NAS100D_LED_DISK_GPIO, 
    88                 .active_low     = true, 
    89         }, 
     63static struct platform_device nas100d_leds = { 
     64        .name                   = "IXP4XX-GPIO-LED", 
     65        .id                     = -1, 
     66        .num_resources          = ARRAY_SIZE(nas100d_led_resources), 
     67        .resource               = nas100d_led_resources, 
    9068}; 
     69#endif 
    9170 
    92 static struct gpio_led_platform_data nas100d_led_data = { 
    93         .num_leds               = ARRAY_SIZE(nas100d_led_pins), 
    94         .leds                   = nas100d_led_pins, 
    95 }; 
    96  
    97 static struct platform_device nas100d_leds = { 
    98         .name                   = "leds-gpio", 
    99         .id                     = -1, 
    100         .dev.platform_data      = &nas100d_led_data, 
    101 }; 
    102  
    103 static struct i2c_gpio_platform_data nas100d_i2c_gpio_data = { 
     71static struct ixp4xx_i2c_pins nas100d_i2c_gpio_pins = { 
    10472        .sda_pin                = NAS100D_SDA_PIN, 
    10573        .scl_pin                = NAS100D_SCL_PIN, 
    10674}; 
    10775 
    108 static struct platform_device nas100d_i2c_gpio = { 
    109         .name                   = "i2c-gpio", 
     76static struct platform_device nas100d_i2c_controller = { 
     77        .name                   = "IXP4XX-I2C", 
    11078        .id                     = 0, 
    111         .dev     = { 
    112                 .platform_data  = &nas100d_i2c_gpio_data, 
    113         }, 
     79        .dev.platform_data      = &nas100d_i2c_gpio_pins, 
     80        .num_resources          = 0, 
    11481}; 
    11582 
     
    157124}; 
    158125 
    159 /* Built-in 10/100 Ethernet MAC interfaces */ 
    160 static struct eth_plat_info nas100d_plat_eth[] = { 
    161         { 
    162                 .phy            = 0, 
    163                 .rxq            = 3, 
    164                 .txreadyq       = 20, 
    165         } 
    166 }; 
    167  
    168 static struct platform_device nas100d_eth[] = { 
    169         { 
    170                 .name                   = "ixp4xx_eth", 
    171                 .id                     = IXP4XX_ETH_NPEB, 
    172                 .dev.platform_data      = nas100d_plat_eth, 
    173         } 
    174 }; 
    175  
    176126static struct platform_device *nas100d_devices[] __initdata = { 
    177         &nas100d_i2c_gpio, 
     127        &nas100d_i2c_controller, 
    178128        &nas100d_flash, 
     129#ifdef CONFIG_LEDS_IXP4XX 
    179130        &nas100d_leds, 
    180         &nas100d_eth[0], 
     131#endif 
    181132}; 
    182133 
     
    192143} 
    193144 
    194 /* This is used to make sure the power-button pusher is serious.  The button 
    195  * must be held until the value of this counter reaches zero. 
    196  */ 
    197 static int power_button_countdown; 
    198  
    199 /* Must hold the button down for at least this many counts to be processed */ 
    200 #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ 
    201  
    202 static void nas100d_power_handler(unsigned long data); 
    203 static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler, 0, 0); 
    204  
    205 static void nas100d_power_handler(unsigned long data) 
    206 { 
    207         /* This routine is called twice per second to check the 
    208          * state of the power button. 
    209          */ 
    210  
    211         if (gpio_get_value(NAS100D_PB_GPIO)) { 
    212  
    213                 /* IO Pin is 1 (button pushed) */ 
    214                 if (power_button_countdown > 0) 
    215                         power_button_countdown--; 
    216  
    217         } else { 
    218  
    219                 /* Done on button release, to allow for auto-power-on mods. */ 
    220                 if (power_button_countdown == 0) { 
    221                         /* Signal init to do the ctrlaltdel action, 
    222                          * this will bypass init if it hasn't started 
    223                          * and do a kernel_restart. 
    224                          */ 
    225                         ctrl_alt_del(); 
    226  
    227                         /* Change the state of the power LED to "blink" */ 
    228                         gpio_line_set(NAS100D_LED_PWR_GPIO, IXP4XX_GPIO_LOW); 
    229                 } else { 
    230                         power_button_countdown = PBUTTON_HOLDDOWN_COUNT; 
    231                 } 
    232         } 
    233  
    234         mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500)); 
    235 } 
    236  
    237 static irqreturn_t nas100d_reset_handler(int irq, void *dev_id) 
    238 { 
    239         /* This is the paper-clip reset, it shuts the machine down directly. */ 
    240         machine_power_off(); 
    241  
    242         return IRQ_HANDLED; 
    243 } 
    244  
    245145static void __init nas100d_init(void) 
    246146{ 
    247         uint8_t __iomem *f; 
    248         int i; 
    249  
    250147        ixp4xx_sys_init(); 
    251148 
     
    257154                IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 
    258155 
    259         i2c_register_board_info(0, nas100d_i2c_board_info, 
    260                                 ARRAY_SIZE(nas100d_i2c_board_info)); 
     156        pm_power_off = nas100d_power_off; 
    261157 
    262158        /* 
     
    268164 
    269165        platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); 
    270  
    271         pm_power_off = nas100d_power_off; 
    272  
    273         if (request_irq(gpio_to_irq(NAS100D_RB_GPIO), &nas100d_reset_handler, 
    274                 IRQF_DISABLED | IRQF_TRIGGER_LOW, 
    275                 "NAS100D reset button", NULL) < 0) { 
    276  
    277                 printk(KERN_DEBUG "Reset Button IRQ %d not available\n", 
    278                         gpio_to_irq(NAS100D_RB_GPIO)); 
    279         } 
    280  
    281         /* The power button on the Iomega NAS100d is on GPIO 14, but 
    282          * it cannot handle interrupts on that GPIO line.  So we'll 
    283          * have to poll it with a kernel timer. 
    284          */ 
    285  
    286         /* Make sure that the power button GPIO is set up as an input */ 
    287         gpio_line_config(NAS100D_PB_GPIO, IXP4XX_GPIO_IN); 
    288  
    289         /* Set the initial value for the power button IRQ handler */ 
    290         power_button_countdown = PBUTTON_HOLDDOWN_COUNT; 
    291  
    292         mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500)); 
    293  
    294         /* 
    295          * Map in a portion of the flash and read the MAC address. 
    296          * Since it is stored in BE in the flash itself, we need to 
    297          * byteswap it if we're in LE mode. 
    298          */ 
    299         f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x1000000); 
    300         if (f) { 
    301                 for (i = 0; i < 6; i++) 
    302 #ifdef __ARMEB__ 
    303                         nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + i); 
    304 #else 
    305                         nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + (i^3)); 
    306 #endif 
    307                 iounmap(f); 
    308         } 
    309         printk(KERN_INFO "NAS100D: Using MAC address %pM for port 0\n", 
    310                nas100d_plat_eth[0].hwaddr); 
    311  
    312166} 
    313167 
    314168MACHINE_START(NAS100D, "Iomega NAS 100d") 
    315169        /* Maintainer: www.nslu2-linux.org */ 
    316         .atag_offset    = 0x100, 
     170        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     171        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
     172        .boot_params    = 0x00000100, 
    317173        .map_io         = ixp4xx_map_io, 
    318174        .init_irq       = ixp4xx_init_irq, 
    319175        .timer          = &ixp4xx_timer, 
    320176        .init_machine   = nas100d_init, 
    321 #if defined(CONFIG_PCI) 
    322         .dma_zone_size  = SZ_64M, 
    323 #endif 
    324177MACHINE_END 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/nslu2-pci.c

    r18171 r18190  
    1919#include <linux/init.h> 
    2020#include <linux/irq.h> 
     21 
    2122#include <asm/mach/pci.h> 
    2223#include <asm/mach-types.h> 
    2324 
    24 #define MAX_DEV         3 
    25 #define IRQ_LINES       3 
    26  
    27 /* PCI controller GPIO to IRQ pin mappings */ 
    28 #define INTA            11 
    29 #define INTB            10 
    30 #define INTC            9 
    31 #define INTD            8 
    32  
    3325void __init nslu2_pci_preinit(void) 
    3426{ 
    35         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); 
    36         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); 
    37         irq_set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW); 
     27        set_irq_type(IRQ_NSLU2_PCI_INTA, IRQT_LOW); 
     28        set_irq_type(IRQ_NSLU2_PCI_INTB, IRQT_LOW); 
     29        set_irq_type(IRQ_NSLU2_PCI_INTC, IRQT_LOW); 
     30 
    3831        ixp4xx_pci_preinit(); 
    3932} 
    4033 
    41 static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     34static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    4235{ 
    43         static int pci_irq_table[IRQ_LINES] = { 
    44                 IXP4XX_GPIO_IRQ(INTA), 
    45                 IXP4XX_GPIO_IRQ(INTB), 
    46                 IXP4XX_GPIO_IRQ(INTC), 
     36        static int pci_irq_table[NSLU2_PCI_IRQ_LINES] = { 
     37                IRQ_NSLU2_PCI_INTA, 
     38                IRQ_NSLU2_PCI_INTB, 
     39                IRQ_NSLU2_PCI_INTC, 
    4740        }; 
    4841 
    49         if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES) 
    50                 return pci_irq_table[(slot + pin - 2) % IRQ_LINES]; 
     42        int irq = -1; 
    5143 
    52         return -1; 
     44        if (slot >= 1 && slot <= NSLU2_PCI_MAX_DEV && 
     45                pin >= 1 && pin <= NSLU2_PCI_IRQ_LINES) { 
     46                        irq = pci_irq_table[(slot + pin - 2) % NSLU2_PCI_IRQ_LINES]; 
     47        } 
     48 
     49        return irq; 
    5350} 
    5451 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/nslu2-setup.c

    r18171 r18190  
    44 * NSLU2 board-setup 
    55 * 
    6  * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au> 
    7  * 
    8  * based on ixdp425-setup.c: 
     6 * based ixdp425-setup.c: 
    97 *      Copyright (C) 2003-2004 MontaVista Software, Inc. 
    10  * based on nslu2-power.c: 
    11  *      Copyright (C) 2005 Tower Technologies 
    128 * 
    139 * Author: Mark Rakes <mrakes at mac.com> 
    1410 * Author: Rod Whitby <rod@whitby.id.au> 
    15  * Author: Alessandro Zummo <a.zummo@towertech.it> 
    1611 * Maintainers: http://www.nslu2-linux.org/ 
    1712 * 
     13 * Fixed missing init_time in MACHINE_START kas11 10/22/04 
     14 * Changed to conform to new style __init ixdp425 kas11 10/22/04 
    1815 */ 
    19 #include <linux/gpio.h> 
    20 #include <linux/if_ether.h> 
    21 #include <linux/irq.h> 
     16 
     17#include <linux/kernel.h> 
    2218#include <linux/serial.h> 
    2319#include <linux/serial_8250.h> 
    2420#include <linux/leds.h> 
    25 #include <linux/reboot.h> 
    26 #include <linux/i2c.h> 
    27 #include <linux/i2c-gpio.h> 
    28 #include <linux/io.h> 
     21 
    2922#include <asm/mach-types.h> 
    3023#include <asm/mach/arch.h> 
    3124#include <asm/mach/flash.h> 
    3225#include <asm/mach/time.h> 
    33  
    34 #define NSLU2_SDA_PIN           7 
    35 #define NSLU2_SCL_PIN           6 
    36  
    37 /* NSLU2 Timer */ 
    38 #define NSLU2_FREQ 66000000 
    39  
    40 /* Buttons */ 
    41 #define NSLU2_PB_GPIO           5       /* power button */ 
    42 #define NSLU2_PO_GPIO           8       /* power off */ 
    43 #define NSLU2_RB_GPIO           12      /* reset button */ 
    44  
    45 /* Buzzer */ 
    46 #define NSLU2_GPIO_BUZZ         4 
    47  
    48 /* LEDs */ 
    49 #define NSLU2_LED_RED_GPIO      0 
    50 #define NSLU2_LED_GRN_GPIO      1 
    51 #define NSLU2_LED_DISK1_GPIO    3 
    52 #define NSLU2_LED_DISK2_GPIO    2 
    5326 
    5427static struct flash_platform_data nslu2_flash_data = { 
     
    6942}; 
    7043 
    71 static struct i2c_gpio_platform_data nslu2_i2c_gpio_data = { 
     44static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = { 
    7245        .sda_pin                = NSLU2_SDA_PIN, 
    7346        .scl_pin                = NSLU2_SCL_PIN, 
    7447}; 
    7548 
    76 static struct i2c_board_info __initdata nslu2_i2c_board_info [] = { 
    77         { 
    78                 I2C_BOARD_INFO("x1205", 0x6f), 
    79         }, 
    80 }; 
    81  
    82 static struct gpio_led nslu2_led_pins[] = { 
    83         { 
    84                 .name           = "nslu2:green:ready", 
    85                 .gpio           = NSLU2_LED_GRN_GPIO, 
    86         }, 
    87         { 
    88                 .name           = "nslu2:red:status", 
    89                 .gpio           = NSLU2_LED_RED_GPIO, 
    90         }, 
    91         { 
    92                 .name           = "nslu2:green:disk-1", 
    93                 .gpio           = NSLU2_LED_DISK1_GPIO, 
    94                 .active_low     = true, 
    95         }, 
    96         { 
    97                 .name           = "nslu2:green:disk-2", 
    98                 .gpio           = NSLU2_LED_DISK2_GPIO, 
    99                 .active_low     = true, 
    100         }, 
    101 }; 
    102  
    103 static struct gpio_led_platform_data nslu2_led_data = { 
    104         .num_leds               = ARRAY_SIZE(nslu2_led_pins), 
    105         .leds                   = nslu2_led_pins, 
     49#ifdef CONFIG_LEDS_IXP4XX 
     50static struct resource nslu2_led_resources[] = { 
     51        { 
     52                .name           = "ready",  /* green led */ 
     53                .start          = NSLU2_LED_GRN_GPIO, 
     54                .end            = NSLU2_LED_GRN_GPIO, 
     55                .flags          = IXP4XX_GPIO_HIGH, 
     56        }, 
     57        { 
     58                .name           = "status", /* red led */ 
     59                .start          = NSLU2_LED_RED_GPIO, 
     60                .end            = NSLU2_LED_RED_GPIO, 
     61                .flags          = IXP4XX_GPIO_HIGH, 
     62        }, 
     63        { 
     64                .name           = "disk-1", 
     65                .start          = NSLU2_LED_DISK1_GPIO, 
     66                .end            = NSLU2_LED_DISK1_GPIO, 
     67                .flags          = IXP4XX_GPIO_LOW, 
     68        }, 
     69        { 
     70                .name           = "disk-2", 
     71                .start          = NSLU2_LED_DISK2_GPIO, 
     72                .end            = NSLU2_LED_DISK2_GPIO, 
     73                .flags          = IXP4XX_GPIO_LOW, 
     74        }, 
    10675}; 
    10776 
    10877static struct platform_device nslu2_leds = { 
    109         .name                   = "leds-gpio", 
     78        .name                   = "IXP4XX-GPIO-LED", 
    11079        .id                     = -1, 
    111         .dev.platform_data      = &nslu2_led_data, 
    112 }; 
    113  
    114 static struct platform_device nslu2_i2c_gpio = { 
    115         .name                   = "i2c-gpio", 
     80        .num_resources          = ARRAY_SIZE(nslu2_led_resources), 
     81        .resource               = nslu2_led_resources, 
     82}; 
     83#endif 
     84 
     85static struct platform_device nslu2_i2c_controller = { 
     86        .name                   = "IXP4XX-I2C", 
    11687        .id                     = 0, 
    117         .dev     = { 
    118                 .platform_data  = &nslu2_i2c_gpio_data, 
    119         }, 
     88        .dev.platform_data      = &nslu2_i2c_gpio_pins, 
     89        .num_resources          = 0, 
    12090}; 
    12191 
     
    169139}; 
    170140 
    171 /* Built-in 10/100 Ethernet MAC interfaces */ 
    172 static struct eth_plat_info nslu2_plat_eth[] = { 
    173         { 
    174                 .phy            = 1, 
    175                 .rxq            = 3, 
    176                 .txreadyq       = 20, 
    177         } 
    178 }; 
    179  
    180 static struct platform_device nslu2_eth[] = { 
    181         { 
    182                 .name                   = "ixp4xx_eth", 
    183                 .id                     = IXP4XX_ETH_NPEB, 
    184                 .dev.platform_data      = nslu2_plat_eth, 
    185         } 
    186 }; 
    187  
    188141static struct platform_device *nslu2_devices[] __initdata = { 
    189         &nslu2_i2c_gpio, 
     142        &nslu2_i2c_controller, 
    190143        &nslu2_flash, 
    191144        &nslu2_beeper, 
     145#ifdef CONFIG_LEDS_IXP4XX 
    192146        &nslu2_leds, 
    193         &nslu2_eth[0], 
     147#endif 
    194148}; 
    195149 
     
    203157        /* do the deed */ 
    204158        gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH); 
    205 } 
    206  
    207 static irqreturn_t nslu2_power_handler(int irq, void *dev_id) 
    208 { 
    209         /* Signal init to do the ctrlaltdel action, this will bypass init if 
    210          * it hasn't started and do a kernel_restart. 
    211          */ 
    212         ctrl_alt_del(); 
    213  
    214         return IRQ_HANDLED; 
    215 } 
    216  
    217 static irqreturn_t nslu2_reset_handler(int irq, void *dev_id) 
    218 { 
    219         /* This is the paper-clip reset, it shuts the machine down directly. 
    220          */ 
    221         machine_power_off(); 
    222  
    223         return IRQ_HANDLED; 
    224159} 
    225160 
     
    239174static void __init nslu2_init(void) 
    240175{ 
    241         uint8_t __iomem *f; 
    242         int i; 
    243  
    244176        ixp4xx_sys_init(); 
    245177 
     
    248180                IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 
    249181 
    250         i2c_register_board_info(0, nslu2_i2c_board_info, 
    251                                 ARRAY_SIZE(nslu2_i2c_board_info)); 
     182        pm_power_off = nslu2_power_off; 
    252183 
    253184        /* 
     
    259190 
    260191        platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); 
    261  
    262         pm_power_off = nslu2_power_off; 
    263  
    264         if (request_irq(gpio_to_irq(NSLU2_RB_GPIO), &nslu2_reset_handler, 
    265                 IRQF_DISABLED | IRQF_TRIGGER_LOW, 
    266                 "NSLU2 reset button", NULL) < 0) { 
    267  
    268                 printk(KERN_DEBUG "Reset Button IRQ %d not available\n", 
    269                         gpio_to_irq(NSLU2_RB_GPIO)); 
    270         } 
    271  
    272         if (request_irq(gpio_to_irq(NSLU2_PB_GPIO), &nslu2_power_handler, 
    273                 IRQF_DISABLED | IRQF_TRIGGER_HIGH, 
    274                 "NSLU2 power button", NULL) < 0) { 
    275  
    276                 printk(KERN_DEBUG "Power Button IRQ %d not available\n", 
    277                         gpio_to_irq(NSLU2_PB_GPIO)); 
    278         } 
    279  
    280         /* 
    281          * Map in a portion of the flash and read the MAC address. 
    282          * Since it is stored in BE in the flash itself, we need to 
    283          * byteswap it if we're in LE mode. 
    284          */ 
    285         f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x40000); 
    286         if (f) { 
    287                 for (i = 0; i < 6; i++) 
    288 #ifdef __ARMEB__ 
    289                         nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + i); 
    290 #else 
    291                         nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + (i^3)); 
    292 #endif 
    293                 iounmap(f); 
    294         } 
    295         printk(KERN_INFO "NSLU2: Using MAC address %pM for port 0\n", 
    296                nslu2_plat_eth[0].hwaddr); 
    297  
    298192} 
    299193 
    300194MACHINE_START(NSLU2, "Linksys NSLU2") 
    301195        /* Maintainer: www.nslu2-linux.org */ 
    302         .atag_offset    = 0x100, 
     196        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     197        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
     198        .boot_params    = 0x00000100, 
    303199        .map_io         = ixp4xx_map_io, 
    304200        .init_irq       = ixp4xx_init_irq, 
    305201        .timer          = &nslu2_timer, 
    306202        .init_machine   = nslu2_init, 
    307 #if defined(CONFIG_PCI) 
    308         .dma_zone_size  = SZ_64M, 
    309 #endif 
    310203MACHINE_END 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/wg302v2-pci.c

    r18171 r18190  
    3030void __init wg302v2_pci_preinit(void) 
    3131{ 
    32         irq_set_irq_type(IRQ_IXP4XX_GPIO8, IRQ_TYPE_LEVEL_LOW); 
    33         irq_set_irq_type(IRQ_IXP4XX_GPIO9, IRQ_TYPE_LEVEL_LOW); 
     32        set_irq_type(IRQ_IXP4XX_GPIO8, IRQT_LOW); 
     33        set_irq_type(IRQ_IXP4XX_GPIO9, IRQT_LOW); 
    3434 
    3535        ixp4xx_pci_preinit(); 
    3636} 
    3737 
    38 static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 
     38static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 
    3939{ 
    4040        if (slot == 1) 
  • src/linux/universal/linux-3.2/arch/arm/mach-ixp4xx/wg302v2-setup.c

    r18171 r18190  
    1919#include <linux/tty.h> 
    2020#include <linux/serial_8250.h> 
     21#include <linux/slab.h> 
    2122 
    2223#include <asm/types.h> 
     
    9899MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2") 
    99100        /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ 
     101        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     102        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
    100103        .map_io         = ixp4xx_map_io, 
    101104        .init_irq       = ixp4xx_init_irq, 
    102105        .timer          = &ixp4xx_timer, 
    103         .atag_offset    = 0x100, 
     106        .boot_params    = 0x0100, 
    104107        .init_machine   = wg302v2_init, 
    105 #if defined(CONFIG_PCI) 
    106         .dma_zone_size  = SZ_64M, 
    107 #endif 
    108108MACHINE_END 
    109109#endif 
  • src/linux/universal/linux-3.2/arch/arm/tools/mach-types

    r18171 r18190  
    184184palmtx                  MACH_PALMTX             PALMTX                  885 
    185185s3c2413                 MACH_S3C2413            S3C2413                 887 
     186wg302v1                 MACH_WG302V1            WG302V1                 889 
    186187wg302v2                 MACH_WG302V2            WG302V2                 890 
    187188omap_2430sdp            MACH_OMAP_2430SDP       OMAP_2430SDP            900 
     
    195196ateb9200                MACH_ATEB9200           ATEB9200                923 
    196197n35                     MACH_N35                N35                     927 
     198pronghorn               MACH_PRONGHORN          PRONGHORN               928 
    197199logicpd_pxa270          MACH_LOGICPD_PXA270     LOGICPD_PXA270          930 
    198200nxeb500hmi              MACH_NXEB500HMI         NXEB500HMI              941 
     
    209211aml_m5900               MACH_AML_M5900          AML_M5900               1024 
    210212balloon3                MACH_BALLOON3           BALLOON3                1029 
     213compex                  MACH_COMPEX             COMPEX                  1030 
     214pronghorn_metro         MACH_PRONGHORNMETRO     PRONGHORNMETRO          1040 
    211215ecbat91                 MACH_ECBAT91            ECBAT91                 1072 
    212216onearm                  MACH_ONEARM             ONEARM                  1075 
     217wrt300nv2               MACH_WRT300NV2          WRT300NV2               1077 
    213218smdk2443                MACH_SMDK2443           SMDK2443                1084 
    214219fsg                     MACH_FSG                FSG                     1091 
     
    255260tct_hammer              MACH_TCT_HAMMER         TCT_HAMMER              1460 
    256261herald                  MACH_HERALD             HERALD                  1461 
     262cambria                 MACH_CAMBRIA            CAMBRIA                 1468 
    257263sim_one                 MACH_SIM_ONE            SIM_ONE                 1476 
    258264jive                    MACH_JIVE               JIVE                    1490 
     
    317323zipit2                  MACH_ZIPIT2             ZIPIT2                  1757 
    318324omap3_pandora           MACH_OMAP3_PANDORA      OMAP3_PANDORA           1761 
     325usr8200                 MACH_USR8200            USR8200                 1762 
    319326mss2                    MACH_MSS2               MSS2                    1766 
    320327lb88rc8480              MACH_LB88RC8480         LB88RC8480              1769 
    321328mx25_3ds                MACH_MX25_3DS           MX25_3DS                1771 
    322329omap3530_lv_som         MACH_OMAP3530_LV_SOM    OMAP3530_LV_SOM         1773 
     330mi424wr                 MACH_MI424WR            MI424WR                 1778 
    323331davinci_da830_evm       MACH_DAVINCI_DA830_EVM  DAVINCI_DA830_EVM       1781 
    324332at572d940hfek           MACH_AT572D940HFEB      AT572D940HFEB           1783 
  • src/linux/universal/linux-3.2/crypto/ocf/criov.c

    r18171 r18190  
    159159        for (i = 0; len > 0 && i < skb_shinfo(skb)->nr_frags; i++) { 
    160160                if (offset < skb_shinfo(skb)->frags[i].size) { 
    161                         memcpy(page_address(skb_shinfo(skb)->frags[i].page) + 
     161                        memcpy(page_address(skb_frag_page(&skb_shinfo(skb)->frags[i])) + 
    162162                                        skb_shinfo(skb)->frags[i].page_offset, 
    163163                                        cp, min_t(int, skb_shinfo(skb)->frags[i].size, len)); 
  • src/linux/universal/linux-3.2/crypto/ocf/ixp4xx/Makefile

    r18171 r18190  
    1717endif 
    1818 
    19 ifdef CONFIG_IXP400_LIB_2_4 
    20 IX_XSCALE_SW = $(ROOTDIR)/modules/ixp425/ixp400-2.4/ixp400_xscale_sw 
    21 OSAL_DIR     = $(ROOTDIR)/modules/ixp425/ixp400-2.4/ixp_osal 
    22 endif 
    23 ifdef CONFIG_IXP400_LIB_2_1 
    24 IX_XSCALE_SW = $(ROOTDIR)/modules/ixp425/ixp400-2.1/ixp400_xscale_sw 
    25 OSAL_DIR     = $(ROOTDIR)/modules/ixp425/ixp400-2.1/ixp_osal 
    26 endif 
    27 ifdef CONFIG_IXP400_LIB_2_0 
    28 IX_XSCALE_SW = $(ROOTDIR)/modules/ixp425/ixp400-2.0/ixp400_xscale_sw 
    29 OSAL_DIR     = $(ROOTDIR)/modules/ixp425/ixp400-2.0/ixp_osal 
    30 endif 
    31 ifdef IX_XSCALE_SW 
    32 ifdef CONFIG_IXP400_LIB_2_4 
     19IX_XSCALE_SW := drivers/ixp400/ixp400_xscale_sw 
     20OSAL_DIR := $(IX_XSCALE_SW)/../ixp_osal 
     21 
    3322IXP_CFLAGS = \ 
    3423        -I$(ROOTDIR)/. \ 
     
    4938        -DENABLE_IOMEM -DENABLE_BUFFERMGT -DENABLE_DDK \ 
    5039        -DUSE_IXP4XX_CRYPTO 
    51 else 
    52 IXP_CFLAGS = \ 
    53         -I$(ROOTDIR)/. \ 
    54         -I$(IX_XSCALE_SW)/src/include \ 
    55         -I$(OSAL_DIR)/ \ 
    56         -I$(OSAL_DIR)/os/linux/include/ \ 
    57         -I$(OSAL_DIR)/os/linux/include/modules/ \ 
    58         -I$(OSAL_DIR)/os/linux/include/modules/ioMem/ \ 
    59         -I$(OSAL_DIR)/os/linux/include/modules/bufferMgt/ \ 
    60         -I$(OSAL_DIR)/os/linux/include/core/  \ 
    61         -I$(OSAL_DIR)/os/linux/include/platforms/ \ 
    62         -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ \ 
    63         -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ixp425 \ 
    64         -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ixp465 \ 
    65         -I$(OSAL_DIR)/os/linux/include/core/ \ 
    66         -I$(OSAL_DIR)/include/ \ 
    67         -I$(OSAL_DIR)/include/modules/ \ 
    68         -I$(OSAL_DIR)/include/modules/bufferMgt/ \ 
    69         -I$(OSAL_DIR)/include/modules/ioMem/ \ 
    70         -I$(OSAL_DIR)/include/platforms/ \ 
    71         -I$(OSAL_DIR)/include/platforms/ixp400/ \ 
    72         -DUSE_IXP4XX_CRYPTO 
    73 endif 
    74 endif 
    75 ifdef CONFIG_IXP400_LIB_1_4 
    76 IXP_CFLAGS   = \ 
    77         -I$(ROOTDIR)/. \ 
    78         -I$(ROOTDIR)/modules/ixp425/ixp400-1.4/ixp400_xscale_sw/src/include \ 
    79         -I$(ROOTDIR)/modules/ixp425/ixp400-1.4/ixp400_xscale_sw/src/linux \ 
    80         -DUSE_IXP4XX_CRYPTO 
    81 endif 
    82 ifndef IXPDIR 
    83 IXPDIR = ixp-version-is-not-supported 
    84 endif 
    8540 
    8641ifeq ($(CONFIG_CPU_IXP46X),y) 
  • src/linux/universal/linux-3.2/drivers/Makefile

    r18177 r18190  
    136136 
    137137obj-$(CONFIG_PM_DEVFREQ)        += devfreq/ 
     138obj-$(CONFIG_IXP400_LIB)        += ixp400/ 
  • src/linux/universal/linux-3.2/drivers/ata/pata_ixp4xx_cf.c

    r18171 r18190  
    2525 
    2626#define DRV_NAME        "pata_ixp4xx_cf" 
    27 #define DRV_VERSION     "0.2" 
     27#define DRV_VERSION     "0.3" 
    2828 
    2929static int ixp4xx_set_mode(struct ata_link *link, struct ata_device **error) 
    3030{ 
    3131        struct ata_device *dev; 
     32        struct ixp4xx_pata_data *data = link->ap->host->dev->platform_data; 
     33        unsigned int pio_mask; 
    3234 
    3335        ata_for_each_dev(dev, link, ENABLED) { 
    34                 ata_dev_info(dev, "configured for PIO0\n"); 
    35                 dev->pio_mode = XFER_PIO_0; 
    36                 dev->xfer_mode = XFER_PIO_0; 
     36                if (dev->id[ATA_ID_FIELD_VALID] & (1 << 1)) { 
     37                        pio_mask = dev->id[ATA_ID_PIO_MODES] & 0x03; 
     38                        if (pio_mask & (1 << 1)) { 
     39                                pio_mask = 4; 
     40                        } else { 
     41                                pio_mask = 3; 
     42                        } 
     43                } else { 
     44                        pio_mask = (dev->id[ATA_ID_OLD_PIO_MODES] >> 8); 
     45                } 
     46 
     47                switch (pio_mask){ 
     48                        case 0: 
     49                                ata_dev_printk(dev, KERN_INFO, "configured for PIO0\n"); 
     50                                dev->pio_mode = XFER_PIO_0; 
     51                                dev->xfer_mode = XFER_PIO_0; 
     52                                *data->cs0_cfg = 0x8a473c03; 
     53                                break; 
     54                        case 1: 
     55                                ata_dev_printk(dev, KERN_INFO, "configured for PIO1\n"); 
     56                                dev->pio_mode = XFER_PIO_1; 
     57                                dev->xfer_mode = XFER_PIO_1; 
     58                                *data->cs0_cfg = 0x86433c03; 
     59                                break; 
     60                        case 2: 
     61                                ata_dev_printk(dev, KERN_INFO, "configured for PIO2\n"); 
     62                                dev->pio_mode = XFER_PIO_2; 
     63                                dev->xfer_mode = XFER_PIO_2; 
     64                                *data->cs0_cfg = 0x82413c03; 
     65                                break; 
     66                        case 3: 
     67                                ata_dev_printk(dev, KERN_INFO, "configured for PIO3\n"); 
     68                                dev->pio_mode = XFER_PIO_3; 
     69                                dev->xfer_mode = XFER_PIO_3; 
     70                                *data->cs0_cfg = 0x80823c03; 
     71                                break; 
     72                        case 4: 
     73                                ata_dev_printk(dev, KERN_INFO, "configured for PIO4\n"); 
     74                                dev->pio_mode = XFER_PIO_4; 
     75                                dev->xfer_mode = XFER_PIO_4; 
     76                                *data->cs0_cfg = 0x80403c03; 
     77                                break; 
     78                } 
    3779                dev->xfer_shift = ATA_SHIFT_PIO; 
    3880                dev->flags |= ATA_DFLAG_PIO; 
     
    4789        unsigned int words = buflen >> 1; 
    4890        u16 *buf16 = (u16 *) buf; 
     91        unsigned int pio_mask; 
    4992        struct ata_port *ap = dev->link->ap; 
    5093        void __iomem *mmio = ap->ioaddr.data_addr; 
     
    5497         * 8 bit mode after the transaction. 
    5598         */ 
    56         *data->cs0_cfg &= ~(0x01); 
    57         udelay(100); 
     99        if (dev->id[ATA_ID_FIELD_VALID] & (1 << 1)){ 
     100                pio_mask = dev->id[ATA_ID_PIO_MODES] & 0x03; 
     101                if (pio_mask & (1 << 1)){ 
     102                        pio_mask = 4; 
     103                }else{ 
     104                        pio_mask = 3; 
     105                } 
     106        }else{ 
     107                pio_mask = (dev->id[ATA_ID_OLD_PIO_MODES] >> 8); 
     108        } 
     109        switch (pio_mask){ 
     110                case 0: 
     111                        *data->cs0_cfg = 0xa9643c42; 
     112                break; 
     113                case 1: 
     114                        *data->cs0_cfg = 0x85033c42; 
     115                break; 
     116                case 2: 
     117                        *data->cs0_cfg = 0x80b23c42; 
     118                break; 
     119                case 3: 
     120                        *data->cs0_cfg = 0x80823c42; 
     121                break; 
     122                case 4: 
     123                        *data->cs0_cfg = 0x80403c42; 
     124                break; 
     125        } 
     126        udelay(5); 
    58127 
    59128        /* Transfer multiple of 2 bytes */ 
     
    80149        } 
    81150 
    82         udelay(100); 
    83         *data->cs0_cfg |= 0x01; 
     151        udelay(5); 
     152        switch (pio_mask){ 
     153                case 0: 
     154                        *data->cs0_cfg = 0x8a473c03; 
     155                break; 
     156                case 1: 
     157                        *data->cs0_cfg = 0x86433c03; 
     158                break; 
     159                case 2: 
     160                        *data->cs0_cfg = 0x82413c03; 
     161                break; 
     162                case 3: 
     163                        *data->cs0_cfg = 0x80823c03; 
     164                break; 
     165                case 4: 
     166                        *data->cs0_cfg = 0x80403c03; 
     167                break; 
     168        } 
    84169 
    85170        return words << 1; 
     
    178263        ap->ops = &ixp4xx_port_ops; 
    179264        ap->pio_mask = ATA_PIO4; 
    180         ap->flags |= ATA_FLAG_NO_ATAPI; 
     265        ap->flags  = ATA_FLAG_NO_ATAPI; 
    181266 
    182267        ixp4xx_setup_port(ap, data, cs0->start, cs1->start); 
    183268 
    184         ata_print_version_once(&pdev->dev, DRV_VERSION); 
     269        dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); 
    185270 
    186271        /* activate host */ 
  • src/linux/universal/linux-3.2/drivers/char/Kconfig

    r18171 r18190  
    199199source "drivers/char/ipmi/Kconfig" 
    200200 
     201config IXP425_GPIO 
     202  tristate "IXP425 GPIO Support" 
     203  depends on ARCH_IXP4XX 
     204  ---help--- 
     205    If you want support for user-space access to the ixp425 general 
     206    purpose I/O (GPIO) pins, say Y here, otherwise N. 
     207    This will build in the GPIO device driver for /dev/ixp425-gpio 
     208 
     209 
    201210config DS1620 
    202211        tristate "NetWinder thermometer support" 
  • src/linux/universal/linux-3.2/drivers/char/Makefile

    r18171 r18190  
    6767 
    6868obj-$(CONFIG_TILE_SROM)         += tile-srom.o 
     69obj-$(CONFIG_IXP425_GPIO) += ixp425_gpio.o 
  • src/linux/universal/linux-3.2/drivers/mtd/maps/Kconfig

    r18171 r18190  
    365365          would like to use the flash chips on it, say 'Y'. 
    366366 
     367config MTD_IXP4XXWRT  
     368        tristate "CFI Flash device mapped on Intel IXP4xx based systems (Linksys WRT)" 
     369        depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX 
     370        help 
     371          This enables MTD access to flash devices on platforms based 
     372          on Intel's IXP4xx family of network processors such as the 
     373          IXDP425 and Coyote. If you have an IXP4xx based board and 
     374          would like to use the flash chips on it, say 'Y'. 
     375 
     376 
    367377config MTD_IXP2000 
    368378        tristate "CFI Flash device mapped on Intel IXP2000 based systems" 
  • src/linux/universal/linux-3.2/drivers/mtd/maps/Makefile

    r18188 r18190  
    6363obj-$(CONFIG_MACH_AR7240)       += nvram_kernel.o 
    6464obj-$(CONFIG_MACH_GW2388)       += nvram_kernel.o 
     65obj-$(CONFIG_ARCH_IXP4XX)       += nvram_kernel.o 
    6566obj-$(CONFIG_X86)               += nvram_kernel_x86.o 
  • src/linux/universal/linux-3.2/drivers/mtd/maps/ixp4xx.c

    r18171 r18190  
    11/* 
     2 * $Id: ixp4xx.c,v 1.13 2005/11/16 16:23:21 dvrabel Exp $ 
     3 * 
    24 * drivers/mtd/maps/ixp4xx.c 
    35 * 
     
    2729#include <linux/mtd/map.h> 
    2830#include <linux/mtd/partitions.h> 
     31#include "../mtdcore.h" 
     32#include <linux/vmalloc.h> 
     33#include <linux/squashfs_fs.h> 
    2934 
    3035#include <asm/io.h> 
     
    108113 
    109114        if (from & 1) { 
    110                 *dest++ = BYTE1(flash_read16(src-1)); 
    111                 src++; 
     115                *dest++ = BYTE1(flash_read16(src)); 
     116                src++; 
    112117                --len; 
    113118        } 
     
    119124                src += 2; 
    120125                len -= 2; 
    121         } 
     126        } 
    122127 
    123128        if (len > 0) 
     
    146151        struct mtd_info *mtd; 
    147152        struct map_info map; 
     153        struct mtd_partition *partitions; 
    148154        struct resource *res; 
    149155}; 
     
    151157static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; 
    152158 
     159struct fis_image_desc { 
     160    unsigned char name[16];      // Null terminated name 
     161    unsigned long flash_base;    // Address within FLASH of image 
     162    unsigned long mem_base;      // Address in memory where it executes 
     163    unsigned long size;          // Length of image 
     164    unsigned long entry_point;   // Execution entry point 
     165    unsigned long data_length;   // Length of actual data 
     166    unsigned char _pad[256-(16+7*sizeof(unsigned long))]; 
     167    unsigned long desc_cksum;    // Checksum over image descriptor 
     168    unsigned long file_cksum;    // Checksum over image data 
     169}; 
     170 
     171 
     172static struct mtd_partition dir_parts[] = { 
     173        { name: "RedBoot", offset: 0, size: 0x30000, },//, mask_flags: MTD_WRITEABLE, }, 
     174        { name: "linux", offset: 0x30000, size: 0x390000, }, 
     175        { name: "rootfs", offset: 0x0, size: 0x2b0000,}, //must be detected 
     176        { name: "ddwrt", offset: 0x0, size: 0x2b0000,}, //must be detected 
     177        { name: "mampf", offset: 0x3d0000, size: 0x10000, }, 
     178        { name: "nvram", offset: 0x3d0000, size: 0x10000, }, 
     179        { name: "FIS directory", offset: 0x3e0000, size: 0x10000, }, 
     180        { name: "RedBoot config", offset: 0x3e0000, size: 0x10000, }, 
     181        { name: "fullflash", offset: 0x3e0000, size: 0x10000, }, 
     182        { name: NULL, }, 
     183}; 
     184 
     185/*static struct mtd_partition ixp_parts[] = { 
     186        { name: "boot", offset: 0, size: 0x80000, },//, mask_flags: MTD_WRITEABLE, }, 
     187        { name: "linux", offset: 0x80000, size: 0x390000, }, 
     188        { name: "rootfs", offset: 0x140000, size: 0x2b0000,}, 
     189        { name: "mampf", offset: 0x140000, size: 0x20000,}, 
     190        { name: "nvram", offset: 0x3f0000, size: 0x20000, }, 
     191        { name: NULL, }, 
     192}; 
     193*/ 
    153194static int ixp4xx_flash_remove(struct platform_device *dev) 
    154195{ 
     
    162203 
    163204        if (info->mtd) { 
    164                 mtd_device_unregister(info->mtd); 
     205                del_mtd_partitions(info->mtd); 
    165206                map_destroy(info->mtd); 
    166207        } 
    167208        if (info->map.virt) 
    168209                iounmap(info->map.virt); 
     210 
     211        kfree(info->partitions); 
    169212 
    170213        if (info->res) { 
     
    179222} 
    180223 
     224/*static struct mtd_partition ap71_parts[] = { 
     225        { name: "RedBoot", offset: 0, size: 0x80000, },//, mask_flags: MTD_WRITEABLE, }, 
     226        { name: "linux", offset: 0x80000, size: 0xd20000, }, 
     227        { name: "ramdisk", offset: 0x280000, size: 0xd00000,}, 
     228        { name: "mampf", offset: 0xf80000, size: 0x20000, }, 
     229        { name: "nvram", offset: 0xfa0000, size: 0x20000, }, 
     230        { name: "RedBoot config", offset: 0xfc0000, size: 0x01000, }, 
     231        { name: "FIS directory", offset: 0xfe0000, size: 0x20000, }, 
     232        { name: NULL, }, 
     233};*/ 
     234 
     235#define AP71_MTDP_NUM 7 
     236 
     237 
    181238static int ixp4xx_flash_probe(struct platform_device *dev) 
    182239{ 
    183240        struct flash_platform_data *plat = dev->dev.platform_data; 
    184241        struct ixp4xx_flash_info *info; 
     242        int result = -1; 
     243        struct mtd_info *mtd; 
    185244        int err = -1; 
     245        int offset=0; 
     246        char *buf; 
     247        unsigned char *p; 
     248        struct fis_image_desc *fis;   
    186249 
    187250        if (!plat) 
     
    194257        } 
    195258 
    196         info = kzalloc(sizeof(struct ixp4xx_flash_info), GFP_KERNEL); 
     259        info = kmalloc(sizeof(struct ixp4xx_flash_info), GFP_KERNEL); 
    197260        if(!info) { 
    198261                err = -ENOMEM; 
    199262                goto Error; 
    200263        } 
     264        memset(info,0,sizeof(struct ixp4xx_flash_info)); 
    201265 
    202266        platform_set_drvdata(dev, info); 
     
    207271         */ 
    208272        info->map.phys = NO_XIP; 
    209         info->map.size = resource_size(dev->resource); 
     273        info->map.size = dev->resource->end - dev->resource->start + 1; 
    210274 
    211275        /* 
     
    216280        info->map.bankwidth = 2; 
    217281        info->map.name = dev_name(&dev->dev); 
    218         info->map.read = ixp4xx_read16; 
    219         info->map.write = ixp4xx_probe_write16; 
    220         info->map.copy_from = ixp4xx_copy_from; 
    221  
     282        info->map.read = ixp4xx_read16, 
     283        info->map.write = ixp4xx_probe_write16, 
     284        info->map.copy_from = ixp4xx_copy_from, 
     285        printk(KERN_ERR "try to reserve 0x%08X with size of 0x%08X\n",dev->resource->start,dev->resource->end - dev->resource->start + 1); 
    222286        info->res = request_mem_region(dev->resource->start, 
    223                         resource_size(dev->resource), 
     287                        dev->resource->end - dev->resource->start + 1, 
    224288                        "IXP4XXFlash"); 
    225289        if (!info->res) { 
     
    230294 
    231295        info->map.virt = ioremap(dev->resource->start, 
    232                                  resource_size(dev->resource)); 
     296                                 dev->resource->end - dev->resource->start + 1); 
    233297        if (!info->map.virt) { 
    234298                printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n"); 
     
    246310 
    247311        /* Use the fast version */ 
    248         info->map.write = ixp4xx_write16; 
    249  
    250         err = mtd_device_parse_register(info->mtd, probes, dev->resource->start, 
    251                         plat->parts, plat->nr_parts); 
    252         if (err) { 
    253                 printk(KERN_ERR "Could not parse partitions\n"); 
     312        info->map.write = ixp4xx_write16, 
     313 
     314        printk(KERN_EMERG "scanning for root partition\n"); 
     315        mtd = info->mtd; 
     316        offset = 0; 
     317        buf = info->map.virt; 
     318        int foundconfig=0; 
     319        int foundfis=0; 
     320        int filesyssize=0; 
     321        int tmplen; 
     322        int erasesize = mtd->erasesize; 
     323        #ifdef CONFIG_TONZE 
     324        erasesize=0x20000; 
     325        #endif 
     326        #ifdef CONFIG_NOP8670 
     327        erasesize=0x20000; 
     328        #endif 
     329        while((offset+erasesize)<mtd->size) 
     330            { 
     331            printk(KERN_EMERG "[0x%08X]\r",offset); 
     332            if (*((__u32 *) buf) == SQUASHFS_MAGIC || *((__u16 *) buf) == 0x1985)  
     333                { 
     334                struct squashfs_super_block *sb = (struct squashfs_super_block *) buf; 
     335                if (*((__u16 *) buf) != 0x1985) 
     336                        { 
     337                        filesyssize = sb->bytes_used; 
     338                        tmplen = offset + filesyssize; 
     339                        tmplen +=  (erasesize - 1); 
     340                        tmplen &= ~(erasesize - 1); 
     341                        filesyssize = tmplen - offset; 
     342                        } 
     343 
     344 
     345                printk(KERN_EMERG "\nfound squashfs/jffs2 at %X\n",offset); 
     346                dir_parts[2].offset = offset; 
     347                //detect now compex board 
     348                //printk(KERN_EMERG "id = %s\n",(char*)(info->map.virt+0x23d6)); 
     349                if (!strncmp((char*)(info->map.virt+0x23d6),"myloram.bin",11)) 
     350                    { 
     351                    printk(KERN_EMERG "Compex WP188 detected!\n"); 
     352                    dir_parts[0].size=0x40000; 
     353                    dir_parts[0].offset=0; 
     354                    dir_parts[7].size=0x1000; 
     355                    dir_parts[7].offset = mtd->size-0x1000; 
     356                    dir_parts[6].size=erasesize; 
     357                    dir_parts[6].offset = mtd->size-erasesize; 
     358 
     359                    long highest=dir_parts[6].offset; 
     360                    #ifdef CONFIG_TONZE 
     361                    highest&= ~(erasesize-1);  
     362                    #endif 
     363                    dir_parts[2].size=(highest - (erasesize*2)) - dir_parts[2].offset; 
     364                    dir_parts[4].offset=highest - erasesize*2; 
     365                    dir_parts[4].size=erasesize; 
     366                    dir_parts[5].offset=highest - erasesize; 
     367                    dir_parts[5].size=erasesize; 
     368                    dir_parts[1].offset=0x40000; 
     369                    dir_parts[1].size=dir_parts[2].offset-dir_parts[1].offset+dir_parts[2].size; 
     370                    goto def; 
     371                    } 
     372                 
     373                 
     374                 
     375                //now scan for linux offset 
     376#ifdef CONFIG_NOP8670 
     377                p=(unsigned char*)(info->map.virt+mtd->size-erasesize); 
     378#elif CONFIG_TONZE 
     379                p=(unsigned char*)(info->map.virt+mtd->size-0x8000); 
     380#else 
     381                p=(unsigned char*)(info->map.virt+mtd->size-erasesize); 
     382#endif 
     383                fis = (struct fis_image_desc*)p; 
     384                printk(KERN_EMERG "scan redboot from %p\n",fis); 
     385                while(1) 
     386                { 
     387                if (fis->name[0]==0xff) 
     388                    { 
     389                    goto def; 
     390                    } 
     391                if (!strncmp(fis->name,"RedBoot",7) && strncmp(fis->name,"RedBoot config",14)) 
     392                    { 
     393                    printk(KERN_EMERG "found RedBoot partition at [0x%08lX]\n",fis->flash_base); 
     394                    dir_parts[0].size=fis->size; 
     395                    } 
     396                if (!strncmp(fis->name,"RedBoot config",14)) 
     397                    { 
     398                    printk(KERN_EMERG "found RedBoot config partition at [0x%08lX]\n",fis->flash_base); 
     399                    dir_parts[7].size=mtd->erasesize; 
     400                    dir_parts[7].offset=fis->flash_base&(mtd->size-1); 
     401#ifdef CONFIG_TONZE 
     402                    dir_parts[7].offset&= ~(erasesize-1); 
     403#endif               
     404                    if (foundfis) 
     405                    { 
     406                    long highest=dir_parts[5].offset; 
     407                    if (dir_parts[6].offset<highest) 
     408                        highest=dir_parts[6].offset; 
     409#ifdef CONFIG_TONZE 
     410                    highest&= ~(erasesize-1);  
     411#endif 
     412                    dir_parts[2].size=(highest - (erasesize*2)) - dir_parts[2].offset; 
     413                    dir_parts[4].offset=highest - erasesize*2; 
     414                    dir_parts[4].size=erasesize; 
     415                    dir_parts[5].offset=highest - erasesize; 
     416                    dir_parts[5].size=erasesize; 
     417                    } 
     418                    foundconfig=1; 
     419                    } 
     420                if (!strncmp(fis->name,"linux",5) || !strncmp(fis->name,"vmlinux",7) || !strncmp(fis->name,"kernel",6)) 
     421                    { 
     422                    printk(KERN_EMERG "found linux partition at [0x%08lX]\n",fis->flash_base); 
     423                    dir_parts[1].offset=fis->flash_base&(mtd->size-1); 
     424                    dir_parts[1].size=dir_parts[2].offset-dir_parts[1].offset+dir_parts[2].size; 
     425                    } 
     426                if (!strncmp(fis->name,"FIS directory",13)) 
     427                    { 
     428                    printk(KERN_EMERG "found config partition at [0x%08lX]\n",fis->flash_base); 
     429                    dir_parts[6].offset=(fis->flash_base&(mtd->size-1)); 
     430                    dir_parts[6].size=mtd->erasesize; 
     431#ifdef CONFIG_TONZE 
     432                    dir_parts[6].offset&= ~(erasesize-1); 
     433#endif               
     434                    if (foundconfig) 
     435                    { 
     436                    long highest=dir_parts[6].offset; 
     437                    if (dir_parts[7].offset<highest) 
     438                        highest=dir_parts[7].offset; 
     439#ifdef CONFIG_TONZE 
     440                    highest&= ~(erasesize-1);  
     441#endif 
     442                    dir_parts[2].size=(highest - (erasesize*2)) - dir_parts[2].offset; 
     443                    dir_parts[4].offset=highest - erasesize*2; 
     444                    dir_parts[4].size=erasesize; 
     445                    dir_parts[5].offset=highest - erasesize; 
     446                    dir_parts[5].size=erasesize; 
     447                    } 
     448                    foundfis=1; 
     449                    } 
     450                p+=sizeof(struct fis_image_desc); 
     451                fis = (struct fis_image_desc*)p; 
     452                } 
     453                break; 
     454                } 
     455#ifdef CONFIG_TONZE 
     456            offset+=0x1000; 
     457            buf+=0x1000; 
     458#else 
     459            offset+=erasesize; 
     460            buf+=erasesize; 
     461#endif 
     462            } 
     463        def:; 
     464        info->partitions=dir_parts; 
     465        if (filesyssize) 
     466            { 
     467            dir_parts[2].size = filesyssize;     
     468            } 
     469        dir_parts[3].offset = dir_parts[2].offset+dir_parts[2].size; 
     470        dir_parts[3].size = dir_parts[4].offset-dir_parts[3].offset; 
     471 
     472        dir_parts[8].offset = 0; 
     473        dir_parts[8].size = mtd->size; 
     474 
     475        err = add_mtd_partitions(mtd, dir_parts, 9); 
     476 
     477/*#ifndef CONFIG_NOP8670 
     478        err = parse_mtd_partitions(info->mtd, probes, &info->partitions, dev->resource->start); 
     479#else 
     480        info->partitions=ap71_parts; 
     481        err=AP71_MTDP_NUM;     
     482#endif 
     483        if (err > 0) { 
     484                err = add_mtd_partitions(info->mtd, info->partitions, err); 
     485                if(err) 
     486                        printk(KERN_ERR "Could not parse partitions\n"); 
     487        } 
     488*/ 
     489        if (err) 
    254490                goto Error; 
    255         } 
    256491 
    257492        return 0; 
     
    267502        .driver         = { 
    268503                .name   = "IXP4XX-Flash", 
    269                 .owner  = THIS_MODULE, 
    270504        }, 
    271505}; 
     
    288522MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems"); 
    289523MODULE_AUTHOR("Deepak Saxena"); 
    290 MODULE_ALIAS("platform:IXP4XX-Flash"); 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/Kconfig

    r18171 r18190  
    5858source "drivers/net/ethernet/xscale/Kconfig" 
    5959source "drivers/net/ethernet/icplus/Kconfig" 
     60 
     61 
     62config IXP400_ETH 
     63        tristate "Intel IXP400 Ethernet Device support" 
     64        depends on ETHERNET && ARM && (ARCH_IXP4XX) 
     65        ---help--- 
     66          If you select M here, the Intel IXP400 Ethernet driver will be 
     67          compiled as part of the build. 
     68  
     69          In order for the driver to build correctly you must set up some 
     70          environment variables before building the kernel. See the README 
     71          files that accompany the IXP400 software or Linux Ethernet Driver 
     72          distribution for details. 
     73  
     74          Note that this driver is Intel proprietary code and must be obtained 
     75          from Intel Corp. See the README files that accompany the IXP400 
     76          software or Linux Ethernet Driver distribution for details. 
     77  
     78          The driver can be compiled only as a module, as linking it 
     79          statically into the kernel would violate the GPL. The module will be 
     80          called ixp400_eth.ko 
     81  
     82          Select M if you have the IXP400 ethernet driver source code and wish 
     83          to include it in your build. 
     84 
     85choice  
     86        prompt "Intel IXP400 Ethernet Device Driver NPE support" 
     87        depends on IXP400_ETH 
     88        default IXP400_ETH_ALL 
     89        ---help--- 
     90          If you select 'All NPEs' option here, the Intel IXP400 Ethernet driver 
     91          will be compiled to configure all Ethernet NPEs and map "ixp0" device 
     92          to Ethernet NPE B, "ixp1" device to Ethernet NPE C, and "ixp2" device 
     93          to Ethernet NPE A (for IXP455 & IXP465 silicon only). 
     94  
     95          If you select 'NPEB-only' option here, the Intel IXP400 Ethernet driver 
     96          will be compiled to map "ixp0" device to Ethernet NPE B only. 
     97  
     98          If you select 'NPEC-only' option here, the Intel IXP400 Ethernet driver 
     99          will be compiled to map "ixp1" device to Ethernet NPE C only. 
     100  
     101          See the README files that accompany the IXP400 
     102          software or Linux Ethernet Driver distribution for details. 
     103 
     104config IXP400_ETH_ALL 
     105        bool "All_NPEs" 
     106 
     107config IXP400_ETH_NPEB_ONLY 
     108        bool "NPEB-Only" 
     109 
     110config IXP400_ETH_NPEC_ONLY 
     111        bool "NPEC-Only" 
     112 
     113endchoice 
     114 
     115config IXP400_ETH_SKB_RECYCLE 
     116        depends on IXP400_ETH 
     117        bool "Intel IXP400 Ethernet Device Driver Fast Skb Recycling support" 
     118        ---help--- 
     119          If you select Y here, the Intel IXP400 Ethernet driver will be 
     120          compiled to internally recycle skbufs. 
     121  
     122          IMPORTANT: This option, if enabled, may NOT work with some 
     123          patched kernels. 
     124  
     125          If unsure select N here. 
     126  
     127          See the README files that accompany the IXP400 
     128          software or Linux Ethernet Driver distribution for details. 
     129 
     130config IXP400_ETH_QDISC_ENABLED 
     131        depends on IXP400_ETH 
     132        bool "Intel IXP400 Ethernet Device Driver Fast QDisc support" 
     133        ---help--- 
     134          If you select Y here, the Intel IXP400 Ethernet driver will be 
     135          compiled to internally use its own queueing discipline (qdisc). 
     136  
     137          IMPORTANT: This option may NOT work with some debug tools or 
     138          some kernel features. 
     139  
     140          If unsure select N here. 
     141  
     142          See the README files that accompany the IXP400 
     143          software or Linux Ethernet Driver distribution for details. 
     144 
     145config IXP400_NAPI 
     146        depends on IXP400_ETH 
     147        bool "Intel IXP400 Ethernet Device Driver NAPI support" 
     148        ---help--- 
     149          If you select Y here, the Intel IXP400 Ethernet driver will be 
     150          compiled to use the Linux kernel's NAPI polling interface. 
     151  
     152          If unsure select N here. 
     153  
     154          See the README files that accompany the IXP400 
     155          software or Linux Ethernet Driver distribution for details. 
     156 
     157 
    60158 
    61159config JME 
  • src/linux/universal/linux-3.2/drivers/net/ethernet/Makefile

    r18171 r18190  
    22# Makefile for the Linux network Ethernet device drivers. 
    33# 
     4IX_XSCALE_SW := drivers/ixp400/ixp400_xscale_sw 
     5OSAL_DIR := $(IX_XSCALE_SW)/../ixp_osal 
     6 
     7OSAL_INCLUDES += \ 
     8  -I$(OSAL_DIR)/ \ 
     9  -I$(OSAL_DIR)/common/include/ \ 
     10  -I$(OSAL_DIR)/common/include/modules/ioMem \ 
     11  -I$(OSAL_DIR)/common/include/modules/ddk \ 
     12  -I$(OSAL_DIR)/common/include/modules/bufferMgt \ 
     13  -I$(OSAL_DIR)/common/os/linux/include/modules/ioMem \ 
     14  -I$(OSAL_DIR)/common/os/linux/include/modules/ddk \ 
     15  -I$(OSAL_DIR)/common/os/linux/include/modules/bufferMgt \ 
     16  -I$(OSAL_DIR)/common/os/linux/include/core 
     17 
     18OSAL_CFLAGS += \ 
     19  -D__linux \ 
     20  -DIX_TARGET=linuxbe \ 
     21  -DIX_UTOPIAMODE=0 \ 
     22  -DIX_MPHYSINGLEPORT=0 \ 
     23  -D__LINUX_ARM_ARCH__=5 \ 
     24  -DCPU=33 \ 
     25  -DXSCALE=33 \ 
     26        -DWall \ 
     27  -DENABLE_IOMEM \ 
     28  -DENABLE_BUFFERMGT 
     29 
     30ifeq ($(CONFIG_CPU_IXP46X),y) 
     31OSAL_CFLAGS += -D__ixp46X 
     32OSAL_INCLUDES += -I$(OSAL_DIR)/platforms/ixp46X/include 
     33OSAL_INCLUDES += -I$(OSAL_DIR)/platforms/ixp46X/os/linux/include 
     34else 
     35ifeq ($(CONFIG_CPU_IXP43X),y) 
     36OSAL_CFLAGS += -D__ixp43X 
     37OSAL_INCLUDES += -I$(OSAL_DIR)/platforms/ixp43X/include 
     38OSAL_INCLUDES += -I$(OSAL_DIR)/platforms/ixp43X/os/linux/include 
     39else 
     40OSAL_CFLAGS += -D__ixp42X 
     41OSAL_INCLUDES += -I$(OSAL_DIR)/platforms/ixp42X/include 
     42OSAL_INCLUDES += -I$(OSAL_DIR)/platforms/ixp42X/os/linux/include 
     43endif 
     44endif 
     45 
     46 
     47CFLAGS_ixp400_eth.o     = -DWall \ 
     48                          -I$(IX_XSCALE_SW)/src/include \ 
     49                          ${OSAL_INCLUDES} \ 
     50                          ${OSAL_CFLAGS} 
    451 
    552obj-$(CONFIG_NET_VENDOR_3COM) += 3com/ 
     
    78125obj-$(CONFIG_AG7240) += ag7240/ 
    79126obj-y += ag71xx/ 
     127obj-$(CONFIG_IXP400_ETH) += ixp400_eth.o 
  • src/linux/universal/linux-3.2/drivers/tty/serial/8250.c

    r18171 r18190  
    427427} 
    428428 
     429static unsigned int memdelay_serial_in(struct uart_port *p, int offset) 
     430{ 
     431        struct uart_8250_port *up = (struct uart_8250_port *)p; 
     432        udelay(up->port.rw_delay); 
     433        return mem_serial_in(p, offset); 
     434} 
     435 
     436static void memdelay_serial_out(struct uart_port *p, int offset, int value) 
     437{ 
     438        struct uart_8250_port *up = (struct uart_8250_port *)p; 
     439        udelay(up->port.rw_delay); 
     440        mem_serial_out(p, offset, value); 
     441} 
     442 
    429443static void mem32_serial_out(struct uart_port *p, int offset, int value) 
    430444{ 
     
    486500                break; 
    487501 
     502        case UPIO_MEM_DELAY: 
     503                p->serial_in = memdelay_serial_in; 
     504                p->serial_out = memdelay_serial_out; 
     505                break; 
     506 
    488507        case UPIO_AU: 
    489508                p->serial_in = au_serial_in; 
     
    508527        case UPIO_MEM: 
    509528        case UPIO_MEM32: 
     529        case UPIO_MEM_DELAY: 
    510530        case UPIO_AU: 
    511531                p->serial_out(p, offset, value); 
     
    25292549        case UPIO_MEM32: 
    25302550        case UPIO_MEM: 
     2551        case UPIO_MEM_DELAY: 
    25312552                if (!up->port.mapbase) 
    25322553                        break; 
     
    25652586        case UPIO_MEM32: 
    25662587        case UPIO_MEM: 
     2588        case UPIO_MEM_DELAY: 
    25672589                if (!up->port.mapbase) 
    25682590                        break; 
     
    30813103                port.pm                 = p->pm; 
    30823104                port.dev                = &dev->dev; 
     3105                port.rw_delay           = p->rw_delay; 
    30833106                port.irqflags           |= irqflag; 
    30843107                ret = serial8250_register_port(&port); 
     
    32303253                uart->port.flags        = port->flags | UPF_BOOT_AUTOCONF; 
    32313254                uart->port.mapbase      = port->mapbase; 
     3255                uart->port.rw_delay                     = port->rw_delay; 
    32323256                uart->port.private_data = port->private_data; 
    32333257                if (port->dev) 
  • src/linux/universal/linux-3.2/drivers/tty/serial/Kconfig

    r18171 r18190  
    236236          If unsure, say N. 
    237237 
     238config SERIAL_8250_GW2356 
     239        bool "GW2356 serial port support" 
     240        depends on SERIAL_8250 != n && MACH_KIXRP435 
     241        help 
     242                ::: To be written ::: 
     243 
     244config SERIAL_8250_GW2358 
     245        tristate "GW2358 serial port support" 
     246        depends on SERIAL_8250 != n && MACH_CAMBRIA 
     247        help 
     248                ::: To be written ::: 
     249 
     250 
     251 
    238252config SERIAL_8250_RSA 
    239253        bool "Support RSA serial ports" 
  • src/linux/universal/linux-3.2/drivers/tty/serial/Makefile

    r18171 r18190  
    2929obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o 
    3030obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o 
     31obj-$(CONFIG_SERIAL_8250_GW2356) += 8250_gw2356.o 
     32obj-$(CONFIG_SERIAL_8250_GW2358) += 8250_gw2358.o 
     33obj-$(CONFIG_SERIAL_8250_GW2358) += 8250_gw2350.o 
    3134obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o 
    3235obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o 
  • src/linux/universal/linux-3.2/drivers/tty/serial/serial_core.c

    r18171 r18190  
    20462046                         "I/O 0x%lx offset 0x%x", port->iobase, port->hub6); 
    20472047                break; 
     2048        case UPIO_MEM_DELAY: 
    20482049        case UPIO_MEM: 
    20492050        case UPIO_MEM32: 
     
    24582459                return (port1->iobase == port2->iobase) && 
    24592460                       (port1->hub6   == port2->hub6); 
     2461        case UPIO_MEM_DELAY: 
    24602462        case UPIO_MEM: 
    24612463        case UPIO_MEM32: 
  • src/linux/universal/linux-3.2/include/linux/serial_8250.h

    r18171 r18190  
    2828        unsigned char   regshift;       /* register shift */ 
    2929        unsigned char   iotype;         /* UPIO_* */ 
     30        unsigned int rw_delay;  /* udelay for slower busses IXP4XX Expansion Bus */ 
    3031        unsigned char   hub6; 
    3132        upf_t           flags;          /* UPF_* flags */ 
  • src/linux/universal/linux-3.2/include/linux/serial_core.h

    r18171 r18190  
    321321#define UPIO_TSI                (5)                     /* Tsi108/109 type IO */ 
    322322#define UPIO_RM9000             (6)                     /* RM9000 type IO */ 
     323#define UPIO_MEM_DELAY          (7) 
    323324 
    324325        unsigned int            read_status_mask;       /* driver specific */ 
     
    364365        unsigned int            mctrl;                  /* current modem ctrl settings */ 
    365366        unsigned int            timeout;                /* character-based timeout */ 
     367        unsigned int            rw_delay;               /* udelay for slow busses, IXP4XX Expansion Bus */ 
    366368        unsigned int            type;                   /* port type */ 
    367369        const struct uart_ops   *ops; 
  • src/linux/universal/linux-3.2/kernel/signal.c

    r18171 r18190  
    13441344        return error; 
    13451345} 
     1346EXPORT_SYMBOL(kill_proc_info); 
    13461347 
    13471348static int kill_as_cred_perm(const struct cred *cred, 
  • src/linux/universal/linux-3.2/net/core/skbuff.c

    r18171 r18190  
    881881                BUG(); 
    882882 
     883#ifdef CONFIG_ARCH_IXP4XX  
     884        gfp_mask |= GFP_DMA; 
     885#endif 
     886 
    883887        size = SKB_DATA_ALIGN(size); 
    884888 
Note: See TracChangeset for help on using the changeset viewer.