mpc512x.h 948 B

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