Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934558AbdCWRlc (ORCPT ); Thu, 23 Mar 2017 13:41:32 -0400 Received: from mail-bn3nam01on0086.outbound.protection.outlook.com ([104.47.33.86]:31881 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932967AbdCWRl3 (ORCPT ); Thu, 23 Mar 2017 13:41:29 -0400 Authentication-Results: cavium.com; dkim=none (message not signed) header.d=none;cavium.com; dmarc=none action=none header.from=caviumnetworks.com; Subject: Re: [PATCH v12 6/9] mmc: cavium: Add MMC PCI driver for ThunderX SOCs To: Ulf Hansson , Jan Glauber References: <20170310132507.32025-1-jglauber@cavium.com> <20170310132507.32025-7-jglauber@cavium.com> <20170323085812.GA2250@hardcore> Cc: "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , David Daney , "Steven J . Hill" From: David Daney Message-ID: <3146b3ef-a3c2-902d-2157-11425e6fc138@caviumnetworks.com> Date: Thu, 23 Mar 2017 10:41:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: SN1PR0701CA0047.namprd07.prod.outlook.com (10.163.126.15) To BY2PR07MB2424.namprd07.prod.outlook.com (10.166.115.16) X-MS-Office365-Filtering-Correlation-Id: c977b4b5-aad0-4ec1-4d1c-08d47213d4eb X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR07MB2424; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB2424;3:7J9KoCeIhq1/l2mXKiHzb6KeXwUdOX4CcJ0Q68CYlcBdJm+09i0klJ8jCG1gv4lG/sr+Wbgiz8D6YxShtmXTaahQCDHr3ucrFfJdSjSb3OkcAS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QLQD23CZkHhdvwVu2f5nYjbg7ZCUBTnNp7wm6MSmBr4Z+2jP8gbDXFM5ZfHRxb0uS1qIHoxZFJQytrfVOYvkQlu/NSeHqFWWP5xtX96J05FhcNT1zjJW6xSMdqy2/FimZqQgGsfrQwaViHXcyjw0HsN38gd5epzmsWJ/1zODeSjN3RIqr7GSRIccd8Eg42YiOnlYqdWxN1C2WTgaAFozPRCAWYJMqTNQA84FMZEo1kKqxBGdcuInmUFy6cKVFuG7H9rESmrzuQxYdHIcf+hh7gdYf10cCuoL5/LCfXhOwoW973zBzJ7aYBr7QIp8EGINoHf89DjO91FFFUcXDabhN0YDxs+QDD3hVGiIVkhpk+rL+/3cgbayEKr2Zfk1d1Cj1lDL7jgtEaUQ1ZqFH2Zovr2x3FaY71cFnv5at24IVVFEajlZvs5laBqctzku27+PCea8xCKC468IHZaGBDPUk/brTcejdM9KkWYyUph/205AyE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558025)(6072148);SRVR:BY2PR07MB2424;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB2424; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB2424;4:3x4pWFU7T7tk6/GT0A/OWaUB/4ShtyuuhcxTCwDZ2NK821ioG6sxyhmzhequS/cnD+78JW7LadszKYiBFFy6ZZBd4UKtdXPTrgTwJ0SceUcM8heh4M0aEW+yjPQSAanF5dykwFfsKxTdfZA2bEkIo5LRjKLkSGW3AsRxsiHiz+vKj/AGL3iz0z7DiXOdCJiba9U8DShQK67L52GOURk26WsUCRGYTdlEHnlS8nYLhDX5pqVfVPkCCG5lg6xh7SnsD9KOkZ7ABizwSCL0UTcvs6KFf6E6pZN7C0NjoXyp0ykLhxLUFkCPf5eYOV68B/3ON9MOH95tR1fFC+z23QqaH8JhcfxwRqHRIZj9bQTPQqtAtSUIKDDY2xqJRhnNPZ1eMpL3ifY7815HVYpci0qTkqXSq1FuVDsVO07qOcEwWkzH6b8tzuHYnNBYAtGnANCf7R632C7u0MJZilUlMuZ/TVLfNlIJ9/jpEc43LV9UfpoAksiOQl7QSU9hbx+JH512jJXGyCYJGrfaggYtxAXj5lseEfosaMf1daSMv0FoQT8v9SwYrIWTfjXiBvCOWr73KKXOuNV2wV5Jtxm4/lyfdlY6ouWsoxPZei+GRzCcAmQ= X-Forefront-PRVS: 0255DF69B9 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39450400003)(39830400002)(39410400002)(51444003)(24454002)(377454003)(23676002)(36756003)(189998001)(65956001)(66066001)(47776003)(54356999)(50986999)(76176999)(53936002)(93886004)(83506001)(305945005)(7736002)(64126003)(65806001)(6636002)(6512007)(6506006)(42882006)(2950100002)(107886003)(229853002)(6666003)(6246003)(50466002)(38730400002)(54906002)(5660300001)(4326008)(25786009)(53546009)(6486002)(6116002)(8676002)(2906002)(230700001)(65826007)(3846002)(81166006)(42186005)(33646002)(53416004)(31686004)(31696002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR07MB2424;H:ddl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjA3TUIyNDI0OzIzOkhDTkkwTldOcm9scTZlbytsZDIvVzNnUnZF?= =?utf-8?B?MDFVMEJLeDJIYWlndEwzNmtmeTFCN1ByQXd3emd4QzVrRTAycnNMYXpzc0ZV?= =?utf-8?B?SWk3UlpWbExlbTNyM3Nrc1UyeXp2cUNlWVJ6YWNFS2xxRGkrSWFNOGM1TFNC?= =?utf-8?B?c0g4M2oyWjc2T2laeFExd2kwdzRYSDAwQ0JuaDNkeFlNWElIRG9YWTZHSmhQ?= =?utf-8?B?aTgwZVBOWjRHMmt0QnlnWjJNcGwv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zg/j8Or1si9UcgoaERa5vL1ueiWvIeMHF+a6TqIggvx3sFLt2M1b28PZm+JsE0ftsuHGH3PgsVMqt/A83NUclVDtKHAesfwZcm96ZekMKof1bNrQI9ntVyGP9gydlwNb7cZQpxjew==;5:1F0Z0lkCRMsMnRT73VAGQS9FPDDc20gSVX+dSuHt+8O5HndpXlPzmtPcvFWfkoeEIc20YMVc7oqpkQ/XYniNvUih3g0vFPdkx6/MWouWOW0VCR0lF+K+XfJQKXVbfmynJXWvmZoVOYU6uoN7IvJsRg==;24:wmr+ZKsujc2OzUWeA4WjqPkKBWFo2tR0qDBylV020ebB2sYQdEWqUm9HIA6bpeqbkSGlYUp0hx7NlG8zFyxXyuTFMD3cvKZUUSc9fIPji90= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB2424;7:qPxPnJ9wPVi1JAvXtlWN4NPUACXDlcDX00lZfX4Qcf8AdcWeNWQ7GLE9quaoulbpJSopvkU2xQP+yxB2Cx+yVUDrj+P4KEhZkHo7kDrd9cedEYBg9i+2A66f6mZ77Sf5f+f17H9p9kNMeCLuoYEufdrTC7tynTkKExyhGqBRadh21ZqNrWbnWBpC3JNXoNOblV27WjHFvWOvC0ImC/LYRoeVdcdTY5AAINywM5IJzFlEWVB3sJVZQNsMfUPCPhp1zwN+SlY6FH2ayAihv4mi88TPk3r1xeAlzZBlR0EbsBWKx2BGtsnK1ZhY16ytgJPTDBt3+JDEmzIr/uU3Edb4ig== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2017 17:41:26.1499 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2424 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1934 Lines: 49 On 03/23/2017 02:28 AM, Ulf Hansson wrote: > On 23 March 2017 at 09:58, Jan Glauber wrote: >> On Fri, Mar 17, 2017 at 03:58:26PM +0100, Ulf Hansson wrote: >>> On 10 March 2017 at 14:25, Jan Glauber wrote: >>>> Add a platform driver for ThunderX ARM SOCs. >>>> >>>> Signed-off-by: Jan Glauber >>>> --- >>>> drivers/mmc/host/Kconfig | 10 ++ >>>> drivers/mmc/host/Makefile | 2 + >>>> drivers/mmc/host/cavium-mmc.h | 10 +- >>>> drivers/mmc/host/cavium-pci-thunderx.c | 198 +++++++++++++++++++++++++++++++++ >>>> 4 files changed, 218 insertions(+), 2 deletions(-) >>>> create mode 100644 drivers/mmc/host/cavium-pci-thunderx.c >>>> >>>> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig >>>> index 68cc811..3983dee 100644 >>>> --- a/drivers/mmc/host/Kconfig >>>> +++ b/drivers/mmc/host/Kconfig >>>> @@ -632,6 +632,16 @@ config MMC_CAVIUM_OCTEON >>>> >>>> If unsure, say N. >>>> >>>> +config MMC_CAVIUM_THUNDERX >>>> + tristate "Cavium ThunderX SD/MMC Card Interface support" >>>> + depends on PCI && 64BIT && (ARM64 || COMPILE_TEST) >>>> + select GPIO_THUNDERX >>> >>> Do you really need to select GPIO_THUNDERX? What is the relationship? >> >> I don't know much about gpio, but in the end despite all these layers >> there must be a gpio set function called doing the writeq on our SOC >> to enable/disable the power gpio, right? >> >> GPIO_THUNDERX implements this gpio set function for Cavium's SOC. > > Got it. However using "select" should be avoided. > > Please use "depends on GPIOLIB" instead. The select of "GPIO_THUNDERX" > should be done part of the defconfig or via an SoC specifc Kconfig > file. > Thanks, I think that is the cleanest approach. We may want to add an MSI-X dependency as well, as legacy interrupts are not supported by the hardware. David.