Valentin Longchamp | c98bf29 | 2013-10-18 11:47:24 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * (C) Copyright 2013 Keymile AG |
| 3 | * Valentin Longchamp <valentin.longchamp@keymile.com> |
| 4 | * |
| 5 | * Copyright 2008-2011 Freescale Semiconductor, Inc. |
| 6 | * |
| 7 | * (C) Copyright 2000 |
| 8 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 9 | * |
| 10 | * SPDX-License-Identifier: GPL-2.0+ |
| 11 | */ |
| 12 | |
| 13 | #include <common.h> |
| 14 | #include <asm/fsl_law.h> |
| 15 | #include <asm/mmu.h> |
| 16 | |
| 17 | struct law_entry law_table[] = { |
| 18 | #ifdef CONFIG_SYS_BMAN_MEM_PHYS |
| 19 | SET_LAW(CONFIG_SYS_BMAN_MEM_PHYS, LAW_SIZE_2M, LAW_TRGT_IF_BMAN), |
| 20 | #endif |
| 21 | #ifdef CONFIG_SYS_QMAN_MEM_PHYS |
| 22 | SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_2M, LAW_TRGT_IF_QMAN), |
| 23 | #endif |
| 24 | #ifdef CONFIG_SYS_DCSRBAR_PHYS |
| 25 | /* Limit DCSR to 32M to access NPC Trace Buffer */ |
| 26 | SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_DCSR), |
| 27 | #endif |
| 28 | #ifdef CONFIG_SYS_NAND_BASE_PHYS |
| 29 | SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_32K, LAW_TRGT_IF_LBC), |
| 30 | #endif |
| 31 | SET_LAW(CONFIG_SYS_QRIO_BASE_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_LBC), |
| 32 | #ifdef CONFIG_SYS_LBAPP1_BASE_PHYS |
| 33 | SET_LAW(CONFIG_SYS_LBAPP1_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC), |
| 34 | #endif |
| 35 | #ifdef CONFIG_SYS_LBAPP2_BASE_PHYS |
| 36 | SET_LAW(CONFIG_SYS_LBAPP2_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC), |
| 37 | #endif |
| 38 | }; |
| 39 | |
| 40 | int num_law_entries = ARRAY_SIZE(law_table); |