[U-Boot] [PATCH v2 1/3] ahci-plat: Provide a weak scsi_init hook

Rob Herring robherring2 at gmail.com
Thu Feb 20 16:10:20 CET 2014


On Thu, Feb 20, 2014 at 8:48 AM, Ian Campbell <ijc at hellion.org.uk> wrote:
> This allow the platform to register the platform ahci device.
>
> Signed-off-by: Ian Campbell <ijc at hellion.org.uk>
> ---
> In theory this could perhaps be used by highbank. I have access to a
> Midway system (close enough for testing purposes, I think) but since
> Calxeda has folded I'm not sure it is worth it, and I am not entirely
> keen on reflashing firmware on the system I have access too (no safety
> net)...

You can actually chainload highbank/midway u-boot. Load u-boot.bin to
0x8000 and do "go 0x8000".

You can't really brick a system by updating u-boot. There are a few
things not in mainline, but it is mainly the env which is separate.

Rob

> ---
>  arch/arm/lib/board.c | 6 ++++++
>  drivers/block/ahci.c | 5 +++++
>  2 files changed, 11 insertions(+)
>
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 34f50b0..fe381a3 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -33,6 +33,7 @@
>  #include <nand.h>
>  #include <onenand_uboot.h>
>  #include <mmc.h>
> +#include <scsi.h>
>  #include <libfdt.h>
>  #include <fdtdec.h>
>  #include <post.h>
> @@ -593,6 +594,11 @@ void board_init_r(gd_t *id, ulong dest_addr)
>         mmc_initialize(gd->bd);
>  #endif
>
> +#ifdef CONFIG_CMD_SCSI
> +       puts("SCSI:  ");
> +       scsi_init();
> +#endif
> +
>  #ifdef CONFIG_HAS_DATAFLASH
>         AT91F_DataflashInit();
>         dataflash_print_info();
> diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
> index 0daad36..d5370fa 100644
> --- a/drivers/block/ahci.c
> +++ b/drivers/block/ahci.c
> @@ -924,6 +924,11 @@ int ahci_init(u32 base)
>  err_out:
>         return rc;
>  }
> +
> +void __weak scsi_init(void)
> +{
> +}
> +
>  #endif
>
>  /*
> --
> 1.8.5.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list