xref: /OK3568_Linux_fs/u-boot/board/xes/xpedite537x/law.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright 2008 Extreme Engineering Solutions, Inc.
3*4882a593Smuzhiyun  * Copyright 2008 Freescale Semiconductor, Inc.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * (C) Copyright 2000
6*4882a593Smuzhiyun  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * SPDX-License-Identifier:	GPL-2.0+
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #include <common.h>
12*4882a593Smuzhiyun #include <asm/fsl_law.h>
13*4882a593Smuzhiyun #include <asm/mmu.h>
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun /*
16*4882a593Smuzhiyun  * Notes:
17*4882a593Smuzhiyun  *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
18*4882a593Smuzhiyun  *    If flash is 8M at default position (last 8M), no LAW needed.
19*4882a593Smuzhiyun  */
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun struct law_entry law_table[] = {
22*4882a593Smuzhiyun 	SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
23*4882a593Smuzhiyun 	SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
24*4882a593Smuzhiyun };
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun int num_law_entries = ARRAY_SIZE(law_table);
27