loongson.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
  3. * Author: Wu Zhangjin <wuzj@lemote.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. *
  10. */
  11. #ifndef __ASM_MACH_LOONGSON_LOONGSON_H
  12. #define __ASM_MACH_LOONGSON_LOONGSON_H
  13. #include <linux/io.h>
  14. #include <linux/init.h>
  15. /* there is an internal bonito64-compatiable northbridge in loongson2e/2f */
  16. #include <asm/mips-boards/bonito64.h>
  17. /* loongson internal northbridge initialization */
  18. extern void bonito_irq_init(void);
  19. /* loongson-based machines specific reboot setup */
  20. extern void mips_reboot_setup(void);
  21. /* environment arguments from bootloader */
  22. extern unsigned long bus_clock, cpu_clock_freq;
  23. extern unsigned long memsize, highmemsize;
  24. /* loongson-specific command line, env and memory initialization */
  25. extern void __init prom_init_memory(void);
  26. extern void __init prom_init_cmdline(void);
  27. extern void __init prom_init_env(void);
  28. /* PCI Configuration Registers */
  29. #define LOONGSON_PCI_ISR4C BONITO_PCI_REG(0x4c)
  30. /* PCI_Hit*_Sel_* */
  31. #define LOONGSON_PCI_HIT0_SEL_L BONITO(BONITO_REGBASE + 0x50)
  32. #define LOONGSON_PCI_HIT0_SEL_H BONITO(BONITO_REGBASE + 0x54)
  33. #define LOONGSON_PCI_HIT1_SEL_L BONITO(BONITO_REGBASE + 0x58)
  34. #define LOONGSON_PCI_HIT1_SEL_H BONITO(BONITO_REGBASE + 0x5c)
  35. #define LOONGSON_PCI_HIT2_SEL_L BONITO(BONITO_REGBASE + 0x60)
  36. #define LOONGSON_PCI_HIT2_SEL_H BONITO(BONITO_REGBASE + 0x64)
  37. /* PXArb Config & Status */
  38. #define LOONGSON_PXARB_CFG BONITO(BONITO_REGBASE + 0x68)
  39. #define LOONGSON_PXARB_STATUS BONITO(BONITO_REGBASE + 0x6c)
  40. #endif /* __ASM_MACH_LOONGSON_LOONGSON_H */