blob: afe79d40a99eaf36dd4eea67c5a0234a40eff683 [file] [log] [blame]
Michael Buesch61e115a2007-09-18 15:12:50 -04001#ifndef LINUX_SSB_MIPSCORE_H_
2#define LINUX_SSB_MIPSCORE_H_
3
4#ifdef CONFIG_SSB_DRIVER_MIPS
5
6struct ssb_device;
7
8struct ssb_serial_port {
9 void *regs;
10 unsigned long clockspeed;
11 unsigned int irq;
12 unsigned int baud_base;
13 unsigned int reg_shift;
14};
15
Hauke Mehrtens54c97492012-09-29 20:36:17 +020016struct ssb_pflash {
Hauke Mehrtensd9541622012-09-29 20:36:18 +020017 bool present;
Hauke Mehrtens54c97492012-09-29 20:36:17 +020018 u8 buswidth;
19 u32 window;
20 u32 window_size;
21};
Michael Buesch61e115a2007-09-18 15:12:50 -040022
23struct ssb_mipscore {
24 struct ssb_device *dev;
25
26 int nr_serial_ports;
27 struct ssb_serial_port serial_ports[4];
28
Hauke Mehrtens54c97492012-09-29 20:36:17 +020029 struct ssb_pflash pflash;
Michael Buesch61e115a2007-09-18 15:12:50 -040030};
31
32extern void ssb_mipscore_init(struct ssb_mipscore *mcore);
33extern u32 ssb_cpu_clock(struct ssb_mipscore *mcore);
34
35extern unsigned int ssb_mips_irq(struct ssb_device *dev);
36
37
38#else /* CONFIG_SSB_DRIVER_MIPS */
39
40struct ssb_mipscore {
41};
42
43static inline
44void ssb_mipscore_init(struct ssb_mipscore *mcore)
45{
46}
47
Hauke Mehrtensa6ca2e12013-01-26 21:38:35 +010048static inline unsigned int ssb_mips_irq(struct ssb_device *dev)
49{
50 return 0;
51}
52
Michael Buesch61e115a2007-09-18 15:12:50 -040053#endif /* CONFIG_SSB_DRIVER_MIPS */
54
55#endif /* LINUX_SSB_MIPSCORE_H_ */