mbus.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Marvell MBUS common definitions.
  3. *
  4. * Copyright (C) 2008 Marvell Semiconductor
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __LINUX_MBUS_H
  11. #define __LINUX_MBUS_H
  12. struct mbus_dram_target_info
  13. {
  14. /*
  15. * The 4-bit MBUS target ID of the DRAM controller.
  16. */
  17. u8 mbus_dram_target_id;
  18. /*
  19. * The base address, size, and MBUS attribute ID for each
  20. * of the possible DRAM chip selects. Peripherals are
  21. * required to support at least 4 decode windows.
  22. */
  23. int num_cs;
  24. struct mbus_dram_window {
  25. u8 cs_index;
  26. u8 mbus_attr;
  27. u32 base;
  28. u32 size;
  29. } cs[4];
  30. };
  31. /*
  32. * The Marvell mbus is to be found only on SOCs from the Orion family
  33. * at the moment. Provide a dummy stub for other architectures.
  34. */
  35. #ifdef CONFIG_PLAT_ORION
  36. extern const struct mbus_dram_target_info *mv_mbus_dram_info(void);
  37. #else
  38. static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void)
  39. {
  40. return NULL;
  41. }
  42. #endif
  43. #endif