clk: tegra20: init NDFLASH clock to sensible rate
Subsystems (4)
PATCH v2 4/6 clk: tegra20: init NDFLASH clock to sensible rate
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra20.c +1 -0
@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 }, };
Signature · 1 line
2.17.0
Quoted 27 lines · Stefan Agner
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 }, };Signature · 1 line
2.17.0
Maybe better to specify this in the Tegra20 dtsi? See
"Assigned clock parents and rates" in Documentation/devicetree/bindings/clock/clock-bindings.txt
Peter.
Quoted 24 lines · Peter De Schrijver
Quoted 23 lines · Stefan Agner
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 },
Quoted 8 lines
Quoted 4 lines
drivers/clk/tegra/clk-tegra20.c +0
-1}; --2.17.0
Maybe better to specify this in the Tegra20 dtsi? See "Assigned clock parents and rates" in
Documentation/devicetree/bindings/clock/clock-bindings.txt
assigned-clocks indeed works just fine for this case. Thanks for bringing this up, will drop this patch and add the device tree properties in v3.
Hm, interesting that none of the Tegra device tree make use of the feature so far. I guess there would be other cases where this would be useful as well (the one just above, VDE?).
--
Stefan
Am Montag, den 28.05.2018, 17:53 +0200 schrieb Stefan Agner:
Quoted 34 lines · Peter De Schrijver
Quoted 24 lines · Stefan Agner
Quoted 23 lines
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 },Quoted 8 lines
Quoted 4 lines
drivers/clk/tegra/clk-tegra20.c +0
-1}; --2.17.0
Maybe better to specify this in the Tegra20 dtsi? See "Assigned clock parents and rates" in
Documentation/devicetree/bindings/clock/clock-bindings.txt
Quoted 7 lines
assigned-clocks indeed works just fine for this case. Thanks for bringing this up, will drop this patch and add the device tree properties in v3.
Hm, interesting that none of the Tegra device tree make use of the feature so far. I guess there would be other cases where this would be useful as well (the one just above, VDE?).
Most of the Tegra clock init stuff (including this patch) was written before we had assigned-clocks as some common DT facility. But fully agree on dropping this patch.
Regards,
Lucas
Quoted 34 lines · Stefan Agner
Quoted 24 lines · Peter De Schrijver
Quoted 23 lines · Stefan Agner
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 },Quoted 8 lines
Quoted 4 lines
drivers/clk/tegra/clk-tegra20.c +0
-1}; --2.17.0
Maybe better to specify this in the Tegra20 dtsi? See "Assigned clock parents and rates" in
Documentation/devicetree/bindings/clock/clock-bindings.txt
Quoted 8 lines
assigned-clocks indeed works just fine for this case. Thanks for bringing this up, will drop this patch and add the device tree properties in v3.
Hm, interesting that none of the Tegra device tree make use of the feature so far. I guess there would be other cases where this would be useful as well (the one just above, VDE?).
Yes, historically this feature wasn't available, so we used these init tables. Unfortunately it's not easy to get rid of them for parent and rate configuration, because new kernels should also work with existing DTBs, so we can't just add assigned-clock properties and remove the existing table entries. What we could do is use the CLK_IS_CRITICAL flag for all clocks which are only enabled by the init table. For not yet merged blocks, this is ofcourse not a concern.
Cheers,
Peter.
Quoted 44 lines · Peter De Schrijver
Quoted 34 lines · Stefan Agner
Quoted 24 lines · Peter De Schrijver
Quoted 23 lines · Stefan Agner
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 },Quoted 8 lines
Quoted 4 lines
drivers/clk/tegra/clk-tegra20.c +0
-1}; --2.17.0
Maybe better to specify this in the Tegra20 dtsi? See "Assigned clock parents and rates" in
Documentation/devicetree/bindings/clock/clock-bindings.txtQuoted 8 lines
assigned-clocks indeed works just fine for this case. Thanks for bringing this up, will drop this patch and add the device tree properties in v3.
Hm, interesting that none of the Tegra device tree make use of the feature so far. I guess there would be other cases where this would be useful as well (the one just above, VDE?).
Quoted 7 lines
Yes, historically this feature wasn't available, so we used these init tables. Unfortunately it's not easy to get rid of them for parent and rate configuration, because new kernels should also work with existing DTBs, so we can't just add assigned-clock properties and remove the existing table entries. What we could do is use the
CLK_IS_CRITICALflag for all clocks which are only enabled by the init table. For not yet merged blocks, this is ofcourse not a concern.
Sure I understand.
Was just somewhat surprised that it isn't used at all yet (grep -r -e assigned-clock arch/arm/boot/dts/tegra* returns nothing). After all, assigned clocks bindings have been merged in 2014 :-)
At least "clk: tegra: Specify VDE clock rate" merged earlier this year would have been a candidate already.
--
Stefan
Quoted 53 lines · Stefan Agner
Quoted 44 lines · Peter De Schrijver
Quoted 34 lines · Stefan Agner
Quoted 24 lines · Peter De Schrijver
Quoted 23 lines · Stefan Agner
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 },Quoted 8 lines
Quoted 4 lines
drivers/clk/tegra/clk-tegra20.c +0
-1}; --2.17.0
Maybe better to specify this in the Tegra20 dtsi? See "Assigned clock parents and rates" in
Documentation/devicetree/bindings/clock/clock-bindings.txtQuoted 8 lines
assigned-clocks indeed works just fine for this case. Thanks for bringing this up, will drop this patch and add the device tree properties in v3.
Hm, interesting that none of the Tegra device tree make use of the feature so far. I guess there would be other cases where this would be useful as well (the one just above, VDE?).
Quoted 7 lines
Yes, historically this feature wasn't available, so we used these init tables. Unfortunately it's not easy to get rid of them for parent and rate configuration, because new kernels should also work with existing DTBs, so we can't just add assigned-clock properties and remove the existing table entries. What we could do is use the
CLK_IS_CRITICALflag for all clocks which are only enabled by the init table. For not yet merged blocks, this is ofcourse not a concern.
Quoted 8 lines
Sure I understand.
Was just somewhat surprised that it isn't used at all yet (grep -r -e assigned-clock
arch/arm/boot/dts/tegra*returns nothing). After all, assigned clocks bindings have been merged in 2014 :-)At least "clk: tegra: Specify VDE clock rate" merged earlier this year would have been a candidate already.
I wasn't even aware of existence of the assigned-clock properties, probably just like others.
Quoted 60 lines · Dmitry Osipenko
Quoted 59 lines · Stefan Agner
Quoted 44 lines · Peter De Schrijver
Quoted 34 lines · Stefan Agner
Quoted 24 lines · Peter De Schrijver
Quoted 23 lines · Stefan Agner
From: Lucas Stach <[email protected]>
Set up the NAND Flash controller clock to run at 150MHz instead of the rate set by the bootloader. This is a conservative rate which also yields good performance.
Signed-off-by Lucas Stach <[email protected]>Signed-off-by Stefan Agner <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/tegra/clk-tegra20.c +1
-0@@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 },/* must be the last entry */ { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 },Quoted 8 lines
Quoted 4 lines
drivers/clk/tegra/clk-tegra20.c +0
-1}; --2.17.0
Maybe better to specify this in the Tegra20 dtsi? See "Assigned clock parents and rates" in
Documentation/devicetree/bindings/clock/clock-bindings.txtQuoted 8 lines
assigned-clocks indeed works just fine for this case. Thanks for bringing this up, will drop this patch and add the device tree properties in v3.
Hm, interesting that none of the Tegra device tree make use of the feature so far. I guess there would be other cases where this would be useful as well (the one just above, VDE?).
Quoted 7 lines
Yes, historically this feature wasn't available, so we used these init tables. Unfortunately it's not easy to get rid of them for parent and rate configuration, because new kernels should also work with existing DTBs, so we can't just add assigned-clock properties and remove the existing table entries. What we could do is use the
CLK_IS_CRITICALflag for all clocks which are only enabled by the init table. For not yet merged blocks, this is ofcourse not a concern.Sure I understand.
Was just somewhat surprised that it isn't used at all yet (grep -r -e assigned-clock
arch/arm/boot/dts/tegra*returns nothing). After all, assigned clocks bindings have been merged in 2014 :-)
Quoted 5 lines
Quoted 2 lines
At least "clk: tegra: Specify VDE clock rate" merged earlier this year would have been a candidate already.
I wasn't even aware of existence of the assigned-clock properties, probably just like others.
This feature seems to be little used indeed. Not sure why.
Peter.