1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-25 06:52:28 +02:00

Fix gpio initialisation.

This commit is contained in:
Lars-Peter Clausen 2009-08-24 09:53:04 +02:00 committed by Xiangfu Liu
parent e20cd0d3eb
commit 1cbf56a99d

View File

@ -206,11 +206,11 @@ static int jz_gpio_irq_set_type(unsigned int irq, unsigned int flow_type)
switch(flow_type) {
case IRQ_TYPE_EDGE_RISING:
case IRQ_TYPE_EDGE_BOTH:
writel(IRQ_TO_BIT(irq), IRQ_TO_DIRECTION_SET_REG(irq));
writel(IRQ_TO_BIT(irq), IRQ_TO_TRIGGER_SET_REG(irq));
break;
case IRQ_TYPE_EDGE_FALLING:
case IRQ_TYPE_EDGE_BOTH:
writel(IRQ_TO_BIT(irq), IRQ_TO_DIRECTION_CLEAR_REG(irq));
writel(IRQ_TO_BIT(irq), IRQ_TO_TRIGGER_SET_REG(irq));
break;
@ -284,7 +284,6 @@ __init int jz_gpiolib_init(void)
for (i = 0; i < ARRAY_SIZE(jz_gpio_chips); ++i, ++chip) {
gpiochip_add(&chip->gpio_chip);
enable_irq(JZ_IRQ_INTC_GPIO(i));
set_irq_chained_handler(JZ_IRQ_INTC_GPIO(i), jz_gpio_irq_demux_handler);
for (irq = chip->irq_base; irq < chip->irq_base + chip->gpio_chip.ngpio;
++irq)
@ -295,3 +294,6 @@ __init int jz_gpiolib_init(void)
return 0;
}
arch_initcall(jz_gpiolib_init);