1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-26 15:26:46 +02:00
openwrt-xburst/target/linux/rb532/patches/100-rb5xx_support.patch
florian 9dd1cc458f Upgrade rb532 to .23, provide generic GPIO API to this board
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10171 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-01-11 10:42:06 +00:00

98 lines
3.6 KiB
Diff

diff -urN linux-2.6.23.12/arch/mips/Kconfig linux-2.6.23.12.new/arch/mips/Kconfig
--- linux-2.6.23.12/arch/mips/Kconfig 2007-12-18 22:55:57.000000000 +0100
+++ linux-2.6.23.12.new/arch/mips/Kconfig 2008-01-11 08:46:20.000000000 +0100
@@ -595,6 +595,20 @@
This enables support for the Wind River MIPS32 4KC PPMC evaluation
board, which is based on GT64120 bridge chip.
+config MIKROTIK_RB500
+ bool "Support for RB5xx boards"
+ select HW_HAS_PCI
+ select IRQ_CPU
+ select SYS_HAS_CPU_MIPS32_R1
+ select SYS_SUPPORTS_LITTLE_ENDIAN
+ select SYS_SUPPORTS_32BIT_KERNEL
+ select SWAP_IO_SPACE
+ select DMA_NONCOHERENT
+ select GENERIC_GPIO
+ help
+ Support the Mikrotik(tm) Routerboard 500 series,
+ such as the RB532.
+
endchoice
source "arch/mips/au1000/Kconfig"
@@ -829,6 +843,7 @@
default "4" if MACH_DECSTATION
default "7" if SGI_IP27 || SNI_RM
default "4" if PMC_MSP4200_EVAL
+ default "4" if MIKROTIK_RB500
default "5"
config HAVE_STD_PC_SERIAL_PORT
diff -urN linux-2.6.23.12/arch/mips/Makefile linux-2.6.23.12.new/arch/mips/Makefile
--- linux-2.6.23.12/arch/mips/Makefile 2007-12-18 22:55:57.000000000 +0100
+++ linux-2.6.23.12.new/arch/mips/Makefile 2008-01-11 08:47:04.000000000 +0100
@@ -300,6 +300,13 @@
cflags-$(CONFIG_LEMOTE_FULONG) += -Iinclude/asm-mips/mach-lemote
#
+# Routerboard 532 board
+#
+core-$(CONFIG_MIKROTIK_RB500) += arch/mips/rb500/
+cflags-$(CONFIG_MIKROTIK_RB500) += -Iinclude/asm-mips/rc32434
+load-$(CONFIG_MIKROTIK_RB500) += 0xffffffff80101000
+
+#
# For all MIPS, Inc. eval boards
#
core-$(CONFIG_MIPS_BOARDS_GEN) += arch/mips/mips-boards/generic/
diff -urN linux-2.6.23.12/arch/mips/pci/Makefile linux-2.6.23.12.new/arch/mips/pci/Makefile
--- linux-2.6.23.12/arch/mips/pci/Makefile 2007-12-18 22:55:57.000000000 +0100
+++ linux-2.6.23.12.new/arch/mips/pci/Makefile 2008-01-11 08:47:30.000000000 +0100
@@ -46,3 +46,4 @@
obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o
obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o
obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
+obj-$(CONFIG_MIKROTIK_RB500) += pci-rc32434.o ops-rc32434.o fixup-rb500.o
diff -urN linux-2.6.23.12/drivers/pci/Makefile linux-2.6.23.12.new/drivers/pci/Makefile
--- linux-2.6.23.12/drivers/pci/Makefile 2007-12-18 22:55:57.000000000 +0100
+++ linux-2.6.23.12.new/drivers/pci/Makefile 2008-01-11 08:48:10.000000000 +0100
@@ -32,6 +32,7 @@
obj-$(CONFIG_PPC64) += setup-bus.o
obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
obj-$(CONFIG_X86_VISWS) += setup-irq.o
+obj-$(CONFIG_MIKROTIK_RB500) += setup-irq.o
#
# ACPI Related PCI FW Functions
diff -urN linux-2.6.23.12/include/asm-mips/bootinfo.h linux-2.6.23.12.new/include/asm-mips/bootinfo.h
--- linux-2.6.23.12/include/asm-mips/bootinfo.h 2007-12-18 22:55:57.000000000 +0100
+++ linux-2.6.23.12.new/include/asm-mips/bootinfo.h 2008-01-11 08:48:48.000000000 +0100
@@ -208,6 +208,11 @@
#define MACH_GROUP_WINDRIVER 28 /* Windriver boards */
#define MACH_WRPPMC 1
+
+#define MACH_GROUP_MIKROTIK 29 /* Mikrotik Boards */
+#define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */
+#define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */
+
#define CL_SIZE COMMAND_LINE_SIZE
const char *get_system_type(void);
diff -urN linux-2.6.23.12/include/asm-mips/cpu.h linux-2.6.23.12.new/include/asm-mips/cpu.h
--- linux-2.6.23.12/include/asm-mips/cpu.h 2007-12-18 22:55:57.000000000 +0100
+++ linux-2.6.23.12.new/include/asm-mips/cpu.h 2008-01-11 08:49:34.000000000 +0100
@@ -217,8 +217,9 @@
#define CPU_R14000 64
#define CPU_LOONGSON1 65
#define CPU_LOONGSON2 66
+#define CPU_RC32300 67
-#define CPU_LAST 66
+#define CPU_LAST 67
/*
* ISA Level encodings