ralink: update patches
[openwrt.git] / target / linux / ramips / patches-3.8 / 0010-MIPS-ralink-adds-Kbuild-files.patch
1 From 79e69b7a01246e945448039f7dce170eef0b6e3b 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/79] 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 diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms
26 index 91b9d69..9a73ce6 100644
27 --- a/arch/mips/Kbuild.platforms
28 +++ b/arch/mips/Kbuild.platforms
29 @@ -22,6 +22,7 @@ platforms += pmc-sierra
30  platforms += pnx833x
31  platforms += pnx8550
32  platforms += powertv
33 +platforms += ralink
34  platforms += rb532
35  platforms += sgi-ip22
36  platforms += sgi-ip27
37 diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
38 index 2ac626a..b5081b5 100644
39 --- a/arch/mips/Kconfig
40 +++ b/arch/mips/Kconfig
41 @@ -434,6 +434,22 @@ config POWERTV
42         help
43           This enables support for the Cisco PowerTV Platform.
44  
45 +config RALINK
46 +       bool "Ralink based machines"
47 +       select CEVT_R4K
48 +       select CSRC_R4K
49 +       select BOOT_RAW
50 +       select DMA_NONCOHERENT
51 +       select IRQ_CPU
52 +       select USE_OF
53 +       select SYS_HAS_CPU_MIPS32_R1
54 +       select SYS_HAS_CPU_MIPS32_R2
55 +       select SYS_SUPPORTS_32BIT_KERNEL
56 +       select SYS_SUPPORTS_LITTLE_ENDIAN
57 +       select SYS_HAS_EARLY_PRINTK
58 +       select HAVE_MACH_CLKDEV
59 +       select CLKDEV_LOOKUP
60 +
61  config SGI_IP22
62         bool "SGI IP22 (Indy/Indigo2)"
63         select FW_ARC
64 @@ -846,6 +862,7 @@ source "arch/mips/lantiq/Kconfig"
65  source "arch/mips/lasat/Kconfig"
66  source "arch/mips/pmc-sierra/Kconfig"
67  source "arch/mips/powertv/Kconfig"
68 +source "arch/mips/ralink/Kconfig"
69  source "arch/mips/sgi-ip27/Kconfig"
70  source "arch/mips/sibyte/Kconfig"
71  source "arch/mips/txx9/Kconfig"
72 diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
73 new file mode 100644
74 index 0000000..a0b0197
75 --- /dev/null
76 +++ b/arch/mips/ralink/Kconfig
77 @@ -0,0 +1,32 @@
78 +if RALINK
79 +
80 +choice
81 +       prompt "Ralink SoC selection"
82 +       default SOC_RT305X
83 +       help
84 +         Select Ralink MIPS SoC type.
85 +
86 +       config SOC_RT305X
87 +               bool "RT305x"
88 +               select USB_ARCH_HAS_HCD
89 +               select USB_ARCH_HAS_OHCI
90 +               select USB_ARCH_HAS_EHCI
91 +
92 +endchoice
93 +
94 +choice
95 +       prompt "Devicetree selection"
96 +       default DTB_RT_NONE
97 +       help
98 +         Select the devicetree.
99 +
100 +       config DTB_RT_NONE
101 +               bool "None"
102 +
103 +       config DTB_RT305X_EVAL
104 +               bool "RT305x eval kit"
105 +               depends on SOC_RT305X
106 +
107 +endchoice
108 +
109 +endif
110 diff --git a/arch/mips/ralink/Makefile b/arch/mips/ralink/Makefile
111 new file mode 100644
112 index 0000000..939757f
113 --- /dev/null
114 +++ b/arch/mips/ralink/Makefile
115 @@ -0,0 +1,15 @@
116 +# This program is free software; you can redistribute it and/or modify it
117 +# under the terms of the GNU General Public License version 2 as published
118 +# by the Free Software Foundation.#
119 +# Makefile for the Ralink common stuff
120 +#
121 +# Copyright (C) 2009-2011 Gabor Juhos <juhosg@openwrt.org>
122 +# Copyright (C) 2013 John Crispin <blogic@openwrt.org>
123 +
124 +obj-y := prom.o of.o reset.o clk.o irq.o
125 +
126 +obj-$(CONFIG_SOC_RT305X) += rt305x.o
127 +
128 +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
129 +
130 +obj-y += dts/
131 diff --git a/arch/mips/ralink/Platform b/arch/mips/ralink/Platform
132 new file mode 100644
133 index 0000000..6babd65
134 --- /dev/null
135 +++ b/arch/mips/ralink/Platform
136 @@ -0,0 +1,10 @@
137 +#
138 +# Ralink SoC common stuff
139 +#
140 +core-$(CONFIG_RALINK)          += arch/mips/ralink/
141 +cflags-$(CONFIG_RALINK)                += -I$(srctree)/arch/mips/include/asm/mach-ralink
142 +
143 +#
144 +# Ralink RT305x
145 +#
146 +load-$(CONFIG_SOC_RT305X)      += 0xffffffff80000000
147 diff --git a/arch/mips/ralink/dts/Makefile b/arch/mips/ralink/dts/Makefile
148 new file mode 100644
149 index 0000000..1a69fb3
150 --- /dev/null
151 +++ b/arch/mips/ralink/dts/Makefile
152 @@ -0,0 +1 @@
153 +obj-$(CONFIG_DTB_RT305X_EVAL) := rt3052_eval.dtb.o
154 -- 
155 1.7.10.4
156