From patchwork Fri Jan 4 02:26:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ernest Zhang(WH)" X-Patchwork-Id: 10747901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80A5491E for ; Fri, 4 Jan 2019 02:26:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7046B283AF for ; Fri, 4 Jan 2019 02:26:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64719283BD; Fri, 4 Jan 2019 02:26:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E732E283AF for ; Fri, 4 Jan 2019 02:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfADC0x (ORCPT ); Thu, 3 Jan 2019 21:26:53 -0500 Received: from mail-eopbgr810133.outbound.protection.outlook.com ([40.107.81.133]:20800 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726036AbfADC0x (ORCPT ); Thu, 3 Jan 2019 21:26:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=towerbridgetechnology.onmicrosoft.com; s=selector1-bayhubtech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5IBqzbKM+29Jrr8xG7by8Xhms9ag2qE5Z30WO+O/kVw=; b=QqR6Y9GiBrNyf5Y3Jikoul9wOst9uyZAQzf5xkhpmQ0a43tnLyAgBkybZLLQBV9y7npELPEBzuk9dKchiHJ5CXWWgCskuMHv2qrojtdXUbVA3Mc1jIPPg+X+1cfA2pwRj1qWmUJ18+hX/zhagv5vNHHwSzEjBpZWZKtiFBxn1C8= Received: from SN6PR16MB2542.namprd16.prod.outlook.com (52.135.125.202) by SN6PR16MB2431.namprd16.prod.outlook.com (20.176.241.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Fri, 4 Jan 2019 02:26:11 +0000 Received: from SN6PR16MB2542.namprd16.prod.outlook.com ([fe80::bd52:244b:836b:883d]) by SN6PR16MB2542.namprd16.prod.outlook.com ([fe80::bd52:244b:836b:883d%3]) with mapi id 15.20.1495.005; Fri, 4 Jan 2019 02:26:11 +0000 From: "Ernest Zhang(WH)" To: Adrian Hunter , Ulf Hansson , "linux-mmc@vger.kernel.org" CC: "Xiaoguang Yu (WH)" , "Andy Dai (WH)" , "Shirley Her (SC)" , "Mike Li (WH)" , "Ernest Zhang(WH)" Subject: [PATCH V4 1/2] mmc: sdhci: Moving sdhci_o2 into sdhci-pci-o2micro.c Thread-Topic: [PATCH V4 1/2] mmc: sdhci: Moving sdhci_o2 into sdhci-pci-o2micro.c Thread-Index: AQHUo9TbXLM9FuWlFUiiDkMmacQQqg== Date: Fri, 4 Jan 2019 02:26:10 +0000 Message-ID: <20190104022502.31873-1-ernest.zhang@bayhubtech.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0080.apcprd03.prod.outlook.com (2603:1096:203:72::20) To SN6PR16MB2542.namprd16.prod.outlook.com (2603:10b6:805:d3::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ernest.zhang@bayhubtech.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [117.136.52.201] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN6PR16MB2431;6:x0Jauj7f4IIXWC+T8jcdnn84sHAtiaj1k296HoPLZ75sZ2sqvK/iSQ/CIp/71SY57FHezdcEhpvC36FSGMalqxl3Hcj8E9OeTcvOruJTdgxlkRZMcd+NFJaBWAK7exHDYf+8uYpNb5C355xUUFcLgxBNpNqQCeQdWDCNNhf8jFTZAo7v5Ryck/uv830lmMmqXHPOHOVIXSG3kAE8dwyoxb0nqNTkjT5IND44VMJusPo2Fd/B34LvcJbS4Urpq5zwZhWCGyjLT15RT1zVUSMr6beRriqvvt01jUTeCNoJAf8o2XKV54Ry37/uW7lNgKFX5QUtL/Udlw6aFcrlQGQGbQfMw7ttdY3frbSdOez5Hb+nI/p2TXyDHtZuvmpWGlEdTzLbkYiSQM8xCx0LUhZ29jGRhiZsoj1asoZscsCTRAQ+4AZtj6IDZOzeZVEj8pgfEVxRq3l1NsJldKo+6OpFVA==;5:F0g2uK576431chf0YpXwZ9E11oXnI0aTJZh9XNqN8+aAEYEBGgdUuLroZC3awoXXxGGoVUSGXlfIb5lCOfEysblEBJCUfMEuA6+LtqWgHKvT0o11ErfB6sUypHe34VzYPw9J/gFLVFP0VqHW6Z1bFHL4KRM4Jnji5i0wnWFdTwLIGxP2aeiZIk4QschlUREeckjJi36XztbTksuQ2HMdow==;7:EyufkhM8/ZdwUJKAu6FXbezGqwCkU7vHI2H1p0GtRBbn4huLVIK1GJFP5CvGYqw8e5D2YrPqNym/v+W6gFnlJfaCCZlxJORKcHLxTzJs/pecdOu+PW4TTB/wc5MamOxVAXCeBgX0fMEgVBP6PBplkw== x-ms-office365-filtering-correlation-id: 6ba8b68b-e944-4fbb-88ff-08d671ebfd79 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020);SRVR:SN6PR16MB2431; x-ms-traffictypediagnostic: SN6PR16MB2431: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(93006095)(93001095)(10201501046)(3231475)(944501520)(52105112)(3002001)(6041310)(20161123564045)(20161123558120)(20161123560045)(2016111802025)(20161123562045)(6043046)(201708071742011)(7699051)(76991095);SRVR:SN6PR16MB2431;BCL:0;PCL:0;RULEID:;SRVR:SN6PR16MB2431; x-forefront-prvs: 0907F58A24 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39830400003)(376002)(396003)(136003)(346002)(366004)(189003)(199004)(99286004)(6506007)(102836004)(6486002)(186003)(386003)(25786009)(6512007)(2501003)(53936002)(4326008)(71200400001)(7736002)(71190400001)(8936002)(508600001)(107886003)(3846002)(14444005)(81156014)(6436002)(575784001)(486006)(26005)(2906002)(54906003)(81166006)(110136005)(2616005)(256004)(476003)(86362001)(52116002)(6116002)(8676002)(305945005)(1076003)(97736004)(5660300001)(68736007)(14454004)(66066001)(106356001)(105586002)(36756003)(316002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR16MB2431;H:SN6PR16MB2542.namprd16.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: bayhubtech.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JkslHMT8yvNG0HDtWw0diQMQVSuOnHxyZRkSXcQFrTWduOogUotHqogh3zNvNgDBD8cnNb7aRZQY2MKNM20xezaEulqXLoyV48wRnnkzGpdkDP9zZHas+5eIp3Y99QQEncGlma6PpdubiAIYmvr8CMWUJ/jR3DhRMaCR9Jx0k55QN8oA7LK1C3e4EcemJiVGPVxRkGVG3o/6xjlCwuCp3WtPv+tV0K2kj+Xs/GiSIJvll5WQL1o0yNX4buXYxvzQ3feGpyRRAhLuDmYjTpJqcnbduYgbKIGC5q5gziIU54WR2Ia66iyZlLKIm1KVVof9 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: bayhubtech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ba8b68b-e944-4fbb-88ff-08d671ebfd79 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2019 02:26:10.7732 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0a7aae2b-8f2e-44df-ba2f-42de7f93c642 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR16MB2431 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Moving sdhci_o2 into sdhci-pci-o2micro.c Signed-off-by: Ernest Zhang Acked-by: Adrian Hunter --- Change in V4: Fix compile error by move sdhci_o2 declaration to the end of file Change in V3: 1. Change the patches order to make this the first patch 2. Remove the other unneeded o2 declarations in sdhci-pci.h Change in V2: 1. Moving sdhci_o2 into sdhci-pci-o2micro.c Change in V1: N/A --- drivers/mmc/host/sdhci-pci-core.c | 10 ---------- drivers/mmc/host/sdhci-pci-o2micro.c | 10 ++++++++++ drivers/mmc/host/sdhci-pci.h | 6 +----- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 2a6eba74b94e..99b0fec2836b 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -1257,16 +1257,6 @@ static int jmicron_resume(struct sdhci_pci_chip *chip) } #endif -static const struct sdhci_pci_fixes sdhci_o2 = { - .probe = sdhci_pci_o2_probe, - .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, - .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, - .probe_slot = sdhci_pci_o2_probe_slot, -#ifdef CONFIG_PM_SLEEP - .resume = sdhci_pci_o2_resume, -#endif -}; - static const struct sdhci_pci_fixes sdhci_jmicron = { .probe = jmicron_probe, diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c index cc3ffeffd7a2..c91bd55080c9 100644 --- a/drivers/mmc/host/sdhci-pci-o2micro.c +++ b/drivers/mmc/host/sdhci-pci-o2micro.c @@ -550,3 +550,13 @@ int sdhci_pci_o2_resume(struct sdhci_pci_chip *chip) return sdhci_pci_resume_host(chip); } #endif + +const struct sdhci_pci_fixes sdhci_o2 = { + .probe = sdhci_pci_o2_probe, + .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, + .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, + .probe_slot = sdhci_pci_o2_probe_slot, +#ifdef CONFIG_PM_SLEEP + .resume = sdhci_pci_o2_resume, +#endif +}; diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h index 2ef0bdca9197..4ddb69a15cd7 100644 --- a/drivers/mmc/host/sdhci-pci.h +++ b/drivers/mmc/host/sdhci-pci.h @@ -179,13 +179,9 @@ static inline void *sdhci_pci_priv(struct sdhci_pci_slot *slot) int sdhci_pci_resume_host(struct sdhci_pci_chip *chip); #endif int sdhci_pci_enable_dma(struct sdhci_host *host); -int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot); -int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip); -#ifdef CONFIG_PM_SLEEP -int sdhci_pci_o2_resume(struct sdhci_pci_chip *chip); -#endif extern const struct sdhci_pci_fixes sdhci_arasan; extern const struct sdhci_pci_fixes sdhci_snps; +extern const struct sdhci_pci_fixes sdhci_o2; #endif /* __SDHCI_PCI_H */