Merge git://git.denx.de/u-boot-fdt

This commit is contained in:
Tom Rini 2014-11-25 11:08:52 -05:00
commit 1fc4e6f486
113 changed files with 599 additions and 232 deletions

9
README
View File

@ -783,6 +783,13 @@ The following options need to be configured:
Board code has addition modification that it wants to make Board code has addition modification that it wants to make
to the flat device tree before handing it off to the kernel to the flat device tree before handing it off to the kernel
CONFIG_OF_SYSTEM_SETUP
Other code has addition modification that it wants to make
to the flat device tree before handing it off to the kernel.
This causes ft_system_setup() to be called before booting
the kernel.
CONFIG_OF_BOOT_CPU CONFIG_OF_BOOT_CPU
This define fills in the correct boot CPU in the boot This define fills in the correct boot CPU in the boot
@ -3510,7 +3517,7 @@ FIT uImage format:
to 128 or 256, although it does not have to be power of 2). to 128 or 256, although it does not have to be power of 2).
default: 4096 default: 4096
CONFIG_MTD_UBI_BEB_LIMIT CONFIG_MTD_UBI_BEB_LIMIT
This option specifies the maximum bad physical eraseblocks UBI This option specifies the maximum bad physical eraseblocks UBI
expects on the MTD device (per 1024 eraseblocks). If the expects on the MTD device (per 1024 eraseblocks). If the

View File

@ -18,11 +18,13 @@
DECLARE_GLOBAL_DATA_PTR; 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); 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"))); __attribute__((weak, alias("__ft_board_setup")));
void ft_cpu_setup(void *blob, bd_t *bd) 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 * Note: aliases in the dts are required for this
*/ */
fdt_fixup_ethernet(blob); fdt_fixup_ethernet(blob);
return 0;
} }
#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */ #endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */

View File

@ -18,7 +18,7 @@
DECLARE_GLOBAL_DATA_PTR; 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 rc;
int i; 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", printf("Unable to update property EBC mappings, err=%s\n",
fdt_strerror(rc)); 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 * 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) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */ #endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */

View File

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

View File

@ -490,9 +490,9 @@ int misc_init_r(void)
#endif /* !defined(CONFIG_ARCHES) */ #endif /* !defined(CONFIG_ARCHES) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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); __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", fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
"disabled", sizeof("disabled"), 1); "disabled", sizeof("disabled"), 1);
} }
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

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

View File

@ -458,7 +458,7 @@ int cm_fx6_setup_ecspi(void) { return 0; }
#endif #endif
#ifdef CONFIG_OF_BOARD_SETUP #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]; uint8_t enetaddr[6];
@ -467,6 +467,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_find_and_setprop(blob, "/fec", "local-mac-address", fdt_find_and_setprop(blob, "/fec", "local-mac-address",
enetaddr, 6, 1); enetaddr, 6, 1);
} }
return 0;
} }
#endif #endif

View File

