diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn | |
download | trunk-36060-master.tar.gz trunk-36060-master.tar.bz2 trunk-36060-master.zip |
Diffstat (limited to 'package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn')
9 files changed, 437 insertions, 0 deletions
diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/entries b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/entries new file mode 100644 index 0000000..2cd7eba --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/entries @@ -0,0 +1,198 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n +svn://svn.openwrt.org/openwrt + + + +2012-10-16T13:44:25.630275Z +33781 +blogic + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +nbg460n.c +file + + + + +2013-03-17T12:13:21.000000Z +4ca6c195407e477c7ce5e894b0047bd7 +2012-10-16T13:44:25.630275Z +33781 +blogic +has-props + + + + + + + + + + + + + + + + + + + + +2519 + +u-boot.lds +file + + + + +2013-03-17T12:13:21.000000Z +189327e68f6732474873394c31ecb392 +2012-10-16T13:44:25.630275Z +33781 +blogic + + + + + + + + + + + + + + + + + + + + + +644 + +config.mk +file + + + + +2013-03-17T12:13:21.000000Z +e0a9c9382bb06ca19e6e6277bd6cb25e +2012-10-16T13:44:25.630275Z +33781 +blogic +has-props + + + + + + + + + + + + + + + + + + + + +23 + +Makefile +file + + + + +2013-03-17T12:13:21.000000Z +adb668f790f345afd4d82777c8bd28e0 +2012-10-16T13:44:25.630275Z +33781 +blogic +has-props + + + + + + + + + + + + + + + + + + + + +1403 + +lowlevel_init.S +file + + + + +2013-03-17T12:13:21.000000Z +6bcc57bddec47e9957d0b00bd2755913 +2012-10-16T13:44:25.630275Z +33781 +blogic + + + + + + + + + + + + + + + + + + + + + +1089 + diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/Makefile.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/Makefile.svn-base new file mode 100644 index 0000000..bdbd305 --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/Makefile.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 6 +native +END diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/config.mk.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/config.mk.svn-base new file mode 100644 index 0000000..bdbd305 --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/config.mk.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 6 +native +END diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/nbg460n.c.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/nbg460n.c.svn-base new file mode 100644 index 0000000..bdbd305 --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/prop-base/nbg460n.c.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:eol-style +V 6 +native +END diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/Makefile.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..b0a385b --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/Makefile.svn-base @@ -0,0 +1,46 @@ +# +# (C) Copyright 2003-2008 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# 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 $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS-y += $(BOARD).o +SOBJS-y += lowlevel_init.o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS-y)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/config.mk.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/config.mk.svn-base new file mode 100644 index 0000000..e042e78 --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/config.mk.svn-base @@ -0,0 +1 @@ +TEXT_BASE = 0x81E00000 diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/lowlevel_init.S.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/lowlevel_init.S.svn-base new file mode 100644 index 0000000..83084c8 --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/lowlevel_init.S.svn-base @@ -0,0 +1,39 @@ +/* + * (C) Copyright 2010 + * Michael Kurz <michi.kurz@googlemail.com>. + * + * 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 <config.h> +#include <version.h> +#include <asm/regdef.h> +#include <asm/mipsregs.h> +#include <asm/addrspace.h> + + + +.globl lowlevel_init +/* + All done by Bootbase, nothing to do +*/ +lowlevel_init: + jr ra + nop + diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/nbg460n.c.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/nbg460n.c.svn-base new file mode 100644 index 0000000..03a479d --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/nbg460n.c.svn-base @@ -0,0 +1,96 @@ +/* + * (C) Copyright 2010 + * Michael Kurz <michi.kurz@googlemail.com>. + * + * 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 <common.h> +#include <netdev.h> +#include <asm/mipsregs.h> +#include <asm/addrspace.h> +#include <asm/reboot.h> +#include <asm/ar71xx.h> +#include <asm/ar71xx_gpio.h> + +#define NBG460N_WAN_LED 19 + +phys_size_t initdram(int board_type) +{ + return (32*1024*1024); +} + +int checkboard(void) +{ + // Set pin 19 to 1, to stop WAN LED blinking + ar71xx_setpindir(NBG460N_WAN_LED, 1); + ar71xx_setpin(NBG460N_WAN_LED, 1); + + printf("U-boot on Zyxel NBG460N\n"); + return 0; +} + +void _machine_restart(void) +{ + for (;;) { + writel((RESET_MODULE_FULL_CHIP | RESET_MODULE_DDR), + KSEG1ADDR(AR71XX_RESET_BASE + AR91XX_RESET_REG_RESET_MODULE)); + readl(KSEG1ADDR(AR71XX_RESET_BASE + AR91XX_RESET_REG_RESET_MODULE)); + } +} + +int board_eth_init(bd_t *bis) +{ + char *phynames[] = {RTL8366_DEVNAME, RTL8366_DEVNAME}; + u16 phyids[] = {RTL8366_LANPHY_ID, RTL8366_WANPHY_ID}; + u16 phyfixed[] = {1, 0}; + + if (ag71xx_register(bis, phynames, phyids, phyfixed) <= 0) + return -1; + + if (rtl8366s_initialize()) + return -1; + + if (rtl8366_mii_register(bis)) + return -1; + + return 0; +} + +int misc_init_r(void) { + uint8_t macaddr[6]; + uint8_t enetaddr[6]; + + debug("Testing mac addresses\n"); + + memcpy(macaddr, (uint8_t *) CONFIG_ETHADDR_ADDR, 6); + + if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { + debug("Setting eth0 mac addr to %pM\n", macaddr); + eth_setenv_enetaddr("ethaddr", macaddr); + } + + if (!eth_getenv_enetaddr("eth1addr", enetaddr)) { + macaddr[5] += 1; + debug("Setting eth1 mac addr to %pM\n", macaddr); + eth_setenv_enetaddr("eth1addr", macaddr); + } + + return 0; +} diff --git a/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/u-boot.lds.svn-base b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/u-boot.lds.svn-base new file mode 100644 index 0000000..8dc2b76 --- /dev/null +++ b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/.svn/text-base/u-boot.lds.svn-base @@ -0,0 +1,42 @@ +OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") +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 = .; +} |