start_8xx.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 1996 Paul Mackerras.
  3. * Copyright (C) 2000 Dan Malek.
  4. * Quick hack of Paul's code to make XMON work on 8xx processors. Lots
  5. * of assumptions, like the SMC1 is used, it has been initialized by the
  6. * loader at some point, and we can just stuff and suck bytes.
  7. * We rely upon the 8xx uart driver to support us, as the interface
  8. * changes between boot up and operational phases of the kernel.
  9. */
  10. #include <linux/string.h>
  11. #include <asm/machdep.h>
  12. #include <asm/io.h>
  13. #include <asm/page.h>
  14. #include <linux/kernel.h>
  15. #include <asm/8xx_immap.h>
  16. #include <asm/mpc8xx.h>
  17. #include <asm/commproc.h>
  18. #include "nonstdio.h"
  19. extern int xmon_8xx_write(char *str, int nb);
  20. extern int xmon_8xx_read_poll(void);
  21. extern int xmon_8xx_read_char(void);
  22. void xmon_map_scc(void)
  23. {
  24. cpmp = (cpm8xx_t *)&(((immap_t *)IMAP_ADDR)->im_cpm);
  25. }
  26. void xmon_init_scc(void);
  27. int xmon_write(void *ptr, int nb)
  28. {
  29. return(xmon_8xx_write(ptr, nb));
  30. }
  31. int xmon_readchar(void)
  32. {
  33. return xmon_8xx_read_char();
  34. }
  35. int xmon_read_poll(void)
  36. {
  37. return(xmon_8xx_read_poll());
  38. }