mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 2/4] macb: handle clk_get error
@ 2011-09-09 11:46 Hubert Feurstein
  2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
  2011-09-09 11:46 ` [PATCH 4/4] at91sam9g45: add missing spi clock entries Hubert Feurstein
  0 siblings, 2 replies; 9+ messages in thread
From: Hubert Feurstein @ 2011-09-09 11:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 drivers/net/macb.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 9e5ce8b..ebe3bd4 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -49,6 +49,7 @@
 #include <asm/io.h>
 #include <mach/board.h>
 #include <linux/clk.h>
+#include <linux/err.h>
 
 #include "macb.h"
 
@@ -454,6 +455,11 @@ static int macb_probe(struct device_d *dev)
 	 */
 #if defined(CONFIG_ARCH_AT91)
 	pclk = clk_get(dev, "macb_clk");
+	if (IS_ERR(pclk)) {
+		dev_err(dev, "no macb_clk\n");
+		return PTR_ERR(pclk);
+	}
+
 	clk_enable(pclk);
 	macb_hz = clk_get_rate(pclk);
 #else
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/4] atmel_mci: handle clk_get error correctly
  2011-09-09 11:46 [PATCH 2/4] macb: handle clk_get error Hubert Feurstein
@ 2011-09-09 11:46 ` Hubert Feurstein
  2011-09-12  2:47   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-12 10:28   ` Sascha Hauer
  2011-09-09 11:46 ` [PATCH 4/4] at91sam9g45: add missing spi clock entries Hubert Feurstein
  1 sibling, 2 replies; 9+ messages in thread
From: Hubert Feurstein @ 2011-09-09 11:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 drivers/mci/atmel_mci.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index b4489dd..943ab34 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -23,6 +23,7 @@
 #include <asm/io.h>
 #include <mach/board.h>
 #include <linux/clk.h>
+#include <linux/err.h>
 
 #include "at91_mci.h"
 
@@ -460,9 +461,9 @@ static int mci_probe(struct device_d *hw_dev)
 	host->hw_dev = hw_dev;
 	hw_dev->priv = host;
 	host->clk = clk_get(hw_dev, "mci_clk");
-	if (host->clk == NULL) {
+	if (IS_ERR(host->clk)) {
 		dev_err(hw_dev, "no mci_clk\n");
-		return -EINVAL;
+		return PTR_ERR(host->clk);
 	}
 
 	clk_rate = clk_get_rate(host->clk);
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 4/4] at91sam9g45: add missing spi clock entries
  2011-09-09 11:46 [PATCH 2/4] macb: handle clk_get error Hubert Feurstein
  2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
@ 2011-09-09 11:46 ` Hubert Feurstein
  2011-09-12  2:46   ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 9+ messages in thread
From: Hubert Feurstein @ 2011-09-09 11:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 arch/arm/mach-at91/at91sam9g45.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index d4c27f8..9c478cd 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -191,6 +191,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci0", &mmc0_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci1", &mmc1_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
 };
 
 static struct clk_lookup usart_clocks_lookups[] = {
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 4/4] at91sam9g45: add missing spi clock entries
  2011-09-09 11:46 ` [PATCH 4/4] at91sam9g45: add missing spi clock entries Hubert Feurstein
@ 2011-09-12  2:46   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-12 21:05     ` [PATCH] at91: add spi fake " Hubert Feurstein
  0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-12  2:46 UTC (permalink / raw)
  To: Hubert Feurstein; +Cc: barebox

On 13:46 Fri 09 Sep     , Hubert Feurstein wrote:
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
If you want to add the spi please add it on all at91

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] atmel_mci: handle clk_get error correctly
  2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
@ 2011-09-12  2:47   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-12 10:28   ` Sascha Hauer
  1 sibling, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-12  2:47 UTC (permalink / raw)
  To: Hubert Feurstein; +Cc: barebox

