diff options
Diffstat (limited to 'arch/mips/boards')
-rw-r--r-- | arch/mips/boards/netgear-wg102/Kconfig | 6 | ||||
-rw-r--r-- | arch/mips/boards/netgear-wg102/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/boards/netgear-wg102/ram.c | 11 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/init.c | 11 | ||||
-rw-r--r-- | arch/mips/boards/rzx50/include/board/board_pbl_start.h | 34 | ||||
-rw-r--r-- | arch/mips/boards/rzx50/include/board/debug_ll.h | 5 | ||||
-rw-r--r-- | arch/mips/boards/rzx50/serial.c | 37 |
7 files changed, 55 insertions, 50 deletions
diff --git a/arch/mips/boards/netgear-wg102/Kconfig b/arch/mips/boards/netgear-wg102/Kconfig new file mode 100644 index 0000000000..ceca6de820 --- /dev/null +++ b/arch/mips/boards/netgear-wg102/Kconfig @@ -0,0 +1,6 @@ +if BOARD_NETGEAR_WG102 + +config BOARDINFO + default "Netgear WG102" + +endif diff --git a/arch/mips/boards/netgear-wg102/Makefile b/arch/mips/boards/netgear-wg102/Makefile new file mode 100644 index 0000000000..0899b66c5f --- /dev/null +++ b/arch/mips/boards/netgear-wg102/Makefile @@ -0,0 +1 @@ +obj-y += ram.o diff --git a/arch/mips/boards/netgear-wg102/ram.c b/arch/mips/boards/netgear-wg102/ram.c new file mode 100644 index 0000000000..00a008a1ee --- /dev/null +++ b/arch/mips/boards/netgear-wg102/ram.c @@ -0,0 +1,11 @@ +#include <common.h> +#include <init.h> +#include <sizes.h> +#include <asm/memory.h> + +static int mem_init(void) +{ + mips_add_ram0(SZ_16M); + return 0; +} +mem_initcall(mem_init); diff --git a/arch/mips/boards/qemu-malta/init.c b/arch/mips/boards/qemu-malta/init.c index fb4472fe86..db26b3b5c9 100644 --- a/arch/mips/boards/qemu-malta/init.c +++ b/arch/mips/boards/qemu-malta/init.c @@ -20,21 +20,10 @@ #include <types.h> #include <driver.h> #include <init.h> -#include <asm/memory.h> #include <ns16550.h> #include <mach/hardware.h> -#include <io.h> #include <partition.h> #include <sizes.h> -#include <asm/common.h> - -static int malta_mem_init(void) -{ - mips_add_ram0(SZ_256M); - - return 0; -} -mem_initcall(malta_mem_init); static int malta_devices_init(void) { diff --git a/arch/mips/boards/rzx50/include/board/board_pbl_start.h b/arch/mips/boards/rzx50/include/board/board_pbl_start.h new file mode 100644 index 0000000000..cba3e7f470 --- /dev/null +++ b/arch/mips/boards/rzx50/include/board/board_pbl_start.h @@ -0,0 +1,34 @@ +/* + * Startup Code for Ritmix RZX-50 board + * + * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> + * + * 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 <asm/pbl_macros.h> + + .macro board_pbl_start + .set push + .set noreorder + + mips_disable_interrupts + + /* CPU/SoC specific setup ... */ + /* ... absent */ + + copy_to_link_location pbl_start + + .set pop + .endm diff --git a/arch/mips/boards/rzx50/include/board/debug_ll.h b/arch/mips/boards/rzx50/include/board/debug_ll.h index 3d183b0a1c..7ae0e2a4fd 100644 --- a/arch/mips/boards/rzx50/include/board/debug_ll.h +++ b/arch/mips/boards/rzx50/include/board/debug_ll.h @@ -18,9 +18,6 @@ #ifndef __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ #define __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ -#include <mach/jz4750d_regs.h> - -#define DEBUG_LL_UART_ADDR UART1_BASE -#define DEBUG_LL_UART_SHIFT 2 +#include <mach/debug_ll_jz4750d.h> #endif /* __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/rzx50/serial.c b/arch/mips/boards/rzx50/serial.c index 5230aaa8c8..129806d5a1 100644 --- a/arch/mips/boards/rzx50/serial.c +++ b/arch/mips/boards/rzx50/serial.c @@ -16,47 +16,14 @@ */ #include <common.h> -#include <types.h> -#include <driver.h> #include <init.h> -#include <ns16550.h> +#include <mach/devices.h> #include <mach/jz4750d_regs.h> -#include <io.h> -#include <asm/common.h> - -#define JZ4750D_UART_SHIFT 2 - -#define ier (1 << JZ4750D_UART_SHIFT) -#define fcr (2 << JZ4750D_UART_SHIFT) - -static void jz4750d_serial_reg_write(unsigned int val, unsigned long base, - unsigned char reg_offset) -{ - switch (reg_offset) { - case fcr: - val |= 0x10; /* Enable uart module */ - break; - case ier: - val |= (val & 0x4) << 2; - break; - default: - break; - } - - writeb(val & 0xff, (void *)(base + reg_offset)); -} - -static struct NS16550_plat serial_plat = { - .clock = 12000000, - .shift = JZ4750D_UART_SHIFT, - .reg_write = &jz4750d_serial_reg_write, -}; static int rzx50_console_init(void) { /* Register the serial port */ - add_ns16550_device(DEVICE_ID_DYNAMIC, UART1_BASE, 8 << JZ4750D_UART_SHIFT, - IORESOURCE_MEM_8BIT, &serial_plat); + jz_add_uart(DEVICE_ID_DYNAMIC, UART1_BASE, 12000000); return 0; } |