mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ARM: qca: ipq8064: Secondary flash type setting is board specific
flash_secondary_type is specific to ipq8064. Initialization of this parameter is moved into boards specific file. Change-Id: If1a0e44e3d0a674ce497de045d9c5095b67bc913 Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
This commit is contained in:
parent
e697c8f7e2
commit
757ae11af9
5 changed files with 41 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#ifndef ___QCA_COMMON_H_
|
||||
#define ___QCA_COMMON_H_
|
||||
#include <asm/u-boot.h>
|
||||
#include <asm/arch-qca-common/smem.h>
|
||||
|
||||
#ifdef CONFIG_IPQ807x
|
||||
#include <asm/arch-ipq807x/clk.h>
|
||||
|
|
@ -48,6 +49,8 @@ typedef struct {
|
|||
int qca_mmc_init(bd_t *, qca_mmc *);
|
||||
void board_mmc_deinit(void);
|
||||
|
||||
void set_flash_secondary_type(qca_smem_flash_info_t *);
|
||||
|
||||
struct dumpinfo_t{
|
||||
char name[16]; /* use only file name in 8.3 format */
|
||||
uint32_t start;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,12 @@ void get_kernel_fs_part_details(void)
|
|||
if (ret < 0) {
|
||||
qca_part_entry_t *part = entries[i].part;
|
||||
|
||||
smem->flash_secondary_type = SMEM_BOOT_NAND_FLASH;
|
||||
/*
|
||||
* To set SoC specific secondary flash type to
|
||||
* eMMC/NAND device based on the one that is enabled.
|
||||
*/
|
||||
set_flash_secondary_type(smem);
|
||||
|
||||
debug("cdp: get part failed for %s\n", entries[i].name);
|
||||
part->offset = 0xBAD0FF5E;
|
||||
part->size = 0xBAD0FF5E;
|
||||
|
|
|
|||
|
|
@ -314,3 +314,8 @@ int ipq_fdt_fixup_socinfo(void *blob)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_flash_secondary_type(qca_smem_flash_info_t * smem)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,3 +332,25 @@ void board_mmc_deinit(void)
|
|||
emmc_clock_disable();
|
||||
}
|
||||
|
||||
void set_flash_secondary_type(qca_smem_flash_info_t *smem)
|
||||
{
|
||||
/*
|
||||
* Both eMMC and NAND share common GPIOs, only one of them shall be
|
||||
* enabled from device tree, based on board configuration.
|
||||
*
|
||||
* flash_secondary_type is set to eMMC/NAND device whichever is
|
||||
* initialized, as there is no smem entry to differentiate between the
|
||||
* two.
|
||||
*/
|
||||
#ifdef CONFIG_QCA_MMC
|
||||
struct mmc *mmc;
|
||||
|
||||
mmc = find_mmc_device(mmc_host.dev_num);
|
||||
if (mmc) {
|
||||
smem->flash_secondary_type = SMEM_BOOT_MMC_FLASH;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
smem->flash_secondary_type = SMEM_BOOT_NAND_FLASH;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,3 +208,8 @@ int ipq_fdt_fixup_socinfo(void *blob)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_flash_secondary_type(qca_smem_flash_info_t *smem)
|
||||
{
|
||||
return;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue