lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <69e35d4eac3c4a52d7896bc18c69b4578d1b15b3.1313702401.git.bengardiner@nanometrics.ca>
Date:	Thu, 18 Aug 2011 17:50:50 -0400
From:	Ben Gardiner <bengardiner@...ometrics.ca>
To:	Sekhar Nori <nsekhar@...com>,
	davinci-linux-open-source@...ux.davincidsp.com
Cc:	James Nuss <jamesnuss@...ometrics.ca>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config

Extract the common davinci_uart_config.enabled_uarts=0x7 passed to
davinci_serial_init() from all of the da850/omapl138 boards to the
da850-reference object introduced in a previous commit.

Signed-off-by: Ben Gardiner <bengardiner@...ometrics.ca>
Reviewed-by: James Nuss <jamesnuss@...ometrics.ca>
---
 arch/arm/mach-davinci/board-da850-evm.c            |    6 +-----
 arch/arm/mach-davinci/board-mityomapl138.c         |    6 +-----
 arch/arm/mach-davinci/board-omapl138-hawk.c        |    6 +-----
 arch/arm/mach-davinci/da850-reference.c            |    9 +++++++++
 .../mach-davinci/include/mach/da850-reference.h    |    1 +
 5 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 109b016..18e60e3 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -704,10 +704,6 @@ static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
 	.bus_delay	= 0,	/* usec */
 };
 
-static struct davinci_uart_config da850_evm_uart_config __initdata = {
-	.enabled_uarts = 0x7,
-};
-
 /* davinci da850 evm audio machine driver */
 static u8 da850_iis_serializer_direction[] = {
 	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,
@@ -1174,7 +1170,7 @@ static __init void da850_evm_init(void)
 					" %d\n", ret);
 	}
 
-	davinci_serial_init(&da850_evm_uart_config);
+	da850_reference_serial_init();
 
 	i2c_register_board_info(1, da850_evm_i2c_devices,
 			ARRAY_SIZE(da850_evm_i2c_devices));
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 998cd2e..d3cd099 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -433,10 +433,6 @@ static void __init mityomapl138_setup_nand(void)
 				 ARRAY_SIZE(mityomapl138_devices));
 }
 
-static struct davinci_uart_config mityomapl138_uart_config __initdata = {
-	.enabled_uarts = 0x7,
-};
-
 static const short mityomap_mii_pins[] = {
 	DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3,
 	DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER,
@@ -516,7 +512,7 @@ static void __init mityomapl138_init(void)
 	if (ret)
 		pr_warning("watchdog registration failed: %d\n", ret);
 
-	davinci_serial_init(&mityomapl138_uart_config);
+	da850_reference_serial_init();
 
 	ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata);
 	if (ret)
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 73d826d..d5ead44 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -294,15 +294,11 @@ usb11_setup_oc_fail:
 	gpio_free(DA850_USB1_VBUS_PIN);
 }
 
-static struct davinci_uart_config omapl138_hawk_uart_config __initdata = {
-	.enabled_uarts = 0x7,
-};
-
 static __init void omapl138_hawk_init(void)
 {
 	int ret;
 
-	davinci_serial_init(&omapl138_hawk_uart_config);
+	da850_reference_serial_init();
 
 	omapl138_hawk_config_emac();
 
diff --git a/arch/arm/mach-davinci/da850-reference.c b/arch/arm/mach-davinci/da850-reference.c
index 25df6476..e4f5072 100644
--- a/arch/arm/mach-davinci/da850-reference.c
+++ b/arch/arm/mach-davinci/da850-reference.c
@@ -20,3 +20,12 @@ int da850_reference_add_preferred_console(void)
 {
 	return add_preferred_console("ttyS", 2, "115200");
 }
+
+static struct davinci_uart_config da850_reference_uart_config __initdata = {
+	.enabled_uarts = 0x7,
+};
+
+void da850_reference_serial_init(void)
+{
+	davinci_serial_init(&da850_reference_uart_config);
+}
diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h
index ed72c53..d6e0b28 100644
--- a/arch/arm/mach-davinci/include/mach/da850-reference.h
+++ b/arch/arm/mach-davinci/include/mach/da850-reference.h
@@ -15,5 +15,6 @@
 
 void __init da850_reference_map_io(void);
 int da850_reference_add_preferred_console(void);
+void da850_reference_serial_init(void);
 
 #endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