aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-24 15:15:55 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-24 15:16:04 -0400
commit7d1206bc2859c6e9f46e35ae697c138e7d7858a7 (patch)
tree14af84e9a635e59293edf81aa562b6740c57d310 /drivers
parentf4eb28340771c12cdbf8b5ec149dbd3b0eef1687 (diff)
parentc899445f9783309ac73073282d4c0ae27f51fa9a (diff)
Merge branch 'kirkwood/dt' into next/dt2
This was part of the for-next branch earlier but for some reasons a rebuild of the tree missed it, so I'm putting it back in now. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/serio/ams_delta_serio.c54
-rw-r--r--drivers/leds/Kconfig7
-rw-r--r--drivers/leds/Makefile1
-rw-r--r--drivers/leds/leds-ams-delta.c126
-rw-r--r--drivers/mtd/nand/ams-delta.c74
-rw-r--r--drivers/rtc/rtc-mv.c9
-rw-r--r--drivers/spi/spi-orion.c5
-rw-r--r--drivers/video/omap/lcd_ams_delta.c27
-rw-r--r--drivers/watchdog/orion_wdt.c24
9 files changed, 130 insertions, 197 deletions
diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c
index d4d08bd9205b..bd5b10eeeb40 100644
--- a/drivers/input/serio/ams_delta_serio.c
+++ b/drivers/input/serio/ams_delta_serio.c
@@ -92,8 +92,7 @@ static irqreturn_t ams_delta_serio_interrupt(int irq, void *dev_id)
92static int ams_delta_serio_open(struct serio *serio) 92static int ams_delta_serio_open(struct serio *serio)
93{ 93{
94 /* enable keyboard */ 94 /* enable keyboard */
95 ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR, 95 gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 1);
96 AMD_DELTA_LATCH2_KEYBRD_PWR);
97 96
98 return 0; 97 return 0;
99} 98}
@@ -101,9 +100,32 @@ static int ams_delta_serio_open(struct serio *serio)
101static void ams_delta_serio_close(struct serio *serio) 100static void ams_delta_serio_close(struct serio *serio)
102{ 101{
103 /* disable keyboard */ 102 /* disable keyboard */
104 ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR, 0); 103 gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0);
105} 104}
106 105
106static const struct gpio ams_delta_gpios[] __initconst_or_module = {
107 {
108 .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATA,
109 .flags = GPIOF_DIR_IN,
110 .label = "serio-data",
111 },
112 {
113 .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_CLK,
114 .flags = GPIOF_DIR_IN,
115 .label = "serio-clock",
116 },
117 {
118 .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
119 .flags = GPIOF_OUT_INIT_LOW,
120 .label = "serio-power",
121 },
122 {
123 .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT,
124 .flags = GPIOF_OUT_INIT_LOW,
125 .label = "serio-dataout",
126 },
127};
128
107static int __init ams_delta_serio_init(void) 129static int __init ams_delta_serio_init(void)
108{ 130{
109 int err; 131 int err;
@@ -123,19 +145,12 @@ static int __init ams_delta_serio_init(void)
123 strlcpy(ams_delta_serio->phys, "GPIO/serio0", 145 strlcpy(ams_delta_serio->phys, "GPIO/serio0",
124 sizeof(ams_delta_serio->phys)); 146 sizeof(ams_delta_serio->phys));
125 147
126 err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_DATA, "serio-data"); 148 err = gpio_request_array(ams_delta_gpios,
149 ARRAY_SIZE(ams_delta_gpios));
127 if (err) { 150 if (err) {
128 pr_err("ams_delta_serio: Couldn't request gpio pin for data\n"); 151 pr_err("ams_delta_serio: Couldn't request gpio pins\n");
129 goto serio; 152 goto serio;
130 } 153 }
131 gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
132
133 err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_CLK, "serio-clock");
134 if (err) {
135 pr_err("ams_delta_serio: couldn't request gpio pin for clock\n");
136 goto gpio_data;
137 }
138 gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
139 154
140 err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 155 err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
141 ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING, 156 ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING,
@@ -143,7 +158,7 @@ static int __init ams_delta_serio_init(void)
143 if (err < 0) { 158 if (err < 0) {
144 pr_err("ams_delta_serio: couldn't request gpio interrupt %d\n", 159 pr_err("ams_delta_serio: couldn't request gpio interrupt %d\n",
145 gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); 160 gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK));
146 goto gpio_clk; 161 goto gpio;
147 } 162 }
148 /* 163 /*
149 * Since GPIO register handling for keyboard clock pin is performed 164 * Since GPIO register handling for keyboard clock pin is performed
@@ -157,10 +172,9 @@ static int __init ams_delta_serio_init(void)
157 dev_info(&ams_delta_serio->dev, "%s\n", ams_delta_serio->name); 172 dev_info(&ams_delta_serio->dev, "%s\n", ams_delta_serio->name);
158 173
159 return 0; 174 return 0;
160gpio_clk: 175gpio:
161 gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK); 176 gpio_free_array(ams_delta_gpios,
162gpio_data: 177 ARRAY_SIZE(ams_delta_gpios));
163 gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
164serio: 178serio:
165 kfree(ams_delta_serio); 179 kfree(ams_delta_serio);
166 return err; 180 return err;
@@ -171,7 +185,7 @@ static void __exit ams_delta_serio_exit(void)
171{ 185{
172 serio_unregister_port(ams_delta_serio); 186 serio_unregister_port(ams_delta_serio);
173 free_irq(OMAP_GPIO_IRQ(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0); 187 free_irq(OMAP_GPIO_IRQ(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0);
174 gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK); 188 gpio_free_array(ams_delta_gpios,
175 gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA); 189 ARRAY_SIZE(ams_delta_gpios));
176} 190}
177module_exit(ams_delta_serio_exit); 191module_exit(ams_delta_serio_exit);
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 9ca28fced2b9..f5d5c03676f8 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -74,13 +74,6 @@ config LEDS_S3C24XX
74 This option enables support for LEDs connected to GPIO lines 74 This option enables support for LEDs connected to GPIO lines
75 on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440. 75 on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440.
76 76
77config LEDS_AMS_DELTA
78 tristate "LED Support for the Amstrad Delta (E3)"
79 depends on LEDS_CLASS
80 depends on MACH_AMS_DELTA
81 help
82 This option enables support for the LEDs on Amstrad Delta (E3).
83
84config LEDS_NET48XX 77config LEDS_NET48XX
85 tristate "LED Support for Soekris net48xx series Error LED" 78 tristate "LED Support for Soekris net48xx series Error LED"
86 depends on LEDS_CLASS 79 depends on LEDS_CLASS
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index 1fc6875a8b20..8cab1bb96b5d 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -12,7 +12,6 @@ obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
12obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o 12obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o
13obj-$(CONFIG_LEDS_MIKROTIK_RB532) += leds-rb532.o 13obj-$(CONFIG_LEDS_MIKROTIK_RB532) += leds-rb532.o
14obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o 14obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o
15obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o
16obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o 15obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
17obj-$(CONFIG_LEDS_NET5501) += leds-net5501.o 16obj-$(CONFIG_LEDS_NET5501) += leds-net5501.o
18obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o 17obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c
deleted file mode 100644
index 07428357c83f..000000000000
--- a/drivers/leds/leds-ams-delta.c
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 * LEDs driver for Amstrad Delta (E3)
3 *
4 * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/module.h>
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/leds.h>
16#include <plat/board-ams-delta.h>
17
18/*
19 * Our context
20 */
21struct ams_delta_led {
22 struct led_classdev cdev;
23 u8 bitmask;
24};
25
26static void ams_delta_led_set(struct led_classdev *led_cdev,
27 enum led_brightness value)
28{
29 struct ams_delta_led *led_dev =
30 container_of(led_cdev, struct ams_delta_led, cdev);
31
32 if (value)
33 ams_delta_latch1_write(led_dev->bitmask, led_dev->bitmask);
34 else
35 ams_delta_latch1_write(led_dev->bitmask, 0);
36}
37
38static struct ams_delta_led ams_delta_leds[] = {
39 {
40 .cdev = {
41 .name = "ams-delta::camera",
42 .brightness_set = ams_delta_led_set,
43 },
44 .bitmask = AMS_DELTA_LATCH1_LED_CAMERA,
45 },
46 {
47 .cdev = {
48 .name = "ams-delta::advert",
49 .brightness_set = ams_delta_led_set,
50 },
51 .bitmask = AMS_DELTA_LATCH1_LED_ADVERT,
52 },
53 {
54 .cdev = {
55 .name = "ams-delta::email",
56 .brightness_set = ams_delta_led_set,
57 },
58 .bitmask = AMS_DELTA_LATCH1_LED_EMAIL,
59 },
60 {
61 .cdev = {
62 .name = "ams-delta::handsfree",
63 .brightness_set = ams_delta_led_set,
64 },
65 .bitmask = AMS_DELTA_LATCH1_LED_HANDSFREE,
66 },
67 {
68 .cdev = {
69 .name = "ams-delta::voicemail",
70 .brightness_set = ams_delta_led_set,
71 },
72 .bitmask = AMS_DELTA_LATCH1_LED_VOICEMAIL,
73 },
74 {
75 .cdev = {
76 .name = "ams-delta::voice",
77 .brightness_set = ams_delta_led_set,
78 },
79 .bitmask = AMS_DELTA_LATCH1_LED_VOICE,
80 },
81};
82
83static int ams_delta_led_probe(struct platform_device *pdev)
84{
85 int i, ret;
86
87 for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) {
88 ams_delta_leds[i].cdev.flags |= LED_CORE_SUSPENDRESUME;
89 ret = led_classdev_register(&pdev->dev,
90 &ams_delta_leds[i].cdev);
91 if (ret < 0)
92 goto fail;
93 }
94
95 return 0;
96fail:
97 while (--i >= 0)
98 led_classdev_unregister(&ams_delta_leds[i].cdev);
99 return ret;
100}
101
102static int ams_delta_led_remove(struct platform_device *pdev)
103{
104 int i;
105
106 for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++)
107 led_classdev_unregister(&ams_delta_leds[i].cdev);
108
109 return 0;
110}
111
112static struct platform_driver ams_delta_led_driver = {
113 .probe = ams_delta_led_probe,
114 .remove = ams_delta_led_remove,
115 .driver = {
116 .name = "ams-delta-led",
117 .owner = THIS_MODULE,
118 },
119};
120
121module_platform_driver(ams_delta_led_driver);
122
123MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>");
124MODULE_DESCRIPTION("Amstrad Delta LED driver");
125MODULE_LICENSE("GPL");
126MODULE_ALIAS("platform:ams-delta-led");
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c
index 3197e9764fcd..73416951f4c1 100644
--- a/drivers/mtd/nand/ams-delta.c
+++ b/drivers/mtd/nand/ams-delta.c
@@ -26,7 +26,7 @@
26#include <asm/io.h> 26#include <asm/io.h>
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <asm/sizes.h> 28#include <asm/sizes.h>
29#include <asm/gpio.h> 29#include <linux/gpio.h>
30#include <plat/board-ams-delta.h> 30#include <plat/board-ams-delta.h>
31 31
32/* 32/*
@@ -34,8 +34,6 @@
34 */ 34 */
35static struct mtd_info *ams_delta_mtd = NULL; 35static struct mtd_info *ams_delta_mtd = NULL;
36 36
37#define NAND_MASK (AMS_DELTA_LATCH2_NAND_NRE | AMS_DELTA_LATCH2_NAND_NWE | AMS_DELTA_LATCH2_NAND_CLE | AMS_DELTA_LATCH2_NAND_ALE | AMS_DELTA_LATCH2_NAND_NCE | AMS_DELTA_LATCH2_NAND_NWP)
38
39/* 37/*
40 * Define partitions for flash devices 38 * Define partitions for flash devices
41 */ 39 */
@@ -68,10 +66,9 @@ static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte)
68 66
69 writew(0, io_base + OMAP_MPUIO_IO_CNTL); 67 writew(0, io_base + OMAP_MPUIO_IO_CNTL);
70 writew(byte, this->IO_ADDR_W); 68 writew(byte, this->IO_ADDR_W);
71 ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, 0); 69 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NWE, 0);
72 ndelay(40); 70 ndelay(40);
73 ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, 71 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NWE, 1);
74 AMS_DELTA_LATCH2_NAND_NWE);
75} 72}
76 73
77static u_char ams_delta_read_byte(struct mtd_info *mtd) 74static u_char ams_delta_read_byte(struct mtd_info *mtd)
@@ -80,12 +77,11 @@ static u_char ams_delta_read_byte(struct mtd_info *mtd)
80 struct nand_chip *this = mtd->priv; 77 struct nand_chip *this = mtd->priv;
81 void __iomem *io_base = this->priv; 78 void __iomem *io_base = this->priv;
82 79
83 ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, 0); 80 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 0);
84 ndelay(40); 81 ndelay(40);
85 writew(~0, io_base + OMAP_MPUIO_IO_CNTL); 82 writew(~0, io_base + OMAP_MPUIO_IO_CNTL);
86 res = readw(this->IO_ADDR_R); 83 res = readw(this->IO_ADDR_R);
87 ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, 84 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NRE, 1);
88 AMS_DELTA_LATCH2_NAND_NRE);
89 85
90 return res; 86 return res;
91} 87}
@@ -132,15 +128,12 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
132{ 128{
133 129
134 if (ctrl & NAND_CTRL_CHANGE) { 130 if (ctrl & NAND_CTRL_CHANGE) {
135 unsigned long bits; 131 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_NCE,
136 132 (ctrl & NAND_NCE) == 0);
137 bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0; 133 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_CLE,
138 bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0; 134 (ctrl & NAND_CLE) != 0);
139 bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0; 135 gpio_set_value(AMS_DELTA_GPIO_PIN_NAND_ALE,
140 136 (ctrl & NAND_ALE) != 0);
141 ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE |
142 AMS_DELTA_LATCH2_NAND_ALE |
143 AMS_DELTA_LATCH2_NAND_NCE, bits);
144 } 137 }
145 138
146 if (cmd != NAND_CMD_NONE) 139 if (cmd != NAND_CMD_NONE)
@@ -152,6 +145,39 @@ static int ams_delta_nand_ready(struct mtd_info *mtd)
152 return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB); 145 return gpio_get_value(AMS_DELTA_GPIO_PIN_NAND_RB);
153} 146}
154 147
148static const struct gpio _mandatory_gpio[] = {
149 {
150 .gpio = AMS_DELTA_GPIO_PIN_NAND_NCE,
151 .flags = GPIOF_OUT_INIT_HIGH,
152 .label = "nand_nce",
153 },
154 {
155 .gpio = AMS_DELTA_GPIO_PIN_NAND_NRE,
156 .flags = GPIOF_OUT_INIT_HIGH,
157 .label = "nand_nre",
158 },
159 {
160 .gpio = AMS_DELTA_GPIO_PIN_NAND_NWP,
161 .flags = GPIOF_OUT_INIT_HIGH,
162 .label = "nand_nwp",
163 },
164 {
165 .gpio = AMS_DELTA_GPIO_PIN_NAND_NWE,
166 .flags = GPIOF_OUT_INIT_HIGH,
167 .label = "nand_nwe",
168 },
169 {
170 .gpio = AMS_DELTA_GPIO_PIN_NAND_ALE,
171 .flags = GPIOF_OUT_INIT_LOW,
172 .label = "nand_ale",
173 },
174 {
175 .gpio = AMS_DELTA_GPIO_PIN_NAND_CLE,
176 .flags = GPIOF_OUT_INIT_LOW,
177 .label = "nand_cle",
178 },
179};
180
155/* 181/*
156 * Main initialization routine 182 * Main initialization routine
157 */ 183 */
@@ -223,10 +249,9 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
223 platform_set_drvdata(pdev, io_base); 249 platform_set_drvdata(pdev, io_base);
224 250
225 /* Set chip enabled, but */ 251 /* Set chip enabled, but */
226 ams_delta_latch2_write(NAND_MASK, AMS_DELTA_LATCH2_NAND_NRE | 252 err = gpio_request_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
227 AMS_DELTA_LATCH2_NAND_NWE | 253 if (err)
228 AMS_DELTA_LATCH2_NAND_NCE | 254 goto out_gpio;
229 AMS_DELTA_LATCH2_NAND_NWP);
230 255
231 /* Scan to find existence of the device */ 256 /* Scan to find existence of the device */
232 if (nand_scan(ams_delta_mtd, 1)) { 257 if (nand_scan(ams_delta_mtd, 1)) {
@@ -241,7 +266,10 @@ static int __devinit ams_delta_init(struct platform_device *pdev)
241 goto out; 266 goto out;
242 267
243 out_mtd: 268 out_mtd:
269 gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
270out_gpio:
244 platform_set_drvdata(pdev, NULL); 271 platform_set_drvdata(pdev, NULL);
272 gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
245 iounmap(io_base); 273 iounmap(io_base);
246out_release_io: 274out_release_io:
247 release_mem_region(res->start, resource_size(res)); 275 release_mem_region(res->start, resource_size(res));
@@ -262,6 +290,8 @@ static int __devexit ams_delta_cleanup(struct platform_device *pdev)
262 /* Release resources, unregister device */ 290 /* Release resources, unregister device */
263 nand_release(ams_delta_mtd); 291 nand_release(ams_delta_mtd);
264 292
293 gpio_free_array(_mandatory_gpio, ARRAY_SIZE(_mandatory_gpio));
294 gpio_free(AMS_DELTA_GPIO_PIN_NAND_RB);
265 iounmap(io_base); 295 iounmap(io_base);
266 release_mem_region(res->start, resource_size(res)); 296 release_mem_region(res->start, resource_size(res));
267 297
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
index 768e2edb9678..0dd8421d41c3 100644
--- a/drivers/rtc/rtc-mv.c
+++ b/drivers/rtc/rtc-mv.c
@@ -12,6 +12,7 @@
12#include <linux/bcd.h> 12#include <linux/bcd.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/of.h>
15#include <linux/delay.h> 16#include <linux/delay.h>
16#include <linux/gfp.h> 17#include <linux/gfp.h>
17#include <linux/module.h> 18#include <linux/module.h>
@@ -294,11 +295,19 @@ static int __exit mv_rtc_remove(struct platform_device *pdev)
294 return 0; 295 return 0;
295} 296}
296 297
298#ifdef CONFIG_OF
299static struct of_device_id rtc_mv_of_match_table[] = {
300 { .compatible = "mrvl,orion-rtc", },
301 {}
302};
303#endif
304
297static struct platform_driver mv_rtc_driver = { 305static struct platform_driver mv_rtc_driver = {
298 .remove = __exit_p(mv_rtc_remove), 306 .remove = __exit_p(mv_rtc_remove),
299 .driver = { 307 .driver = {
300 .name = "rtc-mv", 308 .name = "rtc-mv",
301 .owner = THIS_MODULE, 309 .owner = THIS_MODULE,
310 .of_match_table = of_match_ptr(rtc_mv_of_match_table),
302 }, 311 },
303}; 312};
304 313
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index 13448c832c44..e496f799b7a9 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -359,11 +359,6 @@ static int orion_spi_setup(struct spi_device *spi)
359 359
360 orion_spi = spi_master_get_devdata(spi->master); 360 orion_spi = spi_master_get_devdata(spi->master);
361 361
362 /* Fix ac timing if required. */
363 if (orion_spi->spi_info->enable_clock_fix)
364 orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG,
365 (1 << 14));
366
367 if ((spi->max_speed_hz == 0) 362 if ((spi->max_speed_hz == 0)
368 || (spi->max_speed_hz > orion_spi->max_speed)) 363 || (spi->max_speed_hz > orion_spi->max_speed))
369 spi->max_speed_hz = orion_spi->max_speed; 364 spi->max_speed_hz = orion_spi->max_speed;
diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c
index 0fdd6f6873bf..d3a311327227 100644
--- a/drivers/video/omap/lcd_ams_delta.c
+++ b/drivers/video/omap/lcd_ams_delta.c
@@ -25,6 +25,7 @@
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/lcd.h> 27#include <linux/lcd.h>
28#include <linux/gpio.h>
28 29
29#include <plat/board-ams-delta.h> 30#include <plat/board-ams-delta.h>
30#include <mach/hardware.h> 31#include <mach/hardware.h>
@@ -98,29 +99,41 @@ static struct lcd_ops ams_delta_lcd_ops = {
98 99
99/* omapfb panel section */ 100/* omapfb panel section */
100 101
102static const struct gpio _gpios[] = {
103 {
104 .gpio = AMS_DELTA_GPIO_PIN_LCD_VBLEN,
105 .flags = GPIOF_OUT_INIT_LOW,
106 .label = "lcd_vblen",
107 },
108 {
109 .gpio = AMS_DELTA_GPIO_PIN_LCD_NDISP,
110 .flags = GPIOF_OUT_INIT_LOW,
111 .label = "lcd_ndisp",
112 },
113};
114
101static int ams_delta_panel_init(struct lcd_panel *panel, 115static int ams_delta_panel_init(struct lcd_panel *panel,
102 struct omapfb_device *fbdev) 116 struct omapfb_device *fbdev)
103{ 117{
104 return 0; 118 return gpio_request_array(_gpios, ARRAY_SIZE(_gpios));
105} 119}
106 120
107static void ams_delta_panel_cleanup(struct lcd_panel *panel) 121static void ams_delta_panel_cleanup(struct lcd_panel *panel)
108{ 122{
123 gpio_free_array(_gpios, ARRAY_SIZE(_gpios));
109} 124}
110 125
111static int ams_delta_panel_enable(struct lcd_panel *panel) 126static int ams_delta_panel_enable(struct lcd_panel *panel)
112{ 127{
113 ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, 128 gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 1);
114 AMS_DELTA_LATCH2_LCD_NDISP); 129 gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 1);
115 ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN,
116 AMS_DELTA_LATCH2_LCD_VBLEN);
117 return 0; 130 return 0;
118} 131}
119 132
120static void ams_delta_panel_disable(struct lcd_panel *panel) 133static void ams_delta_panel_disable(struct lcd_panel *panel)
121{ 134{
122 ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_VBLEN, 0); 135 gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_VBLEN, 0);
123 ams_delta_latch2_write(AMS_DELTA_LATCH2_LCD_NDISP, 0); 136 gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 0);
124} 137}
125 138
126static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel) 139static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel)
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 4ad78f868515..1368e4ca3100 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -28,9 +28,9 @@
28/* 28/*
29 * Watchdog timer block registers. 29 * Watchdog timer block registers.
30 */ 30 */
31#define TIMER_CTRL (TIMER_VIRT_BASE + 0x0000) 31#define TIMER_CTRL 0x0000
32#define WDT_EN 0x0010 32#define WDT_EN 0x0010
33#define WDT_VAL (TIMER_VIRT_BASE + 0x0024) 33#define WDT_VAL 0x0024
34 34
35#define WDT_MAX_CYCLE_COUNT 0xffffffff 35#define WDT_MAX_CYCLE_COUNT 0xffffffff
36#define WDT_IN_USE 0 36#define WDT_IN_USE 0
@@ -40,6 +40,7 @@ static int nowayout = WATCHDOG_NOWAYOUT;
40static int heartbeat = -1; /* module parameter (seconds) */ 40static int heartbeat = -1; /* module parameter (seconds) */
41static unsigned int wdt_max_duration; /* (seconds) */ 41static unsigned int wdt_max_duration; /* (seconds) */
42static unsigned int wdt_tclk; 42static unsigned int wdt_tclk;
43static void __iomem *wdt_reg;
43static unsigned long wdt_status; 44static unsigned long wdt_status;
44static DEFINE_SPINLOCK(wdt_lock); 45static DEFINE_SPINLOCK(wdt_lock);
45 46
@@ -48,7 +49,7 @@ static void orion_wdt_ping(void)
48 spin_lock(&wdt_lock); 49 spin_lock(&wdt_lock);
49 50
50 /* Reload watchdog duration */ 51 /* Reload watchdog duration */
51 writel(wdt_tclk * heartbeat, WDT_VAL); 52 writel(wdt_tclk * heartbeat, wdt_reg + WDT_VAL);
52 53
53 spin_unlock(&wdt_lock); 54 spin_unlock(&wdt_lock);
54} 55}
@@ -60,7 +61,7 @@ static void orion_wdt_enable(void)
60 spin_lock(&wdt_lock); 61 spin_lock(&wdt_lock);
61 62
62 /* Set watchdog duration */ 63 /* Set watchdog duration */
63 writel(wdt_tclk * heartbeat, WDT_VAL); 64 writel(wdt_tclk * heartbeat, wdt_reg + WDT_VAL);
64 65
65 /* Clear watchdog timer interrupt */ 66 /* Clear watchdog timer interrupt */
66 reg = readl(BRIDGE_CAUSE); 67 reg = readl(BRIDGE_CAUSE);
@@ -68,9 +69,9 @@ static void orion_wdt_enable(void)
68 writel(reg, BRIDGE_CAUSE); 69 writel(reg, BRIDGE_CAUSE);
69 70
70 /* Enable watchdog timer */ 71 /* Enable watchdog timer */
71 reg = readl(TIMER_CTRL); 72 reg = readl(wdt_reg + TIMER_CTRL);
72 reg |= WDT_EN; 73 reg |= WDT_EN;
73 writel(reg, TIMER_CTRL); 74 writel(reg, wdt_reg + TIMER_CTRL);
74 75
75 /* Enable reset on watchdog */ 76 /* Enable reset on watchdog */
76 reg = readl(RSTOUTn_MASK); 77 reg = readl(RSTOUTn_MASK);
@@ -92,9 +93,9 @@ static void orion_wdt_disable(void)
92 writel(reg, RSTOUTn_MASK); 93 writel(reg, RSTOUTn_MASK);
93 94
94 /* Disable watchdog timer */ 95 /* Disable watchdog timer */
95 reg = readl(TIMER_CTRL); 96 reg = readl(wdt_reg + TIMER_CTRL);
96 reg &= ~WDT_EN; 97 reg &= ~WDT_EN;
97 writel(reg, TIMER_CTRL); 98 writel(reg, wdt_reg + TIMER_CTRL);
98 99
99 spin_unlock(&wdt_lock); 100 spin_unlock(&wdt_lock);
100} 101}
@@ -102,7 +103,7 @@ static void orion_wdt_disable(void)
102static int orion_wdt_get_timeleft(int *time_left) 103static int orion_wdt_get_timeleft(int *time_left)
103{ 104{
104 spin_lock(&wdt_lock); 105 spin_lock(&wdt_lock);
105 *time_left = readl(WDT_VAL) / wdt_tclk; 106 *time_left = readl(wdt_reg + WDT_VAL) / wdt_tclk;
106 spin_unlock(&wdt_lock); 107 spin_unlock(&wdt_lock);
107 return 0; 108 return 0;
108} 109}
@@ -236,6 +237,7 @@ static struct miscdevice orion_wdt_miscdev = {
236static int __devinit orion_wdt_probe(struct platform_device *pdev) 237static int __devinit orion_wdt_probe(struct platform_device *pdev)
237{ 238{
238 struct orion_wdt_platform_data *pdata = pdev->dev.platform_data; 239 struct orion_wdt_platform_data *pdata = pdev->dev.platform_data;
240 struct resource *res;
239 int ret; 241 int ret;
240 242
241 if (pdata) { 243 if (pdata) {
@@ -245,6 +247,10 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev)
245 return -ENODEV; 247 return -ENODEV;
246 } 248 }
247 249
250 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
251
252 wdt_reg = ioremap(res->start, resource_size(res));
253
248 if (orion_wdt_miscdev.parent) 254 if (orion_wdt_miscdev.parent)
249 return -EBUSY; 255 return -EBUSY;
250 orion_wdt_miscdev.parent = &pdev->dev; 256 orion_wdt_miscdev.parent = &pdev->dev;