From 56ecb493705fef5b2275b94329836f8690ef0865 Mon Sep 17 00:00:00 2001 From: Bill Hoffa Date: Wed, 19 Jul 2017 14:53:01 -0500 Subject: PNOR Write Fixes for FIRDATA collection path - Updated write_pnor_8B() to add ECC - Removed memcpy calls as they cause unaligned accesses - LPC accesses modified to only be 4 bytes at a time Change-Id: I2bc2fddce3e652f97890962754f8dfa2e2e8d9aa Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43458 Tested-by: FSP CI Jenkins Reviewed-by: Prachi Gupta Reviewed-by: ILYA SMIRNOV Reviewed-by: William A. Bryan --- src/occ_gpe0/firdata/lpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/occ_gpe0/firdata/lpc.c') diff --git a/src/occ_gpe0/firdata/lpc.c b/src/occ_gpe0/firdata/lpc.c index 6544c44..7b9ffca 100644 --- a/src/occ_gpe0/firdata/lpc.c +++ b/src/occ_gpe0/firdata/lpc.c @@ -208,12 +208,11 @@ errorHndl_t lpc_read( LpcTransType i_type, do { if( o_data == NULL ) { - TRACFCOMP( "o_data is NULL!" ); + TRAC_ERR("o_data is NULL!" ); l_err = -2; break; } - /* Generate the full absolute LPC address */ l_addr = checkAddr( i_type, i_addr ); @@ -366,6 +365,7 @@ errorHndl_t lpc_write( LpcTransType i_type, //is expected to be left aligned //adding (size - 1) <-- to incorporate reading more than one byte //multiply by 8 to convert from byte to bits + l_shift_amount = (7 - ((l_addr & 0x7) + (i_size-1))) * 8; l_data = (l_write_data << l_shift_amount); -- cgit v1.2.1