Merge "drivers : nand : Update Serial training fixup"

This commit is contained in:
Linux Build Service Account 2022-03-08 05:12:41 -08:00 committed by Gerrit - the friendly Code Review server
commit 1bc74c6b9e
3 changed files with 19 additions and 11 deletions

View file

@ -71,7 +71,7 @@ extern void ppe_uniphy_refclk_set(void);
unsigned int qpic_frequency = 0, qpic_phase = 0;
#ifdef CONFIG_QPIC_NAND
#ifdef CONFIG_QPIC_SERIAL
extern unsigned int qpic_training_offset;
#endif
@ -2126,11 +2126,15 @@ void fdt_fixup_qpic(void *blob)
return;
}
#ifdef CONFIG_QPIC_NAND
ret = fdt_setprop_u32(blob, node_off, "qcom,training_offset", qpic_training_offset);
if (ret) {
printf("%s : Unable to set property 'qcom,training_offset'\n",__func__);
return;
#ifdef CONFIG_QPIC_SERIAL
if (qpic_training_offset != 0xBAD0FF5E){
ret = fdt_setprop_u32(blob, node_off, "qcom,training_offset",
qpic_training_offset);
if (ret) {
printf("%s : Unable to set property 'qcom,training_offset'\n",
__func__);
return;
}
}
#endif
}

View file

@ -101,10 +101,14 @@ void fdt_fixup_qpic(void *blob)
return;
}
ret = fdt_setprop_u32(blob, node_off, "qcom,training_offset", qpic_training_offset);
if (ret) {
printf("%s : Unable to set property 'qcom,training_offset'\n",__func__);
return;
if (qpic_training_offset != 0xBAD0FF5E){
ret = fdt_setprop_u32(blob, node_off, "qcom,training_offset",
qpic_training_offset);
if (ret) {
printf("%s : Unable to set property 'qcom,training_offset'\n",
__func__);
return;
}
}
}

View file

@ -47,7 +47,7 @@ struct nand_onfi_para_page onfi_para;
typedef unsigned long addr_t;
static uint32_t hw_ver;
unsigned int qpic_training_offset = 0;
unsigned int qpic_training_offset = 0xBAD0FF5E;
#ifdef CONFIG_QSPI_LAYOUT_SWITCH
enum qpic_nand_layout {