kernel: update linux 3.8 to 3.8.6
[openwrt/openwrt.git] / target / linux / ramips / patches-3.8 / 0010-MIPS-ralink-adds-Kbuild-files.patch
1 From ae2b5bb6570481b50a7175c64176b82da0a81836 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Sun, 20 Jan 2013 22:05:30 +0100
4 Subject: [PATCH 10/14] MIPS: ralink: adds Kbuild files
5
6 Add the Kbuild symbols and Makefiles needed to actually build the ralink code
7 from this series
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
11 Patchwork: http://patchwork.linux-mips.org/patch/4899/
12 ---
13 arch/mips/Kbuild.platforms | 1 +
14 arch/mips/Kconfig | 17 +++++++++++++++++
15 arch/mips/ralink/Kconfig | 32 ++++++++++++++++++++++++++++++++
16 arch/mips/ralink/Makefile | 15 +++++++++++++++
17 arch/mips/ralink/Platform | 10 ++++++++++
18 arch/mips/ralink/dts/Makefile | 1 +
19 6 files changed, 76 insertions(+)
20 create mode 100644 arch/mips/ralink/Kconfig
21 create mode 100644 arch/mips/ralink/Makefile
22 create mode 100644 arch/mips/ralink/Platform
23 create mode 100644 arch/mips/ralink/dts/Makefile
24
25 --- a/arch/mips/Kbuild.platforms
26 +++ b/arch/mips/Kbuild.platforms
27 @@ -22,6 +22,7 @@ platforms += pmc-sierra
28 platforms += pnx833x
29 platforms += pnx8550
30 platforms += powertv
31 +platforms += ralink
32 platforms += rb532
33 platforms += sgi-ip22
34 platforms += sgi-ip27
35 --- a/arch/mips/Kconfig
36 +++ b/arch/mips/Kconfig
37 @@ -434,6 +434,22 @@ config POWERTV
38 help
39 This enables support for the Cisco PowerTV Platform.
40
41 +config RALINK
42 + bool "Ralink based machines"
43 + select CEVT_R4K
44 + select CSRC_R4K
45 + select BOOT_RAW
46 + select DMA_NONCOHERENT
47 + select IRQ_CPU
48 + select USE_OF
49 + select SYS_HAS_CPU_MIPS32_R1
50 + select SYS_HAS_CPU_MIPS32_R2
51 + select SYS_SUPPORTS_32BIT_KERNEL
52 + select SYS_SUPPORTS_LITTLE_ENDIAN
53 + select SYS_HAS_EARLY_PRINTK
54 + select HAVE_MACH_CLKDEV
55 + select CLKDEV_LOOKUP
56 +
57 config SGI_IP22
58 bool "SGI IP22 (Indy/Indigo2)"
59 select FW_ARC
60 @@ -846,6 +862,7 @@ source "arch/mips/lantiq/Kconfig"
61 source "arch/mips/lasat/Kconfig"
62 source "arch/mips/pmc-sierra/Kconfig"
63 source "arch/mips/powertv/Kconfig"
64 +source "arch/mips/ralink/Kconfig"
65 source "arch/mips/sgi-ip27/Kconfig"
66 source "arch/mips/sibyte/Kconfig"
67 source "arch/mips/txx9/Kconfig"
68 --- /dev/null
69 +++ b/arch/mips/ralink/Kconfig
70 @@ -0,0 +1,32 @@
71 +if RALINK
72 +
73 +choice
74 + prompt "Ralink SoC selection"
75 + default SOC_RT305X
76 + help
77 + Select Ralink MIPS SoC type.
78 +
79 + config SOC_RT305X
80 + bool "RT305x"
81 + select USB_ARCH_HAS_HCD
82 + select USB_ARCH_HAS_OHCI
83 + select USB_ARCH_HAS_EHCI
84 +
85 +endchoice
86 +
87 +choice
88 + prompt "Devicetree selection"
89 + default DTB_RT_NONE
90 + help
91 + Select the devicetree.
92 +
93 + config DTB_RT_NONE
94 + bool "None"
95 +
96 + config DTB_RT305X_EVAL
97 + bool "RT305x eval kit"
98 + depends on SOC_RT305X
99 +
100 +endchoice
101 +
102 +endif
103 --- /dev/null
104 +++ b/arch/mips/ralink/Makefile
105 @@ -0,0 +1,15 @@
106 +# This program is free software; you can redistribute it and/or modify it
107 +# under the terms of the GNU General Public License version 2 as published
108 +# by the Free Software Foundation.#
109 +# Makefile for the Ralink common stuff
110 +#
111 +# Copyright (C) 2009-2011 Gabor Juhos <juhosg@openwrt.org>
112 +# Copyright (C) 2013 John Crispin <blogic@openwrt.org>
113 +
114 +obj-y := prom.o of.o reset.o clk.o irq.o
115 +
116 +obj-$(CONFIG_SOC_RT305X) += rt305x.o
117 +
118 +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
119 +
120 +obj-y += dts/
121 --- /dev/null
122 +++ b/arch/mips/ralink/Platform
123 @@ -0,0 +1,10 @@
124 +#
125 +# Ralink SoC common stuff
126 +#
127 +core-$(CONFIG_RALINK) += arch/mips/ralink/
128 +cflags-$(CONFIG_RALINK) += -I$(srctree)/arch/mips/include/asm/mach-ralink
129 +
130 +#
131 +# Ralink RT305x
132 +#
133 +load-$(CONFIG_SOC_RT305X) += 0xffffffff80000000
134 --- /dev/null
135 +++ b/arch/mips/ralink/dts/Makefile
136 @@ -0,0 +1 @@
137 +obj-$(CONFIG_DTB_RT305X_EVAL) := rt3052_eval.dtb.o