Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1507582imm; Wed, 1 Aug 2018 17:54:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc2uiu4Fr9Q03wj3fLE4swYh1mfp+ICbYbZnmxEjGCWAHrLcGu5fjgDSAqa5WRL5x1NNAfc X-Received: by 2002:a62:8b0f:: with SMTP id j15-v6mr621008pfe.33.1533171284413; Wed, 01 Aug 2018 17:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533171284; cv=none; d=google.com; s=arc-20160816; b=o6KMdQDiTikYlWL7Kf/EJ9ot4IK3j80C9Q2XpJ5ycmayLbXaS4KTPz2MzwDjOZMY3v 045akyueDubSffsHUYBFrt/my7PF5nvh1VGnF/vMPRuUBrWL+DPWXQ/2JMSRvSyUnnMN aczTcbzAGjb94tgBYrWrskOu67ptkrwabUadO5NwYPnlKTAgQb5sbdNycJgQCLw7Mp3r StW30XqhwWH+hBTPkWYo4YqEzYZl8aWvfZtR5QL+S32E3+1Ev/feJ9LA/8RhMf94DiVz wpFhA4VS8L7BBvywhOEC/QLlwtVWDfH85gr3F5Mro/7HCT9+b47IY9+q9DODw27399Ym Cu/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=EaMsRMnPbdN9XzgYzXY6VXWamivpWZRby7r92p5UiuU=; b=Q2qKl8bsRsE6SL55gHwkkoGWPP8gWWY4TYCRsrKy271Eff7SX26wLtQilmwTw+7ttk 1+VqQwnDVtF1x74aOwqF1FNNhR12KvYf1e3OaxNBbgvENRlcXDK+OkLyz73OCiJlIsI/ f74b53T7le1gCN2EtOUSdJhzpyKEXI1SQGy7xQqzB5BjsdAWvIVh96iousuy10TRLPIa zM83lYX3PVT5sEhhfy9zYCwcF3gCRs9V9jUTi87MlrH5SFJK/QQ3xy7V/BQV745CX+cl fdNKvk1njDr+WNByj2yVs0XioPLbFNjc1vB2J9+q6Zi/O7ABia8Ud5wYodmfRGXPYRqb Pv3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=ab07OqSN; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba6-v6si239596plb.364.2018.08.01.17.54.29; Wed, 01 Aug 2018 17:54:44 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=ab07OqSN; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732116AbeHBCmI (ORCPT + 99 others); Wed, 1 Aug 2018 22:42:08 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:37158 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730431AbeHBCmH (ORCPT ); Wed, 1 Aug 2018 22:42:07 -0400 Received: by mail-qt0-f194.google.com with SMTP id n6-v6so550724qtl.4 for ; Wed, 01 Aug 2018 17:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=EaMsRMnPbdN9XzgYzXY6VXWamivpWZRby7r92p5UiuU=; b=ab07OqSN006xvtkPRBGIMAAgoelraGLnEJnnHEmXm7aLn1CnA6uTepY9ihKe1UAYe6 1bvYBYzHuSpansOz4t/wcPv/2la+/aVdUZxyQU9qEReogCviGhyC+fdyAsPxoto1Wrgg N2sufjzts08JzNdhn4S7671fIeVgkkQnyf220= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EaMsRMnPbdN9XzgYzXY6VXWamivpWZRby7r92p5UiuU=; b=CDbKsAcpXEr+FX7JfJ586LniaFFbyzfeB33iq3+kLSP1hwGyA05qc2cPVCSG3ypl2U VUVN/bNUqaoxI5KEGhHkgNIPa4htngSEYSkvmRVSS2gbWjYSNDRxwRHmtjYHh37VOyht 76VRBCULiFrdRScMcaggPWLCinz2Wn44GqN8M20nfBCUkzoVe5FXLltSw7jcySmmZ1XH w8962mDH1/ngoCnqh/jdjmBfPkX0bjSeKiR0zsbo0ngDgVD6U33kH3ytmBuG4caMhJ7a fzH2ubG6jVdj35IfA3q3YraY6kwZnd7W7nRxF9ejZUoE7TSvhyFkZHcpMeVoEBB99xCk WY2w== X-Gm-Message-State: AOUpUlHKp5Xe7gO7LlVF0Yt9Ng/Q40N9fvrDe5SeloK8SxzcXS3RPfcq AwOyJu3xDFQrGl92XDNyih5inQ== X-Received: by 2002:ac8:35c8:: with SMTP id l8-v6mr601444qtb.409.1533171217469; Wed, 01 Aug 2018 17:53:37 -0700 (PDT) Received: from lbrmn-lnxub86.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id e81-v6sm325116qka.3.2018.08.01.17.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Aug 2018 17:53:36 -0700 (PDT) From: Arun Parameswaran To: "David S. Miller" , Florian Fainelli , Andrew Lunn , Rob Herring , Mark Rutland , Ray Jui , Scott Branden , Catalin Marinas , Will Deacon Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Arun Parameswaran Subject: [PATCH v4 0/8] Add clock config and pm support to bcm iProc mdio mux Date: Wed, 1 Aug 2018 17:53:45 -0700 Message-Id: <1533171233-14557-1-git-send-email-arun.parameswaran@broadcom.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, The patchset is based on David Miller's "net-next" repo. The patchset extends the Broadcom iProc mdio mux to add support for suspend/resume and the ability to configure the internal clock divider. The patchset also sets the scan control register to disable external master access. The base address of the mdio-mux-bcm-iproc is modified to point to the start of the mdio block's address space, to be able to access all the mdio's registers. The missing registers are required to configure the internal clock divider registers in some of the Broadcom SoC's. Changes from v3: - Removed 'platform_set_drvdata(pdev, NULL)' call (in patch 5/8) - Fixed the return code handling for the devm_clk_get() call (in patch 7/8) - Added Reviewed-by tag to Patch 8/8 Changes from v2: - Addressed Andrew's comments: - Moved to using devm_mdiobus_alloc. Added this as a separate patch. - Changed to reverse christmas tree order for variable declaration in the clock patch - Addressed Florian's comments: - Removed null checks for the clock before calling unprepare in both clock and pm patches. - Added check for EPROBE_DEFER when fetching the clock in the clock patch. - The patch to use the devm API has been added before the clock & pm patches. This patch is now patch '5' in the series. - Added reviewed-by tags to commit messages of patches which remain unmodified from v2. - Modified PM patch to use platform_get_drvdata() in suspend/resume API's, similar to the recent fix that went in for the remove() api. Changes from v1: - Addressed Andrew's comments. - Reworked the patches to be based on 'net-next' - Removed 'fixes' from the commit messages, the changes are related to the new features being added. - Maintained backward compatibility to older dt-blob's specifying base addresse with an offset. The correction is applied in the driver and a message is printed to update the dt-blob. - Re-worked and re-ordered the last four patches (4-7). - Added setting of the scan control register as a new patch - Added a call to 'clk_prepare_enable()' in the patch that adds the clock config support, removed the debug message when clock is not passed. - Simplified the pm support patch (removed the array used for the save/restore logic). Thanks Arun Parameswaran (8): dt-bindings: net: Fix Broadcom iProc mdio mux driver base address net: phy: Fix the register offsets in Broadcom iProc mdio mux driver arm64: dts: Fix the base address of the Broadcom iProc mdio mux net: phy: Disable external master access in bcm mdio mux driver net: phy: Use devm api for mdio bus allocation in bcm iproc mdio mux dt-bindings: net: Add clock handle to Broadcom iProc mdio mux net: phy: Add support to configure clock in Broadcom iProc mdio mux net: phy: Add pm support to Broadcom iProc mdio mux driver .../bindings/net/brcm,mdio-mux-iproc.txt | 7 +- arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 4 +- .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 4 +- drivers/net/phy/mdio-mux-bcm-iproc.c | 108 ++++++++++++++++++--- 4 files changed, 106 insertions(+), 17 deletions(-) -- 1.9.1