# BRCM_VERSION=3
[bcm963xx.git] / kernel / linux / arch / arm / mach-sa1100 / freebird.c
1 /*
2  * linux/arch/arm/mach-sa1100/freebird.c
3  */
4
5 #include <linux/config.h>
6 #include <linux/module.h>
7 #include <linux/init.h>
8 #include <linux/kernel.h>
9 #include <linux/tty.h>
10
11 #include <asm/hardware.h>
12 #include <asm/mach-types.h>
13 #include <asm/setup.h>
14
15 #include <asm/mach/arch.h>
16 #include <asm/mach/map.h>
17 #include <asm/mach/serial_sa1100.h>
18
19 #include "generic.h"
20
21
22 unsigned long BCR_value = BCR_DB1110;
23 EXPORT_SYMBOL(BCR_value);
24
25 static void freebird_backlight_power(int on)
26 {
27 #error FIXME
28         if (on) {
29                 BCR_set(BCR_FREEBIRD_LCD_PWR | BCR_FREEBIRD_LCD_DISP);
30                 /* Turn on backlight, Chester */
31                 BCR_set(BCR_FREEBIRD_LCD_BACKLIGHT);
32         } else {
33                 BCR_clear(BCR_FREEBIRD_LCD_PWR | BCR_FREEBIRD_LCD_DISP
34                           /* | BCR_FREEBIRD_LCD_BACKLIGHT */);
35         }
36 }
37
38 static void freebird_lcd_power(int on)
39 {
40 }
41
42 static int __init freebird_init(void)
43 {
44         if (machine_is_freebird()) {
45                 sa1100fb_backlight_power = freebird_backlight_power;
46                 sa1100fb_lcd_power = freebird_lcd_power;
47         }
48         return 0;
49 }
50
51 arch_initcall(freebird_init);
52
53 static struct map_desc freebird_io_desc[] __initdata = {
54  /* virtual     physical    length      type */
55   { 0xf0000000, 0x12000000, 0x00100000, MT_DEVICE }, /* Board Control Register */
56   { 0xf2000000, 0x19000000, 0x00100000, MT_DEVICE }
57 };
58
59 static void __init freebird_map_io(void)
60 {
61         sa1100_map_io();
62         iotable_init(freebird_io_desc, ARRAY_SIZE(freebird_io_desc));
63
64         sa1100_register_uart(0, 3);
65         sa1100_register_uart(1, 1);
66
67         /* Set up sleep mode registers */
68         PWER = 0x1;
69         PGSR = 0x0;
70         PCFR = PCFR_OPDE | PCFR_FP | PCFR_FS;
71 }
72
73 MACHINE_START(FREEBIRD, "Freebird-HPC-1.1")
74         BOOT_MEM(0xc0000000,0x80000000, 0xf8000000)
75 #ifdef CONFIG_SA1100_FREEBIRD_NEW
76         BOOT_PARAMS(0xc0000100)
77 #endif
78         MAPIO(freebird_map_io)
79         INITIRQ(sa1100_init_irq)
80         INITTIME(sa1100_init_time)
81 MACHINE_END