[U-Boot] [PATCH] powerpc/mpc85xx: Make NMG_CPU_A011 workaround conditional

Andy Fleming afleming at gmail.com
Wed Aug 8 22:09:27 CEST 2012


Please copy me on any 85xx U-Boot patches.


>
> +#define HWCONFIG_BUFFER_SIZE 128


[...]

> +       char buffer[HWCONFIG_BUFFER_SIZE];
> +       char *buf = NULL;
> +
> +       if (getenv_f("hwconfig", buffer, sizeof(buffer)) > 0)
> +               buf = buffer;


This seems fragile. I suppose there's no way to ensure that this
succeeds, but we should at least check to see if the buffer we pass in
was big enough, and let the user know that we were looking for the
A011 erratum setting, and may not have found it because the hwconfig
string was more than 128 characters.


> +
> +       if (hwconfig_arg_cmp_f("fsl_cpu_a011", "enable", buf) > 0) {
> +               enable_cpu_a011_workaround =
> +                       (SVR_SOC_VER(svr) != SVR_P4080 || SVR_MAJ(svr) < 3);


Please merge this patch with its follow-on that changes the default to
be enabled.

Andy


More information about the U-Boot mailing list