aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches/110-machine.patch
blob: 4066ac586a0421bb6b4e10c1011a977bf9854362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
--- a/arch/mips/lantiq/setup.c
+++ b/arch/mips/lantiq/setup.c
@@ -12,7 +12,10 @@
 #include <linux/ioport.h>
 
 #include <lantiq.h>
-#include <lantiq_regs.h>
+
+#include <machine.h>
+
+static unsigned int *cp1_base;
 
 void __init
 plat_mem_setup(void)
@@ -31,6 +34,7 @@
 	ioport_resource.end = IOPORT_RESOURCE_END;
 	iomem_resource.start = IOMEM_RESOURCE_START;
 	iomem_resource.end = IOMEM_RESOURCE_END;
+	set_io_port_base((unsigned long) KSEG1);
 
 	while (*envp)
 	{
@@ -42,6 +46,37 @@
 		}
 		envp++;
 	}
+//	memsize -= 2;
 	memsize *= 1024 * 1024;
+//	cp1_base = (unsigned int*)(KSEG1 | memsize);
 	add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
 }
+
+unsigned int*
+lq_get_cp1_base(void)
+{
+	return cp1_base;
+}
+EXPORT_SYMBOL(lq_get_cp1_base);
+
+static int __init
+lq_machine_setup(void)
+{
+	mips_machine_setup();
+	return 0;
+}
+
+static void __init
+mach_generic_init(void)
+{
+}
+
+MIPS_MACHINE(LANTIQ_MACH_GENERIC,
+			"Generic",
+			"Generic",
+			mach_generic_init);
+
+arch_initcall(lq_machine_setup);
+
+/* for backward compatibility, define "board=" as alias for "machtype=" */
+__setup("board=", mips_machtype_setup);
--- /dev/null
+++ b/arch/mips/include/asm/mach-lantiq/machine.h
@@ -0,0 +1,14 @@
+#include <asm/mips_machine.h>
+
+enum lantiq_mach_type {
+	LANTIQ_MACH_GENERIC,
+
+	/* FALCON */
+	LANTIQ_MACH_EASY98000,		/* Falcon Eval Board, NOR Flash */
+	LANTIQ_MACH_EASY98020,		/* Falcon Reference Board */
+
+	/* XWAY */
+	LANTIQ_MACH_EASY4010,		/* Twinpass evalkit */
+	LANTIQ_MACH_EASY50712,		/* Danube evalkit */
+	LANTIQ_MACH_EASY50812,		/* AR9 eval board */
+};