ipq807x: uboot: spi init: code clean up

This patch involves changes which makes
sure that spi init is done only when the
config CONFIG_QCA_SPI is defined.

Previously, since spi was a sub part of
nand, spi_init was done without checking if
CONFIG_QCA_SPI is enabled.

This change will allow us to disable or
enable spi as per our need in uboot.

Change-Id: Ic75301872d5ac161cd7b863c59c12437aa6f7126
Signed-off-by: speriaka <speriaka@codeaurora.org>
This commit is contained in:
speriaka 2017-11-17 12:39:32 +05:30 committed by Gerrit - the friendly Code Review server
parent ff39200468
commit f9d9f94993

View file

@ -459,15 +459,19 @@ int board_mmc_init(bd_t *bis)
void board_nand_init(void)
{
#ifdef CONFIG_QCA_SPI
int gpio_node;
#endif
qpic_nand_init();
#ifdef CONFIG_QCA_SPI
gpio_node = fdt_path_offset(gd->fdt_blob, "/spi/spi_gpio");
if (gpio_node >= 0) {
qca_gpio_init(gpio_node);
ipq_spi_init(CONFIG_IPQ_SPI_NOR_INFO_IDX);
}
#endif
}
static void pcie_clock_init(int id)