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: fdt_fixup: Added major and minor version
Change-Id: If312cf881c2f7b9aceca5f12db017125ffdfff18 Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
f9ad5ac9d7
commit
453d3d213b
6 changed files with 40 additions and 21 deletions
|
|
@ -330,9 +330,9 @@ void board_pci_deinit(void)
|
|||
pcie_clock_disable(GCC_PCIE_AHB_CBCR);
|
||||
}
|
||||
|
||||
int ipq_fdt_fixup_socinfo(void *blob)
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_usb_device_mode(void *blob)
|
||||
|
|
|
|||
|
|
@ -126,5 +126,5 @@ extern const add_node_t add_node[];
|
|||
|
||||
unsigned int get_board_index(unsigned int machid);
|
||||
void reset_crashdump(void);
|
||||
int ipq_fdt_fixup_socinfo(void *blob);
|
||||
void ipq_fdt_fixup_socinfo(void *blob);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ void qca_serial_init(struct ipq_serial_platdata *plat)
|
|||
|
||||
}
|
||||
|
||||
int ipq_fdt_fixup_socinfo(void *blob)
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
int nodeoff, ret;
|
||||
|
|
@ -324,19 +324,19 @@ int ipq_fdt_fixup_socinfo(void *blob)
|
|||
ret = ipq_smem_get_socinfo_cpu_type(&cpu_type);
|
||||
if (ret) {
|
||||
printf("ipq: fdt fixup cannot get socinfo\n");
|
||||
return ret;
|
||||
return;
|
||||
}
|
||||
nodeoff = fdt_node_offset_by_compatible(blob, -1, "qcom,ipq8064");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find compatible node\n");
|
||||
return nodeoff;
|
||||
return;
|
||||
}
|
||||
ret = fdt_setprop(blob, nodeoff, "cpu_type",
|
||||
&cpu_type, sizeof(cpu_type));
|
||||
if (ret)
|
||||
printf("%s: cannot set cpu type %d\n", __func__, ret);
|
||||
return ret;
|
||||
return;
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_usb_device_mode(void *blob)
|
||||
|
|
|
|||
|
|
@ -114,5 +114,5 @@ extern const char *rsvd_node;
|
|||
extern const char *del_node[];
|
||||
extern const add_node_t add_node[];
|
||||
void reset_crashdump(void);
|
||||
int ipq_fdt_fixup_socinfo(void *blob);
|
||||
void ipq_fdt_fixup_socinfo(void *blob);
|
||||
#endif /* _IPQ806X_H_ */
|
||||
|
|
|
|||
|
|
@ -799,27 +799,46 @@ int ipq_board_usb_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ipq_fdt_fixup_socinfo(void *blob)
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
ret = ipq_smem_get_socinfo_cpu_type(&cpu_type);
|
||||
if (ret) {
|
||||
printf("ipq: fdt fixup cannot get socinfo\n");
|
||||
return ret;
|
||||
}
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
return nodeoff;
|
||||
return;
|
||||
}
|
||||
|
||||
ret = ipq_smem_get_socinfo_cpu_type(&cpu_type);
|
||||
if (!ret) {
|
||||
ret = fdt_setprop(blob, nodeoff, "cpu_type",
|
||||
&cpu_type, sizeof(cpu_type));
|
||||
if (ret)
|
||||
printf("%s: cannot set cpu type %d\n", __func__, ret);
|
||||
}
|
||||
|
||||
ret = ipq_smem_get_socinfo_version((uint32_t *)&soc_version);
|
||||
if (!ret) {
|
||||
soc_version_major = SOCINFO_VERSION_MAJOR(soc_version);
|
||||
soc_version_minor = SOCINFO_VERSION_MINOR(soc_version);
|
||||
|
||||
ret = fdt_setprop(blob, nodeoff, "soc_version_major",
|
||||
&soc_version_major,
|
||||
sizeof(soc_version_major));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_major %d\n",
|
||||
__func__, soc_version_major);
|
||||
|
||||
ret = fdt_setprop(blob, nodeoff, "soc_version_minor",
|
||||
&soc_version_major,
|
||||
sizeof(soc_version_major));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
}
|
||||
ret = fdt_setprop(blob, nodeoff, "cpu_type",
|
||||
&cpu_type, sizeof(cpu_type));
|
||||
if (ret)
|
||||
printf("%s: cannot set cpu type %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_usb_device_mode(void *blob)
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ extern const add_node_t add_node[];
|
|||
|
||||
void reset_crashdump(void);
|
||||
void board_pci_init(int id);
|
||||
int ipq_fdt_fixup_socinfo(void *blob);
|
||||
void ipq_fdt_fixup_socinfo(void *blob);
|
||||
int ipq_board_usb_init(void);
|
||||
|
||||
#endif /* _IPQ807X_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue