Subject: Re: reboot of mpc8270 sometimes fails

From: Theo Gjaltema <[email-masked]>
Date: Tue, 04 Dec 2007 09:42:26 +0100

Index: m8260_setup.c
===================================================================
RCS file: /home/.dbCVS_linux/kernel_2_4_25/arch/ppc/kernel/m8260_setup.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -c -r1.1.1.2 -r1.2
*** m8260_setup.c	2006/11/17 07:58:49	1.1.1.2
--- m8260_setup.c	2007/10/08 07:53:54	1.2
***************
*** 148,154 ****
--- 148,164 ----
  		if (!strncmp(cmd, "startaddr=", 10))
  			startaddr = simple_strtoul(&cmd[10], NULL, 0);
  	}
+ #if defined (CONFIG_8260)
+ 	{
+ #include <asm-ppc/cpm_8260.h>
+ 	    volatile	cpm8260_t	*cp = &((immap_t *)IMAP_ADDR)->im_cpm;
  
+ 	    cp->cp_cpcr = (CPM_CR_RST | CPM_CR_FLG);   /* see page 14.17 $14.4.2 of the CPM manual */
+ 	    
+ 	    while (cp->cp_cpcr & CPM_CR_FLG);          /* Wait for it (should be 2 clocks). */
+ 
+ 	}
+ #endif
  	m8260_gorom((unsigned int)__pa(__res), startaddr);
  }

lobo fan schreef:
> Hi Theo,
> Could you please give me the patch? I am very interested in your patch.
>
> -- 
> Thanks.
>
> Best Regards,
> Lobo
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> [email-masked]
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded