[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] GPIO LED heartbeat confusion
Hi folks,
I am using the Xilinx Spartan-3e 500 Board.
I wanted to use the GPIO_0 port and found out that my LEDs turn off
automatically after a short while. And the xilinx_gpio driver itself
looked innocent...
One grep and I found the following in
arch/microblaze/platform/microblaze-auto/machine.c:
>/* Function to drive one of the LED segments */
void mach_heartbeat(unsigned int value)
{
/*
* FIXME Strictly speaking this should probably be
* protected by a semaphore
*/
#ifdef CONFIG_XILINX_GPIO_0_INSTANCE
/* Read current value on the port */
volatile unsigned int cur_val = microblaze_gpio_read(CONFIG_XILINX_GPIO_0_BASEADDR);
/* Clear LED bit */
cur_val &= ~0x00010000;
/* Set it if required */
if(value)
cur_val |= 0x00010000;
microblaze_gpio_write(CONFIG_XILINX_GPIO_0_BASEADDR,cur_val);
#endif
}
That could drive some people mad... Perhaps someone should add a config
option to turn that on and off. Btw, my board's GPIO 0 has only 8 bits
so I don't even see that there's something going on...
Best wishes,
Philipp
___________________________
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/