Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef LINUX_SSB_MIPSCORE_H_
0003 #define LINUX_SSB_MIPSCORE_H_
0004 
0005 #ifdef CONFIG_SSB_DRIVER_MIPS
0006 
0007 struct ssb_device;
0008 
0009 struct ssb_serial_port {
0010     void *regs;
0011     unsigned long clockspeed;
0012     unsigned int irq;
0013     unsigned int baud_base;
0014     unsigned int reg_shift;
0015 };
0016 
0017 struct ssb_pflash {
0018     bool present;
0019     u8 buswidth;
0020     u32 window;
0021     u32 window_size;
0022 };
0023 
0024 #ifdef CONFIG_SSB_SFLASH
0025 struct ssb_sflash {
0026     bool present;
0027     u32 window;
0028     u32 blocksize;
0029     u16 numblocks;
0030     u32 size;
0031 
0032     void *priv;
0033 };
0034 #endif
0035 
0036 struct ssb_mipscore {
0037     struct ssb_device *dev;
0038 
0039     int nr_serial_ports;
0040     struct ssb_serial_port serial_ports[4];
0041 
0042     struct ssb_pflash pflash;
0043 #ifdef CONFIG_SSB_SFLASH
0044     struct ssb_sflash sflash;
0045 #endif
0046 };
0047 
0048 extern void ssb_mipscore_init(struct ssb_mipscore *mcore);
0049 extern u32 ssb_cpu_clock(struct ssb_mipscore *mcore);
0050 
0051 extern unsigned int ssb_mips_irq(struct ssb_device *dev);
0052 
0053 
0054 #else /* CONFIG_SSB_DRIVER_MIPS */
0055 
0056 struct ssb_mipscore {
0057 };
0058 
0059 static inline
0060 void ssb_mipscore_init(struct ssb_mipscore *mcore)
0061 {
0062 }
0063 
0064 static inline unsigned int ssb_mips_irq(struct ssb_device *dev)
0065 {
0066     return 0;
0067 }
0068 
0069 #endif /* CONFIG_SSB_DRIVER_MIPS */
0070 
0071 #endif /* LINUX_SSB_MIPSCORE_H_ */