Re: Unable to Read PPC440EPx Board ID thru Board Control and Status Registers (BCSR)
From: Dell Query <hidden>
Date: 2007-11-28 08:26:02
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 [off-list ref] 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 0xC0002000This 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.