diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 15:05:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 15:05:15 -0500 |
commit | d027db132b395dabfac208e52a7e510e441bb9d2 (patch) | |
tree | 24b055b2385f9848e77e646ce475991d8675c3c4 /arch/arm/mach-clps711x/p720t.c | |
parent | d01e4afdbb65e030fd6f1f96c30a558e2eb0f279 (diff) | |
parent | 5faf7cbb848da827f6ea1458b5a1c26a44e7510a (diff) |
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC updates from Olof Johansson:
"This contains the bulk of new SoC development for this merge window.
Two new platforms have been added, the sunxi platforms (Allwinner A1x
SoCs) by Maxime Ripard, and a generic Broadcom platform for a new
series of ARMv7 platforms from them, where the hope is that we can
keep the platform code generic enough to have them all share one mach
directory. The new Broadcom platform is contributed by Christian
Daudt.
Highbank has grown support for Calxeda's next generation of hardware,
ECX-2000.
clps711x has seen a lot of cleanup from Alexander Shiyan, and he's
also taken on maintainership of the platform.
Beyond this there has been a bunch of work from a number of people on
converting more platforms to IRQ domains, pinctrl conversion, cleanup
and general feature enablement across most of the active platforms."
Fix up trivial conflicts as per Olof.
* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (174 commits)
mfd: vexpress-sysreg: Remove LEDs code
irqchip: irq-sunxi: Add terminating entry for sunxi_irq_dt_ids
clocksource: sunxi_timer: Add terminating entry for sunxi_timer_dt_ids
irq: versatile: delete dangling variable
ARM: sunxi: add missing include for mdelay()
ARM: EXYNOS: Avoid early use of of_machine_is_compatible()
ARM: dts: add node for PL330 MDMA1 controller for exynos4
ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412
ARM: EXYNOS: add UART3 to DEBUG_LL ports
ARM: S3C24XX: Add clkdev entry for camif-upll clock
ARM: SAMSUNG: Add s3c24xx/s3c64xx CAMIF GPIO setup helpers
ARM: sunxi: Add missing sun4i.dtsi file
pinctrl: samsung: Do not initialise statics to 0
ARM i.MX6: remove gate_mask from pllv3
ARM i.MX6: Fix ethernet PLL clocks
ARM i.MX6: rename PLLs according to datasheet
ARM i.MX6: Add pwm support
ARM i.MX51: Add pwm support
ARM i.MX53: Add pwm support
ARM: mx5: Replace clk_register_clkdev with clock DT lookup
...
Diffstat (limited to 'arch/arm/mach-clps711x/p720t.c')
-rw-r--r-- | arch/arm/mach-clps711x/p720t.c | 181 |
1 files changed, 0 insertions, 181 deletions
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c deleted file mode 100644 index b752b586fc2f..000000000000 --- a/arch/arm/mach-clps711x/p720t.c +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps711x/p720t.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/slab.h> | ||
27 | #include <linux/leds.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <asm/setup.h> | ||
33 | #include <asm/sizes.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <mach/syspld.h> | ||
38 | |||
39 | #include <asm/hardware/clps7111.h> | ||
40 | |||
41 | #include "common.h" | ||
42 | |||
43 | /* | ||
44 | * Map the P720T system PLD. It occupies two address spaces: | ||
45 | * SYSPLD_PHYS_BASE and SYSPLD_PHYS_BASE + 0x00400000 | ||
46 | * We map both here. | ||
47 | */ | ||
48 | static struct map_desc p720t_io_desc[] __initdata = { | ||
49 | { | ||
50 | .virtual = SYSPLD_VIRT_BASE, | ||
51 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | ||
52 | .length = SZ_1M, | ||
53 | .type = MT_DEVICE | ||
54 | }, { | ||
55 | .virtual = 0xfe400000, | ||
56 | .pfn = __phys_to_pfn(0x10400000), | ||
57 | .length = SZ_1M, | ||
58 | .type = MT_DEVICE | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | static void __init | ||
63 | fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | ||
64 | { | ||
65 | /* | ||
66 | * Our bootloader doesn't setup any tags (yet). | ||
67 | */ | ||
68 | if (tag->hdr.tag != ATAG_CORE) { | ||
69 | tag->hdr.tag = ATAG_CORE; | ||
70 | tag->hdr.size = tag_size(tag_core); | ||
71 | tag->u.core.flags = 0; | ||
72 | tag->u.core.pagesize = PAGE_SIZE; | ||
73 | tag->u.core.rootdev = 0x0100; | ||
74 | |||
75 | tag = tag_next(tag); | ||
76 | tag->hdr.tag = ATAG_MEM; | ||
77 | tag->hdr.size = tag_size(tag_mem32); | ||
78 | tag->u.mem.size = 4096; | ||
79 | tag->u.mem.start = PHYS_OFFSET; | ||
80 | |||
81 | tag = tag_next(tag); | ||
82 | tag->hdr.tag = ATAG_NONE; | ||
83 | tag->hdr.size = 0; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static void __init p720t_map_io(void) | ||
88 | { | ||
89 | clps711x_map_io(); | ||
90 | iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | ||
91 | } | ||
92 | |||
93 | static void __init p720t_init_early(void) | ||
94 | { | ||
95 | /* | ||
96 | * Power down as much as possible in case we don't | ||
97 | * have the drivers loaded. | ||
98 | */ | ||
99 | PLD_LCDEN = 0; | ||
100 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | ||
101 | |||
102 | PLD_KBD = 0; | ||
103 | PLD_IO = 0; | ||
104 | PLD_IRDA = 0; | ||
105 | PLD_CODEC = 0; | ||
106 | PLD_TCH = 0; | ||
107 | PLD_SPI = 0; | ||
108 | if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | ||
109 | PLD_COM2 = 0; | ||
110 | PLD_COM1 = 0; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | /* | ||
115 | * LED controled by CPLD | ||
116 | */ | ||
117 | #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) | ||
118 | static void p720t_led_set(struct led_classdev *cdev, | ||
119 | enum led_brightness b) | ||
120 | { | ||
121 | u8 reg = clps_readb(PDDR); | ||
122 | |||
123 | if (b != LED_OFF) | ||
124 | reg |= 0x1; | ||
125 | else | ||
126 | reg &= ~0x1; | ||
127 | |||
128 | clps_writeb(reg, PDDR); | ||
129 | } | ||
130 | |||
131 | static enum led_brightness p720t_led_get(struct led_classdev *cdev) | ||
132 | { | ||
133 | u8 reg = clps_readb(PDDR); | ||
134 | |||
135 | return (reg & 0x1) ? LED_FULL : LED_OFF; | ||
136 | } | ||
137 | |||
138 | static int __init p720t_leds_init(void) | ||
139 | { | ||
140 | |||
141 | struct led_classdev *cdev; | ||
142 | int ret; | ||
143 | |||
144 | if (!machine_is_p720t()) | ||
145 | return -ENODEV; | ||
146 | |||
147 | cdev = kzalloc(sizeof(*cdev), GFP_KERNEL); | ||
148 | if (!cdev) | ||
149 | return -ENOMEM; | ||
150 | |||
151 | cdev->name = "p720t:0"; | ||
152 | cdev->brightness_set = p720t_led_set; | ||
153 | cdev->brightness_get = p720t_led_get; | ||
154 | cdev->default_trigger = "heartbeat"; | ||
155 | |||
156 | ret = led_classdev_register(NULL, cdev); | ||
157 | if (ret < 0) { | ||
158 | kfree(cdev); | ||
159 | return ret; | ||
160 | } | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | /* | ||
166 | * Since we may have triggers on any subsystem, defer registration | ||
167 | * until after subsystem_init. | ||
168 | */ | ||
169 | fs_initcall(p720t_leds_init); | ||
170 | #endif | ||
171 | |||
172 | MACHINE_START(P720T, "ARM-Prospector720T") | ||
173 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | ||
174 | .atag_offset = 0x100, | ||
175 | .fixup = fixup_p720t, | ||
176 | .init_early = p720t_init_early, | ||
177 | .map_io = p720t_map_io, | ||
178 | .init_irq = clps711x_init_irq, | ||
179 | .timer = &clps711x_timer, | ||
180 | .restart = clps711x_restart, | ||
181 | MACHINE_END | ||