@ -121,7 +121,7 @@ int board_mmc_init(bd_t *bis)
#ifdef CONFIG_USB_HOST_ETHER #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]; 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", fdt_find_and_setprop(blob, "/smsc95xx@0", "mac-address",
enetaddr, 6, 1); enetaddr, 6, 1);
} }
return 0;
} }
static void generate_mac_addr(uint8_t *enetaddr) 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) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) */ #endif /* defined(CONFIG_PCI) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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; int rc;
@ -526,6 +526,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_strerror(rc)); fdt_strerror(rc));
} }
} }
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #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; int rc;
@ -318,6 +318,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_strerror(rc)); fdt_strerror(rc));
} }
} }
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) */ #endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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; int rc;
@ -899,5 +899,7 @@ void ft_board_setup(void *blob, bd_t *bd)
printf("err=%s\n", fdt_strerror(rc)); printf("err=%s\n", fdt_strerror(rc));
} }
} }
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -74,13 +74,15 @@ int board_eth_init(bd_t *bis)
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -1110,7 +1110,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -1136,6 +1136,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }
/* /*

View File

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

View File

@ -363,7 +363,7 @@ struct node_info nodes[] = {
{ "fsl,ifc-nand", MTD_DEV_TYPE_NAND, }, { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
}; };
#endif #endif
void ft_board_setup(void *blob, bd_t *bd) int ft_board_setup(void *blob, bd_t *bd)
{ {
phys_addr_t base; phys_addr_t base;
phys_size_t size; 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"); printf("\nRemove sim from hwconfig and reset\n");
} }
} }
return 0;
} }
#endif #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -150,5 +150,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_del_sec(blob, 1); fdt_del_sec(blob, 1);
else if (cpu->soc_ver == SVR_C292) else if (cpu->soc_ver == SVR_C292)
fdt_del_sec(blob, 2); fdt_del_sec(blob, 2);
return 0;
} }
#endif #endif

View File

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

View File

@ -190,7 +190,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -213,4 +213,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }

View File

@ -240,9 +240,11 @@ int board_init(void)
return 0; 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); ft_cpu_setup(blob, bd);
return 0;
} }
u8 flash_read8(void *addr) u8 flash_read8(void *addr)

View File

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

View File

@ -100,7 +100,7 @@ void fdt_fixup_board_enet(void *fdt)
#endif #endif
#ifdef CONFIG_OF_BOARD_SETUP #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -115,5 +115,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_MC_ENET #ifdef CONFIG_FSL_MC_ENET
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -275,8 +275,10 @@ int checkboard (void)
} }
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #if defined(CONFIG_OF_BOARD_SETUP)
void int ft_board_setup(void *blob, bd_t *bd)
ft_board_setup(void *blob, bd_t *bd)
{ {
ft_cpu_setup(blob, bd); ft_cpu_setup(blob, bd);
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
return 0;
} }
#endif #endif

View File

@ -161,11 +161,13 @@ int misc_init_r(void)
return 0; return 0;
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
fdt_fixup_esdhc(blob, bd); fdt_fixup_esdhc(blob, bd);
return 0;
} }
#endif #endif

View File

@ -116,12 +116,14 @@ int misc_init_r(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif
#else /* CONFIG_SPL_BUILD */ #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); 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); ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
@ -196,6 +196,8 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif #endif
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
fdt_tsec1_fixup(blob, bd); fdt_tsec1_fixup(blob, bd);
return 0;
} }
#endif #endif

View File

@ -172,12 +172,14 @@ void pci_init_board(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -154,11 +154,13 @@ int checkboard(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -273,11 +273,13 @@ void spi_cs_deactivate(struct spi_slave *slave)
#endif /* CONFIG_HARD_SPI */ #endif /* CONFIG_HARD_SPI */
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -378,11 +378,13 @@ int misc_init_r(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -402,7 +402,7 @@ static void ft_board_fixup_qe_usb(void *blob, bd_t *bd)
"peripheral", sizeof("peripheral"), 1); "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); ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
@ -447,5 +447,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif #endif
} }
} }
return 0;
} }
#endif #endif

View File

@ -340,9 +340,11 @@ void pci_init_board(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
return 0;
} }
#endif #endif

View File

@ -328,7 +328,7 @@ static void ft_pci_fixup(void *blob, bd_t *bd)
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
ft_tsec_fixup(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_pci_fixup(blob, bd);
ft_pcie_fixup(blob, bd); ft_pcie_fixup(blob, bd);
#endif #endif
return 0;
} }
#endif /* CONFIG_OF_BOARD_SETUP */ #endif /* CONFIG_OF_BOARD_SETUP */

View File

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

View File

@ -271,7 +271,7 @@ int board_eth_init(bd_t *bis)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
@ -285,5 +285,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

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

View File

@ -305,7 +305,7 @@ int board_eth_init(bd_t *bis)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
@ -314,5 +314,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_SGMII_RISER #ifdef CONFIG_FSL_SGMII_RISER
fsl_sgmii_riser_fdt_fixup(blob); fsl_sgmii_riser_fdt_fixup(blob);
#endif #endif
return 0;
} }
#endif #endif

View File

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

View File

@ -345,10 +345,12 @@ void pci_init_board(void)
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
FT_FSL_PCI_SETUP; FT_FSL_PCI_SETUP;
return 0;
} }
#endif #endif

View File

@ -514,7 +514,7 @@ void pci_init_board(void)
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
#if defined(CONFIG_OF_BOARD_SETUP) #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) #if defined(CONFIG_SYS_UCC_RMII_MODE)
int nodeoff, off, err; 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_esdhc(blob, bd);
fdt_board_fixup_qe_uart(blob, bd); fdt_board_fixup_qe_uart(blob, bd);
fdt_board_fixup_qe_usb(blob, bd); fdt_board_fixup_qe_usb(blob, bd);
return 0;
} }
#endif #endif

