~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/bmips.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * Copyright (C) 2011 by Kevin Cernekee (cernekee@gmail.com)
  7  *
  8  * Definitions for BMIPS processors
  9  */
 10 #ifndef _ASM_BMIPS_H
 11 #define _ASM_BMIPS_H
 12 
 13 #include <linux/compiler.h>
 14 #include <linux/linkage.h>
 15 #include <asm/addrspace.h>
 16 #include <asm/mipsregs.h>
 17 #include <asm/hazards.h>
 18 
 19 /* NOTE: the CBR register returns a PA, and it can be above 0xff00_0000 */
 20 #define BMIPS_GET_CBR()                 ((void __iomem *)(CKSEG1 | \
 21                                          (unsigned long) \
 22                                          ((read_c0_brcm_cbr() >> 18) << 18)))
 23 
 24 #define BMIPS_RAC_CONFIG                0x00000000
 25 #define BMIPS_RAC_ADDRESS_RANGE         0x00000004
 26 #define BMIPS_RAC_CONFIG_1              0x00000008
 27 #define BMIPS_L2_CONFIG                 0x0000000c
 28 #define BMIPS_LMB_CONTROL               0x0000001c
 29 #define BMIPS_SYSTEM_BASE               0x00000020
 30 #define BMIPS_PERF_GLOBAL_CONTROL       0x00020000
 31 #define BMIPS_PERF_CONTROL_0            0x00020004
 32 #define BMIPS_PERF_CONTROL_1            0x00020008
 33 #define BMIPS_PERF_COUNTER_0            0x00020010
 34 #define BMIPS_PERF_COUNTER_1            0x00020014
 35 #define BMIPS_PERF_COUNTER_2            0x00020018
 36 #define BMIPS_PERF_COUNTER_3            0x0002001c
 37 #define BMIPS_RELO_VECTOR_CONTROL_0     0x00030000
 38 #define BMIPS_RELO_VECTOR_CONTROL_1     0x00038000
 39 
 40 #define BMIPS_NMI_RESET_VEC             0x80000000
 41 #define BMIPS_WARM_RESTART_VEC          0x80000380
 42 
 43 #define ZSCM_REG_BASE                   0x97000000
 44 
 45 #if !defined(__ASSEMBLY__)
 46 
 47 #include <linux/cpumask.h>
 48 #include <asm/r4kcache.h>
 49 #include <asm/smp-ops.h>
 50 
 51 extern const struct plat_smp_ops bmips43xx_smp_ops;
 52 extern const struct plat_smp_ops bmips5000_smp_ops;
 53 
 54 static inline int register_bmips_smp_ops(void)
 55 {
 56 #if IS_ENABLED(CONFIG_CPU_BMIPS) && IS_ENABLED(CONFIG_SMP)
 57         switch (current_cpu_type()) {
 58         case CPU_BMIPS32:
 59         case CPU_BMIPS3300:
 60                 return register_up_smp_ops();
 61         case CPU_BMIPS4350:
 62         case CPU_BMIPS4380:
 63                 register_smp_ops(&bmips43xx_smp_ops);
 64                 break;
 65         case CPU_BMIPS5000:
 66                 register_smp_ops(&bmips5000_smp_ops);
 67                 break;
 68         default:
 69                 return -ENODEV;
 70         }
 71 
 72         return 0;
 73 #else
 74         return -ENODEV;
 75 #endif
 76 }
 77 
 78 extern char bmips_reset_nmi_vec[];
 79 extern char bmips_reset_nmi_vec_end[];
 80 extern char bmips_smp_movevec[];
 81 extern char bmips_smp_int_vec[];
 82 extern char bmips_smp_int_vec_end[];
 83 
 84 extern void __iomem *bmips_cbr_addr;
 85 extern int bmips_smp_enabled;
 86 extern int bmips_cpu_offset;
 87 extern cpumask_t bmips_booted_mask;
 88 extern unsigned long bmips_tp1_irqs;
 89 
 90 extern void bmips_ebase_setup(void);
 91 extern asmlinkage void plat_wired_tlb_setup(void);
 92 extern void bmips_cpu_setup(void);
 93 
 94 static inline unsigned long bmips_read_zscm_reg(unsigned int offset)
 95 {
 96         unsigned long ret;
 97 
 98         barrier();
 99         cache_op(Index_Load_Tag_S, ZSCM_REG_BASE + offset);
100         __sync();
101         _ssnop();
102         _ssnop();
103         _ssnop();
104         _ssnop();
105         _ssnop();
106         _ssnop();
107         _ssnop();
108         ret = read_c0_ddatalo();
109         _ssnop();
110 
111         return ret;
112 }
113 
114 static inline void bmips_write_zscm_reg(unsigned int offset, unsigned long data)
115 {
116         write_c0_ddatalo(data);
117         _ssnop();
118         _ssnop();
119         _ssnop();
120         cache_op(Index_Store_Tag_S, ZSCM_REG_BASE + offset);
121         _ssnop();
122         _ssnop();
123         _ssnop();
124         barrier();
125 }
126 
127 #endif /* !defined(__ASSEMBLY__) */
128 
129 #endif /* _ASM_BMIPS_H */
130 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php