path: root/arch/powerpc/xmon/nonstdio.c
diff options
authorMichael Ellerman <michael@ellerman.id.au>2012-10-09 04:20:32 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-15 12:59:46 +1100
commit33b5cd686649f56d40fa258a0881f6acdbd70134 (patch)
tree135a390386192ec1e6f49c88c86c4de83b85c5fd /arch/powerpc/xmon/nonstdio.c
parent88c6d62641514686e0b1b0e33d9faf1e39ec7e58 (diff)
powerpc/xmon: Merge start.c into nonstdio.c
The routines in start.c are only ever called from nonstdio.c, so if we move them in there they can become static which is nice. I suspect the idea behind the separation was that start.c could be replaced in order to build xmon in userland. If anyone still cares about doing that we could handle that with an ifdef or two. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/xmon/nonstdio.c')
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c
index 2209485e656..942d0f6b187 100644
--- a/arch/powerpc/xmon/nonstdio.c
+++ b/arch/powerpc/xmon/nonstdio.c
@@ -7,9 +7,23 @@
* 2 of the License, or (at your option) any later version.
#include <linux/string.h>
+#include <asm/udbg.h>
#include <asm/time.h>
#include "nonstdio.h"
+static int xmon_write(const void *ptr, int nb)
+ return udbg_write(ptr, nb);
+static int xmon_readchar(void)
+ if (udbg_getc)
+ return udbg_getc();
+ return -1;
int xmon_putchar(int c)
char ch = c;