From patchwork Wed Sep 24 08:01:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 392773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 194B31400D6 for ; Wed, 24 Sep 2014 18:01:42 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 89EBA4B625; Wed, 24 Sep 2014 10:01:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GTm-DUmK6aQO; Wed, 24 Sep 2014 10:01:41 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C05524B631; Wed, 24 Sep 2014 10:01:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 52F394B66C for ; Wed, 24 Sep 2014 10:01:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bYKPRzLTvD40 for ; Wed, 24 Sep 2014 10:01:28 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.csie.ntu.edu.tw (smtp.csie.ntu.edu.tw [140.112.30.61]) by theia.denx.de (Postfix) with ESMTP id 310B84B631 for ; Wed, 24 Sep 2014 10:01:25 +0200 (CEST) Received: from mirror2.csie.ntu.edu.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (Authenticated sender: b93043) by smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id 3339E2270A; Wed, 24 Sep 2014 16:01:22 +0800 (CST) Received: by mirror2.csie.ntu.edu.tw (Postfix, from userid 1000) id 1186D5F8D6; Wed, 24 Sep 2014 16:01:22 +0800 (CST) From: Chen-Yu Tsai To: Ian Campbell , Hans de Goede , u-boot@lists.denx.de Date: Wed, 24 Sep 2014 16:01:05 +0800 Message-Id: <1411545673-5591-3-git-send-email-wens@csie.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411545673-5591-1-git-send-email-wens@csie.org> References: <1411545673-5591-1-git-send-email-wens@csie.org> Cc: Oliver Schinagl , linux-sunxi@googlegroups.com, Pantelis Antoniou Subject: [U-Boot] [PATCH v2 02/10] ARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de BOOT_TARGET_DEVICES includes USB unconditionally. This breaks when CONFIG_CMD_USB is not defined. Use a secondary macro to conditionally include it when CONFIG_EHCI is enabled, as we do for CONFIG_AHCI. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 1d947d7..a31656e 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -233,10 +233,16 @@ #define BOOT_TARGET_DEVICES_SCSI(func) #endif +#ifdef CONFIG_USB_EHCI +#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) +#else +#define BOOT_TARGET_DEVICES_USB(func) +#endif + #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ BOOT_TARGET_DEVICES_SCSI(func) \ - func(USB, usb, 0) \ + BOOT_TARGET_DEVICES_USB(func) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)