]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/xes/xpedite5200/law.c
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / board / xes / xpedite5200 / law.c
1 /*
2  * Copyright 2008 Extreme Engineering Solutions, Inc.
3  * Copyright 2008 Freescale Semiconductor, Inc.
4  *
5  * (C) Copyright 2000
6  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
7  *
8  * See file CREDITS for list of people who contributed to this
9  * project.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License as
13  * published by the Free Software Foundation; either version 2 of
14  * the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24  * MA 02111-1307 USA
25  */
26
27 #include <common.h>
28 #include <asm/fsl_law.h>
29 #include <asm/mmu.h>
30
31 /*
32  * Notes:
33  *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
34  *    If flash is 8M at default position (last 8M), no LAW needed.
35  */
36
37 struct law_entry law_table[] = {
38         /* LBC window - maps 256M 0xf0000000 -> 0xffffffff */
39         SET_LAW(CONFIG_SYS_FLASH_BASE2, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
40         SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
41 #if CONFIG_SYS_PCI1_MEM_PHYS
42         SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCI_1),
43         SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAWAR_SIZE_8M, LAW_TRGT_IF_PCI_1),
44 #endif
45 #if CONFIG_SYS_PCI2_MEM_PHYS
46         SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCI_2),
47         SET_LAW(CONFIG_SYS_PCI2_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI_2),
48 #endif
49 };
50
51 int num_law_entries = ARRAY_SIZE(law_table);