huang lin | 47b4c22 | 2015-12-07 11:08:57 +0800 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2015 Rockchip Electronics Co., Ltd |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
Jeffy Chen | b6517a0 | 2016-01-14 10:19:41 +0800 | [diff] [blame] | 10 | #include <linux/sizes.h> |
huang lin | 47b4c22 | 2015-12-07 11:08:57 +0800 | [diff] [blame] | 11 | #include <configs/rk3036_common.h> |
| 12 | |
Jeffy Chen | 197e14e | 2016-01-14 10:19:38 +0800 | [diff] [blame] | 13 | #ifndef CONFIG_SPL_BUILD |
| 14 | |
Jeffy Chen | b6517a0 | 2016-01-14 10:19:41 +0800 | [diff] [blame] | 15 | /* Store env in emmc */ |
| 16 | #undef CONFIG_ENV_SIZE |
| 17 | #define CONFIG_ENV_SIZE SZ_32K |
| 18 | #undef CONFIG_ENV_IS_NOWHERE |
| 19 | #define CONFIG_ENV_IS_IN_MMC |
| 20 | #define CONFIG_SYS_MMC_ENV_DEV 0 /* emmc */ |
| 21 | #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ |
Jacob Chen | 21ba55d | 2016-11-18 15:54:26 +0800 | [diff] [blame] | 22 | |
| 23 | #ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM |
| 24 | /* SPL @ 32k for 34k |
| 25 | * u-boot directly after @ 68k for 400k or so |
| 26 | * ENV @ 992k |
| 27 | */ |
| 28 | #define CONFIG_ENV_OFFSET ((1024-32) * 1024) |
| 29 | #else |
| 30 | /* SPL @ 32k for ~36k |
| 31 | * ENV @ 96k |
| 32 | * u-boot @ 128K |
| 33 | */ |
| 34 | #define CONFIG_ENV_OFFSET (96 * 1024) |
| 35 | #endif |
Jeffy Chen | b6517a0 | 2016-01-14 10:19:41 +0800 | [diff] [blame] | 36 | |
Jeffy Chen | 197e14e | 2016-01-14 10:19:38 +0800 | [diff] [blame] | 37 | #endif |
| 38 | |
huang lin | 47b4c22 | 2015-12-07 11:08:57 +0800 | [diff] [blame] | 39 | #endif |