ARM: davinci: introduce new board heliosv1
Subsystems (3)
cover ARM: davinci: introduce new board heliosv1
In this series we introduce a new board type: the Nanometrics Helios hardware platform v1. Like the other da850/omapl138 boards in arch/arm/mach-davinci it shares lots of common data definitions. For example boot_params location and uart config are common to this new board and to the existing da850/omapl138 boards in the tree.
To combat to potential platform-data ARM bloat that we would otherwise add with the introduction of the new board type we propose the creation of a da850-reference module shared among the boards. The general idea is that the da850evm is a 'reference implementation' and as such many of the boards do re-use this reference so they can/should share the data since builds are headed towards multi-machine.
We first extract board setup data that is common to several of the omapl138/ da850 boards in 1,2,3,4. Then the new board type is introduced in 5.
Boot-tested this series on-top of branch master @ a0cb2d282a57fd33ae57af2f2092974c82111b77 ingit://gitorious.org/linux-davinci/linux-davinci.git on da850evm and heliosv1 hardware.
Ben Gardiner (5):
ARM: davinci: da850, omapl138: introduce shared da850 reference
components
ARM: davinci: da850, omapl138: share boot_params
ARM: davinci: da850, omapl138: share the preferred console
registration
ARM: davinci: da850, omapl138: share the davinci_uart_config
ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1
arch/arm/mach-davinci/Kconfig | 9 ++++ arch/arm/mach-davinci/Makefile | 4 +- arch/arm/mach-davinci/board-da850-evm.c | 18 ++----- arch/arm/mach-davinci/board-mityomapl138.c | 16 ++----- arch/arm/mach-davinci/board-omapl138-hawk.c | 18 ++----- arch/arm/mach-davinci/board-omapl138-heliosv1.c | 51 ++++++++++++++++++++ arch/arm/mach-davinci/da850-reference.c | 31 ++++++++++++ .../mach-davinci/include/mach/da850-reference.h | 20 ++++++++ 8 files changed, 128 insertions(+), 39 deletions(-) create mode 100644 arch/arm/mach-davinci/board-omapl138-heliosv1.c create mode 100644 arch/arm/mach-davinci/da850-reference.c create mode 100644 arch/arm/mach-davinci/include/mach/da850-reference.h
Signature · 1 line
1.7.4.1
PATCH 1/5 ARM: davinci: da850, omapl138: introduce shared da850 reference components
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.
--- 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
arch/arm/mach-davinci/Makefile +2 -1
@@ -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
arch/arm/mach-davinci/board-da850-evm.c +2 -6
@@ -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,
arch/arm/mach-davinci/board-mityomapl138.c +2 -6
@@ -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,
arch/arm/mach-davinci/board-omapl138-hawk.c +2 -6
@@ -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,
arch/arm/mach-davinci/da850-reference.c new file +15 -0
@@ -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 (); +}
arch/arm/mach-davinci/include/mach/da850-reference.h new file +14 -0
@@ -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 */
Signature · 1 line
1.7.4.1
PATCH 2/5 ARM: davinci: da850, omapl138: share boot_params
In reply to Ben GardinerExtract 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.
--- 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(-)
arch/arm/mach-davinci/board-da850-evm.c +1 -1
@@ -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,
arch/arm/mach-davinci/board-mityomapl138.c +1 -1
@@ -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,
arch/arm/mach-davinci/board-omapl138-hawk.c +1 -1
@@ -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,
arch/arm/mach-davinci/include/mach/da850-reference.h +4 -0
@@ -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 */
Signature · 1 line
1.7.4.1
PATCH 3/5 ARM: davinci: da850, omapl138: share the preferred console registration
In reply to Ben GardinerExtract 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.
--- 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(-)
arch/arm/mach-davinci/board-da850-evm.c +1 -1
@@ -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
arch/arm/mach-davinci/board-omapl138-hawk.c +1 -1
@@ -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
arch/arm/mach-davinci/da850-reference.c +7 -0
@@ -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" ); +}
arch/arm/mach-davinci/include/mach/da850-reference.h +1 -0
@@ -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 */
Signature · 1 line
1.7.4.1
PATCH 4/5 ARM: davinci: da850, omapl138: share the davinci_uart_config
In reply to Ben GardinerExtract 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.
--- 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(-)
arch/arm/mach-davinci/board-da850-evm.c +1 -5
@@ -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));
arch/arm/mach-davinci/board-mityomapl138.c +1 -5
@@ -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)
arch/arm/mach-davinci/board-omapl138-hawk.c +1 -5
@@ -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 ();
arch/arm/mach-davinci/da850-reference.c +9 -0
@@ -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); +}
arch/arm/mach-davinci/include/mach/da850-reference.h +1 -0
@@ -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 */
Signature · 1 line
1.7.4.1
PATCH 5/5 ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1
In reply to Ben GardinerAdd support for the Nanometrics Helios Platform V1 Hardware. Initially support includes only serial console and watchdog support.
--- 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
arch/arm/mach-davinci/Kconfig +9 -0
@@ -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
arch/arm/mach-davinci/Makefile +1 -0
@@ -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
arch/arm/mach-davinci/board-omapl138-heliosv1.c new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Re: [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components
In reply to Ben GardinerHi,
Quoted 6 lines · Ben Gardiner
arch/arm/mach-davinci/da850-reference.c new file +5
-0@@ -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
arch/arm/mach-davinci/da850-reference.c line 15
Quoted 10 lines
arch/arm/mach-davinci/da850-reference.c new file +10
-0+* 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.
Signature · 8 lines
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>
Re: [PATCH 2/5] ARM: davinci: da850, omapl138: share boot_params
In reply to Ben GardinerHi,
arch/arm/mach-davinci/include/mach/da850-reference.h line 14
Quoted 11 lines · Ben Gardiner
arch/arm/mach-davinci/include/mach/da850-reference.h +3
-0@@ -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)
why don't you define this at the same location where DA8XX_DDR_BASE is defined ??
Signature · 8 lines
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/5fa701c9/attachment.sig>
Re: [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config
In reply to Ben GardinerHi,
Quoted 7 lines · Ben Gardiner
arch/arm/mach-davinci/da850-reference.c +0
-0@@ -20,3 +20,12 @@ int da850_reference_add_preferred_console(void) {return add_preferred_console ("ttyS" ,2 ,"115200" );
arch/arm/mach-davinci/da850-reference.c int da850_reference_add_preferred_console(void) · line 31
Quoted 10 lines
arch/arm/mach-davinci/da850-reference.c +9
-0} + +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)
Signature · 8 lines
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>
Re: [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1
In reply to Ben GardinerHi,
Quoted 91 lines · Ben Gardiner
Add support for the Nanometrics Helios Platform V1 Hardware. Initially support includes only serial console and watchdog support.
Signed-off-by Ben Gardiner <[email protected]>Reviewed-by James Nuss <[email protected]>--- 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.carch/arm/mach-davinci/Kconfig +9
-0@@ -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_DAVINCIarch/arm/mach-davinci/Makefile +1
-0@@ -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.oarch/arm/mach-davinci/board-omapl138-heliosv1.c new file +41
-0@@ -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 (); +}
arch/arm/mach-davinci/board-omapl138-heliosv1.c line 51
Quoted 10 lines
arch/arm/mach-davinci/board-omapl138-heliosv1.c new file +10
-0+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 (??)
Quoted 8 lines
Signature · 7 lines
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/
Signature · 8 lines
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>