mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-06 17:30:35 +01:00
ipq95xx: emmc fdt fixup for kernel 6.1
if board has emmc flash type, Ehable EMMC and disable NAND flash in kernel device tree during kernel bootup Change-Id: Ibbe197c39c4c4e47d97c33fa9a48d068e85917ab Signed-off-by: Gurumoorthy Santhakumar <quic_gsanthak@quicinc.com>
This commit is contained in:
parent
249b847702
commit
d751fa3e3e
1 changed files with 23 additions and 0 deletions
|
|
@ -33,6 +33,11 @@
|
|||
#define DLOAD_MAGIC_COOKIE 0x10
|
||||
#define DLOAD_DISABLED 0x40
|
||||
|
||||
#define LINUX6_1_NAND_DTS "/soc@0/nand@79b0000/"
|
||||
#define LINUX6_1_MMC_DTS "/soc@0/mmc@7804000/"
|
||||
#define STATUS_OK "status%?okay"
|
||||
#define STATUS_DISABLED "status%?disabled"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
struct sdhci_host mmc_host;
|
||||
|
|
@ -44,6 +49,24 @@ static int aq_phy_initialised = 0;
|
|||
|
||||
extern int qca_scm_dpr(u32, u32, void *, size_t);
|
||||
|
||||
void fdt_fixup_flash(void *blob)
|
||||
{
|
||||
uint32_t flash_type = SMEM_BOOT_NO_FLASH;
|
||||
int nand_nodeoff = fdt_path_offset(blob, LINUX6_1_NAND_DTS);
|
||||
int mmc_nodeoff = fdt_path_offset(blob, LINUX6_1_MMC_DTS);
|
||||
|
||||
get_current_flash_type(&flash_type);
|
||||
if (flash_type == SMEM_BOOT_NORPLUSEMMC ||
|
||||
flash_type == SMEM_BOOT_MMC_FLASH ) {
|
||||
if(nand_nodeoff >= 0)
|
||||
parse_fdt_fixup(LINUX6_1_NAND_DTS"%"STATUS_DISABLED,
|
||||
blob);
|
||||
if(mmc_nodeoff >= 0)
|
||||
parse_fdt_fixup(LINUX6_1_MMC_DTS"%"STATUS_OK, blob);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void qca_serial_init(struct ipq_serial_platdata *plat)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue