[U-Boot] [PATCH 01/11] fdt: Allow ft_board_setup() to report failure
Simon Glass
sjg at chromium.org
Tue Oct 21 03:51:35 CEST 2014
Hi Anatolij,
On 17 October 2014 14:19, Anatolij Gustschin <agust at denx.de> wrote:
> Hi Simon,
>
> some comments on return values and error reporting below:
>
> On Wed, 15 Oct 2014 02:05:31 -0600
> Simon Glass <sjg at chromium.org> wrote:
> ...
>> diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
>> index 53f9b34..afac3f9 100644
>> --- a/board/amcc/sequoia/sequoia.c
>> +++ b/board/amcc/sequoia/sequoia.c
>> @@ -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,7 +382,7 @@ 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 -ENOSPC;
>
> return -FDT_ERR_NOSPACE;
>
> otherwise failure reporting of ft_board_setup() as added in the next
> patch will output "<unknown error>".
OK so I think you are saying that this should return an FDT error
rather than a U-Boot error. This is a much better idea, I will change
it throughout.
Thanks very much for your review.
Regards,
Simon
More information about the U-Boot
mailing list