2010-06-15 15:30:38 request_irq(IRQ_UART0_TX) fails
Steven Vacca (UNITED STATES)
Message: 90327
Hi,
I have a BF-537.
In my driver, I am able to successfully request an IRQ for UART0_RX, request_irq(IRQ_UART0_RX), but get failure when trying to execute a request_irq(IRQ_UART0_TX).
I also have no problem executing a request_irq for IRQ_UART1_TX. Could it be that since I have the console enabled, then I can't have access to the UART0 TX irq?
My call is:
request_irq(IRQ_UART0_TX,uart0_tx_ISR,IRQF_SHARED,"UART0_TX",&uart0_tx_data);
Thanks for help!
QuoteReplyEditDelete
2010-06-15 15:42:20 Re: request_irq(IRQ_UART0_TX) fails
Mike Frysinger (UNITED STATES)
Message: 90328
if you enabled the Blackfin UART driver for UART0, then you cant use the same resources
also, this question has nothing to do with the toolchain ... it is a Linux question, so i'm moving it to the correct forum
QuoteReplyEditDelete
2010-06-15 19:46:08 Re: request_irq(IRQ_UART0_TX) fails
Steven Vacca (UNITED STATES)
Message: 90331
I am booting with the console enabled and the Blackfin UART driver enabled for UART0. This gives me printk() msgs out thru UART0 during bootup. But once my app starts, is there a way to disable the console and free-up UART0 so I can have full control of it and execute a request_irq() and use UART0 with my own driver? If not, am I correct that the only alternative is to recompile with the console and Blackfin UART0 disabled, thus giving me no bootup prints?
QuoteReplyEditDelete
2010-06-15 20:37:56 Re: request_irq(IRQ_UART0_TX) fails
Mike Frysinger (UNITED STATES)
Message: 90332
dont enable UART0 if you plan on using the resources
QuoteReplyEditDelete
2010-06-16 02:21:17 Re: request_irq(IRQ_UART0_TX) fails
Mike Sinkovsky (RUSSIAN FEDERATION)
Message: 90333
BTW, I have similar problem.
We have a device, connected via UART. But it is not always present, more likely it is not present. And I want that device working int that rare cases, but keep using UART as system console if that device is not connected.
In version 2008R1 I did it this way:
== cut ==
static void __init my_device_init(void)
{
int ret;
platform_bus_type.suspend(&ttyBF0.dev, PMSG_SUSPEND);
ret = my_device_detect();
if (ret < 0) {
platform_bus_type.resume(&ttyBF0.dev);
printk(KERN_INFO "my_device: not found\n");
} else {
platform_device_unregister(&ttyBF0);
printk(KERN_INFO "my_device: driver loaded\n");
}
}
== cut ==
- and all was OK.
But in newer releases -- 2009R1 and trunk -- this code don't works, and hangs system, so I removed it, and that device is now unsupported.
Can anyone explain what is changed since 2008 release, and what I can do for supporting that device?
QuoteReplyEditDelete
2010-06-16 10:44:33 Re: request_irq(IRQ_UART0_TX) fails
Robin Getz (UNITED STATES)
Message: 90338
Mike:
Why not just compile both as a module? in /etc/rc install yours - if it fails - it shouldn't claim any resources. When the Blackfin UART driver trys to claim things - if yours is installed - it will fail, otherwise it should work. Everything stays standard - and shouldn't cause any issues.
-Robin