View File

@ -232,7 +232,7 @@ int board_eth_init(bd_t *bis)
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -249,5 +249,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_SGMII_RISER #ifdef CONFIG_FSL_SGMII_RISER
fsl_sgmii_riser_fdt_fixup(blob); fsl_sgmii_riser_fdt_fixup(blob);
#endif #endif
return 0;
} }
#endif #endif

View File

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

View File

@ -119,12 +119,11 @@ void pci_init_board(void)
#if defined(CONFIG_OF_BOARD_SETUP) #if defined(CONFIG_OF_BOARD_SETUP)
void int ft_board_setup(void *blob, bd_t *bd)
ft_board_setup(void *blob, bd_t *bd)
{ {
int off; int off;
u64 *tmp; u64 *tmp;
u32 *addrcells; int addrcells;
ft_cpu_setup(blob, bd); ft_cpu_setup(blob, bd);
@ -136,12 +135,13 @@ ft_board_setup(void *blob, bd_t *bd)
* which is defined by the "reg" property in the soc node. * which is defined by the "reg" property in the soc node.
*/ */
off = fdt_path_offset(blob, "/soc8641"); off = fdt_path_offset(blob, "/soc8641");
addrcells = (u32 *)fdt_getprop(blob, 0, "#address-cells", NULL); addrcells = fdt_address_cells(blob, 0);
tmp = (u64 *)fdt_getprop(blob, off, "reg", NULL); tmp = (u64 *)fdt_getprop(blob, off, "reg", NULL);
if (tmp) { if (tmp) {
u64 addr; u64 addr;
if (addrcells && (*addrcells == 1))
if (addrcells == 1)
addr = *(u32 *)tmp; addr = *(u32 *)tmp;
else else
addr = *tmp; addr = *tmp;
@ -152,6 +152,8 @@ ft_board_setup(void *blob, bd_t *bd)
"in u-boot. This means your .dts might " "in u-boot. This means your .dts might "
"be old.\n"); "be old.\n");
} }
return 0;
} }
#endif #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -496,6 +496,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_del_flexcan(blob); fdt_del_flexcan(blob);
fdt_disable_uart1(blob); fdt_disable_uart1(blob);
} }
return 0;
} }
#endif #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_addr_t base;
phys_size_t size; 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 */ /* Update the WM8776 node's clock frequency property */
ft_codec_setup(blob, "wlf,wm8776"); ft_codec_setup(blob, "wlf,wm8776");
return 0;
} }
#endif #endif

View File

@ -130,7 +130,7 @@ int board_eth_init(bd_t *bis)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -147,5 +147,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif #endif
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
return 0;
} }
#endif #endif

View File

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

View File

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

View File

@ -261,7 +261,7 @@ static void fdt_board_fixup_qe_pins(void *blob)
#endif #endif
#ifdef CONFIG_OF_BOARD_SETUP #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -283,5 +283,7 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_board_fixup_qe_pins(blob); fdt_board_fixup_qe_pins(blob);
#endif #endif
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
return 0;
} }
#endif #endif

View File

@ -250,7 +250,7 @@ int board_eth_init(bd_t *bis)
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -269,5 +269,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_HAS_FSL_DR_USB #ifdef CONFIG_HAS_FSL_DR_USB
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -236,7 +236,7 @@ int board_eth_init(bd_t *bis)
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -257,5 +257,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_FSL_SGMII_RISER #ifdef CONFIG_FSL_SGMII_RISER
fsl_sgmii_riser_fdt_fixup(blob); fsl_sgmii_riser_fdt_fixup(blob);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -215,7 +215,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -239,4 +239,6 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_SYS_DPAA_FMAN #ifdef CONFIG_SYS_DPAA_FMAN
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
#endif #endif
return 0;
} }

View File

@ -235,9 +235,11 @@ int board_eth_init(bd_t *bis)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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; FT_FSL_PCI_SETUP;
return 0;
} }
#endif #endif

View File

@ -233,7 +233,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -259,6 +259,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }
void qixis_dump_switch(void) void qixis_dump_switch(void)

View File

@ -85,7 +85,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -110,6 +110,8 @@ void ft_board_setup(void *blob, bd_t *bd)
#ifdef CONFIG_SYS_DPAA_FMAN #ifdef CONFIG_SYS_DPAA_FMAN
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
#endif #endif
return 0;
} }
#ifdef CONFIG_DEEP_SLEEP #ifdef CONFIG_DEEP_SLEEP

View File

@ -437,7 +437,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -460,4 +460,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }

View File

@ -103,7 +103,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -126,4 +126,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }

View File

@ -69,7 +69,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -83,4 +83,6 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_liodn(blob); fdt_fixup_liodn(blob);
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
return 0;
} }

View File

@ -683,7 +683,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -706,6 +706,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }
/* /*

View File

@ -88,7 +88,7 @@ int misc_init_r(void)
return 0; 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_addr_t base;
phys_size_t size; phys_size_t size;
@ -111,6 +111,8 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob); fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob); fdt_fixup_board_enet(blob);
#endif #endif
return 0;
} }
/* /*

View File

@ -146,9 +146,11 @@ int checkboard(void)
} }
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) * - board (full model from EEPROM)
* - peripherals removed from DTB if not loaded on board (per EEPROM config) * - 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_board_info *info = &ventana_info;
struct ventana_eeprom_config *cfg; struct ventana_eeprom_config *cfg;
@ -1495,7 +1495,7 @@ void ft_board_setup(void *blob, bd_t *bd)
if (getenv("fdt_noauto")) { if (getenv("fdt_noauto")) {
puts(" Skiping ft_board_setup (fdt_noauto defined)\n"); puts(" Skiping ft_board_setup (fdt_noauto defined)\n");
return; return 0;
} }
/* Update partition nodes using info from mtdparts env var */ /* Update partition nodes using info from mtdparts env var */
@ -1504,7 +1504,7 @@ void ft_board_setup(void *blob, bd_t *bd)
if (!model) { if (!model) {
puts("invalid board info: Leaving FDT fully enabled\n"); puts("invalid board info: Leaving FDT fully enabled\n");
return; return 0;
} }
printf(" Adjusting FDT per EEPROM for %s...\n", model); 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")) { if (getenv("fdt_noconfig")) {
puts(" Skiping periperhal config (fdt_noconfig defined)\n"); puts(" Skiping periperhal config (fdt_noconfig defined)\n");
return; return 0;
} }
cfg = econfig; cfg = econfig;
while (cfg->name) { while (cfg->name) {
@ -1533,6 +1533,8 @@ void ft_board_setup(void *blob, bd_t *bd)
} }
cfg++; cfg++;
} }
return 0;
} }
#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
extern void __ft_board_setup(void *blob, bd_t *bd); 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); __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", fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
"disabled", sizeof("disabled"), 1); "disabled", sizeof("disabled"), 1);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #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_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
fdt_fixup_esdhc(blob, bd); fdt_fixup_esdhc(blob, bd);
return 0;
} }
#endif #endif

View File

@ -326,7 +326,7 @@ int board_eth_init(bd_t *bis)
} }
#ifdef CONFIG_OF_BOARD_SETUP #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_addr_t base;
phys_size_t size; phys_size_t size;
@ -343,6 +343,8 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif #endif
FT_FSL_PCI_SETUP; FT_FSL_PCI_SETUP;
return 0;
} }
#endif #endif

View File

@ -94,7 +94,7 @@ void dram_init_banksize(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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"; static const char disabled[] = "disabled";
u32 reg = readl(HB_SREG_A9_PWRDOM_STAT); 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)) if (!(reg & PWRDOM_STAT_EMMC))
do_fixup_by_compat(fdt, "calxeda,hb-sdhci", "status", do_fixup_by_compat(fdt, "calxeda,hb-sdhci", "status",
disabled, sizeof(disabled), 1); disabled, sizeof(disabled), 1);
return 0;
} }
#endif #endif

View File

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

View File

@ -138,9 +138,11 @@ phys_size_t initdram(int board_type)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif #endif

View File

@ -608,8 +608,10 @@ int checkboard(void)
} }
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) */ #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; int phy_addr = CONFIG_PHY_ADDR;
char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0"; char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0";
@ -380,5 +380,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif #endif
/* fix up the phy address */ /* fix up the phy address */
do_fixup_by_path(blob, eth_path, "reg", &phy_addr, sizeof(int), 0); 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) */ #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) */ #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; int phy_addr = CONFIG_PHY_ADDR;
char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0"; char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0";
@ -478,5 +478,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif #endif
/* fix up the phy address */ /* fix up the phy address */
do_fixup_by_path(blob, eth_path, "reg", &phy_addr, sizeof(int), 0); 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) */ #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -196,10 +196,12 @@ void pci_init_board (void)
#endif #endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup (blob, bd);
fdt_fixup_memory (blob, (u64) bd->bi_memstart, (u64) bd->bi_memsize); fdt_fixup_memory (blob, (u64) bd->bi_memstart, (u64) bd->bi_memsize);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

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

View File

@ -460,8 +460,10 @@ static void setports(int gpio)
} }
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) #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); ft_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ #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) #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_cpu_setup(blob, bd);
return 0;
} }
#endif #endif

View File

@ -261,7 +261,7 @@ void fdt_fixup_fman_mac_addresses(void *blob)
} }
#endif #endif
void ft_board_setup(void *blob, bd_t *bd) int ft_board_setup(void *blob, bd_t *bd)
{ {
phys_addr_t base; phys_addr_t base;
phys_size_t size; 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_ethernet(blob);
fdt_fixup_fman_mac_addresses(blob); fdt_fixup_fman_mac_addresses(blob);
#endif #endif
return 0;
} }
#if defined(CONFIG_POST) #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) */ #endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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]; u32 val[4];
int rc; int rc;
@ -627,5 +627,7 @@ void ft_board_setup(void *blob, bd_t *bd)
if (rc) if (rc)
printf("Unable to update property NOR mapping, err=%s\n", printf("Unable to update property NOR mapping, err=%s\n",
fdt_strerror(rc)); fdt_strerror(rc));
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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 * Device Tree Support
*/ */
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) #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); ft_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

View File

@ -385,8 +385,10 @@ void pci_init_board (void)
#endif #endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -358,8 +358,10 @@ void hw_watchdog_reset(void)
#endif #endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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) #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_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd); fdt_fixup_dr_usb(blob, bd);
return 0;
} }
#endif #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_cpu_setup (blob, bd);
ft_blob_update (blob, bd); ft_blob_update (blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */

View File

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

View File

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

View File

@ -164,9 +164,11 @@ void pci_init_board(void)
#endif #endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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); 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 * 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. * node exists for the "real" graphics driver.
*/ */
lcd_dt_simplefb_add_node(blob); lcd_dt_simplefb_add_node(blob);
return 0;
} }

View File

@ -214,11 +214,13 @@ void sdram_init(void)
#endif #endif
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif #endif
return 0;
} }
#endif #endif

View File

@ -301,12 +301,14 @@ int last_stage_init(void)
} }
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#ifdef CONFIG_FSL_PCI_INIT #ifdef CONFIG_FSL_PCI_INIT
FT_FSL_PCI_SETUP; FT_FSL_PCI_SETUP;
#endif #endif
return 0;
} }
#endif #endif

View File

@ -173,11 +173,13 @@ void pci_init_board(void)
#if defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
FT_FSL_PCI_SETUP; FT_FSL_PCI_SETUP;
return 0;
} }
#endif #endif

View File

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

View File

@ -233,9 +233,11 @@ reset_phy(void)
} }
#ifdef CONFIG_OF_BOARD_SETUP #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); ft_cpu_setup (blob, bd);
return 0;
} }
#endif /* CONFIG_OF_BOARD_SETUP */ #endif /* CONFIG_OF_BOARD_SETUP */

View File

@ -114,7 +114,7 @@ u32 spl_boot_device(void)
#endif #endif
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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; int lpae;
char *env; 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) 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 */ #endif /* CONFIG_VIDEO_SM501 */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) #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_cpu_setup(blob, bd);
#if defined(CONFIG_VIDEO) #if defined(CONFIG_VIDEO)
fdt_add_edid(blob, "smi,sm501", edid_buf); fdt_add_edid(blob, "smi,sm501", edid_buf);
#endif #endif
return 0;
} }
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #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 #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); ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
ft_pci_setup(blob, bd); ft_pci_setup(blob, bd);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
return 0;
} }
#endif /* CONFIG_OF_BOARD_SETUP */ #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_cpu_setup(blob, bd);
ft_blob_update(blob, bd); ft_blob_update(blob, bd);
return 0;
} }
#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ #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