Commit d6879c58 authored by Robin Getz's avatar Robin Getz Committed by Bryan Wu

Blackfin arch: be less noisy when gets a gpio conflict after kernel has booted

Once the kernel has booted - be less noisy when someone does a modprobe
(and gets a gpio conflict).
Signed-off-by: default avatarRobin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent abd750a0
...@@ -802,6 +802,7 @@ int peripheral_request(unsigned short per, const char *label) ...@@ -802,6 +802,7 @@ int peripheral_request(unsigned short per, const char *label)
*/ */
if (unlikely(!check_gpio(ident) && if (unlikely(!check_gpio(ident) &&
reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) { reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
printk(KERN_ERR printk(KERN_ERR
"%s: Peripheral %d is already reserved as GPIO by %s !\n", "%s: Peripheral %d is already reserved as GPIO by %s !\n",
...@@ -830,6 +831,7 @@ int peripheral_request(unsigned short per, const char *label) ...@@ -830,6 +831,7 @@ int peripheral_request(unsigned short per, const char *label)
if (cmp_label(ident, label) == 0) if (cmp_label(ident, label) == 0)
goto anyway; goto anyway;
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
printk(KERN_ERR printk(KERN_ERR
"%s: Peripheral %d function %d is already reserved by %s !\n", "%s: Peripheral %d function %d is already reserved by %s !\n",
...@@ -946,6 +948,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) ...@@ -946,6 +948,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
} }
if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
gpio, get_label(gpio)); gpio, get_label(gpio));
...@@ -953,6 +956,7 @@ int bfin_gpio_request(unsigned gpio, const char *label) ...@@ -953,6 +956,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
return -EBUSY; return -EBUSY;
} }
if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) { if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
printk(KERN_ERR printk(KERN_ERR
"bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
...@@ -993,6 +997,7 @@ void bfin_gpio_free(unsigned gpio) ...@@ -993,6 +997,7 @@ void bfin_gpio_free(unsigned gpio)
local_irq_save_hw(flags); local_irq_save_hw(flags);
if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
gpio_error(gpio); gpio_error(gpio);
local_irq_restore_hw(flags); local_irq_restore_hw(flags);
...@@ -1017,6 +1022,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label) ...@@ -1017,6 +1022,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
local_irq_save_hw(flags); local_irq_save_hw(flags);
if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) { if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
printk(KERN_ERR printk(KERN_ERR
"bfin-gpio: GPIO %d is already reserved as gpio-irq !\n", "bfin-gpio: GPIO %d is already reserved as gpio-irq !\n",
...@@ -1025,6 +1031,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label) ...@@ -1025,6 +1031,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
return -EBUSY; return -EBUSY;
} }
if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) { if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
printk(KERN_ERR printk(KERN_ERR
"bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
...@@ -1057,6 +1064,7 @@ void bfin_gpio_irq_free(unsigned gpio) ...@@ -1057,6 +1064,7 @@ void bfin_gpio_irq_free(unsigned gpio)
local_irq_save_hw(flags); local_irq_save_hw(flags);
if (unlikely(!(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { if (unlikely(!(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
if (system_state == SYSTEM_BOOTING)
dump_stack(); dump_stack();
gpio_error(gpio); gpio_error(gpio);
local_irq_restore_hw(flags); local_irq_restore_hw(flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment