]> Git Repo - J-u-boot.git/blobdiff - cmd/disk.c
w1: Fix bus counting in w1_get_bus
[J-u-boot.git] / cmd / disk.c
index 9e635c1172de0fa99a73c4c41ffb49449a681e8e..3d7bc2f60189d18f60242239a8019edcb2eebecd 100644 (file)
@@ -4,19 +4,23 @@
  * Wolfgang Denk, DENX Software Engineering, [email protected].
  */
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
+#include <cpu_func.h>
+#include <image.h>
+#include <log.h>
 #include <part.h>
 
-int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
+int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
                    char *const argv[])
 {
        __maybe_unused int dev;
        int part;
        ulong addr = CONFIG_SYS_LOAD_ADDR;
        ulong cnt;
-       disk_partition_t info;
+       struct disk_partition info;
 #if defined(CONFIG_LEGACY_IMAGE_FORMAT)
-       image_header_t *hdr;
+       struct legacy_img_hdr *hdr;
 #endif
        struct blk_desc *dev_desc;
 
@@ -32,7 +36,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
        bootstage_mark(BOOTSTAGE_ID_IDE_ADDR);
 
        if (argc > 1)
-               addr = simple_strtoul(argv[1], NULL, 16);
+               addr = hextoul(argv[1], NULL);
 
        bootstage_mark(BOOTSTAGE_ID_IDE_BOOT_DEVICE);
 
@@ -64,7 +68,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
        switch (genimg_get_format((void *) addr)) {
 #if defined(CONFIG_LEGACY_IMAGE_FORMAT)
        case IMAGE_FORMAT_LEGACY:
-               hdr = (image_header_t *) addr;
+               hdr = (struct legacy_img_hdr *)addr;
 
                bootstage_mark(BOOTSTAGE_ID_IDE_FORMAT);
 
@@ -110,20 +114,19 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
        /* This cannot be done earlier,
         * we need complete FIT image in RAM first */
        if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) {
-               if (!fit_check_format(fit_hdr)) {
+               if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) {
                        bootstage_error(BOOTSTAGE_ID_IDE_FIT_READ);
                        puts("** Bad FIT image format\n");
                        return 1;
                }
                bootstage_mark(BOOTSTAGE_ID_IDE_FIT_READ_OK);
-               fit_print_contents(fit_hdr);
        }
 #endif
 
        flush_cache(addr, (cnt+1)*info.blksz);
 
        /* Loading ok, update default load address */
-       load_addr = addr;
+       image_load_addr = addr;
 
        return bootm_maybe_autostart(cmdtp, argv[0]);
 }
This page took 0.027826 seconds and 4 git commands to generate.