Add initial support for OMAP3 IGEP module
Subsystems (3)
v2 cover Add initial support for OMAP3 IGEP module
Hello,
This is the version 2 of patch series to introduce the OMAP3 IGEP module support. Thanks for your comments.
Changes since v1:
- add DEBUG_LL/EARLY_PRINTK entry
arch/arm/mach-omap2/Kconfig | 5 + arch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/board-igep0030.c | 412 ++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/uncompress.h | 1 + 4 files changed, 420 insertions(+), 0 deletions(-)
Kind regards,
Enric
PATCH v2 1/1 omap3: Add minimal OMAP3 IGEP module support.
The OMAP3 IGEP module is a low-power, high performance production-ready system-on-module (SOM) based on TI's OMAP3 family. More about this board at www.igep.es.
--- arch/arm/mach-omap2/Kconfig | 5 + arch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/board-igep0030.c | 412 ++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/uncompress.h | 1 + 4 files changed, 420 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-igep0030.c
arch/arm/mach-omap2/Kconfig +5 -0
@@ -220,6 +220,11 @@ config MACH_IGEP0020 default y select OMAP_PACKAGE_CBB +config MACH_IGEP0030 + bool "IGEP OMAP3 module" + depends on ARCH_OMAP3 + select OMAP_PACKAGE_CBB + config MACH_SBC3530 bool "OMAP3 SBC STALKER board" depends on ARCH_OMAP3
arch/arm/mach-omap2/Makefile +2 -0
@@ -148,6 +148,8 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ hsmmc.o obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ hsmmc.o +obj-$(CONFIG_MACH_IGEP0030) += board-igep0030.o \ + hsmmc.o obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
arch/arm/mach-omap2/board-igep0030.c new file +412 -0
412 lines not on this page · raw message
arch/arm/plat-omap/include/plat/uncompress.h +1 -0
@@ -143,6 +143,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)/* omap3 based boards using UART3 */ DEBUG_LL_OMAP3 (3 , cm_t35);DEBUG_LL_OMAP3 (3 , igep0020); +DEBUG_LL_OMAP3 (3 , igep0030);DEBUG_LL_OMAP3 (3 , nokia_rx51);DEBUG_LL_OMAP3 (3 , omap3517evm);DEBUG_LL_OMAP3 (3 , omap3_beagle);
Signature · 1 line
1.7.0.4
PATCH v2 1/1 omap3: Add minimal OMAP3 IGEP module support.
Hi Enric,
Quoted 3 lines · On Saturday 02 October 2010 11:49:55 Enric Balletbo i Serra wrote:
The OMAP3 IGEP module is a low-power, high performance production-ready system-on-module (SOM) based on TI's OMAP3 family. More about this board at www.igep.es.
[snip]
Quoted 5 lines
(quoted diff) +0
-0
b/arch/arm/mach-omap2/board-igep0030.cnew file mode 100644 index 0000000..7313ef5arch/arm/mach-omap2/board-igep0030.c new file +0
-0
[snip]
arch/arm/mach-omap2/board-igep0030.c line 101
Quoted 12 lines
arch/arm/mach-omap2/board-igep0030.c new file +12
-0+static int igep3_onenand_setup (void __iomem *onenand_base,int freq) +{ +/* nothing is required to be setup for onenand as of now */ +return 0 ; +} + +static struct omap_onenand_platform_data igep3_onenand_pdata = { + .parts = igep3_onenand_partitions, + .nr_parts =ARRAY_SIZE (igep3_onenand_partitions), + .onenand_setup = igep3_onenand_setup, + .dma_channel =-1 ,/* disable DMA in OMAP OneNAND driver */ +};
You can just set onenand_setup to NULL instead of adding a no-op function.
[snip]
arch/arm/mach-omap2/board-igep0030.c line 116
Quoted 6 lines
arch/arm/mach-omap2/board-igep0030.c new file +6
-0+void __init igep3_flash_init (void ) +{ +u8 cs =0 ; +u8 onenandcs =GPMC_CS_NUM +1 ; + +while (cs <GPMC_CS_NUM ) {
What's wrong with "for (cs = 0; cs < GPMC_CS_NUM; cs++)" ? :-)
arch/arm/mach-omap2/board-igep0030.c line 117
Quoted 1 line
arch/arm/mach-omap2/board-igep0030.c new file +1
-0+u32 ret =0 ;
No need to initialize ret to 0, you're assigning it right after.
Quoted 10 lines
arch/arm/mach-omap2/board-igep0030.c new file +10
-0+ ret =gpmc_cs_read_reg (cs,GPMC_CS_CONFIG1 ); + +/* Check if NAND/oneNAND is configured */ +if ((ret &0xC00 ) ==0x800 ) +/* NAND found */ +pr_err ("IGEP3: Unsupported NAND found\n" ); +else { + ret =gpmc_cs_read_reg (cs,GPMC_CS_CONFIG7 ); +if ((ret &0x3F ) == (ONENAND_MAP >>24 )) +/* ONENAND found */
arch/arm/mach-omap2/board-igep0030.c line 137
Quoted 10 lines
arch/arm/mach-omap2/board-igep0030.c new file +10
-0+ onenandcs = cs; + } + cs++; + } +if (onenandcs >GPMC_CS_NUM ) { +pr_err ("IGEP3: Unable to find configuration in GPMC\n" ); +return ; + } + +if (onenandcs <GPMC_CS_NUM ) {
No need to check for onenandcs < GPMC_CS_NUM here, it will always be true.
Quoted 5 lines
arch/arm/mach-omap2/board-igep0030.c new file +5
-0+ igep3_onenand_pdata.cs = onenandcs; +if (platform_device_register (&igep3_onenand_device) <0 ) +pr_err ("IGEP3: Unable to register OneNAND device\n" ); + } +}
[snip]
arch/arm/mach-omap2/board-igep0030.c line 301
Quoted 4 lines
arch/arm/mach-omap2/board-igep0030.c new file +4
-0+static void __init igep3_init_irq (void ) +{ + omap_board_config = igep3_config; + omap_board_config_size =ARRAY_SIZE (igep3_config);
No need for this. omap_board_config_size is implicitly initialized to 0 in plat-omap/common.c so get_config() won't dereference omap_board_config. You can remove the empty igep3_config array.
Quoted 4 lines
arch/arm/mach-omap2/board-igep0030.c new file +4
-0+omap2_init_common_hw (m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params); +omap_init_irq (); +omap_gpio_init (); +}
[snip]
Signature · 3 lines
Regards, Laurent Pinchart