Re: [PATCH 2/2] MIPS: Octeon: offer the RedBoot parser when it is modular

From: Thomas Bogendoerfer

Date: Sat Sep 26 2026 - 06:28:27 EST


On Tue, Sep 15, 2026 at 08:18:25AM +0000, Orgad Shaneh wrote:
> The bootbus flash driver lists "RedBoot" among the partition parsers to
> try under "#ifdef CONFIG_MTD_REDBOOT_PARTS", so building that parser as
> a module drops it from the list and the partitions on such a chip are
> never found.
>
> Use IS_ENABLED(), like the USB device-tree fixups in octeon-platform.c.
>
> Untested - I have no board with RedBoot partitions; the change is by
> inspection, in the same family as the two above.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Orgad Shaneh <orgads@xxxxxxxxx>
> ---
> diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c
> --- a/arch/mips/cavium-octeon/flash_setup.c
> +++ b/arch/mips/cavium-octeon/flash_setup.c
> @@ -22,7 +22,7 @@ static struct map_info flash_map;
> static struct mtd_info *mymtd;
> static const char *part_probe_types[] = {
> "cmdlinepart",
> -#ifdef CONFIG_MTD_REDBOOT_PARTS
> +#if IS_ENABLED(CONFIG_MTD_REDBOOT_PARTS)
> "RedBoot",
> #endif
> NULL
> --
> 2.47.0

applied to mips-next

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]