All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL
@ 2019-07-29  9:18 Matwey V. Kornilov
  2019-07-29  9:18 ` [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64 Matwey V. Kornilov
  2019-08-05 12:53 ` [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Kever Yang
  0 siblings, 2 replies; 6+ messages in thread
From: Matwey V. Kornilov @ 2019-07-29  9:18 UTC (permalink / raw)
  To: u-boot

From: Kever Yang <kever.yang@rock-chips.com>

Set DDR as non-secure so that MMC DMA can access.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
[cherry picked from https://github.com/rockchip-linux/u-boot/commit/bfe741ab9eb4f97371a4e6c24185419d57a3a75f and https://github.com/rockchip-linux/u-boot/commit/73d952acc8cc1ddad6652ba71895d9fe928c1e4b with minor modifications]
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 arch/arm/mach-rockchip/rk3328/rk3328.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
index 592f287613..c2448d7273 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -16,6 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define CRU_BASE		0xFF440000
 #define GRF_BASE		0xFF100000
 #define UART2_BASE		0xFF130000
+#define FW_DDR_CON_REG		0xFF7C0040
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
 	[BROM_BOOTSOURCE_EMMC] = "rksdmmc at ff520000",
@@ -46,8 +47,12 @@ struct mm_region *mem_map = rk3328_mem_map;
 
 int arch_cpu_init(void)
 {
+#ifdef CONFIG_SPL_BUILD
 	/* We do some SoC one time setting here. */
 
+	/* Disable the ddr secure region setting to make it non-secure */
+	rk_setreg(FW_DDR_CON_REG, 0x200);
+#endif
 	return 0;
 }
 
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64
  2019-07-29  9:18 [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Matwey V. Kornilov
@ 2019-07-29  9:18 ` Matwey V. Kornilov
  2019-08-05 12:54   ` Kever Yang
  2019-08-05 12:53 ` [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Kever Yang
  1 sibling, 1 reply; 6+ messages in thread
From: Matwey V. Kornilov @ 2019-07-29  9:18 UTC (permalink / raw)
  To: u-boot

DMA for MMCs can be enabled, since the previous patch fixes
the following issue in SPL:

    Trying to boot from MMC1
    spl: mmc init failed with error: -110
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 arch/arm/dts/rk3328-rock64-u-boot.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index b077436cbc..928911f6a6 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -25,10 +25,8 @@
 
 &emmc {
 	u-boot,dm-pre-reloc;
-	fifo-mode;
 };
 
 &sdmmc {
 	u-boot,dm-pre-reloc;
-	fifo-mode;
 };
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL
  2019-07-29  9:18 [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Matwey V. Kornilov
  2019-07-29  9:18 ` [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64 Matwey V. Kornilov
@ 2019-08-05 12:53 ` Kever Yang
  2019-08-06  4:20   ` Chen-Yu Tsai
  1 sibling, 1 reply; 6+ messages in thread
From: Kever Yang @ 2019-08-05 12:53 UTC (permalink / raw)
  To: u-boot


On 2019/7/29 下午5:18, Matwey V. Kornilov wrote:
> From: Kever Yang <kever.yang@rock-chips.com>
>
> Set DDR as non-secure so that MMC DMA can access.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> [cherry picked from https://github.com/rockchip-linux/u-boot/commit/bfe741ab9eb4f97371a4e6c24185419d57a3a75f and https://github.com/rockchip-linux/u-boot/commit/73d952acc8cc1ddad6652ba71895d9fe928c1e4b with minor modifications]
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/mach-rockchip/rk3328/rk3328.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
> index 592f287613..c2448d7273 100644
> --- a/arch/arm/mach-rockchip/rk3328/rk3328.c
> +++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
> @@ -16,6 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;
>   #define CRU_BASE		0xFF440000
>   #define GRF_BASE		0xFF100000
>   #define UART2_BASE		0xFF130000
> +#define FW_DDR_CON_REG		0xFF7C0040
>   
>   const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
>   	[BROM_BOOTSOURCE_EMMC] = "rksdmmc at ff520000",
> @@ -46,8 +47,12 @@ struct mm_region *mem_map = rk3328_mem_map;
>   
>   int arch_cpu_init(void)
>   {
> +#ifdef CONFIG_SPL_BUILD
>   	/* We do some SoC one time setting here. */
>   
> +	/* Disable the ddr secure region setting to make it non-secure */
> +	rk_setreg(FW_DDR_CON_REG, 0x200);
> +#endif
>   	return 0;
>   }
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64
  2019-07-29  9:18 ` [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64 Matwey V. Kornilov
@ 2019-08-05 12:54   ` Kever Yang
  2019-08-06  4:20     ` Chen-Yu Tsai
  0 siblings, 1 reply; 6+ messages in thread
From: Kever Yang @ 2019-08-05 12:54 UTC (permalink / raw)
  To: u-boot


On 2019/7/29 下午5:18, Matwey V. Kornilov wrote:
> DMA for MMCs can be enabled, since the previous patch fixes
> the following issue in SPL:
>
>      Trying to boot from MMC1
>      spl: mmc init failed with error: -110
>      SPL: failed to boot from all boot devices
>      ### ERROR ### Please RESET the board ###
>
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/dts/rk3328-rock64-u-boot.dtsi | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> index b077436cbc..928911f6a6 100644
> --- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> +++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
> @@ -25,10 +25,8 @@
>   
>   &emmc {
>   	u-boot,dm-pre-reloc;
> -	fifo-mode;
>   };
>   
>   &sdmmc {
>   	u-boot,dm-pre-reloc;
> -	fifo-mode;
>   };

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL
  2019-08-05 12:53 ` [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Kever Yang
@ 2019-08-06  4:20   ` Chen-Yu Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2019-08-06  4:20 UTC (permalink / raw)
  To: u-boot

On Mon, Aug 5, 2019 at 8:54 PM Kever Yang <kever.yang@rock-chips.com> wrote:
>
>
> On 2019/7/29 下午5:18, Matwey V. Kornilov wrote:
> > From: Kever Yang <kever.yang@rock-chips.com>
> >
> > Set DDR as non-secure so that MMC DMA can access.
> >
> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> > [cherry picked from https://github.com/rockchip-linux/u-boot/commit/bfe741ab9eb4f97371a4e6c24185419d57a3a75f and https://github.com/rockchip-linux/u-boot/commit/73d952acc8cc1ddad6652ba71895d9fe928c1e4b with minor modifications]
> > Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
>
> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Tested-by: Chen-Yu Tsai <wens@csie.org>

on a Rock64.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64
  2019-08-05 12:54   ` Kever Yang
@ 2019-08-06  4:20     ` Chen-Yu Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2019-08-06  4:20 UTC (permalink / raw)
  To: u-boot

On Mon, Aug 5, 2019 at 8:54 PM Kever Yang <kever.yang@rock-chips.com> wrote:
>
>
> On 2019/7/29 下午5:18, Matwey V. Kornilov wrote:
> > DMA for MMCs can be enabled, since the previous patch fixes
> > the following issue in SPL:
> >
> >      Trying to boot from MMC1
> >      spl: mmc init failed with error: -110
> >      SPL: failed to boot from all boot devices
> >      ### ERROR ### Please RESET the board ###
> >
> > Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
>
> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Tested-by: Chen-Yu Tsai <wens@csie.org>

on a Rock64.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-06  4:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29  9:18 [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Matwey V. Kornilov
2019-07-29  9:18 ` [U-Boot] [PATCH 2/2] rockchip: rk3328: enable DMA for MMCs at Rock64 Matwey V. Kornilov
2019-08-05 12:54   ` Kever Yang
2019-08-06  4:20     ` Chen-Yu Tsai
2019-08-05 12:53 ` [U-Boot] [PATCH 1/2] rockchip: rk3328: set DDR as non-secure in SPL Kever Yang
2019-08-06  4:20   ` Chen-Yu Tsai

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.