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/setup.h>
13
14#include <asm/mach/arch.h>
15#include <asm/mach/map.h>
16#include <asm/mach/serial_sa1100.h>
17
18#include "generic.h"
19
20
21unsigned long BCR_value = BCR_DB1110;
22EXPORT_SYMBOL(BCR_value);
23
24
25static void __init
26fixup_freebird(struct machine_desc *desc, struct param_struct *params,
27	       char **cmdline, struct meminfo *mi)
28{
29#ifdef CONFIG_SA1100_FREEBIRD_OLD
30	SET_BANK( 0, 0xc0000000, 32*1024*1024 );
31	mi->nr_banks = 1;
32	ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
33	setup_ramdisk( 1, 0 ,0 , 8192 );
34	setup_initrd( 0xc0800000, 3*1024*1024 );
35#endif
36}
37
38static struct map_desc freebird_io_desc[] __initdata = {
39 /* virtual     physical    length      domain     r  w  c  b */
40  { 0xe8000000, 0x00000000, 0x02000000, DOMAIN_IO, 0, 1, 0, 0 }, /* Flash bank 0 */
41  { 0xf0000000, 0x12000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, /* Board Control Register */
42  { 0xf2000000, 0x19000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0},
43   LAST_DESC
44};
45
46static void __init freebird_map_io(void)
47{
48	sa1100_map_io();
49	iotable_init(freebird_io_desc);
50
51	sa1100_register_uart(0, 3);
52	sa1100_register_uart(1, 1);
53
54	/* Set up sleep mode registers */
55	PWER = 0x1;
56	PGSR = 0x0;
57	PCFR = PCFR_OPDE | PCFR_FP | PCFR_FS;
58}
59
60MACHINE_START(FREEBIRD, "Freebird-HPC-1.1")
61	BOOT_MEM(0xc0000000,0x80000000, 0xf8000000)
62#ifdef CONFIG_SA1100_FREEBIRD_NEW
63	BOOT_PARAMS(0xc0000100)
64#endif
65	FIXUP(fixup_freebird)
66	MAPIO(freebird_map_io)
67	INITIRQ(sa1100_init_irq)
68MACHINE_END
69