[PATCH 1/3] riscv: mpfs-icicle-kit: Increase SYS_MALLOC_F_LEN

The RISC-V architecture default value of CONFIG_SYS_MALLOC_F_LEN (0x1000) would not provide enough memory for devices like mpfs clock and ns16550 serial to bind well before relocation.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
configs/microchip_mpfs_icicle_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/microchip_mpfs_icicle_defconfig b/configs/microchip_mpfs_icicle_defconfig index 0c15c3bd38..1cb29201b4 100644 --- a/configs/microchip_mpfs_icicle_defconfig +++ b/configs/microchip_mpfs_icicle_defconfig @@ -1,4 +1,5 @@ CONFIG_RISCV=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit" CONFIG_TARGET_MICROCHIP_ICICLE=y

This driver is needed in the pre-relocation phase as the serial driver depends on it.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
drivers/clk/microchip/mpfs_clk.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/clk/microchip/mpfs_clk.c b/drivers/clk/microchip/mpfs_clk.c index 722c79b7c0..05d7647206 100644 --- a/drivers/clk/microchip/mpfs_clk.c +++ b/drivers/clk/microchip/mpfs_clk.c @@ -120,4 +120,5 @@ U_BOOT_DRIVER(mpfs_clk) = { .ops = &mpfs_clk_ops, .probe = mpfs_clk_probe, .priv_auto = sizeof(struct clk), + .flags = DM_FLAG_PRE_RELOC, };

On Wed, Mar 31, 2021 at 12:55 PM Bin Meng bmeng.cn@gmail.com wrote:
This driver is needed in the pre-relocation phase as the serial driver depends on it.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
drivers/clk/microchip/mpfs_clk.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/clk/microchip/mpfs_clk.c b/drivers/clk/microchip/mpfs_clk.c index 722c79b7c0..05d7647206 100644 --- a/drivers/clk/microchip/mpfs_clk.c +++ b/drivers/clk/microchip/mpfs_clk.c @@ -120,4 +120,5 @@ U_BOOT_DRIVER(mpfs_clk) = { .ops = &mpfs_clk_ops, .probe = mpfs_clk_probe, .priv_auto = sizeof(struct clk),
.flags = DM_FLAG_PRE_RELOC,
};
2.25.1
Reviewed-by: Padmarao Begari padmarao.begari@microchip.com Tested-by: Padmarao Begari padmarao.begari@microchip.com

The uart nodes already provide <clocks> property for the driver to dynamically calculate the correct clock frequency. There is no need to keep the hard-coded <clock-frequency> property.
Signed-off-by: Bin Meng bmeng.cn@gmail.com ---
arch/riscv/dts/microchip-mpfs-icicle-kit.dts | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/arch/riscv/dts/microchip-mpfs-icicle-kit.dts b/arch/riscv/dts/microchip-mpfs-icicle-kit.dts index e2b9decc94..89c4cf5fb2 100644 --- a/arch/riscv/dts/microchip-mpfs-icicle-kit.dts +++ b/arch/riscv/dts/microchip-mpfs-icicle-kit.dts @@ -232,7 +232,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <90>; - clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART0>; status = "okay"; }; @@ -294,7 +293,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <91>; - clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART1>; status = "okay"; }; @@ -305,7 +303,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <92>; - clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART2>; status = "okay"; }; @@ -316,7 +313,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <93>; - clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART3>; status = "okay"; };

On Wed, Mar 31, 2021 at 12:55 PM Bin Meng bmeng.cn@gmail.com wrote:
The uart nodes already provide <clocks> property for the driver to dynamically calculate the correct clock frequency. There is no need to keep the hard-coded <clock-frequency> property.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
arch/riscv/dts/microchip-mpfs-icicle-kit.dts | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/arch/riscv/dts/microchip-mpfs-icicle-kit.dts b/arch/riscv/dts/microchip-mpfs-icicle-kit.dts index e2b9decc94..89c4cf5fb2 100644 --- a/arch/riscv/dts/microchip-mpfs-icicle-kit.dts +++ b/arch/riscv/dts/microchip-mpfs-icicle-kit.dts @@ -232,7 +232,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <90>;
clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART0>; status = "okay"; };
@@ -294,7 +293,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <91>;
clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART1>; status = "okay"; };
@@ -305,7 +303,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <92>;
clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART2>; status = "okay"; };
@@ -316,7 +313,6 @@ reg-shift = <2>; interrupt-parent = <&plic>; interrupts = <93>;
clock-frequency = <150000000>; clocks = <&clkcfg CLK_MMUART3>; status = "okay"; };
-- 2.25.1
Reviewed-by: Padmarao Begari padmarao.begari@microchip.com Tested-by: Padmarao Begari padmarao.begari@microchip.com

On Wed, Mar 31, 2021 at 3:25 PM Bin Meng bmeng.cn@gmail.com wrote:
The RISC-V architecture default value of CONFIG_SYS_MALLOC_F_LEN (0x1000) would not provide enough memory for devices like mpfs clock and ns16550 serial to bind well before relocation.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
configs/microchip_mpfs_icicle_defconfig | 1 + 1 file changed, 1 insertion(+)
Ping for this series?

On Wed, Mar 31, 2021 at 12:55 PM Bin Meng bmeng.cn@gmail.com wrote:
The RISC-V architecture default value of CONFIG_SYS_MALLOC_F_LEN (0x1000) would not provide enough memory for devices like mpfs clock and ns16550 serial to bind well before relocation.
Signed-off-by: Bin Meng bmeng.cn@gmail.com
configs/microchip_mpfs_icicle_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/microchip_mpfs_icicle_defconfig b/configs/microchip_mpfs_icicle_defconfig index 0c15c3bd38..1cb29201b4 100644 --- a/configs/microchip_mpfs_icicle_defconfig +++ b/configs/microchip_mpfs_icicle_defconfig @@ -1,4 +1,5 @@ CONFIG_RISCV=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit" CONFIG_TARGET_MICROCHIP_ICICLE=y -- 2.25.1
Reviewed-by: Padmarao Begari padmarao.begari@microchip.com Tested-by: Padmarao Begari padmarao.begari@microchip.com
participants (2)
-
Bin Meng
-
Padmarao Begari