mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
this patch add uboot-xburst package
uboot-xburst-avt2 uboot-xburst-n516 uboot-xburst-qi_lb60 uboot-xburst-sakc Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
This commit is contained in:
40
package/uboot-xburst/files/board/xburst/n516/Makefile
Normal file
40
package/uboot-xburst/files/board/xburst/n516/Makefile
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
#
|
||||
# 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 = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS = $(BOARD).o flash.o
|
||||
|
||||
OBJS = $(addprefix $(obj),$(COBJS))
|
||||
SOBJS =
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(AR) crv $@ $(OBJS) $(SOBJS)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
33
package/uboot-xburst/files/board/xburst/n516/config.mk
Normal file
33
package/uboot-xburst/files/board/xburst/n516/config.mk
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
#
|
||||
# Hanvon n516 e-book, MIPS32 core
|
||||
#
|
||||
|
||||
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||
|
||||
ifndef TEXT_BASE
|
||||
# ROM version
|
||||
TEXT_BASE = 0x88000000
|
||||
|
||||
# RAM version
|
||||
#TEXT_BASE = 0x80100000
|
||||
endif
|
||||
50
package/uboot-xburst/files/board/xburst/n516/flash.c
Normal file
50
package/uboot-xburst/files/board/xburst/n516/flash.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 <common.h>
|
||||
|
||||
flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* flash_init()
|
||||
*
|
||||
* sets up flash_info and returns size of FLASH (bytes)
|
||||
*/
|
||||
unsigned long flash_init (void)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
int flash_erase (flash_info_t * info, int s_first, int s_last)
|
||||
{
|
||||
printf ("flash_erase not implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void flash_print_info (flash_info_t * info)
|
||||
{
|
||||
printf ("flash_print_info not implemented\n");
|
||||
}
|
||||
|
||||
int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
|
||||
{
|
||||
printf ("write_buff not implemented\n");
|
||||
return (-1);
|
||||
}
|
||||
126
package/uboot-xburst/files/board/xburst/n516/n516.c
Normal file
126
package/uboot-xburst/files/board/xburst/n516/n516.c
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 <common.h>
|
||||
#include <command.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/jz4740.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/cacheops.h>
|
||||
|
||||
void _machine_restart(void)
|
||||
{
|
||||
__wdt_select_extalclk();
|
||||
__wdt_select_clk_div64();
|
||||
__wdt_set_data(100);
|
||||
__wdt_set_count(0);
|
||||
__tcu_start_wdt_clock();
|
||||
__wdt_start();
|
||||
while(1);
|
||||
|
||||
}
|
||||
|
||||
static void gpio_init(void)
|
||||
{
|
||||
|
||||
REG_GPIO_PXPES(0) = 0xffffffff;
|
||||
REG_GPIO_PXPES(1) = 0xffffffff;
|
||||
REG_GPIO_PXPES(2) = 0xffffffff;
|
||||
REG_GPIO_PXPES(3) = 0xffffffff;
|
||||
|
||||
/*
|
||||
* Initialize NAND Flash Pins
|
||||
*/
|
||||
__gpio_as_nand();
|
||||
|
||||
/*
|
||||
* Initialize SDRAM pins
|
||||
*/
|
||||
__gpio_as_sdram_32bit();
|
||||
|
||||
/*
|
||||
* Initialize UART0 pins
|
||||
*/
|
||||
__gpio_as_uart0();
|
||||
|
||||
/*
|
||||
* Initialize MSC pins
|
||||
*/
|
||||
__gpio_as_msc();
|
||||
|
||||
/*
|
||||
* Initialize LCD pins
|
||||
*/
|
||||
__gpio_as_lcd_16bit();
|
||||
|
||||
/*
|
||||
* Initialize Other pins
|
||||
*/
|
||||
__gpio_as_output(GPIO_SD_VCC_EN_N);
|
||||
__gpio_clear_pin(GPIO_SD_VCC_EN_N);
|
||||
|
||||
__gpio_as_input(GPIO_SD_CD_N);
|
||||
__gpio_disable_pull(GPIO_SD_CD_N);
|
||||
|
||||
__gpio_as_output(GPIO_DISP_OFF_N);
|
||||
|
||||
__gpio_as_output(GPIO_LED_EN);
|
||||
__gpio_set_pin(GPIO_LED_EN);
|
||||
|
||||
__gpio_as_input(127);
|
||||
}
|
||||
|
||||
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_udc();
|
||||
__cpm_stop_aic1();
|
||||
__cpm_stop_aic2();
|
||||
__cpm_suspend_udcphy();
|
||||
__cpm_suspend_usbphy();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// board early init routine
|
||||
|
||||
void board_early_init(void)
|
||||
{
|
||||
gpio_init();
|
||||
cpm_init();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// U-Boot common routines
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
printf("Board: Hanvon n516 e-book (CPU Speed %d MHz)\n",
|
||||
gd->cpu_clk/1000000);
|
||||
|
||||
return 0; /* success */
|
||||
}
|
||||
63
package/uboot-xburst/files/board/xburst/n516/u-boot-nand.lds
Normal file
63
package/uboot-xburst/files/board/xburst/n516/u-boot-nand.lds
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 = .;
|
||||
}
|
||||
63
package/uboot-xburst/files/board/xburst/n516/u-boot.lds
Normal file
63
package/uboot-xburst/files/board/xburst/n516/u-boot.lds
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 = .;
|
||||
}
|
||||
45
package/uboot-xburst/files/board/xburst/nanonote/Makefile
Normal file
45
package/uboot-xburst/files/board/xburst/nanonote/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
#
|
||||
# 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 = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS := $(BOARD).o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
|
||||
|
||||
clean:
|
||||
rm -f $(SOBJS) $(OBJS)
|
||||
|
||||
distclean: clean
|
||||
rm -f $(LIB) core *.bak $(obj).depend
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
31
package/uboot-xburst/files/board/xburst/nanonote/config.mk
Normal file
31
package/uboot-xburst/files/board/xburst/nanonote/config.mk
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# (C) Copyright 2006 Qi Hardware, Inc.
|
||||
# Author: Xiangfu Liu <xiangfu.z@gmail.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
|
||||
#
|
||||
|
||||
#
|
||||
# Qi Hardware, Inc. Ben NanoNote (QI_LB60)
|
||||
#
|
||||
|
||||
ifndef TEXT_BASE
|
||||
# ROM version
|
||||
# TEXT_BASE = 0x88000000
|
||||
|
||||
# RAM version
|
||||
TEXT_BASE = 0x80100000
|
||||
endif
|
||||
124
package/uboot-xburst/files/board/xburst/nanonote/nanonote.c
Normal file
124
package/uboot-xburst/files/board/xburst/nanonote/nanonote.c
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Authors: Xiangfu Liu <xiangfu.z@gmail.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
|
||||
* 3 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/jz4740.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static void gpio_init(void)
|
||||
{
|
||||
/*
|
||||
* Initialize NAND Flash Pins
|
||||
*/
|
||||
__gpio_as_nand();
|
||||
|
||||
/*
|
||||
* Initialize SDRAM pins
|
||||
*/
|
||||
__gpio_as_sdram_16bit_4720();
|
||||
|
||||
/*
|
||||
* Initialize LCD pins
|
||||
*/
|
||||
__gpio_as_lcd_18bit();
|
||||
|
||||
/*
|
||||
* Initialize MSC pins
|
||||
*/
|
||||
__gpio_as_msc();
|
||||
|
||||
/*
|
||||
* Initialize Other pins
|
||||
*/
|
||||
unsigned int i;
|
||||
for (i = 0; i < 7; i++){
|
||||
__gpio_as_input(GPIO_KEYIN_BASE + i);
|
||||
__gpio_enable_pull(GPIO_KEYIN_BASE + i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
__gpio_as_output(GPIO_KEYOUT_BASE + i);
|
||||
__gpio_clear_pin(GPIO_KEYOUT_BASE + i);
|
||||
}
|
||||
|
||||
/* enable the TP4, TP5 as UART0 */
|
||||
__gpio_jtag_to_uart0();
|
||||
|
||||
/*
|
||||
* Initialize UART0 pins, in Ben NanoNote uart0 and keyin8 use the
|
||||
* same gpio, init the gpio as uart0 cause a keyboard bug. so for
|
||||
* end user we disable the uart0
|
||||
*/
|
||||
if (__gpio_get_pin(GPIO_KEYIN_BASE + 2) == 0){
|
||||
/* if pressed [S] */
|
||||
printf("[S] pressed, enable UART0\n");
|
||||
gd->boot_option |= BOOT_WITH_ENABLE_UART;
|
||||
__gpio_as_uart0();
|
||||
} else {
|
||||
__gpio_as_input(GPIO_KEYIN_8);
|
||||
__gpio_enable_pull(GPIO_KEYIN_8);
|
||||
}
|
||||
|
||||
__gpio_as_output(GPIO_AUDIO_POP);
|
||||
__gpio_set_pin(GPIO_AUDIO_POP);
|
||||
|
||||
__gpio_as_output(GPIO_LCD_CS);
|
||||
__gpio_clear_pin(GPIO_LCD_CS);
|
||||
|
||||
__gpio_as_output(GPIO_AMP_EN);
|
||||
__gpio_clear_pin(GPIO_AMP_EN);
|
||||
|
||||
__gpio_as_output(GPIO_SDPW_EN);
|
||||
__gpio_disable_pull(GPIO_SDPW_EN);
|
||||
__gpio_clear_pin(GPIO_SDPW_EN);
|
||||
|
||||
__gpio_as_input(GPIO_SD_DETECT);
|
||||
__gpio_disable_pull(GPIO_SD_DETECT);
|
||||
|
||||
__gpio_as_input(GPIO_USB_DETECT);
|
||||
__gpio_enable_pull(GPIO_USB_DETECT);
|
||||
|
||||
if (__gpio_get_pin(GPIO_KEYIN_BASE + 3) == 0) {
|
||||
printf("[M] pressed, boot from sd card\n");
|
||||
gd->boot_option |= BOOT_FROM_SDCARD;
|
||||
}
|
||||
}
|
||||
|
||||
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_udc();
|
||||
__cpm_stop_aic1();
|
||||
/* __cpm_stop_aic2();*/
|
||||
}
|
||||
|
||||
void board_early_init(void)
|
||||
{
|
||||
gpio_init();
|
||||
cpm_init();
|
||||
}
|
||||
|
||||
/* U-Boot common routines */
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
printf("Board: Qi LB60 (Ingenic XBurst Jz4740 SoC, Speed %d MHz)\n",
|
||||
gd->cpu_clk / 1000000);
|
||||
|
||||
return 0; /* success */
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 = .;
|
||||
}
|
||||
63
package/uboot-xburst/files/board/xburst/nanonote/u-boot.lds
Normal file
63
package/uboot-xburst/files/board/xburst/nanonote/u-boot.lds
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 = .;
|
||||
}
|
||||
38
package/uboot-xburst/files/board/xburst/sakc/Makefile
Normal file
38
package/uboot-xburst/files/board/xburst/sakc/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
#
|
||||
# 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)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude .depend
|
||||
|
||||
#########################################################################
|
||||
31
package/uboot-xburst/files/board/xburst/sakc/config.mk
Normal file
31
package/uboot-xburst/files/board/xburst/sakc/config.mk
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# (C) Copyright 2006 Qi Hardware, Inc.
|
||||
# Author: Xiangfu Liu <xiangfu.z@gmail.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
|
||||
#
|
||||
|
||||
#
|
||||
# SAKC Board
|
||||
#
|
||||
|
||||
ifndef TEXT_BASE
|
||||
# ROM version
|
||||
# TEXT_BASE = 0x88000000
|
||||
|
||||
# RAM version
|
||||
TEXT_BASE = 0x80100000
|
||||
endif
|
||||
94
package/uboot-xburst/files/board/xburst/sakc/sakc.c
Normal file
94
package/uboot-xburst/files/board/xburst/sakc/sakc.c
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Authors: Xiangfu Liu <xiangfu.z@gmail.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
|
||||
* 3 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/jz4740.h>
|
||||
|
||||
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 */
|
||||
}
|
||||
63
package/uboot-xburst/files/board/xburst/sakc/u-boot-nand.lds
Normal file
63
package/uboot-xburst/files/board/xburst/sakc/u-boot-nand.lds
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 = .;
|
||||
}
|
||||
63
package/uboot-xburst/files/board/xburst/sakc/u-boot.lds
Normal file
63
package/uboot-xburst/files/board/xburst/sakc/u-boot.lds
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Ingenic Semiconductor, <jlwei@ingenic.cn>
|
||||
*
|
||||
* 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 = .;
|
||||
}
|
||||
Reference in New Issue
Block a user