xref: /linux/arch/powerpc/platforms/44x/misc_44x.S (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * This file contains miscellaneous low-level functions for PPC 44x.
4 *    Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
5 */
6
7#include <asm/reg.h>
8#include <asm/ppc_asm.h>
9
10	.text
11
12/*
13 * Do an IO access in AS1
14 */
15_GLOBAL(as1_readb)
16	mfmsr	r7
17	ori	r0,r7,MSR_DS
18	sync
19	mtmsr	r0
20	sync
21	isync
22	lbz	r3,0(r3)
23	sync
24	mtmsr	r7
25	sync
26	isync
27	blr
28
29_GLOBAL(as1_writeb)
30	mfmsr	r7
31	ori	r0,r7,MSR_DS
32	sync
33	mtmsr	r0
34	sync
35	isync
36	stb	r3,0(r4)
37	sync
38	mtmsr	r7
39	sync
40	isync
41	blr
42