1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright 2014 Freescale Semiconductor, Inc. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * SPDX-License-Identifier: GPL-2.0+ 5*4882a593Smuzhiyun */ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #include <common.h> 8*4882a593Smuzhiyun #include <asm/fsl_law.h> 9*4882a593Smuzhiyun #include <asm/mmu.h> 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun struct law_entry law_table[] = { 12*4882a593Smuzhiyun SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_IFC), 13*4882a593Smuzhiyun #ifdef CONFIG_SYS_BMAN_MEM_PHYS 14*4882a593Smuzhiyun SET_LAW(CONFIG_SYS_BMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_BMAN), 15*4882a593Smuzhiyun #endif 16*4882a593Smuzhiyun #ifdef CONFIG_SYS_QMAN_MEM_PHYS 17*4882a593Smuzhiyun SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_QMAN), 18*4882a593Smuzhiyun #endif 19*4882a593Smuzhiyun #ifdef CONFIG_SYS_CPLD_BASE_PHYS 20*4882a593Smuzhiyun SET_LAW(CONFIG_SYS_CPLD_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_IFC), 21*4882a593Smuzhiyun #endif 22*4882a593Smuzhiyun #ifdef CONFIG_SYS_DCSRBAR_PHYS 23*4882a593Smuzhiyun /* Limit DCSR to 32M to access NPC Trace Buffer */ 24*4882a593Smuzhiyun SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_DCSR), 25*4882a593Smuzhiyun #endif 26*4882a593Smuzhiyun #ifdef CONFIG_SYS_NAND_BASE_PHYS 27*4882a593Smuzhiyun SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_IFC), 28*4882a593Smuzhiyun #endif 29*4882a593Smuzhiyun }; 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun int num_law_entries = ARRAY_SIZE(law_table); 32