Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp529599imm; Fri, 22 Jun 2018 00:29:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK5rDGwnHZu2aAb4eFw0LD7hvc6kyZR+BcrS3c6xHzZ2El6FldxKbXi8ZgkM4iGy+GWmxOK X-Received: by 2002:a65:4d85:: with SMTP id p5-v6mr384405pgq.249.1529652581103; Fri, 22 Jun 2018 00:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529652581; cv=none; d=google.com; s=arc-20160816; b=1AN8BXWZSM/lSjpq/AmZwATe8bpCvAx6zV2EGQXk2hKrWKj5Qrav26apgaDfG9gy8S DVq2eeQLWPiOkkS3+U5vVliPb4znrzLw7mHLt8pqG2tn/ZfhGhiCtxiE35XQXdgWn+jC aSn4/5rfYySQPAhN82N0xgwMCHJ3JdpeO4T3uXVINujvF63WySSPE2wVZ5s8xI33EdPV Rjyt/RpTFo9lT26AKiWSXrPncgzUAzuGLGV7j2zeKuc4nBk2Xg7H9KvyqJsii8W226UL EDWzI/vy+eja3D2732J0/6kmm3OLd61zFy5mNtxUMfwyfHFck9rw1GxNwDN0E+W27XU1 O92Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=a7A1KlZUP3zzT8jg53wMcsKRFxv8d0hLEBVfSqO0xtk=; b=B3dRRnyfBI0XYUZtu2w0hyi8vnRdeecT3D5LD0VHOrvAkK67pVmrfOHmjqEfdlheqz X21cO9EhCfWNOQQvzTzcfXnvO2gTBEk0mz9YoGhnsxGMEyM1Zw+GYsaTmWygu5pIdmyh 9WEhMVcuvk7FhhS7qmM8eq5IMc00biNrXJY1FIAumQ3ZYFhSa36UFQOzOZtoTCrralpr cHC4oNtC2kwPxCWjeZ82kGN9wclKIUQCbVsH0JR7i7Tcm+4E+EDEtXAU9j5Y16r/4otl evAsUXFMaoJvoMZQV6Ogn9GNR8yZrErIdRZTSSUBnJ4cJKDhM6+NQoejBU9F27PVEHzS p8xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f131-v6si5022091pfc.282.2018.06.22.00.29.26; Fri, 22 Jun 2018 00:29:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751300AbeFVH2n convert rfc822-to-8bit (ORCPT + 99 others); Fri, 22 Jun 2018 03:28:43 -0400 Received: from gloria.sntech.de ([95.129.55.99]:38570 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbeFVH2m (ORCPT ); Fri, 22 Jun 2018 03:28:42 -0400 Received: from p57b77a9d.dip0.t-ipconnect.de ([87.183.122.157] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fWGUj-0008FK-Ez; Fri, 22 Jun 2018 09:28:33 +0200 From: Heiko Stuebner To: David Wu Cc: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com, huangtao@rock-chips.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: ethernet: stmmac: dwmac-rk: Add GMAC support for PX30 Date: Fri, 22 Jun 2018 09:28:32 +0200 Message-ID: <19622369.ojvgxrHm8t@phil> In-Reply-To: <7173b45f-17d3-2356-fede-28bdd5c658f2@rock-chips.com> References: <1528956927-32440-1-git-send-email-david.wu@rock-chips.com> <2582999.2hZx6CH9S6@diego> <7173b45f-17d3-2356-fede-28bdd5c658f2@rock-chips.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, Am Freitag, 22. Juni 2018, 09:22:35 CEST schrieb David Wu: > 在 2018年06月14日 16:30, Heiko Stübner 写道: > > And someone could convert the driver to use the new clk-bulk APIs [0], > > so the large number of clk_prepare_enable calls would be a bit > > trimmed down. > > Some clocks need special treatment at special cases, may not know which > index is we need at clk_bulk_data struct. > 1. At rmii mode, need to use mac_ref, mac_refout; but at rgmii, they are > not needed. > 2. At rgmii mode, rx is coming in from external source, there is no > gate, and it is coming from mac_ref_clk at rmii mode, there is gate. > 3. clk_mac needs to be configured rate 50M or 125M. > 4. mac_clk_speed needs to be configured at PX30 Soc and next Socs. > > It looks like use the clk-bulk, will not be more flexible, and we still > keep the present. What do you think? yeah, you're probably right. I just saw all these clk_prepare_enable calls and didn't think enough about the config side ;-) . Heiko