* [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components
2011-08-18 21:50 [PATCH 0/5] ARM: davinci: introduce new board heliosv1 Ben Gardiner
@ 2011-08-18 21:50 ` Ben Gardiner
2011-08-18 21:55 ` Felipe Balbi
2011-08-18 21:50 ` [PATCH 2/5] ARM: davinci: da850, omapl138: share boot_params Ben Gardiner
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Ben Gardiner @ 2011-08-18 21:50 UTC (permalink / raw)
To: linux-arm-kernel
Several of the pieces of the da850 evm reference design board support in
board-da850-evm.c are re-used by the other da850/omapl138 boards. Examples
are boot_params, map_io, preferred-serial-console, davinci_uart_config's
enabled_uarts to name a few.
Introduce an object file to contain these shared pieces for re-use by the
other da850/omapl138 boards. Kick it off with sharing the machine map_io which
before this change was repeated in each of board-da850-evm.c,
board-mityomapl138.c and board-omapl138-hawk.c. Since these machines are all
included in the da8xx_omapl_defconfig, there is benefit to sharing a definition
here.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
---
arch/arm/mach-davinci/Makefile | 3 ++-
arch/arm/mach-davinci/board-da850-evm.c | 8 ++------
arch/arm/mach-davinci/board-mityomapl138.c | 8 ++------
arch/arm/mach-davinci/board-omapl138-hawk.c | 8 ++------
arch/arm/mach-davinci/da850-reference.c | 15 +++++++++++++++
.../mach-davinci/include/mach/da850-reference.h | 14 ++++++++++++++
6 files changed, 37 insertions(+), 19 deletions(-)
create mode 100644 arch/arm/mach-davinci/da850-reference.c
create mode 100644 arch/arm/mach-davinci/include/mach/da850-reference.h
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 0b87a1c..9a01441 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -15,7 +15,8 @@ obj-$(CONFIG_ARCH_DAVINCI_DM355) += dm355.o devices.o
obj-$(CONFIG_ARCH_DAVINCI_DM646x) += dm646x.o devices.o
obj-$(CONFIG_ARCH_DAVINCI_DM365) += dm365.o devices.o
obj-$(CONFIG_ARCH_DAVINCI_DA830) += da830.o devices-da8xx.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o
+obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o\
+ da850-reference.o
obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += tnetv107x.o devices-tnetv107x.o
obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += gpio-tnetv107x.o
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 3d2c0d7..3ee12f3 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -37,6 +37,7 @@
#include <mach/cp_intc.h>
#include <mach/da8xx.h>
+#include <mach/da850-reference.h>
#include <mach/nand.h>
#include <mach/mux.h>
#include <mach/aemif.h>
@@ -1257,14 +1258,9 @@ static int __init da850_evm_console_init(void)
console_initcall(da850_evm_console_init);
#endif
-static void __init da850_evm_map_io(void)
-{
- da850_init();
-}
-
MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
.boot_params = (DA8XX_DDR_BASE + 0x100),
- .map_io = da850_evm_map_io,
+ .map_io = da850_reference_map_io,
.init_irq = cp_intc_init,
.timer = &davinci_timer,
.init_machine = da850_evm_init,
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 606a6f2..c256858 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -25,6 +25,7 @@
#include <mach/common.h>
#include <mach/cp_intc.h>
#include <mach/da8xx.h>
+#include <mach/da850-reference.h>
#include <mach/nand.h>
#include <mach/mux.h>
#include <mach/spi.h>
@@ -559,14 +560,9 @@ static int __init mityomapl138_console_init(void)
console_initcall(mityomapl138_console_init);
#endif
-static void __init mityomapl138_map_io(void)
-{
- da850_init();
-}
-
MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808")
.boot_params = (DA8XX_DDR_BASE + 0x100),
- .map_io = mityomapl138_map_io,
+ .map_io = da850_reference_map_io,
.init_irq = cp_intc_init,
.timer = &davinci_timer,
.init_machine = mityomapl138_init,
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 67c38d0..5d556cf 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -19,6 +19,7 @@
#include <mach/cp_intc.h>
#include <mach/da8xx.h>
+#include <mach/da850-reference.h>
#include <mach/mux.h>
#define HAWKBOARD_PHY_ID "0:07"
@@ -332,14 +333,9 @@ static int __init omapl138_hawk_console_init(void)
console_initcall(omapl138_hawk_console_init);
#endif
-static void __init omapl138_hawk_map_io(void)
-{
- da850_init();
-}
-
MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
.boot_params = (DA8XX_DDR_BASE + 0x100),
- .map_io = omapl138_hawk_map_io,
+ .map_io = da850_reference_map_io,
.init_irq = cp_intc_init,
.timer = &davinci_timer,
.init_machine = omapl138_hawk_init,
diff --git a/arch/arm/mach-davinci/da850-reference.c b/arch/arm/mach-davinci/da850-reference.c
new file mode 100644
index 0000000..67b327b
--- /dev/null
+++ b/arch/arm/mach-davinci/da850-reference.c
@@ -0,0 +1,15 @@
+/*
+ * TI DA850/OMAP-L138 reusable elements of the da850 reference design.
+ *
+ * Copyright (C) 2011 Nanometrics Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#include <mach/da8xx.h>
+
+void __init da850_reference_map_io(void)
+{
+ da850_init();
+}
diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h
new file mode 100644
index 0000000..d3beb13
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/da850-reference.h
@@ -0,0 +1,14 @@
+/* Defines for the reusable elements of the da850 reference design.
+ *
+ * Copyright 2011 (c) Nanometrics Inc. This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ */
+
+#ifndef __ASM_ARCH_DAVINCI_DA850_REFERENCE_H
+#define __ASM_ARCH_DAVINCI_DA850_REFERENCE_H
+
+void __init da850_reference_map_io(void);
+
+#endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components
2011-08-18 21:50 ` [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components Ben Gardiner
@ 2011-08-18 21:55 ` Felipe Balbi
0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2011-08-18 21:55 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Aug 18, 2011 at 05:50:47PM -0400, Ben Gardiner wrote:
> @@ -0,0 +1,15 @@
> +/*
> + * TI DA850/OMAP-L138 reusable elements of the da850 reference design.
> + *
> + * Copyright (C) 2011 Nanometrics Inc. This file is licensed under
> + * the terms of the GNU General Public License version 2. This program
> + * is licensed "as is" without any warranty of any kind, whether express
> + * or implied.
> + */
> +
> +#include <mach/da8xx.h>
> +
> +void __init da850_reference_map_io(void)
> +{
> + da850_init();
> +}
if it's for this oneliner... just initialize .map_io with da850_init.
not sure it's worth to add another file.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110819/eb95b901/attachment-0001.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/5] ARM: davinci: da850, omapl138: share boot_params
2011-08-18 21:50 [PATCH 0/5] ARM: davinci: introduce new board heliosv1 Ben Gardiner
2011-08-18 21:50 ` [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components Ben Gardiner
@ 2011-08-18 21:50 ` Ben Gardiner
2011-08-18 21:56 ` Felipe Balbi
2011-08-18 21:50 ` [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration Ben Gardiner
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Ben Gardiner @ 2011-08-18 21:50 UTC (permalink / raw)
To: linux-arm-kernel
Extract the value of .boot_params used by the da850/omapl138 machines to
a common DA850_REFERENCE_BOOT_PARAMS defined in the da850-reference.h
header introduced in a previous commit.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
---
arch/arm/mach-davinci/board-da850-evm.c | 2 +-
arch/arm/mach-davinci/board-mityomapl138.c | 2 +-
arch/arm/mach-davinci/board-omapl138-hawk.c | 2 +-
.../mach-davinci/include/mach/da850-reference.h | 4 ++++
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 3ee12f3..f707bb2 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1259,7 +1259,7 @@ console_initcall(da850_evm_console_init);
#endif
MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
- .boot_params = (DA8XX_DDR_BASE + 0x100),
+ .boot_params = DA850_REFERENCE_BOOT_PARAMS,
.map_io = da850_reference_map_io,
.init_irq = cp_intc_init,
.timer = &davinci_timer,
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index c256858..998cd2e 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -561,7 +561,7 @@ console_initcall(mityomapl138_console_init);
#endif
MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808")
- .boot_params = (DA8XX_DDR_BASE + 0x100),
+ .boot_params = DA850_REFERENCE_BOOT_PARAMS,
.map_io = da850_reference_map_io,
.init_irq = cp_intc_init,
.timer = &davinci_timer,
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 5d556cf..cfad483 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -334,7 +334,7 @@ console_initcall(omapl138_hawk_console_init);
#endif
MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
- .boot_params = (DA8XX_DDR_BASE + 0x100),
+ .boot_params = DA850_REFERENCE_BOOT_PARAMS,
.map_io = da850_reference_map_io,
.init_irq = cp_intc_init,
.timer = &davinci_timer,
diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h
index d3beb13..6837a98 100644
--- a/arch/arm/mach-davinci/include/mach/da850-reference.h
+++ b/arch/arm/mach-davinci/include/mach/da850-reference.h
@@ -9,6 +9,10 @@
#ifndef __ASM_ARCH_DAVINCI_DA850_REFERENCE_H
#define __ASM_ARCH_DAVINCI_DA850_REFERENCE_H
+#include <mach/memory.h>
+
+#define DA850_REFERENCE_BOOT_PARAMS (DA8XX_DDR_BASE + 0x100)
+
void __init da850_reference_map_io(void);
#endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration
2011-08-18 21:50 [PATCH 0/5] ARM: davinci: introduce new board heliosv1 Ben Gardiner
2011-08-18 21:50 ` [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components Ben Gardiner
2011-08-18 21:50 ` [PATCH 2/5] ARM: davinci: da850, omapl138: share boot_params Ben Gardiner
@ 2011-08-18 21:50 ` Ben Gardiner
2011-08-18 21:50 ` [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config Ben Gardiner
2011-08-18 21:50 ` [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1 Ben Gardiner
4 siblings, 0 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-08-18 21:50 UTC (permalink / raw)
To: linux-arm-kernel
Extract the common add_preferred_console("ttyS", 2, "115200") found both of
the da850evm and hawk boards into a shared function in the da850-reference
object introduced in a previous commit.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
---
arch/arm/mach-davinci/board-da850-evm.c | 2 +-
arch/arm/mach-davinci/board-omapl138-hawk.c | 2 +-
arch/arm/mach-davinci/da850-reference.c | 7 +++++++
.../mach-davinci/include/mach/da850-reference.h | 1 +
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index f707bb2..109b016 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1253,7 +1253,7 @@ static int __init da850_evm_console_init(void)
if (!machine_is_davinci_da850_evm())
return 0;
- return add_preferred_console("ttyS", 2, "115200");
+ return da850_reference_add_preferred_console();
}
console_initcall(da850_evm_console_init);
#endif
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index cfad483..73d826d 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -328,7 +328,7 @@ static int __init omapl138_hawk_console_init(void)
if (!machine_is_omapl138_hawkboard())
return 0;
- return add_preferred_console("ttyS", 2, "115200");
+ return da850_reference_add_preferred_console();
}
console_initcall(omapl138_hawk_console_init);
#endif
diff --git a/arch/arm/mach-davinci/da850-reference.c b/arch/arm/mach-davinci/da850-reference.c
index 67b327b..25df6476 100644
--- a/arch/arm/mach-davinci/da850-reference.c
+++ b/arch/arm/mach-davinci/da850-reference.c
@@ -7,9 +7,16 @@
* or implied.
*/
+#include <linux/console.h>
+
#include <mach/da8xx.h>
void __init da850_reference_map_io(void)
{
da850_init();
}
+
+int da850_reference_add_preferred_console(void)
+{
+ return add_preferred_console("ttyS", 2, "115200");
+}
diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h
index 6837a98..ed72c53 100644
--- a/arch/arm/mach-davinci/include/mach/da850-reference.h
+++ b/arch/arm/mach-davinci/include/mach/da850-reference.h
@@ -14,5 +14,6 @@
#define DA850_REFERENCE_BOOT_PARAMS (DA8XX_DDR_BASE + 0x100)
void __init da850_reference_map_io(void);
+int da850_reference_add_preferred_console(void);
#endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config
2011-08-18 21:50 [PATCH 0/5] ARM: davinci: introduce new board heliosv1 Ben Gardiner
` (2 preceding siblings ...)
2011-08-18 21:50 ` [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration Ben Gardiner
@ 2011-08-18 21:50 ` Ben Gardiner
2011-08-18 21:57 ` Felipe Balbi
2011-08-18 21:50 ` [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1 Ben Gardiner
4 siblings, 1 reply; 10+ messages in thread
From: Ben Gardiner @ 2011-08-18 21:50 UTC (permalink / raw)
To: linux-arm-kernel
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@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.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
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config
2011-08-18 21:50 ` [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config Ben Gardiner
@ 2011-08-18 21:57 ` Felipe Balbi
0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2011-08-18 21:57 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Aug 18, 2011 at 05:50:50PM -0400, Ben Gardiner wrote:
> 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);
> +}
this looks like it could go to that da850_devices.c file (or whatever it
was called, sorry forgot the name)
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110819/324ed3da/attachment.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1
2011-08-18 21:50 [PATCH 0/5] ARM: davinci: introduce new board heliosv1 Ben Gardiner
` (3 preceding siblings ...)
2011-08-18 21:50 ` [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config Ben Gardiner
@ 2011-08-18 21:50 ` Ben Gardiner
2011-08-18 22:02 ` Felipe Balbi
4 siblings, 1 reply; 10+ messages in thread
From: Ben Gardiner @ 2011-08-18 21:50 UTC (permalink / raw)
To: linux-arm-kernel
Add support for the Nanometrics Helios Platform V1 Hardware. Initially
support includes only serial console and watchdog support.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
---
arch/arm/mach-davinci/Kconfig | 9 ++++
arch/arm/mach-davinci/Makefile | 1 +
arch/arm/mach-davinci/board-omapl138-heliosv1.c | 51 +++++++++++++++++++++++
3 files changed, 61 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-davinci/board-omapl138-heliosv1.c
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index c0deaca..21a8ce9 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -224,6 +224,15 @@ config MACH_OMAPL138_HAWKBOARD
Information of this board may be found at
http://www.hawkboard.org/
+config MACH_HELIOS_V1
+ bool "Nanometrics OMAPL-138 Helios V1 platform"
+ depends on ARCH_DAVINCI_DA850
+ help
+ Say Y here to select the Nanometrics OMAPL-138 Helios V1 platform.
+ This is a development system based on the DA850 EVM baseboard.
+ It is the first Helios hardware platform upon which other platforms in the
+ Helios product family are based.
+
config DAVINCI_MUX
bool "DAVINCI multiplexing support"
depends on ARCH_DAVINCI
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 9a01441..96d74c9 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += board-da850-evm.o
obj-$(CONFIG_MACH_TNETV107X) += board-tnetv107x-evm.o
obj-$(CONFIG_MACH_MITYOMAPL138) += board-mityomapl138.o
obj-$(CONFIG_MACH_OMAPL138_HAWKBOARD) += board-omapl138-hawk.o
+obj-$(CONFIG_MACH_HELIOS_V1) += board-omapl138-heliosv1.o
# Power Management
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
diff --git a/arch/arm/mach-davinci/board-omapl138-heliosv1.c b/arch/arm/mach-davinci/board-omapl138-heliosv1.c
new file mode 100644
index 0000000..73cc0a9
--- /dev/null
+++ b/arch/arm/mach-davinci/board-omapl138-heliosv1.c
@@ -0,0 +1,51 @@
+/*
+ * Nanometrics OMAPL-138 Helios V1 platform.
+ *
+ * Copyright (C) 2011 Nanometrics Inc.
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of
+ * any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/console.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <mach/cp_intc.h>
+#include <mach/da8xx.h>
+#include <mach/da850-reference.h>
+
+static __init void helios_v1_init(void)
+{
+ int ret;
+
+ da850_reference_serial_init();
+
+ ret = da8xx_register_watchdog();
+ if (ret)
+ pr_warning("%s: watchdog registration failed: %d\n",
+ __func__, ret);
+}
+
+#ifdef CONFIG_SERIAL_8250_CONSOLE
+static int __init helios_v1_console_init(void)
+{
+ if (!machine_is_helios_v1())
+ return 0;
+
+ return da850_reference_add_preferred_console();
+}
+console_initcall(helios_v1_console_init);
+#endif
+
+MACHINE_START(HELIOS_V1, "Nanometrics OMAPL-138 Helios V1 platform")
+ .boot_params = DA850_REFERENCE_BOOT_PARAMS,
+ .map_io = da850_reference_map_io,
+ .init_irq = cp_intc_init,
+ .timer = &davinci_timer,
+ .init_machine = helios_v1_init,
+MACHINE_END
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1
2011-08-18 21:50 ` [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1 Ben Gardiner
@ 2011-08-18 22:02 ` Felipe Balbi
0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2011-08-18 22:02 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Thu, Aug 18, 2011 at 05:50:51PM -0400, Ben Gardiner wrote:
> Add support for the Nanometrics Helios Platform V1 Hardware. Initially
> support includes only serial console and watchdog support.
>
> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
> Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
> ---
> arch/arm/mach-davinci/Kconfig | 9 ++++
> arch/arm/mach-davinci/Makefile | 1 +
> arch/arm/mach-davinci/board-omapl138-heliosv1.c | 51 +++++++++++++++++++++++
> 3 files changed, 61 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-davinci/board-omapl138-heliosv1.c
>
> diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
> index c0deaca..21a8ce9 100644
> --- a/arch/arm/mach-davinci/Kconfig
> +++ b/arch/arm/mach-davinci/Kconfig
> @@ -224,6 +224,15 @@ config MACH_OMAPL138_HAWKBOARD
> Information of this board may be found at
> http://www.hawkboard.org/
>
> +config MACH_HELIOS_V1
> + bool "Nanometrics OMAPL-138 Helios V1 platform"
> + depends on ARCH_DAVINCI_DA850
> + help
> + Say Y here to select the Nanometrics OMAPL-138 Helios V1 platform.
> + This is a development system based on the DA850 EVM baseboard.
> + It is the first Helios hardware platform upon which other platforms in the
> + Helios product family are based.
> +
> config DAVINCI_MUX
> bool "DAVINCI multiplexing support"
> depends on ARCH_DAVINCI
> diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
> index 9a01441..96d74c9 100644
> --- a/arch/arm/mach-davinci/Makefile
> +++ b/arch/arm/mach-davinci/Makefile
> @@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += board-da850-evm.o
> obj-$(CONFIG_MACH_TNETV107X) += board-tnetv107x-evm.o
> obj-$(CONFIG_MACH_MITYOMAPL138) += board-mityomapl138.o
> obj-$(CONFIG_MACH_OMAPL138_HAWKBOARD) += board-omapl138-hawk.o
> +obj-$(CONFIG_MACH_HELIOS_V1) += board-omapl138-heliosv1.o
>
> # Power Management
> obj-$(CONFIG_CPU_FREQ) += cpufreq.o
> diff --git a/arch/arm/mach-davinci/board-omapl138-heliosv1.c b/arch/arm/mach-davinci/board-omapl138-heliosv1.c
> new file mode 100644
> index 0000000..73cc0a9
> --- /dev/null
> +++ b/arch/arm/mach-davinci/board-omapl138-heliosv1.c
> @@ -0,0 +1,51 @@
> +/*
> + * Nanometrics OMAPL-138 Helios V1 platform.
> + *
> + * Copyright (C) 2011 Nanometrics Inc.
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2. This program is licensed "as is" without any warranty of
> + * any kind, whether express or implied.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/console.h>
> +#include <linux/gpio.h>
> +
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +
> +#include <mach/cp_intc.h>
> +#include <mach/da8xx.h>
> +#include <mach/da850-reference.h>
> +
> +static __init void helios_v1_init(void)
> +{
> + int ret;
> +
> + da850_reference_serial_init();
> +
> + ret = da8xx_register_watchdog();
> + if (ret)
> + pr_warning("%s: watchdog registration failed: %d\n",
> + __func__, ret);
> +}
> +
> +#ifdef CONFIG_SERIAL_8250_CONSOLE
> +static int __init helios_v1_console_init(void)
> +{
> + if (!machine_is_helios_v1())
> + return 0;
> +
> + return da850_reference_add_preferred_console();
> +}
> +console_initcall(helios_v1_console_init);
> +#endif
> +
> +MACHINE_START(HELIOS_V1, "Nanometrics OMAPL-138 Helios V1 platform")
> + .boot_params = DA850_REFERENCE_BOOT_PARAMS,
> + .map_io = da850_reference_map_io,
> + .init_irq = cp_intc_init,
> + .timer = &davinci_timer,
> + .init_machine = helios_v1_init,
> +MACHINE_END
since this also omapl138-based, can't you re-use the
board-omapl138-hawk.c board-file ? I mean, this is only initializing
console and that's it. What else does this board have ? Does it have
USB, that EMAC/MDIO device ?
To me it looks like you could re-use that board-file and just add a few
machine checks for the different part (??)
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110819/808bc325/attachment.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread