[U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001

Kumar Gala galak at kernel.crashing.org
Wed Jul 14 23:06:50 CEST 2010


On Jul 14, 2010, at 2:30 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1276143535-22532-2-git-send-email-galak at kernel.crashing.org> you wrote:
>> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
>> ---
>> arch/powerpc/cpu/mpc85xx/cmd_errata.c |   14 ++++++++++++++
>> 1 files changed, 14 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
>> index 6824ebf..81078bd 100644
>> --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
>> +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
>> @@ -22,9 +22,23 @@
>> 
>> #include <common.h>
>> #include <command.h>
>> +#include <linux/compiler.h>
>> +#include <asm/processor.h>
>> 
>> static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>> {
>> +	__maybe_unused u32 svr = get_svr();
>> +
>> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
>> +	if (IS_SVR_REV(svr, 1, 0) &&
>> +	    ((SVR_SOC_VER(svr) == SVR_P1022) ||
>> +	     (SVR_SOC_VER(svr) == SVR_P1022_E) ||
>> +	     (SVR_SOC_VER(svr) == SVR_P1013) ||
>> +	     (SVR_SOC_VER(svr) == SVR_P1013_E))) {
> 
> Please use a switch().

Really?  There is only 1 case, you want:

	switch(SVR_SOC_VER(svr)) {
		case SVR_P1022:
		case SVR_P1022_E:
		case SVR_P1013:
		case SVR_P1013_E:
			....
			break;
	}

- k


More information about the U-Boot mailing list