Skip to contentSkip to conversation

spi: sirf: use clk_prepare_enable and clk_disable_unprepare

PATCH New Barry Song 4 participants 7 messages Dec 26, 2012 – Feb 5, 2013 SPI

lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/2 spi: sirf: use clk_prepare_enable and clk_disable_unprepare

From: Barry Song <[email protected]>

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework.

---
 drivers/spi/spi-sirf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/spi/spi-sirf.c +3 -3
index e0f43a5..38a191c 100644
@@ -570,7 +570,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 		ret = -EINVAL;
 		goto free_pin;
 	}
-	clk_enable(sspi->clk);
+	clk_prepare_enable(sspi->clk);
 	sspi->ctrl_freq = clk_get_rate(sspi->clk);
 
 	init_completion(&sspi->done);
@@ -594,7 +594,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	return 0;
 
 free_clk:
-	clk_disable(sspi->clk);
+	clk_disable_unprepare(sspi->clk);
 	clk_put(sspi->clk);
 free_pin:
 	pinctrl_put(sspi->p);
@@ -618,7 +618,7 @@ static int  spi_sirfsoc_remove(struct platform_device *pdev)
 		if (sspi->chipselect[i] > 0)
 			gpio_free(sspi->chipselect[i]);
 	}
-	clk_disable(sspi->clk);
+	clk_disable_unprepare(sspi->clk);
 	clk_put(sspi->clk);
 	pinctrl_put(sspi->p);
 	spi_master_put(master);
Signature · 6 lines
1.7.5.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
author
#1 lore raw

PATCH 2/2 spi: sirf: add support for new SiRFmarco SMP SoC

From: Barry Song <[email protected]>

the driver is also compatible with SiRFmarco except SiRFprimaII, so simply add "sirf,marco-spi" to OF match table.

---
 drivers/spi/spi-sirf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/spi/spi-sirf.c +1 -0
index 38a191c..09ca0e3 100644
@@ -659,6 +659,7 @@ static const struct dev_pm_ops spi_sirfsoc_pm_ops = {
 
 static const struct of_device_id spi_sirfsoc_of_match[] = {
 	{ .compatible = "sirf,prima2-spi", },
+	{ .compatible = "sirf,marco-spi", },
 	{}
 };
 MODULE_DEVICE_TABLE(of, sirfsoc_spi_of_match);
Signature · 6 lines
1.7.5.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
#2 lore raw

PATCH 2/2 spi: sirf: add support for new SiRFmarco SMP SoC

Hello.

Quoted 6 lines · Barry Song

From: Barry Song <[email protected]>

the driver is also compatible with SiRFmarco except SiRFprimaII, so simply add "sirf,marco-spi" to OF match table.

You've just posted this patch as a part of another 2-patch series.

WBR, Sergei

#3 lore raw

PATCH 2/2 spi: sirf: add support for new SiRFmarco SMP SoC

2012/12/26, Sergei Shtylyov <[email protected]>:

Quoted 4 lines

Hello.

On 26-12-2012 6:48, Barry Song wrote:

Quoted 8 lines
Quoted 6 lines

From: Barry Song <[email protected]>

the driver is also compatible with SiRFmarco except SiRFprimaII, so simply add "sirf,marco-spi" to OF match table.

You've just posted this patch as a part of another 2-patch series.

no, this one is spi, the other one is i2c.

Quoted 1 line

WBR, Sergei

-barry

#4 lore raw

PATCH 2/2 spi: sirf: add support for new SiRFmarco SMP SoC

Hello.

Quoted 10 lines · Barry Song
Quoted 8 lines
Quoted 6 lines

From: Barry Song <[email protected]>

the driver is also compatible with SiRFmarco except SiRFprimaII, so simply add "sirf,marco-spi" to OF match table.

You've just posted this patch as a part of another 2-patch series.

no, this one is spi, the other one is i2c.

Sorry for the noise -- I was being blind (and goggles didn't help :-).

Quoted 1 line

-barry

WBR, Sergei

Applied
#5 lore raw

PATCH 2/2 spi: sirf: add support for new SiRFmarco SMP SoC

In reply to Barry Song
Quoted 6 lines · Barry Song

From: Barry Song <[email protected]>

the driver is also compatible with SiRFmarco except SiRFprimaII, so simply add "sirf,marco-spi" to OF match table.

Applied, thanks.

g.

Quoted 28 lines
---
 drivers/spi/spi-sirf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/spi/spi-sirf.c +1 -0
index 38a191c..09ca0e3 100644
@@ -659,6 +659,7 @@ static const struct dev_pm_ops spi_sirfsoc_pm_ops = {
 
 static const struct of_device_id spi_sirfsoc_of_match[] = {
 	{ .compatible = "sirf,prima2-spi", },
+	{ .compatible = "sirf,marco-spi", },
 	{}
 };
 MODULE_DEVICE_TABLE(of, sirfsoc_spi_of_match);
Signature · 11 lines
1.7.5.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
Applied
#6 lore raw

PATCH 1/2 spi: sirf: use clk_prepare_enable and clk_disable_unprepare

In reply to Barry Song
Quoted 6 lines · Barry Song

From: Barry Song <[email protected]>

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework.

Applied, thanks.

g.

Quoted 47 lines
---
 drivers/spi/spi-sirf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/spi/spi-sirf.c +3 -3
index e0f43a5..38a191c 100644
@@ -570,7 +570,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 		ret = -EINVAL;
 		goto free_pin;
 	}
-	clk_enable(sspi->clk);
+	clk_prepare_enable(sspi->clk);
 	sspi->ctrl_freq = clk_get_rate(sspi->clk);
 
 	init_completion(&sspi->done);
@@ -594,7 +594,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	return 0;
 
 free_clk:
-	clk_disable(sspi->clk);
+	clk_disable_unprepare(sspi->clk);
 	clk_put(sspi->clk);
 free_pin:
 	pinctrl_put(sspi->p);
@@ -618,7 +618,7 @@ static int  spi_sirfsoc_remove(struct platform_device *pdev)
 		if (sspi->chipselect[i] > 0)
 			gpio_free(sspi->chipselect[i]);
 	}
-	clk_disable(sspi->clk);
+	clk_disable_unprepare(sspi->clk);
 	clk_put(sspi->clk);
 	pinctrl_put(sspi->p);
 	spi_master_put(master);
Signature · 11 lines
1.7.5.4



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.