xref: /rk3399_rockchip-uboot/board/freescale/mpc8568mds/law.c (revision 326ea986ac150acdc7656d57fca647db80b50158)
14d3521ccSKumar Gala /*
25f7bbd13SKumar Gala  * Copyright 2008, 2010-2011 Freescale Semiconductor, Inc.
34d3521ccSKumar Gala  *
44d3521ccSKumar Gala  * (C) Copyright 2000
54d3521ccSKumar Gala  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
64d3521ccSKumar Gala  *
7*1a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
84d3521ccSKumar Gala  */
94d3521ccSKumar Gala 
104d3521ccSKumar Gala #include <common.h>
114d3521ccSKumar Gala #include <asm/fsl_law.h>
124d3521ccSKumar Gala #include <asm/mmu.h>
134d3521ccSKumar Gala 
144d3521ccSKumar Gala /*
154d3521ccSKumar Gala  * LAW(Local Access Window) configuration:
164d3521ccSKumar Gala  *
174d3521ccSKumar Gala  *0)   0x0000_0000   0x7fff_ffff     DDR                     2G
184d3521ccSKumar Gala  *1)   0x8000_0000   0x9fff_ffff     PCI1 MEM                512MB
194d3521ccSKumar Gala  *2)   0xa000_0000   0xbfff_ffff     PCIe MEM                512MB
204d3521ccSKumar Gala  *-)   0xe000_0000   0xe00f_ffff     CCSR                    1M
214d3521ccSKumar Gala  *3)   0xe200_0000   0xe27f_ffff     PCI1 I/O                8M
224d3521ccSKumar Gala  *4)   0xe280_0000   0xe2ff_ffff     PCIe I/O                8M
234d3521ccSKumar Gala  *5)   0xc000_0000   0xdfff_ffff     SRIO                    512MB
244d3521ccSKumar Gala  *6.a) 0xf000_0000   0xf3ff_ffff     SDRAM                   64MB
254d3521ccSKumar Gala  *6.b) 0xf800_0000   0xf800_7fff     BCSR                    32KB
264d3521ccSKumar Gala  *6.c) 0xf800_8000   0xf800_ffff     PIB (CS4)		     32KB
274d3521ccSKumar Gala  *6.d) 0xf801_0000   0xf801_7fff     PIB (CS5)		     32KB
284d3521ccSKumar Gala  *6.e) 0xfe00_0000   0xffff_ffff     Flash                   32MB
294d3521ccSKumar Gala  *
304d3521ccSKumar Gala  *Notes:
314d3521ccSKumar Gala  *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
324d3521ccSKumar Gala  *    If flash is 8M at default position (last 8M), no LAW needed.
334d3521ccSKumar Gala  *
344d3521ccSKumar Gala  */
354d3521ccSKumar Gala 
364d3521ccSKumar Gala struct law_entry law_table[] = {
374d3521ccSKumar Gala 	/* LBC window - maps 256M.  That's SDRAM, BCSR, PIBs, and Flash */
386d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 	SET_LAW(CONFIG_SYS_LBC_SDRAM_BASE, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
394d3521ccSKumar Gala };
404d3521ccSKumar Gala 
414d3521ccSKumar Gala int num_law_entries = ARRAY_SIZE(law_table);
42