mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-01-28 01:47:24 +01:00
qca: Made IPQ806x specific changes to common fdt fixup files.
Change-Id: I185d28fcaa8f1178e932772ddb10a036cb2b8a1f Signed-off-by: Aditya Kumar Patra S <apatr@codeaurora.org>
This commit is contained in:
parent
f8b348e00b
commit
9bbb0820f4
7 changed files with 57 additions and 7 deletions
|
|
@ -79,12 +79,14 @@ int ipq_fdt_fixup_spi_nor_params(void *blob)
|
|||
return -1;
|
||||
}
|
||||
|
||||
val = cpu_to_fdt32(sfi.flash_density);
|
||||
ret = fdt_setprop(blob, nodeoff, "density",
|
||||
&val, sizeof(uint32_t));
|
||||
if (ret) {
|
||||
printf("fdt-fixup: unable to set density(%d)\n", ret);
|
||||
return -1;
|
||||
if (sfi.flash_density != 0) {
|
||||
val = cpu_to_fdt32(sfi.flash_density);
|
||||
ret = fdt_setprop(blob, nodeoff, "density",
|
||||
&val, sizeof(uint32_t));
|
||||
if (ret) {
|
||||
printf("fdt-fixup: unable to set density(%d)\n", ret);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -258,6 +260,7 @@ int ft_board_setup(void *blob, bd_t *bd)
|
|||
debug("MTDIDS: %s\n", getenv("mtdids"));
|
||||
ipq_fdt_fixup_mtdparts(blob, nodes);
|
||||
}
|
||||
ipq_fdt_fixup_socinfo(blob);
|
||||
dcache_disable();
|
||||
fdt_fixup_ethernet(blob);
|
||||
|
||||
|
|
|
|||
|
|
@ -344,3 +344,8 @@ void board_pci_deinit(void)
|
|||
pcie_clock_disable(GCC_PCIE_AXI_S_CBCR);
|
||||
pcie_clock_disable(GCC_PCIE_AHB_CBCR);
|
||||
}
|
||||
|
||||
int ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,4 +127,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);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <asm/arch-qcom-common/gsbi.h>
|
||||
#include <asm/arch-qcom-common/uart.h>
|
||||
#include <asm/arch-qcom-common/gpio.h>
|
||||
#include <asm/arch-qcom-common/smem.h>
|
||||
#include "ipq806x.h"
|
||||
#include "qca_common.h"
|
||||
|
||||
|
|
@ -25,6 +26,11 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
|
||||
qca_mmc mmc_host;
|
||||
|
||||
int nand_env_device = 0;
|
||||
const char *rsvd_node = "/reserved-memory";
|
||||
const char *del_node[] = {NULL};
|
||||
const add_node_t add_node[] = {};
|
||||
|
||||
unsigned long timer_read_counter(void)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -74,9 +80,32 @@ void qca_serial_init(struct ipq_serial_platdata *plat)
|
|||
GSBI_CTRL_REG_PROTOCOL_CODE_S,
|
||||
GSBI_CTRL_REG(GSBI4_BASE));
|
||||
|
||||
if(!(plat->m_value == -1) || ( plat->n_value == -1) || (plat->d_value == -1))
|
||||
if (!(plat->m_value == -1) || ( plat->n_value == -1) || (plat->d_value == -1))
|
||||
uart_clock_config(plat->port_id,
|
||||
plat->m_value,
|
||||
plat->n_value,
|
||||
plat->d_value);
|
||||
}
|
||||
|
||||
int ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
uint32_t cpu_type;
|
||||
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_node_offset_by_compatible(blob, -1, "qcom,ipq8064");
|
||||
|
||||
if (nodeoff < 0) {
|
||||
printf("ipq: fdt fixup cannot find compatible node\n");
|
||||
return nodeoff;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <configs/ipq806x.h>
|
||||
#include <asm/u-boot.h>
|
||||
#include <asm/arch-qcom-common/qca_common.h>
|
||||
|
||||
#define GSBI4_BASE 0x16300000
|
||||
|
||||
|
|
@ -44,5 +45,10 @@ typedef enum {
|
|||
SMEM_MAX_SIZE = SMEM_PARTITION_TABLE_OFFSET + 1,
|
||||
} smem_mem_type_t;
|
||||
|
||||
/* Reserved-memory node names*/
|
||||
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);
|
||||
#endif /* _IPQ806X_H_ */
|
||||
|
|
|
|||
|
|
@ -162,3 +162,8 @@ void board_pci_init(int id)
|
|||
|
||||
return ;
|
||||
}
|
||||
|
||||
int ipq_fdt_fixup_socinfo(void *blob)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,5 +59,6 @@ extern const add_node_t add_node[];
|
|||
|
||||
void reset_crashdump(void);
|
||||
void board_pci_init(int id);
|
||||
int ipq_fdt_fixup_socinfo(void *blob);
|
||||
|
||||
#endif /* _IPQ807X_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue