2 * Copyright 2007 Freescale Semiconductor.
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * Version 2 as published by the Free Software Foundation.
12 #include <ppc_asm.tmpl>
14 #include <asm/cache.h>
19 #define LAWAR_TRGT_PCI1 0x00000000
20 #define LAWAR_TRGT_PCIE1 0x00200000
21 #define LAWAR_TRGT_PCIE2 0x00100000
22 #define LAWAR_TRGT_LBC 0x00400000
23 #define LAWAR_TRGT_DDR 0x00f00000
25 #if !defined(CONFIG_SPD_EEPROM)
26 #define LAWBAR1 ((CFG_DDR_SDRAM_BASE>>12) & 0xffffff)
27 #define LAWAR1 (LAWAR_EN | LAWAR_TRGT_DDR | (LAWAR_SIZE & LAWAR_SIZE_512M))
30 #define LAWAR1 ((LAWAR_TRGT_DDR | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
33 #define LAWBAR2 ((CFG_PCIE1_MEM_BASE>>12) & 0xffffff)
34 #define LAWAR2 (LAWAR_EN | LAWAR_TRGT_PCIE1 | (LAWAR_SIZE & LAWAR_SIZE_256M))
36 #define LAWBAR3 ((CFG_PCIE2_MEM_BASE>>12) & 0xffffff)
37 #define LAWAR3 (LAWAR_EN | LAWAR_TRGT_PCIE2 | (LAWAR_SIZE & LAWAR_SIZE_256M))
39 #define LAWBAR4 ((PIXIS_BASE>>12) & 0xffffff)
40 #define LAWAR4 (LAWAR_EN | LAWAR_TRGT_LBC | (LAWAR_SIZE & LAWAR_SIZE_2M))
42 #define LAWBAR5 ((CFG_PCIE1_IO_PHYS>>12) & 0xffffff)
43 #define LAWAR5 (LAWAR_EN | LAWAR_TRGT_PCIE1 | (LAWAR_SIZE & LAWAR_SIZE_1M))
45 #define LAWBAR6 ((CFG_PCIE2_IO_PHYS>>12) & 0xffffff)
46 #define LAWAR6 (LAWAR_EN | LAWAR_TRGT_PCIE2 | (LAWAR_SIZE & LAWAR_SIZE_1M))
48 #define LAWBAR7 ((CFG_FLASH_BASE >>12) & 0xffffff)
49 #define LAWAR7 (LAWAR_EN | LAWAR_TRGT_LBC | (LAWAR_SIZE & LAWAR_SIZE_256M))
51 #define LAWBAR8 ((CFG_PCI1_MEM_PHYS>>12) & 0xffffff)
52 #define LAWAR8 (LAWAR_EN | LAWAR_TRGT_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_256M))
54 #define LAWBAR9 ((CFG_PCI1_IO_PHYS>>12) & 0xffffff)
55 #define LAWAR9 (LAWAR_EN | LAWAR_TRGT_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_1M))
58 .section .bootpg, "ax"
62 ori r7,r7,CFG_CCSRBAR@l
67 /* Skip LAWAR0, start at LAWAR1 */
102 /* LAWBAR5, LAWAR5 */
111 /* LAWBAR6, LAWAR6 */
120 /* LAWBAR7, LAWAR7 */
129 /* LAWBAR8, LAWAR8 */
138 /* LAWBAR9, LAWAR9 */