patch-2.4.4 linux/arch/arm/mach-shark/arch.c

Next file: linux/arch/arm/mach-shark/dma.c
Previous file: linux/arch/arm/mach-shark/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/arch/arm/mach-shark/arch.c linux/arch/arm/mach-shark/arch.c
@@ -18,14 +18,31 @@
 
 #include <asm/mach/arch.h>
 
-extern void setup_initrd(unsigned int start, unsigned int size);
-extern void setup_ramdisk(int doload, int prompt, int start, unsigned int rd_sz);
-extern void __init footbridge_map_io(void);
-extern void __init shark_map_io(void);
+static void __init
+fixup_shark(struct machine_desc *desc, struct param_struct *params,
+	char **cmdline, struct meminfo *mi) {
+	int i;
+
+	mi->nr_banks=0;
+	for (i=0;i<NR_BANKS;i++) {
+		if (params->u1.s.pages_in_bank[i] != 0) {
+			mi->nr_banks++;
+			mi->bank[i].node  = 0;
+			mi->bank[i].start = params->u1.s.pages_in_bank[i] & 0xffff0000;
+			mi->bank[i].size  = (params->u1.s.pages_in_bank[i] & 0xffff)*PAGE_SIZE;
+			params->u1.s.pages_in_bank[i] &= 0xffff;
+		}
+	}
+}
+
+extern void shark_map_io(void);
+extern void genarch_init_irq(void);
 
 MACHINE_START(SHARK, "Shark")
 	MAINTAINER("Alexander Schulz")
 	BOOT_MEM(0x08000000, 0x40000000, 0xe0000000)
-	VIDEO(0x06000000, 0x061fffff)
+	BOOT_PARAMS(0x08003000)
+	FIXUP(fixup_shark)
 	MAPIO(shark_map_io)
+	INITIRQ(genarch_init_irq)
 MACHINE_END

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)