Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp281994ybm; Thu, 28 May 2020 02:36:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYC/XGdzgUAYxVgU1BHb2LAtxVeZsHTI70Hjbd7Ixoozyl+1xI8DcN48ORzT3T3eEO/INA X-Received: by 2002:a50:d1c4:: with SMTP id i4mr2118911edg.344.1590658609493; Thu, 28 May 2020 02:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590658609; cv=none; d=google.com; s=arc-20160816; b=Zjo34Pt62INaXBQTqPBNec7QYQvnD9EpwLkP7goLsofApBW/D872KKgBMVBQvPXsOI dj+wMC37CBj2Tf8ay/H/xhD68Z4zxB5b74GIXbPec7D5/1vNvVIuuJnr+5gb0f5T7IPX 0stkQklUDLQqUVdm8FBAFnT2ZdijFfZFcwA1JQyzom/ov/Lu1/P8HZGyZ/ZVpYXWlE6Q 85l+Pa402wUOYHD/5MExlkeAi9H/wrqtVUkgY6cMl4G87AVt7bh9IqEp2eUjsljgugxh Fvv3CrqPRNx/f6m1WsoqZLMNvZtOBDCQNhP0DO8+P21qY+7nq6leOVB8FpkXV6wC1Q10 4jSg== 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=QqlIsbd1WGTGLwQ7X9TQrL0klWeCsuH61w41Pfc/zXY=; b=WnLyE5kyf2q5f8+1qNTD06+Z+7+KHS8nlcH9MDK4DU3wBupGkGgdWi6Xxs1PQFfaYi K06qSFcjIjXjkGBVpGS+nbmDP7L7U6WJHzh/pi5+r1YTubRT3VewUAGcW02BaX5g3xMf NYaRQDPLi+0dewkD5UScSqcqrXia/jqwAJEGvmNJz5J+/vQwlxn3glZR9yPYmtNeXPr4 gYxI6Bla/E+YdfZJ9TWUaO8w60eaf+2W6EDnAslC5W7vHJ5K67zYT38x8iDl28zionB+ l2gsBJLerpvovggkFkPTwNMTtXL9paXxIwfPeknZYctHvMgFYHzPxgPeVvZYZtZfykba adBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si3617013ejs.646.2020.05.28.02.36.27; Thu, 28 May 2020 02:36:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387568AbgE1JeN (ORCPT + 99 others); Thu, 28 May 2020 05:34:13 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:40578 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387414AbgE1Jdf (ORCPT ); Thu, 28 May 2020 05:33:35 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id C30958030776; Thu, 28 May 2020 09:33:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7sMrcUKHbCUU; Thu, 28 May 2020 12:33:32 +0300 (MSK) From: Serge Semin To: Jarkko Nikula , Wolfram Sang , Andy Shevchenko , Mika Westerberg CC: Serge Semin , Serge Semin , Alexey Malahov , Thomas Bogendoerfer , Rob Herring , , , , Subject: [PATCH v6 07/11] i2c: designware: Discard Cherry Trail model flag Date: Thu, 28 May 2020 12:33:17 +0300 Message-ID: <20200528093322.23553-8-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20200528093322.23553-1-Sergey.Semin@baikalelectronics.ru> References: <20200528093322.23553-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A PM workaround activated by the flag MODEL_CHERRYTRAIL has been removed since commit 9cbeeca05049 ("i2c: designware: Remove Cherry Trail PMIC I2C bus pm_disabled workaround"), but the flag most likely by mistake has been left in the Dw I2C drivers. Let's remove it. Since MODEL_MSCC_OCELOT is the only model-flag left, redefine it to be 0x100 so setting a very first bit in the MODEL_MASK bits range. Signed-off-by: Serge Semin Acked-by: Jarkko Nikula Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org --- Changelog v3: - Since MSCC and Baikal-T1 will be a part of the platform driver code, we have to preserve the MODEL_MASK macro to use it to filter the model flags during the IP-specific quirks activation. --- drivers/i2c/busses/i2c-designware-core.h | 3 +-- drivers/i2c/busses/i2c-designware-pcidrv.c | 1 - drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index 150de5e5c31b..b9ef9b0deef0 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h @@ -289,8 +289,7 @@ struct dw_i2c_dev { #define ACCESS_INTR_MASK 0x00000004 #define ACCESS_NO_IRQ_SUSPEND 0x00000008 -#define MODEL_CHERRYTRAIL 0x00000100 -#define MODEL_MSCC_OCELOT 0x00000200 +#define MODEL_MSCC_OCELOT 0x00000100 #define MODEL_MASK 0x00000f00 u32 dw_readl(struct dw_i2c_dev *dev, int offset); diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 11a5e4751eab..947c096f86e3 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -149,7 +149,6 @@ static struct dw_pci_controller dw_pci_controllers[] = { }, [cherrytrail] = { .bus_num = -1, - .flags = MODEL_CHERRYTRAIL, .scl_sda_cfg = &byt_config, }, [elkhartlake] = { diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index f6d2c96e35ce..ca057aa9eac4 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -44,7 +44,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = { { "INT3432", 0 }, { "INT3433", 0 }, { "80860F41", ACCESS_NO_IRQ_SUSPEND }, - { "808622C1", ACCESS_NO_IRQ_SUSPEND | MODEL_CHERRYTRAIL }, + { "808622C1", ACCESS_NO_IRQ_SUSPEND }, { "AMD0010", ACCESS_INTR_MASK }, { "AMDI0010", ACCESS_INTR_MASK }, { "AMDI0510", 0 }, -- 2.26.2