[U-Boot-Users] [Patch 15/17] U-Boot-V2:ARM:OMAP3:SDP3430: Add support for SDP3430 support files

Menon, Nishanth x0nishan at ti.com
Wed May 21 18:30:43 CEST 2008


This patch introduces support for infrastructure required for SDP3430.

Signed-off-by: Nishanth Menon<x0nishan at ti.com>

---
 arch/arm/configs/omap3430_sdp3430_per_uart_defconfig |  184 +++++++++++++++++++
 arch/arm/mach-omap/Kconfig                           |   33 +++
 board/omap/Kconfig                                   |   48 ++++
 board/omap/Makefile                                  |   25 ++
 board/omap/config.h                                  |   38 +++
 board/omap/env/bin/init                              |    1 
 board/omap/platform.S                                |   65 ++++++
 7 files changed, 392 insertions(+), 2 deletions(-)

Index: u-boot-v2.git/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig	2008-05-21 10:45:46.000000000 -0500
@@ -0,0 +1,184 @@
+#
+# Automatically generated make config: don't edit
+# U-Boot version: 2.0.0-rc5-git
+# Wed May 21 10:45:02 2008
+#
+CONFIG_ARCH_TEXT_BASE=0x40200000
+CONFIG_BOARDINFO="Texas Instrument's SDP343x"
+# CONFIG_BOARD_LINKER_SCRIPT is not set
+CONFIG_GENERIC_LINKER_SCRIPT=y
+CONFIG_ARM=y
+CONFIG_ARMCORTEXA8=y
+CONFIG_ARCH_OMAP=y
+# CONFIG_MACH_MX1ADS is not set
+# CONFIG_MACH_SCB9328 is not set
+# CONFIG_MACH_PCM038 is not set
+# CONFIG_MACH_IMX27ADS is not set
+# CONFIG_MACH_ECO920 is not set
+# CONFIG_MACH_NXDB500 is not set
+# CONFIG_MACH_PCM037 is not set
+CONFIG_MACH_OMAP=y
+
+#
+# OMAP Features
+#
+CONFIG_ARCH_OMAP3=y
+CONFIG_OMAP_CONFIG_STACKSIZE=0x00002000
+CONFIG_OMAP_MALLOC_LEN=0x00002000
+CONFIG_OMAP_CLOCK_ALL=y
+CONFIG_OMAP_CLOCK_SOURCE_S32K=y
+CONFIG_OMAP3_CLOCK_CONFIG=y
+# CONFIG_OMAP3_COPY_CLOCK_SRAM is not set
+
+#
+# OMAP Platform Features
+#
+CONFIG_MACH_OMAP343xSDP=y
+# CONFIG_MACH_OMAP_ADVANCED_MUX is not set
+
+#
+# Arm specific settings
+#
+# CONFIG_CMDLINE_TAG is not set
+# CONFIG_SETUP_MEMORY_TAGS is not set
+# CONFIG_INITRD_TAG is not set
+CONFIG_MACH_CAN_MODIFY_MALLOC_START=y
+CONFIG_MALLOC_START_MODIFY=y
+CONFIG_MALLOC_START=0x87FFFC00
+# CONFIG_ARMCORTEXA8_DCACHE_SKIP is not set
+CONFIG_HAS_KALLSYMS=y
+CONFIG_HAS_MODULES=y
+# CONFIG_CMD_MEMORY is not set
+
+#
+# General Settings
+#
+CONFIG_TEXT_BASE=0x40200000
+CONFIG_BROKEN=y
+# CONFIG_EXPERIMENTAL is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_MACH_HAS_LOWLEVEL_INIT=y
+CONFIG_MACH_DO_LOWLEVEL_INIT=y
+CONFIG_ARCH_HAS_LOWLEVEL_INIT=y
+CONFIG_PROMPT="X-load 343x> "
+CONFIG_BAUDRATE=115200
+# CONFIG_CMDLINE_EDITING is not set
+CONFIG_SIMPLE_READLINE=y
+# CONFIG_LONGHELP is not set
+CONFIG_CBSIZE=1024
+CONFIG_MAXARGS=16
+# CONFIG_SHELL_HUSH is not set
+CONFIG_SHELL_SIMPLE=y
+# CONFIG_ERRNO_MESSAGES is not set
+# CONFIG_TIMESTAMP is not set
+CONFIG_CONSOLE_ACTIVATE_FIRST=y
+# CONFIG_OF_FLAT_TREE is not set
+# CONFIG_PARTITION is not set
+# CONFIG_DEFAULT_ENVIRONMENT is not set
+
+#
+# Debugging
+#
+CONFIG_DEBUG_INFO=y
+# CONFIG_ENABLE_FLASH_NOISE is not set
+# CONFIG_ENABLE_PARTITION_NOISE is not set
+# CONFIG_ENABLE_DEVICE_NOISE is not set
+
+#
+# Commands
+#
+
+#
+# scripting
+#
+# CONFIG_CMD_EDIT is not set
+# CONFIG_CMD_EXEC is not set
+# CONFIG_CMD_SLEEP is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_LOADENV is not set
+# CONFIG_CMD_EXPORT is not set
+# CONFIG_CMD_PRINTENV is not set
+# CONFIG_CMD_HELP is not set
+# CONFIG_CMD_READLINE is not set
+
+#
+# file commands
+#
+# CONFIG_CMD_LS is not set
+# CONFIG_CMD_RM is not set
+# CONFIG_CMD_CAT is not set
+# CONFIG_CMD_MKDIR is not set
+# CONFIG_CMD_RMDIR is not set
+# CONFIG_CMD_CP is not set
+# CONFIG_CMD_PWD is not set
+# CONFIG_CMD_CD is not set
+# CONFIG_CMD_MOUNT is not set
+# CONFIG_CMD_UMOUNT is not set
+
+#
+# console
+#
+# CONFIG_CMD_CLEAR is not set
+# CONFIG_CMD_ECHO is not set
+# CONFIG_CMD_SPLASH is not set
+
+#
+# memory
+#
+CONFIG_LOAD_ADDR=0x80000000
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADY is not set
+# CONFIG_CMD_LOADS is not set
+# CONFIG_CMD_MEMINFO is not set
+# CONFIG_CMD_CRC is not set
+# CONFIG_CMD_MTEST is not set
+
+#
+# flash
+#
+# CONFIG_CMD_FLASH is not set
+
+#
+# booting
+#
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_RESET is not set
+CONFIG_CMD_GO=y
+# CONFIG_CMD_TIMEOUT is not set
+# CONFIG_CMD_PARTITION is not set
+# CONFIG_NET is not set
+
+#
+# Drivers
+#
+
+#
+# serial drivers
+#
+CONFIG_DRIVER_SERIAL_NS16550=y
+# CONFIG_DRIVER_SERIAL_NS16550_REG_SIZE_8_BITS is not set
+# CONFIG_DRIVER_SERIAL_NS16550_REG_SIZE_16_BITS is not set
+# CONFIG_DRIVER_SERIAL_NS16550_REG_SIZE_32_BITS is not set
+CONFIG_DRIVER_SERIAL_NS16550_REG_SIZE_8_BITS_PAD_TO_32=y
+# CONFIG_DRIVER_SERIAL_NS16550_REG_SIZE_8_BITS_PAD_TO_64 is not set
+CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
+
+#
+# SPI drivers
+#
+# CONFIG_SPI is not set
+
+#
+# flash drivers
+#
+# CONFIG_DRIVER_CFI is not set
+# CONFIG_DRIVER_CFI_OLD is not set
+# CONFIG_NAND is not set
+
+#
+# Filesystem support
+#
+# CONFIG_FS_CRAMFS is not set
+# CONFIG_FS_RAMFS is not set
+# CONFIG_FS_DEVFS is not set
+CONFIG_CRC16=y
Index: u-boot-v2.git/board/omap/Kconfig
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/board/omap/Kconfig	2008-05-21 10:44:40.000000000 -0500
@@ -0,0 +1,48 @@
+# OMAP based Board Specific Configuration file
+#
+# (C) Copyright 2008
+# OMAP Architecture specific features
+# Texas Instruments, <www.ti.com>
+# Nishanth Menon <x0nishan at ti.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+
+menu "OMAP Platform Features"
+	depends on MACH_OMAP
+
+config BOARDINFO
+	default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP
+
+choice
+	prompt "Select OMAP platform"
+
+config MACH_OMAP343xSDP
+	bool "Texas Instrument's SDP343x"
+ 	select MACH_HAS_LOWLEVEL_INIT
+ 	select OMAP_CLOCK_ALL
+	help
+	  Say Y here if you are using SDP343x platform
+endchoice
+
+config MACH_OMAP_ADVANCED_MUX
+	bool "Enable advanced pin muxing"
+	depends on MACH_OMAP343xSDP
+	default n
+	help
+	  Say Y here if you would like to have complete pin muxing to be
+	  done at boot time
+
+endmenu
Index: u-boot-v2.git/board/omap/Makefile
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/board/omap/Makefile	2008-05-21 10:44:40.000000000 -0500
@@ -0,0 +1,25 @@
+# OMAP Board Specific Makefile
+#
+# (C) Copyright 2008
+# OMAP Architecture specific features
+# Texas Instruments, <www.ti.com>
+# Nishanth Menon <x0nishan at ti.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+
+obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += platform.o
+obj-$(CONFIG_MACH_OMAP343xSDP) += board-sdp343x.o
+
Index: u-boot-v2.git/board/omap/config.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/board/omap/config.h	2008-05-21 10:44:40.000000000 -0500
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief provide a wrapper for standard malloc and stack size defines
+ *
+ * FileName: board/omap/config.h
+ *
+ * Standard defines should be configurable for us to move Stack and malloc
+ * areas around this defines some basics for that
+ */
+/*
+ * (C) Copyright 2006-2008
+ * Texas Instruments, <www.ti.com>
+ * Nishanth Menon <x0nishan at ti.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#ifndef __MACH_OMAP_CONFIG_H
+#define __MACH_OMAP_CONFIG_H
+
+/** define CFG_MALLOC_LEN from Kconfig define */
+#define CFG_MALLOC_LEN     CONFIG_OMAP_MALLOC_LEN
+/** define CONFIG_STACKSIZE from Kconfig define */
+#define CONFIG_STACKSIZE   CONFIG_OMAP_CONFIG_STACKSIZE
+
+#endif /* __MACH_OMAP_CONFIG_H */
Index: u-boot-v2.git/board/omap/platform.S
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/board/omap/platform.S	2008-05-21 10:44:40.000000000 -0500
@@ -0,0 +1,65 @@
+/**
+ * @file
+ * @brief Wrapper to call board level initialization routine
+ *
+ * FileName: board/omap/platform.S
+ *
+ * board_init_lowlevel is defined here. This calls board_init which
+ * is linked to the binary - the board_init only has a SRAM stack.
+ * so it needs to be careful about the usage of global variables
+ * and the likes. Enabled only if CONFIG_MACH_DO_LOWLEVEL_INIT is
+ * defined
+ */
+/*
+ * (C) Copyright 2006-2008
+ * Texas Instruments, <www.ti.com>
+ * Nishanth Menon <x0nishan at ti.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <config.h>
+#include <asm/arch/silicon.h>
+
+#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT
+/**
+ * @fn void board_init_lowlevel(void)
+ *
+ * @brief This provides a assembly wrapper setting up SRAM before calling
+ * board_init
+ *
+ * @return void
+ */
+.globl board_init_lowlevel
+board_init_lowlevel:
+	/* Setup a temporary stack so that we can call C functions
+	 * Yes. this might have been already done by arch code.
+	 * No harm in being a bit redundant to avoid future complications
+	 */
+	ldr	sp,	SRAM_STACK
+        str     ip,	[sp]    /* stash old link register */
+        str     lr,	[sp]    /* stash current link register */
+	mov	ip,	lr	/* save link reg across call */
+	/* Do the pin muxes, sdram init etc..board-xxx.c */
+	bl	board_init
+        ldr     lr,	[sp]    /* restore current link register */
+        ldr     ip,	[sp]    /* restore save ip */
+	/* back to arch calling code */
+	mov	pc,	lr
+SRAM_STACK:
+	.word	OMAP_SRAM_STACK
+
+#endif /* CONFIG_MACH_DO_LOWLEVEL_INIT */
Index: u-boot-v2.git/arch/arm/mach-omap/Kconfig
===================================================================
--- u-boot-v2.git.orig/arch/arm/mach-omap/Kconfig	2008-05-21 10:44:40.000000000 -0500
+++ u-boot-v2.git/arch/arm/mach-omap/Kconfig	2008-05-21 10:44:40.000000000 -0500
@@ -30,6 +30,7 @@
 	bool "OMAP3"
 	select ARMCORTEXA8
 	select ARCH_HAS_LOWLEVEL_INIT
