qca: arm: fix compiler error when eMMC is disabled

Change-Id: I24aadfb70efbe48bb5d33c76ed29a873b0975b2b
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
This commit is contained in:
Rajkumar Ayyasamy 2019-08-23 18:37:33 +05:30 committed by Gerrit - the friendly Code Review server
parent 32d259be7a
commit 90afafbdb8
2 changed files with 22 additions and 1 deletions

View file

@ -225,6 +225,7 @@ void reset_crashdump(void)
return;
}
#ifdef CONFIG_QCA_MMC
void emmc_clock_config(void)
{
/* Enable root clock generator */
@ -316,6 +317,13 @@ int board_mmc_init(bd_t *bis)
return ret;
}
#else
int board_mmc_init(bd_t *bis)
{
return 0;
}
#endif
void board_nand_init(void)
{
#ifdef CONFIG_QCA_SPI
@ -780,6 +788,7 @@ int apps_iscrashed(void)
/**
* Set the uuid in bootargs variable for mounting rootfilesystem
*/
#ifdef CONFIG_QCA_MMC
int set_uuid_bootargs(char *boot_args, char *part_name, int buflen, bool gpt_flag)
{
int ret, len;
@ -826,6 +835,12 @@ int set_uuid_bootargs(char *boot_args, char *part_name, int buflen, bool gpt_fla
return 0;
}
#else
int set_uuid_bootargs(char *boot_args, char *part_name, int buflen, bool gpt_flag)
{
return 0;
}
#endif
int get_aquantia_gpio(void)
{

View file

@ -138,7 +138,9 @@ char * const argv[])
layout = "default";
retn = CMD_RET_FAILURE;
#ifdef CONFIG_QCA_MMC
block_dev_desc_t *blk_dev;
#endif
disk_partition_t disk_info = {0};
qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
nand_info_t *nand = &nand_info[CONFIG_NAND_FLASH_INFO_IDX];
@ -204,6 +206,7 @@ char * const argv[])
layout = "sbl";
#endif
#ifdef CONFIG_QCA_MMC
} else if (sfi->flash_type == SMEM_BOOT_MMC_FLASH) {
blk_dev = mmc_get_dev(mmc_host.dev_num);
@ -218,6 +221,7 @@ char * const argv[])
part_size = (ulong)disk_info.size;
}
#endif
} else if (sfi->flash_type == SMEM_BOOT_SPI_FLASH) {
if (get_which_flash_param(part_name)) {
@ -242,7 +246,8 @@ char * const argv[])
part_size = (ulong) IPQ_NAND_ROOTFS_SIZE;
}
}else if ((smem_getpart(part_name, &start_block, &size_block)
#ifdef CONFIG_QCA_MMC
} else if ((smem_getpart(part_name, &start_block, &size_block)
== -ENOENT) && (sfi->rootfs.offset == 0xBAD0FF5E)){
/* NOR + EMMC */
@ -259,6 +264,7 @@ char * const argv[])
offset = (ulong)disk_info.start;
part_size = (ulong)disk_info.size;
}
#endif
} else {
ret = smem_getpart(part_name, &start_block,