Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp268098pxx; Wed, 28 Oct 2020 04:34:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGVdvth/pHN8BnyX3NakDz9THjBU7uV2XRwXU+PbBgmLg7pkABmf5L8d640Bhha5FQS4jZ X-Received: by 2002:a17:906:c041:: with SMTP id bm1mr6929338ejb.202.1603884861745; Wed, 28 Oct 2020 04:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603884861; cv=none; d=google.com; s=arc-20160816; b=Apo2aupm9wg38Apc89eVheiJT2NX0qTf9dMi2QO+TRdsnOUCs5Z7OZL3Z4eh9ToTQW j8QJEiH4U1cUE1cmAfUj0X/AxSR/GX2Ds2q/jpnEC8vvkFYfIhz2FlTuXcsGkHnp0j3T MjqT1g4AWMD887kMovyYm1ZhZ3F+dNk7BAQ8ekLA1KkANEreZthj3+dPDpMJxoAbTT4r +sj9yQ2+OkKjS7y9RJouYE6uKa/8F+br0mThRB5kl0DGUBYFd3aeH6aDJqRlf/v7TvXQ pmTDjcmZua4hP+6fsePdmy+w8Y3lpoOlMY/Q8bsxTPpYTwKHzSpJELabJe5i4iez5mZp +5ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t3yDqwsk/ppFx9/ZtKK7y6moF6UArFpeBJ68rVijsco=; b=YRSstc27WNL74I73ilFjzSoBkx+8p2V+zR02fsYY1De3YftgN3ixT9vvdAs2yj9YVj 23smBNynCgEgAJftoNF73rwdUtvxiHoEC/BaeFdCY9AQqH9EybXBKb2YOA06rGJzt3Cg 9Y1J4ugrPN8WNx2ZtzHmC8kDRfvLpqYgHgovHwlpRyxYpGC8ion/XRnv98UCjiLsLHnV pd3R9ihyoX5uaCYrQHmAEOQUWYCgGJZinufVXvbVtY4woMY9e6S6v2hvPdyEWhIAR3o0 ZmHWaIblGfpJKsgYCYXaC/TBVVs8eRe+IC05/4Np3uMCTFyDC/qha16pByISdKJQhfRk W5LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NDd8HBaH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si2719069ejq.533.2020.10.28.04.33.58; Wed, 28 Oct 2020 04:34:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NDd8HBaH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1793823AbgJ0PIb (ORCPT + 99 others); Tue, 27 Oct 2020 11:08:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:38024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1790025AbgJ0PDf (ORCPT ); Tue, 27 Oct 2020 11:03:35 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D03112071A; Tue, 27 Oct 2020 15:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811014; bh=k5az+Tye1LI23PPZx51zsoIDH2qObvT/M5XGTr3tRa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NDd8HBaHTHHE/+t65DTFJKcZ58kcXgMcdkDAUizoaFdPmD8UVtz5WfYMKe+X0GjAF 94mVUGIjIs/Ys8iRPq9vc6eX6wxeSGLBOAeALT8bXF9gllkJxmhw8Y6qPl3LVOB5dK 9DRaR7Pd26M3O9qInMrL9qNpI7RJkSwKL/aSjNw0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Greg Ungerer , Geert Uytterhoeven , Angelo Dureghello , Sasha Levin Subject: [PATCH 5.8 342/633] m68knommu: include SDHC support only when hardware has it Date: Tue, 27 Oct 2020 14:51:25 +0100 Message-Id: <20201027135538.727925384@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Ungerer [ Upstream commit 322c512f476f07e960cecd447ef22c15bed0e5f1 ] The mere fact that the kernel has the MMC subsystem enabled (CONFIG_MMC enabled) does not mean that the underlying hardware platform has the SDHC hardware present. Within the ColdFire hardware defines that is signified by MCFSDHC_BASE being defined with an address. The platform data for the ColdFire parts is including the SDHC hardware if CONFIG_MMC is enabled, instead of MCFSDHC_BASE. This means that if you are compiling for a ColdFire target that does not support SDHC but enable CONFIG_MMC you will fail to compile with errors like this: arch/m68k/coldfire/device.c:565:12: error: ‘MCFSDHC_BASE’ undeclared here (not in a function) .start = MCFSDHC_BASE, ^ arch/m68k/coldfire/device.c:566:25: error: ‘MCFSDHC_SIZE’ undeclared here (not in a function) .end = MCFSDHC_BASE + MCFSDHC_SIZE - 1, ^ arch/m68k/coldfire/device.c:569:12: error: ‘MCF_IRQ_SDHC’ undeclared here (not in a function) .start = MCF_IRQ_SDHC, ^ Make the SDHC platform support depend on MCFSDHC_BASE, that is only include it if the specific ColdFire SoC has that hardware module. Fixes: 991f5c4dd2422881 ("m68k: mcf5441x: add support for esdhc mmc controller") Signed-off-by: Greg Ungerer Reviewed-by: Geert Uytterhoeven Reviewed-by: Angelo Dureghello Tested-by: Angelo Dureghello Signed-off-by: Sasha Levin --- arch/m68k/coldfire/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c index 9ef4ec0aea008..59f7dfe50a4d0 100644 --- a/arch/m68k/coldfire/device.c +++ b/arch/m68k/coldfire/device.c @@ -554,7 +554,7 @@ static struct platform_device mcf_edma = { }; #endif /* IS_ENABLED(CONFIG_MCF_EDMA) */ -#if IS_ENABLED(CONFIG_MMC) +#ifdef MCFSDHC_BASE static struct mcf_esdhc_platform_data mcf_esdhc_data = { .max_bus_width = 4, .cd_type = ESDHC_CD_NONE, @@ -579,7 +579,7 @@ static struct platform_device mcf_esdhc = { .resource = mcf_esdhc_resources, .dev.platform_data = &mcf_esdhc_data, }; -#endif /* IS_ENABLED(CONFIG_MMC) */ +#endif /* MCFSDHC_BASE */ static struct platform_device *mcf_devices[] __initdata = { &mcf_uart, @@ -613,7 +613,7 @@ static struct platform_device *mcf_devices[] __initdata = { #if IS_ENABLED(CONFIG_MCF_EDMA) &mcf_edma, #endif -#if IS_ENABLED(CONFIG_MMC) +#ifdef MCFSDHC_BASE &mcf_esdhc, #endif }; -- 2.25.1