xref: /rk3399_rockchip-uboot/arch/powerpc/lib/ppccache.S (revision a47a12becf66f02a56da91c161e2edb625e9f20c)
1*a47a12beSStefan Roese/*
2*a47a12beSStefan Roese * Copyright (C) 1998  Dan Malek <dmalek@jlc.net>
3*a47a12beSStefan Roese * Copyright (C) 1999  Magnus Damm <kieraypc01.p.y.kie.era.ericsson.se>
4*a47a12beSStefan Roese * Copyright (C) 2000, 2001,2002 Wolfgang Denk <wd@denx.de>
5*a47a12beSStefan Roese * Copyright Freescale Semiconductor, Inc. 2004, 2006.
6*a47a12beSStefan Roese *
7*a47a12beSStefan Roese * See file CREDITS for list of people who contributed to this
8*a47a12beSStefan Roese * project.
9*a47a12beSStefan Roese *
10*a47a12beSStefan Roese * This program is free software; you can redistribute it and/or
11*a47a12beSStefan Roese * modify it under the terms of the GNU General Public License as
12*a47a12beSStefan Roese * published by the Free Software Foundation; either version 2 of
13*a47a12beSStefan Roese * the License, or (at your option) any later version.
14*a47a12beSStefan Roese *
15*a47a12beSStefan Roese * This program is distributed in the hope that it will be useful,
16*a47a12beSStefan Roese * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*a47a12beSStefan Roese * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*a47a12beSStefan Roese * GNU General Public License for more details.
19*a47a12beSStefan Roese *
20*a47a12beSStefan Roese * You should have received a copy of the GNU General Public License
21*a47a12beSStefan Roese * along with this program; if not, write to the Free Software
22*a47a12beSStefan Roese * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23*a47a12beSStefan Roese * MA 02111-1307 USA
24*a47a12beSStefan Roese */
25*a47a12beSStefan Roese
26*a47a12beSStefan Roese#include <config.h>
27*a47a12beSStefan Roese#include <ppc_asm.tmpl>
28*a47a12beSStefan Roese
29*a47a12beSStefan Roese/*------------------------------------------------------------------------------- */
30*a47a12beSStefan Roese/* Function:	 ppcDcbf */
31*a47a12beSStefan Roese/* Description:	 Data Cache block flush */
32*a47a12beSStefan Roese/* Input:	 r3 = effective address */
33*a47a12beSStefan Roese/* Output:	 none. */
34*a47a12beSStefan Roese/*------------------------------------------------------------------------------- */
35*a47a12beSStefan Roese	.globl	ppcDcbf
36*a47a12beSStefan RoeseppcDcbf:
37*a47a12beSStefan Roese	dcbf	r0,r3
38*a47a12beSStefan Roese	blr
39*a47a12beSStefan Roese
40*a47a12beSStefan Roese/*------------------------------------------------------------------------------- */
41*a47a12beSStefan Roese/* Function:	 ppcDcbi */
42*a47a12beSStefan Roese/* Description:	 Data Cache block Invalidate */
43*a47a12beSStefan Roese/* Input:	 r3 = effective address */
44*a47a12beSStefan Roese/* Output:	 none. */
45*a47a12beSStefan Roese/*------------------------------------------------------------------------------- */
46*a47a12beSStefan Roese	.globl	ppcDcbi
47*a47a12beSStefan RoeseppcDcbi:
48*a47a12beSStefan Roese	dcbi	r0,r3
49*a47a12beSStefan Roese	blr
50*a47a12beSStefan Roese
51*a47a12beSStefan Roese/*--------------------------------------------------------------------------
52*a47a12beSStefan Roese * Function:	 ppcDcbz
53*a47a12beSStefan Roese * Description:	 Data Cache block zero.
54*a47a12beSStefan Roese * Input:	 r3 = effective address
55*a47a12beSStefan Roese * Output:	 none.
56*a47a12beSStefan Roese *-------------------------------------------------------------------------- */
57*a47a12beSStefan Roese
58*a47a12beSStefan Roese	.globl	ppcDcbz
59*a47a12beSStefan RoeseppcDcbz:
60*a47a12beSStefan Roese	dcbz	r0,r3
61*a47a12beSStefan Roese	blr
62*a47a12beSStefan Roese
63*a47a12beSStefan Roese/*------------------------------------------------------------------------------- */
64*a47a12beSStefan Roese/* Function:	 ppcSync */
65*a47a12beSStefan Roese/* Description:	 Processor Synchronize */
66*a47a12beSStefan Roese/* Input:	 none. */
67*a47a12beSStefan Roese/* Output:	 none. */
68*a47a12beSStefan Roese/*------------------------------------------------------------------------------- */
69*a47a12beSStefan Roese	.globl	ppcSync
70*a47a12beSStefan RoeseppcSync:
71*a47a12beSStefan Roese	sync
72*a47a12beSStefan Roese	blr
73