[MIPS] TXx9: Make tx4938-specific code more independent
[safe/jmp/linux-2.6] / include / asm-mips / txx9 / generic.h
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
11 #include <linux/init.h>
12 #include <linux/ioport.h>       /* for struct resource */
13
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,
19                        unsigned long size);
20
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)
25
26 extern int txx9_ccfg_toeon;
27 struct uart_port;
28 int early_serial_txx9_setup(struct uart_port *port);
29
30 struct pci_dev;
31 struct txx9_board_vec {
32         const char *system;
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);
39 #ifdef CONFIG_PCI
40         int (*pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
41 #endif
42 };
43 extern struct txx9_board_vec *txx9_board_vec;
44 extern int (*txx9_irq_dispatch)(int pending);
45 void prom_init_cmdline(void);
46 char *prom_getcmdline(void);
47 void txx9_wdt_init(unsigned long base);
48 void txx9_spi_init(int busid, unsigned long base, int irq);
49 void txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr);
50
51 #endif /* __ASM_TXX9_GENERIC_H */