[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Re: Controlling the Expansion port as a GPIO with Petalinux
Hi Karthik,
Currently, in the xilinx_gpio driver, it enables the Xilinx GPIO interrupts just after it successfully requesting IRQ resource but before the interrupt waiting queue initialization and the gpio instance linking to the gpio list. This causes problem.
I moved the GPIO interrupt enabling to the end of the probe function and used push button gpio with interrupt enabled to do the test. I kept pressing and releasing the buttons during kernel boot. The kernel successfully booted with the change.
I have attached the patch with this mail. Please go the `trunk` directory to apply it and have a try.
Regards,
Wendy
On Mon, Apr 20, 2009 at 6:17 PM, Karthik T
<sir.nigel.loring@xxxxxxxxx> wrote:
Yes, this is indeed so, tnx, and my apologies to wendy, i seem to have misunderstood what u said.
It turned out the circuit i had connected to the expansion port, was causing the issue. I disconnected all wires, and petalinux booted up. However as i tried to reconnect the wires i got the following error. can anything be done?
Starting thttpd:
petalinux login: root
Password:
# BUG: at kernel/softirq.c:128 _local_bh_enable()
Stack:
601bde30 800000a4 800000a4 800000a4 00000001 6000f8a4 6017ba80 6017ba94
00000080 6017baa8 601b05d8 00000017 00000000 601dce6c 6000f8e0 00000001
00000000 00000000 605862e0 00000000 00000000 000000a0 00000000 00000001
Call Trace:
[<6000f8a4>] __do_softirq2+0xac/0xcc
[<6000f8e0>] __do_softirq+0x1c/0x30
[<6000f924>] do_softirq+0x30/0x4c
[<600275e8>] __do_IRQ+0x9c/0x124
[<6000fab0>] irq_exit+0x34/0x48
[<6000184c>] do_IRQ+0x78/0x98
[<60001858>] do_IRQ+0x84/0x98
[<60001e00>] _interrupt+0x110/0x118
[<601be000>] _KERNEL_SDA_BASE_+0x0/0x10
[<60177718>] schedule+0x88c/0x8b0
[<60001124>] cpu_idle+0x44/0x50
[<601be000>] _KERNEL_SDA_BASE_+0x0/0x10
[<60001110>] cpu_idle+0x30/0x50
[<60001124>] cpu_idle+0x44/0x50
[<60001110>] cpu_idle+0x30/0x50
[<60000080>] rest_init+0x30/0x44
[<601be884>] start_kernel+0x358/0x370
[<60000d44>] machine_halt+0x0/0x20On Mon, Apr 20, 2009 at 7:14 AM, John Williams
<john.williams@xxxxxxxxxxxxx> wrote:
Hi Karthick,
On Tue, Apr 14, 2009 at 1:06 PM, Sir Nigel Loring
> anyone have any further thoughts on what can be done?
I think Wendy is on the right track - you may be getting an interrupt
event from the GPIO before the kernel IRQ subsystem is up and running.
Then, when the IRQ subsystem is initialised, the presence of
"pending" events may be confusing the kernel. If so, we need to fix
it, so we'll try to emulate the situation here and see if we can
reproduce.
Regards,
John
--
John Williams, PhD, B.Eng, B.IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
Index: software/linux-2.6.x-petalogix/drivers/char/xilinx_gpio/adapter.c
===================================================================
--- software/linux-2.6.x-petalogix/drivers/char/xilinx_gpio/adapter.c (revision 5214)
+++ software/linux-2.6.x-petalogix/drivers/char/xilinx_gpio/adapter.c (working copy)
@@ -424,8 +424,6 @@
if (request_irq(irq_res->start, xgpio_interrupt, 0, "XGPIO", xgpio_inst))
goto failed4;
- XIo_Out32(v_addr + 0x11C, 0x80000000); /* OPB GIE (enable interrupts globally) */
- XIo_Out32(v_addr + 0x128, 0x00000003); /* IP IER (enable for both channels) */
}
init_waitqueue_head(&xgpio_inst->wait);
@@ -442,6 +440,8 @@
else
printk(" not using IRQ\r\n");
+ XIo_Out32(v_addr + 0x11C, 0x80000000); /* OPB GIE (enable interrupts globally) */
+ XIo_Out32(v_addr + 0x128, 0x00000003); /* IP IER (enable for both channels) */
return 0; /* success */
failed4: