add atheros MIPS based ar2313 WiSoC chips
Subsystems (2)
PATCH 2/3 add atheros MIPS based ar2313 WiSoC chips
From: Oleksij Rempel <[email protected]>
--- arch/mips/Kconfig | 10 + arch/mips/Makefile | 3 + arch/mips/boards/netgear-wg102/Kconfig | 6 + arch/mips/boards/netgear-wg102/Makefile | 1 + arch/mips/boards/netgear-wg102/config.h | 15 + arch/mips/boards/netgear-wg102/netgear-wg102.dox | 38 +++ arch/mips/boards/netgear-wg102/serial.c | 40 +++ arch/mips/mach-ar531x/Kconfig | 17 ++ arch/mips/mach-ar531x/Makefile | 3 + arch/mips/mach-ar531x/ar531x.c | 204 ++++++++++++++ arch/mips/mach-ar531x/board.c | 182 ++++++++++++ .../mach-ar531x/include/mach/ar231x_platform.h | 82 ++++++ arch/mips/mach-ar531x/include/mach/ar531x_regs.h | 295 ++++++++++++++++++++ arch/mips/mach-ar531x/include/mach/debug_ll.h | 31 ++ arch/mips/mach-ar531x/lowlevel_init.S | 83 ++++++ arch/mips/mach-ar531x/mach-ar531x.dox | 7 + 16 files changed, 1017 insertions(+) create mode 100644 arch/mips/boards/netgear-wg102/Kconfig create mode 100644 arch/mips/boards/netgear-wg102/Makefile create mode 100644 arch/mips/boards/netgear-wg102/config.h create mode 100644 arch/mips/boards/netgear-wg102/netgear-wg102.dox create mode 100644 arch/mips/boards/netgear-wg102/serial.c create mode 100644 arch/mips/mach-ar531x/Kconfig create mode 100644 arch/mips/mach-ar531x/Makefile create mode 100644 arch/mips/mach-ar531x/ar531x.c create mode 100644 arch/mips/mach-ar531x/board.c create mode 100644 arch/mips/mach-ar531x/include/mach/ar231x_platform.h create mode 100644 arch/mips/mach-ar531x/include/mach/ar531x_regs.h create mode 100644 arch/mips/mach-ar531x/include/mach/debug_ll.h create mode 100644 arch/mips/mach-ar531x/lowlevel_init.S create mode 100644 arch/mips/mach-ar531x/mach-ar531x.dox
arch/mips/Kconfig +10 -0
@@ -37,6 +37,15 @@ config MACH_MIPS_MALTA select SYS_SUPPORTS_BIG_ENDIAN select HAS_DEBUG_LL +config MACH_MIPS_AR531X + bool "Atheros ar531x-based boards" + select CSRC_R4K_LIB + select DRIVER_SERIAL_NS16550 + select SYS_HAS_CPU_MIPS32_R1 + select SYS_SUPPORTS_32BIT_KERNEL + select SYS_SUPPORTS_BIG_ENDIAN + select HAS_DEBUG_LL + config MACH_MIPS_BCM47XX bool "Broadcom BCM47xx-based boards" select CSRC_R4K_LIB
@@ -56,6 +65,7 @@ config MACH_MIPS_XBURST endchoice source arch/mips/mach-malta/Kconfig +source arch/mips/mach-ar531x/Kconfig source arch/mips/mach-bcm47xx/Kconfig source arch/mips/mach-xburst/Kconfig
arch/mips/Makefile +3 -0
@@ -72,6 +72,9 @@ LDFLAGS_barebox += -nostdlib machine-$(CONFIG_MACH_MIPS_MALTA) := malta board-$(CONFIG_BOARD_QEMU_MALTA) := qemu-malta +machine-$(CONFIG_MACH_MIPS_AR531X) := ar531x +board-$(CONFIG_BOARD_NETGEAR_WG102) := netgear-wg102 + machine-$(CONFIG_MACH_MIPS_BCM47XX) := bcm47xx board-$(CONFIG_BOARD_DLINK_DIR320) := dlink-dir-320
arch/mips/boards/netgear-wg102/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +if BOARD_NETGEAR_WG102 + +config BOARDINFO + default "Netgear WG102" + +endif
arch/mips/boards/netgear-wg102/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
arch/mips/boards/netgear-wg102/config.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* 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. +* +* +*/ + +/* nothing special yet */
arch/mips/boards/netgear-wg102/netgear-wg102.dox new file +38 -0
@@ -0,0 +1,38 @@ +/** @page dlink_dir_320 D-Link DIR-320 wireless router + +The router has +@li BCM5354 SoC; +@li 32 MiB SDRAM; +@li 4 MiB NOR type Flash Memory; +@li RS232 serial interface (LV-TTL levels on board!); +@li 1xUSB interface; +@li 4 + 1 ethernet interfaces; +@li 802.11b/g (WiFi) interface; +@li JTAG interface; +@li 5 LEDs; +@li 2 buttons. + +The router uses CFE as firmware. + +Barebox can be started from CFE using tftp. +You must setup tftp-server on host 192.168.0.1. +Put your barebox.bin to tftp-server directory +(usual /tftpboot or /srv/tftp). +Connect your DIR-320 to your tftp-server network via +one of four <LAN> sockets. + +Next, setup network on DIR-320 and run barebox.bin, e.g.: +@verbatim +CFE> ifconfig eth0 -addr=192.168.0.99 +CFE> boot -tftp -addr=a0800000 -raw 192.168.0.1:barebox.bin +@endverbatim + +DIR-320 links: +@li http://www.dlink.com.au/products/?pid=768 +@li http://wiki.openwrt.org/toh/d-link/dir-320 + +CFE links: +@li http://www.broadcom.com/support/communications_processors/downloads.php#cfe +@li http://www.linux-mips.org/wiki/CFE + +*/
arch/mips/boards/netgear-wg102/serial.c new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright (C) 2011 Antony Pavlov <[email protected]> +* +* This file is part of barebox. +* 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 version 2 +* as published by the Free Software Foundation. +* +* 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. +* +*/ + +#include <common.h> +#include <types.h> +#include <driver.h> +#include <init.h> +#include <ns16550.h> +#include <io.h> +#include <asm/common.h> +#if 0 +static struct NS16550_plat serial_plat = { + .clock =9100 , + .shift =0 , +}; + +static int dir320_console_init (void ) +{ +/* Register the serial port */ +add_ns16550_device (DEVICE_ID_DYNAMIC ,DEBUG_LL_UART_ADDR ,8 , +IORESOURCE_MEM_8BIT , &serial_plat); + +return 0 ; +} +console_initcall (dir320_console_init); +#endif
arch/mips/mach-ar531x/Kconfig new file +17 -0
@@ -0,0 +1,17 @@ +if MACH_MIPS_AR531X + +config ARCH_TEXT_BASE + hex + default 0xa0800000 + +choice + prompt "Board type" + +config BOARD_NETGEAR_WG102 + bool "Netgear WG102" + +endchoice + +source arch/mips/boards/netgear-wg102/Kconfig + +endif
arch/mips/mach-ar531x/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += ar531x.o +obj-y += lowlevel_init.o +obj-y += board.o
arch/mips/mach-ar531x/ar531x.c new file +204 -0
204 lines not on this page · raw message
arch/mips/mach-ar531x/board.c new file +182 -0
182 lines not on this page · raw message
arch/mips/mach-ar531x/include/mach/ar231x_platform.h new file +82 -0
82 lines not on this page · raw message
arch/mips/mach-ar531x/include/mach/ar531x_regs.h new file +295 -0
295 lines not on this page · raw message
arch/mips/mach-ar531x/include/mach/debug_ll.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright (C) 2011 Antony Pavlov <[email protected]> +* +* This file is part of barebox. +* 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 version 2 +* as published by the Free Software Foundation. +* +* 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. +* +*/ + +/** @file +* This File contains declaration for early output support +*/ +#ifndef __MACH_AR531X_DEBUG_LL_H__ +#define __MACH_AR531X_DEBUG_LL_H__ + +#include <mach/ar531x_regs.h> + +#define DEBUG_LL_UART_ADDR KSEG1ADDR(AR531X_UART0) +#define DEBUG_LL_UART_SHIFT AR531X_UART_SHIFT + +#include <debug_ll_ns16550.h> + +#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
arch/mips/mach-ar531x/lowlevel_init.S new file +83 -0
83 lines not on this page · raw message
arch/mips/mach-ar531x/mach-ar531x.dox new file +7 -0
@@ -0,0 +1,7 @@ +/** @page dev_ar531x_mach AR531x in barebox + +@section ar531x_boards AR531x-based boards + +@li @subpage netgear-wg102 + +*/
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox