xref: /openbmc/u-boot/arch/powerpc/include/asm/config.h (revision 98f705c9cefdfdba62c069821bbba10273a0a8ed)
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
34fca43cc8SJohn Rigby #define CONFIG_SYS_BOOT_GET_CMDLINE
35fca43cc8SJohn Rigby #define CONFIG_SYS_BOOT_GET_KBD
36a47a12beSStefan Roese 
37a47a12beSStefan Roese #ifndef CONFIG_MAX_MEM_MAPPED
38*98f705c9SHeiko Schocher #if	defined(CONFIG_E500)		|| \
39d29d17d7SYork Sun 	defined(CONFIG_MPC86xx)		|| \
40d29d17d7SYork Sun 	defined(CONFIG_E300)
41a47a12beSStefan Roese #define CONFIG_MAX_MEM_MAPPED	((phys_size_t)2 << 30)
42a47a12beSStefan Roese #else
43a47a12beSStefan Roese #define CONFIG_MAX_MEM_MAPPED	(256 << 20)
44a47a12beSStefan Roese #endif
45a47a12beSStefan Roese #endif
46a47a12beSStefan Roese 
47a47a12beSStefan Roese /* Check if boards need to enable FSL DMA engine for SDRAM init */
48a47a12beSStefan Roese #if !defined(CONFIG_FSL_DMA) && defined(CONFIG_DDR_ECC)
49a47a12beSStefan Roese #if (defined(CONFIG_MPC83xx) && defined(CONFIG_DDR_ECC_INIT_VIA_DMA)) || \
50a47a12beSStefan Roese 	((defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)) && \
51a47a12beSStefan Roese 	!defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER))
52a47a12beSStefan Roese #define CONFIG_FSL_DMA
53a47a12beSStefan Roese #endif
54a47a12beSStefan Roese #endif
55a47a12beSStefan Roese 
56a47a12beSStefan Roese /*
57a47a12beSStefan Roese  * Provide a default boot page translation virtual address that lines up with
58a47a12beSStefan Roese  * Freescale's default e500 reset page.
59a47a12beSStefan Roese  */
60a47a12beSStefan Roese #if (defined(CONFIG_E500) && defined(CONFIG_MP))
61a47a12beSStefan Roese #ifndef CONFIG_BPTR_VIRT_ADDR
62a47a12beSStefan Roese #define CONFIG_BPTR_VIRT_ADDR	0xfffff000
63a47a12beSStefan Roese #endif
64a47a12beSStefan Roese #endif
65a47a12beSStefan Roese 
66f51cdaf1SBecky Bruce /* Since so many PPC SOCs have a semi-common LBC, define this here */
67f51cdaf1SBecky Bruce #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \
68f51cdaf1SBecky Bruce 	defined(CONFIG_MPC83xx)
69d789b5f5SDipen Dudhat #if !defined(CONFIG_FSL_IFC)
70f51cdaf1SBecky Bruce #define CONFIG_FSL_LBC
71f51cdaf1SBecky Bruce #endif
72d789b5f5SDipen Dudhat #endif
73f51cdaf1SBecky Bruce 
74063c1263SAndy Fleming /* The TSEC driver uses the PHYLIB infrastructure */
75063c1263SAndy Fleming #ifndef CONFIG_PHYLIB
76063c1263SAndy Fleming #if defined(CONFIG_TSEC_ENET)
77063c1263SAndy Fleming #define CONFIG_PHYLIB
78063c1263SAndy Fleming 
79063c1263SAndy Fleming #include <config_phylib_all_drivers.h>
80063c1263SAndy Fleming #endif /* TSEC_ENET */
81063c1263SAndy Fleming #endif /* !CONFIG_PHYLIB */
82063c1263SAndy Fleming 
83c916d7c9SKumar Gala /* The FMAN driver uses the PHYLIB infrastructure */
84c916d7c9SKumar Gala #if defined(CONFIG_FMAN_ENET)
85c916d7c9SKumar Gala #define CONFIG_PHYLIB
86c916d7c9SKumar Gala #endif
87c916d7c9SKumar Gala 
88f2a37fcdSAlbert Aribaud /* All PPC boards must swap IDE bytes */
89f2a37fcdSAlbert Aribaud #define CONFIG_IDE_SWAP_IO
90f2a37fcdSAlbert Aribaud 
91f27445cbSThomas Chou #if defined(CONFIG_DM_SERIAL)
92f27445cbSThomas Chou /*
93f27445cbSThomas Chou  * TODO: Convert this to a clock driver exists that can give us the UART
94f27445cbSThomas Chou  * clock here.
95f27445cbSThomas Chou  */
96f27445cbSThomas Chou #define CONFIG_SYS_NS16550_CLK		get_serial_clock()
97f27445cbSThomas Chou #endif
98f27445cbSThomas Chou 
99a47a12beSStefan Roese #endif /* _ASM_CONFIG_H_ */
100