]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ddr: fsl: Remove CONFIG_MEM_INIT_VALUE
authorTom Rini <trini@konsulko.com>
Fri, 2 Dec 2022 21:42:35 +0000 (16:42 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 22 Dec 2022 15:31:48 +0000 (10:31 -0500)
The way all of the memory init code here works is that we pass
0xDEADBEEF around for the initial value (as it's a well known 'poison'
value and so easily recognized in debuggers, etc). The only point of
this CONFIG symbol was to pass in a different value for that purpose.
Drop this symbol and cleanup the code slightly.

Signed-off-by: Tom Rini <trini@konsulko.com>
23 files changed:
arch/powerpc/include/asm/fsl_dma.h
drivers/ddr/fsl/ctrl_regs.c
drivers/ddr/fsl/mpc85xx_ddr_gen1.c
drivers/dma/fsl_dma.c
include/configs/MPC8548CDS.h
include/configs/P1010RDB.h
include/configs/T102xRDB.h
include/configs/T104xRDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/T4240RDB.h
include/configs/kontron_sl28.h
include/configs/ls1021aqds.h
include/configs/ls1043aqds.h
include/configs/ls1043ardb.h
include/configs/ls1046aqds.h
include/configs/ls1046ardb.h
include/configs/ls1088aqds.h
include/configs/ls1088ardb.h
include/configs/ls2080aqds.h
include/configs/ls2080ardb.h
include/configs/lx2160a_common.h
include/configs/socrates.h

index 727f4a7e92c2cb7274dc5be9f380087b60e3a364..1459db74beea62fa36135195ec4224caf3cc020f 100644 (file)
@@ -117,7 +117,7 @@ typedef struct fsl_dma {
 void dma_init(void);
 int dmacpy(phys_addr_t dest, phys_addr_t src, phys_size_t n);
 #if (defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER))
-void dma_meminit(uint val, uint size);
+void dma_meminit(uint size);
 #endif
 #endif
 
index df7ec484651a485e401213c519f8d2fd05c7e607..759921bc5824c11ba2bcd22c04ef4a21dde8e064 100644 (file)
@@ -938,7 +938,7 @@ static void set_ddr_sdram_cfg_2(const unsigned int ctrl_num,
 #if defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
        /* Use the DDR controller to auto initialize memory. */
        d_init = popts->ecc_init_using_memctl;
-       ddr->ddr_data_init = CONFIG_MEM_INIT_VALUE;
+       ddr->ddr_data_init = 0xDEADBEEF;
        debug("DDR: ddr_data_init = 0x%08x\n", ddr->ddr_data_init);
 #else
        /* Memory will be initialized via DMA, or not at all. */
@@ -1842,19 +1842,6 @@ static void set_ddr_sdram_mode(const unsigned int ctrl_num,
 }
 #endif
 
-/* DDR SDRAM Data Initialization (DDR_DATA_INIT) */
-static void set_ddr_data_init(fsl_ddr_cfg_regs_t *ddr)
-{
-       unsigned int init_value;        /* Initialization value */
-
-#ifdef CONFIG_MEM_INIT_VALUE
-       init_value = CONFIG_MEM_INIT_VALUE;
-#else
-       init_value = 0xDEADBEEF;
-#endif
-       ddr->ddr_data_init = init_value;
-}
-
 /*
  * DDR SDRAM Clock Control (DDR_SDRAM_CLK_CNTL)
  * The old controller on the 8540/60 doesn't have this register.
@@ -2537,7 +2524,7 @@ compute_fsl_memctl_config_regs(const unsigned int ctrl_num,
        set_ddr_sdram_rcw(ctrl_num, ddr, popts, common_dimm);
 
        set_ddr_sdram_interval(ctrl_num, ddr, popts, common_dimm);
-       set_ddr_data_init(ddr);
+       ddr->ddr_data_init = 0xDEADBEEF;
        set_ddr_sdram_clk_cntl(ddr, popts);
        set_ddr_init_addr(ddr);
        set_ddr_init_ext_addr(ddr);
index 0f1e99eeb039ac2adf5ca5913affdf7ad7349f2b..16186bdbae72fa0b493efb344072a4264548062e 100644 (file)
@@ -73,7 +73,7 @@ ddr_enable_ecc(unsigned int dram_size)
        struct ccsr_ddr __iomem *ddr =
                (struct ccsr_ddr __iomem *)(CFG_SYS_FSL_DDR_ADDR);
 
-       dma_meminit(CONFIG_MEM_INIT_VALUE, dram_size);
+       dma_meminit(dram_size);
 
        /*
         * Enable errors for ECC.
index cd78e45d888af003486c229c5e10b0f22a1f6ee6..700df2236bd1a4463f1615a4afc0d78f2f4c728d 100644 (file)
@@ -133,7 +133,7 @@ int dmacpy(phys_addr_t dest, phys_addr_t src, phys_size_t count) {
  */
 #if ((!defined CONFIG_MPC83xx && defined(CONFIG_DDR_ECC) &&    \
        !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)))
