J. German Rivera | 8ff14b7 | 2014-06-23 15:15:55 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Freescale Semiconductor |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __FSL_MC_H__ |
| 8 | #define __FSL_MC_H__ |
| 9 | |
| 10 | #include <common.h> |
| 11 | |
| 12 | #define MC_CCSR_BASE_ADDR \ |
| 13 | ((struct mc_ccsr_registers __iomem *)0x8340000) |
| 14 | |
J. German Rivera | 8ff14b7 | 2014-06-23 15:15:55 -0700 | [diff] [blame] | 15 | #define GCR1_P1_STOP BIT(31) |
| 16 | #define GCR1_P2_STOP BIT(30) |
| 17 | #define GCR1_P1_DE_RST BIT(23) |
| 18 | #define GCR1_P2_DE_RST BIT(22) |
| 19 | #define GCR1_M1_DE_RST BIT(15) |
| 20 | #define GCR1_M2_DE_RST BIT(14) |
| 21 | #define GCR1_M_ALL_DE_RST (GCR1_M1_DE_RST | GCR1_M2_DE_RST) |
| 22 | #define GSR_FS_MASK 0x3fffffff |
J. German Rivera | 8ff14b7 | 2014-06-23 15:15:55 -0700 | [diff] [blame] | 23 | |
| 24 | #define SOC_MC_PORTALS_BASE_ADDR ((void __iomem *)0x00080C000000) |
Prabhakar Kushwaha | fd5d127 | 2015-07-02 11:28:59 +0530 | [diff] [blame] | 25 | #define SOC_QBMAN_PORTALS_BASE_ADDR ((void __iomem *)0x000818000000) |
J. German Rivera | 8ff14b7 | 2014-06-23 15:15:55 -0700 | [diff] [blame] | 26 | #define SOC_MC_PORTAL_STRIDE 0x10000 |
| 27 | |
| 28 | #define SOC_MC_PORTAL_ADDR(_portal_id) \ |
| 29 | ((void __iomem *)((uintptr_t)SOC_MC_PORTALS_BASE_ADDR + \ |
| 30 | (_portal_id) * SOC_MC_PORTAL_STRIDE)) |
| 31 | |
| 32 | struct mc_ccsr_registers { |
| 33 | u32 reg_gcr1; |
| 34 | u32 reserved1; |
| 35 | u32 reg_gsr; |
| 36 | u32 reserved2; |
| 37 | u32 reg_sicbalr; |
| 38 | u32 reg_sicbahr; |
| 39 | u32 reg_sicapr; |
| 40 | u32 reserved3; |
| 41 | u32 reg_mcfbalr; |
| 42 | u32 reg_mcfbahr; |
| 43 | u32 reg_mcfapr; |
| 44 | u32 reserved4[0x2f1]; |
| 45 | u32 reg_psr; |
| 46 | u32 reserved5; |
| 47 | u32 reg_brr[2]; |
| 48 | u32 reserved6[0x80]; |
| 49 | u32 reg_error[]; |
| 50 | }; |
| 51 | |
J. German Rivera | 8ff14b7 | 2014-06-23 15:15:55 -0700 | [diff] [blame] | 52 | int get_mc_boot_status(void); |
Bhupesh Sharma | 25b8efe | 2015-03-19 09:20:43 -0700 | [diff] [blame] | 53 | unsigned long mc_get_dram_block_size(void); |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 54 | int fsl_mc_ldpaa_init(bd_t *bis); |
| 55 | void fsl_mc_ldpaa_exit(bd_t *bis); |
J. German Rivera | 8ff14b7 | 2014-06-23 15:15:55 -0700 | [diff] [blame] | 56 | #endif |