* [U-Boot] [PATCH 3/3] nds32: board: Support ftsdc010 DM.
@ 2017-05-31 1:38 ` Andes
2017-06-01 3:57 ` Jaehoon Chung
0 siblings, 1 reply; 2+ messages in thread
From: Andes @ 2017-05-31 1:38 UTC (permalink / raw)
To: u-boot
From: rick <rick@andestech.com>
Support Andestech ftsdc010 SD/MMC device tree flow
on AG101P/AE3XX platforms.
Signed-off-by: rick <rick@andestech.com>
---
board/AndesTech/adp-ae3xx/adp-ae3xx.c | 4 +---
board/AndesTech/adp-ag101p/adp-ag101p.c | 7 +------
configs/adp-ae3xx_defconfig | 5 +++++
configs/adp-ag101p_defconfig | 5 +++++
include/configs/adp-ae3xx.h | 1 -
include/configs/adp-ag101p.h | 1 -
6 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index 98ed4d9..3903427 100644
--- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
+++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
@@ -77,10 +77,8 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
int board_mmc_init(bd_t *bis)
{
-#ifndef CONFIG_DM_MMC
-#ifdef CONFIG_FTSDC010
+#if defined(CONFIG_FTSDC010) && !defined(CONFIG_DM_MMC)
ftsdc010_mmc_init(0);
#endif
-#endif
return 0;
}
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index a462941..826ba14 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -20,7 +20,6 @@ DECLARE_GLOBAL_DATA_PTR;
/*
* Miscellaneous platform dependent initializations
*/
-
int board_init(void)
{
/*
@@ -30,7 +29,6 @@ int board_init(void)
printf("Board: %s\n" , CONFIG_SYS_BOARD);
gd->bd->bi_arch_number = MACH_TYPE_ADPAG101P;
gd->bd->bi_boot_params = PHYS_SDRAM_0 + 0x400;
-
return 0;
}
@@ -39,11 +37,8 @@ int dram_init(void)
unsigned long sdram_base = PHYS_SDRAM_0;
unsigned long expected_size = PHYS_SDRAM_0_SIZE + PHYS_SDRAM_1_SIZE;
unsigned long actual_size;
-
actual_size = get_ram_size((void *)sdram_base, expected_size);
-
gd->ram_size = actual_size;
-
if (expected_size != actual_size) {
printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
actual_size >> 20, expected_size >> 20);
@@ -83,7 +78,7 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
int board_mmc_init(bd_t *bis)
{
-#ifdef CONFIG_FTSDC010
+#if defined(CONFIG_FTSDC010) && !defined(CONFIG_DM_MMC)
ftsdc010_mmc_init(0);
#endif
return 0;
diff --git a/configs/adp-ae3xx_defconfig b/configs/adp-ae3xx_defconfig
index cbef412..d12f307 100644
--- a/configs/adp-ae3xx_defconfig
+++ b/configs/adp-ae3xx_defconfig
@@ -18,6 +18,11 @@ CONFIG_BAUDRATE=38400
CONFIG_OF_CONTROL=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
+CONFIG_BLK=y
+CONFIG_DM_MMC=y
+CONFIG_DM_MMC_OPS=y
+CONFIG_MMC_NDS32=y
+CONFIG_FTSDC010=y
CONFIG_MTD=y
CONFIG_CFI_FLASH=y
CONFIG_DM_ETH=y
diff --git a/configs/adp-ag101p_defconfig b/configs/adp-ag101p_defconfig
index 22b1182..85e2225 100644
--- a/configs/adp-ag101p_defconfig
+++ b/configs/adp-ag101p_defconfig
@@ -18,6 +18,11 @@ CONFIG_BAUDRATE=38400
CONFIG_OF_CONTROL=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
+CONFIG_BLK=y
+CONFIG_DM_MMC=y
+CONFIG_DM_MMC_OPS=y
+CONFIG_MMC_NDS32=y
+CONFIG_FTSDC010=y
CONFIG_DM_ETH=y
CONFIG_FTMAC100=y
CONFIG_DM_SERIAL=y
diff --git a/include/configs/adp-ae3xx.h b/include/configs/adp-ae3xx.h
index 6bfc08e..011b2a8 100644
--- a/include/configs/adp-ae3xx.h
+++ b/include/configs/adp-ae3xx.h
@@ -92,7 +92,6 @@
/*
* SD (MMC) controller
*/
-#define CONFIG_FTSDC010
#define CONFIG_FTSDC010_NUMBER 1
#define CONFIG_FTSDC010_SDIO
diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h
index 4cef64e..71a557b 100644
--- a/include/configs/adp-ag101p.h
+++ b/include/configs/adp-ag101p.h
@@ -98,7 +98,6 @@
/*
* SD (MMC) controller
*/
-#define CONFIG_FTSDC010
#define CONFIG_FTSDC010_NUMBER 1
#define CONFIG_FTSDC010_SDIO
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 3/3] nds32: board: Support ftsdc010 DM.
2017-05-31 1:38 ` [U-Boot] [PATCH 3/3] nds32: board: Support ftsdc010 DM Andes
@ 2017-06-01 3:57 ` Jaehoon Chung
0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2017-06-01 3:57 UTC (permalink / raw)
To: u-boot
On 05/31/2017 10:38 AM, Andes wrote:
> From: rick <rick@andestech.com>
>
> Support Andestech ftsdc010 SD/MMC device tree flow
> on AG101P/AE3XX platforms.
>
> Signed-off-by: rick <rick@andestech.com>
> ---
> board/AndesTech/adp-ae3xx/adp-ae3xx.c | 4 +---
> board/AndesTech/adp-ag101p/adp-ag101p.c | 7 +------
> configs/adp-ae3xx_defconfig | 5 +++++
> configs/adp-ag101p_defconfig | 5 +++++
> include/configs/adp-ae3xx.h | 1 -
> include/configs/adp-ag101p.h | 1 -
> 6 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
> index 98ed4d9..3903427 100644
> --- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
> +++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
> @@ -77,10 +77,8 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
>
> int board_mmc_init(bd_t *bis)
> {
> -#ifndef CONFIG_DM_MMC
> -#ifdef CONFIG_FTSDC010
> +#if defined(CONFIG_FTSDC010) && !defined(CONFIG_DM_MMC)
> ftsdc010_mmc_init(0);
> #endif
> -#endif
What's difference?
> return 0;
> }
> diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
> index a462941..826ba14 100644
> --- a/board/AndesTech/adp-ag101p/adp-ag101p.c
> +++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
> @@ -20,7 +20,6 @@ DECLARE_GLOBAL_DATA_PTR;
> /*
> * Miscellaneous platform dependent initializations
> */
> -
> int board_init(void)
> {
> /*
> @@ -30,7 +29,6 @@ int board_init(void)
> printf("Board: %s\n" , CONFIG_SYS_BOARD);
> gd->bd->bi_arch_number = MACH_TYPE_ADPAG101P;
> gd->bd->bi_boot_params = PHYS_SDRAM_0 + 0x400;
> -
This is not relevant to "support ftsdc010 DM".
> return 0;
> }
>
> @@ -39,11 +37,8 @@ int dram_init(void)
> unsigned long sdram_base = PHYS_SDRAM_0;
> unsigned long expected_size = PHYS_SDRAM_0_SIZE + PHYS_SDRAM_1_SIZE;
> unsigned long actual_size;
> -
> actual_size = get_ram_size((void *)sdram_base, expected_size);
> -
> gd->ram_size = actual_size;
> -
Ditto.
> if (expected_size != actual_size) {
> printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
> actual_size >> 20, expected_size >> 20);
> @@ -83,7 +78,7 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
>
> int board_mmc_init(bd_t *bis)
> {
> -#ifdef CONFIG_FTSDC010
> +#if defined(CONFIG_FTSDC010) && !defined(CONFIG_DM_MMC)
> ftsdc010_mmc_init(0);
> #endif
> return 0;
> diff --git a/configs/adp-ae3xx_defconfig b/configs/adp-ae3xx_defconfig
> index cbef412..d12f307 100644
> --- a/configs/adp-ae3xx_defconfig
> +++ b/configs/adp-ae3xx_defconfig
> @@ -18,6 +18,11 @@ CONFIG_BAUDRATE=38400
> CONFIG_OF_CONTROL=y
> CONFIG_NET_RANDOM_ETHADDR=y
> CONFIG_DM=y
> +CONFIG_BLK=y
> +CONFIG_DM_MMC=y
> +CONFIG_DM_MMC_OPS=y
> +CONFIG_MMC_NDS32=y
> +CONFIG_FTSDC010=y
> CONFIG_MTD=y
> CONFIG_CFI_FLASH=y
> CONFIG_DM_ETH=y
> diff --git a/configs/adp-ag101p_defconfig b/configs/adp-ag101p_defconfig
> index 22b1182..85e2225 100644
> --- a/configs/adp-ag101p_defconfig
> +++ b/configs/adp-ag101p_defconfig
> @@ -18,6 +18,11 @@ CONFIG_BAUDRATE=38400
> CONFIG_OF_CONTROL=y
> CONFIG_NET_RANDOM_ETHADDR=y
> CONFIG_DM=y
> +CONFIG_BLK=y
> +CONFIG_DM_MMC=y
> +CONFIG_DM_MMC_OPS=y
Don't need to enable CONFIG_DM_MMC_OPS and CONFIG_BLK.
when DM_MMC is enabled, they are enabled by default.
> +CONFIG_MMC_NDS32=y
> +CONFIG_FTSDC010=y
> CONFIG_DM_ETH=y
> CONFIG_FTMAC100=y
> CONFIG_DM_SERIAL=y
> diff --git a/include/configs/adp-ae3xx.h b/include/configs/adp-ae3xx.h
> index 6bfc08e..011b2a8 100644
> --- a/include/configs/adp-ae3xx.h
> +++ b/include/configs/adp-ae3xx.h
> @@ -92,7 +92,6 @@
> /*
> * SD (MMC) controller
> */
> -#define CONFIG_FTSDC010
> #define CONFIG_FTSDC010_NUMBER 1
> #define CONFIG_FTSDC010_SDIO
>
> diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h
> index 4cef64e..71a557b 100644
> --- a/include/configs/adp-ag101p.h
> +++ b/include/configs/adp-ag101p.h
> @@ -98,7 +98,6 @@
> /*
> * SD (MMC) controller
> */
> -#define CONFIG_FTSDC010
> #define CONFIG_FTSDC010_NUMBER 1
> #define CONFIG_FTSDC010_SDIO
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-01 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170531020027epcas5p21fe208656a9b7d75e7b511956768f18f@epcas5p2.samsung.com>
2017-05-31 1:38 ` [U-Boot] [PATCH 3/3] nds32: board: Support ftsdc010 DM Andes
2017-06-01 3:57 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.