-void dma_meminit(uint val, uint size)
+void dma_meminit(uint size)
 {
        uint *p = 0;
        uint i = 0;
@@ -142,7 +142,7 @@ void dma_meminit(uint val, uint size)
                if (((uint)p & 0x1f) == 0)
                        ppcDcbz((ulong)p);
 
-               *p = (uint)CONFIG_MEM_INIT_VALUE;
+               *p = (uint)0xDEADBEEF;
 
                if (((uint)p & 0x1c) == 0x1c)
                        ppcDcbf((ulong)p);
index 3d0c2192ee14820b07e338d770e060d9dc4af653..1e3ba6de6e70020750a58eba95a5cc65681481ac 100644 (file)
@@ -26,8 +26,6 @@
 
 /* DDR Setup */
 
-#define CONFIG_MEM_INIT_VALUE  0xDeadBeef
-
 #define CFG_SYS_DDR_SDRAM_BASE 0x00000000      /* DDR is system memory*/
 #define CFG_SYS_SDRAM_BASE             CFG_SYS_DDR_SDRAM_BASE
 
index c398ece784598e494c3b235d0d5adb99d3c66ad8..2267a7a9c8b8bdfdd202357d6a7ccadc304496ec 100644 (file)
@@ -98,8 +98,6 @@
 /* DDR Setup */
 #define SPD_EEPROM_ADDRESS             0x52
 
-#define CONFIG_MEM_INIT_VALUE          0xDeadBeef
-
 #ifndef __ASSEMBLY__
 extern unsigned long get_sdram_size(void);
 #endif
index 4b443c750425b9b566133092a4b5adf1eaf32c29..4794c5a84d1e42b75aaf0ee27c3af038e3ea1d12 100644 (file)
@@ -94,9 +94,6 @@
  * These can be toggled for performance analysis, otherwise use default.
  */
 #define CFG_SYS_INIT_L2CSR0            L2CSR0_L2E
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#endif
 
 /*
  *  Config the L3 Cache as L3 SRAM
index dfad76e16f1180255feab747b8c76407a572a3d7..5bdc2105f5633d01bcb6baa46ade287870c20d98 100644 (file)
@@ -64,9 +64,6 @@
  * These can be toggled for performance analysis, otherwise use default.
  */
 #define CFG_SYS_INIT_L2CSR0            L2CSR0_L2E
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#endif
 
 /*
  *  Config the L3 Cache as L3 SRAM
index 24c1daf9985fae9131b2a1f2b93a320da99f554a..4b6bdaa3440dc7471fc2b0ac53239250172824cf 100644 (file)
 #define CONFIG_RESET_VECTOR_ADDRESS    0xeffffffc
 #endif
 
-/*
- * These can be toggled for performance analysis, otherwise use default.
- */
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#endif
-
 /*
  * Config the L3 Cache as L3 SRAM
  */
index c825e7fa0c653eb8e92c0bfb38a6e4cc1f339f78..fab40f792af792e116fba5f37b8739e55262cb83 100644 (file)
 #define CONFIG_RESET_VECTOR_ADDRESS    0xeffffffc
 #endif
 
-/*
- * These can be toggled for performance analysis, otherwise use default.
- */
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#endif
-
 /*
  * Config the L3 Cache as L3 SRAM
  */
index 95735f3fcb1ec4e8604f6106fa13993be530aa06..41565f284c6f91d04e3f5acd3e16ab54736ef264 100644 (file)
 
 #define CFG_SYS_NUM_CPC                CONFIG_SYS_NUM_DDR_CTLRS
 
-/*
- * These can be toggled for performance analysis, otherwise use default.
- */
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-#endif
-
 /*
  *  Config the L3 Cache as L3 SRAM
  */
index f7bb97aa0e6c5b76030ce907e4031cdfc1eadde6..a073a06c8275db8163ce99572a43a9715a170fbd 100644 (file)
@@ -15,9 +15,6 @@
 #undef CFG_SYS_MEM_RESERVE_SECURE
 #endif
 
-/* DDR */
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
-
 #define CFG_SYS_DDR_SDRAM_BASE 0x80000000
 #define CFG_SYS_FSL_DDR_SDRAM_BASE_PHY 0
 #define CFG_SYS_SDRAM_BASE             CFG_SYS_DDR_SDRAM_BASE
index e49588489c115186cc3d357e05acf668b31b7b7a..fead9edeccdc6464d70b744a4eb9b0145ad64a76 100644 (file)
 #define CFG_SYS_DDR_SDRAM_BASE 0x80000000UL
 #define CFG_SYS_SDRAM_BASE             CFG_SYS_DDR_SDRAM_BASE
 
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
-#endif
-
 /*
  * IFC Definitions
  */
index 1dca7f0aa6b9c1bc4ff928b5f7dc7634eab7b2f6..7ccbb20bf2ea83dfa42527f2a36cf4620ebf576d 100644 (file)
 
 #define SPD_EEPROM_ADDRESS             0x51
 
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
-#endif
-
 #ifdef CONFIG_SYS_DPAA_FMAN
 #define RGMII_PHY1_ADDR                0x1
 #define RGMII_PHY2_ADDR                0x2
index 043904197f01a4d4d2805a07e1bebe590c6a40bc..c8a6f0146aacc85c231999bbcd8fd348b90e08ff 100644 (file)
@@ -9,12 +9,6 @@
 
 #include "ls1043a_common.h"
 
-/* Physical Memory Map */
-
-#ifndef CONFIG_SPL
-#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
-#endif
-
 /*
  * NOR Flash Definitions
  */
index c4e5f4928d224029485f9e712cf051e6363d6a84..4b4bd7cbe4860b339e02194b125a9ffb2820d31b 100644 (file)
 
 #define SPD_EEPROM_ADDRESS             0x51
 
-#ifdef CONFIG_DDR_ECC
-#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
-#endif
-
 #ifdef CONFIG_SYS_DPAA_FMAN
 #define RGMII_PHY1_ADDR                0x1
 #define RGMII_PHY2_ADDR                0x2
index ad766b034b16f8d6c25700f49dec958b07ad0f0f..0e42a51fc599165365df796fd4055dc762add978 100644 (file)
@@ -13,8 +13,6 @@
 
 #define SPD_EEPROM_ADDRESS             0x51
 
-#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
-
 #if defined(CONFIG_QSPI_BOOT)
 #define CFG_SYS_UBOOT_BASE             0x40100000
 #endif
index 49ad14692623c91f2710aeb703eafec2b3b1b544..3391540c6e36454197ffc2b88955df7e5d0143b5 100644 (file)
@@ -14,7 +14,6 @@
 
 #define COUNTER_FREQUENCY_REAL         (get_board_sys_clk()/4)
 
-#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
 #define SPD_EEPROM_ADDRESS             0x51
 
 
index 9033f6e937c212c5b9d0082a8060d8f1ac631980..1ddf0687f43ccf0bc0619edda88bb6f46056ae22 100644 (file)
@@ -15,7 +15,6 @@
 
 #define COUNTER_FREQUENCY_REAL         25000000        /* 25MHz */
 
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
 #define SPD_EEPROM_ADDRESS     0x51
 
 
index 7d3e8912c3b0a30d3ff8dd63dfe472f41930ee99..4a52fcdfddb411928abd141ad7d9d3d99897eae8 100644 (file)
@@ -16,7 +16,6 @@
 #define CFG_SYS_I2C_FPGA_ADDR  0x66
 #define COUNTER_FREQUENCY_REAL         (get_board_sys_clk()/4)
 
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
 #define SPD_EEPROM_ADDRESS1    0x51
 #define SPD_EEPROM_ADDRESS2    0x52
 #define SPD_EEPROM_ADDRESS3    0x53
index 4573906115eb2d46eae3319d0fa5bdafadc39b06..b8ab501c98e46075a81720ec874fde00e7f13d5f 100644 (file)
@@ -21,7 +21,6 @@
 
 #define COUNTER_FREQUENCY_REAL         (get_board_sys_clk()/4)
 
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
 #define SPD_EEPROM_ADDRESS1    0x51
 #define SPD_EEPROM_ADDRESS2    0x52
 #define SPD_EEPROM_ADDRESS3    0x53
index 3347920f03f7580191bd8fa501a9598bf3143801..c1a98fd3e4cb511dabef8b4df1249c090e571d50 100644 (file)
@@ -18,7 +18,6 @@
 #define CFG_SYS_DDR_BLOCK2_BASE                0x2080000000ULL
 #define CFG_SYS_SDRAM_SIZE                     0x200000000UL
 #define CFG_SYS_SDRAM_BASE             CFG_SYS_DDR_SDRAM_BASE
-#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
 #define SPD_EEPROM_ADDRESS1            0x51
 #define SPD_EEPROM_ADDRESS2            0x52
 #define SPD_EEPROM_ADDRESS3            0x53
index 0547ed02563e969b21b8eca6d3b0685e813ed3ef..4c752091fb5ec9147f7e3f0100ce14fcb4b63a06 100644 (file)
@@ -42,9 +42,6 @@
 #define CFG_SYS_CCSRBAR_PHYS_LOW       CFG_SYS_CCSRBAR
 
 /* DDR Setup */
-
-#define CONFIG_MEM_INIT_VALUE  0xDeadBeef
-
 #define CFG_SYS_DDR_SDRAM_BASE 0x00000000
 #define CFG_SYS_SDRAM_BASE             CFG_SYS_DDR_SDRAM_BASE