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

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/mach-ralink/mt7620.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 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  *
  4  * Parts of this file are based on Ralink's 2.6.21 BSP
  5  *
  6  * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
  7  * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  8  * Copyright (C) 2013 John Crispin <john@phrozen.org>
  9  */
 10 
 11 #ifndef _MT7620_REGS_H_
 12 #define _MT7620_REGS_H_
 13 
 14 #define IOMEM(x)                        ((void __iomem *)(KSEG1ADDR(x)))
 15 #define MT7620_SYSC_BASE                IOMEM(0x10000000)
 16 
 17 #define SYSC_REG_CHIP_NAME0             0x00
 18 #define SYSC_REG_CHIP_NAME1             0x04
 19 #define SYSC_REG_EFUSE_CFG              0x08
 20 #define SYSC_REG_CHIP_REV               0x0c
 21 #define SYSC_REG_SYSTEM_CONFIG0         0x10
 22 #define SYSC_REG_SYSTEM_CONFIG1         0x14
 23 
 24 #define MT7620_CHIP_NAME0               0x3637544d
 25 #define MT7620_CHIP_NAME1               0x20203032
 26 #define MT7628_CHIP_NAME1               0x20203832
 27 
 28 #define CHIP_REV_PKG_MASK               0x1
 29 #define CHIP_REV_PKG_SHIFT              16
 30 #define CHIP_REV_VER_MASK               0xf
 31 #define CHIP_REV_VER_SHIFT              8
 32 #define CHIP_REV_ECO_MASK               0xf
 33 
 34 #define SYSCFG0_DRAM_TYPE_MASK          0x3
 35 #define SYSCFG0_DRAM_TYPE_SHIFT         4
 36 #define SYSCFG0_DRAM_TYPE_SDRAM         0
 37 #define SYSCFG0_DRAM_TYPE_DDR1          1
 38 #define SYSCFG0_DRAM_TYPE_DDR2          2
 39 #define SYSCFG0_DRAM_TYPE_UNKNOWN       3
 40 
 41 #define SYSCFG0_DRAM_TYPE_DDR2_MT7628   0
 42 #define SYSCFG0_DRAM_TYPE_DDR1_MT7628   1
 43 
 44 #define MT7620_DRAM_BASE                0x0
 45 #define MT7620_SDRAM_SIZE_MIN           2
 46 #define MT7620_SDRAM_SIZE_MAX           64
 47 #define MT7620_DDR1_SIZE_MIN            32
 48 #define MT7620_DDR1_SIZE_MAX            128
 49 #define MT7620_DDR2_SIZE_MIN            32
 50 #define MT7620_DDR2_SIZE_MAX            256
 51 
 52 extern enum ralink_soc_type ralink_soc;
 53 
 54 static inline int is_mt76x8(void)
 55 {
 56         return ralink_soc == MT762X_SOC_MT7628AN ||
 57                ralink_soc == MT762X_SOC_MT7688;
 58 }
 59 
 60 static inline int mt7620_get_eco(void)
 61 {
 62         return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK;
 63 }
 64 
 65 #endif
 66 

~ [ 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