diff mbox series

[10/10] riscv: Don't reserve AI ram in k210 dts

Message ID 20200929141835.38435-11-seanga2@gmail.com
State Superseded
Delegated to: Andes
Headers show
Series riscv: k210: Enable use of AI ram bank | expand

Commit Message

Sean Anderson Sept. 29, 2020, 2:18 p.m. UTC
It is no longer necessary to disallow ai ram, since it is enabled by the
sram driver.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 arch/riscv/dts/k210.dtsi | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Heinrich Schuchardt Sept. 29, 2020, 3:03 p.m. UTC | #1
Am 29. September 2020 16:18:35 MESZ schrieb Sean Anderson <seanga2@gmail.com>:
>It is no longer necessary to disallow ai ram, since it is enabled by
>the
>sram driver.
>
>Signed-off-by: Sean Anderson <seanga2@gmail.com>
>---
>
> arch/riscv/dts/k210.dtsi | 12 ------------
> 1 file changed, 12 deletions(-)
>
>diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi
>index f7843985aa..7b0cd4f8f6 100644
>--- a/arch/riscv/dts/k210.dtsi
>+++ b/arch/riscv/dts/k210.dtsi
>@@ -91,17 +91,6 @@
> 		u-boot,dm-pre-reloc;
> 	};
> 
>-	reserved-memory {
>-		#address-cells = <1>;
>-		#size-cells = <1>;
>-		ranges;
>-
>-		ai_reserved: ai@80600000 {
>-			reg = <0x80600000 0x200000>;
>-			reusable;
>-		};
>-	};

Doesn't removing this reservation mean that you cannot run AI applications anymore?

How would a user tell U-Boot to reserve memory for AI?

Do we need different configurations with separate device trees?

Best regards

Heinrich

>-
> 	clocks {
> 		in0: osc {
> 			compatible = "fixed-clock";
>@@ -177,7 +166,6 @@
> 			reg = <0x40800000 0xc00000>;
> 			interrupts = <25>;
> 			clocks = <&sysclk K210_CLK_AI>;
>-			memory-region = <&ai_reserved>;
> 			status = "disabled";
> 		};
>
Sean Anderson Sept. 29, 2020, 3:07 p.m. UTC | #2
On 9/29/20 11:03 AM, Heinrich Schuchardt wrote:
> Am 29. September 2020 16:18:35 MESZ schrieb Sean Anderson <seanga2@gmail.com>:
>> It is no longer necessary to disallow ai ram, since it is enabled by
>> the
>> sram driver.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>>
>> arch/riscv/dts/k210.dtsi | 12 ------------
>> 1 file changed, 12 deletions(-)
>>
>> diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi
>> index f7843985aa..7b0cd4f8f6 100644
>> --- a/arch/riscv/dts/k210.dtsi
>> +++ b/arch/riscv/dts/k210.dtsi
>> @@ -91,17 +91,6 @@
>> 		u-boot,dm-pre-reloc;
>> 	};
>>
>> -	reserved-memory {
>> -		#address-cells = <1>;
>> -		#size-cells = <1>;
>> -		ranges;
>> -
>> -		ai_reserved: ai@80600000 {
>> -			reg = <0x80600000 0x200000>;
>> -			reusable;
>> -		};
>> -	};
> 
> Doesn't removing this reservation mean that you cannot run AI applications anymore?

Only if said AI application had previously been using the U-Boot device
tree. This section of ram was already in use by Linux, and I don't know
of any other potential targets which would want to use it.

> 
> How would a user tell U-Boot to reserve memory for AI?

They wouldn't have to, as long as they didn't want to use AI in a U-Boot
standalone application (in which case, they should probably configure
CONFIG_SYS_MEM_TOP_HIDE).

> 
> Do we need different configurations with separate device trees?

Probably not.

--Sean
diff mbox series

Patch

diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi
index f7843985aa..7b0cd4f8f6 100644
--- a/arch/riscv/dts/k210.dtsi
+++ b/arch/riscv/dts/k210.dtsi
@@ -91,17 +91,6 @@ 
 		u-boot,dm-pre-reloc;
 	};
 
-	reserved-memory {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		ai_reserved: ai@80600000 {
-			reg = <0x80600000 0x200000>;
-			reusable;
-		};
-	};
-
 	clocks {
 		in0: osc {
 			compatible = "fixed-clock";
@@ -177,7 +166,6 @@ 
 			reg = <0x40800000 0xc00000>;
 			interrupts = <25>;
 			clocks = <&sysclk K210_CLK_AI>;
-			memory-region = <&ai_reserved>;
 			status = "disabled";
 		};