From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from n7.bullet.ukl.yahoo.com (n7.bullet.ukl.yahoo.com [217.146.182.187]) by ozlabs.org (Postfix) with SMTP id A8D12DDE21 for ; Wed, 28 Nov 2007 19:26:02 +1100 (EST) Date: Tue, 27 Nov 2007 22:38:00 -0800 (PST) From: Dell Query Subject: Re: Unable to Read PPC440EPx Board ID thru Board Control and Status Registers (BCSR) To: Josh Boyer , linuxppc-embedded@ozlabs.org In-Reply-To: <20071127212548.3efd39e9@vader.jdub.homelinux.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-750460071-1196231880=:2036" Message-ID: <639733.2036.qm@web45601.mail.sp1.yahoo.com> List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0-750460071-1196231880=:2036 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 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. --0-750460071-1196231880=:2036 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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. --0-750460071-1196231880=:2036--