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