# BRCM_VERSION=3
[bcm963xx.git] / kernel / linux / arch / arm / mach-sa1100 / omnimeter.c
1 /*
2  * linux/arch/arm/mach-sa1100/omnimeter.c
3  */
4
5 #include <linux/init.h>
6 #include <linux/kernel.h>
7 #include <linux/tty.h>
8
9 #include <asm/hardware.h>
10 #include <asm/mach-types.h>
11 #include <asm/setup.h>
12
13 #include <asm/mach/arch.h>
14 #include <asm/mach/map.h>
15 #include <asm/mach/serial_sa1100.h>
16
17 #include "generic.h"
18
19 static void omnimeter_backlight_power(int on)
20 {
21         if (on)
22                 LEDBacklightOn();
23         else
24                 LEDBacklightOff();
25 }
26
27 static void omnimeter_lcd_power(int on)
28 {
29         if (on)
30                 LCDPowerOn();
31 }
32
33 static int __init omnimeter_init(void)
34 {
35         if (machine_is_omnimeter()) {
36                 sa1100fb_backlight_power = omnimeter_backlight_power;
37                 sa1100fb_lcd_power = omnimeter_lcd_power;
38         }
39         return 0;
40 }
41
42 arch_initcall(omnimeter_init);
43
44 static struct map_desc omnimeter_io_desc[] __initdata = {
45  /* virtual     physical    length      type */
46   { 0xd2000000, 0x10000000, 0x02000000, MT_DEVICE } /* TS */
47 };
48
49 static void __init omnimeter_map_io(void)
50 {
51         sa1100_map_io();
52         iotable_init(omnimeter_io_desc, ARRAY_SIZE(omnimeter_io_desc));
53
54         sa1100_register_uart(0, 3);
55         sa1100_register_uart(1, 1);
56 }
57
58 MACHINE_START(OMNIMETER, "OmniMeter")
59         BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
60         MAPIO(omnimeter_map_io)
61         INITIRQ(sa1100_init_irq)
62         INITTIME(sa1100_init_time)
63 MACHINE_END