diff options
author | Tom Rini <trini@konsulko.com> | 2015-05-30 20:15:59 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-30 20:15:59 -0400 |
commit | b1f7ecc9b5f0ce07691f6804f436fcaa2a377b26 (patch) | |
tree | 0aea9d637deb6dd706e717a000148263fe89babc /board/sunxi/board.c | |
parent | cac6d4bfdc2543fb30bb04e42be42aeaf52ea348 (diff) | |
parent | 014414f53695ab3ba5a9d344ad1ba8952bce157c (diff) | |
download | u-boot-imx-b1f7ecc9b5f0ce07691f6804f436fcaa2a377b26.zip u-boot-imx-b1f7ecc9b5f0ce07691f6804f436fcaa2a377b26.tar.gz u-boot-imx-b1f7ecc9b5f0ce07691f6804f436fcaa2a377b26.tar.bz2 |
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
Diffstat (limited to 'board/sunxi/board.c')
-rw-r--r-- | board/sunxi/board.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 5f79cc1..f27967b 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -22,6 +22,9 @@ #ifdef CONFIG_AXP221_POWER #include <axp221.h> #endif +#ifdef CONFIG_NAND_SUNXI +#include <nand.h> +#endif #include <asm/arch/clock.h> #include <asm/arch/cpu.h> #include <asm/arch/display.h> @@ -315,6 +318,21 @@ int board_mmc_init(bd_t *bis) } #endif +#ifdef CONFIG_NAND +void board_nand_init(void) +{ + unsigned int pin; + static u8 ports[] = CONFIG_NAND_SUNXI_GPC_PORTS; + + /* Configure AHB muxes to connect output pins with NAND controller */ + for (pin = 0; pin < 16; pin++) + sunxi_gpio_set_cfgpin(SUNXI_GPC(pin), SUNXI_GPC_NAND); + + for (pin = 0; pin < ARRAY_SIZE(ports); pin++) + sunxi_gpio_set_cfgpin(SUNXI_GPC(ports[pin]), SUNXI_GPC_NAND); +} +#endif + void i2c_init_board(void) { #ifdef CONFIG_I2C0_ENABLE @@ -530,10 +548,11 @@ int misc_init_r(void) } } +#ifndef CONFIG_MACH_SUN9I ret = sunxi_usb_phy_probe(); if (ret) return ret; - +#endif #if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET) musb_register(&musb_plat, NULL, (void *)SUNXI_USB0_BASE); #endif |