Wolfgang Denk | 7629f1c | 2009-06-14 20:58:47 +0200 | [diff] [blame] | 1 | /* |
| 2 | * include/asm-ppc/mpc512x.h |
| 3 | * |
| 4 | * Prototypes, etc. for the Freescale MPC512x embedded cpu chips |
| 5 | * |
| 6 | * 2009 (C) Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 7 | * |
| 8 | * See file CREDITS for list of people who contributed to this |
| 9 | * project. |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU General Public License as |
| 13 | * published by the Free Software Foundation; either version 2 of |
| 14 | * the License, or (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program; if not, write to the Free Software |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 24 | * MA 02111-1307 USA |
| 25 | */ |
| 26 | #ifndef __ASMPPC_MPC512X_H |
| 27 | #define __ASMPPC_MPC512X_H |
| 28 | |
| 29 | /* |
| 30 | * macros for manipulating CSx_START/STOP |
| 31 | */ |
| 32 | #define CSAW_START(start) ((start) & 0xFFFF0000) |
| 33 | #define CSAW_STOP(start, size) (((start) + (size) - 1) >> 16) |
| 34 | |
| 35 | /* |
| 36 | * Inlines |
| 37 | */ |
| 38 | |
| 39 | /* |
| 40 | * According to MPC5121e RM, configuring local access windows should |
| 41 | * be followed by a dummy read of the config register that was |
| 42 | * modified last and an isync. |
| 43 | */ |
| 44 | static inline void sync_law(volatile void *addr) |
| 45 | { |
| 46 | in_be32(addr); |
| 47 | __asm__ __volatile__ ("isync"); |
| 48 | } |
| 49 | |
| 50 | /* |
| 51 | * Prototypes |
| 52 | */ |
| 53 | extern long int fixed_sdram(void); |
| 54 | extern int mpc5121_diu_init(void); |
| 55 | extern void ide_set_reset(int idereset); |
| 56 | |
| 57 | #endif /* __ASMPPC_MPC512X_H */ |