From patchwork Wed Nov 17 22:01:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12625621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08BE1C433FE for ; Wed, 17 Nov 2021 22:01:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E5A4961B04 for ; Wed, 17 Nov 2021 22:01:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240833AbhKQWEv (ORCPT ); Wed, 17 Nov 2021 17:04:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22894 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240763AbhKQWEo (ORCPT ); Wed, 17 Nov 2021 17:04:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637186505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gzRqfi9r2d6jzALCSB0C8plEtz9PToXoYBaSZUOHj50=; b=CYQ1GTBXk7vl4xkQz78SlB3Ii67pNItNWgNcUzqm60zNufAa9PVn3Ffujs/8HokoUKBFCa S9NeFUMF13mOYIuhzRzUFVuq+IMCbfcX9lSSCqb0Rq/g4DuRn+oQqBXqUzFv1ObsD4sxpQ PRFAJuEZAnAXqPHcpXrmrvUyXKJYOqg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-hxFbEqMrPGWZPAMQ7FAlBQ-1; Wed, 17 Nov 2021 17:01:37 -0500 X-MC-Unique: hxFbEqMrPGWZPAMQ7FAlBQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43F4C15720; Wed, 17 Nov 2021 22:01:36 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id C875F5D9DE; Wed, 17 Nov 2021 22:01:34 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Adrian Hunter , Ulf Hansson Cc: Hans de Goede , Len Brown , linux-acpi@vger.kernel.org, linux-mmc@vger.kernel.org Subject: [PATCH 5/5] mmc: sdhci-acpi: Use the new soc_intel_is_byt() helper Date: Wed, 17 Nov 2021 23:01:18 +0100 Message-Id: <20211117220118.408953-6-hdegoede@redhat.com> In-Reply-To: <20211117220118.408953-1-hdegoede@redhat.com> References: <20211117220118.408953-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Use the new soc_intel_is_byt() helper function from include/linux/platform_data/x86/soc.h . Signed-off-by: Hans de Goede --- drivers/mmc/host/sdhci-acpi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 1461aae13c19..c0350e9c03f3 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -31,8 +31,7 @@ #include #ifdef CONFIG_X86 -#include -#include +#include #include #endif @@ -239,16 +238,6 @@ static const struct sdhci_acpi_chip sdhci_acpi_chip_int = { #ifdef CONFIG_X86 -static bool sdhci_acpi_byt(void) -{ - static const struct x86_cpu_id byt[] = { - X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT, NULL), - {} - }; - - return x86_match_cpu(byt); -} - #define BYT_IOSF_SCCEP 0x63 #define BYT_IOSF_OCP_NETCTRL0 0x1078 #define BYT_IOSF_OCP_TIMEOUT_BASE GENMASK(10, 8) @@ -257,7 +246,7 @@ static void sdhci_acpi_byt_setting(struct device *dev) { u32 val = 0; - if (!sdhci_acpi_byt()) + if (!soc_intel_is_byt()) return; if (iosf_mbi_read(BYT_IOSF_SCCEP, MBI_CR_READ, BYT_IOSF_OCP_NETCTRL0, @@ -282,7 +271,7 @@ static void sdhci_acpi_byt_setting(struct device *dev) static bool sdhci_acpi_byt_defer(struct device *dev) { - if (!sdhci_acpi_byt()) + if (!soc_intel_is_byt()) return false; if (!iosf_mbi_available())