rk29:GPIO->fix the problem GPIOPullUpDown() could not set the pull up and down register
authorhhb <hhb@rock-chips.com>
Wed, 29 Jun 2011 10:07:54 +0000 (18:07 +0800)
committerhhb <hhb@rock-chips.com>
Wed, 29 Jun 2011 10:07:54 +0000 (18:07 +0800)
arch/arm/mach-rk29/gpio.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index acadc8b..634e97b
@@ -361,7 +361,7 @@ static void gpio_ack_irq(u32 irq)
 
 static int GPIOPullUpDown(struct gpio_chip *chip, unsigned int offset, unsigned enable)
 {
-       unsigned char temp=0;
+       unsigned int temp = 0;
        struct rk29_gpio_chip *rk29_gpio = to_rk29_gpio_chip(chip);
        unsigned char  __iomem *pGrfRegBase = (unsigned char  __iomem *)RK29_GRF_BASE;
        unsigned long flags;
@@ -382,6 +382,7 @@ static int GPIOPullUpDown(struct gpio_chip *chip, unsigned int offset, unsigned
                temp |= 1<<offset;
        else
                temp &= ~(1<<offset);
+
        __raw_writel(temp,pGrfRegBase + 0x78 +(rk29_gpio->id)*4);
        local_irq_restore(flags);