blob: 5d057db53071a1b283fb77c6cec75eeb4750da4f [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 {
17 u8 buswidth;
18 u32 window;
19 u32 window_size;
20};
Michael Buesch61e115a2007-09-18 15:12:50 -040021
22struct ssb_mipscore {
23 struct ssb_device *dev;
24
25 int nr_serial_ports;
26 struct ssb_serial_port serial_ports[4];
27
Hauke Mehrtens54c97492012-09-29 20:36:17 +020028 struct ssb_pflash pflash;
Michael Buesch61e115a2007-09-18 15:12:50 -040029};
30
31extern void ssb_mipscore_init(struct ssb_mipscore *mcore);
32extern u32 ssb_cpu_clock(struct ssb_mipscore *mcore);
33
34extern unsigned int ssb_mips_irq(struct ssb_device *dev);
35
36
37#else /* CONFIG_SSB_DRIVER_MIPS */
38
39struct ssb_mipscore {
40};
41
42static inline
43void ssb_mipscore_init(struct ssb_mipscore *mcore)
44{
45}
46
47#endif /* CONFIG_SSB_DRIVER_MIPS */
48
49#endif /* LINUX_SSB_MIPSCORE_H_ */