Convert brcm63xx to gpiolib
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-2.6.27 / 002-add_support_for_broadcom_63xx_cpus.patch
1 From 0713aadd2a4e543b69022aa40bdec3e1dc5bc1e5 Mon Sep 17 00:00:00 2001
2 From: Maxime Bizon <mbizon@freebox.fr>
3 Date: Mon, 18 Aug 2008 13:56:57 +0200
4 Subject: [PATCH] [MIPS] BCM63XX: Add support for Broadcom 63xx CPUs.
5
6 Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
7 ---
8 arch/mips/Kconfig | 16 +
9 arch/mips/Makefile | 7 +
10 arch/mips/bcm63xx/Kconfig | 9 +
11 arch/mips/bcm63xx/Makefile | 2 +
12 arch/mips/bcm63xx/clk.c | 220 ++++++
13 arch/mips/bcm63xx/cpu.c | 245 +++++++
14 arch/mips/bcm63xx/cs.c | 144 ++++
15 arch/mips/bcm63xx/early_printk.c | 30 +
16 arch/mips/bcm63xx/gpio.c | 98 +++
17 arch/mips/bcm63xx/irq.c | 253 +++++++
18 arch/mips/bcm63xx/prom.c | 43 ++
19 arch/mips/bcm63xx/setup.c | 108 +++
20 arch/mips/bcm63xx/timer.c | 205 ++++++
21 include/asm-mips/fixmap.h | 4 +
22 include/asm-mips/mach-bcm63xx/bcm63xx_clk.h | 11 +
23 include/asm-mips/mach-bcm63xx/bcm63xx_cpu.h | 314 +++++++++
24 include/asm-mips/mach-bcm63xx/bcm63xx_cs.h | 10 +
25 include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h | 14 +
26 include/asm-mips/mach-bcm63xx/bcm63xx_io.h | 93 +++
27 include/asm-mips/mach-bcm63xx/bcm63xx_irq.h | 15 +
28 include/asm-mips/mach-bcm63xx/bcm63xx_regs.h | 728 ++++++++++++++++++++
29 include/asm-mips/mach-bcm63xx/bcm63xx_timer.h | 11 +
30 .../asm-mips/mach-bcm63xx/cpu-feature-overrides.h | 51 ++
31 include/asm-mips/mach-bcm63xx/gpio.h | 52 ++
32 include/asm-mips/mach-bcm63xx/war.h | 25 +
33 25 files changed, 2708 insertions(+), 0 deletions(-)
34 create mode 100644 arch/mips/bcm63xx/Kconfig
35 create mode 100644 arch/mips/bcm63xx/Makefile
36 create mode 100644 arch/mips/bcm63xx/clk.c
37 create mode 100644 arch/mips/bcm63xx/cpu.c
38 create mode 100644 arch/mips/bcm63xx/cs.c
39 create mode 100644 arch/mips/bcm63xx/early_printk.c
40 create mode 100644 arch/mips/bcm63xx/gpio.c
41 create mode 100644 arch/mips/bcm63xx/irq.c
42 create mode 100644 arch/mips/bcm63xx/prom.c
43 create mode 100644 arch/mips/bcm63xx/setup.c
44 create mode 100644 arch/mips/bcm63xx/timer.c
45 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_clk.h
46 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_cpu.h
47 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_cs.h
48 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h
49 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_io.h
50 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_irq.h
51 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_regs.h
52 create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_timer.h
53 create mode 100644 include/asm-mips/mach-bcm63xx/cpu-feature-overrides.h
54 create mode 100644 include/asm-mips/mach-bcm63xx/gpio.h
55 create mode 100644 include/asm-mips/mach-bcm63xx/war.h
56
57 --- a/arch/mips/Kconfig
58 +++ b/arch/mips/Kconfig
59 @@ -59,6 +59,21 @@ config BCM47XX
60 help
61 Support for BCM47XX based boards
62
63 +config BCM63XX
64 + bool "Broadcom 63xx based boards"
65 + select CEVT_R4K
66 + select CSRC_R4K
67 + select DMA_NONCOHERENT
68 + select IRQ_CPU
69 + select SYS_HAS_CPU_MIPS32_R1
70 + select SYS_SUPPORTS_32BIT_KERNEL
71 + select SYS_SUPPORTS_BIG_ENDIAN
72 + select SYS_HAS_EARLY_PRINTK
73 + select SWAP_IO_SPACE
74 + select ARCH_REQUIRE_GPIOLIB
75 + help
76 + Support for BCM63XX based boards
77 +
78 config MIPS_COBALT
79 bool "Cobalt Server"
80 select CEVT_R4K
81 @@ -600,6 +615,7 @@ endchoice
82
83 source "arch/mips/au1000/Kconfig"
84 source "arch/mips/basler/excite/Kconfig"
85 +source "arch/mips/bcm63xx/Kconfig"
86 source "arch/mips/jazz/Kconfig"
87 source "arch/mips/lasat/Kconfig"
88 source "arch/mips/pmc-sierra/Kconfig"
89 --- a/arch/mips/Makefile
90 +++ b/arch/mips/Makefile
91 @@ -533,6 +533,13 @@ cflags-$(CONFIG_BCM47XX) += -Iinclude/as
92 load-$(CONFIG_BCM47XX) := 0xffffffff80001000
93
94 #
95 +# Broadcom BCM63XX boards
96 +#
97 +core-$(CONFIG_BCM63XX) += arch/mips/bcm63xx/
98 +cflags-$(CONFIG_BCM63XX) += -Iinclude/asm-mips/mach-bcm63xx/
99 +load-$(CONFIG_BCM63XX) := 0xffffffff80010000
100 +
101 +#
102 # SNI RM
103 #
104 core-$(CONFIG_SNI_RM) += arch/mips/sni/
105 --- a/include/asm-mips/fixmap.h
106 +++ b/include/asm-mips/fixmap.h
107 @@ -67,11 +67,15 @@ enum fixed_addresses {
108 * the start of the fixmap, and leave one page empty
109 * at the top of mem..
110 */
111 +#ifdef CONFIG_BCM63XX
112 +#define FIXADDR_TOP ((unsigned long)(long)(int)0xff000000)
113 +#else
114 #if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX)
115 #define FIXADDR_TOP ((unsigned long)(long)(int)(0xff000000 - 0x20000))
116 #else
117 #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
118 #endif
119 +#endif
120 #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
121 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
122