xref: /openbmc/u-boot/arch/arm/mach-davinci/include/mach/da850_lowlevel.h (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
23d357619SMasahiro Yamada /*
33d357619SMasahiro Yamada  * SoC-specific lowlevel code for DA850
43d357619SMasahiro Yamada  *
53d357619SMasahiro Yamada  * Copyright (C) 2011
63d357619SMasahiro Yamada  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
73d357619SMasahiro Yamada  */
83d357619SMasahiro Yamada #ifndef __DA850_LOWLEVEL_H
93d357619SMasahiro Yamada #define __DA850_LOWLEVEL_H
103d357619SMasahiro Yamada 
113d357619SMasahiro Yamada #include <asm/arch/pinmux_defs.h>
123d357619SMasahiro Yamada 
133d357619SMasahiro Yamada /* pinmux_resource[] vector is defined in the board specific file */
143d357619SMasahiro Yamada extern const struct pinmux_resource pinmuxes[];
153d357619SMasahiro Yamada extern const int pinmuxes_size;
163d357619SMasahiro Yamada 
173d357619SMasahiro Yamada extern const struct lpsc_resource lpsc[];
183d357619SMasahiro Yamada extern const int lpsc_size;
193d357619SMasahiro Yamada 
203d357619SMasahiro Yamada /* NOR Boot Configuration Word Field Descriptions */
213d357619SMasahiro Yamada #define DA850_NORBOOT_COPY_XK(X)	((X - 1) << 8)
223d357619SMasahiro Yamada #define DA850_NORBOOT_METHOD_DIRECT	(1 << 4)
233d357619SMasahiro Yamada #define DA850_NORBOOT_16BIT		(1 << 0)
243d357619SMasahiro Yamada 
253d357619SMasahiro Yamada #define dv_maskbits(addr, val) \
263d357619SMasahiro Yamada 	writel((readl(addr) & val), addr)
273d357619SMasahiro Yamada 
283d357619SMasahiro Yamada void da850_lpc_transition(unsigned char pscnum, unsigned char module,
293d357619SMasahiro Yamada 		unsigned char domain, unsigned char state);
303d357619SMasahiro Yamada void da850_psc_init(void);
313d357619SMasahiro Yamada void da850_pinmux_ctl(unsigned long offset, unsigned long mask,
323d357619SMasahiro Yamada 	unsigned long value);
333d357619SMasahiro Yamada 
343d357619SMasahiro Yamada #endif /* #ifndef __DA850_LOWLEVEL_H */
35