chip select initialization - mbx860

Alex Zeffertt ajz at
Wed Nov 12 22:46:17 EST 2003

On Tue, 2003-11-11 at 15:35, Amit.Lubovsky at wrote:
> Hi,
> I try to set up the qspan bridge on the mbx860 board and from my
> understanding
> I have to initialize chip select 2 to an address that will be used later by
> the cpu.
> Any idea how this should be done ?
> I use kernel 2.4  from
> Thanks,
> Amit.


Here's some example code.  At the end reg is a pointer containing a
kernel virtual address, and it points at 0x100 bytes starting at
physical address PHYSADDR.  You will need to choose a PHYSADDR, and
modify the OR2 and BR2 settings (these registers are covered in the


    // Get a usable virtual address corresponding to PHYSADDR
    if ((result = check_mem_region(PHYSADDR,0x100))) {
        printk(KERN_ERR "Error: memory already in use\n");
        return result;


    // These are very relaxed timings - but who cares ;-|
    immap->im_memctl.memc_or2 = 0xff000ff4; barrier();
    immap->im_memctl.memc_br2 = PHYSADDR | 0x00000401; barrier();

    if ((regs = ioremap_nocache(PHYSADDR,0x100)) == NULL) {
        printk(KERN_ERR "Error: ioremap failed\n");
        return -EFAULT;

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list