southbridge/intel/lynxpoint/me_9.x.c: Avoid unused func warn

Put functions in appropriate pre-processor sections to avoid
false-positive 'unused function' compiler warnings.

Change-Id: Ie4955ee9df6904c38848f46226b53be37d9fa239
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/8157
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Edward O'Callaghan 2015-01-07 15:53:00 +11:00
parent 8cc5dc1dd2
commit 97ccefdaf3
1 changed files with 26 additions and 24 deletions

View File

@ -374,6 +374,7 @@ static int mei_recv_msg(void *header, int header_bytes,
return mei_wait_for_me_ready();
}
#if IS_ENABLED (CONFIG_DEBUG_INTEL_ME) || defined(__SMM__)
static inline int mei_sendrecv_mkhi(struct mkhi_header *mkhi,
void *req_data, int req_bytes,
void *rsp_data, int rsp_bytes)
@ -411,30 +412,7 @@ static inline int mei_sendrecv_mkhi(struct mkhi_header *mkhi,
return 0;
}
static inline int mei_sendrecv_icc(struct icc_header *icc,
void *req_data, int req_bytes,
void *rsp_data, int rsp_bytes)
{
struct icc_header icc_rsp;
/* Send header */
if (mei_send_header(MEI_ADDRESS_ICC, MEI_HOST_ADDRESS,
icc, sizeof(*icc), req_bytes ? 0 : 1) < 0)
return -1;
/* Send data if available */
if (req_bytes && mei_send_data(MEI_ADDRESS_ICC, MEI_HOST_ADDRESS,
req_data, req_bytes) < 0)
return -1;
/* Read header and data, if needed */
if (rsp_bytes && mei_recv_msg(&icc_rsp, sizeof(icc_rsp),
rsp_data, rsp_bytes) < 0)
return -1;
return 0;
}
#endif /* CONFIG_DEBUG_INTEL_ME || __SMM__ */
/*
* mbp give up routine. This path is taken if hfs.mpb_rdy is 0 or the read
@ -636,6 +614,30 @@ void intel_me_finalize_smm(void)
#else /* !__SMM__ */
static inline int mei_sendrecv_icc(struct icc_header *icc,
void *req_data, int req_bytes,
void *rsp_data, int rsp_bytes)
{
struct icc_header icc_rsp;
/* Send header */
if (mei_send_header(MEI_ADDRESS_ICC, MEI_HOST_ADDRESS,
icc, sizeof(*icc), req_bytes ? 0 : 1) < 0)
return -1;
/* Send data if available */
if (req_bytes && mei_send_data(MEI_ADDRESS_ICC, MEI_HOST_ADDRESS,
req_data, req_bytes) < 0)
return -1;
/* Read header and data, if needed */
if (rsp_bytes && mei_recv_msg(&icc_rsp, sizeof(icc_rsp),
rsp_data, rsp_bytes) < 0)
return -1;
return 0;
}
static int me_icc_set_clock_enables(u32 mask)
{
struct icc_clock_enables_msg clk = {