diff options
| author | Tom Rini <trini@konsulko.com> | 2019-09-20 17:43:33 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2019-09-20 17:43:33 -0400 |
| commit | d6c7309f561ac832c080e5ec07b0af9c8da319a8 (patch) | |
| tree | f422659c21972d540c10ba1c0b6c4ce8f7667ffa /drivers | |
| parent | aa8c6294ed32b4fcf7a9a27526c7346325d8c928 (diff) | |
| parent | 4a6b74a3c4d5bfe469730d6f79277b03f7687d88 (diff) | |
Merge tag 'u-boot-rockchip-20190920' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Fix rk3288 tinker and evb SPL boot fail
- Enable get sn from cpuid for rk3399 rockpro64 board
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ram/rockchip/sdram_rk3288.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c index 6bb025a851..5775254007 100644 --- a/drivers/ram/rockchip/sdram_rk3288.c +++ b/drivers/ram/rockchip/sdram_rk3288.c @@ -79,7 +79,8 @@ const int ddrconf_table[] = { #define DQS_GATE_TRAINING_ERROR_RANK0 (1 << 4) #define DQS_GATE_TRAINING_ERROR_RANK1 (2 << 4) -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_TPL_BUILD) || \ + (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) static void copy_to_reg(u32 *dest, const u32 *src, u32 n) { int i; @@ -1035,7 +1036,8 @@ static int conv_of_platdata(struct udevice *dev) static int rk3288_dmc_probe(struct udevice *dev) { -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_TPL_BUILD) || \ + (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) struct rk3288_sdram_params *plat = dev_get_platdata(dev); struct udevice *dev_clk; struct regmap *map; @@ -1044,7 +1046,8 @@ static int rk3288_dmc_probe(struct udevice *dev) struct dram_info *priv = dev_get_priv(dev); priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_TPL_BUILD) || \ + (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) #if CONFIG_IS_ENABLED(OF_PLATDATA) ret = conv_of_platdata(dev); if (ret) @@ -1111,12 +1114,14 @@ U_BOOT_DRIVER(dmc_rk3288) = { .id = UCLASS_RAM, .of_match = rk3288_dmc_ids, .ops = &rk3288_dmc_ops, -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_TPL_BUILD) || \ + (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) .ofdata_to_platdata = rk3288_dmc_ofdata_to_platdata, #endif .probe = rk3288_dmc_probe, .priv_auto_alloc_size = sizeof(struct dram_info), -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_TPL_BUILD) || \ + (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) .platdata_auto_alloc_size = sizeof(struct rk3288_sdram_params), #endif }; |
