From: "Guillaume Dargaud" <dargaud@lpsc.in2p3.fr>
To: <linuxppc-dev@ozlabs.org>
Subject: Re: Using GPIO
Date: Mon, 19 May 2008 13:56:12 +0200 [thread overview]
Message-ID: <040b01c8b9a7$589c3b90$ad289e86@LPSC0173W> (raw)
In-Reply-To: 20080516161713.9DAAD708056@mail93-wa4.bigfish.com
Thanks for the answer,
> Dts files are not used with arch/ppc.
My question was more general, since arch/ppc will soon (?) disapear...
> In arch/ppc, the drivers that are in the system depend on the
> arch/ppc/platforms/4xx/xparameters/xparameters_ml405.h to setup the
> addresses of the devices and their configuration.
Yes, and I've taken care to define that.
> I looked at the ML405 setup in the git tree and it appears that it would
> need to be added to arch/ppc/syslib/virtex_devices.c. The platform data
> in virtex_devices.c must include the GPIO for it to be probed correctly.
> It should be easy for you to add the data to make it work.
Seems straightforward enough, but when I add the following:
// 0 is LEDS_4BIT, 1 is LEDS_POSITIONS, 2 is PUSH_BUTTONS_POSITION
#define XPAR_GPIO(num) { \
.name = "xilinx_gpio", \
.id = num, \
.num_resources = 3, \
.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
Then the boot stops right after "Uncompressing Linux...done.
Now booting the kernel"
I've probably overlooked something obvious, but I'm pretty new in putting my
greasy fingers on delicate kernel internals...
In particular I don't know what is this .num_resources value.
--
Guillaume Dargaud
http://www.gdargaud.net/
next prev parent reply other threads:[~2008-05-19 11:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 16:35 Using GPIO Guillaume Dargaud
2008-05-15 18:39 ` John Bonesio
2008-05-15 18:56 ` Stephen Neuendorffer
2008-05-16 8:15 ` Guillaume Dargaud
2008-05-16 16:17 ` John Linn
2008-05-19 11:56 ` Guillaume Dargaud [this message]
2008-05-19 13:42 ` Josh Boyer
-- strict thread matches above, loose matches on Subject: below --
2008-05-19 15:23 Guillaume Dargaud
2008-06-06 7:51 Ludovic Desroches
2008-06-06 16:09 ` Guillaume Dargaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='040b01c8b9a7$589c3b90$ad289e86@LPSC0173W' \
--to=dargaud@lpsc.in2p3.fr \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).