[{"id":2911009,"web_url":"http://patchwork.ozlabs.org/comment/2911009/","msgid":"<6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>","list_archive_url":null,"date":"2022-06-10T16:34:46","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":18663,"url":"http://patchwork.ozlabs.org/api/people/18663/","name":"Randy Dunlap","email":"rdunlap@infradead.org"},"content":"Hi--\n\nOn 6/10/22 01:17, Serge Semin wrote:\n> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n> index bb45a9c00514..95e0e022b5bb 100644\n> --- a/drivers/ata/Kconfig\n> +++ b/drivers/ata/Kconfig\n> @@ -176,6 +176,16 @@ config AHCI_DM816\n>  \n>  \t  If unsure, say N.\n>  \n> +config AHCI_DWC\n> +\ttristate \"Synopsys DWC AHCI SATA support\"\n> +\tselect SATA_HOST\n> +\tdefault SATA_AHCI_PLATFORM\n\nI don't think this needs to default to SATA_AHCI_PLATFORM.\nIt might build a driver that isn't needed.\nAnd it's incompatible with \"If unsure, say N.\"\n\n> +\thelp\n> +\t  This option enables support for the Synopsys DWC AHCI SATA\n> +\t  controller implementation.\n> +\n> +\t  If unsure, say N.","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=casper.20170209 header.b=XZqQoZt7;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LKRRJ3PDpz9s1l\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Jun 2022 02:35:56 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S242904AbiFJQfw (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Fri, 10 Jun 2022 12:35:52 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:55952 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S1349626AbiFJQfX (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Fri, 10 Jun 2022 12:35:23 -0400","from casper.infradead.org (casper.infradead.org\n [IPv6:2001:8b0:10b:1236::1])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42BAF5A097;\n        Fri, 10 Jun 2022 09:35:06 -0700 (PDT)","from [2601:1c0:6280:3f0::aa0b]\n        by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux))\n        id 1nzhb3-00EaOY-VD; Fri, 10 Jun 2022 16:34:54 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n        d=infradead.org; s=casper.20170209;\n h=Content-Transfer-Encoding:Content-Type:\n        In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender\n        :Reply-To:Content-ID:Content-Description;\n        bh=ITFCmOiKiwpLnIkUYUaZ9ApXZjSQdaUdOkg4dD/FPoE=;\n b=XZqQoZt7QcwLeMSIihkqhnAt9G\n        GiVWhkFdiE7GA2h30pWh3vgPBwMLASudYSHFvXPNPZu5zVFZwhrlsrBWFvDfWCxxMcomWTsJosjtk\n        9gkUreI59XCiOnj5yiTBI93J1XiJOIIrprKkYbwM/s5csJ7thxbHy0qd0PRwEoJZk8qvx7AB+2zNi\n        TJwD5KbqbhGwwQlfdszLogNbMHxsuvppgtA6GKuziEvStSgVV46cFunt9K1alwlY+4D/1sSlyKkt7\n        9th/UPsNweljWDuF6rKL9hxWvjGDo8QijSUl44yscs6OfxXIuQ35rWsz5dIUQ7/ds9mrqBdrltNRh\n        UJvCGztw==;","Message-ID":"<6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>","Date":"Fri, 10 Jun 2022 09:34:46 -0700","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n Thunderbird/91.9.1","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Content-Language":"en-US","To":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Damien Le Moal <damien.lemoal@opensource.wdc.com>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Serge Semin <fancer.lancer@gmail.com>","Cc":"Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>","From":"Randy Dunlap <rdunlap@infradead.org>","In-Reply-To":"<20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,\n        SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2911120,"web_url":"http://patchwork.ozlabs.org/comment/2911120/","msgid":"<20220610215850.ju76kxjquwef6kd3@mobilestation>","list_archive_url":null,"date":"2022-06-10T21:58:50","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":70038,"url":"http://patchwork.ozlabs.org/api/people/70038/","name":"Serge Semin","email":"fancer.lancer@gmail.com"},"content":"On Fri, Jun 10, 2022 at 09:34:46AM -0700, Randy Dunlap wrote:\n> Hi--\n\nHi Randy\n\n> \n> On 6/10/22 01:17, Serge Semin wrote:\n> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n> > index bb45a9c00514..95e0e022b5bb 100644\n> > --- a/drivers/ata/Kconfig\n> > +++ b/drivers/ata/Kconfig\n> > @@ -176,6 +176,16 @@ config AHCI_DM816\n> >  \n> >  \t  If unsure, say N.\n> >  \n> > +config AHCI_DWC\n> > +\ttristate \"Synopsys DWC AHCI SATA support\"\n> > +\tselect SATA_HOST\n> > +\tdefault SATA_AHCI_PLATFORM\n> \n\n> I don't think this needs to default to SATA_AHCI_PLATFORM.\n> It might build a driver that isn't needed.\n> And it's incompatible with \"If unsure, say N.\"\n\nBasically you are right, but this particular setting is connected with\nthe modification I've done in the drivers/ata/ahci_platform.c driver\nin the framework of this commit. I've moved the \"snps,spear-ahci\" and\n\"snps,dwc-ahci\" compatible devices support to the new driver. Thus\nshould I omit the SATA_AHCI_PLATFORM dependency their default kernel\nconfigs will lack the corresponding controllers support. If it's not a\nproblem and we can rely on the kernel build system ability to ask\nwhether the new config needs to be set/cleared, then I would be very\nhappy to drop the default setting. What do you think?\n\n-Sergey\n\n> \n> > +\thelp\n> > +\t  This option enables support for the Synopsys DWC AHCI SATA\n> > +\t  controller implementation.\n> > +\n> > +\t  If unsure, say N.\n> \n> -- \n> ~Randy","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=iC/k1aIY;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LKZc919dBz9s1l\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Jun 2022 07:59:04 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S241580AbiFJV7B (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Fri, 10 Jun 2022 17:59:01 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:59992 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S243046AbiFJV7A (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Fri, 10 Jun 2022 17:59:00 -0400","from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com\n [IPv6:2a00:1450:4864:20::12e])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49E6811468E;\n        Fri, 10 Jun 2022 14:58:55 -0700 (PDT)","by mail-lf1-x12e.google.com with SMTP id p18so522503lfr.1;\n        Fri, 10 Jun 2022 14:58:55 -0700 (PDT)","from mobilestation ([95.79.189.214])\n        by smtp.gmail.com with ESMTPSA id\n w26-20020a2e999a000000b00258e71c643asm97069lji.64.2022.06.10.14.58.52\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 10 Jun 2022 14:58:52 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20210112;\n        h=date:from:to:cc:subject:message-id:references:mime-version\n         :content-disposition:in-reply-to;\n        bh=afNBlLkJJKTEMkCxvJSwBmNG9UxwUmzxSaYdEqHx/mg=;\n        b=iC/k1aIYIg3UfAPHfN83ZCN8Vv7OVjkgaCJ7igf76EbJmKJzmLvUv6cIgWM906nkka\n         +JQsyiKSvDsrTN/xVMuzGPqDnioz5sHBADEjBiIjvzfc8iw0rrgifi3Eumanu93Y3Dij\n         LWk2dlB4IdKrjkK5/6TujdOVFuKzVyFd9U4luteJU3M+PEQyKFa+oNUje1/PGW2Qc1/6\n         PW4CObkmQvHroauXTYf0dcVauZlmeVenisNXGdf0cSF44M1S2NXHxMLtuR7PtrrpJUQK\n         TQcHZ8XxUANwIOWtzhqI9+G5ygiBicyTEQ7fAhp6SZDSvHjLRyU/HhJ6I+shUqLM9rNV\n         /JZw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=x-gm-message-state:date:from:to:cc:subject:message-id:references\n         :mime-version:content-disposition:in-reply-to;\n        bh=afNBlLkJJKTEMkCxvJSwBmNG9UxwUmzxSaYdEqHx/mg=;\n        b=UiZvb3hfy9NmRJPP0l7x8FSJ3J+meLRuBvVZwLaM7W4mHpw//TknySZfcCWUXOz+5d\n         GFzsaMK/k7lBDd40ORTFuXNJCVhePXkp84FDGjozjhzRinDripM1L6EmGkUkm3ryncbV\n         yFU//WfAV+pIRp3xejaKbaxE6Ms5syfRSUiuTfizbQUqlEoyCHulTF5c8sBWXUIfYhCr\n         HansXmNte3x/4gTxYXyYkBGK0McRicXJps3GU/SgLQ3T3SzNdg5qDEIzDCPd5hifkhvh\n         Fk4ZgKMVUYVLgBCqgI5YrRI0uAZhSA/WtVJrM9Kt81cPdag1ANJ5fSlwQFhMHipIk0Aa\n         K5Jg==","X-Gm-Message-State":"AOAM533Wmu5+eNjZ47vQ0NDbbpF4vYpOcGF7wGWoUTT7cGQ/VrcfBgFX\n        gxkF1pNiPU9rPuVjrJDGX4Y=","X-Google-Smtp-Source":"\n ABdhPJwQU2SdbrIVdUoU8xDwmoFclJutuNXd1GFV6/YPgIR9v/fa0ikFUPMFQ3tJl2PLcZWWcaXxYg==","X-Received":"by 2002:a05:6512:15a2:b0:478:ffaa:89 with SMTP id\n bp34-20020a05651215a200b00478ffaa0089mr28877624lfb.658.1654898333169;\n        Fri, 10 Jun 2022 14:58:53 -0700 (PDT)","Date":"Sat, 11 Jun 2022 00:58:50 +0300","From":"Serge Semin <fancer.lancer@gmail.com>","To":"Randy Dunlap <rdunlap@infradead.org>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Damien Le Moal <damien.lemoal@opensource.wdc.com>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Message-ID":"<20220610215850.ju76kxjquwef6kd3@mobilestation>","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n        RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2911135,"web_url":"http://patchwork.ozlabs.org/comment/2911135/","msgid":"<73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>","list_archive_url":null,"date":"2022-06-10T23:34:13","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":18663,"url":"http://patchwork.ozlabs.org/api/people/18663/","name":"Randy Dunlap","email":"rdunlap@infradead.org"},"content":"Hi Serge,\n\nOn 6/10/22 14:58, Serge Semin wrote:\n> On Fri, Jun 10, 2022 at 09:34:46AM -0700, Randy Dunlap wrote:\n>> Hi--\n> \n> Hi Randy\n> \n>>\n>> On 6/10/22 01:17, Serge Semin wrote:\n>>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n>>> index bb45a9c00514..95e0e022b5bb 100644\n>>> --- a/drivers/ata/Kconfig\n>>> +++ b/drivers/ata/Kconfig\n>>> @@ -176,6 +176,16 @@ config AHCI_DM816\n>>>  \n>>>  \t  If unsure, say N.\n>>>  \n>>> +config AHCI_DWC\n>>> +\ttristate \"Synopsys DWC AHCI SATA support\"\n>>> +\tselect SATA_HOST\n>>> +\tdefault SATA_AHCI_PLATFORM\n>>\n> \n>> I don't think this needs to default to SATA_AHCI_PLATFORM.\n>> It might build a driver that isn't needed.\n>> And it's incompatible with \"If unsure, say N.\"\n> \n> Basically you are right, but this particular setting is connected with\n> the modification I've done in the drivers/ata/ahci_platform.c driver\n> in the framework of this commit. I've moved the \"snps,spear-ahci\" and\n> \"snps,dwc-ahci\" compatible devices support to the new driver. Thus\n> should I omit the SATA_AHCI_PLATFORM dependency their default kernel\n> configs will lack the corresponding controllers support. If it's not a\n> problem and we can rely on the kernel build system ability to ask\n> whether the new config needs to be set/cleared, then I would be very\n> happy to drop the default setting. What do you think?\n\nI'd prefer to try it like that.\nIf it becomes a problem, we can go back to this v4 patch.\n\n>>> +\thelp\n>>> +\t  This option enables support for the Synopsys DWC AHCI SATA\n>>> +\t  controller implementation.\n>>> +\n>>> +\t  If unsure, say N.\n>>\n>> -- \n>> ~Randy\n\nThanks.","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=desiato.20200630 header.b=nuJn2mIT;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LKckl3jJGz9s09\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Jun 2022 09:34:55 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1348949AbiFJXew (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Fri, 10 Jun 2022 19:34:52 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:53020 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S1348626AbiFJXev (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Fri, 10 Jun 2022 19:34:51 -0400","from desiato.infradead.org (desiato.infradead.org\n [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49A3B289A0F;\n        Fri, 10 Jun 2022 16:34:49 -0700 (PDT)","from [2601:1c0:6280:3f0::aa0b]\n        by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux))\n        id 1nzo8z-006o8u-Ah; Fri, 10 Jun 2022 23:34:22 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n        d=infradead.org; s=desiato.20200630;\n h=Content-Transfer-Encoding:Content-Type\n        :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:\n        Sender:Reply-To:Content-ID:Content-Description;\n        bh=wwxScsKhI2Gxa0NDbcdKj4SXbyaU0oPRufyab5cqNns=;\n b=nuJn2mITolgztxc1OtuuW5b9bc\n        r5eVsM0cGFiQ7FM5BTPwGzLl9Pp3DFHI58cH8UxPCGTndt6CshU5UHisXKsaVEngEOaPVpo7h+BxS\n        UJmrxs1R+8E6yrjHWWrTVVXDJKtQQ0m2TEbV1iDc+odJpRwEEhpxjHEXYDqOyUJ6nFcx7CLs0BrB9\n        7AaDgHFro5h92kf5lJWVgeC6HRdUTMygXdIiJkfP7lGpGjM87xpZCPdHBY11BKx14Z5yJ4LdSESpe\n        Qcb5YPUfSBK8Q62VLQcLXtM8OuWbasTBO6ICOEu0qFRq9zKd89Y3IwR0PMSjB+md5tJFGzVyFrtp2\n        eDRuT8OA==;","Message-ID":"<73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>","Date":"Fri, 10 Jun 2022 16:34:13 -0700","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n Thunderbird/91.9.1","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Content-Language":"en-US","To":"Serge Semin <fancer.lancer@gmail.com>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Damien Le Moal <damien.lemoal@opensource.wdc.com>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>\n <20220610215850.ju76kxjquwef6kd3@mobilestation>","From":"Randy Dunlap <rdunlap@infradead.org>","In-Reply-To":"<20220610215850.ju76kxjquwef6kd3@mobilestation>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,\n        SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2912318,"web_url":"http://patchwork.ozlabs.org/comment/2912318/","msgid":"<52c9ca79-769f-4426-db94-7aad05a68258@opensource.wdc.com>","list_archive_url":null,"date":"2022-06-14T08:53:39","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":82259,"url":"http://patchwork.ozlabs.org/api/people/82259/","name":"Damien Le Moal","email":"damien.lemoal@opensource.wdc.com"},"content":"On 6/10/22 17:17, Serge Semin wrote:\n> Synopsys AHCI SATA controller can work pretty under with the generic\n> AHCI-platform driver control. But there are vendor-specific peculiarities\n> which can tune the device performance up and which may need to be fixed up\n> for proper device functioning. In addition some DWC AHCI-based controllers\n> may require small platform-specific fixups, so adding them in the generic\n> AHCI driver would have ruined the code simplicity. Shortly speaking in\n> order to keep the generic AHCI-platform code clean and have DWC AHCI\n> SATA-specific features supported we suggest to add a dedicated DWC AHCI\n> SATA device driver. Aside with the standard AHCI-platform resources\n> getting, enabling/disabling and the controller registration the new driver\n> performs the next actions.\n> \n> First of all there is a way to verify whether the HBA/ports capabilities\n> activated in OF are correct. Almost all features availability is reflected\n> in the vendor-specific parameters registers. So the DWC AHCI driver does\n> the capabilities sanity check based on the corresponding fields state.\n> \n> Secondly if either the Command Completion Coalescing or the Device Sleep\n> feature is enabled the DWC AHCI-specific internal 1ms timer must be fixed\n> in accordance with the application clock signal frequency. In particular\n> the timer value must be set to be Fapp * 1000. Normally the SoC designers\n> pre-configure the TIMER1MS register to contain a correct value by default.\n> But the platforms can support the application clock rate change. If that\n> happens the 1ms timer value must be accordingly updated otherwise the\n> dependent features won't work as expected. In the DWC AHCI driver we\n> suggest to rely on the \"aclk\" reference clock rate to set the timer\n> interval up. That clock source is supposed to be the AHCI SATA application\n> clock in accordance with the DT bindings.\n> \n> Finally DWC AHCI SATA controller AXI/AHB bus DMA-engine can be tuned up to\n> transfer up to 1024 * FIFO words at a time by setting the Tx/Rx\n> transaction size in the DMA control register. The maximum value depends on\n> the DMA data bus and AXI/AHB bus maximum burst length. In most of the\n> cases it's better to set the maximum possible value to reach the best AHCI\n> SATA controller performance. But sometimes in order to improve the system\n> interconnect responsiveness, transferring in smaller data chunks may be\n> more preferable. For such cases and for the case when the default value\n> doesn't provide the best DMA bus performance we suggest to use the new\n> HBA-port specific DT-properties \"snps,{tx,rx}-ts-max\" to tune the DMA\n> transactions size up.\n> \n> After all the settings denoted above are handled the DWC AHCI SATA driver\n> proceeds further with the standard AHCI-platform host initializations.\n> \n> Note since DWC AHCI controller is now have a dedicated driver we can\n> discard the corresponding compatible string from the ahci-platform.c\n> module. The same concerns \"snps,spear-ahci\" compatible string, which is\n> also based on the DWC AHCI IP-core.\n> \n> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>\n> Reviewed-by: Hannes Reinecke <hare@suse.de>\n> \n> ---\n> \n> Note there are three more AHCI SATA drivers which have been created for\n> the devices based on the DWC AHCI SATA IP-core. It's AHCI SunXi, St and\n> iMX drivers. Mostly they don't support the features implemented in this\n> driver. So hopefully sometime in future they can be converted to be based\n> on the generic DWC AHCI SATA driver and just perform some\n> subvendor-specific setups in their own LLDD (glue) driver code. But for\n> now let's leave the generic DWC AHCI SATA code as is. Hopefully the new\n> DWC AHCI-based device drivers will try at least to re-use a part of the\n> DWC AHCI driver methods if not being able to be integrated in the generic\n> DWC driver code.\n> \n> Changelog v2:\n> - Change the local objects prefix from 'dwc_ahci_' to 'ahci_dwc_'.\n>   (@Damien)\n> \n> Changelog v4:\n> - Replace GPLv2 with just GPL license which are the same in the framework\n>   of the MODULE_LICENSE() macro.\n> ---\n>  drivers/ata/Kconfig         |  10 +\n>  drivers/ata/Makefile        |   1 +\n>  drivers/ata/ahci_dwc.c      | 395 ++++++++++++++++++++++++++++++++++++\n>  drivers/ata/ahci_platform.c |   2 -\n>  4 files changed, 406 insertions(+), 2 deletions(-)\n>  create mode 100644 drivers/ata/ahci_dwc.c\n> \n> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n> index bb45a9c00514..95e0e022b5bb 100644\n> --- a/drivers/ata/Kconfig\n> +++ b/drivers/ata/Kconfig\n> @@ -176,6 +176,16 @@ config AHCI_DM816\n>  \n>  \t  If unsure, say N.\n>  \n> +config AHCI_DWC\n> +\ttristate \"Synopsys DWC AHCI SATA support\"\n> +\tselect SATA_HOST\n> +\tdefault SATA_AHCI_PLATFORM\n> +\thelp\n> +\t  This option enables support for the Synopsys DWC AHCI SATA\n> +\t  controller implementation.\n> +\n> +\t  If unsure, say N.\n> +\n>  config AHCI_ST\n>  \ttristate \"ST AHCI SATA support\"\n>  \tdepends on ARCH_STI\n> diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile\n> index b8aebfb14e82..34623365d9a6 100644\n> --- a/drivers/ata/Makefile\n> +++ b/drivers/ata/Makefile\n> @@ -17,6 +17,7 @@ obj-$(CONFIG_AHCI_BRCM)\t\t+= ahci_brcm.o libahci.o libahci_platform.o\n>  obj-$(CONFIG_AHCI_CEVA)\t\t+= ahci_ceva.o libahci.o libahci_platform.o\n>  obj-$(CONFIG_AHCI_DA850)\t+= ahci_da850.o libahci.o libahci_platform.o\n>  obj-$(CONFIG_AHCI_DM816)\t+= ahci_dm816.o libahci.o libahci_platform.o\n> +obj-$(CONFIG_AHCI_DWC)\t\t+= ahci_dwc.o libahci.o libahci_platform.o\n>  obj-$(CONFIG_AHCI_IMX)\t\t+= ahci_imx.o libahci.o libahci_platform.o\n>  obj-$(CONFIG_AHCI_MTK)\t\t+= ahci_mtk.o libahci.o libahci_platform.o\n>  obj-$(CONFIG_AHCI_MVEBU)\t+= ahci_mvebu.o libahci.o libahci_platform.o\n> diff --git a/drivers/ata/ahci_dwc.c b/drivers/ata/ahci_dwc.c\n> new file mode 100644\n> index 000000000000..8c2510933a31\n> --- /dev/null\n> +++ b/drivers/ata/ahci_dwc.c\n> @@ -0,0 +1,395 @@\n> +// SPDX-License-Identifier: GPL-2.0-or-later\n> +/*\n> + * DWC AHCI SATA Platform driver\n> + *\n> + * Copyright (C) 2021 BAIKAL ELECTRONICS, JSC\n> + */\n> +\n> +#include <linux/ahci_platform.h>\n> +#include <linux/bitfield.h>\n> +#include <linux/bits.h>\n> +#include <linux/clk.h>\n> +#include <linux/device.h>\n> +#include <linux/kernel.h>\n> +#include <linux/libata.h>\n> +#include <linux/log2.h>\n> +#include <linux/module.h>\n> +#include <linux/of_device.h>\n> +#include <linux/platform_device.h>\n> +#include <linux/pm.h>\n> +\n> +#include \"ahci.h\"\n> +\n> +#define DRV_NAME \"ahci-dwc\"\n> +\n> +#define AHCI_DWC_FBS_PMPN_MAX\t\t15\n> +\n> +/* DWC AHCI SATA controller specific registers */\n> +#define AHCI_DWC_HOST_OOBR\t\t0xbc\n> +#define AHCI_DWC_HOST_OOB_WE\t\tBIT(31)\n> +#define AHCI_DWC_HOST_CWMIN_MASK\tGENMASK(30, 24)\n> +#define AHCI_DWC_HOST_CWMAX_MASK\tGENMASK(23, 16)\n> +#define AHCI_DWC_HOST_CIMIN_MASK\tGENMASK(15, 8)\n> +#define AHCI_DWC_HOST_CIMAX_MASK\tGENMASK(7, 0)\n> +\n> +#define AHCI_DWC_HOST_GPCR\t\t0xd0\n> +#define AHCI_DWC_HOST_GPSR\t\t0xd4\n> +\n> +#define AHCI_DWC_HOST_TIMER1MS\t\t0xe0\n> +#define AHCI_DWC_HOST_TIMV_MASK\t\tGENMASK(19, 0)\n> +\n> +#define AHCI_DWC_HOST_GPARAM1R\t\t0xe8\n> +#define AHCI_DWC_HOST_ALIGN_M\t\tBIT(31)\n> +#define AHCI_DWC_HOST_RX_BUFFER\t\tBIT(30)\n> +#define AHCI_DWC_HOST_PHY_DATA_MASK\tGENMASK(29, 28)\n> +#define AHCI_DWC_HOST_PHY_RST\t\tBIT(27)\n> +#define AHCI_DWC_HOST_PHY_CTRL_MASK\tGENMASK(26, 21)\n> +#define AHCI_DWC_HOST_PHY_STAT_MASK\tGENMASK(20, 15)\n> +#define AHCI_DWC_HOST_LATCH_M\t\tBIT(14)\n> +#define AHCI_DWC_HOST_PHY_TYPE_MASK\tGENMASK(13, 11)\n> +#define AHCI_DWC_HOST_RET_ERR\t\tBIT(10)\n> +#define AHCI_DWC_HOST_AHB_ENDIAN_MASK\tGENMASK(9, 8)\n> +#define AHCI_DWC_HOST_S_HADDR\t\tBIT(7)\n> +#define AHCI_DWC_HOST_M_HADDR\t\tBIT(6)\n> +#define AHCI_DWC_HOST_S_HDATA_MASK\tGENMASK(5, 3)\n> +#define AHCI_DWC_HOST_M_HDATA_MASK\tGENMASK(2, 0)\n> +\n> +#define AHCI_DWC_HOST_GPARAM2R\t\t0xec\n> +#define AHCI_DWC_HOST_FBS_MEM_S\t\tBIT(19)\n> +#define AHCI_DWC_HOST_FBS_PMPN_MASK\tGENMASK(17, 16)\n> +#define AHCI_DWC_HOST_FBS_SUP\t\tBIT(15)\n> +#define AHCI_DWC_HOST_DEV_CP\t\tBIT(14)\n> +#define AHCI_DWC_HOST_DEV_MP\t\tBIT(13)\n> +#define AHCI_DWC_HOST_ENCODE_M\t\tBIT(12)\n> +#define AHCI_DWC_HOST_RXOOB_CLK_M\tBIT(11)\n> +#define AHCI_DWC_HOST_RXOOB_M\t\tBIT(10)\n> +#define AHCI_DWC_HOST_TXOOB_M\t\tBIT(9)\n> +#define AHCI_DWC_HOST_RXOOB_M\t\tBIT(10)\n> +#define AHCI_DWC_HOST_RXOOB_CLK_MASK\tGENMASK(8, 0)\n> +\n> +#define AHCI_DWC_HOST_PPARAMR\t\t0xf0\n> +#define AHCI_DWC_HOST_TX_MEM_M\t\tBIT(11)\n> +#define AHCI_DWC_HOST_TX_MEM_S\t\tBIT(10)\n> +#define AHCI_DWC_HOST_RX_MEM_M\t\tBIT(9)\n> +#define AHCI_DWC_HOST_RX_MEM_S\t\tBIT(8)\n> +#define AHCI_DWC_HOST_TXFIFO_DEPTH\tGENMASK(7, 4)\n> +#define AHCI_DWC_HOST_RXFIFO_DEPTH\tGENMASK(3, 0)\n> +\n> +#define AHCI_DWC_HOST_TESTR\t\t0xf4\n> +#define AHCI_DWC_HOST_PSEL_MASK\t\tGENMASK(18, 16)\n> +#define AHCI_DWC_HOST_TEST_IF\t\tBIT(0)\n> +\n> +#define AHCI_DWC_HOST_VERSIONR\t\t0xf8\n> +#define AHCI_DWC_HOST_IDR\t\t0xfc\n> +\n> +#define AHCI_DWC_PORT_DMACR\t\t0x70\n> +#define AHCI_DWC_PORT_RXABL_MASK\tGENMASK(15, 12)\n> +#define AHCI_DWC_PORT_TXABL_MASK\tGENMASK(11, 8)\n> +#define AHCI_DWC_PORT_RXTS_MASK\t\tGENMASK(7, 4)\n> +#define AHCI_DWC_PORT_TXTS_MASK\t\tGENMASK(3, 0)\n> +#define AHCI_DWC_PORT_PHYCR\t\t0x74\n> +#define AHCI_DWC_PORT_PHYSR\t\t0x78\n> +\n> +struct ahci_dwc_host_priv {\n> +\tstruct platform_device *pdev;\n> +\n> +\tu32 timv;\n> +\tu32 dmacr[AHCI_MAX_PORTS];\n> +};\n> +\n> +static struct ahci_host_priv *ahci_dwc_get_resources(struct platform_device *pdev)\n> +{\n> +\tstruct ahci_dwc_host_priv *dpriv;\n> +\tstruct ahci_host_priv *hpriv;\n> +\n> +\tdpriv = devm_kzalloc(&pdev->dev, sizeof(*dpriv), GFP_KERNEL);\n> +\tif (!dpriv)\n> +\t\treturn ERR_PTR(-ENOMEM);\n> +\n> +\tdpriv->pdev = pdev;\n> +\n> +\thpriv = ahci_platform_get_resources(pdev, AHCI_PLATFORM_GET_RESETS);\n> +\tif (IS_ERR(hpriv))\n> +\t\treturn hpriv;\n> +\n> +\thpriv->plat_data = (void *)dpriv;\n> +\n> +\treturn hpriv;\n> +}\n> +\n> +static void ahci_dwc_check_cap(struct ahci_host_priv *hpriv)\n> +{\n> +\tunsigned long port_map = hpriv->saved_port_map | hpriv->mask_port_map;\n> +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> +\tbool dev_mp, dev_cp, fbs_sup;\n> +\tunsigned int fbs_pmp;\n> +\tu32 param;\n> +\tint i;\n> +\n> +\tparam = readl(hpriv->mmio + AHCI_DWC_HOST_GPARAM2R);\n> +\tdev_mp = !!(param & AHCI_DWC_HOST_DEV_MP);\n> +\tdev_cp = !!(param & AHCI_DWC_HOST_DEV_CP);\n> +\tfbs_sup = !!(param & AHCI_DWC_HOST_FBS_SUP);\n> +\tfbs_pmp = 5 * FIELD_GET(AHCI_DWC_HOST_FBS_PMPN_MASK, param);\n> +\n> +\tif (!dev_mp && hpriv->saved_cap & HOST_CAP_MPS) {\n> +\t\tdev_warn(&dpriv->pdev->dev, \"MPS is unsupported\\n\");\n> +\t\thpriv->saved_cap &= ~HOST_CAP_MPS;\n> +\t}\n> +\n> +\n> +\tif (fbs_sup && fbs_pmp < AHCI_DWC_FBS_PMPN_MAX) {\n> +\t\tdev_warn(&dpriv->pdev->dev, \"PMPn is limited up to %u ports\\n\",\n> +\t\t\t fbs_pmp);\n> +\t}\n> +\n> +\tfor_each_set_bit(i, &port_map, AHCI_MAX_PORTS) {\n> +\t\tif (!dev_mp && hpriv->saved_port_cap[i] & PORT_CMD_MPSP) {\n> +\t\t\tdev_warn(&dpriv->pdev->dev, \"MPS incapable port %d\\n\", i);\n> +\t\t\thpriv->saved_port_cap[i] &= ~PORT_CMD_MPSP;\n> +\t\t}\n> +\n> +\t\tif (!dev_cp && hpriv->saved_port_cap[i] & PORT_CMD_CPD) {\n> +\t\t\tdev_warn(&dpriv->pdev->dev, \"CPD incapable port %d\\n\", i);\n> +\t\t\thpriv->saved_port_cap[i] &= ~PORT_CMD_CPD;\n> +\t\t}\n> +\n> +\t\tif (!fbs_sup && hpriv->saved_port_cap[i] & PORT_CMD_FBSCP) {\n> +\t\t\tdev_warn(&dpriv->pdev->dev, \"FBS incapable port %d\\n\", i);\n> +\t\t\thpriv->saved_port_cap[i] &= ~PORT_CMD_FBSCP;\n> +\t\t}\n> +\t}\n> +}\n> +\n> +static void ahci_dwc_init_timer(struct ahci_host_priv *hpriv)\n> +{\n> +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> +\tunsigned long rate;\n> +\tstruct clk *aclk;\n> +\tu32 cap, cap2;\n> +\n> +\t/* 1ms tick is generated only for the CCC or DevSleep features */\n> +\tcap = readl(hpriv->mmio + HOST_CAP);\n> +\tcap2 = readl(hpriv->mmio + HOST_CAP2);\n> +\tif (!(cap & HOST_CAP_CCC) && !(cap2 & HOST_CAP2_SDS))\n> +\t\treturn;\n> +\n> +\t/*\n> +\t * Tick is generated based on the AXI/AHB application clocks signal\n> +\t * so we need to be sure in the clock we are going to use.\n> +\t */\n> +\taclk = ahci_platform_find_clk(hpriv, \"aclk\");\n> +\tif (!aclk)\n> +\t\treturn;\n> +\n> +\t/* 1ms timer interval is set as TIMV = AMBA_FREQ[MHZ] * 1000 */\n> +\tdpriv->timv = readl(hpriv->mmio + AHCI_DWC_HOST_TIMER1MS);\n> +\tdpriv->timv = FIELD_GET(AHCI_DWC_HOST_TIMV_MASK, dpriv->timv);\n> +\trate = clk_get_rate(aclk) / 1000UL;\n> +\tif (rate == dpriv->timv)\n> +\t\treturn;\n> +\n> +\tdev_info(&dpriv->pdev->dev, \"Update CCC/DevSlp timer for Fapp %lu MHz\\n\",\n> +\t\t rate / 1000UL);\n> +\tdpriv->timv = FIELD_PREP(AHCI_DWC_HOST_TIMV_MASK, rate);\n> +\twritel(dpriv->timv, hpriv->mmio + AHCI_DWC_HOST_TIMER1MS);\n> +}\n> +\n> +static int ahci_dwc_init_dmacr(struct ahci_host_priv *hpriv)\n> +{\n> +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> +\tstruct device_node *child;\n> +\tvoid __iomem *port_mmio;\n> +\tu32 port, dmacr, ts;\n> +\n> +\t/*\n> +\t * Update the DMA Tx/Rx transaction sizes in accordance with the\n> +\t * platform setup. Note values exceeding maximal or minimal limits will\n> +\t * be automatically clamped. Also note the register isn't affected by\n> +\t * the HBA global reset so we can freely initialize it once until the\n> +\t * next system reset.\n> +\t */\n> +\tfor_each_child_of_node(dpriv->pdev->dev.of_node, child) {\n> +\t\tif (!of_device_is_available(child))\n> +\t\t\tcontinue;\n> +\n> +\t\tif (of_property_read_u32(child, \"reg\", &port)) {\n> +\t\t\tof_node_put(child);\n> +\t\t\treturn -EINVAL;\n> +\t\t}\n> +\n> +\t\tport_mmio = __ahci_port_base(hpriv, port);\n> +\t\tdmacr = readl(port_mmio + AHCI_DWC_PORT_DMACR);\n> +\n> +\t\tif (!of_property_read_u32(child, \"snps,tx-ts-max\", &ts)) {\n> +\t\t\tts = ilog2(ts);\n> +\t\t\tdmacr &= ~AHCI_DWC_PORT_TXTS_MASK;\n> +\t\t\tdmacr |= FIELD_PREP(AHCI_DWC_PORT_TXTS_MASK, ts);\n> +\t\t}\n> +\n> +\t\tif (!of_property_read_u32(child, \"snps,rx-ts-max\", &ts)) {\n> +\t\t\tts = ilog2(ts);\n> +\t\t\tdmacr &= ~AHCI_DWC_PORT_RXTS_MASK;\n> +\t\t\tdmacr |= FIELD_PREP(AHCI_DWC_PORT_RXTS_MASK, ts);\n> +\t\t}\n> +\n> +\t\twritel(dmacr, port_mmio + AHCI_DWC_PORT_DMACR);\n> +\t\tdpriv->dmacr[port] = dmacr;\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n> +static int ahci_dwc_init_host(struct ahci_host_priv *hpriv)\n> +{\n> +\tint rc;\n> +\n> +\trc = ahci_platform_enable_resources(hpriv);\n> +\tif (rc)\n> +\t\treturn rc;\n> +\n> +\tahci_dwc_check_cap(hpriv);\n> +\n> +\tahci_dwc_init_timer(hpriv);\n> +\n> +\trc = ahci_dwc_init_dmacr(hpriv);\n> +\tif (rc)\n> +\t\tgoto err_disable_resources;\n> +\n> +\treturn 0;\n> +\n> +err_disable_resources:\n> +\tahci_platform_disable_resources(hpriv);\n> +\n> +\treturn rc;\n> +}\n> +\n> +static int ahci_dwc_reinit_host(struct ahci_host_priv *hpriv)\n> +{\n> +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> +\tunsigned long port_map = hpriv->port_map;\n> +\tvoid __iomem *port_mmio;\n> +\tint i, rc;\n> +\n> +\trc = ahci_platform_enable_resources(hpriv);\n> +\tif (rc)\n> +\t\treturn rc;\n> +\n> +\twritel(dpriv->timv, hpriv->mmio + AHCI_DWC_HOST_TIMER1MS);\n> +\n> +\tfor_each_set_bit(i, &port_map, AHCI_MAX_PORTS) {\n> +\t\tport_mmio = __ahci_port_base(hpriv, i);\n> +\t\twritel(dpriv->dmacr[i], port_mmio + AHCI_DWC_PORT_DMACR);\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n> +static void ahci_dwc_clear_host(struct ahci_host_priv *hpriv)\n> +{\n> +\tahci_platform_disable_resources(hpriv);\n> +}\n> +\n> +static void ahci_dwc_stop_host(struct ata_host *host)\n> +{\n> +\tstruct ahci_host_priv *hpriv = host->private_data;\n> +\n> +\tahci_dwc_clear_host(hpriv);\n> +}\n> +\n> +static struct ata_port_operations ahci_dwc_port_ops = {\n> +\t.inherits\t= &ahci_platform_ops,\n> +\t.host_stop\t= ahci_dwc_stop_host,\n> +};\n> +\n> +static const struct ata_port_info ahci_dwc_port_info = {\n> +\t.flags\t\t= AHCI_FLAG_COMMON,\n> +\t.pio_mask\t= ATA_PIO4,\n> +\t.udma_mask\t= ATA_UDMA6,\n> +\t.port_ops\t= &ahci_dwc_port_ops,\n> +};\n> +\n> +static struct scsi_host_template ahci_dwc_scsi_info = {\n> +\tAHCI_SHT(DRV_NAME),\n> +};\n> +\n> +static int ahci_dwc_probe(struct platform_device *pdev)\n> +{\n> +\tstruct ahci_host_priv *hpriv;\n> +\tint rc;\n> +\n> +\thpriv = ahci_dwc_get_resources(pdev);\n> +\tif (IS_ERR(hpriv))\n> +\t\treturn PTR_ERR(hpriv);\n> +\n> +\trc = ahci_dwc_init_host(hpriv);\n> +\tif (rc)\n> +\t\treturn rc;\n> +\n> +\trc = ahci_platform_init_host(pdev, hpriv, &ahci_dwc_port_info,\n> +\t\t\t\t     &ahci_dwc_scsi_info);\n> +\tif (rc)\n> +\t\tgoto err_clear_host;\n> +\n> +\treturn 0;\n> +\n> +err_clear_host:\n> +\tahci_dwc_clear_host(hpriv);\n> +\n> +\treturn rc;\n> +}\n> +\n> +#ifdef CONFIG_PM_SLEEP\n> +static int ahci_dwc_suspend(struct device *dev)\n> +{\n> +\tstruct ata_host *host = dev_get_drvdata(dev);\n> +\tstruct ahci_host_priv *hpriv = host->private_data;\n> +\tint rc;\n> +\n> +\trc = ahci_platform_suspend_host(dev);\n> +\tif (rc)\n> +\t\treturn rc;\n> +\n> +\tahci_dwc_clear_host(hpriv);\n> +\n> +\treturn 0;\n> +}\n> +\n> +static int ahci_dwc_resume(struct device *dev)\n> +{\n> +\tstruct ata_host *host = dev_get_drvdata(dev);\n> +\tstruct ahci_host_priv *hpriv = host->private_data;\n> +\tint rc;\n> +\n> +\trc = ahci_dwc_reinit_host(hpriv);\n> +\tif (rc)\n> +\t\treturn rc;\n> +\n> +\treturn ahci_platform_resume_host(dev);\n> +}\n> +#endif\n> +\n> +static SIMPLE_DEV_PM_OPS(ahci_dwc_pm_ops, ahci_dwc_suspend, ahci_dwc_resume);\n\ninclude/linux/pm.h says:\n/* Deprecated. Use DEFINE_SIMPLE_DEV_PM_OPS() instead. */\n\n> +\n> +static const struct of_device_id ahci_dwc_of_match[] = {\n> +\t{ .compatible = \"snps,dwc-ahci\", },\n> +\t{ .compatible = \"snps,spear-ahci\", },\n> +\t{},\n> +};\n> +MODULE_DEVICE_TABLE(of, ahci_dwc_of_match);\n> +\n> +static struct platform_driver ahci_dwc_driver = {\n> +\t.probe = ahci_dwc_probe,\n> +\t.remove = ata_platform_remove_one,\n> +\t.shutdown = ahci_platform_shutdown,\n> +\t.driver = {\n> +\t\t.name = DRV_NAME,\n> +\t\t.of_match_table = ahci_dwc_of_match,\n> +\t\t.pm = &ahci_dwc_pm_ops,\n> +\t},\n> +};\n> +module_platform_driver(ahci_dwc_driver);\n> +\n> +MODULE_DESCRIPTION(\"DWC AHCI SATA platform driver\");\n> +MODULE_AUTHOR(\"Serge Semin <Sergey.Semin@baikalelectronics.ru>\");\n> +MODULE_LICENSE(\"GPL\");\n\nMODULE_LICENSE(\"GPL v2\");\n\nTo match the file header SPDX.\n\n> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c\n> index 9b56490ecbc3..8f5572a9f8f1 100644\n> --- a/drivers/ata/ahci_platform.c\n> +++ b/drivers/ata/ahci_platform.c\n> @@ -80,9 +80,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend,\n>  static const struct of_device_id ahci_of_match[] = {\n>  \t{ .compatible = \"generic-ahci\", },\n>  \t/* Keep the following compatibles for device tree compatibility */\n> -\t{ .compatible = \"snps,spear-ahci\", },\n>  \t{ .compatible = \"ibm,476gtr-ahci\", },\n> -\t{ .compatible = \"snps,dwc-ahci\", },\n>  \t{ .compatible = \"hisilicon,hisi-ahci\", },\n>  \t{ .compatible = \"cavium,octeon-7130-ahci\", },\n>  \t{ /* sentinel */ }","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256\n header.s=dkim.wdc.com header.b=lJ5lo5CW;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=opensource.wdc.com header.i=@opensource.wdc.com\n header.a=rsa-sha256 header.s=dkim header.b=diin7gxN;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)","usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass\n        reason=\"pass (just generated, assumed good)\"\n        header.d=opensource.wdc.com"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LMj0Y35SZz9sGH\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Jun 2022 18:54:05 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1356081AbiFNIyE (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Tue, 14 Jun 2022 04:54:04 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:33358 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S1355996AbiFNIx6 (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Tue, 14 Jun 2022 04:53:58 -0400","from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE60A1EC6B\n        for <linux-ide@vger.kernel.org>; Tue, 14 Jun 2022 01:53:48 -0700 (PDT)","from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com)\n ([199.255.45.14])\n  by ob1.hgst.iphmx.com with ESMTP; 14 Jun 2022 16:53:45 +0800","from uls-op-cesaip02.wdc.com ([10.248.3.37])\n  by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 14 Jun 2022 01:16:45 -0700","from usg-ed-osssrv.wdc.com ([10.3.10.180])\n  by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 14 Jun 2022 01:53:46 -0700","from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4LMj093xwlz1SVnx\n        for <linux-ide@vger.kernel.org>; Tue, 14 Jun 2022 01:53:45 -0700 (PDT)","from usg-ed-osssrv.wdc.com ([127.0.0.1])\n        by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n (amavisd-new, port 10026)\n        with ESMTP id l909nfPn4dRw for <linux-ide@vger.kernel.org>;\n        Tue, 14 Jun 2022 01:53:43 -0700 (PDT)","from [10.225.163.77] (unknown [10.225.163.77])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4LMj051Df5z1Rvlc;\n        Tue, 14 Jun 2022 01:53:40 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=simple/simple;\n  d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com;\n  t=1655196830; x=1686732830;\n  h=message-id:date:mime-version:subject:to:cc:references:\n   from:in-reply-to:content-transfer-encoding;\n  bh=AcAIileA0+1L76FGTgoZd9olRFfEYRtSS4mSPn3axN8=;\n  b=lJ5lo5CW4LgqK5vuS3daBUISFdBiAouFQ3SdRPKol7K3fxpcDBuDUyFf\n   LJSwqLWKhBLuNz0WpUb2+NuCeszUypWlUAI4agcyP+PEL0PzVjWc2QVSW\n   eEnQ5x+TO3AB0s/1Eh31hS2neThQaZWeIvIUOvVizvd7hMySBGPDzlXVo\n   F1gQbhjx2Cr0dZAF8tTpnjN9AlhCj/LRnGl1xxM3Yn8xQsiUyT3ugYZQk\n   zlK/o1IA+SKG9Vra/QTWxDxqVXO2cWOhyN9EVhYnwKsFZMT39czx8r/Cg\n   x9t1cEveEG3YEWEoeqXmBqYEZDstaujUXgBf9EZFdIVfJJrN9MkShv7i6\n   w==;","v=1; a=rsa-sha256; c=relaxed/simple; d=\n        opensource.wdc.com; h=content-transfer-encoding:content-type\n        :in-reply-to:organization:from:references:to:content-language\n        :subject:user-agent:mime-version:date:message-id; s=dkim; t=\n        1655196823; x=1657788824; bh=AcAIileA0+1L76FGTgoZd9olRFfEYRtSS4m\n        SPn3axN8=; b=diin7gxN4mg3baUVlO/MLwpfh9vvK89weB8ImP3V8P4sTH+khIs\n        yCf0UhlNc0oF20XotrBdOflnUUP0n1cEmO3BuL8dyBHAPQ2He3dA2sIIKSRXB2xs\n        Hl3JIvxLNUWe2A/3/0D+0IVPc/By5Z1UsuxfjvZf4zJVXL/yyyMjKr15p6n9+Hhk\n        0+J2NGixImIpm2smF+zkZPM6vwsP09zDvD2WOgznD8XDsgLWvCwRvydXWJaApsyM\n        JDyvuinO7Go5Ymu73dlI47Lyqmya6mGck7bWLRGG5XNQfjuSSvYXM4Cb9d4dkTtZ\n        pNOKb3UKnLr3WUTqkUze23RIxwFCRCRMOlw=="],"X-IronPort-AV":"E=Sophos;i=\"5.91,299,1647273600\";\n   d=\"scan'208\";a=\"315171410\"","IronPort-SDR":["\n H6JtZ4P7nrgfHOmNRjKW5lLGPnJyhsPiI/XCxlKygD9ZBHgQShf2CSQVjD3Jv1aTUXOxnnqLzP\n H7Fp/NANnyx7HjTxV/bvbjY1B9wwXK5/aEyWUaHQ+ZTzmFGBTEY23W/KwLfxG0Fk2uAuFc1ZDC\n I+prAsUZJr8jC/329/VjXzSsm1T8s/tD06y3gjYwnW+1csRKAXxQ2Xy6t2jBp06zzzYOI+j2Ci\n WksUcvulHKW7QxHtu2A86xNBRTSUnPNAzMTs8gBVbIY72CnUbw8W9Rcduq1pBrLbVIQGjHnhC/\n ESdaKuYxqNKp5AIEC9LPGwQA","\n LLewQPyM6/wkD3cZT9Akipxy/GBcNV6ssW3yftVAwNSxPPs19K43XnO2lP52Mp8W1kOoayUqWY\n Fb0jEORZR9FOxZ8js4x382NPX9jrHPcCpvsh2kj487j44f2UQSqaYEN/6Ztn/ggg45cEgXvAWQ\n XWm+hxWLMrCNHm1CH6BAPb/2mKDq6zRM3ObphLCrXq6zjVH32dXNk2aT9JRDaCDC3TLnyTL/By\n S9drjymN2Zip0n3JqAGhfcB2R4INbM0wX0CrvJUMYWlYUTGnCRz2Ohym/U00j//XjbLsqWGZnz\n tj4="],"WDCIronportException":"Internal","X-Virus-Scanned":"amavisd-new at usg-ed-osssrv.wdc.com","Message-ID":"<52c9ca79-769f-4426-db94-7aad05a68258@opensource.wdc.com>","Date":"Tue, 14 Jun 2022 17:53:39 +0900","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n Thunderbird/91.10.0","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Content-Language":"en-US","To":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Serge Semin <fancer.lancer@gmail.com>","Cc":"Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>","From":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Organization":"Western Digital Research","In-Reply-To":"<20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,\n        SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable\n        autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2913753,"web_url":"http://patchwork.ozlabs.org/comment/2913753/","msgid":"<20220615213029.3upsmasnnhigqozm@mobilestation>","list_archive_url":null,"date":"2022-06-15T21:30:29","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":70038,"url":"http://patchwork.ozlabs.org/api/people/70038/","name":"Serge Semin","email":"fancer.lancer@gmail.com"},"content":"On Fri, Jun 10, 2022 at 04:34:13PM -0700, Randy Dunlap wrote:\n> Hi Serge,\n> \n> On 6/10/22 14:58, Serge Semin wrote:\n> > On Fri, Jun 10, 2022 at 09:34:46AM -0700, Randy Dunlap wrote:\n> >> Hi--\n> > \n> > Hi Randy\n> > \n> >>\n> >> On 6/10/22 01:17, Serge Semin wrote:\n> >>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n> >>> index bb45a9c00514..95e0e022b5bb 100644\n> >>> --- a/drivers/ata/Kconfig\n> >>> +++ b/drivers/ata/Kconfig\n> >>> @@ -176,6 +176,16 @@ config AHCI_DM816\n> >>>  \n> >>>  \t  If unsure, say N.\n> >>>  \n> >>> +config AHCI_DWC\n> >>> +\ttristate \"Synopsys DWC AHCI SATA support\"\n> >>> +\tselect SATA_HOST\n> >>> +\tdefault SATA_AHCI_PLATFORM\n> >>\n> > \n> >> I don't think this needs to default to SATA_AHCI_PLATFORM.\n> >> It might build a driver that isn't needed.\n> >> And it's incompatible with \"If unsure, say N.\"\n> > \n> > Basically you are right, but this particular setting is connected with\n> > the modification I've done in the drivers/ata/ahci_platform.c driver\n> > in the framework of this commit. I've moved the \"snps,spear-ahci\" and\n> > \"snps,dwc-ahci\" compatible devices support to the new driver. Thus\n> > should I omit the SATA_AHCI_PLATFORM dependency their default kernel\n> > configs will lack the corresponding controllers support. If it's not a\n> > problem and we can rely on the kernel build system ability to ask\n> > whether the new config needs to be set/cleared, then I would be very\n> > happy to drop the default setting. What do you think?\n> \n\n> I'd prefer to try it like that.\n> If it becomes a problem, we can go back to this v4 patch.\n\nAgreed then (seeing Damien is silent about your comment).\n\n-Sergey\n\n> \n> >>> +\thelp\n> >>> +\t  This option enables support for the Synopsys DWC AHCI SATA\n> >>> +\t  controller implementation.\n> >>> +\n> >>> +\t  If unsure, say N.\n> >>\n> >> -- \n> >> ~Randy\n> \n> Thanks.\n> -- \n> ~Randy","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=B0emyKDi;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LNdl50MDLz9sG0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Jun 2022 07:30:41 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1346894AbiFOVah (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Wed, 15 Jun 2022 17:30:37 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:54026 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S245104AbiFOVae (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Wed, 15 Jun 2022 17:30:34 -0400","from mail-lf1-x129.google.com (mail-lf1-x129.google.com\n [IPv6:2a00:1450:4864:20::129])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DB5B562CD;\n        Wed, 15 Jun 2022 14:30:33 -0700 (PDT)","by mail-lf1-x129.google.com with SMTP id t25so20818379lfg.7;\n        Wed, 15 Jun 2022 14:30:33 -0700 (PDT)","from mobilestation ([95.79.189.214])\n        by smtp.gmail.com with ESMTPSA id\n p13-20020ac246cd000000b0047db8b30670sm1924857lfo.136.2022.06.15.14.30.30\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 15 Jun 2022 14:30:30 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20210112;\n        h=date:from:to:cc:subject:message-id:references:mime-version\n         :content-disposition:in-reply-to;\n        bh=SNyczBP6qlGicSYiV5R4dK6p317D/hQUgdOSfi3L7vI=;\n        b=B0emyKDiwbJH5GIObJjCB48eyskxzdzT+LBRIuQuHmJvWHSXEdGervMc5UkPMDWqyu\n         1gyZHo0gtnRK019lZL+fNTSHkN0QKFUfwuEouwHZch6Y9V8l5HznM01NA6yD/x3GLjGJ\n         6HjKuJPiGBQXyOEhhGtgeugVH2KiP7IwPv8mxnCoqz9E0f3UOuSbfWMj1NcW0FoCl+qh\n         abhtUhDKdFjW3+Gj+RIyTm3U1Gq7UXDJe92hjZBX78Pr6zwe4wUgOZfhKi83LhY7x38x\n         w3SzXh49+oxnaCk7QeMfT4rMLoaZHyc9cRlbanvo65DHS8z+wY3eiQGNOwj6btKsUwFr\n         YWSg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=x-gm-message-state:date:from:to:cc:subject:message-id:references\n         :mime-version:content-disposition:in-reply-to;\n        bh=SNyczBP6qlGicSYiV5R4dK6p317D/hQUgdOSfi3L7vI=;\n        b=XyisrT2acZwY/0kXDxfhGRLGY5hgxvZ0MRVjhDODjmMVbXm8Hai5rLnGRks4qjfjHr\n         vHisHfDb5Nx6dYeENeIW2u+0nsU7nvmhPbSVMR0YCLT0DdvGr6gbOap2seOQnxqQiM9T\n         9yXeNA6RugZHGFnPNsUmrVtJo4YREIWFsBNVl+QpUlNAyBZ5noxNQOYZfbEsVGnUSqgN\n         OXlXwOzQj4S2RwyFk94ieIj1nEnDhQleuH/NuHXgAZt3xXeHv46QEPG41z4iRPA0gkvf\n         iGI+dv94fFxSSLE1wNPUupM2aw/lKyAOkhdzFn5PbInWMaaavz8Ic3QB3xTNA3Po2vbF\n         71kg==","X-Gm-Message-State":"AJIora9ireiJYy3laTkYw4+cvWBS+ocYhP4T5JKExwzU6XT6LAsRkij5\n        fghn0OwuTFvSFAV9cm3Dupat3J2iILvAEw==","X-Google-Smtp-Source":"\n AGRyM1v+vEYdCRympQF5EQXPaBBHYEa4r5N08kkFHdHlGwZtJb8PFd0EHPR7JWDnxQ43m760D+QGWQ==","X-Received":"by 2002:a05:6512:2607:b0:47d:ad86:2761 with SMTP id\n bt7-20020a056512260700b0047dad862761mr883630lfb.133.1655328631600;\n        Wed, 15 Jun 2022 14:30:31 -0700 (PDT)","Date":"Thu, 16 Jun 2022 00:30:29 +0300","From":"Serge Semin <fancer.lancer@gmail.com>","To":"Randy Dunlap <rdunlap@infradead.org>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Damien Le Moal <damien.lemoal@opensource.wdc.com>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Message-ID":"<20220615213029.3upsmasnnhigqozm@mobilestation>","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>\n <20220610215850.ju76kxjquwef6kd3@mobilestation>\n <73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n        RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2913769,"web_url":"http://patchwork.ozlabs.org/comment/2913769/","msgid":"<20220615214802.ke6owp5cuv5l77hu@mobilestation>","list_archive_url":null,"date":"2022-06-15T21:48:02","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":70038,"url":"http://patchwork.ozlabs.org/api/people/70038/","name":"Serge Semin","email":"fancer.lancer@gmail.com"},"content":"On Tue, Jun 14, 2022 at 05:53:39PM +0900, Damien Le Moal wrote:\n> On 6/10/22 17:17, Serge Semin wrote:\n> > Synopsys AHCI SATA controller can work pretty under with the generic\n> > AHCI-platform driver control. But there are vendor-specific peculiarities\n> > which can tune the device performance up and which may need to be fixed up\n> > for proper device functioning. In addition some DWC AHCI-based controllers\n> > may require small platform-specific fixups, so adding them in the generic\n> > AHCI driver would have ruined the code simplicity. Shortly speaking in\n> > order to keep the generic AHCI-platform code clean and have DWC AHCI\n> > SATA-specific features supported we suggest to add a dedicated DWC AHCI\n> > SATA device driver. Aside with the standard AHCI-platform resources\n> > getting, enabling/disabling and the controller registration the new driver\n> > performs the next actions.\n> > \n> > First of all there is a way to verify whether the HBA/ports capabilities\n> > activated in OF are correct. Almost all features availability is reflected\n> > in the vendor-specific parameters registers. So the DWC AHCI driver does\n> > the capabilities sanity check based on the corresponding fields state.\n> > \n> > Secondly if either the Command Completion Coalescing or the Device Sleep\n> > feature is enabled the DWC AHCI-specific internal 1ms timer must be fixed\n> > in accordance with the application clock signal frequency. In particular\n> > the timer value must be set to be Fapp * 1000. Normally the SoC designers\n> > pre-configure the TIMER1MS register to contain a correct value by default.\n> > But the platforms can support the application clock rate change. If that\n> > happens the 1ms timer value must be accordingly updated otherwise the\n> > dependent features won't work as expected. In the DWC AHCI driver we\n> > suggest to rely on the \"aclk\" reference clock rate to set the timer\n> > interval up. That clock source is supposed to be the AHCI SATA application\n> > clock in accordance with the DT bindings.\n> > \n> > Finally DWC AHCI SATA controller AXI/AHB bus DMA-engine can be tuned up to\n> > transfer up to 1024 * FIFO words at a time by setting the Tx/Rx\n> > transaction size in the DMA control register. The maximum value depends on\n> > the DMA data bus and AXI/AHB bus maximum burst length. In most of the\n> > cases it's better to set the maximum possible value to reach the best AHCI\n> > SATA controller performance. But sometimes in order to improve the system\n> > interconnect responsiveness, transferring in smaller data chunks may be\n> > more preferable. For such cases and for the case when the default value\n> > doesn't provide the best DMA bus performance we suggest to use the new\n> > HBA-port specific DT-properties \"snps,{tx,rx}-ts-max\" to tune the DMA\n> > transactions size up.\n> > \n> > After all the settings denoted above are handled the DWC AHCI SATA driver\n> > proceeds further with the standard AHCI-platform host initializations.\n> > \n> > Note since DWC AHCI controller is now have a dedicated driver we can\n> > discard the corresponding compatible string from the ahci-platform.c\n> > module. The same concerns \"snps,spear-ahci\" compatible string, which is\n> > also based on the DWC AHCI IP-core.\n> > \n> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>\n> > Reviewed-by: Hannes Reinecke <hare@suse.de>\n> > \n> > ---\n> > \n> > Note there are three more AHCI SATA drivers which have been created for\n> > the devices based on the DWC AHCI SATA IP-core. It's AHCI SunXi, St and\n> > iMX drivers. Mostly they don't support the features implemented in this\n> > driver. So hopefully sometime in future they can be converted to be based\n> > on the generic DWC AHCI SATA driver and just perform some\n> > subvendor-specific setups in their own LLDD (glue) driver code. But for\n> > now let's leave the generic DWC AHCI SATA code as is. Hopefully the new\n> > DWC AHCI-based device drivers will try at least to re-use a part of the\n> > DWC AHCI driver methods if not being able to be integrated in the generic\n> > DWC driver code.\n> > \n> > Changelog v2:\n> > - Change the local objects prefix from 'dwc_ahci_' to 'ahci_dwc_'.\n> >   (@Damien)\n> > \n> > Changelog v4:\n> > - Replace GPLv2 with just GPL license which are the same in the framework\n> >   of the MODULE_LICENSE() macro.\n> > ---\n> >  drivers/ata/Kconfig         |  10 +\n> >  drivers/ata/Makefile        |   1 +\n> >  drivers/ata/ahci_dwc.c      | 395 ++++++++++++++++++++++++++++++++++++\n> >  drivers/ata/ahci_platform.c |   2 -\n> >  4 files changed, 406 insertions(+), 2 deletions(-)\n> >  create mode 100644 drivers/ata/ahci_dwc.c\n> > \n> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n> > index bb45a9c00514..95e0e022b5bb 100644\n> > --- a/drivers/ata/Kconfig\n> > +++ b/drivers/ata/Kconfig\n> > @@ -176,6 +176,16 @@ config AHCI_DM816\n> >  \n> >  \t  If unsure, say N.\n> >  \n> > +config AHCI_DWC\n> > +\ttristate \"Synopsys DWC AHCI SATA support\"\n> > +\tselect SATA_HOST\n> > +\tdefault SATA_AHCI_PLATFORM\n> > +\thelp\n> > +\t  This option enables support for the Synopsys DWC AHCI SATA\n> > +\t  controller implementation.\n> > +\n> > +\t  If unsure, say N.\n> > +\n> >  config AHCI_ST\n> >  \ttristate \"ST AHCI SATA support\"\n> >  \tdepends on ARCH_STI\n> > diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile\n> > index b8aebfb14e82..34623365d9a6 100644\n> > --- a/drivers/ata/Makefile\n> > +++ b/drivers/ata/Makefile\n> > @@ -17,6 +17,7 @@ obj-$(CONFIG_AHCI_BRCM)\t\t+= ahci_brcm.o libahci.o libahci_platform.o\n> >  obj-$(CONFIG_AHCI_CEVA)\t\t+= ahci_ceva.o libahci.o libahci_platform.o\n> >  obj-$(CONFIG_AHCI_DA850)\t+= ahci_da850.o libahci.o libahci_platform.o\n> >  obj-$(CONFIG_AHCI_DM816)\t+= ahci_dm816.o libahci.o libahci_platform.o\n> > +obj-$(CONFIG_AHCI_DWC)\t\t+= ahci_dwc.o libahci.o libahci_platform.o\n> >  obj-$(CONFIG_AHCI_IMX)\t\t+= ahci_imx.o libahci.o libahci_platform.o\n> >  obj-$(CONFIG_AHCI_MTK)\t\t+= ahci_mtk.o libahci.o libahci_platform.o\n> >  obj-$(CONFIG_AHCI_MVEBU)\t+= ahci_mvebu.o libahci.o libahci_platform.o\n> > diff --git a/drivers/ata/ahci_dwc.c b/drivers/ata/ahci_dwc.c\n> > new file mode 100644\n> > index 000000000000..8c2510933a31\n> > --- /dev/null\n> > +++ b/drivers/ata/ahci_dwc.c\n> > @@ -0,0 +1,395 @@\n> > +// SPDX-License-Identifier: GPL-2.0-or-later\n> > +/*\n> > + * DWC AHCI SATA Platform driver\n> > + *\n> > + * Copyright (C) 2021 BAIKAL ELECTRONICS, JSC\n> > + */\n> > +\n> > +#include <linux/ahci_platform.h>\n> > +#include <linux/bitfield.h>\n> > +#include <linux/bits.h>\n> > +#include <linux/clk.h>\n> > +#include <linux/device.h>\n> > +#include <linux/kernel.h>\n> > +#include <linux/libata.h>\n> > +#include <linux/log2.h>\n> > +#include <linux/module.h>\n> > +#include <linux/of_device.h>\n> > +#include <linux/platform_device.h>\n> > +#include <linux/pm.h>\n> > +\n> > +#include \"ahci.h\"\n> > +\n> > +#define DRV_NAME \"ahci-dwc\"\n> > +\n> > +#define AHCI_DWC_FBS_PMPN_MAX\t\t15\n> > +\n> > +/* DWC AHCI SATA controller specific registers */\n> > +#define AHCI_DWC_HOST_OOBR\t\t0xbc\n> > +#define AHCI_DWC_HOST_OOB_WE\t\tBIT(31)\n> > +#define AHCI_DWC_HOST_CWMIN_MASK\tGENMASK(30, 24)\n> > +#define AHCI_DWC_HOST_CWMAX_MASK\tGENMASK(23, 16)\n> > +#define AHCI_DWC_HOST_CIMIN_MASK\tGENMASK(15, 8)\n> > +#define AHCI_DWC_HOST_CIMAX_MASK\tGENMASK(7, 0)\n> > +\n> > +#define AHCI_DWC_HOST_GPCR\t\t0xd0\n> > +#define AHCI_DWC_HOST_GPSR\t\t0xd4\n> > +\n> > +#define AHCI_DWC_HOST_TIMER1MS\t\t0xe0\n> > +#define AHCI_DWC_HOST_TIMV_MASK\t\tGENMASK(19, 0)\n> > +\n> > +#define AHCI_DWC_HOST_GPARAM1R\t\t0xe8\n> > +#define AHCI_DWC_HOST_ALIGN_M\t\tBIT(31)\n> > +#define AHCI_DWC_HOST_RX_BUFFER\t\tBIT(30)\n> > +#define AHCI_DWC_HOST_PHY_DATA_MASK\tGENMASK(29, 28)\n> > +#define AHCI_DWC_HOST_PHY_RST\t\tBIT(27)\n> > +#define AHCI_DWC_HOST_PHY_CTRL_MASK\tGENMASK(26, 21)\n> > +#define AHCI_DWC_HOST_PHY_STAT_MASK\tGENMASK(20, 15)\n> > +#define AHCI_DWC_HOST_LATCH_M\t\tBIT(14)\n> > +#define AHCI_DWC_HOST_PHY_TYPE_MASK\tGENMASK(13, 11)\n> > +#define AHCI_DWC_HOST_RET_ERR\t\tBIT(10)\n> > +#define AHCI_DWC_HOST_AHB_ENDIAN_MASK\tGENMASK(9, 8)\n> > +#define AHCI_DWC_HOST_S_HADDR\t\tBIT(7)\n> > +#define AHCI_DWC_HOST_M_HADDR\t\tBIT(6)\n> > +#define AHCI_DWC_HOST_S_HDATA_MASK\tGENMASK(5, 3)\n> > +#define AHCI_DWC_HOST_M_HDATA_MASK\tGENMASK(2, 0)\n> > +\n> > +#define AHCI_DWC_HOST_GPARAM2R\t\t0xec\n> > +#define AHCI_DWC_HOST_FBS_MEM_S\t\tBIT(19)\n> > +#define AHCI_DWC_HOST_FBS_PMPN_MASK\tGENMASK(17, 16)\n> > +#define AHCI_DWC_HOST_FBS_SUP\t\tBIT(15)\n> > +#define AHCI_DWC_HOST_DEV_CP\t\tBIT(14)\n> > +#define AHCI_DWC_HOST_DEV_MP\t\tBIT(13)\n> > +#define AHCI_DWC_HOST_ENCODE_M\t\tBIT(12)\n> > +#define AHCI_DWC_HOST_RXOOB_CLK_M\tBIT(11)\n> > +#define AHCI_DWC_HOST_RXOOB_M\t\tBIT(10)\n> > +#define AHCI_DWC_HOST_TXOOB_M\t\tBIT(9)\n> > +#define AHCI_DWC_HOST_RXOOB_M\t\tBIT(10)\n> > +#define AHCI_DWC_HOST_RXOOB_CLK_MASK\tGENMASK(8, 0)\n> > +\n> > +#define AHCI_DWC_HOST_PPARAMR\t\t0xf0\n> > +#define AHCI_DWC_HOST_TX_MEM_M\t\tBIT(11)\n> > +#define AHCI_DWC_HOST_TX_MEM_S\t\tBIT(10)\n> > +#define AHCI_DWC_HOST_RX_MEM_M\t\tBIT(9)\n> > +#define AHCI_DWC_HOST_RX_MEM_S\t\tBIT(8)\n> > +#define AHCI_DWC_HOST_TXFIFO_DEPTH\tGENMASK(7, 4)\n> > +#define AHCI_DWC_HOST_RXFIFO_DEPTH\tGENMASK(3, 0)\n> > +\n> > +#define AHCI_DWC_HOST_TESTR\t\t0xf4\n> > +#define AHCI_DWC_HOST_PSEL_MASK\t\tGENMASK(18, 16)\n> > +#define AHCI_DWC_HOST_TEST_IF\t\tBIT(0)\n> > +\n> > +#define AHCI_DWC_HOST_VERSIONR\t\t0xf8\n> > +#define AHCI_DWC_HOST_IDR\t\t0xfc\n> > +\n> > +#define AHCI_DWC_PORT_DMACR\t\t0x70\n> > +#define AHCI_DWC_PORT_RXABL_MASK\tGENMASK(15, 12)\n> > +#define AHCI_DWC_PORT_TXABL_MASK\tGENMASK(11, 8)\n> > +#define AHCI_DWC_PORT_RXTS_MASK\t\tGENMASK(7, 4)\n> > +#define AHCI_DWC_PORT_TXTS_MASK\t\tGENMASK(3, 0)\n> > +#define AHCI_DWC_PORT_PHYCR\t\t0x74\n> > +#define AHCI_DWC_PORT_PHYSR\t\t0x78\n> > +\n> > +struct ahci_dwc_host_priv {\n> > +\tstruct platform_device *pdev;\n> > +\n> > +\tu32 timv;\n> > +\tu32 dmacr[AHCI_MAX_PORTS];\n> > +};\n> > +\n> > +static struct ahci_host_priv *ahci_dwc_get_resources(struct platform_device *pdev)\n> > +{\n> > +\tstruct ahci_dwc_host_priv *dpriv;\n> > +\tstruct ahci_host_priv *hpriv;\n> > +\n> > +\tdpriv = devm_kzalloc(&pdev->dev, sizeof(*dpriv), GFP_KERNEL);\n> > +\tif (!dpriv)\n> > +\t\treturn ERR_PTR(-ENOMEM);\n> > +\n> > +\tdpriv->pdev = pdev;\n> > +\n> > +\thpriv = ahci_platform_get_resources(pdev, AHCI_PLATFORM_GET_RESETS);\n> > +\tif (IS_ERR(hpriv))\n> > +\t\treturn hpriv;\n> > +\n> > +\thpriv->plat_data = (void *)dpriv;\n> > +\n> > +\treturn hpriv;\n> > +}\n> > +\n> > +static void ahci_dwc_check_cap(struct ahci_host_priv *hpriv)\n> > +{\n> > +\tunsigned long port_map = hpriv->saved_port_map | hpriv->mask_port_map;\n> > +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> > +\tbool dev_mp, dev_cp, fbs_sup;\n> > +\tunsigned int fbs_pmp;\n> > +\tu32 param;\n> > +\tint i;\n> > +\n> > +\tparam = readl(hpriv->mmio + AHCI_DWC_HOST_GPARAM2R);\n> > +\tdev_mp = !!(param & AHCI_DWC_HOST_DEV_MP);\n> > +\tdev_cp = !!(param & AHCI_DWC_HOST_DEV_CP);\n> > +\tfbs_sup = !!(param & AHCI_DWC_HOST_FBS_SUP);\n> > +\tfbs_pmp = 5 * FIELD_GET(AHCI_DWC_HOST_FBS_PMPN_MASK, param);\n> > +\n> > +\tif (!dev_mp && hpriv->saved_cap & HOST_CAP_MPS) {\n> > +\t\tdev_warn(&dpriv->pdev->dev, \"MPS is unsupported\\n\");\n> > +\t\thpriv->saved_cap &= ~HOST_CAP_MPS;\n> > +\t}\n> > +\n> > +\n> > +\tif (fbs_sup && fbs_pmp < AHCI_DWC_FBS_PMPN_MAX) {\n> > +\t\tdev_warn(&dpriv->pdev->dev, \"PMPn is limited up to %u ports\\n\",\n> > +\t\t\t fbs_pmp);\n> > +\t}\n> > +\n> > +\tfor_each_set_bit(i, &port_map, AHCI_MAX_PORTS) {\n> > +\t\tif (!dev_mp && hpriv->saved_port_cap[i] & PORT_CMD_MPSP) {\n> > +\t\t\tdev_warn(&dpriv->pdev->dev, \"MPS incapable port %d\\n\", i);\n> > +\t\t\thpriv->saved_port_cap[i] &= ~PORT_CMD_MPSP;\n> > +\t\t}\n> > +\n> > +\t\tif (!dev_cp && hpriv->saved_port_cap[i] & PORT_CMD_CPD) {\n> > +\t\t\tdev_warn(&dpriv->pdev->dev, \"CPD incapable port %d\\n\", i);\n> > +\t\t\thpriv->saved_port_cap[i] &= ~PORT_CMD_CPD;\n> > +\t\t}\n> > +\n> > +\t\tif (!fbs_sup && hpriv->saved_port_cap[i] & PORT_CMD_FBSCP) {\n> > +\t\t\tdev_warn(&dpriv->pdev->dev, \"FBS incapable port %d\\n\", i);\n> > +\t\t\thpriv->saved_port_cap[i] &= ~PORT_CMD_FBSCP;\n> > +\t\t}\n> > +\t}\n> > +}\n> > +\n> > +static void ahci_dwc_init_timer(struct ahci_host_priv *hpriv)\n> > +{\n> > +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> > +\tunsigned long rate;\n> > +\tstruct clk *aclk;\n> > +\tu32 cap, cap2;\n> > +\n> > +\t/* 1ms tick is generated only for the CCC or DevSleep features */\n> > +\tcap = readl(hpriv->mmio + HOST_CAP);\n> > +\tcap2 = readl(hpriv->mmio + HOST_CAP2);\n> > +\tif (!(cap & HOST_CAP_CCC) && !(cap2 & HOST_CAP2_SDS))\n> > +\t\treturn;\n> > +\n> > +\t/*\n> > +\t * Tick is generated based on the AXI/AHB application clocks signal\n> > +\t * so we need to be sure in the clock we are going to use.\n> > +\t */\n> > +\taclk = ahci_platform_find_clk(hpriv, \"aclk\");\n> > +\tif (!aclk)\n> > +\t\treturn;\n> > +\n> > +\t/* 1ms timer interval is set as TIMV = AMBA_FREQ[MHZ] * 1000 */\n> > +\tdpriv->timv = readl(hpriv->mmio + AHCI_DWC_HOST_TIMER1MS);\n> > +\tdpriv->timv = FIELD_GET(AHCI_DWC_HOST_TIMV_MASK, dpriv->timv);\n> > +\trate = clk_get_rate(aclk) / 1000UL;\n> > +\tif (rate == dpriv->timv)\n> > +\t\treturn;\n> > +\n> > +\tdev_info(&dpriv->pdev->dev, \"Update CCC/DevSlp timer for Fapp %lu MHz\\n\",\n> > +\t\t rate / 1000UL);\n> > +\tdpriv->timv = FIELD_PREP(AHCI_DWC_HOST_TIMV_MASK, rate);\n> > +\twritel(dpriv->timv, hpriv->mmio + AHCI_DWC_HOST_TIMER1MS);\n> > +}\n> > +\n> > +static int ahci_dwc_init_dmacr(struct ahci_host_priv *hpriv)\n> > +{\n> > +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> > +\tstruct device_node *child;\n> > +\tvoid __iomem *port_mmio;\n> > +\tu32 port, dmacr, ts;\n> > +\n> > +\t/*\n> > +\t * Update the DMA Tx/Rx transaction sizes in accordance with the\n> > +\t * platform setup. Note values exceeding maximal or minimal limits will\n> > +\t * be automatically clamped. Also note the register isn't affected by\n> > +\t * the HBA global reset so we can freely initialize it once until the\n> > +\t * next system reset.\n> > +\t */\n> > +\tfor_each_child_of_node(dpriv->pdev->dev.of_node, child) {\n> > +\t\tif (!of_device_is_available(child))\n> > +\t\t\tcontinue;\n> > +\n> > +\t\tif (of_property_read_u32(child, \"reg\", &port)) {\n> > +\t\t\tof_node_put(child);\n> > +\t\t\treturn -EINVAL;\n> > +\t\t}\n> > +\n> > +\t\tport_mmio = __ahci_port_base(hpriv, port);\n> > +\t\tdmacr = readl(port_mmio + AHCI_DWC_PORT_DMACR);\n> > +\n> > +\t\tif (!of_property_read_u32(child, \"snps,tx-ts-max\", &ts)) {\n> > +\t\t\tts = ilog2(ts);\n> > +\t\t\tdmacr &= ~AHCI_DWC_PORT_TXTS_MASK;\n> > +\t\t\tdmacr |= FIELD_PREP(AHCI_DWC_PORT_TXTS_MASK, ts);\n> > +\t\t}\n> > +\n> > +\t\tif (!of_property_read_u32(child, \"snps,rx-ts-max\", &ts)) {\n> > +\t\t\tts = ilog2(ts);\n> > +\t\t\tdmacr &= ~AHCI_DWC_PORT_RXTS_MASK;\n> > +\t\t\tdmacr |= FIELD_PREP(AHCI_DWC_PORT_RXTS_MASK, ts);\n> > +\t\t}\n> > +\n> > +\t\twritel(dmacr, port_mmio + AHCI_DWC_PORT_DMACR);\n> > +\t\tdpriv->dmacr[port] = dmacr;\n> > +\t}\n> > +\n> > +\treturn 0;\n> > +}\n> > +\n> > +static int ahci_dwc_init_host(struct ahci_host_priv *hpriv)\n> > +{\n> > +\tint rc;\n> > +\n> > +\trc = ahci_platform_enable_resources(hpriv);\n> > +\tif (rc)\n> > +\t\treturn rc;\n> > +\n> > +\tahci_dwc_check_cap(hpriv);\n> > +\n> > +\tahci_dwc_init_timer(hpriv);\n> > +\n> > +\trc = ahci_dwc_init_dmacr(hpriv);\n> > +\tif (rc)\n> > +\t\tgoto err_disable_resources;\n> > +\n> > +\treturn 0;\n> > +\n> > +err_disable_resources:\n> > +\tahci_platform_disable_resources(hpriv);\n> > +\n> > +\treturn rc;\n> > +}\n> > +\n> > +static int ahci_dwc_reinit_host(struct ahci_host_priv *hpriv)\n> > +{\n> > +\tstruct ahci_dwc_host_priv *dpriv = hpriv->plat_data;\n> > +\tunsigned long port_map = hpriv->port_map;\n> > +\tvoid __iomem *port_mmio;\n> > +\tint i, rc;\n> > +\n> > +\trc = ahci_platform_enable_resources(hpriv);\n> > +\tif (rc)\n> > +\t\treturn rc;\n> > +\n> > +\twritel(dpriv->timv, hpriv->mmio + AHCI_DWC_HOST_TIMER1MS);\n> > +\n> > +\tfor_each_set_bit(i, &port_map, AHCI_MAX_PORTS) {\n> > +\t\tport_mmio = __ahci_port_base(hpriv, i);\n> > +\t\twritel(dpriv->dmacr[i], port_mmio + AHCI_DWC_PORT_DMACR);\n> > +\t}\n> > +\n> > +\treturn 0;\n> > +}\n> > +\n> > +static void ahci_dwc_clear_host(struct ahci_host_priv *hpriv)\n> > +{\n> > +\tahci_platform_disable_resources(hpriv);\n> > +}\n> > +\n> > +static void ahci_dwc_stop_host(struct ata_host *host)\n> > +{\n> > +\tstruct ahci_host_priv *hpriv = host->private_data;\n> > +\n> > +\tahci_dwc_clear_host(hpriv);\n> > +}\n> > +\n> > +static struct ata_port_operations ahci_dwc_port_ops = {\n> > +\t.inherits\t= &ahci_platform_ops,\n> > +\t.host_stop\t= ahci_dwc_stop_host,\n> > +};\n> > +\n> > +static const struct ata_port_info ahci_dwc_port_info = {\n> > +\t.flags\t\t= AHCI_FLAG_COMMON,\n> > +\t.pio_mask\t= ATA_PIO4,\n> > +\t.udma_mask\t= ATA_UDMA6,\n> > +\t.port_ops\t= &ahci_dwc_port_ops,\n> > +};\n> > +\n> > +static struct scsi_host_template ahci_dwc_scsi_info = {\n> > +\tAHCI_SHT(DRV_NAME),\n> > +};\n> > +\n> > +static int ahci_dwc_probe(struct platform_device *pdev)\n> > +{\n> > +\tstruct ahci_host_priv *hpriv;\n> > +\tint rc;\n> > +\n> > +\thpriv = ahci_dwc_get_resources(pdev);\n> > +\tif (IS_ERR(hpriv))\n> > +\t\treturn PTR_ERR(hpriv);\n> > +\n> > +\trc = ahci_dwc_init_host(hpriv);\n> > +\tif (rc)\n> > +\t\treturn rc;\n> > +\n> > +\trc = ahci_platform_init_host(pdev, hpriv, &ahci_dwc_port_info,\n> > +\t\t\t\t     &ahci_dwc_scsi_info);\n> > +\tif (rc)\n> > +\t\tgoto err_clear_host;\n> > +\n> > +\treturn 0;\n> > +\n> > +err_clear_host:\n> > +\tahci_dwc_clear_host(hpriv);\n> > +\n> > +\treturn rc;\n> > +}\n> > +\n> > +#ifdef CONFIG_PM_SLEEP\n> > +static int ahci_dwc_suspend(struct device *dev)\n> > +{\n> > +\tstruct ata_host *host = dev_get_drvdata(dev);\n> > +\tstruct ahci_host_priv *hpriv = host->private_data;\n> > +\tint rc;\n> > +\n> > +\trc = ahci_platform_suspend_host(dev);\n> > +\tif (rc)\n> > +\t\treturn rc;\n> > +\n> > +\tahci_dwc_clear_host(hpriv);\n> > +\n> > +\treturn 0;\n> > +}\n> > +\n> > +static int ahci_dwc_resume(struct device *dev)\n> > +{\n> > +\tstruct ata_host *host = dev_get_drvdata(dev);\n> > +\tstruct ahci_host_priv *hpriv = host->private_data;\n> > +\tint rc;\n> > +\n> > +\trc = ahci_dwc_reinit_host(hpriv);\n> > +\tif (rc)\n> > +\t\treturn rc;\n> > +\n> > +\treturn ahci_platform_resume_host(dev);\n> > +}\n> > +#endif\n> > +\n> > +static SIMPLE_DEV_PM_OPS(ahci_dwc_pm_ops, ahci_dwc_suspend, ahci_dwc_resume);\n> \n\n> include/linux/pm.h says:\n> /* Deprecated. Use DEFINE_SIMPLE_DEV_PM_OPS() instead. */\n\nOk.\n\n> \n> > +\n> > +static const struct of_device_id ahci_dwc_of_match[] = {\n> > +\t{ .compatible = \"snps,dwc-ahci\", },\n> > +\t{ .compatible = \"snps,spear-ahci\", },\n> > +\t{},\n> > +};\n> > +MODULE_DEVICE_TABLE(of, ahci_dwc_of_match);\n> > +\n> > +static struct platform_driver ahci_dwc_driver = {\n> > +\t.probe = ahci_dwc_probe,\n> > +\t.remove = ata_platform_remove_one,\n> > +\t.shutdown = ahci_platform_shutdown,\n> > +\t.driver = {\n> > +\t\t.name = DRV_NAME,\n> > +\t\t.of_match_table = ahci_dwc_of_match,\n> > +\t\t.pm = &ahci_dwc_pm_ops,\n> > +\t},\n> > +};\n> > +module_platform_driver(ahci_dwc_driver);\n> > +\n> > +MODULE_DESCRIPTION(\"DWC AHCI SATA platform driver\");\n> > +MODULE_AUTHOR(\"Serge Semin <Sergey.Semin@baikalelectronics.ru>\");\n> > +MODULE_LICENSE(\"GPL\");\n> \n\n> MODULE_LICENSE(\"GPL v2\");\n> \n> To match the file header SPDX.\n\nNo. Please see the commit bf7fbeeae6db (\"module: Cure the\nMODULE_LICENSE \"GPL\" vs. \"GPL v2\" bogosity\") and what checkpatch.pl\nsays should the \"GPL v2\" string is used in the module license block.\nMore info regarding this macro and the possible license values are\ndescribed here:\nDocumentation/process/license-rules.rst\n\n-Sergey\n\n> \n> > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c\n> > index 9b56490ecbc3..8f5572a9f8f1 100644\n> > --- a/drivers/ata/ahci_platform.c\n> > +++ b/drivers/ata/ahci_platform.c\n> > @@ -80,9 +80,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend,\n> >  static const struct of_device_id ahci_of_match[] = {\n> >  \t{ .compatible = \"generic-ahci\", },\n> >  \t/* Keep the following compatibles for device tree compatibility */\n> > -\t{ .compatible = \"snps,spear-ahci\", },\n> >  \t{ .compatible = \"ibm,476gtr-ahci\", },\n> > -\t{ .compatible = \"snps,dwc-ahci\", },\n> >  \t{ .compatible = \"hisilicon,hisi-ahci\", },\n> >  \t{ .compatible = \"cavium,octeon-7130-ahci\", },\n> >  \t{ /* sentinel */ }\n> \n> \n> -- \n> Damien Le Moal\n> Western Digital Research","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=pONlZCHv;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LNf7L3RFwz9s2R\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Jun 2022 07:48:14 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S239284AbiFOVsL (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Wed, 15 Jun 2022 17:48:11 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:40110 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S239985AbiFOVsJ (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Wed, 15 Jun 2022 17:48:09 -0400","from mail-lf1-x130.google.com (mail-lf1-x130.google.com\n [IPv6:2a00:1450:4864:20::130])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3231128E20;\n        Wed, 15 Jun 2022 14:48:07 -0700 (PDT)","by mail-lf1-x130.google.com with SMTP id c2so20989419lfk.0;\n        Wed, 15 Jun 2022 14:48:07 -0700 (PDT)","from mobilestation ([95.79.189.214])\n        by smtp.gmail.com with ESMTPSA id\n c4-20020a19e344000000b00478ea0e4f66sm1934107lfk.169.2022.06.15.14.48.04\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 15 Jun 2022 14:48:04 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20210112;\n        h=date:from:to:cc:subject:message-id:references:mime-version\n         :content-disposition:in-reply-to;\n        bh=taZ+63ZSLmXXdqLktURFuCDioicoLFvmFhqztKDti6Y=;\n        b=pONlZCHviIyrUfPHZTQ2cxglnnAJVlNmcjXOYFKYj9mOpeqkW34eRPeofkuVfS73Hg\n         Of4yJdjOcwDs8hJXCGqyarXgAzM6TtP47j26R1Y6IOQbB2mZSaUpj8uhjqrwN8bfPkKQ\n         b39K3S0aJQXGyQAQ5ffQ6w7DHiQcTZxGytnylwiEbBFYd2iVCOMvk2eO39hBrS09cJ/+\n         ZC31HCgD6j/1YgozHEeVxAjSuYKOn5lElvMQydFUrM8Ye85GcEXFI+chEAgfXoqDJXLM\n         9CAWoyjcddqLNCKgN4smRh+KkhnjeK30ppMdQGxLbSperJ2MmX2zaICIORCtuC9RXGn8\n         Yn/w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=x-gm-message-state:date:from:to:cc:subject:message-id:references\n         :mime-version:content-disposition:in-reply-to;\n        bh=taZ+63ZSLmXXdqLktURFuCDioicoLFvmFhqztKDti6Y=;\n        b=tbj6l3x+ZxuRhB9jycoXK1ZyUjGg7TtjN+VNlbz9+rBvFlX2LBZA+hh3qLiqxsM7EQ\n         q9mTaoCiBD8oFGidOo1aYTcwp3zpZR+SXGTL7BJ8G9nf91yLxVoalCAlDPtkYg/k3xE1\n         5Dd1lYVsmvfbDWfDh5cdGLEUBfWL92a+5zFnmrCvnS7InK0pGRmu2Rji4HjJv2B1l9jO\n         r2NQ7NfH5qouBQtUSQxQvgiIF6VXK1d4eWjkG9AQYZbFGJuzAyHPvBj3JZ9B92jw6d31\n         bCPyHshr91oTPqgxagAMpkbgjFhhpOQlvf6magcJuF8Hs0UsBx1QtqmDl4mS01UnddEg\n         owyw==","X-Gm-Message-State":"AJIora9pk8G/ft9IxJGJNa0cKVFqcAlz60cpZZJm8b0m+ejD4v/nODcY\n        0Pw44hm8PX08LGndEATb+UjOSgrIiBr5DQ==","X-Google-Smtp-Source":"\n AGRyM1sY++atfHDRCvZd81ucaYN9adstuLUW7ZAhfE2AAcMfmO/zn0sERw42rYC2NmoKtrq1SGRF0g==","X-Received":"by 2002:a05:6512:12d4:b0:47b:7b02:717 with SMTP id\n p20-20020a05651212d400b0047b7b020717mr832603lfg.577.1655329685473;\n        Wed, 15 Jun 2022 14:48:05 -0700 (PDT)","Date":"Thu, 16 Jun 2022 00:48:02 +0300","From":"Serge Semin <fancer.lancer@gmail.com>","To":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Message-ID":"<20220615214802.ke6owp5cuv5l77hu@mobilestation>","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <52c9ca79-769f-4426-db94-7aad05a68258@opensource.wdc.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<52c9ca79-769f-4426-db94-7aad05a68258@opensource.wdc.com>","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n        RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2913857,"web_url":"http://patchwork.ozlabs.org/comment/2913857/","msgid":"<bfaf0208-8416-c159-93f8-8cc31dbc7ef5@opensource.wdc.com>","list_archive_url":null,"date":"2022-06-16T00:31:30","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":82259,"url":"http://patchwork.ozlabs.org/api/people/82259/","name":"Damien Le Moal","email":"damien.lemoal@opensource.wdc.com"},"content":"On 2022/06/16 6:30, Serge Semin wrote:\n> On Fri, Jun 10, 2022 at 04:34:13PM -0700, Randy Dunlap wrote:\n>> Hi Serge,\n>>\n>> On 6/10/22 14:58, Serge Semin wrote:\n>>> On Fri, Jun 10, 2022 at 09:34:46AM -0700, Randy Dunlap wrote:\n>>>> Hi--\n>>>\n>>> Hi Randy\n>>>\n>>>>\n>>>> On 6/10/22 01:17, Serge Semin wrote:\n>>>>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n>>>>> index bb45a9c00514..95e0e022b5bb 100644\n>>>>> --- a/drivers/ata/Kconfig\n>>>>> +++ b/drivers/ata/Kconfig\n>>>>> @@ -176,6 +176,16 @@ config AHCI_DM816\n>>>>>  \n>>>>>  \t  If unsure, say N.\n>>>>>  \n>>>>> +config AHCI_DWC\n>>>>> +\ttristate \"Synopsys DWC AHCI SATA support\"\n>>>>> +\tselect SATA_HOST\n>>>>> +\tdefault SATA_AHCI_PLATFORM\n>>>>\n>>>\n>>>> I don't think this needs to default to SATA_AHCI_PLATFORM.\n>>>> It might build a driver that isn't needed.\n>>>> And it's incompatible with \"If unsure, say N.\"\n>>>\n>>> Basically you are right, but this particular setting is connected with\n>>> the modification I've done in the drivers/ata/ahci_platform.c driver\n>>> in the framework of this commit. I've moved the \"snps,spear-ahci\" and\n>>> \"snps,dwc-ahci\" compatible devices support to the new driver. Thus\n>>> should I omit the SATA_AHCI_PLATFORM dependency their default kernel\n>>> configs will lack the corresponding controllers support. If it's not a\n>>> problem and we can rely on the kernel build system ability to ask\n>>> whether the new config needs to be set/cleared, then I would be very\n>>> happy to drop the default setting. What do you think?\n>>\n> \n>> I'd prefer to try it like that.\n>> If it becomes a problem, we can go back to this v4 patch.\n> \n> Agreed then (seeing Damien is silent about your comment).\n\nI have not thought about it :)\nI do not use SATA PLATFORM at all, so I am not familiar with its dependencies.\nWill have a look and do my usual build tests anyway.\n\n> \n> -Sergey\n> \n>>\n>>>>> +\thelp\n>>>>> +\t  This option enables support for the Synopsys DWC AHCI SATA\n>>>>> +\t  controller implementation.\n>>>>> +\n>>>>> +\t  If unsure, say N.\n>>>>\n>>>> -- \n>>>> ~Randy\n>>\n>> Thanks.\n>> -- \n>> ~Randy","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256\n header.s=dkim.wdc.com header.b=mFinrey1;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=opensource.wdc.com header.i=@opensource.wdc.com\n header.a=rsa-sha256 header.s=dkim header.b=PP8LAnE1;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)","usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass\n        reason=\"pass (just generated, assumed good)\"\n        header.d=opensource.wdc.com"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LNjlt5vQkz9sG2\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Jun 2022 10:31:38 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S245162AbiFPAbh (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Wed, 15 Jun 2022 20:31:37 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:38358 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S232030AbiFPAbh (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Wed, 15 Jun 2022 20:31:37 -0400","from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E8D95710A\n        for <linux-ide@vger.kernel.org>; Wed, 15 Jun 2022 17:31:36 -0700 (PDT)","from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com)\n ([199.255.45.14])\n  by ob1.hgst.iphmx.com with ESMTP; 16 Jun 2022 08:31:34 +0800","from uls-op-cesaip01.wdc.com ([10.248.3.36])\n  by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 15 Jun 2022 16:54:24 -0700","from usg-ed-osssrv.wdc.com ([10.3.10.180])\n  by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 15 Jun 2022 17:31:35 -0700","from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4LNjlp3qJRz1Rvlx\n        for <linux-ide@vger.kernel.org>; Wed, 15 Jun 2022 17:31:34 -0700 (PDT)","from usg-ed-osssrv.wdc.com ([127.0.0.1])\n        by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n (amavisd-new, port 10026)\n        with ESMTP id bchFErUPRGPX for <linux-ide@vger.kernel.org>;\n        Wed, 15 Jun 2022 17:31:33 -0700 (PDT)","from [10.89.84.185] (c02drav6md6t.dhcp.fujisawa.hgst.com\n [10.89.84.185])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4LNjll5zM3z1Rvlc;\n        Wed, 15 Jun 2022 17:31:31 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=simple/simple;\n  d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com;\n  t=1655339496; x=1686875496;\n  h=message-id:date:mime-version:subject:to:cc:references:\n   from:in-reply-to:content-transfer-encoding;\n  bh=J4Y9wKkt06E+VVt0NnuJS5WQFB9LInYK8Z8767j+vko=;\n  b=mFinrey16E4xZ35GVwPBSMTesDQAWtLxBUy1rmro7Le1ZYKUd43AgjCe\n   fkkNzVKTThkS26m/GEc1F4KW01Pyri3dET28r+Nc0t34UNKzEcMQEmQ8b\n   b4d5fyZ75VR2cy1qHhIb+olTJRmq+OkujT4Tw4nfauo9mOjsgpDXwXWvQ\n   1SQvotM+6ehs7Tarv3oYuRkdJHymCohEUHpvZEVV5IMYxEX1Ls6PxfQUB\n   uumKYkfpTsTsFj1X9xEmZf2xwV1VelpsSHwlcwD822RqVUHi4ryi5ArZY\n   WRrXixg2PYZRkj528HdK1VQk6XeoaEPOOP7iB0DOFHdO5raPLvPqk+ovK\n   A==;","v=1; a=rsa-sha256; c=relaxed/simple; d=\n        opensource.wdc.com; h=content-transfer-encoding:content-type\n        :in-reply-to:organization:from:references:to:content-language\n        :subject:user-agent:mime-version:date:message-id; s=dkim; t=\n        1655339493; x=1657931494; bh=J4Y9wKkt06E+VVt0NnuJS5WQFB9LInYK8Z8\n        767j+vko=; b=PP8LAnE1EMtjRy07QVwzbzWvAVqgr/SlOCl7utLfLbHpn7FYlqz\n        OF69rmm2s02I9FqrPvviNgo+SLOpRFFZhhh5dbqr5SyFHKHvWUTiO5J9C8St09ee\n        dhX3R41wI1UkEL04Iod7+QZIWskkJJSNycUkzn0jqqRD+wZWg5C1IbdA9yBPtR2B\n        Xg/BJSOWTA9GkDg7ZoUSvkg2phZHDYRVrkxcc8T6NR8QC53jzvzliv/tIrie0u9C\n        aY3hqeDAsO+wWK7F8gv6t1SZW3um66mIj/8QEEck+pU23X4Wrmsk0XRtibciNYXb\n        jKEVdMvdLV/XZe+HF2hBytKFtlSj/Yu5eRw=="],"X-IronPort-AV":"E=Sophos;i=\"5.91,302,1647273600\";\n   d=\"scan'208\";a=\"307573729\"","IronPort-SDR":["\n PoFH7Vq4AsGxV2RbRELF9Th70TtHtZINpovRiwwNK64rglqSAMwH453F+fgsmkteNZsLbCLKb4\n X4JtVe/MUas1yvA/wpM3yH8uq4Wd4MZlOkwS2lz0nL4AlPZe9cUPk0/Ma+3MzymiiNdjxU1Bm1\n LQMJbCe12IGkzXMnBBAQlLo+LhZ8466jXiO2u9Jd6lP2oGlwBGB1k9Fpqvp1v3RiNNKI2TpgBG\n nS+xs5i/tgz66UIXfN48znvUeo8WznQZPxk3EofwCrO1PSxfCmPX3OmLGwgNGaaN4rIceMssGg\n CMsz7k3YIeYSJG5I9brDPw1m","\n nlbBwRddXFCFhxAGpi/Z2qaCgBGJ+tS+7ZhX9wIWbymaV7QIwNk34snemDEy6t6ttpvTzNWL7B\n EAPLv3/DDw75Mi+1yib0GMrnwbhDL2VD+OUTmWcZp9ucYeks8cyauk6rdRIB97QBPDd3LWRQ+t\n grMNF8dH+gLUwV61LjmdsByzPZXGVGa/UV1YIgCtFoRhSh/9OEIHw1CTxrSx6ubCErF52zpM8k\n X+AzCSsraCNZzwJ7ibeyuIVMBP26zB1s7vWGqpF5x2Po5U/EbjXPTnyjlfaoLtvQjvD+1Abq1I\n k+U="],"WDCIronportException":"Internal","X-Virus-Scanned":"amavisd-new at usg-ed-osssrv.wdc.com","Message-ID":"<bfaf0208-8416-c159-93f8-8cc31dbc7ef5@opensource.wdc.com>","Date":"Thu, 16 Jun 2022 09:31:30 +0900","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)\n Gecko/20100101 Thunderbird/91.10.0","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Content-Language":"en-US","To":"Serge Semin <fancer.lancer@gmail.com>,\n        Randy Dunlap <rdunlap@infradead.org>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>\n <20220610215850.ju76kxjquwef6kd3@mobilestation>\n <73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>\n <20220615213029.3upsmasnnhigqozm@mobilestation>","From":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Organization":"Western Digital Research","In-Reply-To":"<20220615213029.3upsmasnnhigqozm@mobilestation>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,\n        SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable\n        autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2913860,"web_url":"http://patchwork.ozlabs.org/comment/2913860/","msgid":"<5f1edbd8-018a-bcd0-10f2-94767f341b45@opensource.wdc.com>","list_archive_url":null,"date":"2022-06-16T00:33:22","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":82259,"url":"http://patchwork.ozlabs.org/api/people/82259/","name":"Damien Le Moal","email":"damien.lemoal@opensource.wdc.com"},"content":"On 2022/06/16 6:48, Serge Semin wrote:\n[...]\n>> MODULE_LICENSE(\"GPL v2\");\n>>\n>> To match the file header SPDX.\n> \n> No. Please see the commit bf7fbeeae6db (\"module: Cure the\n> MODULE_LICENSE \"GPL\" vs. \"GPL v2\" bogosity\") and what checkpatch.pl\n> says should the \"GPL v2\" string is used in the module license block.\n> More info regarding this macro and the possible license values are\n> described here:\n> Documentation/process/license-rules.rst\n\nah ! OK. I was not 100% sure. Doing a quick grep, there is still a lot of (half\n?) of \"GPL v2\" vs \"GPL\".\n\nIgnore this then.\n\n> \n> -Sergey\n> \n>>\n>>> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c\n>>> index 9b56490ecbc3..8f5572a9f8f1 100644\n>>> --- a/drivers/ata/ahci_platform.c\n>>> +++ b/drivers/ata/ahci_platform.c\n>>> @@ -80,9 +80,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend,\n>>>  static const struct of_device_id ahci_of_match[] = {\n>>>  \t{ .compatible = \"generic-ahci\", },\n>>>  \t/* Keep the following compatibles for device tree compatibility */\n>>> -\t{ .compatible = \"snps,spear-ahci\", },\n>>>  \t{ .compatible = \"ibm,476gtr-ahci\", },\n>>> -\t{ .compatible = \"snps,dwc-ahci\", },\n>>>  \t{ .compatible = \"hisilicon,hisi-ahci\", },\n>>>  \t{ .compatible = \"cavium,octeon-7130-ahci\", },\n>>>  \t{ /* sentinel */ }\n>>\n>>\n>> -- \n>> Damien Le Moal\n>> Western Digital Research\n>","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256\n header.s=dkim.wdc.com header.b=VcGosERU;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=opensource.wdc.com header.i=@opensource.wdc.com\n header.a=rsa-sha256 header.s=dkim header.b=NQ4xGNcQ;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)","usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass\n        reason=\"pass (just generated, assumed good)\"\n        header.d=opensource.wdc.com"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LNjpB047Kz9s2R\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Jun 2022 10:33:37 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1347032AbiFPAdf (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Wed, 15 Jun 2022 20:33:35 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:40836 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S1347575AbiFPAd3 (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Wed, 15 Jun 2022 20:33:29 -0400","from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C90A10547\n        for <linux-ide@vger.kernel.org>; Wed, 15 Jun 2022 17:33:27 -0700 (PDT)","from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com)\n ([199.255.45.15])\n  by ob1.hgst.iphmx.com with ESMTP; 16 Jun 2022 08:33:26 +0800","from uls-op-cesaip01.wdc.com ([10.248.3.36])\n  by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 15 Jun 2022 16:51:49 -0700","from usg-ed-osssrv.wdc.com ([10.3.10.180])\n  by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 15 Jun 2022 17:33:27 -0700","from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4LNjny1HzJz1SVp3\n        for <linux-ide@vger.kernel.org>; Wed, 15 Jun 2022 17:33:26 -0700 (PDT)","from usg-ed-osssrv.wdc.com ([127.0.0.1])\n        by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n (amavisd-new, port 10026)\n        with ESMTP id tQm6Kf26QwER for <linux-ide@vger.kernel.org>;\n        Wed, 15 Jun 2022 17:33:25 -0700 (PDT)","from [10.89.84.185] (c02drav6md6t.dhcp.fujisawa.hgst.com\n [10.89.84.185])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4LNjnv4BqNz1Rvlc;\n        Wed, 15 Jun 2022 17:33:23 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=simple/simple;\n  d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com;\n  t=1655339607; x=1686875607;\n  h=message-id:date:mime-version:subject:to:cc:references:\n   from:in-reply-to:content-transfer-encoding;\n  bh=MBRiA3OhDc8T/PLUdbazDe1hOAsO2DxX0LERaRgF55U=;\n  b=VcGosERU8093PYmYmaDclEbfSrRZqEA2TcywScn89x0tfW192GyaKqv9\n   wedg0tCNggCam7LRZmcqbXk/6OANmAANAPJ+wKYjsGAXpbKNkUwfXW8vp\n   SmVttBbKeqpAGTSR+DIX3luqkFALWHa/UhfPe8uElYqIE1v+ThOvFHW6f\n   LPQ9TDccmku7tTBFeC7LkKzif0+lJRlmIHSIfKeJrYHxhvH/zPy4Dc/pG\n   mSz7GXAhNXwN/drQdcWBhNyRBE6+dPZr98EWGVvlrK0umxPqnwpEuHiPl\n   VglGE1XKhBuhty/SSZC9X5AfCVpZvNfmvC3Q+T/CcgLjzw27cazxJ9WJU\n   g==;","v=1; a=rsa-sha256; c=relaxed/simple; d=\n        opensource.wdc.com; h=content-transfer-encoding:content-type\n        :in-reply-to:organization:from:references:to:content-language\n        :subject:user-agent:mime-version:date:message-id; s=dkim; t=\n        1655339605; x=1657931606; bh=MBRiA3OhDc8T/PLUdbazDe1hOAsO2DxX0LE\n        RaRgF55U=; b=NQ4xGNcQzg1Zyef+8rgqEIjYNd8niORzlDHXxrfykwqLeJ6C9SH\n        kR/EIsOZCp0/vFPaby6+AkXO2nrb1Lt2Erk1IdVAHN2nsR5m0iNV7YbyCAlzk1tB\n        cijbbxoH+HHjFtjqk/SF1ndzYzDIT0bpmzvoFWeZ3075/injaYqwUVnHLfdiJMY+\n        qgP9fSaj4Yn6xMy+fmSe3F/zLalPsIBqlgucVxY728XynQg99Vf69JZXI+LIQ5EN\n        gNzl/0f+TZj2nqReCr7mmbHMSGZyi6OB8eJfb0EONr+uLXBjloM6ORkQATO4OCTf\n        EWsRGHC6spuSCTMORLwlwL7ZSAbYYWHaWrA=="],"X-IronPort-AV":"E=Sophos;i=\"5.91,302,1647273600\";\n   d=\"scan'208\";a=\"307573862\"","IronPort-SDR":["\n gDHxGwwVTcl4K3w0im7QsdCQg22WmyPEx78SCQWPx1dJWxv9XnEDhxZbn1eOvShOuCHqNp28vx\n 1QSs4Jy3pA/b7PnEHUQdP/AVgznUSxZDIGoMRr74h7hJhfCsdh8gHocDlxlYOZa0PdQH3Iicg4\n E71vxNTbAgBD+KEOiZMn77BeKnoJctBzCzUVxjM6lWiubyNUd2edE/cl3K0O8M7LIDvaBxC+Ay\n EL3jolFdh9ZtHjtTTDGdoKd7a9160DPHBlHZGOeasz/v7wPwVghv7sTadrdjlkBDNxXeuMD+HY\n T6xeVF2Qfc22sWMBceeLrR8w","\n 0k8UyaLdIpI3OBnxfHzbiPTV9rvT8hJ36rbL+P1Dj6WTdLlunyuCfBxVXP70Gv9AYGcOaqbfDs\n diZGFt0hO5s1n2eKV2MaCnv+r8mDQsiY52lJggVvnhOxL5AzyAjCgxAipiqyfg0odMAhHujFI8\n +bU+2KszT7sTxqmahevAJSqkLdj+MfDimFHhhzEEVuJKIjMNlAV2OPf27OIcMOMPCaOKuKKmGI\n RlOYUjkuOCn+kxTm3/Mspc6D5wuelGwjEChpwZvuzu0bQkGds1QqAQRtVDtISDrH2o6uMt9xpY\n hP4="],"WDCIronportException":"Internal","X-Virus-Scanned":"amavisd-new at usg-ed-osssrv.wdc.com","Message-ID":"<5f1edbd8-018a-bcd0-10f2-94767f341b45@opensource.wdc.com>","Date":"Thu, 16 Jun 2022 09:33:22 +0900","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)\n Gecko/20100101 Thunderbird/91.10.0","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Content-Language":"en-US","To":"Serge Semin <fancer.lancer@gmail.com>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <52c9ca79-769f-4426-db94-7aad05a68258@opensource.wdc.com>\n <20220615214802.ke6owp5cuv5l77hu@mobilestation>","From":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Organization":"Western Digital Research","In-Reply-To":"<20220615214802.ke6owp5cuv5l77hu@mobilestation>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,\n        SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham\n        autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2915227,"web_url":"http://patchwork.ozlabs.org/comment/2915227/","msgid":"<20220617203419.ksoald7am3677csh@mobilestation>","list_archive_url":null,"date":"2022-06-17T20:34:19","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":70038,"url":"http://patchwork.ozlabs.org/api/people/70038/","name":"Serge Semin","email":"fancer.lancer@gmail.com"},"content":"On Thu, Jun 16, 2022 at 09:33:22AM +0900, Damien Le Moal wrote:\n> On 2022/06/16 6:48, Serge Semin wrote:\n> [...]\n> >> MODULE_LICENSE(\"GPL v2\");\n> >>\n> >> To match the file header SPDX.\n> > \n> > No. Please see the commit bf7fbeeae6db (\"module: Cure the\n> > MODULE_LICENSE \"GPL\" vs. \"GPL v2\" bogosity\") and what checkpatch.pl\n> > says should the \"GPL v2\" string is used in the module license block.\n> > More info regarding this macro and the possible license values are\n> > described here:\n> > Documentation/process/license-rules.rst\n> \n\n> ah ! OK. I was not 100% sure. Doing a quick grep, there is still a lot of (half\n> ?) of \"GPL v2\" vs \"GPL\".\n> \n> Ignore this then.\n\nOk.\n\n-Sergey\n\n> \n> > \n> > -Sergey\n> > \n> >>\n> >>> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c\n> >>> index 9b56490ecbc3..8f5572a9f8f1 100644\n> >>> --- a/drivers/ata/ahci_platform.c\n> >>> +++ b/drivers/ata/ahci_platform.c\n> >>> @@ -80,9 +80,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend,\n> >>>  static const struct of_device_id ahci_of_match[] = {\n> >>>  \t{ .compatible = \"generic-ahci\", },\n> >>>  \t/* Keep the following compatibles for device tree compatibility */\n> >>> -\t{ .compatible = \"snps,spear-ahci\", },\n> >>>  \t{ .compatible = \"ibm,476gtr-ahci\", },\n> >>> -\t{ .compatible = \"snps,dwc-ahci\", },\n> >>>  \t{ .compatible = \"hisilicon,hisi-ahci\", },\n> >>>  \t{ .compatible = \"cavium,octeon-7130-ahci\", },\n> >>>  \t{ /* sentinel */ }\n> >>\n> >>\n> >> -- \n> >> Damien Le Moal\n> >> Western Digital Research\n> > \n> \n> \n> -- \n> Damien Le Moal\n> Western Digital Research","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=lw8A+ey8;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LPrSX2dQTz9sG0\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Jun 2022 06:37:16 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1382433AbiFQUhN (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Fri, 17 Jun 2022 16:37:13 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:37846 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S1382325AbiFQUfj (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Fri, 17 Jun 2022 16:35:39 -0400","from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com\n [IPv6:2a00:1450:4864:20::12a])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7756C5E762;\n        Fri, 17 Jun 2022 13:34:23 -0700 (PDT)","by mail-lf1-x12a.google.com with SMTP id be31so8522091lfb.10;\n        Fri, 17 Jun 2022 13:34:23 -0700 (PDT)","from mobilestation ([95.79.189.214])\n        by smtp.gmail.com with ESMTPSA id\n h13-20020a19ca4d000000b0047dbff43a7dsm752862lfj.63.2022.06.17.13.34.20\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 17 Jun 2022 13:34:21 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20210112;\n        h=date:from:to:cc:subject:message-id:references:mime-version\n         :content-disposition:in-reply-to;\n        bh=vDd9GRNgXOH4DRh4h4tsEZAUpzvs2GX7UG6ZUxEQU3I=;\n        b=lw8A+ey8OiVQ6R8WpbnJEVWi2qreXkw2WJNoZmz9mrILvv42LKWsMb7XfHPbGF9t1c\n         aM3PNDZyWMQ+O8On7hKVB/FWNICsdCCPH4Zf4mAHaJqOffK+iNJ0VgzuF1jJXmj3r7Ke\n         jJXjuuzdSQVZNLzKeFUOyGNy3PDHO5R1syZRs9a9w2GdCzeOgPgpAWtlYuFH+6oTa7ef\n         D8xWauC9rIl61rReFFi6yEwtRugJqqVjZLvIFJVWv2fsnetilEVMP5xbMV86q1V9fRPM\n         uFDK3guhTxy4EoRrhTafWPxebRAakvV0pz7ueL707ewiFUPZdhwL/T+90Y+mKMdyaKoU\n         /aaA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=x-gm-message-state:date:from:to:cc:subject:message-id:references\n         :mime-version:content-disposition:in-reply-to;\n        bh=vDd9GRNgXOH4DRh4h4tsEZAUpzvs2GX7UG6ZUxEQU3I=;\n        b=ODFRSKQlvN4wEYtOWveA8BqECciRqUzynFWmNt/LsNjMXK+TS8vuHL3lSWEpkKIcKA\n         BrQe5Hbnm0J0iWnnLHNlRLRLWw0uFvsxMTvQKcpTr2MBVzvtMNplRFUdg5g2Y+lPfmKZ\n         VQNhQiCiINKaSdr/PesRi8Rean457qGOaBTWZ8fBY6kS++3QTQEQwNMwmSqSND2uo05x\n         KHpGAbcnlZp1CRZ/AKVC99yLvMaA60BfYipZR+uXZcICRFC84pJL4S10XsAfYDYZn7DV\n         izmwFE2PztTR05+sJFnFegxojA/J69R0NNew4c0uG8/QqsXzlJQPQPJwvQI32699BqsK\n         qzRg==","X-Gm-Message-State":"AJIora/G3kuPTgGymbhIdWoPGGdkqCcxoZElqsrRTgkriktE4U9VC6wt\n        TAKHO/r8Vg4F+lMQ7EpVeu89dzB6CCYpzhJz","X-Google-Smtp-Source":"\n AGRyM1tQRBiE4Z/onR34yRi4gEu5sqX+Q3/+fniA0+YaHZH6w7FIKnCTx20qlAJqho6h+DruXtFlSw==","X-Received":"by 2002:ac2:4e10:0:b0:479:2160:623e with SMTP id\n e16-20020ac24e10000000b004792160623emr6457849lfr.602.1655498061849;\n        Fri, 17 Jun 2022 13:34:21 -0700 (PDT)","Date":"Fri, 17 Jun 2022 23:34:19 +0300","From":"Serge Semin <fancer.lancer@gmail.com>","To":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Cc":"Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Message-ID":"<20220617203419.ksoald7am3677csh@mobilestation>","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <52c9ca79-769f-4426-db94-7aad05a68258@opensource.wdc.com>\n <20220615214802.ke6owp5cuv5l77hu@mobilestation>\n <5f1edbd8-018a-bcd0-10f2-94767f341b45@opensource.wdc.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<5f1edbd8-018a-bcd0-10f2-94767f341b45@opensource.wdc.com>","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n        RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2915231,"web_url":"http://patchwork.ozlabs.org/comment/2915231/","msgid":"<20220617203649.wa2b3etx6gpm3s5g@mobilestation>","list_archive_url":null,"date":"2022-06-17T20:36:49","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":70038,"url":"http://patchwork.ozlabs.org/api/people/70038/","name":"Serge Semin","email":"fancer.lancer@gmail.com"},"content":"On Thu, Jun 16, 2022 at 09:31:30AM +0900, Damien Le Moal wrote:\n> On 2022/06/16 6:30, Serge Semin wrote:\n> > On Fri, Jun 10, 2022 at 04:34:13PM -0700, Randy Dunlap wrote:\n> >> Hi Serge,\n> >>\n> >> On 6/10/22 14:58, Serge Semin wrote:\n> >>> On Fri, Jun 10, 2022 at 09:34:46AM -0700, Randy Dunlap wrote:\n> >>>> Hi--\n> >>>\n> >>> Hi Randy\n> >>>\n> >>>>\n> >>>> On 6/10/22 01:17, Serge Semin wrote:\n> >>>>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n> >>>>> index bb45a9c00514..95e0e022b5bb 100644\n> >>>>> --- a/drivers/ata/Kconfig\n> >>>>> +++ b/drivers/ata/Kconfig\n> >>>>> @@ -176,6 +176,16 @@ config AHCI_DM816\n> >>>>>  \n> >>>>>  \t  If unsure, say N.\n> >>>>>  \n> >>>>> +config AHCI_DWC\n> >>>>> +\ttristate \"Synopsys DWC AHCI SATA support\"\n> >>>>> +\tselect SATA_HOST\n> >>>>> +\tdefault SATA_AHCI_PLATFORM\n> >>>>\n> >>>\n> >>>> I don't think this needs to default to SATA_AHCI_PLATFORM.\n> >>>> It might build a driver that isn't needed.\n> >>>> And it's incompatible with \"If unsure, say N.\"\n> >>>\n> >>> Basically you are right, but this particular setting is connected with\n> >>> the modification I've done in the drivers/ata/ahci_platform.c driver\n> >>> in the framework of this commit. I've moved the \"snps,spear-ahci\" and\n> >>> \"snps,dwc-ahci\" compatible devices support to the new driver. Thus\n> >>> should I omit the SATA_AHCI_PLATFORM dependency their default kernel\n> >>> configs will lack the corresponding controllers support. If it's not a\n> >>> problem and we can rely on the kernel build system ability to ask\n> >>> whether the new config needs to be set/cleared, then I would be very\n> >>> happy to drop the default setting. What do you think?\n> >>\n> > \n> >> I'd prefer to try it like that.\n> >> If it becomes a problem, we can go back to this v4 patch.\n> > \n> > Agreed then (seeing Damien is silent about your comment).\n> \n\n> I have not thought about it :)\n> I do not use SATA PLATFORM at all, so I am not familiar with its dependencies.\n> Will have a look and do my usual build tests anyway.\n\nOk. I'll be waiting for you reply in this regard the before\nre-submitting the next series version.\n\n-Sergey\n\n> \n> > \n> > -Sergey\n> > \n> >>\n> >>>>> +\thelp\n> >>>>> +\t  This option enables support for the Synopsys DWC AHCI SATA\n> >>>>> +\t  controller implementation.\n> >>>>> +\n> >>>>> +\t  If unsure, say N.\n> >>>>\n> >>>> -- \n> >>>> ~Randy\n> >>\n> >> Thanks.\n> >> -- \n> >> ~Randy\n> \n> \n> -- \n> Damien Le Moal\n> Western Digital Research","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=cPydoDo5;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LPrWw22ZBz9sG2\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Jun 2022 06:40:12 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S1383408AbiFQUkK (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Fri, 17 Jun 2022 16:40:10 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:45634 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S1350359AbiFQUjz (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Fri, 17 Jun 2022 16:39:55 -0400","from mail-lf1-x133.google.com (mail-lf1-x133.google.com\n [IPv6:2a00:1450:4864:20::133])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D40CD6B029;\n        Fri, 17 Jun 2022 13:36:57 -0700 (PDT)","by mail-lf1-x133.google.com with SMTP id be31so8529870lfb.10;\n        Fri, 17 Jun 2022 13:36:57 -0700 (PDT)","from mobilestation ([95.79.189.214])\n        by smtp.gmail.com with ESMTPSA id\n o1-20020a2e7301000000b00253bd515f88sm627825ljc.68.2022.06.17.13.36.50\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 17 Jun 2022 13:36:51 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20210112;\n        h=date:from:to:cc:subject:message-id:references:mime-version\n         :content-disposition:in-reply-to;\n        bh=oISNlUz9ZficuYsPA/Qge/7xO0eNE7k8Vy/EmxWpRmI=;\n        b=cPydoDo5WZvGMR5+LSnh4cU2jc/hWCi4BCd0UK//fM7ymk/dflR8sjrxE89dsaE2I0\n         TUsmJdTNRYD0rsLiY3DJH1VXacZGP5SqrlYNQXxOCAHCgCyCEr/0nSo1SroaNxcbalMV\n         z+JXmlYqa4ApElo1U8JMmSrXirGuKiNO9tVeXwwfP1iU+Y8aRZUMYZkI+NY4gslnwFuQ\n         XS/WL9qaHffT6+f2eV2yx1T+F0hm90sG8MIZdmXVpFyBiybpeAXK4CSfRAJRhFAYQoKo\n         P1myqMugwjwhykwPB1+Fi1TsHr+sHSx2AAggonGQG6hPcmN+UwIqHSYDow7sE2qt8Eg0\n         7G+g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20210112;\n        h=x-gm-message-state:date:from:to:cc:subject:message-id:references\n         :mime-version:content-disposition:in-reply-to;\n        bh=oISNlUz9ZficuYsPA/Qge/7xO0eNE7k8Vy/EmxWpRmI=;\n        b=RS/0oDQ1547YbbMTUC1jZmuD7Cp3iwWNX7eVQ6giLt7L3a7pG5edHCRdOo2NShgwAz\n         XS1xlrxeTDo1IZuH5HalwrjoBrkDQs3RhFGC/6vIB6ZNLbWnZaCr3fVJupItSzY8FesH\n         sncVVVWFnUYr7y4IuvlT9xWgce46S8u+jevWzXSt5LXn9FugJsO9Repne7rzdifXbYGp\n         wgcK1W31jqBBeZhDbFvgguz9DN76uKRSP8qV6kqngNHxxgZQZZsG9wQLoIX1U1tGP0TQ\n         +Us3w63In/KvZALz3HZ0LCBytOzh1nq0/cfUG8MKZjv7brXZvoKJfM3gJbh/rJsk8/+o\n         U3MQ==","X-Gm-Message-State":"AJIora919EvZ0ZbojV9/zSo2tS/Jetd8bFTrZcRXNjNlKXsr48T4Ztgb\n        MlLcabjmNwGnW2mUHx5IO4s=","X-Google-Smtp-Source":"\n AGRyM1u3aMO9KEyXbJIiCCbg9Kcfnq5GIbxgvcamCCxYVJoX9MOACf6DU7PZMSrao1T7QShHYxY1NQ==","X-Received":"by 2002:a19:a417:0:b0:479:15ef:4ded with SMTP id\n q23-20020a19a417000000b0047915ef4dedmr6476478lfc.225.1655498211994;\n        Fri, 17 Jun 2022 13:36:51 -0700 (PDT)","Date":"Fri, 17 Jun 2022 23:36:49 +0300","From":"Serge Semin <fancer.lancer@gmail.com>","To":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Cc":"Randy Dunlap <rdunlap@infradead.org>,\n        Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Message-ID":"<20220617203649.wa2b3etx6gpm3s5g@mobilestation>","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>\n <20220610215850.ju76kxjquwef6kd3@mobilestation>\n <73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>\n <20220615213029.3upsmasnnhigqozm@mobilestation>\n <bfaf0208-8416-c159-93f8-8cc31dbc7ef5@opensource.wdc.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<bfaf0208-8416-c159-93f8-8cc31dbc7ef5@opensource.wdc.com>","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n        RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE\n        autolearn=ham autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}},{"id":2915385,"web_url":"http://patchwork.ozlabs.org/comment/2915385/","msgid":"<ae75e0a8-8f02-cdf2-8200-a570c6afa03a@opensource.wdc.com>","list_archive_url":null,"date":"2022-06-18T06:54:30","subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","submitter":{"id":82259,"url":"http://patchwork.ozlabs.org/api/people/82259/","name":"Damien Le Moal","email":"damien.lemoal@opensource.wdc.com"},"content":"On 6/18/22 05:36, Serge Semin wrote:\n> On Thu, Jun 16, 2022 at 09:31:30AM +0900, Damien Le Moal wrote:\n>> On 2022/06/16 6:30, Serge Semin wrote:\n>>> On Fri, Jun 10, 2022 at 04:34:13PM -0700, Randy Dunlap wrote:\n>>>> Hi Serge,\n>>>>\n>>>> On 6/10/22 14:58, Serge Semin wrote:\n>>>>> On Fri, Jun 10, 2022 at 09:34:46AM -0700, Randy Dunlap wrote:\n>>>>>> Hi--\n>>>>>\n>>>>> Hi Randy\n>>>>>\n>>>>>>\n>>>>>> On 6/10/22 01:17, Serge Semin wrote:\n>>>>>>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig\n>>>>>>> index bb45a9c00514..95e0e022b5bb 100644\n>>>>>>> --- a/drivers/ata/Kconfig\n>>>>>>> +++ b/drivers/ata/Kconfig\n>>>>>>> @@ -176,6 +176,16 @@ config AHCI_DM816\n>>>>>>>  \n>>>>>>>  \t  If unsure, say N.\n>>>>>>>  \n>>>>>>> +config AHCI_DWC\n>>>>>>> +\ttristate \"Synopsys DWC AHCI SATA support\"\n>>>>>>> +\tselect SATA_HOST\n>>>>>>> +\tdefault SATA_AHCI_PLATFORM\n>>>>>>\n>>>>>\n>>>>>> I don't think this needs to default to SATA_AHCI_PLATFORM.\n>>>>>> It might build a driver that isn't needed.\n>>>>>> And it's incompatible with \"If unsure, say N.\"\n>>>>>\n>>>>> Basically you are right, but this particular setting is connected with\n>>>>> the modification I've done in the drivers/ata/ahci_platform.c driver\n>>>>> in the framework of this commit. I've moved the \"snps,spear-ahci\" and\n>>>>> \"snps,dwc-ahci\" compatible devices support to the new driver. Thus\n>>>>> should I omit the SATA_AHCI_PLATFORM dependency their default kernel\n>>>>> configs will lack the corresponding controllers support. If it's not a\n>>>>> problem and we can rely on the kernel build system ability to ask\n>>>>> whether the new config needs to be set/cleared, then I would be very\n>>>>> happy to drop the default setting. What do you think?\n>>>>\n>>>\n>>>> I'd prefer to try it like that.\n>>>> If it becomes a problem, we can go back to this v4 patch.\n>>>\n>>> Agreed then (seeing Damien is silent about your comment).\n>>\n> \n>> I have not thought about it :)\n>> I do not use SATA PLATFORM at all, so I am not familiar with its dependencies.\n>> Will have a look and do my usual build tests anyway.\n> \n> Ok. I'll be waiting for you reply in this regard the before\n> re-submitting the next series version.\n\nPlease send a fixed-up new version. I will use that to look at builds and\nconfig dependencies.","headers":{"Return-Path":"<linux-ide-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["bilbo.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256\n header.s=dkim.wdc.com header.b=p6VpgH8y;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=opensource.wdc.com header.i=@opensource.wdc.com\n header.a=rsa-sha256 header.s=dkim header.b=pKJhH2iF;\n\tdkim-atps=neutral","ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2620:137:e000::1:20; helo=out1.vger.email;\n envelope-from=linux-ide-owner@vger.kernel.org; receiver=<UNKNOWN>)","usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass\n        reason=\"pass (just generated, assumed good)\"\n        header.d=opensource.wdc.com"],"Received":["from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 4LQ68w0g6Qz9s75\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Jun 2022 16:54:40 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n        id S233363AbiFRGyh (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n        Sat, 18 Jun 2022 02:54:37 -0400","from lindbergh.monkeyblade.net ([23.128.96.19]:58480 \"EHLO\n        lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n        with ESMTP id S233023AbiFRGyh (ORCPT\n        <rfc822;linux-ide@vger.kernel.org>); Sat, 18 Jun 2022 02:54:37 -0400","from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42])\n        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75C7229C83\n        for <linux-ide@vger.kernel.org>; Fri, 17 Jun 2022 23:54:36 -0700 (PDT)","from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com)\n ([199.255.45.15])\n  by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2022 14:54:35 +0800","from uls-op-cesaip02.wdc.com ([10.248.3.37])\n  by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 17 Jun 2022 23:12:46 -0700","from usg-ed-osssrv.wdc.com ([10.3.10.180])\n  by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256;\n 17 Jun 2022 23:54:36 -0700","from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4LQ68p6Q3dz1SVp2\n        for <linux-ide@vger.kernel.org>; Fri, 17 Jun 2022 23:54:34 -0700 (PDT)","from usg-ed-osssrv.wdc.com ([127.0.0.1])\n        by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1])\n (amavisd-new, port 10026)\n        with ESMTP id gDQIEqVw8WNG for <linux-ide@vger.kernel.org>;\n        Fri, 17 Jun 2022 23:54:34 -0700 (PDT)","from [10.225.163.84] (unknown [10.225.163.84])\n        by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4LQ68l4Cd6z1Rvlc;\n        Fri, 17 Jun 2022 23:54:31 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=simple/simple;\n  d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com;\n  t=1655535276; x=1687071276;\n  h=message-id:date:mime-version:subject:to:cc:references:\n   from:in-reply-to:content-transfer-encoding;\n  bh=+6bmdYR8RDV7Rai4MRodjarsFAmrM8zJ0RVsVV2+CCE=;\n  b=p6VpgH8yZGCagNZw17RzM//lpEMrlAPWpqsa3fvnjPhex+GNZDMvtNe3\n   XDLeE1pGLUznchvjwqt7dOySW2bFrEjLWwOPTqQIDkMZTD/MRClsg7tZZ\n   frQaTvKR1VBL59f5qFHa8vptX2IdN8g7NVXiSL3pUHX+FbnAn7PTix3m8\n   FpP+hE/vGvmlA0/soMDG7JuLmixxwAKj/JI5agbZvZepN0zAKqnAof/wG\n   PQa9gKF4tWAxn7WN7zcUwNbeF4R+rGe0aOk7ILZV7t1m50qX9HnY3zhoC\n   Rl8ruzyb3IsC0SmiQaKD2XN0W5VNRDU/+lDLTbRTjtpF9470/NSSqyAr2\n   A==;","v=1; a=rsa-sha256; c=relaxed/simple; d=\n        opensource.wdc.com; h=content-transfer-encoding:content-type\n        :in-reply-to:organization:from:references:to:content-language\n        :subject:user-agent:mime-version:date:message-id; s=dkim; t=\n        1655535274; x=1658127275; bh=+6bmdYR8RDV7Rai4MRodjarsFAmrM8zJ0RV\n        sVV2+CCE=; b=pKJhH2iF8UOgOTx2Qeafz7q4FMyajYT0Ko/rfBb4hEmxrzfLg+A\n        iM8H0itRWP4bycB0wh1ftrw6HEz9PGn0lNYyHq3wwTWQGOxUupmyIC8WVMgn6FeX\n        qnQhG6sCjH5CdfQlzRekJrDHVsQOHZv0d3ZRcTtzt0APu3Pqm6RCIu3eKcDtw1Zh\n        f7nSjcDpby3oZeL/wB6E495bYzBY2GbxhWgGywYnsy8q6wAEFKHUy5IFERi0PBrN\n        42LBROzTCnn/Mx1kTA+tNy5Ra/BZJJ3rlh2zEEgHU7AsAceNHHwPi2sWDqaLS78r\n        H+6KPVL1SZyNwjoVKufkihTmZaK1XZb7X9g=="],"X-IronPort-AV":"E=Sophos;i=\"5.92,306,1650902400\";\n   d=\"scan'208\";a=\"202203489\"","IronPort-SDR":["\n smYCPOs8ox5gN1qPt2tbYK7Go2A/XNTYLtBH3w1vroYRANLWRVapA2onfqem//KVK7Qzx4plY3\n Fpz467Lx7cNoGL19law6YZl1jk4Wbw6E1HKWxUi/8oj5MLuf4GGl+L+vkDWOocXZutK88I9l8U\n nyKJjvSO720y1NfekzHSK2Il/zjt/wBmljCTUkM3UWXVu6rAwbZsuj0QQTWd304QN+ciiSf884\n NOuxbvt+HMDZkrfOrNpB03YPfq05OJCcX1oTnrcXlnSK2A95TAt+HD5FyIXZsCwTlKSE51PUY5\n iDSdxco7qi1mkrks6ScSQe9Y","\n cwWHGL8zDOYJgSyHL5Gml6wG0HFtGyY+ZgV/FkubnPgiVfRsYyABPs+94JggHQD8P37rdih5SX\n A2jIPmDA5lV3VDyD8inrqp5ELqcQUzlWEbQPrpKye35R4Q8kmDjPlN99P+cJG0Xz0nbKXMVw0Q\n gXz4b0h/ZBE43RnueCoZebxeaHZu6PGK46noCtoEVPRTddLd8SOMXYcbwyCkRb9CHwgq6DQUIj\n eFDvI4bORbECtHnGwigluKeSCKyWdMIZL9myZ7Xb354RxISeghSg6uihAW4bidIurR415nNIGs\n gNg="],"WDCIronportException":"Internal","X-Virus-Scanned":"amavisd-new at usg-ed-osssrv.wdc.com","Message-ID":"<ae75e0a8-8f02-cdf2-8200-a570c6afa03a@opensource.wdc.com>","Date":"Sat, 18 Jun 2022 15:54:30 +0900","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n Thunderbird/91.10.0","Subject":"Re: [PATCH v4 19/23] ata: ahci: Add DWC AHCI SATA controller support","Content-Language":"en-US","To":"Serge Semin <fancer.lancer@gmail.com>","Cc":"Randy Dunlap <rdunlap@infradead.org>,\n        Serge Semin <Sergey.Semin@baikalelectronics.ru>,\n        Hans de Goede <hdegoede@redhat.com>,\n        Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,\n        Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,\n        Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,\n        Rob Herring <robh+dt@kernel.org>, linux-ide@vger.kernel.org,\n        linux-kernel@vger.kernel.org, devicetree@vger.kernel.org","References":"<20220610081801.11854-1-Sergey.Semin@baikalelectronics.ru>\n <20220610081801.11854-20-Sergey.Semin@baikalelectronics.ru>\n <6c02f8ef-8aea-8f80-590d-343f67a96f8d@infradead.org>\n <20220610215850.ju76kxjquwef6kd3@mobilestation>\n <73716f9f-892c-41c5-89f0-64a1985438aa@infradead.org>\n <20220615213029.3upsmasnnhigqozm@mobilestation>\n <bfaf0208-8416-c159-93f8-8cc31dbc7ef5@opensource.wdc.com>\n <20220617203649.wa2b3etx6gpm3s5g@mobilestation>","From":"Damien Le Moal <damien.lemoal@opensource.wdc.com>","Organization":"Western Digital Research","In-Reply-To":"<20220617203649.wa2b3etx6gpm3s5g@mobilestation>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n        DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,\n        SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable\n        autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n        lindbergh.monkeyblade.net","Precedence":"bulk","List-ID":"<linux-ide.vger.kernel.org>","X-Mailing-List":"linux-ide@vger.kernel.org"}}]