projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'ti-v2020.07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
[oweals/u-boot.git]
/
drivers
/
ddr
/
fsl
/
options.c
diff --git
a/drivers/ddr/fsl/options.c
b/drivers/ddr/fsl/options.c
index 85ec48c28e38814bbaaf171088118996bc9e8051..c000a45f8ea83e18cd053cb116eed652a7157455 100644
(file)
--- a/
drivers/ddr/fsl/options.c
+++ b/
drivers/ddr/fsl/options.c
@@
-1,13
+1,14
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2008, 2010-2016 Freescale Semiconductor, Inc.
* Copyright 2017-2018 NXP Semiconductor
/*
* Copyright 2008, 2010-2016 Freescale Semiconductor, Inc.
* Copyright 2017-2018 NXP Semiconductor
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
*/
#include <common.h>
+#include <env.h>
#include <hwconfig.h>
#include <fsl_ddr_sdram.h>
#include <hwconfig.h>
#include <fsl_ddr_sdram.h>
+#include <log.h>
#include <fsl_ddr.h>
#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
#include <fsl_ddr.h>
#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
@@
-23,9
+24,12
@@
*/
/* Board-specific functions defined in each board's ddr.c */
*/
/* Board-specific functions defined in each board's ddr.c */
-extern void fsl_ddr_board_options(memctl_options_t *popts,
- dimm_params_t *pdimm,
- unsigned int ctrl_num);
+void __weak fsl_ddr_board_options(memctl_options_t *popts,
+ dimm_params_t *pdimm,
+ unsigned int ctrl_num)
+{
+ return;
+}
struct dynamic_odt {
unsigned int odt_rd_cfg;
struct dynamic_odt {
unsigned int odt_rd_cfg;
@@
-743,8
+747,7
@@
unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
unsigned int ctrl_num)
{
unsigned int i;
unsigned int ctrl_num)
{
unsigned int i;
- char buffer[HWCONFIG_BUFFER_SIZE];
- char *buf = NULL;
+ char buf[HWCONFIG_BUFFER_SIZE];
#if defined(CONFIG_SYS_FSL_DDR3) || \
defined(CONFIG_SYS_FSL_DDR2) || \
defined(CONFIG_SYS_FSL_DDR4)
#if defined(CONFIG_SYS_FSL_DDR3) || \
defined(CONFIG_SYS_FSL_DDR2) || \
defined(CONFIG_SYS_FSL_DDR4)
@@
-758,8
+761,8
@@
unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
- if (env_get_f("hwconfig", buf
fer, sizeof(buffer)) >
0)
- buf
= buffer
;
+ if (env_get_f("hwconfig", buf
, sizeof(buf)) <
0)
+ buf
[0] = '\0'
;
#if defined(CONFIG_SYS_FSL_DDR3) || \
defined(CONFIG_SYS_FSL_DDR2) || \
#if defined(CONFIG_SYS_FSL_DDR3) || \
defined(CONFIG_SYS_FSL_DDR2) || \
@@
-1399,15
+1402,14
@@
int fsl_use_spd(void)
int use_spd = 0;
#ifdef CONFIG_DDR_SPD
int use_spd = 0;
#ifdef CONFIG_DDR_SPD
- char buffer[HWCONFIG_BUFFER_SIZE];
- char *buf = NULL;
+ char buf[HWCONFIG_BUFFER_SIZE];
/*
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
/*
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
- if (env_get_f("hwconfig", buf
fer, sizeof(buffer)) >
0)
- buf
= buffer
;
+ if (env_get_f("hwconfig", buf
, sizeof(buf)) <
0)
+ buf
[0] = '\0'
;
/* if hwconfig is not enabled, or "sdram" is not defined, use spd */
if (hwconfig_sub_f("fsl_ddr", "sdram", buf)) {
/* if hwconfig is not enabled, or "sdram" is not defined, use spd */
if (hwconfig_sub_f("fsl_ddr", "sdram", buf)) {