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