+	select OMAP_CLOCK_SOURCE_S32K
 	help
 	  Say Y here if you are using Texas Instrument's OMAP343x based platform
 
@@ -56,10 +57,38 @@
 	help
 	  Select the load address
 
+### Generic Clock configurations to be enabled by Mach - invisible to enable.
+config OMAP_CLOCK_UART
+	bool
+config OMAP_CLOCK_UART2
+	bool
+config OMAP_CLOCK_UART3
+	bool
+config OMAP_CLOCK_I2C
+	bool
+
+# Blind enable all possible clocks.. think twice before you do this.
+config OMAP_CLOCK_ALL
+	bool
+
+config OMAP_CLOCK_SOURCE_S32K
+	bool
+
 config OMAP3_CLOCK_CONFIG
-	depends on ARCH_OMAP
-	bool "Clock Configuration"
+	prompt "Clock Configuration"
+	bool
+	depends on ARCH_OMAP3
+	default y
 	help
 	  Say Y here if you like to have OMAP3 Clock configuration done.
 
+config OMAP3_COPY_CLOCK_SRAM
+	prompt "SRAM copy of Clock code"
+	bool
+	depends on OMAP3_CLOCK_CONFIG
+	default y
+	help
+	  Say Y here if you like to have initial OMAP3 Clock configuration done from SRAM.
+
+source board/omap/Kconfig
 endmenu
Index: u-boot-v2.git/board/omap/env/bin/init
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ u-boot-v2.git/board/omap/env/bin/init	2008-05-21 10:44:40.000000000 -0500
@@ -0,0 +1 @@
+# Dummy Init environment script




More information about the U-Boot mailing list