linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problems claiming resources? (PXA, SM501G8)
@ 2007-05-21 17:13 Bill Gatliff
  0 siblings, 0 replies; only message in thread
From: Bill Gatliff @ 2007-05-21 17:13 UTC (permalink / raw)
  To: linux-fbdev-devel

Guys:


I'm using an SM501G8 on a PXA270, linux-2.6.21.1 kernel. I'm stuck with 
this at boot:

[ 1.380000] sm501 sm501.0: SM501 At c181e000: Version 050100a0, 4 Mb, IRQ 85
[ 1.410000] sm501 sm501.0: CurrentGate 00021807
[ 1.420000] sm501 sm501.0: CurrentClock 2a1a0a09
[ 1.440000] sm501 sm501.0: PowerModeControl 00000000
[ 1.450000] sm501-fb[0] flags 00000200: 13e80000..13e8ffff
[ 1.470000] sm501-fb[1] flags 00000200: 13f00000..13f4ffff
[ 1.480000] sm501-fb[2] flags 00000200: 10000000..103fffff
[ 1.500000] sm501-fb[3] flags 00000400: 00000055..00000055
[ 1.520000] sm501-fb.0: failed to claim resource 0
[ 1.530000] sm501 sm501.0: error registering sm501-fb (-16)
[ 1.550000] returning 0


My resource definition looks like this:

static struct resource sm501_device_resources[] = {
[0] = {
    .start = PXA_CS4_PHYS,
    .end = PXA_CS4_PHYS + (4 * 1024 * 1024) - 1,
    .flags = IORESOURCE_MEM,
}, [1] = {
    .start = PXA_CS4_PHYS + 0x3e00000,
    .end = PXA_CS4_PHYS + 0x3e0fffff,
    .flags = IORESOURCE_MEM,
}, [2] = {
    .start = IRQ_GPIO(53),
    .end = IRQ_GPIO(53),
    .flags = IORESOURCE_IRQ,
}, };

static struct platform_device sm501_device = {
    .name = "sm501",
    .id = 0,
    .num_resources = ARRAY_SIZE(sm501_device_resources),
    .resource = sm501_device_resources,
};

static struct platform_device *devices[] __initdata = { &sm501_device, };
platform_add_devices(devices, ARRAY_SIZE(devices));


All the above was gleaned from staring at the code in sm501.c, so I'm 
probably doing something wrong.   :)

My theory right now is that I'm not specifying the right ranges for the 
resources. For example, after looking at the code in sm501.c it appears 
as though I'm not supposed to resource _all_ the device's control 
register memory, only a little bit (the code in sm501_register_display() 
appears to grab the rest).  I think I must be still making a mistake 
like that in the above, but I can't seem to find it.

Any suggestions? I'm not registering an "sm501-fb" device, only the 
"sm501" device shown above.


Regards,


b.g.

-- 
Bill Gatliff
bgat@billgatliff.com


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-21 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 17:13 Problems claiming resources? (PXA, SM501G8) Bill Gatliff

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).