On 13:46 Fri 09 Sep     , Hubert Feurstein wrote:
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.
> ---
>  drivers/mci/atmel_mci.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
> index b4489dd..943ab34 100644
> --- a/drivers/mci/atmel_mci.c
> +++ b/drivers/mci/atmel_mci.c
> @@ -23,6 +23,7 @@
>  #include <asm/io.h>
>  #include <mach/board.h>
>  #include <linux/clk.h>
> +#include <linux/err.h>
>  
>  #include "at91_mci.h"
>  
> @@ -460,9 +461,9 @@ static int mci_probe(struct device_d *hw_dev)
>  	host->hw_dev = hw_dev;
>  	hw_dev->priv = host;
>  	host->clk = clk_get(hw_dev, "mci_clk");
> -	if (host->clk == NULL) {
> +	if (IS_ERR(host->clk)) {
>  		dev_err(hw_dev, "no mci_clk\n");
> -		return -EINVAL;
> +		return PTR_ERR(host->clk);
>  	}
>  
>  	clk_rate = clk_get_rate(host->clk);
> -- 
> 1.7.4.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] atmel_mci: handle clk_get error correctly
  2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
  2011-09-12  2:47   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-09-12 10:28   ` Sascha Hauer
  1 sibling, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2011-09-12 10:28 UTC (permalink / raw)
  To: Hubert Feurstein; +Cc: barebox

On Fri, Sep 09, 2011 at 01:46:48PM +0200, Hubert Feurstein wrote:
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
>  drivers/mci/atmel_mci.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
> index b4489dd..943ab34 100644
> --- a/drivers/mci/atmel_mci.c
> +++ b/drivers/mci/atmel_mci.c
> @@ -23,6 +23,7 @@
>  #include <asm/io.h>
>  #include <mach/board.h>
>  #include <linux/clk.h>
> +#include <linux/err.h>
>  
>  #include "at91_mci.h"
>  
> @@ -460,9 +461,9 @@ static int mci_probe(struct device_d *hw_dev)
>  	host->hw_dev = hw_dev;
>  	hw_dev->priv = host;
>  	host->clk = clk_get(hw_dev, "mci_clk");
> -	if (host->clk == NULL) {
> +	if (IS_ERR(host->clk)) {
>  		dev_err(hw_dev, "no mci_clk\n");
> -		return -EINVAL;
> +		return PTR_ERR(host->clk);
>  	}
>  
>  	clk_rate = clk_get_rate(host->clk);

Applied 1-3 to next (could have gone to master, but the fixes are
probably not that urgent)

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] at91: add spi fake clock entries
  2011-09-12  2:46   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-09-12 21:05     ` Hubert Feurstein
  2011-09-13 14:42       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 9+ messages in thread
From: Hubert Feurstein @ 2011-09-12 21:05 UTC (permalink / raw)
  To: barebox, plagnioj

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 arch/arm/mach-at91/at91sam9260.c |    7 +++++++
 arch/arm/mach-at91/at91sam9261.c |    7 +++++++
 arch/arm/mach-at91/at91sam9263.c |    2 ++
 arch/arm/mach-at91/at91sam9g45.c |    2 ++
 4 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index c1f08e7..3af5747 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -169,6 +169,11 @@ static struct clk *periph_clocks[] = {
 	// irq0 .. irq2
 };
 
+static struct clk_lookup periph_clocks_lookups[] = {
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
+};
+
 static struct clk_lookup usart_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck),
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk),
@@ -203,6 +208,8 @@ static void __init at91sam9260_register_clocks(void)
 	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
 		clk_register(periph_clocks[i]);
 
+	clkdev_add_table(periph_clocks_lookups,
+			 ARRAY_SIZE(periph_clocks_lookups));
 	clkdev_add_table(usart_clocks_lookups,
 			 ARRAY_SIZE(usart_clocks_lookups));
 
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index fbb8058..b1e09ef 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -133,6 +133,11 @@ static struct clk *periph_clocks[] = {
 	// irq0 .. irq2
 };
 
