e1000: Add device IDs of blade version of the 82571 quad port
[pv_ops_mirror.git] / arch / arm / mach-omap1 / board-ams-delta.c
blob8437d065ada50530b8d686e9dd42c2486384889e
1 /*
2 * linux/arch/arm/mach-omap1/board-ams-delta.c
4 * Modified from board-generic.c
6 * Board specific inits for the Amstrad E3 (codename Delta) videophone
8 * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
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.
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
19 #include <asm/hardware.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <asm/mach/map.h>
24 #include <asm/arch/board-ams-delta.h>
25 #include <asm/arch/gpio.h>
26 #include <asm/arch/mux.h>
27 #include <asm/arch/usb.h>
28 #include <asm/arch/board.h>
29 #include <asm/arch/common.h>
31 static u8 ams_delta_latch1_reg;
32 static u16 ams_delta_latch2_reg;
34 void ams_delta_latch1_write(u8 mask, u8 value)
36 ams_delta_latch1_reg &= ~mask;
37 ams_delta_latch1_reg |= value;
38 *(volatile __u8 *) AMS_DELTA_LATCH1_VIRT = ams_delta_latch1_reg;
41 void ams_delta_latch2_write(u16 mask, u16 value)
43 ams_delta_latch2_reg &= ~mask;
44 ams_delta_latch2_reg |= value;
45 *(volatile __u16 *) AMS_DELTA_LATCH2_VIRT = ams_delta_latch2_reg;
48 static void __init ams_delta_init_irq(void)
50 omap1_init_common_hw();
51 omap_init_irq();
52 omap_gpio_init();
55 static struct map_desc ams_delta_io_desc[] __initdata = {
56 // AMS_DELTA_LATCH1
58 .virtual = AMS_DELTA_LATCH1_VIRT,
59 .pfn = __phys_to_pfn(AMS_DELTA_LATCH1_PHYS),
60 .length = 0x01000000,
61 .type = MT_DEVICE
63 // AMS_DELTA_LATCH2
65 .virtual = AMS_DELTA_LATCH2_VIRT,
66 .pfn = __phys_to_pfn(AMS_DELTA_LATCH2_PHYS),
67 .length = 0x01000000,
68 .type = MT_DEVICE
70 // AMS_DELTA_MODEM
72 .virtual = AMS_DELTA_MODEM_VIRT,
73 .pfn = __phys_to_pfn(AMS_DELTA_MODEM_PHYS),
74 .length = 0x01000000,
75 .type = MT_DEVICE
79 static struct omap_uart_config ams_delta_uart_config __initdata = {
80 .enabled_uarts = 1,
83 static struct omap_usb_config ams_delta_usb_config __initdata = {
84 .register_host = 1,
85 .hmc_mode = 16,
86 .pins[0] = 2,
89 static struct omap_board_config_kernel ams_delta_config[] = {
90 { OMAP_TAG_UART, &ams_delta_uart_config },
91 { OMAP_TAG_USB, &ams_delta_usb_config },
94 static struct platform_device ams_delta_led_device = {
95 .name = "ams-delta-led",
96 .id = -1
99 static struct platform_device *ams_delta_devices[] __initdata = {
100 &ams_delta_led_device,
103 static void __init ams_delta_init(void)
105 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
107 omap_board_config = ams_delta_config;
108 omap_board_config_size = ARRAY_SIZE(ams_delta_config);
109 omap_serial_init();
111 /* Clear latch2 (NAND, LCD, modem enable) */
112 ams_delta_latch2_write(~0, 0);
114 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
117 static void __init ams_delta_map_io(void)
119 omap1_map_common_io();
122 MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
123 /* Maintainer: Jonathan McDowell <noodles@earth.li> */
124 .phys_io = 0xfff00000,
125 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
126 .boot_params = 0x10000100,
127 .map_io = ams_delta_map_io,
128 .init_irq = ams_delta_init_irq,
129 .init_machine = ams_delta_init,
130 .timer = &omap_timer,
131 MACHINE_END
133 EXPORT_SYMBOL(ams_delta_latch1_write);
134 EXPORT_SYMBOL(ams_delta_latch2_write);