From patchwork Mon Feb 28 11:46:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aneesh V X-Patchwork-Id: 229 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:03 -0000 Delivered-To: patches@linaro.org Received: by 10.224.19.208 with SMTP id c16cs91648qab; Mon, 28 Feb 2011 03:46:29 -0800 (PST) Received: by 10.100.126.14 with SMTP id y14mr2320494anc.31.1298893589539; Mon, 28 Feb 2011 03:46:29 -0800 (PST) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by mx.google.com with ESMTPS id c24si8113224ana.184.2011.02.28.03.46.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Feb 2011 03:46:29 -0800 (PST) Received-SPF: pass (google.com: domain of aneesh@ti.com designates 192.94.94.40 as permitted sender) client-ip=192.94.94.40; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aneesh@ti.com designates 192.94.94.40 as permitted sender) smtp.mail=aneesh@ti.com Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1SBkPhA005390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Feb 2011 05:46:28 -0600 Received: from localhost (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p1SBkPDj011788; Mon, 28 Feb 2011 17:16:25 +0530 (IST) From: Aneesh V To: u-boot@lists.denx.de Cc: aneesh@ti.com, x-loader@googlegroups.com, patches@linaro.org, john.rigby@linaro.org Subject: [PATCH 09/22] omap: add spl support Date: Mon, 28 Feb 2011 17:16:18 +0530 Message-Id: <1298893591-17636-10-git-send-email-aneesh@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1298893591-17636-1-git-send-email-aneesh@ti.com> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> Add the basic spl framework and linker script common for OMAP3/4 platforms. Signed-off-by: Aneesh V --- spl/board/ti/spl-omap.c | 47 ++++++++++++++++++++++++++++++++++ spl/board/ti/spl-omap.lds | 62 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 0 deletions(-) create mode 100644 spl/board/ti/spl-omap.c create mode 100644 spl/board/ti/spl-omap.lds diff --git a/spl/board/ti/spl-omap.c b/spl/board/ti/spl-omap.c new file mode 100644 index 0000000..0e08f4f --- /dev/null +++ b/spl/board/ti/spl-omap.c @@ -0,0 +1,47 @@ +/* + * + * Clock initialization for OMAP4 + * + * (C) Copyright 2010 + * Texas Instruments, + * + * Aneesh V + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 +#include +#include + +/* Define global data structure pointer to it*/ +gd_t gdata __attribute__ ((section(".data"))); +bd_t bdata __attribute__ ((section(".data"))); +gd_t *gd = &gdata; + +void board_init_f(ulong dummy) +{ + relocate_code(CONFIG_SYS_SPL_STACK, &gdata, CONFIG_SYS_SPL_TEXT_BASE); +} + +void board_init_r(gd_t *id, ulong dummy) +{ + for (;;) + ; +} diff --git a/spl/board/ti/spl-omap.lds b/spl/board/ti/spl-omap.lds new file mode 100644 index 0000000..27b5295 --- /dev/null +++ b/spl/board/ti/spl-omap.lds @@ -0,0 +1,62 @@ +/* + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * (C) Copyright 2010 + * Texas Instruments, + * Aneesh V + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 + */ + +MEMORY { .sram : ORIGIN = CONFIG_SYS_SPL_TEXT_BASE,\ + LENGTH = CONFIG_SYS_SPL_MAX_SIZE } +MEMORY { .sdram : ORIGIN = CONFIG_SYS_SPL_BSS_START_ADDR, \ + LENGTH = CONFIG_SYS_SPL_BSS_MAX_SIZE } + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + .text : + { + . = ALIGN(32); + __start = .; + start.o (.text) + *(.text*) + } >.sram + + . = ALIGN(4); + .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram + + . = ALIGN(4); + .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram + . = ALIGN(4); + __image_copy_end = .; + + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + _end = .; + } >.sdram +}