aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-29 20:17:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-29 20:17:35 -0400
commit6bec11921a7d7b11d0b1909596636632aece5a26 (patch)
tree1bf2ac7d5c482afb2c5cf59c0fc7db7c7ac03ff6 /drivers
parent553cbf0a8f19c669bed82028988aa977558ef551 (diff)
parentdb7e1bc479cc941c53839b18ff811c7def0c52e7 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6061/1: PL061 GPIO: Bug fix - setting gpio for HIGH_LEVEL interrupt is not working. ARM: 5957/1: ARM: RealView SD/MMC Card detection and write-protect using GPIOLIB ARM: 6030/1: KS8695: enable console ARM: 6060/1: PL061 GPIO: Setting gpio val after changing direction to OUT. ARM: 6059/1: PL061 GPIO: Changing *_irq_chip_data with *_irq_data for real irqs. ARM: 6023/1: update bcmring_defconfig to latest version and fix build error ARM: fix build error in arch/arm/kernel/process.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/pl061.c14
-rw-r--r--drivers/serial/serial_ks8695.c1
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c
index 5ad8f778ced4..105701a1f05b 100644
--- a/drivers/gpio/pl061.c
+++ b/drivers/gpio/pl061.c
@@ -91,6 +91,12 @@ static int pl061_direction_output(struct gpio_chip *gc, unsigned offset,
91 gpiodir = readb(chip->base + GPIODIR); 91 gpiodir = readb(chip->base + GPIODIR);
92 gpiodir |= 1 << offset; 92 gpiodir |= 1 << offset;
93 writeb(gpiodir, chip->base + GPIODIR); 93 writeb(gpiodir, chip->base + GPIODIR);
94
95 /*
96 * gpio value is set again, because pl061 doesn't allow to set value of
97 * a gpio pin before configuring it in OUT mode.
98 */
99 writeb(!!value << offset, chip->base + (1 << (offset + 2)));
94 spin_unlock_irqrestore(&chip->lock, flags); 100 spin_unlock_irqrestore(&chip->lock, flags);
95 101
96 return 0; 102 return 0;
@@ -183,7 +189,7 @@ static int pl061_irq_type(unsigned irq, unsigned trigger)
183 gpioibe &= ~(1 << offset); 189 gpioibe &= ~(1 << offset);
184 if (trigger & IRQ_TYPE_EDGE_RISING) 190 if (trigger & IRQ_TYPE_EDGE_RISING)
185 gpioiev |= 1 << offset; 191 gpioiev |= 1 << offset;
186 else 192 else if (trigger & IRQ_TYPE_EDGE_FALLING)
187 gpioiev &= ~(1 << offset); 193 gpioiev &= ~(1 << offset);
188 } 194 }
189 writeb(gpioibe, chip->base + GPIOIBE); 195 writeb(gpioibe, chip->base + GPIOIBE);
@@ -204,7 +210,7 @@ static struct irq_chip pl061_irqchip = {
204 210
205static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) 211static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
206{ 212{
207 struct list_head *chip_list = get_irq_chip_data(irq); 213 struct list_head *chip_list = get_irq_data(irq);
208 struct list_head *ptr; 214 struct list_head *ptr;
209 struct pl061_gpio *chip; 215 struct pl061_gpio *chip;
210 216
@@ -297,9 +303,9 @@ static int __init pl061_probe(struct amba_device *dev, struct amba_id *id)
297 goto iounmap; 303 goto iounmap;
298 } 304 }
299 INIT_LIST_HEAD(chip_list); 305 INIT_LIST_HEAD(chip_list);
300 set_irq_chip_data(irq, chip_list); 306 set_irq_data(irq, chip_list);
301 } else 307 } else
302 chip_list = get_irq_chip_data(irq); 308 chip_list = get_irq_data(irq);
303 list_add(&chip->list, chip_list); 309 list_add(&chip->list, chip_list);
304 310
305 for (i = 0; i < PL061_GPIO_NR; i++) { 311 for (i = 0; i < PL061_GPIO_NR; i++) {
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index 2e71bbc04dac..b1962025b1aa 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -650,6 +650,7 @@ static struct console ks8695_console = {
650 650
651static int __init ks8695_console_init(void) 651static int __init ks8695_console_init(void)
652{ 652{
653 add_preferred_console(SERIAL_KS8695_DEVNAME, 0, NULL);
653 register_console(&ks8695_console); 654 register_console(&ks8695_console);
654 return 0; 655 return 0;
655} 656}