aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-clps711x
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:46:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:46:13 -0400
commit8f446a7a069e0af0639385f67c78ee2279bca04c (patch)
tree580cf495616b36ca0af0826afa87c430cdc1e7cb /arch/arm/mach-clps711x
parent84be4ae2c038e2b03d650cbf2a7cfd9e8d6e9e51 (diff)
parent04ef037c926ddb31088c976538e29eada4fd1490 (diff)
Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc driver specific changes from Olof Johansson: - A long-coming conversion of various platforms to a common LED infrastructure - AT91 is moved over to use the newer MCI driver for MMC - Pincontrol conversions for samsung platforms - DT bindings for gscaler on samsung - i2c driver fixes for tegra, acked by i2c maintainer Fix up conflicts as per Olof. * tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits) drivers: bus: omap_l3: use resources instead of hardcoded irqs pinctrl: exynos: Fix wakeup IRQ domain registration check pinctrl: samsung: Uninline samsung_pinctrl_get_soc_data pinctrl: exynos: Correct the detection of wakeup-eint node pinctrl: exynos: Mark exynos_irq_demux_eint as inline pinctrl: exynos: Handle only unmasked wakeup interrupts pinctrl: exynos: Fix typos in gpio/wkup _irq_mask pinctrl: exynos: Set pin function to EINT in irq_set_type of GPIO EINTa drivers: bus: Move the OMAP interconnect driver to drivers/bus/ i2c: tegra: dynamically control fast clk i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20 ARM: tegra: clock: remove unused clock entry for i2c ARM: tegra: clock: add connection name in i2c clock entry i2c: tegra: pass proper name for getting clock ARM: tegra: clock: add i2c fast clock entry in clock table ARM: EXYNOS: Adds G-Scaler device from Device Tree ARM: EXYNOS: Add clock support for G-Scaler ARM: EXYNOS: Enable pinctrl driver support for EXYNOS4 device tree enabled platform ARM: dts: Add pinctrl node entries for SAMSUNG EXYNOS4210 SoC ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used ...
Diffstat (limited to 'arch/arm/mach-clps711x')
-rw-r--r--arch/arm/mach-clps711x/Makefile2
-rw-r--r--arch/arm/mach-clps711x/p720t-leds.c63
-rw-r--r--arch/arm/mach-clps711x/p720t.c62
3 files changed, 62 insertions, 65 deletions
diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile
index aed9eb66449..6da6940b365 100644
--- a/arch/arm/mach-clps711x/Makefile
+++ b/arch/arm/mach-clps711x/Makefile
@@ -15,5 +15,3 @@ obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o
15obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o 15obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o
16obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o 16obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o
17obj-$(CONFIG_ARCH_P720T) += p720t.o 17obj-$(CONFIG_ARCH_P720T) += p720t.o
18leds-$(CONFIG_ARCH_P720T) += p720t-leds.o
19obj-$(CONFIG_LEDS) += $(leds-y)
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c
deleted file mode 100644
index bbc449fbe14..00000000000
--- a/arch/arm/mach-clps711x/p720t-leds.c
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * linux/arch/arm/mach-clps711x/leds.c
3 *
4 * Integrator LED control routines
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#include <linux/kernel.h>
23#include <linux/init.h>
24#include <linux/io.h>
25
26#include <mach/hardware.h>
27#include <asm/leds.h>
28#include <asm/mach-types.h>
29
30static void p720t_leds_event(led_event_t ledevt)
31{
32 unsigned long flags;
33 u32 pddr;
34
35 local_irq_save(flags);
36 switch(ledevt) {
37 case led_idle_start:
38 break;
39
40 case led_idle_end:
41 break;
42
43 case led_timer:
44 pddr = clps_readb(PDDR);
45 clps_writeb(pddr ^ 1, PDDR);
46 break;
47
48 default:
49 break;
50 }
51
52 local_irq_restore(flags);
53}
54
55static int __init leds_init(void)
56{
57 if (machine_is_p720t())
58 leds_event = p720t_leds_event;
59
60 return 0;
61}
62
63arch_initcall(leds_init);
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index f266d90b9ef..b752b586fc2 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -23,6 +23,8 @@
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/slab.h>
27#include <linux/leds.h>
26 28
27#include <mach/hardware.h> 29#include <mach/hardware.h>
28#include <asm/pgtable.h> 30#include <asm/pgtable.h>
@@ -34,6 +36,8 @@
34#include <asm/mach/map.h> 36#include <asm/mach/map.h>
35#include <mach/syspld.h> 37#include <mach/syspld.h>
36 38
39#include <asm/hardware/clps7111.h>
40
37#include "common.h" 41#include "common.h"
38 42
39/* 43/*
@@ -107,6 +111,64 @@ static void __init p720t_init_early(void)
107 } 111 }
108} 112}
109 113
114/*
115 * LED controled by CPLD
116 */
117#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
118static 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
131static 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
138static 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 */
169fs_initcall(p720t_leds_init);
170#endif
171
110MACHINE_START(P720T, "ARM-Prospector720T") 172MACHINE_START(P720T, "ARM-Prospector720T")
111 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 173 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
112 .atag_offset = 0x100, 174 .atag_offset = 0x100,