From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] MIPS: qemu-malta: rework debug_ll.h
Date: Mon, 24 Jun 2013 23:10:11 +0400 [thread overview]
Message-ID: <1372101012-11666-3-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1372101012-11666-1-git-send-email-antonynpavlov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
.../boards/qemu-malta/include/board/debug_ll.h | 27 ++++++++++++++++++++
arch/mips/boards/qemu-malta/init.c | 2 +-
arch/mips/mach-malta/include/mach/debug_ll.h | 9 +++----
arch/mips/mach-malta/include/mach/hardware.h | 4 +--
4 files changed, 33 insertions(+), 9 deletions(-)
create mode 100644 arch/mips/boards/qemu-malta/include/board/debug_ll.h
diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
new file mode 100644
index 0000000..1e56040
--- /dev/null
+++ b/arch/mips/boards/qemu-malta/include/board/debug_ll.h
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__
+#define __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__
+
+#include <mach/hardware.h>
+
+#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0
+#define DEBUG_LL_UART_SHIFT 0
+#define DEBUG_LL_UART_DIVISOR 1843200 /* no matter for emulated port */
+
+#endif /* __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ */
diff --git a/arch/mips/boards/qemu-malta/init.c b/arch/mips/boards/qemu-malta/init.c
index db26b3b..f77fcad 100644
--- a/arch/mips/boards/qemu-malta/init.c
+++ b/arch/mips/boards/qemu-malta/init.c
@@ -44,7 +44,7 @@ static struct NS16550_plat serial_plat = {
static int malta_console_init(void)
{
/* Register the serial port */
- add_ns16550_device(DEVICE_ID_DYNAMIC, DEBUG_LL_UART_ADDR, 8,
+ add_ns16550_device(DEVICE_ID_DYNAMIC, MALTA_PIIX4_UART0, 8,
IORESOURCE_MEM_8BIT, &serial_plat);
return 0;
diff --git a/arch/mips/mach-malta/include/mach/debug_ll.h b/arch/mips/mach-malta/include/mach/debug_ll.h
index 3e8b01b..c9e89bc 100644
--- a/arch/mips/mach-malta/include/mach/debug_ll.h
+++ b/arch/mips/mach-malta/include/mach/debug_ll.h
@@ -18,11 +18,10 @@
/** @file
* This File contains declaration for early output support
*/
-#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
-#define __INCLUDE_ARCH_DEBUG_LL_H__
-
-#include <mach/hardware.h>
+#ifndef __MACH_MALTA_DEBUG_LL_H__
+#define __MACH_MALTA_DEBUG_LL_H__
+#include <board/debug_ll.h>
#include <asm/debug_ll_ns16550.h>
-#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
+#endif /* __MACH_MALTA_DEBUG_LL_H__ */
diff --git a/arch/mips/mach-malta/include/mach/hardware.h b/arch/mips/mach-malta/include/mach/hardware.h
index 8bd814d..affb4ea 100644
--- a/arch/mips/mach-malta/include/mach/hardware.h
+++ b/arch/mips/mach-malta/include/mach/hardware.h
@@ -18,9 +18,7 @@
#ifndef __INCLUDE_ARCH_HARDWARE_H__
#define __INCLUDE_ARCH_HARDWARE_H__
-#define DEBUG_LL_UART_ADDR 0xb00003f8
-#define DEBUG_LL_UART_SHIFT 0
-#define DEBUG_LL_UART_DIVISOR 1 /* no matter for emulated port */
+#define MALTA_PIIX4_UART0 0xb00003f8
/*
* Reset register.
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-06-24 19:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 19:10 [PATCH 0/3] MIPS: pbl: add nmon MIPS nano-monitor Antony Pavlov
2013-06-24 19:10 ` [PATCH 1/3] " Antony Pavlov
2013-06-24 19:10 ` Antony Pavlov [this message]
2013-06-24 19:10 ` [PATCH 3/3] MIPS: qemu-malta: add nmon Antony Pavlov
2013-06-25 19:36 ` [PATCH 0/3] MIPS: pbl: add nmon MIPS nano-monitor Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372101012-11666-3-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox