fdt: Allow ft_board_setup() to report failure

This function can fail if the device tree runs out of space. Rather than
silently booting with an incomplete device tree, allow the failure to be
detected.

Unfortunately this involves changing a lot of places in the code. I have
not changed behvaiour to return an error where one is not currently
returned, to avoid unexpected breakage.

Eventually it would be nice to allow boards to register functions to be
called to update the device tree. This would avoid all the many functions
to do this. However it's not clear yet if this should be done using driver
model or with a linker list. This work is left for later.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
Simon Glass 2014-10-23 18:58:47 -06:00
parent 4d70b34d7f
commit e895a4b06f
106 changed files with 373 additions and 166 deletions

View File

@ -18,11 +18,13 @@
DECLARE_GLOBAL_DATA_PTR;
void __ft_board_setup(void *blob, bd_t *bd)
int __ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
void ft_board_setup(void *blob, bd_t *bd) \
int ft_board_setup(void *blob, bd_t *bd)
__attribute__((weak, alias("__ft_board_setup")));
void ft_cpu_setup(void *blob, bd_t *bd)
@ -32,5 +34,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
* Note: aliases in the dts are required for this
*/
fdt_fixup_ethernet(blob);
return 0;
}
#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */

View File

@ -18,7 +18,7 @@
DECLARE_GLOBAL_DATA_PTR;
void __ft_board_setup(void *blob, bd_t *bd)
int __ft_board_setup(void *blob, bd_t *bd)
{
int rc;
int i;
@ -60,8 +60,11 @@ void __ft_board_setup(void *blob, bd_t *bd)
printf("Unable to update property EBC mappings, err=%s\n",
fdt_strerror(rc));
}
return 0;
}
void ft_board_setup(void *blob, bd_t *bd) __attribute__((weak, alias("__ft_board_setup")));
int ft_board_setup(void *blob, bd_t *bd)
__attribute__((weak, alias("__ft_board_setup")));
/*
* Fixup all PCIe nodes by setting the device_type property

View File

@ -392,9 +392,11 @@ int misc_init_r(void)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t * bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -171,10 +171,11 @@ void pci_init_board(void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif

View File

@ -490,9 +490,9 @@ int misc_init_r(void)
#endif /* !defined(CONFIG_ARCHES) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
extern void __ft_board_setup(void *blob, bd_t *bd);
extern int __ft_board_setup(void *blob, bd_t *bd);
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
__ft_board_setup(blob, bd);
@ -515,5 +515,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
"disabled", sizeof("disabled"), 1);
}
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -10,6 +10,7 @@
*/
#include <common.h>
#include <errno.h>
#include <libfdt.h>
#include <fdt_support.h>
#include <asm/ppc4xx.h>
@ -363,7 +364,7 @@ void board_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
* On NAND-booting sequoia, we need to patch the chips select numbers
* in the dtb (CS0 - NAND, CS3 - NOR)
*/
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int rc;
int len;
@ -381,15 +382,14 @@ void ft_board_setup(void *blob, bd_t *bd)
prop = fdt_get_property_w(blob, nodeoffset, "reg", &len);
if (prop == NULL) {
printf("Unable to update NOR chip select for NAND booting\n");
return;
return -FDT_ERR_NOTFOUND;
}
reg = (u32 *)&prop->data[0];
reg[0] = 3;
rc = fdt_find_and_setprop(blob, path, "reg", reg, 3 * sizeof(u32), 1);
if (rc) {
printf("Unable to update property NOR mappings, err=%s\n",
fdt_strerror(rc));
return;
printf("Unable to update property NOR mappings\n");
return rc;
}
/* And now configure NAND chip select to 0 instead of 3 */
@ -398,15 +398,16 @@ void ft_board_setup(void *blob, bd_t *bd)
prop = fdt_get_property_w(blob, nodeoffset, "reg", &len);
if (prop == NULL) {
printf("Unable to update NDFC chip select for NAND booting\n");
return;
return len;
}
reg = (u32 *)&prop->data[0];
reg[0] = 0;
rc = fdt_find_and_setprop(blob, path, "reg", reg, 3 * sizeof(u32), 1);
if (rc) {
printf("Unable to update property NDFC mappings, err=%s\n",
fdt_strerror(rc));
return;
printf("Unable to update property NDFC mapping\n");
return rc;
}
return 0;
}
#endif /* CONFIG_SYS_RAMBOOT */

View File

@ -359,9 +359,11 @@ int last_stage_init(void)
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
ft_blob_update(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -452,7 +452,7 @@ int cm_fx6_setup_ecspi(void) { return 0; }
#endif
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
uint8_t enetaddr[6];
@ -461,6 +461,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_find_and_setprop(blob, "/fec", "local-mac-address",
enetaddr, 6, 1);
}
return 0;
}
#endif

View File

@ -121,7 +121,7 @@ int board_mmc_init(bd_t *bis)
#ifdef CONFIG_USB_HOST_ETHER
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
uint8_t enetaddr[6];
@ -130,6 +130,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_find_and_setprop(blob, "/smsc95xx@0", "mac-address",
enetaddr, 6, 1);
}
return 0;
}
static void generate_mac_addr(uint8_t *enetaddr)

View File

@ -107,8 +107,10 @@ int checkboard (void)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -508,7 +508,7 @@ int pci_pre_init(struct pci_controller *hose)
#endif /* defined(CONFIG_PCI) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int rc;
@ -526,6 +526,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_strerror(rc));
}
}
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -199,8 +199,10 @@ int checkboard(void)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -300,7 +300,7 @@ int pci_pre_init(struct pci_controller *hose)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int rc;
@ -318,6 +318,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_strerror(rc));
}
}
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -882,7 +882,7 @@ int board_usb_cleanup(int index, enum usb_init_type init)
#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int rc;
@ -899,5 +899,7 @@ void ft_board_setup(void *blob, bd_t *bd)
printf("err=%s\n", fdt_strerror(rc));
}
}
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -74,13 +74,15 @@ int board_eth_init(bd_t *bis)
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif

View File

@ -1110,7 +1110,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -1136,6 +1136,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}
/*

View File

@ -58,7 +58,7 @@ struct node_info nodes[] = {
{ "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
};
#endif
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -74,5 +74,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
fdt_fixup_dr_usb(blob, bd);
return 0;
}
#endif

View File

@ -363,7 +363,7 @@ struct node_info nodes[] = {
{ "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
};
#endif
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -423,5 +423,7 @@ void ft_board_setup(void *blob, bd_t *bd)
printf("\nRemove sim from hwconfig and reset\n");
}
}
return 0;
}
#endif

View File

@ -128,7 +128,7 @@ void fdt_del_sec(void *blob, int offset)
}
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -150,5 +150,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_del_sec(blob, 1);
else if (cpu->soc_ver == SVR_C292)
fdt_del_sec(blob, 2);
return 0;
}
#endif

View File

@ -63,13 +63,14 @@ static void cds_pci_fixup(void *blob)
}
}
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
cds_pci_fixup(blob);
#endif
return 0;
}
#endif

View File

@ -190,7 +190,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -213,4 +213,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}

View File

@ -240,9 +240,11 @@ int board_init(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
u8 flash_read8(void *addr)

View File

@ -290,9 +290,11 @@ int misc_init_r(void)
}
#endif
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
u8 flash_read8(void *addr)

View File

@ -100,7 +100,7 @@ void fdt_fixup_board_enet(void *fdt)
#endif
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -115,5 +115,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_MC_ENET
fdt_fixup_board_enet(blob);
#endif
return 0;
}
#endif

View File

@ -275,8 +275,10 @@ int checkboard (void)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -70,11 +70,12 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
return 0;
}
#endif

View File

@ -161,11 +161,13 @@ int misc_init_r(void)
return 0;
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd);
fdt_fixup_esdhc(blob, bd);
return 0;
}
#endif

View File

@ -116,12 +116,14 @@ int misc_init_r(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif
#else /* CONFIG_SPL_BUILD */

View File

@ -188,7 +188,7 @@ void fdt_tsec1_fixup(void *fdt, bd_t *bd)
do_fixup_by_path(fdt, path, "status", disabled, sizeof(disabled), 1);
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
@ -196,6 +196,8 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
fdt_fixup_dr_usb(blob, bd);
fdt_tsec1_fixup(blob, bd);
return 0;
}
#endif

View File

@ -172,12 +172,14 @@ void pci_init_board(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif

View File

@ -154,11 +154,13 @@ int checkboard(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif

View File

@ -273,11 +273,13 @@ void spi_cs_deactivate(struct spi_slave *slave)
#endif /* CONFIG_HARD_SPI */
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif

View File

@ -378,11 +378,13 @@ int misc_init_r(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif

View File

@ -402,7 +402,7 @@ static void ft_board_fixup_qe_usb(void *blob, bd_t *bd)
"peripheral", sizeof("peripheral"), 1);
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
@ -447,5 +447,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
}
}
return 0;
}
#endif

View File

@ -340,9 +340,11 @@ void pci_init_board(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
ft_pci_setup(blob, bd);
return 0;
}
#endif

View File

@ -328,7 +328,7 @@ static void ft_pci_fixup(void *blob, bd_t *bd)
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
ft_tsec_fixup(blob, bd);
@ -340,5 +340,7 @@ void ft_board_setup(void *blob, bd_t *bd)
ft_pci_fixup(blob, bd);
ft_pcie_fixup(blob, bd);
#endif
return 0;
}
#endif /* CONFIG_OF_BOARD_SETUP */

View File

@ -199,7 +199,7 @@ int misc_init_r(void)
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
@ -207,5 +207,7 @@ void ft_board_setup(void *blob, bd_t *bd)
ft_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd);
fdt_fixup_esdhc(blob, bd);
return 0;
}
#endif /* CONFIG_OF_BOARD_SETUP */

View File

@ -271,7 +271,7 @@ int board_eth_init(bd_t *bis)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
@ -285,5 +285,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_dr_usb(blob, bd);
#endif
return 0;
}
#endif

View File

@ -218,8 +218,7 @@ pci_init_board(void)
#if defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int node, tmp[2];
const char *path;
@ -237,5 +236,7 @@ ft_board_setup(void *blob, bd_t *bd)
}
#endif
}
return 0;
}
#endif

View File

@ -305,7 +305,7 @@ int board_eth_init(bd_t *bis)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
@ -314,5 +314,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_SGMII_RISER
fsl_sgmii_riser_fdt_fixup(blob);
#endif
return 0;
}
#endif

View File

@ -438,8 +438,7 @@ pci_init_board(void)
#if defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int node, tmp[2];
const char *path;
@ -457,5 +456,7 @@ ft_board_setup(void *blob, bd_t *bd)
}
#endif
}
return 0;
}
#endif

View File

@ -345,10 +345,12 @@ void pci_init_board(void)
#endif /* CONFIG_PCI */
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
FT_FSL_PCI_SETUP;
return 0;
}
#endif

View File

@ -514,7 +514,7 @@ void pci_init_board(void)
#endif /* CONFIG_PCI */
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
#if defined(CONFIG_SYS_UCC_RMII_MODE)
int nodeoff, off, err;
@ -579,5 +579,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_board_fixup_esdhc(blob, bd);
fdt_board_fixup_qe_uart(blob, bd);
fdt_board_fixup_qe_usb(blob, bd);
return 0;
}
#endif

View File

@ -232,7 +232,7 @@ int board_eth_init(bd_t *bis)
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -249,5 +249,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_SGMII_RISER
fsl_sgmii_riser_fdt_fixup(blob);
#endif
return 0;
}
#endif

View File

@ -258,12 +258,13 @@ void pci_init_board(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
FT_FSL_PCI_SETUP;
return 0;
}
#endif

View File

@ -119,8 +119,7 @@ void pci_init_board(void)
#if defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int off;
u64 *tmp;
@ -152,6 +151,8 @@ ft_board_setup(void *blob, bd_t *bd)
"in u-boot. This means your .dts might "
"be old.\n");
}
return 0;
}
#endif

View File

@ -444,7 +444,7 @@ void fdt_disable_uart1(void *blob)
}
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -496,6 +496,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_del_flexcan(blob);
fdt_disable_uart1(blob);
}
return 0;
}
#endif

View File

@ -332,7 +332,7 @@ static void ft_codec_setup(void *blob, const char *compatible)
}
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -356,5 +356,7 @@ void ft_board_setup(void *blob, bd_t *bd)
/* Update the WM8776 node's clock frequency property */
ft_codec_setup(blob, "wlf,wm8776");
return 0;
}
#endif

View File

@ -130,7 +130,7 @@ int board_eth_init(bd_t *bis)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -147,5 +147,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
fdt_fixup_fman_ethernet(blob);
return 0;
}
#endif

View File

@ -234,7 +234,7 @@ int board_eth_init(bd_t *bis)
#if defined(CONFIG_OF_BOARD_SETUP)
extern void ft_pci_board_setup(void *blob);
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
const char *soc_usb_compat = "fsl-usb2-dr";
int err, usb1_off, usb2_off;
@ -263,39 +263,41 @@ void ft_board_setup(void *blob, bd_t *bd)
int off = fdt_node_offset_by_compatible(blob, -1,
soc_elbc_compat);
if (off < 0) {
printf("WARNING: could not find compatible node"
" %s: %s.\n", soc_elbc_compat,
fdt_strerror(off));
return;
printf("WARNING: could not find compatible node %s\n",
soc_elbc_compat);
return off;
}
err = fdt_del_node(blob, off);
if (err < 0) {
printf("WARNING: could not remove %s: %s.\n",
soc_elbc_compat, fdt_strerror(err));
printf("WARNING: could not remove %s\n",
soc_elbc_compat);
return err;
}
return;
return 0;
}
#endif
/* Delete USB2 node as it is muxed with eLBC */
usb1_off = fdt_node_offset_by_compatible(blob, -1,
soc_usb_compat);
if (usb1_off < 0) {
printf("WARNING: could not find compatible node"
" %s: %s.\n", soc_usb_compat,
fdt_strerror(usb1_off));
return;
printf("WARNING: could not find compatible node %s\n",
soc_usb_compat);
return usb1_off;
}
usb2_off = fdt_node_offset_by_compatible(blob, usb1_off,
soc_usb_compat);
if (usb2_off < 0) {
printf("WARNING: could not find compatible node"
" %s: %s.\n", soc_usb_compat,
fdt_strerror(usb2_off));
return;
printf("WARNING: could not find compatible node %s\n",
soc_usb_compat);
return usb2_off;
}
err = fdt_del_node(blob, usb2_off);
if (err < 0)
printf("WARNING: could not remove %s: %s.\n",
soc_usb_compat, fdt_strerror(err));
if (err < 0) {
printf("WARNING: could not remove %s\n", soc_usb_compat);
return err;
}
return 0;
}
#endif

View File

@ -424,7 +424,7 @@ static void fdt_board_fixup_qe_pins(void *blob)
#endif
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -459,17 +459,17 @@ void ft_board_setup(void *blob, bd_t *bd)
int off = fdt_node_offset_by_compatible(blob, -1,
soc_elbc_compat);
if (off < 0) {
printf("WARNING: could not find compatible node %s: %s.\n",
soc_elbc_compat,
fdt_strerror(off));
return;
printf("WARNING: could not find compatible node %s\n",
soc_elbc_compat);
return off;
}
err = fdt_del_node(blob, off);
if (err < 0) {
printf("WARNING: could not remove %s: %s.\n",
soc_elbc_compat, fdt_strerror(err));
printf("WARNING: could not remove %s\n",
soc_elbc_compat);
return err;
}
return;
return 0;
}
#endif
@ -477,24 +477,23 @@ void ft_board_setup(void *blob, bd_t *bd)
usb1_off = fdt_node_offset_by_compatible(blob, -1,
soc_usb_compat);
if (usb1_off < 0) {
printf("WARNING: could not find compatible node %s: %s.\n",
soc_usb_compat,
fdt_strerror(usb1_off));
return;
printf("WARNING: could not find compatible node %s\n",
soc_usb_compat);
return usb1_off;
}
usb2_off = fdt_node_offset_by_compatible(blob, usb1_off,
soc_usb_compat);
if (usb2_off < 0) {
printf("WARNING: could not find compatible node %s: %s.\n",
soc_usb_compat,
fdt_strerror(usb2_off));
return;
printf("WARNING: could not find compatible node %s\n",
soc_usb_compat);
return usb2_off;
}
err = fdt_del_node(blob, usb2_off);
if (err < 0) {
printf("WARNING: could not remove %s: %s.\n",
soc_usb_compat, fdt_strerror(err));
printf("WARNING: could not remove %s\n", soc_usb_compat);
return err;
}
return 0;
}
#endif

View File

@ -261,7 +261,7 @@ static void fdt_board_fixup_qe_pins(void *blob)
#endif
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -283,5 +283,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_board_fixup_qe_pins(blob);
#endif
fdt_fixup_dr_usb(blob, bd);
return 0;
}
#endif

View File

@ -250,7 +250,7 @@ int board_eth_init(bd_t *bis)
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -269,5 +269,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_HAS_FSL_DR_USB
fdt_fixup_dr_usb(blob, bd);
#endif
return 0;
}
#endif

View File

@ -236,7 +236,7 @@ int board_eth_init(bd_t *bis)
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -257,5 +257,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_SGMII_RISER
fsl_sgmii_riser_fdt_fixup(blob);
#endif
return 0;
}
#endif

View File

@ -215,7 +215,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -239,4 +239,6 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_SYS_DPAA_FMAN
fdt_fixup_fman_ethernet(blob);
#endif
return 0;
}

View File

@ -235,9 +235,11 @@ int board_eth_init(bd_t *bis)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
FT_FSL_PCI_SETUP;
return 0;
}
#endif

View File

@ -233,7 +233,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -259,6 +259,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}
void qixis_dump_switch(void)

View File

@ -85,7 +85,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -110,6 +110,8 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_SYS_DPAA_FMAN
fdt_fixup_fman_ethernet(blob);
#endif
return 0;
}
#ifdef CONFIG_DEEP_SLEEP

View File

@ -437,7 +437,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -460,4 +460,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}

View File

@ -103,7 +103,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -126,4 +126,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}

View File

@ -69,7 +69,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -83,4 +83,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_liodn(blob);
fdt_fixup_dr_usb(blob, bd);
return 0;
}

View File

@ -683,7 +683,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -706,6 +706,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}
/*

View File

@ -88,7 +88,7 @@ int misc_init_r(void)
return 0;
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -111,6 +111,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
#endif
return 0;
}
/*

View File

@ -146,9 +146,11 @@ int checkboard(void)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t * bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -1483,7 +1483,7 @@ int misc_init_r(void)
* - board (full model from EEPROM)
* - peripherals removed from DTB if not loaded on board (per EEPROM config)
*/
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
struct ventana_board_info *info = &ventana_info;
struct ventana_eeprom_config *cfg;
@ -1495,7 +1495,7 @@ void ft_board_setup(void *blob, bd_t *bd)
if (getenv("fdt_noauto")) {
puts(" Skiping ft_board_setup (fdt_noauto defined)\n");
return;
return 0;
}
/* Update partition nodes using info from mtdparts env var */
@ -1504,7 +1504,7 @@ void ft_board_setup(void *blob, bd_t *bd)
if (!model) {
puts("invalid board info: Leaving FDT fully enabled\n");
return;
return 0;
}
printf(" Adjusting FDT per EEPROM for %s...\n", model);
@ -1523,7 +1523,7 @@ void ft_board_setup(void *blob, bd_t *bd)
*/
if (getenv("fdt_noconfig")) {
puts(" Skiping periperhal config (fdt_noconfig defined)\n");
return;
return 0;
}
cfg = econfig;
while (cfg->name) {
@ -1533,6 +1533,8 @@ void ft_board_setup(void *blob, bd_t *bd)
}
cfg++;
}
return 0;
}
#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -206,7 +206,7 @@ int misc_init_r(void)
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
extern void __ft_board_setup(void *blob, bd_t *bd);
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
__ft_board_setup(blob, bd);
@ -215,5 +215,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
"disabled", sizeof("disabled"), 1);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -531,11 +531,13 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd);
fdt_fixup_esdhc(blob, bd);
return 0;
}
#endif

View File

@ -326,7 +326,7 @@ int board_eth_init(bd_t *bis)
}
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -343,6 +343,8 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
FT_FSL_PCI_SETUP;
return 0;
}
#endif

View File

@ -94,7 +94,7 @@ void dram_init_banksize(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *fdt, bd_t *bd)
int ft_board_setup(void *fdt, bd_t *bd)
{
static const char disabled[] = "disabled";
u32 reg = readl(HB_SREG_A9_PWRDOM_STAT);
@ -106,6 +106,8 @@ void ft_board_setup(void *fdt, bd_t *bd)
if (!(reg & PWRDOM_STAT_EMMC))
do_fixup_by_compat(fdt, "calxeda,hb-sdhci", "status",
disabled, sizeof(disabled), 1);
return 0;
}
#endif

View File

@ -311,10 +311,11 @@ void ide_set_reset (int idereset)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif

View File

@ -138,9 +138,11 @@ phys_size_t initdram(int board_type)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif

View File

@ -608,8 +608,10 @@ int checkboard(void)
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -364,7 +364,7 @@ int update_flash_size(int flash_size)
}
#endif /* defined(CONFIG_SYS_UPDATE_FLASH_SIZE) */
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int phy_addr = CONFIG_PHY_ADDR;
char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0";
@ -380,5 +380,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
/* fix up the phy address */
do_fixup_by_path(blob, eth_path, "reg", &phy_addr, sizeof(int), 0);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -454,7 +454,7 @@ int update_flash_size (int flash_size)
}
#endif /* defined(CONFIG_SYS_UPDATE_FLASH_SIZE) */
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int phy_addr = CONFIG_PHY_ADDR;
char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0";
@ -478,5 +478,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
/* fix up the phy address */
do_fixup_by_path(blob, eth_path, "reg", &phy_addr, sizeof(int), 0);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -196,10 +196,12 @@ void pci_init_board (void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup (void *blob, bd_t * bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup (blob, bd);
fdt_fixup_memory (blob, (u64) bd->bi_memstart, (u64) bd->bi_memsize);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -283,9 +283,10 @@ void ide_set_reset (int idereset)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif

View File

@ -460,8 +460,10 @@ static void setports(int gpio)
}
#endif
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

View File

@ -359,9 +359,11 @@ int checkboard(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif

View File

@ -261,7 +261,7 @@ void fdt_fixup_fman_mac_addresses(void *blob)
}
#endif
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
phys_size_t size;
@ -286,6 +286,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_fman_mac_addresses(blob);
#endif
return 0;
}
#if defined(CONFIG_POST)

View File

@ -610,7 +610,7 @@ void pci_target_init(struct pci_controller *hose)
#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
u32 val[4];
int rc;
@ -627,5 +627,7 @@ void ft_board_setup(void *blob, bd_t *bd)
if (rc)
printf("Unable to update property NOR mapping, err=%s\n",
fdt_strerror(rc));
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -280,8 +280,10 @@ static unsigned char swapbyte(unsigned char c)
* Device Tree Support
*/
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

View File

@ -385,8 +385,10 @@ void pci_init_board (void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -358,8 +358,10 @@ void hw_watchdog_reset(void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -185,9 +185,11 @@ int checkboard(void)
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -62,10 +62,12 @@ void pci_init_board(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd);
return 0;
}
#endif

View File

@ -329,9 +329,11 @@ void ft_blob_update (void *blob, bd_t *bd)
}
}
void ft_board_setup (void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup (blob, bd);
ft_blob_update (blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

View File

@ -146,9 +146,10 @@ void pci_init_board(void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif

View File

@ -477,7 +477,7 @@ static unsigned char edid_buf[128] = {
};
#endif
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
u32 val[8];
int rc, i = 0;
@ -526,6 +526,8 @@ void ft_board_setup(void *blob, bd_t *bd)
if (rc)
printf("Unable to update flash reg property, err=%s\n",
fdt_strerror(rc));
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -164,9 +164,11 @@ void pci_init_board(void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t * bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -154,7 +154,7 @@ int board_mmc_init(bd_t *bis)
msg_clk->get_clock_rate.body.resp.rate_hz);
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
/*
* For now, we simply always add the simplefb DT node. Later, we
@ -162,4 +162,6 @@ void ft_board_setup(void *blob, bd_t *bd)
* node exists for the "real" graphics driver.
*/
lcd_dt_simplefb_add_node(blob);
return 0;
}

View File

@ -214,11 +214,13 @@ void sdram_init(void)
#endif
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
return 0;
}
#endif

View File

@ -301,12 +301,14 @@ int last_stage_init(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_FSL_PCI_INIT
FT_FSL_PCI_SETUP;
#endif
return 0;
}
#endif

View File

@ -173,11 +173,13 @@ void pci_init_board(void)
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup (void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
FT_FSL_PCI_SETUP;
return 0;
}
#endif

View File

@ -218,8 +218,7 @@ int board_early_init_r (void)
#endif /* CONFIG_BOARD_EARLY_INIT_R */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
u32 val[12];
int rc, i = 0;
@ -251,6 +250,8 @@ ft_board_setup(void *blob, bd_t *bd)
if (rc)
printf("Unable to update localbus ranges, err=%s\n",
fdt_strerror(rc));
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -233,9 +233,11 @@ reset_phy(void)
}
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup (blob, bd);
return 0;
}
#endif /* CONFIG_OF_BOARD_SETUP */

View File

@ -114,7 +114,7 @@ u32 spl_boot_device(void)
#endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
int lpae;
char *env;
@ -217,6 +217,8 @@ void ft_board_setup(void *blob, bd_t *bd)
}
}
}
return 0;
}
void ft_board_setup_ex(void *blob, bd_t *bd)

View File

@ -863,12 +863,14 @@ int board_get_height (void)
#endif /* CONFIG_VIDEO_SM501 */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#if defined(CONFIG_VIDEO)
fdt_add_edid(blob, "smi,sm501", edid_buf);
#endif
return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -414,12 +414,14 @@ static void set_ddr_config(void) {
}
#ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif /* CONFIG_PCI */
return 0;
}
#endif /* CONFIG_OF_BOARD_SETUP */

View File

@ -674,10 +674,12 @@ void ft_blob_update (void *blob, bd_t *bd)
}
}
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
ft_blob_update(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

View File

@ -259,12 +259,14 @@ int checkboard(void)
* Device Tree Support
*/
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
void ft_board_setup(void *blob, bd_t *bd)
int ft_board_setup(void *blob, bd_t *bd)
{
/* bring in eMMC dsr settings */
do_fixup_by_path_u32(blob,
"/soc/aips-bus@02100000/usdhc@02198000",
"dsr", tqma6_emmc_dsr, 2);
tqma6_bb_ft_board_setup(blob, bd);
return 0;
}
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

Some files were not shown because too many files have changed in this diff Show More