2 * linux/include/asm-mips/txx9/generic.h
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
8 #ifndef __ASM_TXX9_GENERIC_H
9 #define __ASM_TXX9_GENERIC_H
11 #include <linux/init.h>
12 #include <linux/ioport.h> /* for struct resource */
14 extern struct resource txx9_ce_res[];
15 #define TXX9_CE(n) (unsigned long)(txx9_ce_res[(n)].start)
16 extern unsigned int txx9_pcode;
17 extern char txx9_pcode_str[8];
18 void txx9_reg_res_init(unsigned int pcode, unsigned long base,
21 extern unsigned int txx9_master_clock;
22 extern unsigned int txx9_cpu_clock;
23 extern unsigned int txx9_gbus_clock;
24 #define TXX9_IMCLK (txx9_gbus_clock / 2)
26 extern int txx9_ccfg_toeon;
28 int early_serial_txx9_setup(struct uart_port *port);
31 struct txx9_board_vec {
33 void (*prom_init)(void);
34 void (*mem_setup)(void);
35 void (*irq_setup)(void);
36 void (*time_init)(void);
37 void (*arch_init)(void);
38 void (*device_init)(void);
40 int (*pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
43 extern struct txx9_board_vec *txx9_board_vec;
44 extern int (*txx9_irq_dispatch)(int pending);
45 char *prom_getcmdline(void);
46 const char *prom_getenv(const char *name);
47 void txx9_wdt_init(unsigned long base);
48 void txx9_wdt_now(unsigned long base);
49 void txx9_spi_init(int busid, unsigned long base, int irq);
50 void txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr);
51 void txx9_sio_init(unsigned long baseaddr, int irq,
52 unsigned int line, unsigned int sclk, int nocts);
53 void prom_putchar(char c);
54 #ifdef CONFIG_EARLY_PRINTK
55 extern void (*txx9_prom_putchar)(char c);
56 void txx9_sio_putchar_init(unsigned long baseaddr);
58 static inline void txx9_sio_putchar_init(unsigned long baseaddr)
63 struct physmap_flash_data;
64 void txx9_physmap_flash_init(int no, unsigned long addr, unsigned long size,
65 const struct physmap_flash_data *pdata);
67 /* 8 bit version of __fls(): find first bit set (returns 0..7) */
68 static inline unsigned int __fls8(unsigned char x)
85 void txx9_iocled_init(unsigned long baseaddr,
86 int basenum, unsigned int num, int lowactive,
87 const char *color, char **deftriggers);
89 #endif /* __ASM_TXX9_GENERIC_H */