[U-Boot] [PATCH v2 7/7] imx: add status reporting for HAB status
Bernhard Walle
bernhard at bwalle.de
Tue Aug 20 22:21:36 CEST 2013
Hi,
Am 12.08.13 16:39, schrieb Stefano Babic:
> +
> +bool is_hab_enabled(void)
> +{
> + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
> + struct fuse_bank *bank = &ocotp->bank[0];
> + struct fuse_bank0_regs *fuse =
> + (struct fuse_bank0_regs *)bank->fuse_regs;
> + uint32_t reg = readl(&fuse->cfg5);
> +
> + return (reg & 0x2) == 0x2;
> +}
With the exception of that function and the required structure
definitions, the whole code also works with i.MX53 (tested with LOCO
board), too. Also AN4581 [1] that describes HAB doesn't differentiate
between i.MX53 and i.MX6 in that case as they both use HAB v4.
I think you have more experience how to organize the code (I added a few
symlinks and modified only the Makefile, but I guess that symlink are
not the best solution).
Regards,
Bernhard
[1] http://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf
More information about the U-Boot
mailing list