Created
June 10, 2014 11:19
-
-
Save Embedded-linux/52f5ef33ee4f70559203 to your computer and use it in GitHub Desktop.
u-boot port [NAND support]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Files changed for adding NAND support | |
1.arch/arm/include/asm/arch-am33xx/mem.h | |
2.board/ti/am335x/board.c | |
3.board/ti/am335x/board.h | |
4.board/ti/am335x/mux.c | |
5.include/configs/am335x_evm.h | |
1.arch/arm/include/asm/arch-am33xx/mem.h | |
+#define M_NAND_GPMC_CONFIG1 0x00001800 | |
2.board/ti/am335x/board.c | |
+ /* Enable 16-bit NAND */ | |
+ enable_nand_pin_mux(); | |
+ | |
3.board/ti/am335x/board.h | |
+void enable_nand_pin_mux(void); | |
4.board/ti/am335x/mux.c | |
+static struct module_pin_mux nand16_pin_mux[] = { | |
+ {OFFSET(gpmc_ad8), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD8 */ | |
+ {OFFSET(gpmc_ad9), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD9 */ | |
+ {OFFSET(gpmc_ad10), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD10 */ | |
+ {OFFSET(gpmc_ad11), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD11 */ | |
+ {OFFSET(gpmc_ad12), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD12 */ | |
+ {OFFSET(gpmc_ad13), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD13 */ | |
+ {OFFSET(gpmc_ad14), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD14 */ | |
+ {OFFSET(gpmc_ad15), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD15 */ | |
+ {-1}, | |
+}; | |
+ | |
+void enable_nand_pin_mux(void) | |
+{ | |
+ configure_module_pin_mux(nand_pin_mux); | |
+ configure_module_pin_mux(nand16_pin_mux); | |
+} | |
5.include/configs/am335x_evm.h | |
+#define CONFIG_SPL_NAND_SUPPORT | |
+#define CONFIG_NAND | |
Thease files changed to add NAND support | |
With these changes u-boot.img can be palced in NAND and it can | |
boot from NAND directly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment