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