Skip to contentSkip to conversation

Add abort for fsl-devices which lack an RSTCR register.

PATCH New Clemens Koller 1 participant 1 message Dec 3, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add abort for fsl-devices which lack an RSTCR register.

This adds a fallback and calls abort() (in head_fsl_booke.S) to be able to successfully reset some older freescale devices (i.e. mpc8540) which don't have a RSTCR register.

Robert, this should also fix your issues. Please test.

Kumar, please ACK/NACK the patch since you touched fsl_rstcr_restart() last time (2007-10-04). Maybe the call to abort (which resets the processor via the Debug Control Register 0) could be put somewhere else or
we create another entry for the device tree.

Otherwise, I would prefer to check the PVR/SVR registers and use a suitable cpu_reset() call which fits to the current cpu.

Regards,

Signature · 10 lines
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com

Add a fallback to abort() call (in head_fsl_booke.S) to be able to successfully reset some older freescale power devices (i.e. mpc8540) which don't have a rstcr register.

arch/powerpc/sysdev/fsl_soc.c +3 -0
index 3ace747..6fe674a 100644
@@ -42,6 +42,7 @@
 extern void init_fcc_ioports(struct fs_platform_info*);
 extern void init_fec_ioports(struct fs_platform_info*);
 extern void init_smc_ioports(struct fs_uart_platform_info*);
+extern void abort(void);
 static phys_addr_t immrbase = -1;
 
 phys_addr_t get_immrbase(void)
@@ -1336,6 +1337,8 @@ void fsl_rstcr_restart(char *cmd)
 	if (rstcr)
 		/* set reset control register */
 		out_be32(rstcr, 0x2);	/* HRESET_REQ */
+	else
+		abort();
 
 	while (1) ;
 }