arch.c 3.52 KB
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3 4 5 6 7 8 9
/*
 * linux/arch/arm/mach-footbridge/arch.c
 *
 * Architecture specific fixups.  This is where any
 * parameters in the params struct are fixed up, or
 * any additional architecture specific information
 * is pulled from the params struct.
 */
#include <linux/config.h>
Linus Torvalds's avatar
Linus Torvalds committed
10
#include <linux/module.h>
Linus Torvalds's avatar
Linus Torvalds committed
11 12 13 14 15 16 17 18 19 20 21 22
#include <linux/tty.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/init.h>

#include <asm/hardware/dec21285.h>
#include <asm/elf.h>
#include <asm/setup.h>
#include <asm/mach-types.h>

#include <asm/mach/arch.h>

Linus Torvalds's avatar
Linus Torvalds committed
23 24
extern void footbridge_map_io(void);
extern void footbridge_init_irq(void);
Deepak Saxena's avatar
Deepak Saxena committed
25
extern void footbridge_init_time(void);
Linus Torvalds's avatar
Linus Torvalds committed
26

Linus Torvalds's avatar
Linus Torvalds committed
27 28 29 30 31 32 33 34 35 36 37 38
unsigned int mem_fclk_21285 = 50000000;

EXPORT_SYMBOL(mem_fclk_21285);

static int __init parse_tag_memclk(const struct tag *tag)
{
	mem_fclk_21285 = tag->u.memclk.fmemclk;
	return 0;
}

__tagtable(ATAG_MEMCLK, parse_tag_memclk);

Linus Torvalds's avatar
Linus Torvalds committed
39 40 41 42 43 44 45
#ifdef CONFIG_ARCH_EBSA285
MACHINE_START(EBSA285, "EBSA285")
	MAINTAINER("Russell King")
	BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
	BOOT_PARAMS(0x00000100)
	VIDEO(0x000a0000, 0x000bffff)
	MAPIO(footbridge_map_io)
Linus Torvalds's avatar
Linus Torvalds committed
46
	INITIRQ(footbridge_init_irq)
Deepak Saxena's avatar
Deepak Saxena committed
47
	INITTIME(footbridge_init_time)
Linus Torvalds's avatar
Linus Torvalds committed
48 49 50 51 52 53 54 55 56 57
MACHINE_END
#endif

#ifdef CONFIG_ARCH_NETWINDER
/*
 * Older NeTTroms either do not provide a parameters
 * page, or they don't supply correct information in
 * the parameter page.
 */
static void __init
58
fixup_netwinder(struct machine_desc *desc, struct tag *tags,
Linus Torvalds's avatar
Linus Torvalds committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
		char **cmdline, struct meminfo *mi)
{
#ifdef CONFIG_ISAPNP
	extern int isapnp_disable;

	/*
	 * We must not use the kernels ISAPnP code
	 * on the NetWinder - it will reset the settings
	 * for the WaveArtist chip and render it inoperable.
	 */
	isapnp_disable = 1;
#endif
}

MACHINE_START(NETWINDER, "Rebel-NetWinder")
	MAINTAINER("Russell King/Rebel.com")
	BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
	BOOT_PARAMS(0x00000100)
	VIDEO(0x000a0000, 0x000bffff)
	DISABLE_PARPORT(0)
	DISABLE_PARPORT(2)
	FIXUP(fixup_netwinder)
	MAPIO(footbridge_map_io)
Linus Torvalds's avatar
Linus Torvalds committed
82
	INITIRQ(footbridge_init_irq)
Deepak Saxena's avatar
Deepak Saxena committed
83
	INITTIME(footbridge_init_time)
Linus Torvalds's avatar
Linus Torvalds committed
84 85 86 87 88 89 90 91 92
MACHINE_END
#endif

#ifdef CONFIG_ARCH_CATS
/*
 * CATS uses soft-reboot by default, since
 * hard reboots fail on early boards.
 */
static void __init
93
fixup_cats(struct machine_desc *desc, struct tag *tags,
Linus Torvalds's avatar
Linus Torvalds committed
94 95 96 97 98 99 100 101 102 103
	   char **cmdline, struct meminfo *mi)
{
	ORIG_VIDEO_LINES  = 25;
	ORIG_VIDEO_POINTS = 16;
	ORIG_Y = 24;
}

MACHINE_START(CATS, "Chalice-CATS")
	MAINTAINER("Philip Blundell")
	BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
Linus Torvalds's avatar
Linus Torvalds committed
104
	BOOT_PARAMS(0x00000100)
Linus Torvalds's avatar
Linus Torvalds committed
105 106 107
	SOFT_REBOOT
	FIXUP(fixup_cats)
	MAPIO(footbridge_map_io)
Linus Torvalds's avatar
Linus Torvalds committed
108
	INITIRQ(footbridge_init_irq)
Deepak Saxena's avatar
Deepak Saxena committed
109
	INITTIME(footbridge_init_time)
Linus Torvalds's avatar
Linus Torvalds committed
110 111 112 113 114 115
MACHINE_END
#endif

#ifdef CONFIG_ARCH_CO285

static void __init
116
fixup_coebsa285(struct machine_desc *desc, struct tag *tags,
Linus Torvalds's avatar
Linus Torvalds committed
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
		char **cmdline, struct meminfo *mi)
{
	extern unsigned long boot_memory_end;
	extern char boot_command_line[];

	mi->nr_banks      = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].size  = boot_memory_end;
	mi->bank[0].node  = 0;

	*cmdline = boot_command_line;
}

MACHINE_START(CO285, "co-EBSA285")
	MAINTAINER("Mark van Doesburg")
	BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000)
	FIXUP(fixup_coebsa285)
	MAPIO(footbridge_map_io)
Linus Torvalds's avatar
Linus Torvalds committed
135
	INITIRQ(footbridge_init_irq)
Deepak Saxena's avatar
Deepak Saxena committed
136
	INITTIME(footbridge_init_time)
Linus Torvalds's avatar
Linus Torvalds committed
137 138 139 140 141 142 143 144 145
MACHINE_END
#endif

#ifdef CONFIG_ARCH_PERSONAL_SERVER
MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
	MAINTAINER("Jamey Hicks / George France")
	BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
	BOOT_PARAMS(0x00000100)
	MAPIO(footbridge_map_io)
Linus Torvalds's avatar
Linus Torvalds committed
146
	INITIRQ(footbridge_init_irq)
Deepak Saxena's avatar
Deepak Saxena committed
147
	INITTIME(footbridge_init_time)
Linus Torvalds's avatar
Linus Torvalds committed
148 149
MACHINE_END
#endif