mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-08 02:07:55 +01:00
Merge "devsoc: Add dummy handler to fixup the USB device mode"
This commit is contained in:
commit
6ac309e7bd
9 changed files with 62 additions and 253 deletions
|
|
@ -896,6 +896,58 @@ __weak void fdt_fixup_runtime_failsafe(void *blob)
|
|||
return;
|
||||
}
|
||||
|
||||
__weak void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
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);
|
||||
} else {
|
||||
printf("%s: cannot get socinfo\n", __func__);
|
||||
}
|
||||
|
||||
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_minor,
|
||||
sizeof(soc_version_minor));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
} else {
|
||||
printf("%s: cannot get soc version\n", __func__);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
__weak void fdt_fixup_auto_restart(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void set_mtdids(void)
|
||||
{
|
||||
char mtdids[256];
|
||||
|
|
@ -965,6 +1017,7 @@ int ft_board_setup(void *blob, bd_t *bd)
|
|||
{ "qcom,ebi2-nandc-bam-v2.1.1", MTD_DEV_TYPE_NAND, 0 },
|
||||
{ "qcom,ipq9574-nand", MTD_DEV_TYPE_NAND, 0 },
|
||||
{ "qcom,ipq8074-nand", MTD_DEV_TYPE_NAND, 0 },
|
||||
{ "qcom,devsoc-nand", MTD_DEV_TYPE_NAND, 0 },
|
||||
{ "spinand,mt29f", MTD_DEV_TYPE_NAND, 1 },
|
||||
{ "n25q128a11", MTD_DEV_TYPE_NAND,
|
||||
CONFIG_IPQ_SPI_NOR_INFO_IDX },
|
||||
|
|
|
|||
|
|
@ -295,3 +295,8 @@ void set_flash_secondary_type(qca_smem_flash_info_t *smem)
|
|||
{
|
||||
return;
|
||||
};
|
||||
|
||||
void ipq_fdt_fixup_usb_device_mode(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,11 +540,6 @@ void ipq_fdt_fixup_usb_device_mode(void *blob)
|
|||
return;
|
||||
}
|
||||
|
||||
void fdt_fixup_auto_restart(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void set_flash_secondary_type(qca_smem_flash_info_t * smem)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -468,53 +468,6 @@ void ipq_fdt_fixup_usb_device_mode(void *blob)
|
|||
printf("%s: invalid param for usb_mode\n", __func__);
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
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);
|
||||
} else {
|
||||
printf("%s: cannot get socinfo\n", __func__);
|
||||
}
|
||||
|
||||
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_minor,
|
||||
sizeof(soc_version_minor));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
} else {
|
||||
printf("%s: cannot get soc version\n", __func__);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void fdt_fixup_auto_restart(void *blob)
|
||||
{
|
||||
const char *paniconwcssfatal;
|
||||
|
|
|
|||
|
|
@ -1292,53 +1292,6 @@ void reset_board(void)
|
|||
while(1);
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
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);
|
||||
} else {
|
||||
printf("%s: cannot get socinfo\n", __func__);
|
||||
}
|
||||
|
||||
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_minor,
|
||||
sizeof(soc_version_minor));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
} else {
|
||||
printf("%s: cannot get soc version\n", __func__);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void fdt_fixup_auto_restart(void *blob)
|
||||
{
|
||||
const char *paniconwcssfatal;
|
||||
|
|
|
|||
|
|
@ -567,68 +567,12 @@ void board_pci_deinit()
|
|||
|
||||
return ;
|
||||
}
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = ipq_smem_get_socinfo_cpu_type(&cpu_type);
|
||||
if (ret) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Add "cpu_type" to root node of the devicetree*/
|
||||
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);
|
||||
} else {
|
||||
printf("ipq: fdt fixup cannot get socinfo\n");
|
||||
}
|
||||
|
||||
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_minor,
|
||||
sizeof(soc_version_minor));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
} else {
|
||||
printf("%s: cannot get soc version\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_usb_device_mode(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void fdt_fixup_auto_restart(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void board_mmc_deinit(void)
|
||||
{
|
||||
emmc_clock_reset();
|
||||
|
|
|
|||
|
|
@ -1430,52 +1430,6 @@ void ipq_uboot_fdt_fixup(void)
|
|||
return;
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
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);
|
||||
} else {
|
||||
printf("%s: cannot get socinfo\n", __func__);
|
||||
}
|
||||
|
||||
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_minor,
|
||||
sizeof(soc_version_minor));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
} else {
|
||||
printf("%s: cannot get soc version\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_usb_device_mode(void *blob)
|
||||
{
|
||||
int nodeoff, ret, node;
|
||||
|
|
|
|||
|
|
@ -1413,58 +1413,6 @@ __weak int ipq_get_tz_version(char *version_name, int buf_size)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
uint32_t soc_version, soc_version_major, soc_version_minor;
|
||||
int nodeoff, ret;
|
||||
|
||||
nodeoff = fdt_path_offset(blob, "/");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find root node\n");
|
||||
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);
|
||||
} else {
|
||||
printf("%s: cannot get socinfo\n", __func__);
|
||||
}
|
||||
|
||||
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_minor,
|
||||
sizeof(soc_version_minor));
|
||||
if (ret)
|
||||
printf("%s: cannot set soc_version_minor %d\n",
|
||||
__func__, soc_version_minor);
|
||||
} else {
|
||||
printf("%s: cannot get soc version\n", __func__);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void fdt_fixup_auto_restart(void *blob)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int is_secondary_core_off(unsigned int cpuid)
|
||||
{
|
||||
int err;
|
||||
|
|
|
|||
|
|
@ -299,6 +299,10 @@ extern loff_t board_env_size;
|
|||
#define CONFIG_MMC_FORCE_CAP_4BIT_BUSWIDTH
|
||||
#endif
|
||||
|
||||
#define CONFIG_IPQ_FDT_FIXUP
|
||||
#define CONFIG_FDT_FIXUP_PARTITIONS
|
||||
#define CONFIG_OF_BOARD_SETUP
|
||||
|
||||
#undef CONFIG_BOOTM_NETBSD
|
||||
#undef CONFIG_BOOTM_PLAN9
|
||||
#undef CONFIG_BOOTM_RTEMS
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue