xref: /rk3399_rockchip-uboot/arch/arm/mach-davinci/include/mach/da850_lowlevel.h (revision b9cb64825b5e6efeb715abd8b48d9b12f98973e9)
1*3d357619SMasahiro Yamada /*
2*3d357619SMasahiro Yamada  * SoC-specific lowlevel code for DA850
3*3d357619SMasahiro Yamada  *
4*3d357619SMasahiro Yamada  * Copyright (C) 2011
5*3d357619SMasahiro Yamada  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
6*3d357619SMasahiro Yamada  *
7*3d357619SMasahiro Yamada  * SPDX-License-Identifier:	GPL-2.0+
8*3d357619SMasahiro Yamada  */
9*3d357619SMasahiro Yamada #ifndef __DA850_LOWLEVEL_H
10*3d357619SMasahiro Yamada #define __DA850_LOWLEVEL_H
11*3d357619SMasahiro Yamada 
12*3d357619SMasahiro Yamada #include <asm/arch/pinmux_defs.h>
13*3d357619SMasahiro Yamada 
14*3d357619SMasahiro Yamada /* pinmux_resource[] vector is defined in the board specific file */
15*3d357619SMasahiro Yamada extern const struct pinmux_resource pinmuxes[];
16*3d357619SMasahiro Yamada extern const int pinmuxes_size;
17*3d357619SMasahiro Yamada 
18*3d357619SMasahiro Yamada extern const struct lpsc_resource lpsc[];
19*3d357619SMasahiro Yamada extern const int lpsc_size;
20*3d357619SMasahiro Yamada 
21*3d357619SMasahiro Yamada /* NOR Boot Configuration Word Field Descriptions */
22*3d357619SMasahiro Yamada #define DA850_NORBOOT_COPY_XK(X)	((X - 1) << 8)
23*3d357619SMasahiro Yamada #define DA850_NORBOOT_METHOD_DIRECT	(1 << 4)
24*3d357619SMasahiro Yamada #define DA850_NORBOOT_16BIT		(1 << 0)
25*3d357619SMasahiro Yamada 
26*3d357619SMasahiro Yamada #define dv_maskbits(addr, val) \
27*3d357619SMasahiro Yamada 	writel((readl(addr) & val), addr)
28*3d357619SMasahiro Yamada 
29*3d357619SMasahiro Yamada void da850_lpc_transition(unsigned char pscnum, unsigned char module,
30*3d357619SMasahiro Yamada 		unsigned char domain, unsigned char state);
31*3d357619SMasahiro Yamada void da850_psc_init(void);
32*3d357619SMasahiro Yamada void da850_pinmux_ctl(unsigned long offset, unsigned long mask,
33*3d357619SMasahiro Yamada 	unsigned long value);
34*3d357619SMasahiro Yamada 
35*3d357619SMasahiro Yamada #endif /* #ifndef __DA850_LOWLEVEL_H */
36