blob: bb23ad3f980b95479e7231c75eaac1a7493750e3 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Heiko Schocherfe954e32011-09-14 19:59:38 +00002/*
Christian Riesch0e5e0c52011-11-08 08:55:07 -05003 * SoC-specific lowlevel code for DA850
Heiko Schocherfe954e32011-09-14 19:59:38 +00004 *
5 * Copyright (C) 2011
6 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
Heiko Schocherfe954e32011-09-14 19:59:38 +00007 */
Christian Riesch0e5e0c52011-11-08 08:55:07 -05008#ifndef __DA850_LOWLEVEL_H
9#define __DA850_LOWLEVEL_H
Heiko Schocherfe954e32011-09-14 19:59:38 +000010
Sughosh Ganua2616972012-02-02 00:44:41 +000011#include <asm/arch/pinmux_defs.h>
12
13/* pinmux_resource[] vector is defined in the board specific file */
14extern const struct pinmux_resource pinmuxes[];
15extern const int pinmuxes_size;
16
17extern const struct lpsc_resource lpsc[];
18extern const int lpsc_size;
19
Heiko Schocherfe954e32011-09-14 19:59:38 +000020/* NOR Boot Configuration Word Field Descriptions */
Christian Riesch0e5e0c52011-11-08 08:55:07 -050021#define DA850_NORBOOT_COPY_XK(X) ((X - 1) << 8)
22#define DA850_NORBOOT_METHOD_DIRECT (1 << 4)
23#define DA850_NORBOOT_16BIT (1 << 0)
Heiko Schocherfe954e32011-09-14 19:59:38 +000024
25#define dv_maskbits(addr, val) \
26 writel((readl(addr) & val), addr)
27
Christian Riesch0e5e0c52011-11-08 08:55:07 -050028void da850_lpc_transition(unsigned char pscnum, unsigned char module,
Heiko Schocherfe954e32011-09-14 19:59:38 +000029 unsigned char domain, unsigned char state);
Christian Riesch0e5e0c52011-11-08 08:55:07 -050030void da850_psc_init(void);
31void da850_pinmux_ctl(unsigned long offset, unsigned long mask,
Heiko Schocherfe954e32011-09-14 19:59:38 +000032 unsigned long value);
33
Christian Riesch0e5e0c52011-11-08 08:55:07 -050034#endif /* #ifndef __DA850_LOWLEVEL_H */