Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp38740imu; Mon, 10 Dec 2018 15:36:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/XnR8SATEm4pz5aFRkAfFEUuS7jSjOEBflN7gkIYcweGLXBwVjlwnPZjhGllU85Amm3W1rY X-Received: by 2002:a17:902:c85:: with SMTP id 5mr14185395plt.339.1544484979012; Mon, 10 Dec 2018 15:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544484978; cv=none; d=google.com; s=arc-20160816; b=NvEzE7upoKSgX1DwGhZTd31qab5SFC7yNyYvIEK4YSHxkMgAIb0B4QH17A91oBToxt 82dYHWBvhGWFakkxKIsbgK6P3OmLAyeha6dUia+5FdVqP0jfrGtGcKGxbCn/NSWCa2Wg PuHRkUwdyKBCFZFx1nJpzj+I+0Grh6fte1C/85gG0KhyzUj63UGFJUaN0eo5Z4nJqIZO a168S6SNqAA5tizo6BC/G5Ij7ZKSBfT2E/cfjaQag6RlFjulu8e7C7iAjmvSy7KBZWFs Af5gphICZCmWQhPxxOgITWx6eIBXFJD0Y/cqkGeTw5xbqm05Y9vvUUWJzcNHGhX3EWUL CdZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VUMMQMkfBmDcD6DH5LxaYUBaL+QxSMjRq3hyEMFR7H4=; b=x8ECce3i3yFvy8jdaA2nmRDGBVIYq2Y/Wqt0ISlmNOc2hCotIOeCFikgxANM/Ltnre 1PURgiFsqeYw6GuTZl8wWoW5mKRZHKCQGs7ZbsiM/XkFVRhqfk29X30wSp9B7dlyc0TG 1A3Kjube2JmqfI5JD3zrgB5v8nnQzCBHQmaJkVi48qgeplfDKYvXZArVVNrQ3K+Psdmd oe8dL6k8n0gNOVuraieCR6uxlnzXmAqYVBsJAHjm2wI4PR6bI01Bc4i+LFK2CeGfsndy unwHhyUl6cbkTCjhC0Mo+vCiM5131uQZBeU0NLPlCONynkUbTrYLikMD5WV5RgU51YAk +MSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si11502119plz.263.2018.12.10.15.36.03; Mon, 10 Dec 2018 15:36:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729683AbeLJUoW (ORCPT + 99 others); Mon, 10 Dec 2018 15:44:22 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:59387 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbeLJUoU (ORCPT ); Mon, 10 Dec 2018 15:44:20 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mz9EL-1hR9vT0bkR-00wE1f; Mon, 10 Dec 2018 21:44:04 +0100 From: Arnd Bergmann To: arm@kernel.org, Lubomir Rintel Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: mmp: fix pxa168_device_usb_phy use on aspenite Date: Mon, 10 Dec 2018 21:43:02 +0100 Message-Id: <20181210204340.2269622-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181210204340.2269622-1-arnd@arndb.de> References: <20181210204340.2269622-1-arnd@arndb.de> MIME-Version: 1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HCXWDjb781orIRecfTpbbtY9FJ+SrTQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This one ended up in the wrong header file, causing a build failure on at least one platform: arch/arm/mach-mmp/aspenite.c: In function 'common_init': arch/arm/mach-mmp/aspenite.c:260:28: error: 'pxa168_device_usb_phy' undeclared (first use in this function); did you mean 'pxa168_device_ssp5'? We can just include both the pxa168.h and pxa910.h headers to make that work, which gets us to the next failure: arch/arm/mach-mmp/aspenite.o: In function `common_init': aspenite.c:(.init.text+0x1c0): undefined reference to `pxa168_device_usb_phy' This is solved by using the matching ifdef check around the USB device registration, enabling them only when either USB host or gadget mode are enabled. Fixes: a225daf72ee7 ("ARM: mmp: add a pxa-usb-phy device") Signed-off-by: Arnd Bergmann --- arch/arm/mach-mmp/aspenite.c | 3 +++ arch/arm/mach-mmp/ttc_dkb.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 23f99976b5f5..75b2d7db643e 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -29,6 +29,7 @@ #include "addr-map.h" #include "mfp-pxa168.h" #include "pxa168.h" +#include "pxa910.h" #include "irqs.h" #include "common.h" @@ -256,6 +257,7 @@ static void __init common_init(void) /* off-chip devices */ platform_device_register(&smc91x_device); +#if IS_ENABLED(CONFIG_USB_SUPPORT) #if IS_ENABLED(CONFIG_PHY_PXA_USB) platform_device_register(&pxa168_device_usb_phy); #endif @@ -263,6 +265,7 @@ static void __init common_init(void) #if IS_ENABLED(CONFIG_USB_EHCI_MV) pxa168_add_usb_host(&pxa168_sph_pdata); #endif +#endif } MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 767dcb23ee1c..09b53ace08ac 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c @@ -282,6 +282,7 @@ static void __init ttc_dkb_init(void) sizeof(struct pxa_gpio_platform_data)); platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); +#if IS_ENABLED(CONFIG_USB_SUPPORT) #if IS_ENABLED(CONFIG_PHY_PXA_USB) platform_device_register(&pxa168_device_usb_phy); #endif @@ -300,6 +301,7 @@ static void __init ttc_dkb_init(void) pxa168_device_u2ootg.dev.platform_data = &ttc_usb_pdata; platform_device_register(&pxa168_device_u2ootg); #endif +#endif #if IS_ENABLED(CONFIG_MMP_DISP) add_disp(); -- 2.20.0