major target cleanup. it is now possible to have subtargets that can override many...
[openwrt-10.03/.git] / target / linux / rb532 / patches / 100-rb5xx_support.patch
1 diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
2 --- linux.old/arch/mips/Kconfig 2006-11-29 22:57:37.000000000 +0100
3 +++ linux.dev/arch/mips/Kconfig 2006-12-14 04:09:50.000000000 +0100
4 @@ -780,6 +780,19 @@
5         select SYS_SUPPORTS_BIG_ENDIAN
6         select TOSHIBA_BOARDS
7  
8 +config MIKROTIK_RB500
9 +       bool "Support for RB5xx boards"
10 +       select HW_HAS_PCI
11 +       select IRQ_CPU
12 +       select SYS_HAS_CPU_MIPS32_R1
13 +       select SYS_SUPPORTS_LITTLE_ENDIAN
14 +       select SYS_SUPPORTS_32BIT_KERNEL
15 +       select SWAP_IO_SPACE
16 +       select DMA_NONCOHERENT
17 +       help
18 +         Support the Mikrotik(tm) Routerboard 500 series,
19 +         such as the RB532.
20 +
21  config TOSHIBA_RBTX4927
22         bool "Toshiba TBTX49[23]7 board"
23         select DMA_NONCOHERENT
24 @@ -1106,7 +1119,7 @@
25  
26  config MIPS_L1_CACHE_SHIFT
27         int
28 -       default "4" if MACH_DECSTATION || SNI_RM
29 +       default "4" if MACH_DECSTATION || SNI_RM || MIKROTIK_RB500
30         default "7" if SGI_IP27
31         default "5"
32  
33 diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
34 --- linux.old/arch/mips/Makefile        2006-12-14 03:13:55.000000000 +0100
35 +++ linux.dev/arch/mips/Makefile        2006-12-14 04:09:50.000000000 +0100
36 @@ -586,6 +586,13 @@
37  load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
38  
39  #
40 +# Routerboard 532 board
41 +#
42 +core-$(CONFIG_MIKROTIK_RB500)  += arch/mips/rb500/
43 +cflags-$(CONFIG_MIKROTIK_RB500) += -Iinclude/asm-mips/rc32434
44 +load-$(CONFIG_MIKROTIK_RB500)  += 0xffffffff80101000
45 +
46 +#
47  # Toshiba RBTX4927 board or
48  # Toshiba RBTX4937 board
49  #
50 diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile
51 --- linux.old/arch/mips/pci/Makefile    2006-11-29 22:57:37.000000000 +0100
52 +++ linux.dev/arch/mips/pci/Makefile    2006-12-14 04:09:50.000000000 +0100
53 @@ -53,3 +53,4 @@
54  obj-$(CONFIG_VICTOR_MPC30X)    += fixup-mpc30x.o
55  obj-$(CONFIG_ZAO_CAPCELLA)     += fixup-capcella.o
56  obj-$(CONFIG_WR_PPMC)          += fixup-wrppmc.o
57 +obj-$(CONFIG_MIKROTIK_RB500)   += pci-rc32434.o ops-rc32434.o fixup-rb500.o
58 diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile
59 --- linux.old/drivers/pci/Makefile      2006-11-29 22:57:37.000000000 +0100
60 +++ linux.dev/drivers/pci/Makefile      2006-12-14 04:09:50.000000000 +0100
61 @@ -16,6 +16,7 @@
62  
63  # Build the PCI MSI interrupt support
64  obj-$(CONFIG_PCI_MSI) += msi.o
65 +obj-$(CONFIG_MIKROTIK_RB500) += setup-irq.o
66  
67  # Build the Hypertransport interrupt support
68  obj-$(CONFIG_HT_IRQ) += htirq.o
69 diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h
70 --- linux.old/include/asm-mips/bootinfo.h       2006-11-29 22:57:37.000000000 +0100
71 +++ linux.dev/include/asm-mips/bootinfo.h       2006-12-14 04:09:50.000000000 +0100
72 @@ -212,6 +212,8 @@
73  #define MACH_GROUP_NEC_EMMA2RH 25      /* NEC EMMA2RH (was 23)         */
74  #define  MACH_NEC_MARKEINS     0       /* NEC EMMA2RH Mark-eins        */
75  
76 +#define MACH_GROUP_MIKROTIK    24 /* Mikrotik Boards                       */
77 +
78  #define CL_SIZE                        COMMAND_LINE_SIZE
79  
80  const char *get_system_type(void);
81 diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h
82 --- linux.old/include/asm-mips/cpu.h    2006-11-29 22:57:37.000000000 +0100
83 +++ linux.dev/include/asm-mips/cpu.h    2006-12-14 04:09:50.000000000 +0100
84 @@ -200,7 +200,8 @@
85  #define CPU_SB1A               62
86  #define CPU_74K                        63
87  #define CPU_R14000             64
88 -#define CPU_LAST               64
89 +#define CPU_RC32300            65
90 +#define CPU_LAST               65
91  
92  /*
93   * ISA Level encodings
94