Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * This file contains miscellaneous low-level functions for PPC 44x.
0004  *    Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
0005  */
0006 
0007 #include <asm/reg.h>
0008 #include <asm/ppc_asm.h>
0009 
0010     .text
0011 
0012 /*
0013  * Do an IO access in AS1
0014  */
0015 _GLOBAL(as1_readb)
0016     mfmsr   r7
0017     ori r0,r7,MSR_DS
0018     sync
0019     mtmsr   r0
0020     sync
0021     isync
0022     lbz r3,0(r3)
0023     sync
0024     mtmsr   r7
0025     sync
0026     isync
0027     blr
0028 
0029 _GLOBAL(as1_writeb)
0030     mfmsr   r7
0031     ori r0,r7,MSR_DS
0032     sync
0033     mtmsr   r0
0034     sync
0035     isync
0036     stb r3,0(r4)
0037     sync
0038     mtmsr   r7
0039     sync
0040     isync
0041     blr