Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 2 | /* |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 3 | * SoC-specific lowlevel code for DA850 |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 4 | * |
| 5 | * Copyright (C) 2011 |
| 6 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 7 | */ |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 8 | #ifndef __DA850_LOWLEVEL_H |
| 9 | #define __DA850_LOWLEVEL_H |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 10 | |
Sughosh Ganu | a261697 | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 11 | #include <asm/arch/pinmux_defs.h> |
| 12 | |
| 13 | /* pinmux_resource[] vector is defined in the board specific file */ |
| 14 | extern const struct pinmux_resource pinmuxes[]; |
| 15 | extern const int pinmuxes_size; |
| 16 | |
| 17 | extern const struct lpsc_resource lpsc[]; |
| 18 | extern const int lpsc_size; |
| 19 | |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 20 | /* NOR Boot Configuration Word Field Descriptions */ |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 21 | #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 Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 24 | |
| 25 | #define dv_maskbits(addr, val) \ |
| 26 | writel((readl(addr) & val), addr) |
| 27 | |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 28 | void da850_lpc_transition(unsigned char pscnum, unsigned char module, |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 29 | unsigned char domain, unsigned char state); |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 30 | void da850_psc_init(void); |
| 31 | void da850_pinmux_ctl(unsigned long offset, unsigned long mask, |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 32 | unsigned long value); |
| 33 | |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 34 | #endif /* #ifndef __DA850_LOWLEVEL_H */ |