* [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address
@ 2017-09-25 8:33 Kever Yang
2017-09-27 9:55 ` [U-Boot] " Philipp Tomsich
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kever Yang @ 2017-09-25 8:33 UTC (permalink / raw)
To: u-boot
RK3188 using the same ddr_conf for both 15 bit and 16 bit row address.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/ram/rockchip/sdram_rk3188.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 9d8b225..2b9992f 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -684,9 +684,16 @@ static int sdram_get_niu_config(struct rk3188_sdram_params *sdram_params)
{
int i, tmp, size, ret = 0;
+ row = sdram_params->ch[0].cs0_row;
+ /*
+ * RK3188 share the rank and row bit15, we use same ddr config for 15bit
+ * and 16bit row
+ */
+ if (row == 16)
+ row = 15;
tmp = sdram_params->ch[0].col - 9;
tmp -= (sdram_params->ch[0].bw == 2) ? 0 : 1;
- tmp |= ((sdram_params->ch[0].cs0_row - 13) << 4);
+ tmp |= ((row - 13) << 4);
size = sizeof(ddrconf_table)/sizeof(ddrconf_table[0]);
for (i = 0; i < size; i++)
if (tmp == ddrconf_table[i])
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] rockchip: rk3188: ram: add support for 16bit row address
2017-09-25 8:33 [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address Kever Yang
@ 2017-09-27 9:55 ` Philipp Tomsich
2017-09-27 9:55 ` Philipp Tomsich
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Tomsich @ 2017-09-27 9:55 UTC (permalink / raw)
To: u-boot
> RK3188 using the same ddr_conf for both 15 bit and 16 bit row address.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> drivers/ram/rockchip/sdram_rk3188.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] rockchip: rk3188: ram: add support for 16bit row address
2017-09-25 8:33 [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address Kever Yang
2017-09-27 9:55 ` [U-Boot] " Philipp Tomsich
@ 2017-09-27 9:55 ` Philipp Tomsich
2017-09-27 11:31 ` [U-Boot] [PATCH] " Dr. Philipp Tomsich
2017-09-27 11:34 ` [U-Boot] " Philipp Tomsich
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Tomsich @ 2017-09-27 9:55 UTC (permalink / raw)
To: u-boot
> RK3188 using the same ddr_conf for both 15 bit and 16 bit row address.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> drivers/ram/rockchip/sdram_rk3188.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address
2017-09-25 8:33 [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address Kever Yang
2017-09-27 9:55 ` [U-Boot] " Philipp Tomsich
2017-09-27 9:55 ` Philipp Tomsich
@ 2017-09-27 11:31 ` Dr. Philipp Tomsich
2017-09-27 11:34 ` [U-Boot] " Philipp Tomsich
3 siblings, 0 replies; 5+ messages in thread
From: Dr. Philipp Tomsich @ 2017-09-27 11:31 UTC (permalink / raw)
To: u-boot
Kever,
> On 25 Sep 2017, at 10:33, Kever Yang <kever.yang@rock-chips.com> wrote:
>
> RK3188 using the same ddr_conf for both 15 bit and 16 bit row address.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> drivers/ram/rockchip/sdram_rk3188.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
> index 9d8b225..2b9992f 100644
> --- a/drivers/ram/rockchip/sdram_rk3188.c
> +++ b/drivers/ram/rockchip/sdram_rk3188.c
> @@ -684,9 +684,16 @@ static int sdram_get_niu_config(struct rk3188_sdram_params *sdram_params)
> {
> int i, tmp, size, ret = 0;
>
> + row = sdram_params->ch[0].cs0_row;
‘row' is not declared here.
I’ll fix up while applying.
I’d appreciate if you could check for build-failures with buildman (which caught this
when I applied it) before submitting.
Thanks,
Philipp.
> + /*
> + * RK3188 share the rank and row bit15, we use same ddr config for 15bit
> + * and 16bit row
> + */
> + if (row == 16)
> + row = 15;
> tmp = sdram_params->ch[0].col - 9;
> tmp -= (sdram_params->ch[0].bw == 2) ? 0 : 1;
> - tmp |= ((sdram_params->ch[0].cs0_row - 13) << 4);
> + tmp |= ((row - 13) << 4);
> size = sizeof(ddrconf_table)/sizeof(ddrconf_table[0]);
> for (i = 0; i < size; i++)
> if (tmp == ddrconf_table[i])
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] rockchip: rk3188: ram: add support for 16bit row address
2017-09-25 8:33 [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address Kever Yang
` (2 preceding siblings ...)
2017-09-27 11:31 ` [U-Boot] [PATCH] " Dr. Philipp Tomsich
@ 2017-09-27 11:34 ` Philipp Tomsich
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Tomsich @ 2017-09-27 11:34 UTC (permalink / raw)
To: u-boot
> RK3188 using the same ddr_conf for both 15 bit and 16 bit row address.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> drivers/ram/rockchip/sdram_rk3188.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-27 11:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 8:33 [U-Boot] [PATCH] rockchip: rk3188: ram: add support for 16bit row address Kever Yang
2017-09-27 9:55 ` [U-Boot] " Philipp Tomsich
2017-09-27 9:55 ` Philipp Tomsich
2017-09-27 11:31 ` [U-Boot] [PATCH] " Dr. Philipp Tomsich
2017-09-27 11:34 ` [U-Boot] " 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.