mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] at91: at91_register_uart return device
Date: Tue, 14 Feb 2012 15:31:20 +0100	[thread overview]
Message-ID: <1329229881-26751-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1329229881-26751-1-git-send-email-plagnioj@jcrosoft.com>

this will allow to set the active parameter from C

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-at91/at91rm9200_devices.c  |    6 +++---
 arch/arm/mach-at91/at91sam9260_devices.c |    6 +++---
 arch/arm/mach-at91/at91sam9261_devices.c |    6 +++---
 arch/arm/mach-at91/at91sam9263_devices.c |    6 +++---
 arch/arm/mach-at91/at91sam9g45_devices.c |    6 +++---
 arch/arm/mach-at91/include/mach/board.h  |    2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 599eb79..bda73e6 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -265,7 +265,7 @@ static inline void configure_usart3_pins(unsigned pins)
 		at91_set_B_periph(AT91_PIN_PB0, 0);	/* RTS3 */
 }
 
-void __init at91_register_uart(unsigned id, unsigned pins)
+struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 {
 	resource_size_t start;
 
@@ -296,9 +296,9 @@ void __init at91_register_uart(unsigned id, unsigned pins)
 			id = 4;
 			break;
 		default:
-			return;
+			return NULL;
 	}
 
-	add_generic_device("atmel_usart", id, NULL, start, 4096,
+	return add_generic_device("atmel_usart", id, NULL, start, 4096,
 			   IORESOURCE_MEM, NULL);
 }
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 3ddd0cf..3bdcd4f 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -282,7 +282,7 @@ static inline void configure_usart5_pins(void)
 	at91_set_A_periph(AT91_PIN_PB13, 0);		/* RXD5 */
 }
 
-void at91_register_uart(unsigned id, unsigned pins)
+struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 {
 	resource_size_t start;
 
@@ -323,10 +323,10 @@ void at91_register_uart(unsigned id, unsigned pins)
 			id = 6;
 			break;
 		default:
-			return;
+			return NULL;
 	}
 
-	add_generic_device("atmel_usart", id, NULL, start, 4096,
+	return add_generic_device("atmel_usart", id, NULL, start, 4096,
 			   IORESOURCE_MEM, NULL);
 }
 
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 7805c27..d4f7b5e 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -203,7 +203,7 @@ static inline void configure_usart2_pins(unsigned pins)
 		at91_set_B_periph(AT91_PIN_PA16, 0);	/* CTS2 */
 }
 
-void at91_register_uart(unsigned id, unsigned pins)
+struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 {
 	resource_size_t start;
 
@@ -229,10 +229,10 @@ void at91_register_uart(unsigned id, unsigned pins)
 			id = 3;
 			break;
 		default:
-			return;
+			return NULL;
 	}
 
-	add_generic_device("atmel_usart", id, NULL, start, 4096,
+	return add_generic_device("atmel_usart", id, NULL, start, 4096,
 			   IORESOURCE_MEM, NULL);
 }
 
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index fc7dc14..87a1726 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -253,7 +253,7 @@ static inline void configure_usart2_pins(unsigned pins)
 		at91_set_B_periph(AT91_PIN_PD6, 0);	/* CTS2 */
 }
 
-void at91_register_uart(unsigned id, unsigned pins)
+struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 {
 	resource_size_t start;
 
@@ -279,10 +279,10 @@ void at91_register_uart(unsigned id, unsigned pins)
 			id = 3;
 			break;
 		default:
-			return;
+			return NULL;
 	}
 
-	add_generic_device("atmel_usart", id, NULL, start, 4096,
+	return add_generic_device("atmel_usart", id, NULL, start, 4096,
 			   IORESOURCE_MEM, NULL);
 }
 
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index bb252bd..6931a3f 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -182,7 +182,7 @@ static inline void configure_usart3_pins(unsigned pins)
 		at91_set_B_periph(AT91_PIN_PA24, 0);	/* CTS3 */
 }
 
-void at91_register_uart(unsigned id, unsigned pins)
+struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
 {
 	resource_size_t start;
 
@@ -213,10 +213,10 @@ void at91_register_uart(unsigned id, unsigned pins)
 			id = 4;
 			break;
 		default:
-			return;
+			return NULL;
 	}
 
-	add_generic_device("atmel_usart", id, NULL, start, 4096,
+	return add_generic_device("atmel_usart", id, NULL, start, 4096,
 			   IORESOURCE_MEM, NULL);
 }
 
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 755ddc8..9f1abc1 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -83,7 +83,7 @@ void at91_add_device_sdram(u32 size);
 #define ATMEL_UART_DCD	0x10
 #define ATMEL_UART_RI	0x20
 
-void at91_register_uart(unsigned id, unsigned pins);
+struct device_d * __init at91_register_uart(unsigned id, unsigned pins);
 
 /* Multimedia Card Interface */
 struct atmel_mci_platform_data {
-- 
1.7.7


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

  parent reply	other threads:[~2012-02-14 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 14:31 [PATCH 1/4] add gpio keyboard support Jean-Christophe PLAGNIOL-VILLARD
2012-02-14 14:31 ` [PATCH 2/4] readkey: add define for Ascii keys Jean-Christophe PLAGNIOL-VILLARD
2012-02-14 14:31 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-02-14 14:31 ` [PATCH 4/4] usb-a926x: add DAB MMX Daughter board support Jean-Christophe PLAGNIOL-VILLARD
2012-02-15  9:31 ` [PATCH 1/4] add gpio keyboard support Sascha Hauer
2012-02-15 16:14   ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-16  7:51     ` Sascha Hauer
2012-02-16 10:20 ` [PATCH 1/4 v2] " Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329229881-26751-3-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox