fsl_mc.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2014 Freescale Semiconductor
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __FSL_MC_H__
  7. #define __FSL_MC_H__
  8. #include <common.h>
  9. #define MC_CCSR_BASE_ADDR \
  10. ((struct mc_ccsr_registers __iomem *)0x8340000)
  11. #define BIT(x) (1 << (x))
  12. #define GCR1_P1_STOP BIT(31)
  13. #define GCR1_P2_STOP BIT(30)
  14. #define GCR1_P1_DE_RST BIT(23)
  15. #define GCR1_P2_DE_RST BIT(22)
  16. #define GCR1_M1_DE_RST BIT(15)
  17. #define GCR1_M2_DE_RST BIT(14)
  18. #define GCR1_M_ALL_DE_RST (GCR1_M1_DE_RST | GCR1_M2_DE_RST)
  19. #define GSR_FS_MASK 0x3fffffff
  20. #define MCFAPR_PL_MASK (0x1 << 18)
  21. #define MCFAPR_BMT_MASK (0x1 << 17)
  22. #define MCFAPR_BYPASS_ICID_MASK \
  23. (MCFAPR_PL_MASK | MCFAPR_BMT_MASK)
  24. #define SOC_MC_PORTALS_BASE_ADDR ((void __iomem *)0x00080C000000)
  25. #define SOC_MC_PORTAL_STRIDE 0x10000
  26. #define SOC_MC_PORTAL_ADDR(_portal_id) \
  27. ((void __iomem *)((uintptr_t)SOC_MC_PORTALS_BASE_ADDR + \
  28. (_portal_id) * SOC_MC_PORTAL_STRIDE))
  29. struct mc_ccsr_registers {
  30. u32 reg_gcr1;
  31. u32 reserved1;
  32. u32 reg_gsr;
  33. u32 reserved2;
  34. u32 reg_sicbalr;
  35. u32 reg_sicbahr;
  36. u32 reg_sicapr;
  37. u32 reserved3;
  38. u32 reg_mcfbalr;
  39. u32 reg_mcfbahr;
  40. u32 reg_mcfapr;
  41. u32 reserved4[0x2f1];
  42. u32 reg_psr;
  43. u32 reserved5;
  44. u32 reg_brr[2];
  45. u32 reserved6[0x80];
  46. u32 reg_error[];
  47. };
  48. int mc_init(bd_t *bis);
  49. int get_mc_boot_status(void);
  50. #endif