1 Index: linux-3.3.8/arch/mips/lantiq/devices.c
2 ===================================================================
3 --- linux-3.3.8.orig/arch/mips/lantiq/devices.c 2012-07-31 09:45:42.315551926 +0200
4 +++ linux-3.3.8/arch/mips/lantiq/devices.c 2012-07-31 09:46:14.051553281 +0200
9 +#ifdef CONFIG_SOC_SVIP
10 +extern unsigned int *prom_cp1_base;
12 static unsigned int *cp1_base = 0;
15 ltq_get_cp1_base(void)
17 +#ifdef CONFIG_SOC_SVIP
18 + return prom_cp1_base;
23 EXPORT_SYMBOL(ltq_get_cp1_base);
26 ltq_register_tapi(void)
28 +#ifndef CONFIG_SOC_SVIP
29 #define CP1_SIZE (1 << 20)
32 (void*)CPHYSADDR(dma_alloc_coherent(NULL, CP1_SIZE, &dma, GFP_ATOMIC));
35 Index: linux-3.3.8/arch/mips/lantiq/prom.c
36 ===================================================================
37 --- linux-3.3.8.orig/arch/mips/lantiq/prom.c 2012-07-31 09:45:42.315551926 +0200
38 +++ linux-3.3.8/arch/mips/lantiq/prom.c 2012-07-31 10:31:28.759669332 +0200
41 EXPORT_SYMBOL(ltq_remap_resource);
44 void __init prom_init(void)
46 ltq_soc_detect(&soc_info);
47 Index: linux-3.3.8/arch/mips/lantiq/setup.c
48 ===================================================================
49 --- linux-3.3.8.orig/arch/mips/lantiq/setup.c 2012-07-31 09:45:42.315551926 +0200
50 +++ linux-3.3.8/arch/mips/lantiq/setup.c 2012-07-31 10:31:35.215669606 +0200
52 /* set to 1 if the bootloader is BRN-BOOT instead of u-boot */
53 unsigned long ltq_brn_boot = 0;
55 +#ifdef CONFIG_SOC_SVIP
56 +unsigned int *prom_cp1_base;
59 void __init plat_mem_setup(void)
61 +#ifdef CONFIG_SOC_SVIP
62 + int prom_cp1_size = 0x800000;
64 /* assume 16M as default incase uboot fails to pass proper ramsize */
65 unsigned long memsize = 16;
66 char **envp = (char **) KSEG1ADDR(fw_arg2);
70 memsize *= 1024 * 1024;
72 +#ifdef CONFIG_SOC_SVIP
73 + memsize -= prom_cp1_size;
74 + prom_cp1_base = (unsigned int *)KSEG1ADDR(memsize);
76 + printk("Using %ldMB Ram and reserving %dMB for cp1\n",
77 + memsize>>20, prom_cp1_size>>20);
79 add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);