From a7fb4200cccec4f1e521b803044714901f7bc410 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 16 Oct 2012 13:44:25 +0000 Subject: [boot] move boot related packages to their own folder git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33781 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../boot/uboot-xburst/files/board/sakc/Makefile | 38 +++++++++ .../boot/uboot-xburst/files/board/sakc/config.mk | 31 +++++++ package/boot/uboot-xburst/files/board/sakc/sakc.c | 94 ++++++++++++++++++++++ .../uboot-xburst/files/board/sakc/u-boot-nand.lds | 63 +++++++++++++++ .../boot/uboot-xburst/files/board/sakc/u-boot.lds | 63 +++++++++++++++ 5 files changed, 289 insertions(+) create mode 100644 package/boot/uboot-xburst/files/board/sakc/Makefile create mode 100644 package/boot/uboot-xburst/files/board/sakc/config.mk create mode 100644 package/boot/uboot-xburst/files/board/sakc/sakc.c create mode 100644 package/boot/uboot-xburst/files/board/sakc/u-boot-nand.lds create mode 100644 package/boot/uboot-xburst/files/board/sakc/u-boot.lds (limited to 'package/boot/uboot-xburst/files/board/sakc') diff --git a/package/boot/uboot-xburst/files/board/sakc/Makefile b/package/boot/uboot-xburst/files/board/sakc/Makefile new file mode 100644 index 0000000000..470447d450 --- /dev/null +++ b/package/boot/uboot-xburst/files/board/sakc/Makefile @@ -0,0 +1,38 @@ +# +# (C) Copyright 2006 +# Ingenic Semiconductor, +# +# 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 $(TOPDIR)/config.mk + +LIB = lib$(BOARD).a + +OBJS = $(BOARD).o +SOBJS = + +$(LIB): .depend $(OBJS) $(SOBJS) + $(AR) crv $@ $(OBJS) $(SOBJS) + +######################################################################### + +.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) + $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ + +sinclude .depend + +######################################################################### diff --git a/package/boot/uboot-xburst/files/board/sakc/config.mk b/package/boot/uboot-xburst/files/board/sakc/config.mk new file mode 100644 index 0000000000..b2549587ed --- /dev/null +++ b/package/boot/uboot-xburst/files/board/sakc/config.mk @@ -0,0 +1,31 @@ +# +# (C) Copyright 2006 Qi Hardware, Inc. +# Author: Xiangfu Liu +# +# 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 +# + +# +# SAKC Board +# + +ifndef TEXT_BASE +# ROM version +# TEXT_BASE = 0x88000000 + +# RAM version +TEXT_BASE = 0x80100000 +endif diff --git a/package/boot/uboot-xburst/files/board/sakc/sakc.c b/package/boot/uboot-xburst/files/board/sakc/sakc.c new file mode 100644 index 0000000000..85763c7546 --- /dev/null +++ b/package/boot/uboot-xburst/files/board/sakc/sakc.c @@ -0,0 +1,94 @@ +/* + * Authors: Xiangfu Liu + * + * 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 + * 3 of the License, or (at your option) any later version. + */ + +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static void gpio_init(void) +{ + /* + * Initialize NAND Flash Pins + */ + __gpio_as_nand(); + + /* + * Initialize SDRAM pins + */ + __gpio_as_sdram_16bit_4725(); + + /* + * Initialize UART0 pins + */ + __gpio_as_uart0(); + + /* + * Initialize LCD pins + */ + __gpio_as_lcd_18bit(); + + /* + * Initialize MSC pins + */ + __gpio_as_msc(); + + /* + * Initialize SSI pins + */ + __gpio_as_ssi(); + + /* + * Initialize I2C pins + */ + __gpio_as_i2c(); + + /* + * Initialize MSC pins + */ + __gpio_as_msc(); + + /* + * Initialize Other pins + */ + __gpio_as_input(GPIO_SD_DETECT); + __gpio_disable_pull(GPIO_SD_DETECT); +} +/* TODO SAKC +static void cpm_init(void) +{ + __cpm_stop_ipu(); + __cpm_stop_cim(); + __cpm_stop_i2c(); + __cpm_stop_ssi(); + __cpm_stop_uart1(); + __cpm_stop_sadc(); + __cpm_stop_uhc(); + __cpm_stop_aic1(); + __cpm_stop_aic2(); +}*/ + +void board_early_init(void) +{ + gpio_init(); + //cpm_init(); //TODO SAKC +} + +/* U-Boot common routines */ + +int checkboard (void) +{ + + printf("Board: SAKC (Ingenic XBurst Jz4725 SoC, Speed %d MHz)\n", + gd->cpu_clk/1000000); + + return 0; /* success */ +} diff --git a/package/boot/uboot-xburst/files/board/sakc/u-boot-nand.lds b/package/boot/uboot-xburst/files/board/sakc/u-boot-nand.lds new file mode 100644 index 0000000000..a15a96ec82 --- /dev/null +++ b/package/boot/uboot-xburst/files/board/sakc/u-boot-nand.lds @@ -0,0 +1,63 @@ +/* + * (C) Copyright 2006 + * Ingenic Semiconductor, + * + * 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 + */ + +OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips") + +OUTPUT_ARCH(mips) +ENTRY(_start) +SECTIONS +{ + . = 0x00000000; + + . = ALIGN(4); + .text : + { + *(.text) + } + + . = ALIGN(4); + .rodata : { *(.rodata) } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + .sdata : { *(.sdata) } + + _gp = ALIGN(16); + + __got_start = .; + .got : { *(.got) } + __got_end = .; + + .sdata : { *(.sdata) } + + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + uboot_end_data = .; + num_got_entries = (__got_end - __got_start) >> 2; + + . = ALIGN(4); + .sbss : { *(.sbss) } + .bss : { *(.bss) } + uboot_end = .; +} diff --git a/package/boot/uboot-xburst/files/board/sakc/u-boot.lds b/package/boot/uboot-xburst/files/board/sakc/u-boot.lds new file mode 100644 index 0000000000..a15a96ec82 --- /dev/null +++ b/package/boot/uboot-xburst/files/board/sakc/u-boot.lds @@ -0,0 +1,63 @@ +/* + * (C) Copyright 2006 + * Ingenic Semiconductor, + * + * 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 + */ + +OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips") + +OUTPUT_ARCH(mips) +ENTRY(_start) +SECTIONS +{ + . = 0x00000000; + + . = ALIGN(4); + .text : + { + *(.text) + } + + . = ALIGN(4); + .rodata : { *(.rodata) } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + .sdata : { *(.sdata) } + + _gp = ALIGN(16); + + __got_start = .; + .got : { *(.got) } + __got_end = .; + + .sdata : { *(.sdata) } + + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + uboot_end_data = .; + num_got_entries = (__got_end - __got_start) >> 2; + + . = ALIGN(4); + .sbss : { *(.sbss) } + .bss : { *(.bss) } + uboot_end = .; +} -- cgit v1.2.3