From: Alban Bedel <albeu@free.fr>
To: linux-mips@linux-mips.org
Cc: Alban Bedel <albeu@free.fr>, Ralf Baechle <ralf@linux-mips.org>,
Alex Smith <alex.smith@imgtec.com>,
Andrew Bresticker <abrestic@chromium.org>,
Wu Zhangjin <wuzhangjin@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] MIPS: zboot: Add support for serial debug using the PROM
Date: Thu, 10 Dec 2015 10:57:21 +0100 [thread overview]
Message-ID: <1449741444-29110-2-git-send-email-albeu@free.fr> (raw)
In-Reply-To: <1449741444-29110-1-git-send-email-albeu@free.fr>
As most platforms implement the PROM serial interface prom_putchar()
add a simple bridge to allow re-using this code for zboot.
Signed-off-by: Alban Bedel <albeu@free.fr>
---
arch/mips/Kconfig | 4 ++++
arch/mips/boot/compressed/Makefile | 1 +
arch/mips/boot/compressed/uart-prom.c | 7 +++++++
3 files changed, 12 insertions(+)
create mode 100644 arch/mips/boot/compressed/uart-prom.c
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 71683a8..ef1d665 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1756,6 +1756,10 @@ config SYS_SUPPORTS_ZBOOT_UART16550
bool
select SYS_SUPPORTS_ZBOOT
+config SYS_SUPPORTS_ZBOOT_UART_PROM
+ bool
+ select SYS_SUPPORTS_ZBOOT
+
config CPU_LOONGSON2
bool
select CPU_SUPPORTS_32BIT_KERNEL
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index e66b2c6..4eff1ef 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -35,6 +35,7 @@ vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
ifdef CONFIG_DEBUG_ZBOOT
vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
+vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o
vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
endif
diff --git a/arch/mips/boot/compressed/uart-prom.c b/arch/mips/boot/compressed/uart-prom.c
new file mode 100644
index 0000000..1c3d51b
--- /dev/null
+++ b/arch/mips/boot/compressed/uart-prom.c
@@ -0,0 +1,7 @@
+
+extern void prom_putchar(unsigned char ch);
+
+void putc(char c)
+{
+ prom_putchar(c);
+}
--
2.0.0
next prev parent reply other threads:[~2015-12-10 9:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 9:57 [PATCH 1/3] MIPS: zboot: Avoid useless rebuilds Alban Bedel
2015-12-10 9:57 ` Alban Bedel [this message]
2015-12-10 9:57 ` [PATCH 3/3] MIPS: ath79: Add zboot debug serial support Alban Bedel
2016-01-08 9:28 ` Antony Pavlov
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=1449741444-29110-2-git-send-email-albeu@free.fr \
--to=albeu@free.fr \
--cc=abrestic@chromium.org \
--cc=alex.smith@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=wuzhangjin@gmail.com \
/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
all inboxes | Powered by JetHome®