mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
clean up x86 i/o checks
Rather than hardcode a specific mips toolchain, do a build-time test to see if the target is x86 based. BUG=chromium:443783 TEST=link still includes comm-lpc TEST=arm64 omits comm-lpc BRANCH=none Change-Id: I0253df6cbe89bee231ec643dd6bb3498eb040708 Reviewed-on: https://chromium-review.googlesource.com/265793 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
a5b3bb0f97
commit
f55a7e5774
@@ -10,10 +10,7 @@ host-util-bin=ectool lbplay stm32mon ec_sb_firmware_update lbcc
|
||||
build-util-bin=ec_uartd iteflash
|
||||
|
||||
comm-objs=$(util-lock-objs:%=lock/%) comm-host.o comm-dev.o
|
||||
ifneq ($(HOSTCC),mipsel-cros-linux-gnu-gcc)
|
||||
comm-objs+=comm-lpc.o
|
||||
endif
|
||||
comm-objs+=comm-i2c.o
|
||||
comm-objs+=comm-lpc.o comm-i2c.o
|
||||
|
||||
ectool-objs=ectool.o ectool_keyscan.o misc_util.o ec_flash.o $(comm-objs)
|
||||
ec_sb_firmware_update-objs=ec_sb_firmware_update.o $(comm-objs) misc_util.o
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
/* The I/O asm funcs exist only on x86. */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/io.h>
|
||||
@@ -309,3 +312,5 @@ int comm_init_lpc(void)
|
||||
ec_readmem = ec_readmem_lpc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1186,7 +1186,8 @@ int cmd_pd_get_amode(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef __x86_64
|
||||
/* The I/O asm funcs exist only on x86. */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#include <sys/io.h>
|
||||
|
||||
int cmd_serial_test(int argc, char *argv[])
|
||||
|
||||
Reference in New Issue
Block a user