[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW st
From: |
Andrew Jeffery |
Subject: |
Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping |
Date: |
Fri, 05 Jul 2024 13:11:05 +0930 |
User-agent: |
Evolution 3.46.4-2 |
On Thu, 2024-07-04 at 07:36 +0200, Cédric Le Goater wrote:
> From: Cédric Le Goater <clg@kaod.org>
>
> When the boot-from-eMMC HW strapping bit is set, use the 'boot-config'
> property to set the boot config register to boot from the first boot
> area partition of the eMMC device.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
> hw/arm/aspeed.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 756deb91efd1..135f4eb72215 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -327,7 +327,8 @@ void aspeed_board_init_flashes(AspeedSMCState *s, const
> char *flashtype,
> }
> }
>
> -static void sdhci_attach_drive(SDHCIState *sdhci, DriveInfo *dinfo, bool
> emmc)
> +static void sdhci_attach_drive(SDHCIState *sdhci, DriveInfo *dinfo, bool
> emmc,
> + bool boot_emmc)
> {
> DeviceState *card;
>
> @@ -335,6 +336,9 @@ static void sdhci_attach_drive(SDHCIState *sdhci,
> DriveInfo *dinfo, bool emmc)
> return;
> }
> card = qdev_new(emmc ? TYPE_EMMC : TYPE_SD_CARD);
> + if (emmc) {
> + qdev_prop_set_uint8(card, "boot-config", boot_emmc ? 0x48 : 0x0);
0x48 feels a little bit magic. I poked around a bit and there are some
boot-config macros, but not the ones you need and they're all in an
"internal" header anyway. I guess this is fine for now?
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
- [PATCH 0/8] aspeed: Add boot from eMMC support (AST2600), Cédric Le Goater, 2024/07/04
- [PATCH 1/8] aspeed: Change type of eMMC device, Cédric Le Goater, 2024/07/04
- [PATCH 2/8] aspeed: Load eMMC first boot area as a boot rom, Cédric Le Goater, 2024/07/04
- [PATCH 3/8] aspeed/scu: Add boot-from-eMMC HW strapping bit for AST2600 SoC, Cédric Le Goater, 2024/07/04
- [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Cédric Le Goater, 2024/07/04
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping,
Andrew Jeffery <=
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Cédric Le Goater, 2024/07/05
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Philippe Mathieu-Daudé, 2024/07/05
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Philippe Mathieu-Daudé, 2024/07/05
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Philippe Mathieu-Daudé, 2024/07/09
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Cédric Le Goater, 2024/07/10
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Philippe Mathieu-Daudé, 2024/07/10
- Re: [PATCH 5/8] aspeed: Set eMMC 'boot-config' property to reflect HW strapping, Cédric Le Goater, 2024/07/10
[PATCH 6/8] aspeed: Add boot-from-eMMC HW strapping bit to rainier-bmc machine, Cédric Le Goater, 2024/07/04
[PATCH 4/8] aspeed: Introduce a AspeedSoCClass 'boot_from_emmc' handler, Cédric Le Goater, 2024/07/04