diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2011-08-05 14:58:37 +0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-05 18:20:17 +0200 |
commit | b12f817f4720ecd8376ecfe71774ee90e7de20a3 (patch) | |
tree | f2f76937cc1531760a438c602b990c6ba4060aee /arch/mips | |
parent | de754b69e478703af5e1d0b2336fe148030f602b (diff) | |
download | barebox-b12f817f4720ecd8376ecfe71774ee90e7de20a3.tar.gz barebox-b12f817f4720ecd8376ecfe71774ee90e7de20a3.tar.xz |
MIPS: add qemu malta board support to barebox
The only supported peripheral is ns16550 serial port.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/Kconfig | 6 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/config.h | 19 | ||||
-rw-r--r-- | arch/mips/boards/qemu-malta/serial.c | 43 | ||||
-rw-r--r-- | arch/mips/configs/qemu-malta_defconfig | 57 | ||||
-rw-r--r-- | arch/mips/mach-malta/Kconfig | 5 |
7 files changed, 132 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 678c2b5897..99b38abc95 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -61,6 +61,7 @@ endif LDFLAGS_barebox += -nostdlib machine-$(CONFIG_MACH_MIPS_MALTA) := malta +board-$(CONFIG_BOARD_QEMU_MALTA) := qemu-malta machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) diff --git a/arch/mips/boards/qemu-malta/Kconfig b/arch/mips/boards/qemu-malta/Kconfig new file mode 100644 index 0000000000..6d86c148c7 --- /dev/null +++ b/arch/mips/boards/qemu-malta/Kconfig @@ -0,0 +1,6 @@ +if BOARD_QEMU_MALTA + +config BOARDINFO + default "qemu malta" + +endif diff --git a/arch/mips/boards/qemu-malta/Makefile b/arch/mips/boards/qemu-malta/Makefile new file mode 100644 index 0000000000..ff1a655afe --- /dev/null +++ b/arch/mips/boards/qemu-malta/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o diff --git a/arch/mips/boards/qemu-malta/config.h b/arch/mips/boards/qemu-malta/config.h new file mode 100644 index 0000000000..eb4ab083c3 --- /dev/null +++ b/arch/mips/boards/qemu-malta/config.h @@ -0,0 +1,19 @@ +/* + * 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 + * + */ + +/* nothing special yet */ diff --git a/arch/mips/boards/qemu-malta/serial.c b/arch/mips/boards/qemu-malta/serial.c new file mode 100644 index 0000000000..ef6be17f1f --- /dev/null +++ b/arch/mips/boards/qemu-malta/serial.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2011 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. + * + * 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 <types.h> +#include <driver.h> +#include <init.h> +#include <ns16550.h> +#include <mach/hardware.h> +#include <asm/io.h> +#include <asm/common.h> + +static struct NS16550_plat serial_plat = { + .clock = 1843200, /* no matter for emulated port */ + .shift = 0, +}; + +static int malta_console_init(void) +{ + /* Register the serial port */ + add_ns16550_device(-1, DEBUG_LL_UART_ADDR, 8, + IORESOURCE_MEM_8BIT, &serial_plat); + + return 0; +} +console_initcall(malta_console_init); diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig new file mode 100644 index 0000000000..b6f53cab0f --- /dev/null +++ b/arch/mips/configs/qemu-malta_defconfig @@ -0,0 +1,57 @@ +CONFIG_STACK_SIZE=0x7000 +CONFIG_BROKEN=y +CONFIG_EXPERIMENTAL=y +CONFIG_LONGHELP=y +CONFIG_HUSH_FANCY_PROMPT=y +CONFIG_HUSH_GETOPT=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +CONFIG_MENU=y +CONFIG_PARTITION=y +# CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_POLLER=y +CONFIG_DEBUG_INFO=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_LOADENV=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_MENU=y +CONFIG_CMD_MENU_MANAGEMENT=y +CONFIG_CMD_PASSWD=y +CONFIG_CMD_TIME=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_SHA256SUM=y +CONFIG_CMD_MTEST=y +CONFIG_CMD_FLASH=y +CONFIG_CMD_BOOTM_ZLIB=y +CONFIG_CMD_BOOTM_BZLIB=y +CONFIG_CMD_BOOTM_SHOW_TYPE=y +CONFIG_CMD_RESET=y +CONFIG_CMD_GO=y +CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_PARTITION=y +CONFIG_CMD_UNLZO=y +CONFIG_NET=y +CONFIG_NET_DHCP=y +CONFIG_NET_NFS=y +CONFIG_NET_PING=y +CONFIG_NET_TFTP=y +CONFIG_NET_TFTP_PUSH=y +CONFIG_NET_NETCONSOLE=y +CONFIG_NET_RESOLV=y +# CONFIG_SPI is not set +CONFIG_MTD=y +CONFIG_FS_CRAMFS=y +CONFIG_FS_FAT=y +CONFIG_FS_FAT_WRITE=y +CONFIG_FS_FAT_LFN=y diff --git a/arch/mips/mach-malta/Kconfig b/arch/mips/mach-malta/Kconfig index 6076a13a76..8e0666ce9a 100644 --- a/arch/mips/mach-malta/Kconfig +++ b/arch/mips/mach-malta/Kconfig @@ -7,6 +7,11 @@ config ARCH_TEXT_BASE choice prompt "Board type" +config BOARD_QEMU_MALTA + bool "qemu malta" + endchoice +source arch/mips/boards/qemu-malta/Kconfig + endif |