From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by ozlabs.org (Postfix) with ESMTP id E9372DDF8D for ; Fri, 6 Jun 2008 17:51:39 +1000 (EST) Received: by rv-out-0506.google.com with SMTP id f6so998063rvb.9 for ; Fri, 06 Jun 2008 00:51:38 -0700 (PDT) Message-ID: <388e90610806060051w6826b028h464cd5bc321f75fe@mail.gmail.com> Date: Fri, 6 Jun 2008 09:51:37 +0200 From: "Ludovic Desroches" To: linuxppc-dev@ozlabs.org Subject: Re: Using GPIO MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5100_22927129.1212738697880" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_Part_5100_22927129.1212738697880 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 > * > > ------=_Part_5100_22927129.1212738697880 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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


------=_Part_5100_22927129.1212738697880--