crypto: mediatek - remove redundant clock setting
Subsystems (3)
PATCH 1/2 crypto: mediatek - remove redundant clock setting
This patch removes redundant clock setting for 'clk_ethif', which is the parent for 'clk_cryp'. Hence, we just need to handle its child.
--- drivers/crypto/mediatek/mtk-platform.c | 10 +--------- drivers/crypto/mediatek/mtk-platform.h | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-)
drivers/crypto/mediatek/mtk-platform.c +1 -9
@@ -504,19 +504,14 @@ static int mtk_crypto_probe(struct platform_device *pdev) } } - cryp->clk_ethif =devm_clk_get (&pdev->dev,"ethif" ); cryp->clk_cryp =devm_clk_get (&pdev->dev,"cryp" ); -if (IS_ERR (cryp->clk_ethif) ||IS_ERR (cryp->clk_cryp)) +if (IS_ERR (cryp->clk_cryp))return -EPROBE_DEFER ; cryp->dev = &pdev->dev;pm_runtime_enable (cryp->dev);pm_runtime_get_sync (cryp->dev); - err =clk_prepare_enable (cryp->clk_ethif); -if (err) - goto err_clk_ethif; - err =clk_prepare_enable (cryp->clk_cryp);if (err) goto err_clk_cryp;
@@ -559,8 +554,6 @@ static int mtk_crypto_probe(struct platform_device *pdev) err_resource:clk_disable_unprepare (cryp->clk_cryp); err_clk_cryp: -clk_disable_unprepare (cryp->clk_ethif); -err_clk_ethif:pm_runtime_put_sync (cryp->dev);pm_runtime_disable (cryp->dev);
@@ -576,7 +569,6 @@ static int mtk_crypto_remove(struct platform_device *pdev)mtk_desc_dma_free (cryp);clk_disable_unprepare (cryp->clk_cryp); -clk_disable_unprepare (cryp->clk_ethif);pm_runtime_put_sync (cryp->dev);pm_runtime_disable (cryp->dev);
drivers/crypto/mediatek/mtk-platform.h +0 -2
@@ -200,7 +200,6 @@ struct mtk_sha_rec {* struct mtk_cryp - Cryptographic device * @base: pointer to mapped register I/O base * @dev: pointer to device -* @clk_ethif: pointer to ethif clock * @clk_cryp: pointer to crypto clock * @irq: global system and rings IRQ * @ring: pointer to descriptor rings
@@ -215,7 +214,6 @@ struct mtk_sha_rec {struct mtk_cryp {void __iomem *base;struct device *dev; -struct clk *clk_ethif;struct clk *clk_cryp;int irq[MTK_IRQ_NUM ];
Signature · 1 line
1.9.1
PATCH 2/2 crypto: mediatek - update DT binding documentation
This patch removes unnecessary clock in binding file.
--- Documentation/devicetree/bindings/crypto/mediatek-crypto.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/crypto/mediatek-crypto.txt +3 -5
@@ -6,8 +6,7 @@ Required properties: - interrupts: Should contain the five crypto engines interrupts in numeric order. These are global system and four descriptor rings. - clocks: the clock used by the core -- clock-names: the names of the clock listed in the clocks property. These are - "ethif", "cryp" +- clock-names: Must contain "cryp". - power-domains: Must contain a reference to the PM domain.
@@ -20,8 +19,7 @@ Example: <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>, <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>, <GIC_SPI 97 IRQ_TYPE_LEVEL_LOW>; - clocks = <&topckgen CLK_TOP_ETHIF_SEL>, - <ðsys CLK_ETHSYS_CRYPTO>; - clock-names = "ethif","cryp"; + clocks = <ðsys CLK_ETHSYS_CRYPTO>; + clock-names = "cryp"; power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; };
Signature · 1 line
1.9.1
Re: [PATCH 2/2] crypto: mediatek - update DT binding documentation
Quoted 4 lines · Ryder Lee
This patch removes unnecessary clock in binding file.
Signed-off-by Ryder Lee <[email protected]>---
In the driver clocks are get by name, so this change does not break backwards compatibility.
Quoted 29 lines
Documentation/devicetree/bindings/crypto/mediatek-crypto.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/crypto/mediatek-crypto.txt +3
-5@@ -6,8 +6,7 @@ Required properties: - interrupts: Should contain the five crypto engines interrupts in numeric order. These are global system and four descriptor rings. - clocks: the clock used by the core -- clock-names: the names of the clock listed in the clocks property. These are - "ethif", "cryp" +- clock-names: Must contain "cryp". - power-domains: Must contain a reference to the PM domain.@@ -20,8 +19,7 @@ Example: <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>, <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>, <GIC_SPI 97 IRQ_TYPE_LEVEL_LOW>; - clocks = <&topckgen CLK_TOP_ETHIF_SEL>, - <ðsys CLK_ETHSYS_CRYPTO>; - clock-names = "ethif","cryp"; + clocks = <ðsys CLK_ETHSYS_CRYPTO>; + clock-names = "cryp"; power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; };
Rob Herring
maintainerRe: [PATCH 2/2] crypto: mediatek - update DT binding documentation
In reply to Ryder LeeQuoted 1 line · Ryder Lee
This patch removes unnecessary clock in binding file.
Why is the clock unnecessary? A h/w block either has a clock or doesn't.
The subject needs some work. Perhaps "dt-bindings: crypto: remove mediatek ethif clock".
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] crypto: mediatek - update DT binding documentation
Quoted 9 lines · Rob Herring
Quoted 1 line · Ryder Lee
This patch removes unnecessary clock in binding file.
Why is the clock unnecessary? A h/w block either has a clock or doesn't.
The subject needs some work. Perhaps "dt-bindings: crypto: remove mediatek ethif clock".
Rob
I'll write more clearly, thanks.
Ryder.