From: Dell Query <dell.query@yahoo.com>
To: Josh Boyer <jwboyer@gmail.com>, linuxppc-embedded@ozlabs.org
Subject: Re: Unable to Read PPC440EPx Board ID thru Board Control and Status Registers (BCSR)
Date: Tue, 27 Nov 2007 22:38:00 -0800 (PST) [thread overview]
Message-ID: <639733.2036.qm@web45601.mail.sp1.yahoo.com> (raw)
In-Reply-To: <20071127212548.3efd39e9@vader.jdub.homelinux.org>
[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]
Oh is it 0x1C0002000?
Where can I get the document? What I have is 0xC0002000 from ep440xc_um_amcc.pdf file that I get from the accompanying PPC440EPx resource CD.
Thanks!
dell
Josh Boyer <jwboyer@gmail.com> wrote: On Tue, 27 Nov 2007 02:47:45 -0800 (PST)
Dell Query wrote:
> Hi,
>
> I am creating a simple program which will try to read the board ID of the PPC440EPx thru BCSR but when I load it, it gives me "Data Read PLB Error".
>
> I am not sure if I missed out something.
>
> I would really appreciate it if somebody could help me on this.
>
> I have posted the source code below, as well as the complete message.
>
> Many thanks!
>
> SOURCE CODE:
> ----------------------------------------------------------------------
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include
>
> MODULE_LICENSE("GPL");
>
> #define BCSR_BASE 0xC0002000
This is wrong. It's 0x1C0002000.
> #define BCSR0 0
> #define BCSR1 1
> #define BCSR2 2
>
> #define USER_LED 0x2
> #define SIZE_TO_MAP 10
>
> #define LED_ON 0
>
> uint __iomem *bcsrbase = NULL;
>
> static int __init initFunction(void) {
> uint tmp;
> printk("<1> Calling init function.\n");
> printk("<1> bcsrbase value %p...\n",bcsrbase);
> printk("<1> Remapping %x...\n",BCSR_BASE);
> /*map*/
> bcsrbase = ioremap(BCSR_BASE, SIZE_TO_MAP);
Since this seems to be arch/ppc, use ioremap64.
josh
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
---------------------------------
Never miss a thing. Make Yahoo your homepage.
[-- Attachment #2: Type: text/html, Size: 2574 bytes --]
next prev parent reply other threads:[~2007-11-28 8:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 10:47 Unable to Read PPC440EPx Board ID thru Board Control and Status Registers (BCSR) Dell Query
2007-11-28 3:25 ` Josh Boyer
2007-11-28 6:38 ` Dell Query [this message]
2007-11-28 10:51 ` Stefan Roese
2007-11-29 3:16 ` Dell Query
2007-11-29 6:10 ` Stefan Roese
2007-11-29 6:41 ` Dell Query
2007-11-29 6:56 ` Stefan Roese
2007-11-29 10:01 ` Dell Query
2007-11-29 10:13 ` Stefan Roese
2007-12-03 7:17 ` Dell Query
2007-12-04 9:28 ` Stefan Roese
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=639733.2036.qm@web45601.mail.sp1.yahoo.com \
--to=dell.query@yahoo.com \
--cc=jwboyer@gmail.com \
--cc=linuxppc-embedded@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.