Wolfgang Denk | 1d7cc1e | 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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
Wolfgang Denk | 1d7cc1e | 2009-06-14 20:58:47 +0200 | [diff] [blame] | 9 | */ |
| 10 | #ifndef __ASMPPC_MPC512X_H |
| 11 | #define __ASMPPC_MPC512X_H |
| 12 | |
| 13 | /* |
| 14 | * macros for manipulating CSx_START/STOP |
| 15 | */ |
| 16 | #define CSAW_START(start) ((start) & 0xFFFF0000) |
| 17 | #define CSAW_STOP(start, size) (((start) + (size) - 1) >> 16) |
| 18 | |
| 19 | /* |
| 20 | * Inlines |
| 21 | */ |
| 22 | |
| 23 | /* |
| 24 | * According to MPC5121e RM, configuring local access windows should |
| 25 | * be followed by a dummy read of the config register that was |
| 26 | * modified last and an isync. |
| 27 | */ |
| 28 | static inline void sync_law(volatile void *addr) |
| 29 | { |
| 30 | in_be32(addr); |
| 31 | __asm__ __volatile__ ("isync"); |
| 32 | } |
| 33 | |
| 34 | /* |
| 35 | * Prototypes |
| 36 | */ |
Wolfgang Denk | ce33a01 | 2009-10-04 22:56:08 +0200 | [diff] [blame] | 37 | extern long int fixed_sdram(ddr512x_config_t *mddrc_config, |
| 38 | u32 *dram_init_seq, int seq_sz); |
Wolfgang Denk | 1d7cc1e | 2009-06-14 20:58:47 +0200 | [diff] [blame] | 39 | extern int mpc5121_diu_init(void); |
| 40 | extern void ide_set_reset(int idereset); |
| 41 | |
| 42 | #endif /* __ASMPPC_MPC512X_H */ |