From 88a0b7694ffb69b1d1ff55d5f75a26722a86748a Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Tue, 20 Mar 2018 15:03:40 +0800 Subject: Drop CONFIG_FTSDC010_NUMBER CONFIG_FTSDC010_NUMBER was not used anymore, can be removed now. So CONFIG_FTSDC010_NUMBER can also be removed from config_whitelist.txt. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Cc: Greentime Hu --- include/configs/adp-ae3xx.h | 1 - include/configs/adp-ag101p.h | 1 - include/configs/nx25-ae250.h | 1 - 3 files changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/adp-ae3xx.h b/include/configs/adp-ae3xx.h index f5a8dec24a3..2ee808d08c8 100644 --- a/include/configs/adp-ae3xx.h +++ b/include/configs/adp-ae3xx.h @@ -83,7 +83,6 @@ /* * SD (MMC) controller */ -#define CONFIG_FTSDC010_NUMBER 1 #define CONFIG_FTSDC010_SDIO /* diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h index 6ae6fb45450..499a424d8ae 100644 --- a/include/configs/adp-ag101p.h +++ b/include/configs/adp-ag101p.h @@ -85,7 +85,6 @@ /* * SD (MMC) controller */ -#define CONFIG_FTSDC010_NUMBER 1 #define CONFIG_FTSDC010_SDIO /* diff --git a/include/configs/nx25-ae250.h b/include/configs/nx25-ae250.h index 73c3c33ffa5..f3e65e37a6c 100644 --- a/include/configs/nx25-ae250.h +++ b/include/configs/nx25-ae250.h @@ -73,7 +73,6 @@ /* * SD (MMC) controller */ -#define CONFIG_FTSDC010_NUMBER 1 #define CONFIG_FTSDC010_SDIO /* Init Stack Pointer */ -- cgit v1.3.1 From 095c9f35d5a04ed0907624479f702f6fce7591bb Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Tue, 20 Mar 2018 15:10:49 +0800 Subject: mmc: ftsdc010: Migrate CONFIG_FTSDC010_SDIO to Kconfig Convert CONFIG_FTSDC010_SDIO to Kconfig. So CONFIG_FTSDC010_SDIO can also be removed from config_whitelist.txt. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Cc: Greentime Hu --- configs/adp-ae3xx_defconfig | 1 + configs/adp-ag101p_defconfig | 1 + configs/nx25-ae250_defconfig | 1 + drivers/mmc/Kconfig | 7 +++++++ include/configs/adp-ae3xx.h | 5 ----- include/configs/adp-ag101p.h | 5 ----- include/configs/nx25-ae250.h | 5 ----- scripts/config_whitelist.txt | 1 - 8 files changed, 10 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/configs/adp-ae3xx_defconfig b/configs/adp-ae3xx_defconfig index f3eabea70e5..43515241c0e 100644 --- a/configs/adp-ae3xx_defconfig +++ b/configs/adp-ae3xx_defconfig @@ -26,6 +26,7 @@ CONFIG_MMC=y CONFIG_DM_MMC=y CONFIG_MMC_NDS32=y CONFIG_FTSDC010=y +CONFIG_FTSDC010_SDIO=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_CFI_FLASH=y diff --git a/configs/adp-ag101p_defconfig b/configs/adp-ag101p_defconfig index 742d9046ad0..05a5e2817e0 100644 --- a/configs/adp-ag101p_defconfig +++ b/configs/adp-ag101p_defconfig @@ -23,6 +23,7 @@ CONFIG_MMC=y CONFIG_DM_MMC=y CONFIG_MMC_NDS32=y CONFIG_FTSDC010=y +CONFIG_FTSDC010_SDIO=y CONFIG_MTD_NOR_FLASH=y CONFIG_DM_ETH=y CONFIG_FTMAC100=y diff --git a/configs/nx25-ae250_defconfig b/configs/nx25-ae250_defconfig index 47b83db5eae..ab889101cdf 100644 --- a/configs/nx25-ae250_defconfig +++ b/configs/nx25-ae250_defconfig @@ -24,6 +24,7 @@ CONFIG_MMC=y CONFIG_DM_MMC=y CONFIG_MMC_NDS32=y CONFIG_FTSDC010=y +CONFIG_FTSDC010_SDIO=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 5f67e336dba..ff987ed8036 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -535,6 +535,13 @@ config FTSDC010 help This SD/MMC controller is present in Andestech SoCs which is based on Faraday IP. +config FTSDC010_SDIO + bool "Support ftsdc010 sdio" + default n + depends on FTSDC010 + help + This can enable ftsdc010 sdio function. + endif config TEGRA124_MMC_DISABLE_EXT_LOOPBACK diff --git a/include/configs/adp-ae3xx.h b/include/configs/adp-ae3xx.h index 2ee808d08c8..1ebbc4c9e25 100644 --- a/include/configs/adp-ae3xx.h +++ b/include/configs/adp-ae3xx.h @@ -80,11 +80,6 @@ #endif #define CONFIG_SYS_NS16550_CLK ((18432000 * 20) / 25) /* AG101P */ -/* - * SD (MMC) controller - */ -#define CONFIG_FTSDC010_SDIO - /* * Miscellaneous configurable options */ diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h index 499a424d8ae..ff365c464e5 100644 --- a/include/configs/adp-ag101p.h +++ b/include/configs/adp-ag101p.h @@ -82,11 +82,6 @@ #endif #define CONFIG_SYS_NS16550_CLK ((18432000 * 20) / 25) /* AG101P */ -/* - * SD (MMC) controller - */ -#define CONFIG_FTSDC010_SDIO - /* * Miscellaneous configurable options */ diff --git a/include/configs/nx25-ae250.h b/include/configs/nx25-ae250.h index f3e65e37a6c..3c888fdd50d 100644 --- a/include/configs/nx25-ae250.h +++ b/include/configs/nx25-ae250.h @@ -70,11 +70,6 @@ #endif #define CONFIG_SYS_NS16550_CLK 19660800 -/* - * SD (MMC) controller - */ -#define CONFIG_FTSDC010_SDIO - /* Init Stack Pointer */ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000000 - \ GENERATED_GBL_DATA_SIZE) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 46b7f292c00..2c26d34ce4f 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -741,7 +741,6 @@ CONFIG_FTPWM010_BASE CONFIG_FTRTC010_BASE CONFIG_FTRTC010_EXTCLK CONFIG_FTRTC010_PCLK -CONFIG_FTSDC010_SDIO CONFIG_FTSDMC021 CONFIG_FTSDMC021_BASE CONFIG_FTSMC020 -- cgit v1.3.1 From d58717e42559189a226ea800173147399c8edef9 Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Thu, 29 Mar 2018 10:08:33 +0800 Subject: riscv: ae250: Support DT provided by the board at runtime Enable CONFIG_OF_BOAD to support delivery dtb to u-boot at run time instead of embedded. There are two methods to delivery dtb. 1 Pass from loader: When u-boot boot from RAM, gdb or loader can pass dtb via a2 to u-boot dynamically. Of course gdb or loader shall be in charge of dtb delivery. 2 Configure CONFIG_SYS_FDT_BASE: It can be configured as RAM or ROM base statically, no mater u-boot boot from RAM or ROM. If it was configured as ROM base, dtb can be burned into ROM(spi flash) by spi driver. Meanwhile remove CONFIG_SKIP_LOWLEVEL_INIT which is useless in nx25-ae250 configuration. Signed-off-by: Rick Chen Signed-off-by: Rick Chen Cc: Greentime Hu --- arch/riscv/cpu/nx25/start.S | 2 ++ board/AndesTech/nx25-ae250/nx25-ae250.c | 9 +++++++++ configs/nx25-ae250_defconfig | 1 + include/configs/nx25-ae250.h | 12 +++--------- 4 files changed, 15 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/arch/riscv/cpu/nx25/start.S b/arch/riscv/cpu/nx25/start.S index 6a076639d34..cd0a66360de 100644 --- a/arch/riscv/cpu/nx25/start.S +++ b/arch/riscv/cpu/nx25/start.S @@ -45,6 +45,8 @@ trap_vector: .global trap_entry handle_reset: + li t0, CONFIG_SYS_SDRAM_BASE + SREG a2, 0(t0) la t0, trap_entry csrw mtvec, t0 csrwi mstatus, 0 diff --git a/board/AndesTech/nx25-ae250/nx25-ae250.c b/board/AndesTech/nx25-ae250/nx25-ae250.c index a965218f345..6e31be35052 100644 --- a/board/AndesTech/nx25-ae250/nx25-ae250.c +++ b/board/AndesTech/nx25-ae250/nx25-ae250.c @@ -64,3 +64,12 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) { return 0; } + +void *board_fdt_blob_setup(void) +{ + void **ptr = (void *)CONFIG_SYS_SDRAM_BASE; + if (fdt_magic(*ptr) == FDT_MAGIC) + return (void *)*ptr; + + return (void *)CONFIG_SYS_FDT_BASE; +} diff --git a/configs/nx25-ae250_defconfig b/configs/nx25-ae250_defconfig index eb41d71357c..4f9bd58f755 100644 --- a/configs/nx25-ae250_defconfig +++ b/configs/nx25-ae250_defconfig @@ -16,6 +16,7 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y +CONFIG_OF_BOARD=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y diff --git a/include/configs/nx25-ae250.h b/include/configs/nx25-ae250.h index 3c888fdd50d..0e4c431cabf 100644 --- a/include/configs/nx25-ae250.h +++ b/include/configs/nx25-ae250.h @@ -11,18 +11,9 @@ /* * CPU and Board Configuration Options */ -#define CONFIG_SKIP_LOWLEVEL_INIT - #define CONFIG_BOOTP_SEND_HOSTNAME #define CONFIG_BOOTP_SERVERIP -#ifdef CONFIG_SKIP_LOWLEVEL_INIT -#ifdef CONFIG_OF_CONTROL -#undef CONFIG_OF_SEPARATE -#define CONFIG_OF_EMBED -#endif -#endif - /* * Miscellaneous configurable options */ @@ -50,6 +41,9 @@ */ #define CONFIG_SYS_MALLOC_LEN (512 << 10) +/* DT blob (fdt) address */ +#define CONFIG_SYS_FDT_BASE 0x000f0000 + /* * Physical Memory Map */ -- cgit v1.3.1