* [U-Boot] [PATCH 3/3] rockchip: updata the style of reporting sdram cap
@ 2018-01-12 2:51 zhihuan he
2018-01-12 11:02 ` Dr. Philipp Tomsich
0 siblings, 1 reply; 2+ messages in thread
From: zhihuan he @ 2018-01-12 2:51 UTC (permalink / raw)
To: u-boot
updata the style of reporting sdram capacity to uboot
Signed-off-by: zhihuan he <huan.he@rock-chips.com>
---
arch/arm/mach-rockchip/rv1108/rv1108.c | 30 ++++++++++++++++++++++
board/rockchip/evb_rv1108/evb_rv1108.c | 47 ----------------------------------
2 files changed, 30 insertions(+), 47 deletions(-)
diff --git a/arch/arm/mach-rockchip/rv1108/rv1108.c b/arch/arm/mach-rockchip/rv1108/rv1108.c
index 868cdd5..68343ed 100644
--- a/arch/arm/mach-rockchip/rv1108/rv1108.c
+++ b/arch/arm/mach-rockchip/rv1108/rv1108.c
@@ -5,6 +5,9 @@
*/
#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/sdram_rv1108.h>
#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
@@ -13,3 +16,30 @@ void enable_caches(void)
dcache_enable();
}
#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ return 0;
+}
+
+#define GRF_BASE 0x10300000
+
+int dram_init(void)
+{
+ gd->ram_size = sdram_size();
+
+ return 0;
+}
+
+int dram_init_banksize(void)
+{
+ size_t max_size = min((unsigned long)(gd->ram_size +
+ CONFIG_SYS_SDRAM_BASE), gd->ram_top);
+
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = max_size - gd->bd->bi_dram[0].start;
+
+ return 0;
+}
diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
index fe37eac..f497615 100644
--- a/board/rockchip/evb_rv1108/evb_rv1108.c
+++ b/board/rockchip/evb_rv1108/evb_rv1108.c
@@ -3,50 +3,3 @@
* Authors: Andy Yan <andy.yan@rock-chips.com>
* SPDX-License-Identifier: GPL-2.0+
*/
-
-#include <common.h>
-#include <asm/io.h>
-#include <fdtdec.h>
-#include <asm/arch/grf_rv1108.h>
-#include <asm/arch/hardware.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int mach_cpu_init(void)
-{
- int node;
- struct rv1108_grf *grf;
-
- node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf");
- grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg");
-
- /*evb board use UART2 m0 for debug*/
- rk_clrsetreg(&grf->gpio2d_iomux,
- GPIO2D2_MASK | GPIO2D1_MASK,
- GPIO2D2_UART2_SOUT_M0 << GPIO2D2_SHIFT |
- GPIO2D1_UART2_SIN_M0 << GPIO2D1_SHIFT);
- rk_clrreg(&grf->gpio3c_iomux, GPIO3C3_MASK | GPIO3C2_MASK);
-
- return 0;
-}
-
-
-int board_init(void)
-{
- return 0;
-}
-
-int dram_init(void)
-{
- gd->ram_size = 0x8000000;
-
- return 0;
-}
-
-int dram_init_banksize(void)
-{
- gd->bd->bi_dram[0].start = 0x60000000;
- gd->bd->bi_dram[0].size = 0x8000000;
-
- return 0;
-}
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 3/3] rockchip: updata the style of reporting sdram cap
2018-01-12 2:51 [U-Boot] [PATCH 3/3] rockchip: updata the style of reporting sdram cap zhihuan he
@ 2018-01-12 11:02 ` Dr. Philipp Tomsich
0 siblings, 0 replies; 2+ messages in thread
From: Dr. Philipp Tomsich @ 2018-01-12 11:02 UTC (permalink / raw)
To: u-boot
See below for requested changes.
> On 12 Jan 2018, at 03:51, zhihuan he <huan.he@rock-chips.com> wrote:
>
> updata the style of reporting sdram capacity to uboot
>
> Signed-off-by: zhihuan he <huan.he@rock-chips.com>
> ---
>
> arch/arm/mach-rockchip/rv1108/rv1108.c | 30 ++++++++++++++++++++++
> board/rockchip/evb_rv1108/evb_rv1108.c | 47 ----------------------------------
> 2 files changed, 30 insertions(+), 47 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/rv1108/rv1108.c b/arch/arm/mach-rockchip/rv1108/rv1108.c
> index 868cdd5..68343ed 100644
> --- a/arch/arm/mach-rockchip/rv1108/rv1108.c
> +++ b/arch/arm/mach-rockchip/rv1108/rv1108.c
> @@ -5,6 +5,9 @@
> */
>
> #include <common.h>
> +#include <asm/io.h>
> +#include <asm/arch/hardware.h>
> +#include <asm/arch/sdram_rv1108.h>
>
> #ifndef CONFIG_SYS_DCACHE_OFF
> void enable_caches(void)
> @@ -13,3 +16,30 @@ void enable_caches(void)
> dcache_enable();
> }
> #endif
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +int board_init(void)
> +{
> + return 0;
> +}
> +
> +#define GRF_BASE 0x10300000
Why is this here? It’s not referenced anywhere in this file...
> +
> +int dram_init(void)
> +{
> + gd->ram_size = sdram_size();
> +
> + return 0;
> +}
> +
> +int dram_init_banksize(void)
> +{
> + size_t max_size = min((unsigned long)(gd->ram_size +
> + CONFIG_SYS_SDRAM_BASE), gd->ram_top);
> +
> + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> + gd->bd->bi_dram[0].size = max_size - gd->bd->bi_dram[0].start;
> +
> + return 0;
> +}
> diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
> index fe37eac..f497615 100644
> --- a/board/rockchip/evb_rv1108/evb_rv1108.c
> +++ b/board/rockchip/evb_rv1108/evb_rv1108.c
> @@ -3,50 +3,3 @@
> * Authors: Andy Yan <andy.yan@rock-chips.com>
> * SPDX-License-Identifier: GPL-2.0+
> */
> -
> -#include <common.h>
> -#include <asm/io.h>
> -#include <fdtdec.h>
> -#include <asm/arch/grf_rv1108.h>
> -#include <asm/arch/hardware.h>
> -
> -DECLARE_GLOBAL_DATA_PTR;
> -
> -int mach_cpu_init(void)
> -{
> - int node;
> - struct rv1108_grf *grf;
> -
> - node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf");
> - grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg”);
> -
> - /*evb board use UART2 m0 for debug*/
> - rk_clrsetreg(&grf->gpio2d_iomux,
> - GPIO2D2_MASK | GPIO2D1_MASK,
> - GPIO2D2_UART2_SOUT_M0 << GPIO2D2_SHIFT |
> - GPIO2D1_UART2_SIN_M0 << GPIO2D1_SHIFT);
> - rk_clrreg(&grf->gpio3c_iomux, GPIO3C3_MASK | GPIO3C2_MASK);
Should this be in board_init() instead?
Also: why is this being removed in a patch that “updates the SDRAM cap reporting”?
> -
> - return 0;
> -}
> -
> -
> -int board_init(void)
> -{
> - return 0;
> -}
> -
> -int dram_init(void)
> -{
> - gd->ram_size = 0x8000000;
> -
> - return 0;
> -}
> -
> -int dram_init_banksize(void)
> -{
> - gd->bd->bi_dram[0].start = 0x60000000;
> - gd->bd->bi_dram[0].size = 0x8000000;
> -
> - return 0;
> -}
> --
> 2.0.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-12 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 2:51 [U-Boot] [PATCH 3/3] rockchip: updata the style of reporting sdram cap zhihuan he
2018-01-12 11:02 ` Dr. Philipp Tomsich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.