2 * linux/arch/arm/mach-pxa/zylonite.c
4 * Support for the PXA3xx Development Platform (aka Zylonite)
6 * Copyright (C) 2006 Marvell International Ltd.
8 * 2007-09-04: eric miao <eric.miao@marvell.com>
9 * rewrite to align with latest kernel
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/module.h>
17 #include <linux/kernel.h>
18 #include <linux/interrupt.h>
19 #include <linux/init.h>
20 #include <linux/platform_device.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/hardware.h>
25 #include <asm/arch/gpio.h>
26 #include <asm/arch/pxafb.h>
27 #include <asm/arch/zylonite.h>
37 static struct resource smc91x_resources
[] = {
39 .start
= ZYLONITE_ETH_PHYS
+ 0x300,
40 .end
= ZYLONITE_ETH_PHYS
+ 0xfffff,
41 .flags
= IORESOURCE_MEM
,
44 .start
= -1, /* for run-time assignment */
46 .flags
= IORESOURCE_IRQ
,
50 static struct platform_device smc91x_device
= {
53 .num_resources
= ARRAY_SIZE(smc91x_resources
),
54 .resource
= smc91x_resources
,
57 #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULES)
58 static void zylonite_backlight_power(int on
)
60 gpio_set_value(gpio_backlight
, on
);
63 static struct pxafb_mode_info toshiba_ltm035a776c_mode
= {
74 .sync
= FB_SYNC_VERT_HIGH_ACT
,
77 static struct pxafb_mode_info toshiba_ltm04c380k_mode
= {
88 .sync
= FB_SYNC_HOR_HIGH_ACT
|FB_SYNC_VERT_HIGH_ACT
,
91 static struct pxafb_mach_info zylonite_toshiba_lcd_info
= {
95 .pxafb_backlight_power
= zylonite_backlight_power
,
98 static struct pxafb_mode_info sharp_ls037_modes
[] = {
127 static struct pxafb_mach_info zylonite_sharp_lcd_info
= {
128 .modes
= sharp_ls037_modes
,
131 .lccr3
= LCCR3_PCP
| LCCR3_HSP
| LCCR3_VSP
,
132 .pxafb_backlight_power
= zylonite_backlight_power
,
135 static void __init
zylonite_init_lcd(void)
137 /* backlight GPIO: output, default on */
138 gpio_direction_output(gpio_backlight
, 1);
141 set_pxa_fb_info(&zylonite_sharp_lcd_info
);
145 /* legacy LCD panels, it would be handy here if LCD panel type can
146 * be decided at run-time
149 zylonite_toshiba_lcd_info
.modes
= &toshiba_ltm035a776c_mode
;
151 zylonite_toshiba_lcd_info
.modes
= &toshiba_ltm04c380k_mode
;
153 set_pxa_fb_info(&zylonite_toshiba_lcd_info
);
156 static inline void zylonite_init_lcd(void) {}
159 static void __init
zylonite_init(void)
161 /* board-processor specific initialization */
162 zylonite_pxa300_init();
163 zylonite_pxa320_init();
166 * Note: We depend that the bootloader set
167 * the correct value to MSC register for SMC91x.
169 smc91x_resources
[1].start
= gpio_to_irq(gpio_eth_irq
);
170 smc91x_resources
[1].end
= gpio_to_irq(gpio_eth_irq
);
171 platform_device_register(&smc91x_device
);
176 MACHINE_START(ZYLONITE
, "PXA3xx Platform Development Kit (aka Zylonite)")
177 .phys_io
= 0x40000000,
178 .boot_params
= 0xa0000100,
179 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
180 .map_io
= pxa_map_io
,
181 .init_irq
= pxa3xx_init_irq
,
183 .init_machine
= zylonite_init
,