Skip to content
Snippets Groups Projects
Commit c339ea5b authored by Marek Vasut's avatar Marek Vasut
Browse files

arm: socfpga: Add support for Denali NAND controller


Add common configuration bits for the Denali NAND controller and also
support for using it as a boot device in SPL.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
parent eba522a0
No related branches found
No related tags found
No related merge requests found
...@@ -160,6 +160,19 @@ ...@@ -160,6 +160,19 @@
#define CONFIG_SYS_MMC_MAX_BLK_COUNT 256 /* FIXME -- SPL only? */ #define CONFIG_SYS_MMC_MAX_BLK_COUNT 256 /* FIXME -- SPL only? */
#endif #endif
/*
* NAND Support
*/
#ifdef CONFIG_NAND_DENALI
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 1
#define CONFIG_SYS_NAND_ONFI_DETECTION
#define CONFIG_NAND_DENALI_ECC_SIZE 512
#define CONFIG_SYS_NAND_REGS_BASE SOCFPGA_NANDREGS_ADDRESS
#define CONFIG_SYS_NAND_DATA_BASE SOCFPGA_NANDDATA_ADDRESS
#define CONFIG_SYS_NAND_BASE (CONFIG_SYS_NAND_DATA_BASE + 0x10)
#endif
/* /*
* I2C support * I2C support
*/ */
...@@ -338,6 +351,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void); ...@@ -338,6 +351,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#ifdef CONFIG_DM_SPI #ifdef CONFIG_DM_SPI
#define CONFIG_SPL_SPI_SUPPORT #define CONFIG_SPL_SPI_SUPPORT
#endif #endif
#ifdef CONFIG_SPL_NAND_DENALI
#define CONFIG_SPL_NAND_SUPPORT
#endif
/* SPL SDMMC boot support */ /* SPL SDMMC boot support */
#ifdef CONFIG_SPL_MMC_SUPPORT #ifdef CONFIG_SPL_MMC_SUPPORT
...@@ -360,6 +376,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void); ...@@ -360,6 +376,13 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000
#endif #endif
/* SPL NAND boot support */
#ifdef CONFIG_SPL_NAND_SUPPORT
#define CONFIG_SYS_NAND_USE_FLASH_BBT
#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
#endif
/* /*
* Stack setup * Stack setup
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment