This source file includes following definitions.
- pcm027_init
- pcm027_map_io
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 #include <linux/irq.h>
  21 #include <linux/platform_device.h>
  22 #include <linux/mtd/physmap.h>
  23 #include <linux/spi/spi.h>
  24 #include <linux/spi/max7301.h>
  25 #include <linux/spi/pxa2xx_spi.h>
  26 #include <linux/leds.h>
  27 
  28 #include <asm/mach-types.h>
  29 #include <asm/mach/arch.h>
  30 #include "pxa27x.h"
  31 #include "pcm027.h"
  32 #include "generic.h"
  33 
  34 
  35 
  36 
  37 
  38 
  39 
  40 
  41 
  42 
  43 
  44 
  45 
  46 
  47 
  48 
  49 
  50 
  51 
  52 
  53 
  54 
  55 
  56 
  57 
  58 
  59 
  60 
  61 
  62 
  63 
  64 
  65 
  66 
  67 
  68 
  69 
  70 
  71 
  72 
  73 
  74 
  75 
  76 
  77 
  78 
  79 
  80 
  81 
  82 
  83 static unsigned long pcm027_pin_config[] __initdata = {
  84         
  85         GPIO20_nSDCS_2,
  86         GPIO21_nSDCS_3,
  87         GPIO15_nCS_1,
  88         GPIO78_nCS_2,
  89         GPIO80_nCS_4,
  90         GPIO33_nCS_5,   
  91 
  92         
  93         GPIO117_I2C_SCL,
  94         GPIO118_I2C_SDA,
  95 
  96         
  97         GPIO52_GPIO,    
  98 #ifdef CONFIG_LEDS_GPIO
  99         GPIO90_GPIO,    
 100         GPIO91_GPIO,    
 101 #endif
 102         GPIO114_GPIO,   
 103 };
 104 
 105 
 106 
 107 
 108 static struct resource smc91x_resources[] = {
 109         [0] = {
 110                 .start  = PCM027_ETH_PHYS + 0x300,
 111                 .end    = PCM027_ETH_PHYS + PCM027_ETH_SIZE,
 112                 .flags  = IORESOURCE_MEM,
 113         },
 114         [1] = {
 115                 .start  = PCM027_ETH_IRQ,
 116                 .end    = PCM027_ETH_IRQ,
 117                 
 118                 .flags  = IORESOURCE_IRQ | PCM027_ETH_IRQ_EDGE,
 119         }
 120 };
 121 
 122 static struct platform_device smc91x_device = {
 123         .name           = "smc91x",
 124         .id             = 0,
 125         .num_resources  = ARRAY_SIZE(smc91x_resources),
 126         .resource       = smc91x_resources,
 127 };
 128 
 129 
 130 
 131 
 132 static struct pxa2xx_spi_controller pxa_ssp_master_info = {
 133         .num_chipselect = 1,
 134 };
 135 
 136 static struct max7301_platform_data max7301_info = {
 137         .base = -1,
 138 };
 139 
 140 
 141 static struct spi_board_info spi_board_info[] __initdata = {
 142         {
 143                 .modalias       = "max7301",
 144                 .platform_data  = &max7301_info,
 145                 .max_speed_hz   = 13000000,
 146                 .bus_num        = 1,
 147                 .chip_select    = 0,
 148                 .mode           = SPI_MODE_0,
 149         },
 150 };
 151 
 152 
 153 
 154 
 155 static struct physmap_flash_data pcm027_flash_data = {
 156         .width  = 4,
 157 };
 158 
 159 static struct resource pcm027_flash_resource = {
 160         .start          = PCM027_FLASH_PHYS,
 161         .end            = PCM027_FLASH_PHYS + PCM027_FLASH_SIZE - 1 ,
 162         .flags          = IORESOURCE_MEM,
 163 };
 164 
 165 static struct platform_device pcm027_flash = {
 166         .name           = "physmap-flash",
 167         .id             = 0,
 168         .dev            = {
 169                 .platform_data  = &pcm027_flash_data,
 170         },
 171         .resource       = &pcm027_flash_resource,
 172         .num_resources  = 1,
 173 };
 174 
 175 #ifdef CONFIG_LEDS_GPIO
 176 
 177 static struct gpio_led pcm027_led[] = {
 178         {
 179                 .name = "led0:red",     
 180                 .gpio = PCM027_LED_CPU
 181         },
 182         {
 183                 .name = "led1:green",   
 184                 .gpio = PCM027_LED_HEARD_BEAT
 185         },
 186 };
 187 
 188 static struct gpio_led_platform_data pcm027_led_data = {
 189         .num_leds       = ARRAY_SIZE(pcm027_led),
 190         .leds           = pcm027_led
 191 };
 192 
 193 static struct platform_device pcm027_led_dev = {
 194         .name           = "leds-gpio",
 195         .id             = 0,
 196         .dev            = {
 197                 .platform_data  = &pcm027_led_data,
 198         },
 199 };
 200 
 201 #endif 
 202 
 203 
 204 
 205 
 206 static struct platform_device *devices[] __initdata = {
 207         &smc91x_device,
 208         &pcm027_flash,
 209 #ifdef CONFIG_LEDS_GPIO
 210         &pcm027_led_dev
 211 #endif
 212 };
 213 
 214 
 215 
 216 
 217 static void __init pcm027_init(void)
 218 {
 219         
 220 
 221 
 222 
 223         ARB_CNTRL = ARB_CORE_PARK | 0x234;
 224 
 225         pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config));
 226 
 227         pxa_set_ffuart_info(NULL);
 228         pxa_set_btuart_info(NULL);
 229         pxa_set_stuart_info(NULL);
 230 
 231         platform_add_devices(devices, ARRAY_SIZE(devices));
 232 
 233         
 234 #ifdef CONFIG_MACH_PCM990_BASEBOARD
 235         pcm990_baseboard_init();
 236 #endif
 237 
 238         pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
 239         spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
 240 }
 241 
 242 static void __init pcm027_map_io(void)
 243 {
 244         pxa27x_map_io();
 245 
 246         
 247         PGSR0 = 0x01308000;
 248         PGSR1 = 0x00CF0002;
 249         PGSR2 = 0x0E294000;
 250         PGSR3 = 0x0000C000;
 251         PWER  = 0x40000000 | PWER_GPIO0 | PWER_GPIO1;
 252         PRER  = 0x00000000;
 253         PFER  = 0x00000003;
 254 }
 255 
 256 MACHINE_START(PCM027, "Phytec Messtechnik GmbH phyCORE-PXA270")
 257         
 258         .atag_offset    = 0x100,
 259         .map_io         = pcm027_map_io,
 260         .nr_irqs        = PCM027_NR_IRQS,
 261         .init_irq       = pxa27x_init_irq,
 262         .handle_irq     = pxa27x_handle_irq,
 263         .init_time      = pxa_timer_init,
 264         .init_machine   = pcm027_init,
 265         .restart        = pxa_restart,
 266 MACHINE_END