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 | * |
| 7 | * See file CREDITS for list of people who contributed to this |
| 8 | * project. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software |
| 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 23 | */ |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 24 | #ifndef __DA850_LOWLEVEL_H |
| 25 | #define __DA850_LOWLEVEL_H |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 26 | |
Sughosh Ganu | a261697 | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 27 | #include <asm/arch/pinmux_defs.h> |
| 28 | |
| 29 | /* pinmux_resource[] vector is defined in the board specific file */ |
| 30 | extern const struct pinmux_resource pinmuxes[]; |
| 31 | extern const int pinmuxes_size; |
| 32 | |
| 33 | extern const struct lpsc_resource lpsc[]; |
| 34 | extern const int lpsc_size; |
| 35 | |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 36 | /* NOR Boot Configuration Word Field Descriptions */ |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 37 | #define DA850_NORBOOT_COPY_XK(X) ((X - 1) << 8) |
| 38 | #define DA850_NORBOOT_METHOD_DIRECT (1 << 4) |
| 39 | #define DA850_NORBOOT_16BIT (1 << 0) |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 40 | |
| 41 | #define dv_maskbits(addr, val) \ |
| 42 | writel((readl(addr) & val), addr) |
| 43 | |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 44 | void da850_waitloop(unsigned long loopcnt); |
| 45 | int da850_pll_init(struct davinci_pllc_regs *reg, unsigned long pllmult); |
| 46 | void da850_lpc_transition(unsigned char pscnum, unsigned char module, |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 47 | unsigned char domain, unsigned char state); |
Heiko Schocher | 34061e8 | 2011-11-15 10:00:02 -0500 | [diff] [blame] | 48 | int da850_ddr_setup(void); |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 49 | void da850_psc_init(void); |
| 50 | void da850_pinmux_ctl(unsigned long offset, unsigned long mask, |
Heiko Schocher | fe954e3 | 2011-09-14 19:59:38 +0000 | [diff] [blame] | 51 | unsigned long value); |
| 52 | |
Christian Riesch | 0e5e0c5 | 2011-11-08 08:55:07 -0500 | [diff] [blame] | 53 | #endif /* #ifndef __DA850_LOWLEVEL_H */ |