1a47a12beSStefan Roese /* 2b8cdd014SPoonam Aggrwal * Copyright 2009-2011 Freescale Semiconductor, Inc. 3a47a12beSStefan Roese * 41a459660SWolfgang Denk * SPDX-License-Identifier: GPL-2.0+ 5a47a12beSStefan Roese */ 6a47a12beSStefan Roese 7a47a12beSStefan Roese #ifndef _ASM_CONFIG_H_ 8a47a12beSStefan Roese #define _ASM_CONFIG_H_ 9a47a12beSStefan Roese 10243be8e2SKumar Gala #ifdef CONFIG_MPC85xx 11243be8e2SKumar Gala #include <asm/config_mpc85xx.h> 12243be8e2SKumar Gala #endif 13243be8e2SKumar Gala 14243be8e2SKumar Gala #ifdef CONFIG_MPC86xx 15243be8e2SKumar Gala #include <asm/config_mpc86xx.h> 165614e71bSYork Sun #endif 175614e71bSYork Sun 185614e71bSYork Sun #ifdef CONFIG_MPC83xx 19243be8e2SKumar Gala #endif 20243be8e2SKumar Gala 217ac3cc20SYork Sun #ifndef HWCONFIG_BUFFER_SIZE 227ac3cc20SYork Sun #define HWCONFIG_BUFFER_SIZE 256 237ac3cc20SYork Sun #endif 247ac3cc20SYork Sun 25273feafeSMingkai Hu /* CONFIG_HARD_SPI triggers SPI bus initialization in PowerPC */ 26273feafeSMingkai Hu #if defined(CONFIG_MPC8XXX_SPI) || defined(CONFIG_FSL_ESPI) 27273feafeSMingkai Hu # ifndef CONFIG_HARD_SPI 28273feafeSMingkai Hu # define CONFIG_HARD_SPI 29273feafeSMingkai Hu # endif 30273feafeSMingkai Hu #endif 31273feafeSMingkai Hu 32a47a12beSStefan Roese #define CONFIG_LMB 33fca43cc8SJohn Rigby #define CONFIG_SYS_BOOT_RAMDISK_HIGH 34a47a12beSStefan Roese 35a47a12beSStefan Roese #ifndef CONFIG_MAX_MEM_MAPPED 3698f705c9SHeiko Schocher #if defined(CONFIG_E500) || \ 37d29d17d7SYork Sun defined(CONFIG_MPC86xx) || \ 38d29d17d7SYork Sun defined(CONFIG_E300) 39a47a12beSStefan Roese #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30) 40a47a12beSStefan Roese #else 41a47a12beSStefan Roese #define CONFIG_MAX_MEM_MAPPED (256 << 20) 42a47a12beSStefan Roese #endif 43a47a12beSStefan Roese #endif 44a47a12beSStefan Roese 45a47a12beSStefan Roese /* Check if boards need to enable FSL DMA engine for SDRAM init */ 46a47a12beSStefan Roese #if !defined(CONFIG_FSL_DMA) && defined(CONFIG_DDR_ECC) 47a47a12beSStefan Roese #if (defined(CONFIG_MPC83xx) && defined(CONFIG_DDR_ECC_INIT_VIA_DMA)) || \ 48a47a12beSStefan Roese ((defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)) && \ 49a47a12beSStefan Roese !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)) 50a47a12beSStefan Roese #define CONFIG_FSL_DMA 51a47a12beSStefan Roese #endif 52a47a12beSStefan Roese #endif 53a47a12beSStefan Roese 54a47a12beSStefan Roese /* 55a47a12beSStefan Roese * Provide a default boot page translation virtual address that lines up with 56a47a12beSStefan Roese * Freescale's default e500 reset page. 57a47a12beSStefan Roese */ 58a47a12beSStefan Roese #if (defined(CONFIG_E500) && defined(CONFIG_MP)) 59a47a12beSStefan Roese #ifndef CONFIG_BPTR_VIRT_ADDR 60a47a12beSStefan Roese #define CONFIG_BPTR_VIRT_ADDR 0xfffff000 61a47a12beSStefan Roese #endif 62a47a12beSStefan Roese #endif 63a47a12beSStefan Roese 64f51cdaf1SBecky Bruce /* Since so many PPC SOCs have a semi-common LBC, define this here */ 65f51cdaf1SBecky Bruce #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \ 66f51cdaf1SBecky Bruce defined(CONFIG_MPC83xx) 67d789b5f5SDipen Dudhat #if !defined(CONFIG_FSL_IFC) 68f51cdaf1SBecky Bruce #define CONFIG_FSL_LBC 69f51cdaf1SBecky Bruce #endif 70d789b5f5SDipen Dudhat #endif 71f51cdaf1SBecky Bruce 72063c1263SAndy Fleming /* The TSEC driver uses the PHYLIB infrastructure */ 73*990d06b0SZhao Qiang #if defined(CONFIG_TSEC_ENET) && defined(CONFIG_PHYLIB) 74063c1263SAndy Fleming #include <config_phylib_all_drivers.h> 75063c1263SAndy Fleming #endif /* TSEC_ENET */ 76063c1263SAndy Fleming 77c916d7c9SKumar Gala /* The FMAN driver uses the PHYLIB infrastructure */ 78c916d7c9SKumar Gala 79f2a37fcdSAlbert Aribaud /* All PPC boards must swap IDE bytes */ 80f2a37fcdSAlbert Aribaud #define CONFIG_IDE_SWAP_IO 81f2a37fcdSAlbert Aribaud 82f27445cbSThomas Chou #if defined(CONFIG_DM_SERIAL) 83f27445cbSThomas Chou /* 84f27445cbSThomas Chou * TODO: Convert this to a clock driver exists that can give us the UART 85f27445cbSThomas Chou * clock here. 86f27445cbSThomas Chou */ 87f27445cbSThomas Chou #define CONFIG_SYS_NS16550_CLK get_serial_clock() 88f27445cbSThomas Chou #endif 89f27445cbSThomas Chou 90a47a12beSStefan Roese #endif /* _ASM_CONFIG_H_ */ 91