linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Gatliff <bgat@billgatliff.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Problems claiming resources? (PXA, SM501G8)
Date: Mon, 21 May 2007 12:13:00 -0500	[thread overview]
Message-ID: <4651D31C.4000407@billgatliff.com> (raw)

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/

                 reply	other threads:[~2007-05-21 17:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4651D31C.4000407@billgatliff.com \
    --to=bgat@billgatliff.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).