From db969e1100e8fb9bbefda7f6e5531f140b022a2e Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 5 Jun 2008 19:45:43 +0200 Subject: 015-OMAP-add-SDP3430 [Patch 15/17] U-Boot-V2:ARM:OMAP3: Add support for SDP3430 support files This patch introduces support for OMAP Boards common infrastructure. Signed-off-by: Nishanth Menon --- board/omap/Kconfig | 52 +++++++++++++++++++++++++++++++++++++++ board/omap/Makefile | 25 +++++++++++++++++++ board/omap/config.h | 38 +++++++++++++++++++++++++++++ board/omap/env/bin/init | 1 + board/omap/platform.S | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 board/omap/Kconfig create mode 100644 board/omap/Makefile create mode 100644 board/omap/config.h create mode 100644 board/omap/env/bin/init create mode 100644 board/omap/platform.S (limited to 'board') diff --git a/board/omap/Kconfig b/board/omap/Kconfig new file mode 100644 index 0000000000..fee4856be4 --- /dev/null +++ b/board/omap/Kconfig @@ -0,0 +1,52 @@ +# OMAP based Board Specific Configuration file +# +# (C) Copyright 2008 +# OMAP Architecture specific features +# Texas Instruments, +# Nishanth Menon +# +# 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 + +config ARCH_TEXT_BASE + hex + default 0x80e80000 if MACH_OMAP343xSDP + +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 diff --git a/board/omap/Makefile b/board/omap/Makefile new file mode 100644 index 0000000000..f4cc028a4b --- /dev/null +++ b/board/omap/Makefile @@ -0,0 +1,25 @@ +# OMAP Board Specific Makefile +# +# (C) Copyright 2008 +# OMAP Architecture specific features +# Texas Instruments, +# Nishanth Menon +# +# 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 + diff --git a/board/omap/config.h b/board/omap/config.h new file mode 100644 index 0000000000..28b62730e4 --- /dev/null +++ b/board/omap/config.h @@ -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, + * Nishanth Menon + * + * 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 */ diff --git a/board/omap/env/bin/init b/board/omap/env/bin/init new file mode 100644 index 0000000000..224a6b40be --- /dev/null +++ b/board/omap/env/bin/init @@ -0,0 +1 @@ +# Dummy Init environment script diff --git a/board/omap/platform.S b/board/omap/platform.S new file mode 100644 index 0000000000..c6ce875112 --- /dev/null +++ b/board/omap/platform.S @@ -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, + * Nishanth Menon + * + * 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 +#include + +#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 */ -- cgit v1.2.3