Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2482171pxb; Mon, 18 Apr 2022 00:49:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKnZR3QBWQT1hvEi9cSrqf2uqQJu2wONH06TOCSQtPg3MjlmN40vEh+wkrgVLbZ5xPjU4W X-Received: by 2002:a17:90a:510e:b0:1cb:b1de:27a0 with SMTP id t14-20020a17090a510e00b001cbb1de27a0mr17144617pjh.196.1650268178427; Mon, 18 Apr 2022 00:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650268178; cv=none; d=google.com; s=arc-20160816; b=uDwlP03AUOwYjOrQTNGXUhv5UiU2N5Cp60XLKSFxmmlEHwullcGzVfnOWsPggYmKZy luI6m7vbnpxq6BUXJz/Bt+PhIWORgKcpLzHO893333DIM2lXj3WN6pk7HtWL9YTM6Cu0 vRb533ov1yMzBMXcYa3Jh+szl6pEn+lqwmATCORPQJXV3pjn2fkns518AAhM5iaI871n KMo3QO+WLDdQKhO0QNCFqxTeoJNaVmEfU8AbwQz4LL3oW65EG3mbKI081v+/mC4GD90+ fDFdoPjhP5dgCFbsBPuVQNfsybFMumgHG1Z5gw1OiRbdBrLBVv4hzwdY3+F5z1GiuKLo moqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=jyl4Tl+sfhEhRMA8IoHr8cDVwCBF5u/itaLHnKYGMq4=; b=azK2oC/ddWI+Btkab+XksRtEvoTgKetgBcBhqTsxcINytjKNUxvuTXCNglsc0tVKkI Fm5JdNrGRLmOGBc4eMJIKV3K2BlJMjpbAondeAm9cEWUPZzvr+kfF+f9PTo+mdKxLPQz 2IFWmThgWWUD1mN+BcNh51r/YiSn0BcXqmYdadwuMF07IhWYT2Wee1Ru8vI8qLXew5YZ ZzLI6RlxO66vJEk5QG6L6jfl1pkkOO3vvYkVEguTV9oRMAkwMynBi2tGEnMqdg/0uErn 8+CB+HJCisMLc4bc+2EdpEWUkPvz+Q8K1W/nFec+I56i0iLWY1oWcPe54UrPYQCnt/OL FKZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k15-20020a637b4f000000b003816043f05fsi8837888pgn.596.2022.04.18.00.49.24; Mon, 18 Apr 2022 00:49:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236084AbiDRDmx (ORCPT + 99 others); Sun, 17 Apr 2022 23:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiDRDmw (ORCPT ); Sun, 17 Apr 2022 23:42:52 -0400 Received: from mail-sz.amlogic.com (mail-sz.amlogic.com [211.162.65.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B4CAE72; Sun, 17 Apr 2022 20:40:13 -0700 (PDT) Received: from [10.28.39.106] (10.28.39.106) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 18 Apr 2022 11:40:10 +0800 Message-ID: Date: Mon, 18 Apr 2022 11:40:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v4 1/2] mtd: rawnand: meson: discard the common MMC sub clock framework Content-Language: en-US From: Liang Yang To: Miquel Raynal CC: , Rob Herring , Richard Weinberger , Vignesh Raghavendra , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Jianxin Pan , Victor Wan , XianWei Zhao , Kelvin Zhang , BiChao Zheng , YongHui Yu , , , , References: <20220402074921.13316-1-liang.yang@amlogic.com> <20220402074921.13316-2-liang.yang@amlogic.com> <20220404103034.48ec16b1@xps13> <50105d6b-8ced-1b72-30cb-a709c4a4dd26@amlogic.com> In-Reply-To: <50105d6b-8ced-1b72-30cb-a709c4a4dd26@amlogic.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.28.39.106] X-ClientProxiedBy: mail-sz.amlogic.com (10.28.11.5) To mail-sz.amlogic.com (10.28.11.5) X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, i have some confusion when i prepare the patches. for DT compatibility, it falls back to the old DT when failed to get resource by the new DT, but there is some points: a. old DT depends on MMC sub clock driver, but it never be merged, so it can't work. b. if it falls back to the old DT, beside the regmap lookup below, it seems that we have to preserve the code of the old clock setting in nfc_clk_init(). do we still need to avoid break DT compatibility? Thanks. On 2022/4/11 10:40, Liang Yang wrote: >>>       nfc->dev = dev; >>> -    res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >>> -    nfc->reg_base = devm_ioremap_resource(dev, res); >>> +    nfc->reg_base = devm_platform_ioremap_resource_byname(pdev, "nfc"); >> >> This change seems unrelated. > > To be consistent with the following > devm_platform_ioremap_resource_byname(pdev, "emmc"). do you mean that we > don't need it?> >>>       if (IS_ERR(nfc->reg_base)) >>>           return PTR_ERR(nfc->reg_base); >>> -    nfc->reg_clk = >>> -        syscon_regmap_lookup_by_phandle(dev->of_node, >>> -                        "amlogic,mmc-syscon"); >>> -    if (IS_ERR(nfc->reg_clk)) { >>> -        dev_err(dev, "Failed to lookup clock base\n"); >>> -        return PTR_ERR(nfc->reg_clk); >>> -    } >>> +    nfc->sd_emmc_clock = devm_platform_ioremap_resource_byname(pdev, >>> "emmc"); >>> +    if (IS_ERR(nfc->sd_emmc_clock)) >>> +        return PTR_ERR(nfc->sd_emmc_clock); >> >> While I agree this is much better than the previous solution, we cannot >> break DT compatibility, so you need to try getting the emmc clock, but >> if it fails you should fallback to the regmap lookup. > > ok, i will fix it next version. thanks. > >> >>>       irq = platform_get_irq(pdev, 0);