From patchwork Wed Jan 2 14:43:46 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: 10746471 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 046256C2 for ; Wed, 2 Jan 2019 14:43:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4D311FFDB for ; Wed, 2 Jan 2019 14:43:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4D0320748; Wed, 2 Jan 2019 14:43:51 +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 39C6E1FFDB for ; Wed, 2 Jan 2019 14:43:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729227AbfABOnu (ORCPT ); Wed, 2 Jan 2019 09:43:50 -0500 Received: from mail-eopbgr790121.outbound.protection.outlook.com ([40.107.79.121]:52270 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729501AbfABOnu (ORCPT ); Wed, 2 Jan 2019 09:43:50 -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=puT6OQDjBHFtOU1eCUcjaJPXEGIru+b2aTVmOJaSFXI=; b=bsy36SPu/e0J9O81RXB0x9dXC14nvSLpDMlxYmOXN2xzLDkpNi0WorRXfTQ9ogUi6igTCGD+CgoJo4sCTZClZom7bfNdUnS203XZbPS0ukqBaZNRUfMjjEIcD41pfjSZC3iAwnzJD9tokaLh+Uqo2/oFLoJT9mdi+DVvCbdyxHU= Received: from SN6PR16MB2542.namprd16.prod.outlook.com (52.135.125.202) by SN6PR16MB2655.namprd16.prod.outlook.com (52.135.127.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Wed, 2 Jan 2019 14:43:47 +0000 Received: from SN6PR16MB2542.namprd16.prod.outlook.com ([fe80::8820:cbd3:3b2a:c3b2]) by SN6PR16MB2542.namprd16.prod.outlook.com ([fe80::8820:cbd3:3b2a:c3b2%3]) with mapi id 15.20.1471.019; Wed, 2 Jan 2019 14:43:47 +0000 From: "Ernest Zhang(WH)" To: Adrian Hunter , Ulf Hansson , "linux-mmc@vger.kernel.org" CC: "Xiaoguang Yu (WH)" , "bobby.wu@bayhubtech.com" , "Shirley Her (SC)" , "Ernest Zhang(WH)" Subject: [PATCH 1/2] mmc: sdhci: Moving sdhci_o2 into sdhci-pci-o2micro.c Thread-Topic: [PATCH 1/2] mmc: sdhci: Moving sdhci_o2 into sdhci-pci-o2micro.c Thread-Index: AQHUoqmRRhPhDIZN90a9aPFb2T+ayQ== Date: Wed, 2 Jan 2019 14:43:46 +0000 Message-ID: <20190102144329.22511-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: HK2PR02CA0147.apcprd02.prod.outlook.com (2603:1096:202:16::31) 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: [221.235.47.164] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN6PR16MB2655;6:uc/MY/LrMRQF8ts7+0p8WQZzCA5fkvMjsjWrnaJvFOc6E2NA5/Ma1AyT28qR70K1acbDc7Cq73NNzBPwPOjNz+1JsGfRkXRuEQ6ZrxpY2luefCTHteK5ILRGhAah0KfFPqObnN280f7JZ569GVYV8mmckRQODYG8s34L3XO7lQQDFC6sVSTs+Swim4nd70QNbS7CwuyQSHkPhd6EA6cBpKkM/kWN2i4uqjI1aw69RKneXh+H7xQLJuO9RlJJStDaLxesT3tSFj54VB9E+50UF9vqW7EUD91l/yxldXdElv9UdQufhTRc06Srj+Y672Gjqb2yVG7ypPlpdEfB39KJNaN+pFbIfeeeoJv1xicXcTyPcLTckJetY4mYclhWmLRqL6obC3YDuIFeggov8pt6azMmoHqTPMJ6bjvCydn9GNgHdj0YQsEeswJeOydXNyXo2v1m2kNZnGWXJ4Pb5G8hRQ==;5:lj+Nxqmxy/9X86xrk7ABhk7k9cfvRdFiWzGYM0GxYEUvkVgCG1sFToiX7SEUvLIvvkgB1j6hwuoIPGpcMEOh3bujdRhbIjtNQlIdxSq43nUbKaJDYTU1oBVzJhjvA22qmea6bwv/9SNqQ++fO3kqbvnW20wmCzm/G7eAVw0iETPttLTKukNRbboAs6WukJiKdH516h+9SFs3iN23ntiIvQ==;7:mxpucDxgNjlBQfqJ0yFayLzAcHZmYjsu9TNX9BlWEqYPsQgePj3sFzTFcm5LiWhDRgZZyO2D32UtRIaHm3ebnN3TH9pIgVzUtIA8HJy2j5kPyw8IsZYwFC7J1DGCXIm3cLzTY0cz3QMW46bx8vBpOA== x-ms-office365-filtering-correlation-id: b019ad9b-6952-4eb1-a816-08d670c0b341 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:SN6PR16MB2655; x-ms-traffictypediagnostic: SN6PR16MB2655: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(3002001)(3231475)(944501520)(52105112)(93006095)(93001095)(10201501046)(6041310)(2016111802025)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6043046)(201708071742011)(7699051)(76991095);SRVR:SN6PR16MB2655;BCL:0;PCL:0;RULEID:;SRVR:SN6PR16MB2655; x-forefront-prvs: 0905A6B2C7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(346002)(39830400003)(376002)(396003)(189003)(199004)(256004)(14444005)(4326008)(26005)(52116002)(186003)(14454004)(476003)(2616005)(6506007)(386003)(106356001)(99286004)(66066001)(68736007)(486006)(25786009)(1076003)(105586002)(316002)(110136005)(54906003)(5660300001)(3846002)(6436002)(305945005)(6116002)(71190400001)(7736002)(36756003)(86362001)(575784001)(71200400001)(8936002)(6486002)(97736004)(6512007)(102836004)(2906002)(508600001)(8676002)(107886003)(81166006)(2501003)(53936002)(81156014);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR16MB2655;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: GdT/v8r+lw3aH0uV7aO+EJ6VrWJq3asFekkwSsuRuiZkWPYjfGN2tHJ+xIIvhUhsdyLVNZZoysfvkmXeUWt+PX9bjqb+y0CsRZ1IpXv0haQ4QsVRZ5xK+faff+/xjjynT672K7GNFOJ2I63yLOM/7r5mSJA9N40ks7KG9EaaByeh0xp5ODomUvfEVnb4KbqQljUkS8uzzUMEvgcMQg/IUW3OTsICwSIw6eDfzfXvLzFzngHa1Lk8keEZIaradHu5F7rQ3YhIskxUvKSEKT/AalLrbCGp15zC3GwJ2pAGJPfBOtj1Yi4qg9nxeP7LATil spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: bayhubtech.com X-MS-Exchange-CrossTenant-Network-Message-Id: b019ad9b-6952-4eb1-a816-08d670c0b341 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jan 2019 14:43:46.8784 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0a7aae2b-8f2e-44df-ba2f-42de7f93c642 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR16MB2655 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 --- 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..73b49efa2316 100644 --- a/drivers/mmc/host/sdhci-pci-o2micro.c +++ b/drivers/mmc/host/sdhci-pci-o2micro.c @@ -60,6 +60,16 @@ #define O2_SD_VENDOR_SETTING2 0x1C8 #define O2_SD_HW_TUNING_DISABLE BIT(4) +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 void sdhci_o2_set_tuning_mode(struct sdhci_host *host) { u16 reg; 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 */