Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef LINUX_BCMA_DRIVER_MIPS_H_
0003 #define LINUX_BCMA_DRIVER_MIPS_H_
0004 
0005 #define BCMA_MIPS_IPSFLAG       0x0F08
0006 /* which sbflags get routed to mips interrupt 1 */
0007 #define  BCMA_MIPS_IPSFLAG_IRQ1     0x0000003F
0008 #define  BCMA_MIPS_IPSFLAG_IRQ1_SHIFT   0
0009 /* which sbflags get routed to mips interrupt 2 */
0010 #define  BCMA_MIPS_IPSFLAG_IRQ2     0x00003F00
0011 #define  BCMA_MIPS_IPSFLAG_IRQ2_SHIFT   8
0012 /* which sbflags get routed to mips interrupt 3 */
0013 #define  BCMA_MIPS_IPSFLAG_IRQ3     0x003F0000
0014 #define  BCMA_MIPS_IPSFLAG_IRQ3_SHIFT   16
0015 /* which sbflags get routed to mips interrupt 4 */
0016 #define  BCMA_MIPS_IPSFLAG_IRQ4     0x3F000000
0017 #define  BCMA_MIPS_IPSFLAG_IRQ4_SHIFT   24
0018 
0019 /* MIPS 74K core registers */
0020 #define BCMA_MIPS_MIPS74K_CORECTL   0x0000
0021 #define BCMA_MIPS_MIPS74K_EXCEPTBASE    0x0004
0022 #define BCMA_MIPS_MIPS74K_BIST      0x000C
0023 #define BCMA_MIPS_MIPS74K_INTMASK_INT0  0x0014
0024 #define BCMA_MIPS_MIPS74K_INTMASK(int) \
0025     ((int) * 4 + BCMA_MIPS_MIPS74K_INTMASK_INT0)
0026 #define BCMA_MIPS_MIPS74K_NMIMASK   0x002C
0027 #define BCMA_MIPS_MIPS74K_GPIOSEL   0x0040
0028 #define BCMA_MIPS_MIPS74K_GPIOOUT   0x0044
0029 #define BCMA_MIPS_MIPS74K_GPIOEN    0x0048
0030 #define BCMA_MIPS_MIPS74K_CLKCTLST  0x01E0
0031 
0032 #define BCMA_MIPS_OOBSELINA74       0x004
0033 #define BCMA_MIPS_OOBSELOUTA30      0x100
0034 
0035 struct bcma_device;
0036 
0037 struct bcma_drv_mips {
0038     struct bcma_device *core;
0039     u8 setup_done:1;
0040     u8 early_setup_done:1;
0041 };
0042 
0043 extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
0044 
0045 #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */