Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256704
b: refs/heads/master
c: a8be8da
h: refs/heads/master
v: v3
  • Loading branch information
Charulatha V authored and Kevin Hilman committed Jun 16, 2011
1 parent 2045640 commit ca30678
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 129fd2230733ff0457e76d6aabde136cf8666bc0
refs/heads/master: a8be8dafd00e3ccf4f85e2f30babf42be5076324
29 changes: 2 additions & 27 deletions trunk/drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,6 @@ int gpio_bank_count;
#define GPIO_INDEX(bank, gpio) (gpio % bank->width)
#define GPIO_BIT(bank, gpio) (1 << GPIO_INDEX(bank, gpio))

static inline struct gpio_bank *get_gpio_bank(int gpio)
{
if (cpu_is_omap15xx()) {
if (OMAP_GPIO_IS_MPUIO(gpio))
return &gpio_bank[0];
return &gpio_bank[1];
}
if (cpu_is_omap16xx()) {
if (OMAP_GPIO_IS_MPUIO(gpio))
return &gpio_bank[0];
return &gpio_bank[1 + (gpio >> 4)];
}
if (cpu_is_omap7xx()) {
if (OMAP_GPIO_IS_MPUIO(gpio))
return &gpio_bank[0];
return &gpio_bank[1 + (gpio >> 5)];
}
if (cpu_is_omap24xx())
return &gpio_bank[gpio >> 5];
if (cpu_is_omap34xx() || cpu_is_omap44xx())
return &gpio_bank[gpio >> 5];
BUG();
return NULL;
}

static inline int gpio_valid(int gpio)
{
if (gpio < 0)
Expand Down Expand Up @@ -1266,7 +1241,7 @@ static struct platform_device omap_mpuio_device = {

static inline void mpuio_init(void)
{
struct gpio_bank *bank = get_gpio_bank(OMAP_MPUIO(0));
struct gpio_bank *bank = &gpio_bank[0];
platform_set_drvdata(&omap_mpuio_device, bank);

if (platform_driver_register(&omap_mpuio_driver) == 0)
Expand Down Expand Up @@ -1342,7 +1317,7 @@ static int gpio_get(struct gpio_chip *chip, unsigned offset)
u32 mask;

gpio = chip->base + offset;
bank = get_gpio_bank(gpio);
bank = container_of(chip, struct gpio_bank, chip);
reg = bank->base;
mask = GPIO_BIT(bank, gpio);

Expand Down

0 comments on commit ca30678

Please sign in to comment.