linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ppc405ex GPIO mapping
@ 2009-06-22 15:13 Cote, Sylvain
  2009-06-22 16:48 ` Lada Podivin
  0 siblings, 1 reply; 3+ messages in thread
From: Cote, Sylvain @ 2009-06-22 15:13 UTC (permalink / raw)
  To: linuxppc-dev@lists.ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

Hi,

I am using kernel 2.6.25.20 on my Kilauea eval board (ppc405ex).  I want to access some GPIO's.  I have configured my u-boot to reflect what GPIO configuration I need.  I try to access my GPIO's in my driver.  When accessing GPIO's, I get this error in the kernel <<Unable to handle kernel paging request for data at address 0xef600800>>.   0xef600800 is the base address of GPIO in the ppc405ex.

It looks like GPIO's are not mapped in my kernel.  I have tried to add this entry in my dts file (under POB0: opb ) but it does not work:

GPIO: gpio@ef600800
{
compatible = "ibm,gpio-405ex";
reg = <ef600800 00000020>;
};


Any clues on this issues?


Thanks

Sylvain C.

This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message.  If you have received this electronic message in error, please notify us by replying to this e-mail.
\r

[-- Attachment #2: Type: text/html, Size: 5231 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ppc405ex GPIO mapping
  2009-06-22 15:13 ppc405ex GPIO mapping Cote, Sylvain
@ 2009-06-22 16:48 ` Lada Podivin
  2009-06-23  6:29   ` Lada Podivin
  0 siblings, 1 reply; 3+ messages in thread
From: Lada Podivin @ 2009-06-22 16:48 UTC (permalink / raw)
  To: Cote, Sylvain; +Cc: linuxppc-dev@lists.ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

Hi,

I have the same board and I had a similar problem. I use 2.6.30, so I don't
know whether 2.6.25 supports the following - however, here's my suggestion.
Set these options in your kernel config: CONFIG_GPIOLIB=y and
CONFIG_PPC4xx_GPIO=y. Before compilation do "export
KCPPFLAGS=-DARCH_NR_GPIOS=32" - you have to let the kernel know, that your
GPIO has 32 pins (default value is 255) and compile the kernel.

Then change the line

compatible = "ibm,gpio-405ex";

to

compatible = "ibm,ppc4xx-gpio";

Ok! After this long journey you shoul be able to work with your GPIO pins
with functions like gpio_set_value() - from include/linux/gpio.h.
Documentation of these functions can be seen at
http://www.mjmwired.net/kernel/Documentation/gpio.txt

So, this is my solution. Maybe there are better ones, but this works well
for me :)

Best,
Lada Podivin

[-- Attachment #2: Type: text/html, Size: 1123 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ppc405ex GPIO mapping
  2009-06-22 16:48 ` Lada Podivin
@ 2009-06-23  6:29   ` Lada Podivin
  0 siblings, 0 replies; 3+ messages in thread
From: Lada Podivin @ 2009-06-23  6:29 UTC (permalink / raw)
  To: Cote, Sylvain; +Cc: linuxppc-dev@lists.ozlabs.org

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

Eh, sorry! I mean
include/asm-generic/gpio.h

NOT

include/linux/gpio.h

[-- Attachment #2: Type: text/html, Size: 378 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-23  6:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 15:13 ppc405ex GPIO mapping Cote, Sylvain
2009-06-22 16:48 ` Lada Podivin
2009-06-23  6:29   ` Lada Podivin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).