Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137105
b: refs/heads/master
c: d6879c5
h: refs/heads/master
i:
  137103: e2de240
v: v3
  • Loading branch information
Robin Getz authored and Bryan Wu committed Mar 28, 2009
1 parent 12e4976 commit 6edc2b9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 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: abd750a0fa731f9fd568526adb96d11322734167
refs/heads/master: d6879c585b7f8c2f3eb2f7e7beac806af4e9755c
24 changes: 16 additions & 8 deletions trunk/arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,8 @@ int peripheral_request(unsigned short per, const char *label)
*/
if (unlikely(!check_gpio(ident) &&
reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
printk(KERN_ERR
"%s: Peripheral %d is already reserved as GPIO by %s !\n",
__func__, ident, get_label(ident));
Expand Down Expand Up @@ -830,7 +831,8 @@ int peripheral_request(unsigned short per, const char *label)
if (cmp_label(ident, label) == 0)
goto anyway;

dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
printk(KERN_ERR
"%s: Peripheral %d function %d is already reserved by %s !\n",
__func__, ident, P_FUNCT2MUX(per), get_label(ident));
Expand Down Expand Up @@ -946,14 +948,16 @@ int bfin_gpio_request(unsigned gpio, const char *label)
}

if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
gpio, get_label(gpio));
local_irq_restore_hw(flags);
return -EBUSY;
}
if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
printk(KERN_ERR
"bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
gpio, get_label(gpio));
Expand Down Expand Up @@ -993,7 +997,8 @@ void bfin_gpio_free(unsigned gpio)
local_irq_save_hw(flags);

if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
gpio_error(gpio);
local_irq_restore_hw(flags);
return;
Expand All @@ -1017,15 +1022,17 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
local_irq_save_hw(flags);

if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
printk(KERN_ERR
"bfin-gpio: GPIO %d is already reserved as gpio-irq !\n",
gpio);
local_irq_restore_hw(flags);
return -EBUSY;
}
if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
printk(KERN_ERR
"bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
gpio, get_label(gpio));
Expand Down Expand Up @@ -1057,7 +1064,8 @@ void bfin_gpio_irq_free(unsigned gpio)
local_irq_save_hw(flags);

if (unlikely(!(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
dump_stack();
if (system_state == SYSTEM_BOOTING)
dump_stack();
gpio_error(gpio);
local_irq_restore_hw(flags);
return;
Expand Down

0 comments on commit 6edc2b9

Please sign in to comment.