generic.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * linux/include/asm-mips/txx9/generic.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. */
  8. #ifndef __ASM_TXX9_GENERIC_H
  9. #define __ASM_TXX9_GENERIC_H
  10. #include <linux/init.h>
  11. #include <linux/ioport.h> /* for struct resource */
  12. extern struct resource txx9_ce_res[];
  13. #define TXX9_CE(n) (unsigned long)(txx9_ce_res[(n)].start)
  14. extern unsigned int txx9_pcode;
  15. extern char txx9_pcode_str[8];
  16. void txx9_reg_res_init(unsigned int pcode, unsigned long base,
  17. unsigned long size);
  18. extern unsigned int txx9_master_clock;
  19. extern unsigned int txx9_cpu_clock;
  20. extern unsigned int txx9_gbus_clock;
  21. #define TXX9_IMCLK (txx9_gbus_clock / 2)
  22. extern int txx9_ccfg_toeon;
  23. struct uart_port;
  24. int early_serial_txx9_setup(struct uart_port *port);
  25. struct pci_dev;
  26. struct txx9_board_vec {
  27. const char *system;
  28. void (*prom_init)(void);
  29. void (*mem_setup)(void);
  30. void (*irq_setup)(void);
  31. void (*time_init)(void);
  32. void (*arch_init)(void);
  33. void (*device_init)(void);
  34. #ifdef CONFIG_PCI
  35. int (*pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
  36. #endif
  37. };
  38. extern struct txx9_board_vec *txx9_board_vec;
  39. extern int (*txx9_irq_dispatch)(int pending);
  40. void prom_init_cmdline(void);
  41. char *prom_getcmdline(void);
  42. void txx9_wdt_init(unsigned long base);
  43. void txx9_spi_init(int busid, unsigned long base, int irq);
  44. void txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr);
  45. void txx9_sio_init(unsigned long baseaddr, int irq,
  46. unsigned int line, unsigned int sclk, int nocts);
  47. void prom_putchar(char c);
  48. #ifdef CONFIG_EARLY_PRINTK
  49. extern void (*txx9_prom_putchar)(char c);
  50. void txx9_sio_putchar_init(unsigned long baseaddr);
  51. #else
  52. static inline void txx9_sio_putchar_init(unsigned long baseaddr)
  53. {
  54. }
  55. #endif
  56. #endif /* __ASM_TXX9_GENERIC_H */