From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756874Ab3EKBIX (ORCPT ); Fri, 10 May 2013 21:08:23 -0400 Received: from mail-ea0-f177.google.com ([209.85.215.177]:49404 "EHLO mail-ea0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756017Ab3EKBIU (ORCPT ); Fri, 10 May 2013 21:08:20 -0400 From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: Jason Cooper , Andrew Lunn , Russell King , Gregory Clement , Thomas Petazzoni , Mike Turquette , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 00/10] clk: mvebu: restructure SoC clock drivers Date: Sat, 11 May 2013 03:08:00 +0200 Message-Id: <1368234490-31416-1-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Marvell EBU SoCs share some common clock functions that register core clocks or clock gates from SoC specific data. These clock drivers are organized by function and over time the drivers filled up with #ifdefs to separate different SoC specific code. This patch set first adds a new element to clock gate descriptors to allow to pass clk flags per clock gate. (Patch 1) Then it restructures MVEBU clock drivers into common clock setup and SoC specific files and Kconfig options. The driver's init functions are also registered to get called with of_clk_init. (Patches 2, 3-6) It then switches Dove, Kirkwood, and Armada 370/XP to make use of of_clk_init instead of mvebu_clocks_init. (Patches 7-9) Finally, all obsolete files and Kconfig options are removed. (Patch 10) It has been tested on CuBox (Dove) and Dockstar (Kirkwood) by me. Armada 370 and XP are compile tested only and should get their Tested-by from Thomas and Gregory, respectively. @Mike: As this only touches MVEBU related code, I suggest to take it all through the corresponding ARM branch. Sebastian Hesselbarth (10): clk: mvebu: introduce per-clock-gate flags clk: mvebu: add common clock functions for core clk and clk gating clk: mvebu: add Dove SoC-centric clock init clk: mvebu: add Kirkwood SoC-centric clock init clk: mvebu: add Armada 370 SoC-centric clock init clk: mvebu: add Armada XP SoC-centric clock init ARM: dove: move DT boards to SoC-centric clock init ARM: kirkwood: move DT boards to SoC-centric clock init ARM: mvebu: move DT boards to SoC-centric clock init clk: mvebu: desintegrate obsolete file arch/arm/mach-dove/Kconfig | 3 +- arch/arm/mach-dove/board-dt.c | 3 +- arch/arm/mach-dove/common.c | 1 - arch/arm/mach-kirkwood/Kconfig | 3 +- arch/arm/mach-kirkwood/board-dt.c | 3 +- arch/arm/mach-mvebu/Kconfig | 5 +- arch/arm/mach-mvebu/armada-370-xp.c | 4 +- drivers/clk/mvebu/Kconfig | 25 +- drivers/clk/mvebu/Makefile | 8 +- drivers/clk/mvebu/armada-370.c | 176 +++++++++ drivers/clk/mvebu/armada-xp.c | 204 +++++++++++ drivers/clk/mvebu/clk-core.c | 675 ----------------------------------- drivers/clk/mvebu/clk-core.h | 18 - drivers/clk/mvebu/clk-gating-ctrl.c | 250 ------------- drivers/clk/mvebu/clk-gating-ctrl.h | 22 -- drivers/clk/mvebu/clk.c | 23 -- drivers/clk/mvebu/common.c | 163 +++++++++ drivers/clk/mvebu/common.h | 48 +++ drivers/clk/mvebu/dove.c | 194 ++++++++++ drivers/clk/mvebu/kirkwood.c | 247 +++++++++++++ include/linux/clk/mvebu.h | 22 -- 21 files changed, 1066 insertions(+), 1031 deletions(-) create mode 100644 drivers/clk/mvebu/armada-370.c create mode 100644 drivers/clk/mvebu/armada-xp.c delete mode 100644 drivers/clk/mvebu/clk-core.c delete mode 100644 drivers/clk/mvebu/clk-core.h delete mode 100644 drivers/clk/mvebu/clk-gating-ctrl.c delete mode 100644 drivers/clk/mvebu/clk-gating-ctrl.h delete mode 100644 drivers/clk/mvebu/clk.c create mode 100644 drivers/clk/mvebu/common.c create mode 100644 drivers/clk/mvebu/common.h create mode 100644 drivers/clk/mvebu/dove.c create mode 100644 drivers/clk/mvebu/kirkwood.c delete mode 100644 include/linux/clk/mvebu.h --- Cc: Jason Cooper Cc: Andrew Lunn Cc: Russell King Cc: Gregory Clement Cc: Thomas Petazzoni Cc: Mike Turquette Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org -- 1.7.10.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth) Date: Sat, 11 May 2013 03:08:00 +0200 Subject: [PATCH 00/10] clk: mvebu: restructure SoC clock drivers Message-ID: <1368234490-31416-1-git-send-email-sebastian.hesselbarth@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Marvell EBU SoCs share some common clock functions that register core clocks or clock gates from SoC specific data. These clock drivers are organized by function and over time the drivers filled up with #ifdefs to separate different SoC specific code. This patch set first adds a new element to clock gate descriptors to allow to pass clk flags per clock gate. (Patch 1) Then it restructures MVEBU clock drivers into common clock setup and SoC specific files and Kconfig options. The driver's init functions are also registered to get called with of_clk_init. (Patches 2, 3-6) It then switches Dove, Kirkwood, and Armada 370/XP to make use of of_clk_init instead of mvebu_clocks_init. (Patches 7-9) Finally, all obsolete files and Kconfig options are removed. (Patch 10) It has been tested on CuBox (Dove) and Dockstar (Kirkwood) by me. Armada 370 and XP are compile tested only and should get their Tested-by from Thomas and Gregory, respectively. @Mike: As this only touches MVEBU related code, I suggest to take it all through the corresponding ARM branch. Sebastian Hesselbarth (10): clk: mvebu: introduce per-clock-gate flags clk: mvebu: add common clock functions for core clk and clk gating clk: mvebu: add Dove SoC-centric clock init clk: mvebu: add Kirkwood SoC-centric clock init clk: mvebu: add Armada 370 SoC-centric clock init clk: mvebu: add Armada XP SoC-centric clock init ARM: dove: move DT boards to SoC-centric clock init ARM: kirkwood: move DT boards to SoC-centric clock init ARM: mvebu: move DT boards to SoC-centric clock init clk: mvebu: desintegrate obsolete file arch/arm/mach-dove/Kconfig | 3 +- arch/arm/mach-dove/board-dt.c | 3 +- arch/arm/mach-dove/common.c | 1 - arch/arm/mach-kirkwood/Kconfig | 3 +- arch/arm/mach-kirkwood/board-dt.c | 3 +- arch/arm/mach-mvebu/Kconfig | 5 +- arch/arm/mach-mvebu/armada-370-xp.c | 4 +- drivers/clk/mvebu/Kconfig | 25 +- drivers/clk/mvebu/Makefile | 8 +- drivers/clk/mvebu/armada-370.c | 176 +++++++++ drivers/clk/mvebu/armada-xp.c | 204 +++++++++++ drivers/clk/mvebu/clk-core.c | 675 ----------------------------------- drivers/clk/mvebu/clk-core.h | 18 - drivers/clk/mvebu/clk-gating-ctrl.c | 250 ------------- drivers/clk/mvebu/clk-gating-ctrl.h | 22 -- drivers/clk/mvebu/clk.c | 23 -- drivers/clk/mvebu/common.c | 163 +++++++++ drivers/clk/mvebu/common.h | 48 +++ drivers/clk/mvebu/dove.c | 194 ++++++++++ drivers/clk/mvebu/kirkwood.c | 247 +++++++++++++ include/linux/clk/mvebu.h | 22 -- 21 files changed, 1066 insertions(+), 1031 deletions(-) create mode 100644 drivers/clk/mvebu/armada-370.c create mode 100644 drivers/clk/mvebu/armada-xp.c delete mode 100644 drivers/clk/mvebu/clk-core.c delete mode 100644 drivers/clk/mvebu/clk-core.h delete mode 100644 drivers/clk/mvebu/clk-gating-ctrl.c delete mode 100644 drivers/clk/mvebu/clk-gating-ctrl.h delete mode 100644 drivers/clk/mvebu/clk.c create mode 100644 drivers/clk/mvebu/common.c create mode 100644 drivers/clk/mvebu/common.h create mode 100644 drivers/clk/mvebu/dove.c create mode 100644 drivers/clk/mvebu/kirkwood.c delete mode 100644 include/linux/clk/mvebu.h --- Cc: Jason Cooper Cc: Andrew Lunn Cc: Russell King Cc: Gregory Clement Cc: Thomas Petazzoni Cc: Mike Turquette Cc: linux-arm-kernel at lists.infradead.org Cc: linux-kernel at vger.kernel.org -- 1.7.10.4