Blame view

include/fsl-mc/fsl_mc.h 1.52 KB
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
1
2
3
4
5
6
7
8
9
10
11
12
13
  /*
   * Copyright (C) 2014 Freescale Semiconductor
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
  
  #ifndef __FSL_MC_H__
  #define __FSL_MC_H__
  
  #include <common.h>
  
  #define MC_CCSR_BASE_ADDR \
  	((struct mc_ccsr_registers __iomem *)0x8340000)
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
14
15
16
17
18
19
20
21
  #define GCR1_P1_STOP		BIT(31)
  #define GCR1_P2_STOP		BIT(30)
  #define GCR1_P1_DE_RST		BIT(23)
  #define GCR1_P2_DE_RST		BIT(22)
  #define GCR1_M1_DE_RST		BIT(15)
  #define GCR1_M2_DE_RST		BIT(14)
  #define GCR1_M_ALL_DE_RST	(GCR1_M1_DE_RST | GCR1_M2_DE_RST)
  #define GSR_FS_MASK		0x3fffffff
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
22
23
  
  #define SOC_MC_PORTALS_BASE_ADDR    ((void __iomem *)0x00080C000000)
1f1c25c74   Prabhakar Kushwaha   drivers: fsl-mc: ...
24
  #define SOC_QBMAN_PORTALS_BASE_ADDR ((void __iomem *)0x000818000000)
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
25
26
27
28
29
  #define SOC_MC_PORTAL_STRIDE	    0x10000
  
  #define SOC_MC_PORTAL_ADDR(_portal_id) \
  	((void __iomem *)((uintptr_t)SOC_MC_PORTALS_BASE_ADDR + \
  	 (_portal_id) * SOC_MC_PORTAL_STRIDE))
1730a17db   Prabhakar Kushwaha   driver: net: fsl-...
30
31
  #define MC_PORTAL_OFFSET_TO_PORTAL_ID(_portal_offset) \
  	((_portal_offset) / SOC_MC_PORTAL_STRIDE)
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  struct mc_ccsr_registers {
  	u32 reg_gcr1;
  	u32 reserved1;
  	u32 reg_gsr;
  	u32 reserved2;
  	u32 reg_sicbalr;
  	u32 reg_sicbahr;
  	u32 reg_sicapr;
  	u32 reserved3;
  	u32 reg_mcfbalr;
  	u32 reg_mcfbahr;
  	u32 reg_mcfapr;
  	u32 reserved4[0x2f1];
  	u32 reg_psr;
  	u32 reserved5;
  	u32 reg_brr[2];
  	u32 reserved6[0x80];
  	u32 reg_error[];
  };
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
51
  int get_mc_boot_status(void);
fb4a87a73   Prabhakar Kushwaha   driver: net: fsl-...
52
53
54
55
56
  int get_dpl_apply_status(void);
  #ifdef CONFIG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET
  int get_aiop_apply_status(void);
  #endif
  u64 mc_get_dram_addr(void);
422cb08ac   Bhupesh Sharma   armv8/fsl-lsch3: ...
57
  unsigned long mc_get_dram_block_size(void);
a2a55e518   Prabhakar Kushwaha   driver/fsl-mc: Ad...
58
  int fsl_mc_ldpaa_init(bd_t *bis);
1730a17db   Prabhakar Kushwaha   driver: net: fsl-...
59
  int fsl_mc_ldpaa_exit(bd_t *bd);
b940ca64b   J. German Rivera   armv8/fsl-lsch3: ...
60
  #endif