Using GPIO
Ludovic Desroches
ludovic.desroches at gmail.com
Fri Jun 6 17:51:37 EST 2008
Hi,
I am also trying to use Xilinx GPIO driver on my board but I encounter some
problems. I thought they will be resolved with this information but it
doesn't.
I use GPIO driver as built-in but during kernel boot but I don't see log
about it contrary to Xemac driver for instance. First I wanted to create my
gpio driver normally without using Xilinx one, with ioremap and writel/readl
but I didn't write anything in the register, I don't know why. Then I tried
to use Xilinx GPIO driver but I don't know why I don't hit xgpio_probe,
xgpio_init returns 0 so it's OK.
Do you have any idea ?
Thanks
Ludovic Desroches
> arch/ppc/syslib/virtex_devices.c:
>
> >* // 0 is LEDS_4BIT, 1 is LEDS_POSITIONS, 2 is PUSH_BUTTONS_POSITION
> *>* #define XPAR_GPIO(num) { \
> *>* .name = "xilinx_gpio", \
> *>* .id = num, \
> *>* .num_resources = 2, \
> *That was a 2.
> If anybody wants to make a patch out of those few lines of code, I couldn't
> figure out how to do this with git... But I will use a more general GPIO
> approach as soon as I can put my hands on our custom card.
>
> >* .resource = (struct resource[]) { \
> *>* { \
> *>* .start = XPAR_GPIO_##num##_BASEADDR, \
> *>* .end = XPAR_GPIO_##num##_HIGHADDR, \
> *>* .flags = IORESOURCE_MEM, \
> *>* }, \
> *>* { \
> *>* .start = XPAR_INTC_0_GPIO_##num##_VEC_ID, \
> *>* .flags = IORESOURCE_IRQ, \
> *>* }, \
> *>* }, \
> *>* }
> *>* [...]
> *>* /* GPIO instances */
> *>* #if defined(XPAR_GPIO_0_BASEADDR)
> *>* XPAR_GPIO(0),
> *>* #endif
> *>* #if defined(XPAR_GPIO_1_BASEADDR)
> *>* XPAR_GPIO(1),
> *>* #endif
> *>* #if defined(XPAR_GPIO_2_BASEADDR)
> *>* XPAR_GPIO(2),
> *>* #endif
> *
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080606/2ddb20d6/attachment.htm>
More information about the Linuxppc-dev
mailing list