16 #include <linux/kernel.h>
19 #include <linux/export.h>
20 #include <linux/sched.h>
21 #include <linux/bitops.h>
31 #include <asm/types.h>
32 #include <asm/setup.h>
33 #include <asm/memory.h>
36 #include <asm/sizes.h>
58 #define STATUS_LEDS_ON_STUART_PINS 1
63 static unsigned long trizeps4_pin_config[]
__initdata = {
98 #ifdef STATUS_LEDS_ON_STUART_PINS
137 static unsigned long trizeps4wl_pin_config[]
__initdata = {
151 .name =
"Bootloader",
152 .offset = 0x00000000,
157 .offset = 0x00040000,
161 .offset = 0x00080000,
165 .offset = 0x01100000,
169 .offset = 0x01f00000,
177 .parts = trizeps4_partitions,
182 static struct resource flash_resource = {
189 .
name =
"physmap-flash",
192 .platform_data = trizeps4_flash_data,
194 .resource = &flash_resource,
201 static struct resource dm9000_resources[] = {
226 .num_resources =
ARRAY_SIZE(dm9000_resources),
227 .resource = dm9000_resources,
229 .platform_data = &tri_dm9000_platdata,
236 static struct gpio_led trizeps4_led[] = {
237 #ifdef STATUS_LEDS_ON_STUART_PINS
239 .name =
"led0:orange:heartbeat",
240 .default_trigger =
"heartbeat",
245 .name =
"led1:yellow:cpubusy",
246 .default_trigger =
"cpu-busy",
254 .leds = trizeps4_led,
262 .platform_data = &trizeps4_led_data,
277 static short trizeps_conxs_bcr;
284 trizeps_conxs_bcr |= power;
287 BCR_writew(trizeps_conxs_bcr);
292 BCR_writew(trizeps_conxs_bcr);
297 BCR_writew(trizeps_conxs_bcr);
300 trizeps_conxs_bcr &= ~0xf;
301 BCR_writew(trizeps_conxs_bcr);
303 pr_debug(
"%s: o%s 0x%x\n", __func__, power ?
"n" :
"ff",
309 static void board_backlight_power(
int on)
316 pr_debug(
"%s: o%s 0x%x\n", __func__, on ?
"n" :
"ff",
318 BCR_writew(trizeps_conxs_bcr);
336 "MMC card detect", data);
339 "MMC card detect IRQ\n");
345 static void trizeps4_mci_exit(
struct device *dev,
void *data)
352 .detect_delay_ms= 10,
353 .init = trizeps4_mci_init,
354 .exit = trizeps4_mci_exit,
357 .gpio_card_detect = -1,
365 #ifndef STATUS_LEDS_ON_STUART_PINS
366 static short trizeps_conxs_ircr;
368 static int trizeps4_irda_startup(
struct device *dev)
371 IRCR_writew(trizeps_conxs_ircr);
375 static void trizeps4_irda_shutdown(
struct device *dev)
378 IRCR_writew(trizeps_conxs_ircr);
381 static void trizeps4_irda_transceiver_mode(
struct device *dev,
int mode)
398 IRCR_writew(trizeps_conxs_ircr);
406 .transceiver_cap = IR_SIRMODE | IR_FIRMODE |
IR_OFF,
407 .transceiver_mode = trizeps4_irda_transceiver_mode,
408 .startup = trizeps4_irda_startup,
409 .shutdown = trizeps4_irda_shutdown,
421 static struct map_desc trizeps4_io_desc[] __initdata = {
425 .length = 0x00001000,
431 .length = 0x00001000,
437 .length = 0x00001000,
443 .length = 0x00001000,
449 .length = 0x00001000,
470 .modes = &sharp_lcd_mode,
475 .pxafb_backlight_power = board_backlight_power,
494 .modes = &toshiba_lcd_mode,
502 static void __init trizeps4_init(
void)
505 if (machine_is_trizeps4wl()) {
524 #ifndef STATUS_LEDS_ON_STUART_PINS
534 trizeps_conxs_bcr = 0x00A0;
536 BCR_writew(trizeps_conxs_bcr);
537 board_backlight_power(1);
540 static void __init trizeps4_map_io(
void)
548 trizeps4_flash_data[0].
width = 2;
552 trizeps4_flash_data[0].
width = 4;
558 .atag_offset = 0x100,
559 .init_machine = trizeps4_init,
560 .map_io = trizeps4_map_io,
568 MACHINE_START(TRIZEPS4WL,
"Keith und Koep Trizeps IV-WL module")
570 .atag_offset = 0x100,
571 .init_machine = trizeps4_init,
572 .map_io = trizeps4_map_io,