* fix pci support for more than 1 device * fixes ioport mappings * adds support for...
[openwrt/openwrt.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,8 @@
4 #include <linux/ioport.h>
5
6 #include <lantiq.h>
7 -#include <lantiq_regs.h>
8 +
9 +#include <machine.h>
10
11 void __init
12 plat_mem_setup(void)
13 @@ -31,6 +32,7 @@
14 ioport_resource.end = IOPORT_RESOURCE_END;
15 iomem_resource.start = IOMEM_RESOURCE_START;
16 iomem_resource.end = IOMEM_RESOURCE_END;
17 + set_io_port_base((unsigned long) KSEG1);
18
19 while (*envp)
20 {
21 @@ -45,3 +47,25 @@
22 memsize *= 1024 * 1024;
23 add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
24 }
25 +
26 +static int __init
27 +lq_machine_setup(void)
28 +{
29 + mips_machine_setup();
30 + return 0;
31 +}
32 +
33 +static void __init
34 +mach_generic_init(void)
35 +{
36 +}
37 +
38 +MIPS_MACHINE(LANTIQ_MACH_GENERIC,
39 + "Generic",
40 + "Generic",
41 + mach_generic_init);
42 +
43 +arch_initcall(lq_machine_setup);
44 +
45 +/* for backward compatibility, define "board=" as alias for "machtype=" */
46 +__setup("board=", mips_machtype_setup);
47 --- /dev/null
48 +++ b/arch/mips/include/asm/mach-lantiq/machine.h
49 @@ -0,0 +1,14 @@
50 +#include <asm/mips_machine.h>
51 +
52 +enum lantiq_mach_type {
53 + LANTIQ_MACH_GENERIC,
54 +
55 + /* FALCON */
56 + LANTIQ_MACH_EASY98000, /* Falcon Eval Board, NOR Flash */
57 + LANTIQ_MACH_EASY98020, /* Falcon Reference Board */
58 +
59 + /* XWAY */
60 + LANTIQ_MACH_EASY4010, /* Twinpass evalkit */
61 + LANTIQ_MACH_EASY50712, /* Danube evalkit */
62 + LANTIQ_MACH_EASY50812, /* AR9 eval board */
63 +};