mpc512x.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. * macros for manipulating CSx_START/STOP
  30. */
  31. #define CSAW_START(start) ((start) & 0xFFFF0000)
  32. #define CSAW_STOP(start, size) (((start) + (size) - 1) >> 16)
  33. /*
  34. * Inlines
  35. */
  36. /*
  37. * According to MPC5121e RM, configuring local access windows should
  38. * be followed by a dummy read of the config register that was
  39. * modified last and an isync.
  40. */
  41. static inline void sync_law(volatile void *addr)
  42. {
  43. in_be32(addr);
  44. __asm__ __volatile__ ("isync");
  45. }
  46. /*
  47. * Prototypes
  48. */
  49. extern long int fixed_sdram(void);
  50. extern int mpc5121_diu_init(void);
  51. extern void ide_set_reset(int idereset);
  52. #endif /* __ASMPPC_MPC512X_H */