Home | History | Annotate | Line # | Download | only in nvidia
tegra_mcreg.h revision 1.2.2.1
      1  1.2.2.1  pgoyette /* $NetBSD: tegra_mcreg.h,v 1.2.2.1 2017/03/20 06:57:11 pgoyette Exp $ */
      2      1.1  jmcneill 
      3      1.1  jmcneill /*-
      4      1.1  jmcneill  * Copyright (c) 2015 Jared D. McNeill <jmcneill (at) invisible.ca>
      5      1.1  jmcneill  * All rights reserved.
      6      1.1  jmcneill  *
      7      1.1  jmcneill  * Redistribution and use in source and binary forms, with or without
      8      1.1  jmcneill  * modification, are permitted provided that the following conditions
      9      1.1  jmcneill  * are met:
     10      1.1  jmcneill  * 1. Redistributions of source code must retain the above copyright
     11      1.1  jmcneill  *    notice, this list of conditions and the following disclaimer.
     12      1.1  jmcneill  * 2. Redistributions in binary form must reproduce the above copyright
     13      1.1  jmcneill  *    notice, this list of conditions and the following disclaimer in the
     14      1.1  jmcneill  *    documentation and/or other materials provided with the distribution.
     15      1.1  jmcneill  *
     16      1.1  jmcneill  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17      1.1  jmcneill  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18      1.1  jmcneill  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19      1.1  jmcneill  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20      1.1  jmcneill  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21      1.1  jmcneill  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     22      1.1  jmcneill  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23      1.1  jmcneill  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24      1.1  jmcneill  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25      1.1  jmcneill  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26      1.1  jmcneill  * SUCH DAMAGE.
     27      1.1  jmcneill  */
     28      1.1  jmcneill 
     29      1.1  jmcneill #ifndef _ARM_TEGRA_MCREG_H
     30      1.1  jmcneill #define _ARM_TEGRA_MCREG_H
     31      1.1  jmcneill 
     32      1.2  jakllsch #define MC_INTSTATUS_REG	0x00
     33      1.2  jakllsch #define MC_INTMASK_REG		0x04
     34      1.2  jakllsch 
     35      1.2  jakllsch #define MC_INT_DECERR_MTS		__BIT(16)
     36      1.2  jakllsch #define MC_INT_SECERR_SEC		__BIT(13)
     37      1.2  jakllsch #define MC_INT_DECERR_VPR		__BIT(12)
     38      1.2  jakllsch #define MC_INT_INVALID_APB_ASID_UPDATE	__BIT(11)
     39      1.2  jakllsch #define MC_INT_INVALID_SMMU_PAGE	__BIT(10)
     40      1.2  jakllsch #define MC_INT_SECURITY_VIOLATION	__BIT(8)
     41      1.2  jakllsch #define MC_INT_ARBITRATION_EMEM		__BIT(9)
     42      1.2  jakllsch #define MC_INT_DECERR_EMEM		__BIT(6)
     43      1.2  jakllsch #define MC_INT__ALL			(MC_INT_DECERR_MTS | \
     44      1.2  jakllsch     MC_INT_SECERR_SEC | MC_INT_DECERR_VPR | \
     45      1.2  jakllsch     MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE | \
     46      1.2  jakllsch     MC_INT_SECURITY_VIOLATION | MC_INT_ARBITRATION_EMEM | \
     47      1.2  jakllsch     MC_INT_DECERR_EMEM)
     48      1.2  jakllsch 
     49      1.2  jakllsch #define MC_ERR_STATUS_REG	0x08
     50      1.2  jakllsch 
     51      1.2  jakllsch #define MC_ERR_TYPE			__BITS(30,28)
     52      1.2  jakllsch #define MC_ERR_INVALID_SMMU_PAGE_READABLE	__BIT(27)
     53      1.2  jakllsch #define MC_ERR_INVALID_SMMU_PAGE_WRITABLE	__BIT(26)
     54      1.2  jakllsch #define MC_ERR_INVALID_SMMU_PAGE_NONSECURE	__BIT(25)
     55      1.2  jakllsch #define MC_ERR_ADDR_HI			__BITS(21,20)
     56      1.2  jakllsch #define MC_ERR_SWAP			__BIT(18)
     57      1.2  jakllsch #define MC_ERR_SECURITY			__BIT(17)
     58      1.2  jakllsch #define MC_ERR_RW			__BIT(16)
     59      1.2  jakllsch #define MC_ERR_RW_READ			0
     60      1.2  jakllsch #define MC_ERR_RW_WRITE			1
     61      1.2  jakllsch #define MC_ERR_ADR1			__BITS(14,12)
     62      1.2  jakllsch #define MC_ERR_ID			__BITS(6,0)
     63      1.2  jakllsch 
     64      1.2  jakllsch #define MC_ERR_ADR_REG		0x0c
     65      1.2  jakllsch 
     66      1.2  jakllsch #define MC_SMMU_CONFIG_REG	0x10
     67      1.2  jakllsch #define MC_SMMU_ENABLE			__BIT(0)
     68      1.2  jakllsch 
     69      1.2  jakllsch #define MC_SMMU_TLB_CONFIG_REG	0x14
     70      1.2  jakllsch #define MC_SMMU_PTC_CONFIG_REG	0x18
     71      1.2  jakllsch #define MC_SMMU_PTB_ASID_REG	0x1c
     72      1.2  jakllsch #define MC_SMMU_PTB_DATA_REG	0x20
     73      1.2  jakllsch #define MC_SMMU_TLB_FLUSH_REG	0x30
     74      1.2  jakllsch #define MC_SMMU_PTC_FLUSH_REG	0x34
     75      1.2  jakllsch 
     76      1.1  jmcneill #define MC_EMEM_CFG_0_REG	0x50
     77      1.1  jmcneill 
     78      1.1  jmcneill #define MC_EMEM_CFG_0_EMEM_BOM		__BIT(31)
     79      1.1  jmcneill #define MC_EMEM_CFG_0_EMEM_SIZE_MB	__BITS(13,0)
     80      1.1  jmcneill 
     81  1.2.2.1  pgoyette #define MC_SMMU_TRANSLATION_ENABLE_0_REG	0x228
     82  1.2.2.1  pgoyette #define MC_SMMU_AFIR_ENABLE	__BIT(14)
     83  1.2.2.1  pgoyette #define MC_SMMU_TRANSLATION_ENABLE_1_REG	0x22c
     84  1.2.2.1  pgoyette #define MC_SMMU_AFIW_ENABLE	__BIT(17)
     85  1.2.2.1  pgoyette #define MC_SMMU_TRANSLATION_ENABLE_2_REG	0x230
     86  1.2.2.1  pgoyette #define MC_SMMU_TRANSLATION_ENABLE_3_REG	0x234
     87  1.2.2.1  pgoyette #define MC_SMMU_AFI_ASID_REG	0x238
     88  1.2.2.1  pgoyette 
     89      1.1  jmcneill #endif /* _ARM_TEGRA_MCREG_H */
     90