From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Cyrus-Session-Id: sloti22d1t05-2819531-1514763640-2-5364443217294306421 X-Sieve: CMU Sieve 3.0 X-Spam-known-sender: no X-Spam-charsets: subject='UTF-8', plain='UTF-8' X-Resolved-to: linux@kroah.com X-Delivered-to: linux@kroah.com X-Mail-from: linux-kernel-owner@vger.kernel.org ARC-Seal: i=1; a=rsa-sha256; cv=none; d=messagingengine.com; s=arctest; t=1514763640; b=tRtu+/toHUqDYGnsY+0S3nnkv0S7++fO3S4bzh0KFn0ttk0 Nl3GG4WQ49EECWnN5EeOEvAAkf4keaTT6RY5t/p6IRdQ1FPdpMN1JC9FG67BiOMl Sh3Ai2RRUn2vaPC5gTaK0kpFyvGpMI8KzwumLW/mTfWa7z2Y/JEVfRNQbpYknC7l wg1E0RySWjfpA4YOVaih6d49nM1i/tKAEDw4AzEENGZcxwdEF+HxaMHyx3P8KU9v WrbX5rW4LTpiJKgrQPEz66AMKSM63uk3PR8kSKDG9PUxBMe/hoMRrN5f0UE7I3vp facqhuLaiKwsqdeqX9KewawXD80cnnFv9MqMr4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:date:message-id :mime-version:content-type:content-transfer-encoding:sender :list-id; s=arctest; t=1514763640; bh=VCBzaqRF8+/C0p5RnO63wvuA8O K4feSvQ4PQO33Hw+U=; b=hc5TQ8v6YshVqmW8TVFWwaVaVizH8xBLjwgpcX7sR9 rSFNuDgupj4+W1a+H4B/Ro+zSm+3p7ys7b+pHiVbiMTIhe3HZVG6yLJ9rOPmX72m +dHG/01kuKXv33XZiFAzPsCuOaN3r67/pHi51KuoafrIP2ZqlaQnByEvw0tZ1LbR Jf1pGFYSkEz28gJ9otxPI0OCHCUC1cZfvMajt29Cor/IUs9d61Igg2cM4bCllb3n x33MZIBlQhV/SnzwKT2pRMDWJA7xWkuTMw1Q2AEAyRXEiQJrQAAyafTIYipkVXEg C9bdPo77pI23MNIKbxYU2Pz3IacyF5Bkaccu3q92WPOQ== ARC-Authentication-Results: i=1; mx5.messagingengine.com; arc=none (no signatures found); dkim=fail (message has been altered; 2048-bit rsa key sha256) header.d=lechnology.com header.i=@lechnology.com header.b=NR7MpQ82 x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=default; dmarc=none (p=none,has-list-id=yes,d=none) header.from=lechnology.com; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=lechnology.com header.result=pass header_is_org_domain=yes Authentication-Results: mx5.messagingengine.com; arc=none (no signatures found); dkim=fail (message has been altered; 2048-bit rsa key sha256) header.d=lechnology.com header.i=@lechnology.com header.b=NR7MpQ82 x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=default; dmarc=none (p=none,has-list-id=yes,d=none) header.from=lechnology.com; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=lechnology.com header.result=pass header_is_org_domain=yes Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751100AbdLaXk3 (ORCPT ); Sun, 31 Dec 2017 18:40:29 -0500 Received: from vern.gendns.com ([206.190.152.46]:54186 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbdLaXk2 (ORCPT ); Sun, 31 Dec 2017 18:40:28 -0500 From: David Lechner To: linux-arm-kernel@lists.infradead.org Cc: David Lechner , Sekhar Nori , Kevin Hilman , Adam Ford , linux-kernel@vger.kernel.org Subject: =?UTF-8?q?=5BPATCH=20v4=200/7=5D=20ARM=3A=20davinci=3A=20convert=20to=20common=20clock=20framework=E2=80=8B?= Date: Sun, 31 Dec 2017 17:39:41 -0600 Message-Id: <1514763588-31560-1-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX This series converts mach-davinci to use the common clock framework. Basically, this series does some cleanup and rearranging to get things ready for the conversion. Then there is a patch to add new driver in drivers/clk and finally a patch to make the conversion from the mach clock drivers to the new drivers. I have tested this on LEGO MINDSTORMS EV3 (TI AM1808), so I am confident that I haven't broken anything (too badly) in da850. But, I don't have other hardware to test. The one thing that I know I have broken is CPU frequency scaling on da850. I don't think it was working with device tree anyway, so I can't really test it with the hardware I have. I'm hoping that it will be OK to defer fixing it and add device tree support at the same time. Dependencies: * This series applies on top of "ARM: davinici: move watchdog restart from mach to drivers​" [1][2] * On da850, you will also need a patch to prevent problems with the USB PHY clocks [3] * Or get it all at once: git fetch https://github.com/dlech/ev3dev-kernel.git common-clk-v4 [1]: https://patchwork.kernel.org/patch/10105623/ [2]: https://patchwork.kernel.org/patch/10105613/ [3]: https://patchwork.kernel.org/patch/10133193/ v4 changes: * Basically, the whole series is new/reworked except for the first patch. * Instead of having an intermediate conversion of the clocks in mach-davinci, new clock drivers are introduced in drivers/clk. * There are a few more cleanup patches added before making the conversion. v3 changes: * Remove leftovers from rebasing in "ARM: davinci: don't use static clk_lookup" (fixes compile error) v2 changes: * Dropped "ARM: davinci: clean up map_io functions" - will resend as separate patch series * Reworked remaining patches so that there is less shuffling around David Lechner (7): ARM: davinci: move davinci_clk_init() to init_time ARM: davinci: don't use static clk_lookup ARM: davinci: fix duplicate clocks ARM: davinci: remove davinci_set_refclk_rate() clk: Introduce davinci clocks ARM: davinci: convert to common clock framework ARM: davinci_all_defconfig: remove CONFIG_DAVINCI_RESET_CLOCKS arch/arm/Kconfig | 2 +- arch/arm/configs/davinci_all_defconfig | 1 - arch/arm/mach-davinci/Kconfig | 12 - arch/arm/mach-davinci/Makefile | 2 +- arch/arm/mach-davinci/board-da830-evm.c | 17 +- arch/arm/mach-davinci/board-da850-evm.c | 2 +- arch/arm/mach-davinci/board-dm355-evm.c | 2 +- arch/arm/mach-davinci/board-dm355-leopard.c | 2 +- arch/arm/mach-davinci/board-dm365-evm.c | 2 +- arch/arm/mach-davinci/board-dm644x-evm.c | 2 +- arch/arm/mach-davinci/board-dm646x-evm.c | 17 +- arch/arm/mach-davinci/board-mityomapl138.c | 2 +- arch/arm/mach-davinci/board-neuros-osd2.c | 2 +- arch/arm/mach-davinci/board-omapl138-hawk.c | 17 +- arch/arm/mach-davinci/board-sffsdr.c | 2 +- arch/arm/mach-davinci/clock.c | 745 -------------------------- arch/arm/mach-davinci/clock.h | 72 --- arch/arm/mach-davinci/common.c | 1 - arch/arm/mach-davinci/da830.c | 536 +++++-------------- arch/arm/mach-davinci/da850.c | 785 ++++++---------------------- arch/arm/mach-davinci/da8xx-dt.c | 17 +- arch/arm/mach-davinci/davinci.h | 4 + arch/arm/mach-davinci/devices-da8xx.c | 46 +- arch/arm/mach-davinci/dm355.c | 452 ++++------------ arch/arm/mach-davinci/dm365.c | 594 ++++++--------------- arch/arm/mach-davinci/dm644x.c | 401 ++++---------- arch/arm/mach-davinci/dm646x.c | 451 +++++----------- arch/arm/mach-davinci/include/mach/clock.h | 3 - arch/arm/mach-davinci/include/mach/common.h | 9 - arch/arm/mach-davinci/include/mach/da8xx.h | 11 +- arch/arm/mach-davinci/psc.c | 137 ----- arch/arm/mach-davinci/psc.h | 14 - arch/arm/mach-davinci/usb-da8xx.c | 225 +------- drivers/clk/Makefile | 1 + drivers/clk/davinci/Makefile | 3 + drivers/clk/davinci/da8xx-cfgchip-clk.c | 380 ++++++++++++++ drivers/clk/davinci/pll.c | 333 ++++++++++++ drivers/clk/davinci/psc.c | 217 ++++++++ include/linux/clk/davinci.h | 46 ++ include/linux/platform_data/davinci_clk.h | 25 + 40 files changed, 1875 insertions(+), 3717 deletions(-) delete mode 100644 arch/arm/mach-davinci/clock.c delete mode 100644 arch/arm/mach-davinci/psc.c create mode 100644 drivers/clk/davinci/Makefile create mode 100644 drivers/clk/davinci/da8xx-cfgchip-clk.c create mode 100644 drivers/clk/davinci/pll.c create mode 100644 drivers/clk/davinci/psc.c create mode 100644 include/linux/clk/davinci.h create mode 100644 include/linux/platform_data/davinci_clk.h -- 2.7.4