public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/13 V2] at91sam9/at91cap: spi init add hardware chip select support
@ 2009-03-27 22:30 Jean-Christophe PLAGNIOL-VILLARD
  2009-03-27 22:30 ` [U-Boot] [PATCH 02/13 V2] at91sam9: add watchdog support Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 62+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-27 22:30 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
Fix typo in the commit message

Best Regards,
J.
 cpu/arm926ejs/at91/at91cap9_spi.c    |   37 ++++++++++++++++++++++++++++-----
 cpu/arm926ejs/at91/at91sam9260_spi.c |   36 +++++++++++++++++++++++++++-----
 cpu/arm926ejs/at91/at91sam9261_spi.c |   36 +++++++++++++++++++++++++++-----
 cpu/arm926ejs/at91/at91sam9263_spi.c |   36 +++++++++++++++++++++++++++-----
 cpu/arm926ejs/at91/at91sam9rl_spi.c  |   18 +++++++++++++--
 5 files changed, 136 insertions(+), 27 deletions(-)

diff --git a/cpu/arm926ejs/at91/at91cap9_spi.c b/cpu/arm926ejs/at91/at91cap9_spi.c
index 356a804..cd8143b 100644
--- a/cpu/arm926ejs/at91/at91cap9_spi.c
+++ b/cpu/arm926ejs/at91/at91cap9_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_SPI0);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PA5, 1);
+		at91_set_B_periph(AT91_PIN_PA5, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PA3, 1);
+		at91_set_B_periph(AT91_PIN_PA3, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PD0, 1);
+		at91_set_B_periph(AT91_PIN_PD0, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_B_periph(AT91_PIN_PD1, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PA5, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PA3, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PD0, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PD1, 1);
 	}
 }
@@ -61,15 +73,28 @@ void at91_spi1_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_SPI1);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PB15, 1);
+		at91_set_A_periph(AT91_PIN_PB15, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PB16, 1);
+		at91_set_A_periph(AT91_PIN_PB16, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PB17, 1);
+		at91_set_A_periph(AT91_PIN_PB17, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_A_periph(AT91_PIN_PB18, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PB15, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PB16, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PB17, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PB18, 1);
 	}
+
 }
diff --git a/cpu/arm926ejs/at91/at91sam9260_spi.c b/cpu/arm926ejs/at91/at91sam9260_spi.c
index 0105072..d6fd80e 100644
--- a/cpu/arm926ejs/at91/at91sam9260_spi.c
+++ b/cpu/arm926ejs/at91/at91sam9260_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_SPI0);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PA3, 1);
+		at91_set_A_periph(AT91_PIN_PA3, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PC11, 1);
+		at91_set_B_periph(AT91_PIN_PC11, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PC16, 1);
+		at91_set_B_periph(AT91_PIN_PC16, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_B_periph(AT91_PIN_PC17, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PA3, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PC11, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PC16, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PC17, 1);
 	}
 }
@@ -61,15 +73,27 @@ void at91_spi1_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_SPI1);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PB3, 1);
+		at91_set_A_periph(AT91_PIN_PB3, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PC5, 1);
+		at91_set_B_periph(AT91_PIN_PC5, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PC4, 1);
+		at91_set_B_periph(AT91_PIN_PC4, 1);
 	}
 	if (cs_mask & (1 << 3)) {
 		at91_set_gpio_output(AT91_PIN_PC3, 1);
 	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PB3, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PC5, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PC4, 1);
+	}
+	if (cs_mask & (1 << 7)) {
+		at91_set_gpio_output(AT91_PIN_PC3, 1);
+	}
 }
diff --git a/cpu/arm926ejs/at91/at91sam9261_spi.c b/cpu/arm926ejs/at91/at91sam9261_spi.c
index f70320d..9383dc6 100644
--- a/cpu/arm926ejs/at91/at91sam9261_spi.c
+++ b/cpu/arm926ejs/at91/at91sam9261_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_SPI0);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PA3, 1);
+		at91_set_A_periph(AT91_PIN_PA3, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PA4, 1);
+		at91_set_A_periph(AT91_PIN_PA4, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PA5, 1);
+		at91_set_A_periph(AT91_PIN_PA5, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_A_periph(AT91_PIN_PA6, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PA3, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PA4, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PA5, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PA6, 1);
 	}
 }
@@ -61,15 +73,27 @@ void at91_spi1_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_SPI1);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PB28, 1);
+		at91_set_A_periph(AT91_PIN_PB28, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PA24, 1);
+		at91_set_B_periph(AT91_PIN_PA24, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PA25, 1);
+		at91_set_B_periph(AT91_PIN_PA25, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_A_periph(AT91_PIN_PA26, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PB28, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PA24, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PA25, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PA26, 1);
 	}
 }
diff --git a/cpu/arm926ejs/at91/at91sam9263_spi.c b/cpu/arm926ejs/at91/at91sam9263_spi.c
index 1dda04c..e52dd61 100644
--- a/cpu/arm926ejs/at91/at91sam9263_spi.c
+++ b/cpu/arm926ejs/at91/at91sam9263_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_SPI0);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PA5, 1);
+		at91_set_B_periph(AT91_PIN_PA5, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PA3, 1);
+		at91_set_B_periph(AT91_PIN_PA3, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PA4, 1);
+		at91_set_B_periph(AT91_PIN_PA4, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_B_periph(AT91_PIN_PB11, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PA5, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PA3, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PA4, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PB11, 1);
 	}
 }
@@ -61,15 +73,27 @@ void at91_spi1_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_SPI1);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PB15, 1);
+		at91_set_A_periph(AT91_PIN_PB15, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PB16, 1);
+		at91_set_A_periph(AT91_PIN_PB16, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PB17, 1);
+		at91_set_A_periph(AT91_PIN_PB17, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_A_periph(AT91_PIN_PB18, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PB15, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PB16, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PB17, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PB18, 1);
 	}
 }
diff --git a/cpu/arm926ejs/at91/at91sam9rl_spi.c b/cpu/arm926ejs/at91/at91sam9rl_spi.c
index aa9c183..389d6d8 100644
--- a/cpu/arm926ejs/at91/at91sam9rl_spi.c
+++ b/cpu/arm926ejs/at91/at91sam9rl_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_SPI);
 
 	if (cs_mask & (1 << 0)) {
-		at91_set_gpio_output(AT91_PIN_PA28, 1);
+		at91_set_A_periph(AT91_PIN_PA28, 1);
 	}
 	if (cs_mask & (1 << 1)) {
-		at91_set_gpio_output(AT91_PIN_PB7, 1);
+		at91_set_B_periph(AT91_PIN_PB7, 1);
 	}
 	if (cs_mask & (1 << 2)) {
-		at91_set_gpio_output(AT91_PIN_PD8, 1);
+		at91_set_A_periph(AT91_PIN_PD8, 1);
 	}
 	if (cs_mask & (1 << 3)) {
+		at91_set_B_periph(AT91_PIN_PD9, 1);
+	}
+	if (cs_mask & (1 << 4)) {
+		at91_set_gpio_output(AT91_PIN_PA28, 1);
+	}
+	if (cs_mask & (1 << 5)) {
+		at91_set_gpio_output(AT91_PIN_PB7, 1);
+	}
+	if (cs_mask & (1 << 6)) {
+		at91_set_gpio_output(AT91_PIN_PD8, 1);
+	}
+	if (cs_mask & (1 << 7)) {
 		at91_set_gpio_output(AT91_PIN_PD9, 1);
 	}
 }
-- 
1.6.2.1

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

end of thread, other threads:[~2009-05-26 15:47 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 22:30 [U-Boot] [PATCH 01/13 V2] at91sam9/at91cap: spi init add hardware chip select support Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30 ` [U-Boot] [PATCH 02/13 V2] at91sam9: add watchdog support Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30   ` [U-Boot] [PATCH 03/13] at91: rename DATAFLASH_MMC_SELECT to CONFIG_DATAFLASH_MMC_SELECT Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30     ` [U-Boot] [PATCH 04/13] at91rm9200dk: Move conditional compilation to Makefile Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30       ` [U-Boot] [PATCH 05/13] add dataflash mmc mux missing support Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30         ` [U-Boot] [PATCH 06/13] Add support for the AT91RM9200EK Board Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30           ` [U-Boot] [PATCH 07/13] at91rm9200: move serial driver to drivers/serial Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30             ` [U-Boot] [PATCH 08/13] at91rm9200: move serial shutdown code to serial drivers Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30               ` [U-Boot] [PATCH 09/13] at91rm9200: Reset update Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30                 ` [U-Boot] [PATCH 10/13] at91: move usb driver to drivers/usb Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30                   ` [U-Boot] [PATCH 11/13] at91: move dataflash spi driver to drivers/spi Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30                     ` [U-Boot] [PATCH 12/13] at91: add hardware i2c drivers Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 22:30                       ` [U-Boot] [PATCH 13/13] at91sam9263ek: active hush and auto compelete support Jean-Christophe PLAGNIOL-VILLARD
2009-03-31 20:35                         ` Wolfgang Denk
2009-03-31 22:42                           ` Stelian Pop
2009-03-30  5:53                       ` [U-Boot] [PATCH 12/13] at91: add hardware i2c drivers Heiko Schocher
2009-03-30  7:24                         ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-30  8:26                           ` Heiko Schocher
2009-03-30  8:50                             ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-30 10:43                               ` Wolfgang Denk
2009-03-30 11:55                                 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-31 20:40                         ` Wolfgang Denk
2009-05-14  6:06                       ` Daniel Gorsulowski
2009-03-31 18:28                   ` [U-Boot] [PATCH 10/13] at91: move usb driver to drivers/usb Remy Bohmer
2009-03-31 19:21                     ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-31 20:38                       ` Wolfgang Denk
2009-03-31 21:55                         ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01  6:55                         ` Stefan Roese
2009-04-01  7:25                           ` Remy Bohmer
2009-04-01  7:22                             ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01  7:57                               ` Remy Bohmer
2009-04-01  8:01                                 ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01  9:07                                   ` Wolfgang Denk
2009-04-01  8:13                                 ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01  8:59                                   ` Michael Trimarchi
2009-04-01  9:27                                     ` Stefan Roese
2009-04-01  9:44                                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01 12:19                                         ` Stefan Roese
2009-04-01 17:21                                           ` [U-Boot] [RFC PATCH] drivers/usb: regorganisation Jean-Christophe PLAGNIOL-VILLARD
2009-04-01 22:12                                             ` Wolfgang Denk
2009-04-02  5:22                                               ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-02 15:26                                                 ` Remy Bohmer
2009-04-02 16:55                                                   ` [U-Boot] [RFC PATCH V2] " Jean-Christophe PLAGNIOL-VILLARD
2009-04-02 18:07                                                     ` Wolfgang Denk
2009-04-02 19:27                                                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-02 23:06                                                         ` Wolfgang Denk
2009-04-03  5:10                                                           ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-03 10:46                                                       ` [U-Boot] [PATCH] " Jean-Christophe PLAGNIOL-VILLARD
2009-04-03 11:19                                                         ` Remy Bohmer
2009-04-02 11:11                                             ` [U-Boot] [RFC PATCH] " Mike Frysinger
2009-04-01 15:56                                       ` [U-Boot] [PATCH 10/13] at91: move usb driver to drivers/usb ksi at koi8.net
2009-04-01 15:53                             ` ksi at koi8.net
2009-04-01 15:48                           ` ksi at koi8.net
2009-04-01 16:03                             ` Michael Trimarchi
2009-04-01 16:31                               ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01 16:28                             ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-01 19:42                             ` Scott Wood
2009-03-31 21:22                       ` Remy Bohmer
2009-03-31 20:36                     ` Wolfgang Denk
2009-04-01 22:15               ` [U-Boot] [PATCH 08/13] at91rm9200: move serial shutdown code to serial drivers Wolfgang Denk
2009-04-01 22:14             ` [U-Boot] [PATCH 07/13] at91rm9200: move serial driver to drivers/serial Wolfgang Denk
2009-05-26 15:47           ` [U-Boot] [PATCH 06/13] Add support for the AT91RM9200EK Board Haavard Skinnemoen

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