ARM: dts: mxs: dcp cleanup patches
Subsystems (3)
cover ARM: dts: mxs: dcp cleanup patches
This patch series does the following:
- let the driver be "disabled" by default in imx28.dtsi
- coding style cleanups in drivers/crypto/dcp.c
- use the "official" 'fsl,' prefix in the 'compatible' property
The last patch adds a new entry to the of_match_table of the driver, so that current DT blobs will still work. When out of tree users (mentioned in the commit log of 519d8b1a "Added support for Freescale's DCP co-processor") have updated their DTBs the old entry 'fsl-dsp' can be removed from the driver.
This patch series requires at least
"[PATCH 2/8] ARM: dts: mxs: add labels to most nodes for easier reference" from the patch series:
<[email protected]> to be applied.
arch/arm/boot/dts/imx28.dtsi | 2 +- b/arch/arm/boot/dts/imx28-evk.dts | 4 ++++ b/arch/arm/boot/dts/imx28.dtsi | 3 ++- b/drivers/crypto/dcp.c | 11 +++++------ drivers/crypto/dcp.c | 2 ++ 5 files changed, 14 insertions(+), 8 deletions(-)
PATCH 1/3 ARM: dts: mxs: set dcp to "disabled" by default
Reintroduce 'status = "disabled"' for the dcp node that was dropped by commit 519d8b1a "Added support for Freescale's DCP co-processor".
Explicitly enable it in imx28-evk which is referenced in the commit message of that commit.
--- arch/arm/boot/dts/imx28-evk.dts | 4 ++++ arch/arm/boot/dts/imx28.dtsi | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/boot/dts/imx28-evk.dts +4 -0
@@ -361,3 +361,7 @@ default-brightness-level = <6>; }; }; + +&dcp { + status = "okay"; +};
arch/arm/boot/dts/imx28.dtsi +2 -1
@@ -794,9 +794,10 @@ }; dcp: dcp at 80028000 { + compatible = "fsl-dcp"; reg = <0x80028000 0x2000>; interrupts = <52 53 54>; - compatible = "fsl-dcp"; + status = "disabled"; }; pxp: pxp at 8002a000 {
Signature · 1 line
1.7.2.5
PATCH 1/3 ARM: dts: mxs: set dcp to "disabled" by default
Quoted 2 lines · Lothar Wa?mann
Reintroduce 'status = "disabled"' for the dcp node that was dropped by commit
519d8b1a"Added support for Freescale's DCP co-processor".
For IP blocks that do not have pins to be routed on boards, it should be fine to have it enabled in <soc>.dtsi.
Shawn
Quoted 46 lines
Explicitly enable it in imx28-evk which is referenced in the commit message of that commit.
Signed-off-by Lothar Wa?mann <[email protected]>--- arch/arm/boot/dts/imx28-evk.dts | 4 ++++ arch/arm/boot/dts/imx28.dtsi | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-)arch/arm/boot/dts/imx28-evk.dts +4
-0@@ -361,3 +361,7 @@ default-brightness-level = <6>; }; }; + +&dcp { + status = "okay"; +};arch/arm/boot/dts/imx28.dtsi +2
-1@@ -794,9 +794,10 @@ }; dcp: dcp at 80028000 { + compatible = "fsl-dcp"; reg = <0x80028000 0x2000>; interrupts = <52 53 54>; - compatible = "fsl-dcp"; + status = "disabled"; }; pxp: pxp at 8002a000 {Signature · 7 lines
1.7.2.5 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/3 ARM: dts: mxs: set dcp to "disabled" by default
Hi,
Quoted 7 lines · Shawn Guo
Quoted 2 lines · Lothar Wa?mann
Reintroduce 'status = "disabled"' for the dcp node that was dropped by commit
519d8b1a"Added support for Freescale's DCP co-processor".For IP blocks that do not have pins to be routed on boards, it should be fine to have it enabled in <soc>.dtsi.
That means that when a new driver is added, it will start wasting resources on all board using that SoC unless the board maintainers explicitly disable that driver in DTB.
I would prefer things to be the other way:
New drivers (no matter whether for chip-internal or external hardware) should require to be explicitly enabled for those platforms on which they are being used.
Lothar Wa?mann
Signature · 9 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________
PATCH 1/3 ARM: dts: mxs: set dcp to "disabled" by default
Quoted 10 lines · Lothar Waßmann
Hi,
Quoted 7 lines · Shawn Guo
Quoted 2 lines · Lothar Waßmann
Reintroduce 'status = "disabled"' for the dcp node that was dropped by commit
519d8b1a"Added support for Freescale's DCP co-processor".For IP blocks that do not have pins to be routed on boards, it should be fine to have it enabled in <soc>.dtsi.
Quoted 8 lines
That means that when a new driver is added, it will start wasting resources on all board using that SoC unless the board maintainers explicitly disable that driver in DTB.
I would prefer things to be the other way:
New drivers (no matter whether for chip-internal or external hardware) should require to be explicitly enabled for those platforms on which they are being used.
But that enablement should be in the kernel and not the device tree. The device tree is describing the HW, if the DCP exists and is usable w/o an external IO than by default it should be enabled in the SoC .dts
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH 2/3 crypto: dcp - cleanup: commas at end of struct initializers where appropriate
In reply to Lothar Waßmann--- drivers/crypto/dcp.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
drivers/crypto/dcp.c +5 -6
@@ -651,8 +651,7 @@ static struct crypto_alg algs[] = { .encrypt = dcp_aes_cbc_encrypt, .decrypt = dcp_aes_cbc_decrypt, .ivsize = AES_KEYSIZE_128, - } - + }, }, };
@@ -890,8 +889,8 @@ static int dcp_remove(struct platform_device *pdev) }static struct of_device_id fs_dcp_of_match[] = { - { .compatible ="fsl-dcp" }, - {}, + { .compatible ="fsl-dcp" , }, + {} };static struct platform_driver fs_dcp_driver = {
@@ -900,8 +899,8 @@ static struct platform_driver fs_dcp_driver = { .driver = { .name = "fsl-dcp", .owner = THIS_MODULE, - .of_match_table = fs_dcp_of_match - } + .of_match_table = fs_dcp_of_match, + }, };module_platform_driver (fs_dcp_driver);
Signature · 1 line
1.7.2.5
PATCH 3/3 crypto: dcp: rename 'compatible' property to 'fsl,dcp'
In reply to Lothar WaßmannLeave the old 'fsl-dcp' value in place with an appropriate comment until external users have updated their DTBs.
--- arch/arm/boot/dts/imx28.dtsi | 2 +- drivers/crypto/dcp.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/boot/dts/imx28.dtsi +1 -1
@@ -794,7 +794,7 @@ }; dcp: dcp at 80028000 { - compatible = "fsl-dcp"; + compatible = "fsl,dcp"; reg = <0x80028000 0x2000>; interrupts = <52 53 54>; status = "disabled";
drivers/crypto/dcp.c +2 -0
@@ -889,6 +889,8 @@ static int dcp_remove(struct platform_device *pdev) }static struct of_device_id fs_dcp_of_match[] = { + { .compatible ="fsl,dcp" , }, +/* To be removed when the DT blobs referencing this have been updated */ { .compatible ="fsl-dcp" , }, {} };
Signature · 1 line
1.7.2.5
PATCH 3/3 crypto: dcp: rename 'compatible' property to 'fsl, dcp'
Hello.
Quoted 14 lines · Lothar Waßmann
Leave the old 'fsl-dcp' value in place with an appropriate comment until external users have updated their DTBs.
Signed-off-by Lothar Waßmann <[email protected]>--- arch/arm/boot/dts/imx28.dtsi | 2 +- drivers/crypto/dcp.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-)arch/arm/boot/dts/imx28.dtsi +0
-0
arch/arm/boot/dts/imx28.dtsi line 796
Quoted 3 lines
arch/arm/boot/dts/imx28.dtsi +0
-0@@ -794,7 +794,7 @@ }; dcp: dcp@80028000 {
By the way, I see that this is a crypto device, so it should be named
"crypto" according to ePAPR spec. [1]
arch/arm/boot/dts/imx28.dtsi line 800
Quoted 5 lines
arch/arm/boot/dts/imx28.dtsi +1
-1- compatible = "fsl-dcp"; + compatible = "fsl,dcp"; reg = <0x80028000 0x2000>; interrupts = <52 53 54>; status = "disabled";
[1] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf
WBR, Sergei
cover ARM: dts: mxs: dcp cleanup patches
In reply to Lothar WaßmannQuoted 25 lines · Lothar Wa?mann
This patch series does the following:
- let the driver be "disabled" by default in
imx28.dtsi
- coding style cleanups indrivers/crypto/dcp.c
- use the "official" 'fsl,' prefix in the 'compatible' propertyThe last patch adds a new entry to the
of_match_tableof the driver, so that current DT blobs will still work. When out of tree users (mentioned in the commit log of519d8b1a"Added support for Freescale's DCP co-processor") have updated their DTBs the old entry 'fsl-dsp' can be removed from the driver.This patch series requires at least
"[PATCH 2/8] ARM: dts: mxs: add labels to most nodes for easier reference" from the patch series:
<[email protected]> to be applied.arch/arm/boot/dts/imx28.dtsi | 2 +- b/arch/arm/boot/dts/imx28-evk.dts | 4 ++++ b/arch/arm/boot/dts/imx28.dtsi | 3 ++- b/drivers/crypto/dcp.c | 11 +++++------ drivers/crypto/dcp.c | 2 ++ 5 files changed, 14 insertions(+), 8 deletions(-)
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Is there an actual binding spec for fsl,dcp? If not, there really should be.
- k
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation