aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorRobin Getz <rgetz@blackfin.uclinux.org>2009-03-28 13:10:30 -0400
committerBryan Wu <cooloney@kernel.org>2009-03-28 13:10:30 -0400
commitd6879c585b7f8c2f3eb2f7e7beac806af4e9755c (patch)
treebf7c9739a16a33c69e617986e7b5b646c98ec5a3 /arch/blackfin/kernel
parentabd750a0fa731f9fd568526adb96d11322734167 (diff)
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: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 031ea3e21400..a0678da40532 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -802,7 +802,8 @@ int peripheral_request(unsigned short per, const char *label)
802 */ 802 */
803 if (unlikely(!check_gpio(ident) && 803 if (unlikely(!check_gpio(ident) &&
804 reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) { 804 reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
805 dump_stack(); 805 if (system_state == SYSTEM_BOOTING)
806 dump_stack();
806 printk(KERN_ERR 807 printk(KERN_ERR
807 "%s: Peripheral %d is already reserved as GPIO by %s !\n", 808 "%s: Peripheral %d is already reserved as GPIO by %s !\n",
808 __func__, ident, get_label(ident)); 809 __func__, ident, get_label(ident));
@@ -830,7 +831,8 @@ int peripheral_request(unsigned short per, const char *label)
830 if (cmp_label(ident, label) == 0) 831 if (cmp_label(ident, label) == 0)
831 goto anyway; 832 goto anyway;
832 833
833 dump_stack(); 834 if (system_state == SYSTEM_BOOTING)
835 dump_stack();
834 printk(KERN_ERR 836 printk(KERN_ERR
835 "%s: Peripheral %d function %d is already reserved by %s !\n", 837 "%s: Peripheral %d function %d is already reserved by %s !\n",
836 __func__, ident, P_FUNCT2MUX(per), get_label(ident)); 838 __func__, ident, P_FUNCT2MUX(per), get_label(ident));
@@ -946,14 +948,16 @@ int bfin_gpio_request(unsigned gpio, const char *label)
946 } 948 }
947 949
948 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { 950 if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
949 dump_stack(); 951 if (system_state == SYSTEM_BOOTING)
952 dump_stack();
950 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", 953 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
951 gpio, get_label(gpio)); 954 gpio, get_label(gpio));
952 local_irq_restore_hw(flags); 955 local_irq_restore_hw(flags);
953 return -EBUSY; 956 return -EBUSY;
954 } 957 }
955 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) { 958 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
956 dump_stack(); 959 if (system_state == SYSTEM_BOOTING)
960 dump_stack();
957 printk(KERN_ERR 961 printk(KERN_ERR
958 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 962 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
959 gpio, get_label(gpio)); 963 gpio, get_label(gpio));
@@ -993,7 +997,8 @@ void bfin_gpio_free(unsigned gpio)
993 local_irq_save_hw(flags); 997 local_irq_save_hw(flags);
994 998
995 if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { 999 if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
996 dump_stack(); 1000 if (system_state == SYSTEM_BOOTING)
1001 dump_stack();
997 gpio_error(gpio); 1002 gpio_error(gpio);
998 local_irq_restore_hw(flags); 1003 local_irq_restore_hw(flags);
999 return; 1004 return;
@@ -1017,7 +1022,8 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
1017 local_irq_save_hw(flags); 1022 local_irq_save_hw(flags);
1018 1023
1019 if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) { 1024 if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
1020 dump_stack(); 1025 if (system_state == SYSTEM_BOOTING)
1026 dump_stack();
1021 printk(KERN_ERR 1027 printk(KERN_ERR
1022 "bfin-gpio: GPIO %d is already reserved as gpio-irq !\n", 1028 "bfin-gpio: GPIO %d is already reserved as gpio-irq !\n",
1023 gpio); 1029 gpio);
@@ -1025,7 +1031,8 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
1025 return -EBUSY; 1031 return -EBUSY;
1026 } 1032 }
1027 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) { 1033 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
1028 dump_stack(); 1034 if (system_state == SYSTEM_BOOTING)
1035 dump_stack();
1029 printk(KERN_ERR 1036 printk(KERN_ERR
1030 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 1037 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
1031 gpio, get_label(gpio)); 1038 gpio, get_label(gpio));
@@ -1057,7 +1064,8 @@ void bfin_gpio_irq_free(unsigned gpio)
1057 local_irq_save_hw(flags); 1064 local_irq_save_hw(flags);
1058 1065
1059 if (unlikely(!(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { 1066 if (unlikely(!(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
1060 dump_stack(); 1067 if (system_state == SYSTEM_BOOTING)
1068 dump_stack();
1061 gpio_error(gpio); 1069 gpio_error(gpio);
1062 local_irq_restore_hw(flags); 1070 local_irq_restore_hw(flags);
1063 return; 1071 return;