[flashrom] [PATCH 01/12] improve macros for SSFS and SSFC bits

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Jun 9 00:42:12 CEST 2011


One additional comment...

Am 08.06.2011 04:55 schrieb Stefan Tauner:
>  - introduce offset macros and use them to (re)define the existing mask macros
>  - add comments
>  - rename SSFS_CDS to SSFS_FDONE (abbr. used in datasheet not in SSFS but HSFS)
>  - use those for refactoring and magic number elemination.
>  - following patch uses them for pretty printing
>
> --- a/ichspi.c
> +++ b/ichspi.c
> @@ -709,8 +721,8 @@ static int ich9_run_opcode(OPCODE op, uint32_t offset,
>  	temp32 = REGREAD32(ICH9_REG_SSFS);
>  	/* Keep reserved bits only */
>  	temp32 &= SSFS_RESERVED_MASK | SSFC_RESERVED_MASK;
> -	/* clear error status registers */
> -	temp32 |= (SSFS_CDS + SSFS_FCERR);
> +	/* Clear cycle done and cycle error status registers */
> +	temp32 |= (SSFS_FDONE + SSFS_FCERR);
>   

Please use | instead of + here.

>  	REGWRITE32(ICH9_REG_SSFS, temp32);
>  
>  	/* Use 20 MHz */
>   

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list