+static struct clk_lookup periph_clocks_lookups[] = {
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
+};
+
 static struct clk_lookup usart_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck),
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk),
@@ -190,6 +195,8 @@ static void at91sam9261_register_clocks(void)
 	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
 		clk_register(periph_clocks[i]);
 
+	clkdev_add_table(periph_clocks_lookups,
+			 ARRAY_SIZE(periph_clocks_lookups));
 	clkdev_add_table(usart_clocks_lookups,
 			 ARRAY_SIZE(usart_clocks_lookups));
 
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 12a7868..df2df7e 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -166,6 +166,8 @@ static struct clk *periph_clocks[] = {
 static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("mci_clk", "at91_mci0", &mmc0_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "at91_mci1", &mmc1_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
 };
 
 static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index d4c27f8..9c478cd 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -191,6 +191,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci0", &mmc0_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci1", &mmc1_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
 };
 
 static struct clk_lookup usart_clocks_lookups[] = {
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] at91: add spi fake clock entries
  2011-09-12 21:05     ` [PATCH] at91: add spi fake " Hubert Feurstein
@ 2011-09-13 14:42       ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-13 19:48         ` [PATCH v2] at91: add spi clock connection id entries Hubert Feurstein
  0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-13 14:42 UTC (permalink / raw)
  To: Hubert Feurstein; +Cc: barebox

There are not fake clock they are connection ID

