[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] Any assembly/8349 experts?

From: Mark Lacas
Subject: [Ltib] Any assembly/8349 experts?
Date: Sat, 23 Dec 2006 14:44:30 -0800

  Any 8349 (powerpc)/assembly experts out there?

I am trying to understand how the following instructions work.

This is the code that is supposed to reboot the MPC8349 in my mITX box, it doesn't seem to be working.

My system prints "Restart failed" and ends up in the infinite 'for' loop at the end.

If anyone could add comments to the code or explain what is happening it would be greatly appreciated.

Does anyone know of a workaround or fix?


#ifdef CONFIG_MPC8349_ITX
        /* abort(); */

        printk("8349 Restart\n");

        volatile unsigned char  dummy;
        volatile unsigned int   msr;
        unsigned int bad_addr, rmr_addr, br0_addr;

        /* Get base address mapped by BR0/OR0 */
        br0_addr = (unsigned int)(VIRT_IMMRBAR + 0x5000);
        rmr_addr = (unsigned int)(VIRT_IMMRBAR + 0x0914);

        bad_addr = br0_addr & 0xFFFF8000;

        /* Enable CheckStop Reset */
        rmr_addr |= 0x00000001;

        /* Invalidate BR0 mapping */
        br0_addr = 0;

        /* Set MSR and cause reset */
        __asm__("mfmsr %0" : "=r" (msr) );
        msr &= ~0x1000;
        __asm__("mtmsr %0" : "=r" (msr) );
        dummy = * (unsigned char *) bad_addr;
        printk("Restart failed\n");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]