blob: 45a325c123c721489b6edd9cb460631b6ff23252 [file] [log] [blame]
Heiko Schocherfe954e32011-09-14 19:59:38 +00001/*
Christian Riesch0e5e0c52011-11-08 08:55:07 -05002 * SoC-specific lowlevel code for DA850
Heiko Schocherfe954e32011-09-14 19:59:38 +00003 *
4 * Copyright (C) 2011
5 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Heiko Schocherfe954e32011-09-14 19:59:38 +00008 */
Christian Riesch0e5e0c52011-11-08 08:55:07 -05009#ifndef __DA850_LOWLEVEL_H
10#define __DA850_LOWLEVEL_H
Heiko Schocherfe954e32011-09-14 19:59:38 +000011
Sughosh Ganua2616972012-02-02 00:44:41 +000012#include <asm/arch/pinmux_defs.h>
13
14/* pinmux_resource[] vector is defined in the board specific file */
15extern const struct pinmux_resource pinmuxes[];
16extern const int pinmuxes_size;
17
18extern const struct lpsc_resource lpsc[];
19extern const int lpsc_size;
20
Heiko Schocherfe954e32011-09-14 19:59:38 +000021/* NOR Boot Configuration Word Field Descriptions */
Christian Riesch0e5e0c52011-11-08 08:55:07 -050022#define DA850_NORBOOT_COPY_XK(X) ((X - 1) << 8)
23#define DA850_NORBOOT_METHOD_DIRECT (1 << 4)
24#define DA850_NORBOOT_16BIT (1 << 0)
Heiko Schocherfe954e32011-09-14 19:59:38 +000025
26#define dv_maskbits(addr, val) \
27 writel((readl(addr) & val), addr)
28
Christian Riesch0e5e0c52011-11-08 08:55:07 -050029void da850_lpc_transition(unsigned char pscnum, unsigned char module,
Heiko Schocherfe954e32011-09-14 19:59:38 +000030 unsigned char domain, unsigned char state);
Christian Riesch0e5e0c52011-11-08 08:55:07 -050031void da850_psc_init(void);
32void da850_pinmux_ctl(unsigned long offset, unsigned long mask,
Heiko Schocherfe954e32011-09-14 19:59:38 +000033 unsigned long value);
34
Christian Riesch0e5e0c52011-11-08 08:55:07 -050035#endif /* #ifndef __DA850_LOWLEVEL_H */