blob: ecee7e829110b80b6d0b348e5a6b9be7a581ea58 [file] [log] [blame]
Mike Rapoportcf75d8d2008-08-26 14:03:44 +01001/*
2 * linux/arch/arm/mach-pxa/cm-x300.c
3 *
4 * Support for the CompuLab CM-X300 modules
5 *
6 * Copyright (C) 2008 CompuLab Ltd.
7 *
8 * Mike Rapoport <mike@compulab.co.il>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/module.h>
16#include <linux/kernel.h>
17#include <linux/interrupt.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20
21#include <linux/gpio.h>
22#include <linux/dm9000.h>
23#include <linux/leds.h>
Mike Rapoport1858ced2009-06-04 10:44:52 +030024#include <linux/rtc-v3020.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010025
26#include <linux/i2c.h>
27#include <linux/i2c/pca953x.h>
28
Igor Grinberg83e560e2009-10-14 09:20:19 +020029#include <linux/spi/spi.h>
30#include <linux/spi/spi_gpio.h>
31#include <linux/spi/tdo24m.h>
32
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010033#include <asm/mach-types.h>
34#include <asm/mach/arch.h>
Mike Rapoportb5a5c472009-06-04 10:44:54 +030035#include <asm/setup.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010036
Eric Miao51c62982009-01-02 23:17:22 +080037#include <mach/pxa300.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010038#include <mach/pxafb.h>
39#include <mach/mmc.h>
40#include <mach/ohci.h>
Eric Miaof0a83702009-04-13 15:03:11 +080041#include <plat/i2c.h>
Haojian Zhuang82b95ec2009-09-10 13:55:23 +080042#include <plat/pxa3xx_nand.h>
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010043
44#include <asm/mach/map.h>
45
46#include "generic.h"
47
48#define CM_X300_ETH_PHYS 0x08000010
49
Mike Rapoport0bff2fc2009-10-15 10:11:09 +020050#define GPIO82_MMC_IRQ (82)
51#define GPIO85_MMC_WP (85)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010052
Mike Rapoport0bff2fc2009-10-15 10:11:09 +020053#define CM_X300_MMC_IRQ IRQ_GPIO(GPIO82_MMC_IRQ)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010054
Mike Rapoport1858ced2009-06-04 10:44:52 +030055#define GPIO95_RTC_CS (95)
56#define GPIO96_RTC_WR (96)
57#define GPIO97_RTC_RD (97)
58#define GPIO98_RTC_IO (98)
59
Mike Rapoportcf75d8d2008-08-26 14:03:44 +010060static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = {
61 /* LCD */
62 GPIO54_LCD_LDD_0,
63 GPIO55_LCD_LDD_1,
64 GPIO56_LCD_LDD_2,
65 GPIO57_LCD_LDD_3,
66 GPIO58_LCD_LDD_4,
67 GPIO59_LCD_LDD_5,
68 GPIO60_LCD_LDD_6,
69 GPIO61_LCD_LDD_7,
70 GPIO62_LCD_LDD_8,
71 GPIO63_LCD_LDD_9,
72 GPIO64_LCD_LDD_10,
73 GPIO65_LCD_LDD_11,
74 GPIO66_LCD_LDD_12,
75 GPIO67_LCD_LDD_13,
76 GPIO68_LCD_LDD_14,
77 GPIO69_LCD_LDD_15,
78 GPIO72_LCD_FCLK,
79 GPIO73_LCD_LCLK,
80 GPIO74_LCD_PCLK,
81 GPIO75_LCD_BIAS,
82
83 /* BTUART */
84 GPIO111_UART2_RTS,
85 GPIO112_UART2_RXD | MFP_LPM_EDGE_FALL,
86 GPIO113_UART2_TXD,
87 GPIO114_UART2_CTS | MFP_LPM_EDGE_BOTH,
88
89 /* STUART */
90 GPIO109_UART3_TXD,
91 GPIO110_UART3_RXD | MFP_LPM_EDGE_FALL,
92
93 /* AC97 */
94 GPIO23_AC97_nACRESET,
95 GPIO24_AC97_SYSCLK,
96 GPIO29_AC97_BITCLK,
97 GPIO25_AC97_SDATA_IN_0,
98 GPIO27_AC97_SDATA_OUT,
99 GPIO28_AC97_SYNC,
100
101 /* Keypad */
102 GPIO115_KP_MKIN_0 | MFP_LPM_EDGE_BOTH,
103 GPIO116_KP_MKIN_1 | MFP_LPM_EDGE_BOTH,
104 GPIO117_KP_MKIN_2 | MFP_LPM_EDGE_BOTH,
105 GPIO118_KP_MKIN_3 | MFP_LPM_EDGE_BOTH,
106 GPIO119_KP_MKIN_4 | MFP_LPM_EDGE_BOTH,
107 GPIO120_KP_MKIN_5 | MFP_LPM_EDGE_BOTH,
108 GPIO2_2_KP_MKIN_6 | MFP_LPM_EDGE_BOTH,
109 GPIO3_2_KP_MKIN_7 | MFP_LPM_EDGE_BOTH,
110 GPIO121_KP_MKOUT_0,
111 GPIO122_KP_MKOUT_1,
112 GPIO123_KP_MKOUT_2,
113 GPIO124_KP_MKOUT_3,
114 GPIO125_KP_MKOUT_4,
115 GPIO4_2_KP_MKOUT_5,
116
117 /* MMC1 */
118 GPIO3_MMC1_DAT0,
119 GPIO4_MMC1_DAT1 | MFP_LPM_EDGE_BOTH,
120 GPIO5_MMC1_DAT2,
121 GPIO6_MMC1_DAT3,
122 GPIO7_MMC1_CLK,
123 GPIO8_MMC1_CMD, /* CMD0 for slot 0 */
124
125 /* MMC2 */
126 GPIO9_MMC2_DAT0,
127 GPIO10_MMC2_DAT1 | MFP_LPM_EDGE_BOTH,
128 GPIO11_MMC2_DAT2,
129 GPIO12_MMC2_DAT3,
130 GPIO13_MMC2_CLK,
131 GPIO14_MMC2_CMD,
132
133 /* FFUART */
134 GPIO30_UART1_RXD | MFP_LPM_EDGE_FALL,
135 GPIO31_UART1_TXD,
136 GPIO32_UART1_CTS,
137 GPIO37_UART1_RTS,
138 GPIO33_UART1_DCD,
139 GPIO34_UART1_DSR | MFP_LPM_EDGE_FALL,
140 GPIO35_UART1_RI,
141 GPIO36_UART1_DTR,
142
143 /* GPIOs */
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100144 GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */
145 GPIO85_GPIO, /* MMC WP */
146 GPIO99_GPIO, /* Ethernet IRQ */
Eric Miao6f584cf2008-11-28 16:00:24 +0800147
Mike Rapoport1858ced2009-06-04 10:44:52 +0300148 /* RTC GPIOs */
149 GPIO95_GPIO, /* RTC CS */
150 GPIO96_GPIO, /* RTC WR */
151 GPIO97_GPIO, /* RTC RD */
152 GPIO98_GPIO, /* RTC IO */
153
Eric Miao6f584cf2008-11-28 16:00:24 +0800154 /* Standard I2C */
155 GPIO21_I2C_SCL,
156 GPIO22_I2C_SDA,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100157};
158
Igor Grinberg55052ea2009-10-14 09:20:18 +0200159static mfp_cfg_t cm_x300_rev_lt130_mfp_cfg[] __initdata = {
160 /* GPIOs */
161 GPIO79_GPIO, /* LED */
162 GPIO77_GPIO, /* WiFi reset */
163 GPIO78_GPIO, /* BT reset */
164};
165
166static mfp_cfg_t cm_x300_rev_ge130_mfp_cfg[] __initdata = {
167 /* GPIOs */
168 GPIO76_GPIO, /* LED */
169 GPIO71_GPIO, /* WiFi reset */
170 GPIO70_GPIO, /* BT reset */
171};
172
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100173#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
174static struct resource dm9000_resources[] = {
175 [0] = {
176 .start = CM_X300_ETH_PHYS,
177 .end = CM_X300_ETH_PHYS + 0x3,
178 .flags = IORESOURCE_MEM,
179 },
180 [1] = {
181 .start = CM_X300_ETH_PHYS + 0x4,
182 .end = CM_X300_ETH_PHYS + 0x4 + 500,
183 .flags = IORESOURCE_MEM,
184 },
185 [2] = {
186 .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO99)),
187 .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO99)),
188 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
189 }
190};
191
192static struct dm9000_plat_data cm_x300_dm9000_platdata = {
Mike Rapoportbff22c92009-02-23 18:01:12 +0200193 .flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100194};
195
196static struct platform_device dm9000_device = {
197 .name = "dm9000",
198 .id = 0,
199 .num_resources = ARRAY_SIZE(dm9000_resources),
200 .resource = dm9000_resources,
201 .dev = {
202 .platform_data = &cm_x300_dm9000_platdata,
203 }
204
205};
206
207static void __init cm_x300_init_dm9000(void)
208{
209 platform_device_register(&dm9000_device);
210}
211#else
212static inline void cm_x300_init_dm9000(void) {}
213#endif
214
Igor Grinberg83e560e2009-10-14 09:20:19 +0200215/* LCD */
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100216#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
217static struct pxafb_mode_info cm_x300_lcd_modes[] = {
218 [0] = {
Igor Grinberg83e560e2009-10-14 09:20:19 +0200219 .pixclock = 38250,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100220 .bpp = 16,
221 .xres = 480,
222 .yres = 640,
223 .hsync_len = 8,
224 .vsync_len = 2,
225 .left_margin = 8,
Igor Grinberg83e560e2009-10-14 09:20:19 +0200226 .upper_margin = 2,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100227 .right_margin = 24,
228 .lower_margin = 4,
229 .cmap_greyscale = 0,
230 },
231 [1] = {
232 .pixclock = 153800,
233 .bpp = 16,
234 .xres = 240,
235 .yres = 320,
236 .hsync_len = 8,
237 .vsync_len = 2,
238 .left_margin = 8,
239 .upper_margin = 2,
240 .right_margin = 88,
241 .lower_margin = 2,
242 .cmap_greyscale = 0,
243 },
244};
245
246static struct pxafb_mach_info cm_x300_lcd = {
247 .modes = cm_x300_lcd_modes,
Igor Grinberg83e560e2009-10-14 09:20:19 +0200248 .num_modes = ARRAY_SIZE(cm_x300_lcd_modes),
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100249 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
250};
251
252static void __init cm_x300_init_lcd(void)
253{
254 set_pxa_fb_info(&cm_x300_lcd);
255}
256#else
257static inline void cm_x300_init_lcd(void) {}
258#endif
259
Igor Grinberg83e560e2009-10-14 09:20:19 +0200260#if defined(CONFIG_SPI_GPIO) || defined(CONFIG_SPI_GPIO_MODULE)
261#define GPIO_LCD_BASE (144)
262#define GPIO_LCD_DIN (GPIO_LCD_BASE + 8) /* aux_gpio3_0 */
263#define GPIO_LCD_DOUT (GPIO_LCD_BASE + 9) /* aux_gpio3_1 */
264#define GPIO_LCD_SCL (GPIO_LCD_BASE + 10) /* aux_gpio3_2 */
265#define GPIO_LCD_CS (GPIO_LCD_BASE + 11) /* aux_gpio3_3 */
266#define LCD_SPI_BUS_NUM (1)
267
268static struct spi_gpio_platform_data cm_x300_spi_gpio_pdata = {
269 .sck = GPIO_LCD_SCL,
270 .mosi = GPIO_LCD_DIN,
271 .miso = GPIO_LCD_DOUT,
272 .num_chipselect = 1,
273};
274
275static struct platform_device cm_x300_spi_gpio = {
276 .name = "spi_gpio",
277 .id = LCD_SPI_BUS_NUM,
278 .dev = {
279 .platform_data = &cm_x300_spi_gpio_pdata,
280 },
281};
282
283static struct tdo24m_platform_data cm_x300_tdo24m_pdata = {
284 .model = TDO35S,
285};
286
287static struct spi_board_info cm_x300_spi_devices[] __initdata = {
288 {
289 .modalias = "tdo24m",
290 .max_speed_hz = 1000000,
291 .bus_num = LCD_SPI_BUS_NUM,
292 .chip_select = 0,
293 .controller_data = (void *) GPIO_LCD_CS,
294 .platform_data = &cm_x300_tdo24m_pdata,
295 },
296};
297
298static void __init cm_x300_init_spi(void)
299{
300 spi_register_board_info(cm_x300_spi_devices,
301 ARRAY_SIZE(cm_x300_spi_devices));
302 platform_device_register(&cm_x300_spi_gpio);
303}
304#else
305static inline void cm_x300_init_spi(void) {}
306#endif
307
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100308#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
309static struct mtd_partition cm_x300_nand_partitions[] = {
310 [0] = {
311 .name = "OBM",
312 .offset = 0,
313 .size = SZ_256K,
314 .mask_flags = MTD_WRITEABLE, /* force read-only */
315 },
316 [1] = {
317 .name = "U-Boot",
318 .offset = MTDPART_OFS_APPEND,
319 .size = SZ_256K,
320 .mask_flags = MTD_WRITEABLE, /* force read-only */
321 },
322 [2] = {
323 .name = "Environment",
324 .offset = MTDPART_OFS_APPEND,
325 .size = SZ_256K,
326 },
327 [3] = {
328 .name = "reserved",
329 .offset = MTDPART_OFS_APPEND,
330 .size = SZ_256K + SZ_1M,
331 .mask_flags = MTD_WRITEABLE, /* force read-only */
332 },
333 [4] = {
334 .name = "kernel",
335 .offset = MTDPART_OFS_APPEND,
336 .size = SZ_4M,
337 },
338 [5] = {
339 .name = "fs",
340 .offset = MTDPART_OFS_APPEND,
341 .size = MTDPART_SIZ_FULL,
342 },
343};
344
345static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
346 .enable_arbiter = 1,
Mike Rapoportb3992b62009-06-04 10:44:51 +0300347 .keep_config = 1,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100348 .parts = cm_x300_nand_partitions,
349 .nr_parts = ARRAY_SIZE(cm_x300_nand_partitions),
350};
351
352static void __init cm_x300_init_nand(void)
353{
354 pxa3xx_set_nand_info(&cm_x300_nand_info);
355}
356#else
357static inline void cm_x300_init_nand(void) {}
358#endif
359
360#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200361static struct pxamci_platform_data cm_x300_mci_platform_data = {
362 .detect_delay = 20,
363 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
364 .gpio_card_detect = GPIO82_MMC_IRQ,
365 .gpio_card_ro = GPIO85_MMC_WP,
366 .gpio_power = -1,
367};
368
369/* The second MMC slot of CM-X300 is hardwired to Libertas card and has
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100370 no detection/ro pins */
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200371static int cm_x300_mci2_init(struct device *dev,
372 irq_handler_t cm_x300_detect_int,
373 void *data)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100374{
375 return 0;
376}
377
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200378static void cm_x300_mci2_exit(struct device *dev, void *data)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100379{
380}
381
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100382static struct pxamci_platform_data cm_x300_mci2_platform_data = {
Robert Jarzmik7a648252009-07-06 22:16:42 +0200383 .detect_delay = 20,
384 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
Mike Rapoport0bff2fc2009-10-15 10:11:09 +0200385 .init = cm_x300_mci2_init,
386 .exit = cm_x300_mci2_exit,
387 .gpio_card_detect = -1,
388 .gpio_card_ro = -1,
Robert Jarzmik7a648252009-07-06 22:16:42 +0200389 .gpio_power = -1,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100390};
391
392static void __init cm_x300_init_mmc(void)
393{
394 pxa_set_mci_info(&cm_x300_mci_platform_data);
395 pxa3xx_set_mci2_info(&cm_x300_mci2_platform_data);
396}
397#else
398static inline void cm_x300_init_mmc(void) {}
399#endif
400
401#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100402static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
403 .port_mode = PMM_PERPORT_MODE,
Eric Miao097b5332008-09-27 15:49:57 +0800404 .flags = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100405};
Eric Miao097b5332008-09-27 15:49:57 +0800406
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100407static void __init cm_x300_init_ohci(void)
408{
409 pxa_set_ohci_info(&cm_x300_ohci_platform_data);
410}
411#else
412static inline void cm_x300_init_ohci(void) {}
413#endif
414
415#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
416static struct gpio_led cm_x300_leds[] = {
417 [0] = {
418 .name = "cm-x300:green",
419 .default_trigger = "heartbeat",
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100420 .active_low = 1,
421 },
422};
423
424static struct gpio_led_platform_data cm_x300_gpio_led_pdata = {
425 .num_leds = ARRAY_SIZE(cm_x300_leds),
426 .leds = cm_x300_leds,
427};
428
429static struct platform_device cm_x300_led_device = {
430 .name = "leds-gpio",
431 .id = -1,
432 .dev = {
433 .platform_data = &cm_x300_gpio_led_pdata,
434 },
435};
436
437static void __init cm_x300_init_leds(void)
438{
Igor Grinberg55052ea2009-10-14 09:20:18 +0200439 if (system_rev < 130)
440 cm_x300_leds[0].gpio = 79;
441 else
442 cm_x300_leds[0].gpio = 76;
443
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100444 platform_device_register(&cm_x300_led_device);
445}
446#else
447static inline void cm_x300_init_leds(void) {}
448#endif
449
450#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
451/* PCA9555 */
452static struct pca953x_platform_data cm_x300_gpio_ext_pdata_0 = {
453 .gpio_base = 128,
454};
455
456static struct pca953x_platform_data cm_x300_gpio_ext_pdata_1 = {
457 .gpio_base = 144,
458};
459
460static struct i2c_board_info cm_x300_gpio_ext_info[] = {
461 [0] = {
462 I2C_BOARD_INFO("pca9555", 0x24),
463 .platform_data = &cm_x300_gpio_ext_pdata_0,
464 },
465 [1] = {
466 I2C_BOARD_INFO("pca9555", 0x25),
467 .platform_data = &cm_x300_gpio_ext_pdata_1,
468 },
469};
470
471static void __init cm_x300_init_i2c(void)
472{
473 pxa_set_i2c_info(NULL);
474 i2c_register_board_info(0, cm_x300_gpio_ext_info,
475 ARRAY_SIZE(cm_x300_gpio_ext_info));
476}
477#else
478static inline void cm_x300_init_i2c(void) {}
479#endif
480
Mike Rapoport1858ced2009-06-04 10:44:52 +0300481#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
482struct v3020_platform_data cm_x300_v3020_pdata = {
483 .use_gpio = 1,
484 .gpio_cs = GPIO95_RTC_CS,
485 .gpio_wr = GPIO96_RTC_WR,
486 .gpio_rd = GPIO97_RTC_RD,
487 .gpio_io = GPIO98_RTC_IO,
488};
489
490static struct platform_device cm_x300_rtc_device = {
491 .name = "v3020",
492 .id = -1,
493 .dev = {
494 .platform_data = &cm_x300_v3020_pdata,
495 }
496};
497
498static void __init cm_x300_init_rtc(void)
499{
500 platform_device_register(&cm_x300_rtc_device);
501}
502#else
503static inline void cm_x300_init_rtc(void) {}
504#endif
505
Igor Grinberg55052ea2009-10-14 09:20:18 +0200506static void __init cm_x300_init_mfp(void)
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100507{
508 /* board-processor specific GPIO initialization */
509 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_mfp_cfg));
510
Igor Grinberg55052ea2009-10-14 09:20:18 +0200511 if (system_rev < 130)
512 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_rev_lt130_mfp_cfg));
513 else
514 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_rev_ge130_mfp_cfg));
515}
516
517static void __init cm_x300_init(void)
518{
519 cm_x300_init_mfp();
520
Russell Kingcc155c62009-11-09 13:34:08 +0800521 pxa_set_ffuart_info(NULL);
522 pxa_set_btuart_info(NULL);
523 pxa_set_stuart_info(NULL);
524
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100525 cm_x300_init_dm9000();
526 cm_x300_init_lcd();
527 cm_x300_init_ohci();
528 cm_x300_init_mmc();
529 cm_x300_init_nand();
530 cm_x300_init_leds();
531 cm_x300_init_i2c();
Igor Grinberg83e560e2009-10-14 09:20:19 +0200532 cm_x300_init_spi();
Mike Rapoport1858ced2009-06-04 10:44:52 +0300533 cm_x300_init_rtc();
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100534}
535
Mike Rapoportb5a5c472009-06-04 10:44:54 +0300536static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags,
537 char **cmdline, struct meminfo *mi)
538{
539 mi->nr_banks = 2;
540 mi->bank[0].start = 0xa0000000;
541 mi->bank[0].node = 0;
542 mi->bank[0].size = (64*1024*1024);
543 mi->bank[1].start = 0xc0000000;
544 mi->bank[1].node = 0;
545 mi->bank[1].size = (64*1024*1024);
546}
547
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100548MACHINE_START(CM_X300, "CM-X300 module")
549 .phys_io = 0x40000000,
550 .boot_params = 0xa0000100,
551 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
552 .map_io = pxa_map_io,
553 .init_irq = pxa3xx_init_irq,
554 .timer = &pxa_timer,
555 .init_machine = cm_x300_init,
Mike Rapoportb5a5c472009-06-04 10:44:54 +0300556 .fixup = cm_x300_fixup,
Mike Rapoportcf75d8d2008-08-26 14:03:44 +0100557MACHINE_END