linux/arch/powerpc/platforms/44x/misc_44x.S
Stefan Roese 93173ce272 [POWERPC] 4xx: Create common ppc4xx_reset_system() in ppc4xx_soc.c
This patch creates a common system reset routine for all 40x and 44x
systems. Previously only a 44x routine existed. But since this system
reset via the debug control register is common for 40x and 44x let's
share this code for all those platforms in ppc4xx_soc.c.

This patch also enables CONFIG_4xx_SOC for all 40x and 44x platforms.

Tested on Kilauea (405EX) and Canyonlands (440EX).

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2008-04-02 20:44:56 -05:00

47 lines
743 B
ArmAsm

/*
* This file contains miscellaneous low-level functions for PPC 44x.
* Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
*/
#include <asm/reg.h>
#include <asm/ppc_asm.h>
.text
/*
* Do an IO access in AS1
*/
_GLOBAL(as1_readb)
mfmsr r7
ori r0,r7,MSR_DS
sync
mtmsr r0
sync
isync
lbz r3,0(r3)
sync
mtmsr r7
sync
isync
blr
_GLOBAL(as1_writeb)
mfmsr r7
ori r0,r7,MSR_DS
sync
mtmsr r0
sync
isync
stb r3,0(r4)
sync
mtmsr r7
sync
isync
blr