blob: 8864de2af382f767540ad4aeac24a7606750e72e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright (C) 1996 Paul Mackerras.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <asm/machdep.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#include <asm/udbg.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#include "nonstdio.h"
12
Paul Mackerrasfca5dcd2005-11-08 22:55:08 +110013void xmon_map_scc(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014{
Linus Torvalds1da177e2005-04-16 15:20:36 -070015}
16
Ishizaki Kou776568d2007-07-18 19:30:29 +100017int xmon_write(const void *ptr, int nb)
Linus Torvalds1da177e2005-04-16 15:20:36 -070018{
19 return udbg_write(ptr, nb);
20}
21
Paul Mackerrasfca5dcd2005-11-08 22:55:08 +110022int xmon_readchar(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070023{
Paul Mackerrasfca5dcd2005-11-08 22:55:08 +110024 if (udbg_getc)
25 return udbg_getc();
26 return -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027}
28
Paul Mackerrasfca5dcd2005-11-08 22:55:08 +110029int xmon_read_poll(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070030{
Milton Millerc8f1c8b2005-09-06 11:56:42 +100031 if (udbg_getc_poll)
32 return udbg_getc_poll();
Milton Miller41be31b2005-09-06 11:54:13 +100033 return -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070034}