Best Regards,
J.
On 23:05 Mon 12 Sep     , Hubert Feurstein wrote:
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
>  arch/arm/mach-at91/at91sam9260.c |    7 +++++++
>  arch/arm/mach-at91/at91sam9261.c |    7 +++++++
>  arch/arm/mach-at91/at91sam9263.c |    2 ++
>  arch/arm/mach-at91/at91sam9g45.c |    2 ++
>  4 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
> index c1f08e7..3af5747 100644
> --- a/arch/arm/mach-at91/at91sam9260.c
> +++ b/arch/arm/mach-at91/at91sam9260.c
> @@ -169,6 +169,11 @@ static struct clk *periph_clocks[] = {
>  	// irq0 .. irq2
>  };
>  
> +static struct clk_lookup periph_clocks_lookups[] = {
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
> +};
> +
>  static struct clk_lookup usart_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck),
>  	CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk),
> @@ -203,6 +208,8 @@ static void __init at91sam9260_register_clocks(void)
>  	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
>  		clk_register(periph_clocks[i]);
>  
> +	clkdev_add_table(periph_clocks_lookups,
> +			 ARRAY_SIZE(periph_clocks_lookups));
>  	clkdev_add_table(usart_clocks_lookups,
>  			 ARRAY_SIZE(usart_clocks_lookups));
>  
> diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
> index fbb8058..b1e09ef 100644
> --- a/arch/arm/mach-at91/at91sam9261.c
> +++ b/arch/arm/mach-at91/at91sam9261.c
> @@ -133,6 +133,11 @@ static struct clk *periph_clocks[] = {
>  	// irq0 .. irq2
>  };
>  
> +static struct clk_lookup periph_clocks_lookups[] = {
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
> +};
> +
>  static struct clk_lookup usart_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck),
>  	CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk),
> @@ -190,6 +195,8 @@ static void at91sam9261_register_clocks(void)
>  	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
>  		clk_register(periph_clocks[i]);
>  
> +	clkdev_add_table(periph_clocks_lookups,
> +			 ARRAY_SIZE(periph_clocks_lookups));
>  	clkdev_add_table(usart_clocks_lookups,
>  			 ARRAY_SIZE(usart_clocks_lookups));
>  
> diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
> index 12a7868..df2df7e 100644
> --- a/arch/arm/mach-at91/at91sam9263.c
> +++ b/arch/arm/mach-at91/at91sam9263.c
> @@ -166,6 +166,8 @@ static struct clk *periph_clocks[] = {
>  static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("mci_clk", "at91_mci0", &mmc0_clk),
>  	CLKDEV_CON_DEV_ID("mci_clk", "at91_mci1", &mmc1_clk),
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
>  };
>  
>  static struct clk_lookup usart_clocks_lookups[] = {
> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
> index d4c27f8..9c478cd 100644
> --- a/arch/arm/mach-at91/at91sam9g45.c
> +++ b/arch/arm/mach-at91/at91sam9g45.c
> @@ -191,6 +191,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
>  	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci0", &mmc0_clk),
>  	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci1", &mmc1_clk),
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
> +	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
>  };
>  
>  static struct clk_lookup usart_clocks_lookups[] = {
> -- 
> 1.7.4.1

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] at91: add spi clock connection id entries
  2011-09-13 14:42       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-09-13 19:48         ` Hubert Feurstein
  0 siblings, 0 replies; 9+ messages in thread
From: Hubert Feurstein @ 2011-09-13 19:48 UTC (permalink / raw)
  To: barebox, plagnioj

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 Changed commit message.

 arch/arm/mach-at91/at91sam9260.c |    7 +++++++
 arch/arm/mach-at91/at91sam9261.c |    7 +++++++
 arch/arm/mach-at91/at91sam9263.c |    2 ++
 arch/arm/mach-at91/at91sam9g45.c |    2 ++
 4 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index c1f08e7..3af5747 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -169,6 +169,11 @@ static struct clk *periph_clocks[] = {
 	// irq0 .. irq2
 };
 
+static struct clk_lookup periph_clocks_lookups[] = {
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
+};
+
 static struct clk_lookup usart_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck),
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk),
@@ -203,6 +208,8 @@ static void __init at91sam9260_register_clocks(void)
 	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
 		clk_register(periph_clocks[i]);
 
+	clkdev_add_table(periph_clocks_lookups,
+			 ARRAY_SIZE(periph_clocks_lookups));
 	clkdev_add_table(usart_clocks_lookups,
 			 ARRAY_SIZE(usart_clocks_lookups));
 
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index fbb8058..b1e09ef 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -133,6 +133,11 @@ static struct clk *periph_clocks[] = {
 	// irq0 .. irq2
 };
 
+static struct clk_lookup periph_clocks_lookups[] = {
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
+};
+
 static struct clk_lookup usart_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart0", &mck),
 	CLKDEV_CON_DEV_ID("usart", "atmel_usart1", &usart0_clk),
@@ -190,6 +195,8 @@ static void at91sam9261_register_clocks(void)
 	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
 		clk_register(periph_clocks[i]);
 
+	clkdev_add_table(periph_clocks_lookups,
+			 ARRAY_SIZE(periph_clocks_lookups));
 	clkdev_add_table(usart_clocks_lookups,
 			 ARRAY_SIZE(usart_clocks_lookups));
 
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 12a7868..df2df7e 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -166,6 +166,8 @@ static struct clk *periph_clocks[] = {
 static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("mci_clk", "at91_mci0", &mmc0_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "at91_mci1", &mmc1_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
 };
 
 static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index d4c27f8..9c478cd 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -191,6 +191,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci0", &mmc0_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci1", &mmc1_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
+	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi1", &spi1_clk),
 };
 
 static struct clk_lookup usart_clocks_lookups[] = {
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-09-13 19:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 11:46 [PATCH 2/4] macb: handle clk_get error Hubert Feurstein
2011-09-09 11:46 ` [PATCH 3/4] atmel_mci: handle clk_get error correctly Hubert Feurstein
2011-09-12  2:47   ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-12 10:28   ` Sascha Hauer
2011-09-09 11:46 ` [PATCH 4/4] at91sam9g45: add missing spi clock entries Hubert Feurstein
2011-09-12  2:46   ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-12 21:05     ` [PATCH] at91: add spi fake " Hubert Feurstein
2011-09-13 14:42       ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-13 19:48         ` [PATCH v2] at91: add spi clock connection id entries Hubert Feurstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox