start_8xx.c 1.0 KB
Newer Older
P
Paul Mackerras 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Copyright (C) 1996 Paul Mackerras.
 * Copyright (C) 2000 Dan Malek.
 * Quick hack of Paul's code to make XMON work on 8xx processors.  Lots
 * of assumptions, like the SMC1 is used, it has been initialized by the
 * loader at some point, and we can just stuff and suck bytes.
 * We rely upon the 8xx uart driver to support us, as the interface
 * changes between boot up and operational phases of the kernel.
 */
#include <linux/string.h>
#include <asm/machdep.h>
#include <asm/io.h>
#include <asm/page.h>
#include <linux/kernel.h>
#include <asm/8xx_immap.h>
#include <asm/mpc8xx.h>
#include <asm/commproc.h>
18
#include "nonstdio.h"
P
Paul Mackerras 已提交
19 20 21 22 23

extern int xmon_8xx_write(char *str, int nb);
extern int xmon_8xx_read_poll(void);
extern int xmon_8xx_read_char(void);

24
void xmon_map_scc(void)
P
Paul Mackerras 已提交
25 26 27 28 29 30
{
	cpmp = (cpm8xx_t *)&(((immap_t *)IMAP_ADDR)->im_cpm);
}

void xmon_init_scc(void);

31
int xmon_write(void *ptr, int nb)
P
Paul Mackerras 已提交
32 33 34 35
{
	return(xmon_8xx_write(ptr, nb));
}

36
int xmon_readchar(void)
P
Paul Mackerras 已提交
37
{
38
	return xmon_8xx_read_char();
P
Paul Mackerras 已提交
39 40
}

41
int xmon_read_poll(void)
P
Paul Mackerras 已提交
42 43 44
{
	return(xmon_8xx_read_poll());
}