Commit 6fce6a8d authored by Michael Hennerich's avatar Michael Hennerich Committed by Bryan Wu

[Blackfin] arch: append IRQ Number to label string

Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
parent fac3cf43
...@@ -222,11 +222,12 @@ static void bf561_gpio_unmask_irq(unsigned int irq) ...@@ -222,11 +222,12 @@ static void bf561_gpio_unmask_irq(unsigned int irq)
static unsigned int bf561_gpio_irq_startup(unsigned int irq) static unsigned int bf561_gpio_irq_startup(unsigned int irq)
{ {
unsigned int ret; unsigned int ret;
char buf[8];
u16 gpionr = irq - IRQ_PF0; u16 gpionr = irq - IRQ_PF0;
if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
snprintf(buf, sizeof buf, "IRQ %d", irq);
ret = gpio_request(gpionr, "IRQ"); ret = gpio_request(gpionr, buf);
if (ret) if (ret)
return ret; return ret;
...@@ -250,6 +251,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -250,6 +251,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
{ {
unsigned int ret; unsigned int ret;
char buf[8];
u16 gpionr = irq - IRQ_PF0; u16 gpionr = irq - IRQ_PF0;
...@@ -265,8 +267,8 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -265,8 +267,8 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
snprintf(buf, sizeof buf, "IRQ %d", irq);
ret = gpio_request(gpionr, "IRQ"); ret = gpio_request(gpionr, buf);
if (ret) if (ret)
return ret; return ret;
......
...@@ -313,6 +313,7 @@ static void bfin_demux_error_irq(unsigned int int_err_irq, ...@@ -313,6 +313,7 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)];
static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)];
static void bfin_gpio_ack_irq(unsigned int irq) static void bfin_gpio_ack_irq(unsigned int irq)
{ {
u16 gpionr = irq - IRQ_PF0; u16 gpionr = irq - IRQ_PF0;
...@@ -352,9 +353,11 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq) ...@@ -352,9 +353,11 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq)
{ {
unsigned int ret; unsigned int ret;
u16 gpionr = irq - IRQ_PF0; u16 gpionr = irq - IRQ_PF0;
char buf[8];
if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
ret = gpio_request(gpionr, "IRQ"); snprintf(buf, sizeof buf, "IRQ %d", irq);
ret = gpio_request(gpionr, buf);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -376,6 +379,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -376,6 +379,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
{ {
unsigned int ret; unsigned int ret;
char buf[8];
u16 gpionr = irq - IRQ_PF0; u16 gpionr = irq - IRQ_PF0;
if (type == IRQ_TYPE_PROBE) { if (type == IRQ_TYPE_PROBE) {
...@@ -388,7 +392,8 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -388,7 +392,8 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
ret = gpio_request(gpionr, "IRQ"); snprintf(buf, sizeof buf, "IRQ %d", irq);
ret = gpio_request(gpionr, buf);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -587,6 +592,7 @@ static void bfin_gpio_unmask_irq(unsigned int irq) ...@@ -587,6 +592,7 @@ static void bfin_gpio_unmask_irq(unsigned int irq)
static unsigned int bfin_gpio_irq_startup(unsigned int irq) static unsigned int bfin_gpio_irq_startup(unsigned int irq)
{ {
unsigned int ret; unsigned int ret;
char buf[8];
u16 gpionr = irq - IRQ_PA0; u16 gpionr = irq - IRQ_PA0;
u8 pint_val = irq2pint_lut[irq - SYS_IRQS]; u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
...@@ -598,7 +604,8 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq) ...@@ -598,7 +604,8 @@ static unsigned int bfin_gpio_irq_startup(unsigned int irq)
} }
if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
ret = gpio_request(gpionr, "IRQ"); snprintf(buf, sizeof buf, "IRQ %d", irq);
ret = gpio_request(gpionr, buf);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -620,6 +627,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -620,6 +627,7 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
{ {
unsigned int ret; unsigned int ret;
char buf[8];
u16 gpionr = irq - IRQ_PA0; u16 gpionr = irq - IRQ_PA0;
u8 pint_val = irq2pint_lut[irq - SYS_IRQS]; u8 pint_val = irq2pint_lut[irq - SYS_IRQS];
u32 pintbit = PINT_BIT(pint_val); u32 pintbit = PINT_BIT(pint_val);
...@@ -638,7 +646,8 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -638,7 +646,8 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
ret = gpio_request(gpionr, "IRQ"); snprintf(buf, sizeof buf, "IRQ %d", irq);
ret = gpio_request(gpionr, buf);
if (ret) if (ret)
return ret; return ret;
} }
......
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