From patchwork Thu Jun 6 16:27:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 2682111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id D194D40077 for ; Thu, 6 Jun 2013 16:32:44 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ukd4T-0007LS-Rz; Thu, 06 Jun 2013 16:29:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ukd3Z-0005ZC-Ki; Thu, 06 Jun 2013 16:28:57 +0000 Received: from mail-bk0-x230.google.com ([2a00:1450:4008:c01::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ukd2f-0005S2-Oc for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2013 16:28:13 +0000 Received: by mail-bk0-f48.google.com with SMTP id jf17so1730438bkc.35 for ; Thu, 06 Jun 2013 09:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=oN9TzMaTFoRo8flpBw0iN0lWY7tJyGD8YtUn0BzJ9UA=; b=djzEqBF+d87xqUOZ6xk5I9VMncNqo8ogjtU4+ehs/WBRsGTHfEVAIC9qnTHGvLQyZS W/cjzAiJIRVlqMOhRoRpAuh2G5iJFlzG1Ttb/FTszatwyeZyDlaMQ/r5NzECBRFypmzk 55Apvdx3/k9z9uz73GtyBPFskIgA1wHlmwUqhBqkuMegcpv09rovqCzGLDkK4JCcUc4P kPDqHWrnA2p4Q2f7Msu+Urse+HjLWlklZ+giPPK6xYgx3khsiYf6D6/bRNsj06atpJiV EwWK4oLx659fmVab2z9qcF1sqxek0KJ56u1WpFbGRfAQi9wKDnzrJd3wOP23I7poCJgk 9fRw== X-Received: by 10.204.239.199 with SMTP id kx7mr11375155bkb.153.1370536059746; Thu, 06 Jun 2013 09:27:39 -0700 (PDT) Received: from topkick.lan (dslc-082-083-251-181.pools.arcor-ip.net. [82.83.251.181]) by mx.google.com with ESMTPSA id hh3sm15565332bkc.5.2013.06.06.09.27.37 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Jun 2013 09:27:38 -0700 (PDT) Received: from picnic.unix.mst.uni-hannover.de (firewall.mst.uni-hannover.de [130.75.30.51]) by topkick.lan (Postfix) with ESMTPSA id 755095FBD2; Thu, 6 Jun 2013 18:26:31 +0200 (CEST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH v3 6/6] ARM: kirkwood: convert to DT irqchip and clocksource Date: Thu, 6 Jun 2013 18:27:14 +0200 Message-Id: <1370536034-23956-7-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1370536034-23956-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1370536034-23956-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130606_122802_073209_C19470A2 X-CRM114-Status: GOOD ( 17.08 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sebastian.hesselbarth[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Thomas Petazzoni , Andrew Lunn , Russell King , Jason Cooper , linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Rob Herring , Gregory Clement , John Stultz , Rob Landley , Grant Likely , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org With recent support for true irqchip and clocksource drivers for Orion SoCs, now make use of it on DT enabled Kirkwood boards. This also introduces a new Kconfig option for legacy (non-DT) Kirkwood where old code is moved out to and polishes DT board file a little bit. Signed-off-by: Sebastian Hesselbarth --- Cc: Grant Likely Cc: Rob Herring Cc: Rob Landley Cc: Thomas Gleixner Cc: John Stultz Cc: Russell King Cc: Jason Cooper Cc: Andrew Lunn Cc: Thomas Petazzoni Cc: Gregory Clement Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mach-kirkwood/Kconfig | 24 ++++++++++++++++++++++++ arch/arm/mach-kirkwood/Makefile | 4 ++-- arch/arm/mach-kirkwood/board-dt.c | 28 +++++++++++++++++----------- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 2c95623..f14914f 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -2,62 +2,75 @@ if ARCH_KIRKWOOD menu "Marvell Kirkwood Implementations" +config KIRKWOOD_LEGACY + bool + config MACH_D2NET_V2 bool "LaCie d2 Network v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie d2 Network v2 NAS. config MACH_DOCKSTAR bool "Seagate FreeAgent DockStar" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Seagate FreeAgent DockStar. config MACH_ESATA_SHEEVAPLUG bool "Marvell eSATA SheevaPlug Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell eSATA SheevaPlug Reference Board. config MACH_GURUPLUG bool "Marvell GuruPlug Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell GuruPlug Reference Board. config MACH_INETSPACE_V2 bool "LaCie Internet Space v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie Internet Space v2 NAS. config MACH_MV88F6281GTW_GE bool "Marvell 88F6281 GTW GE Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell 88F6281 GTW GE Board. config MACH_NET2BIG_V2 bool "LaCie 2Big Network v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie 2Big Network v2 NAS. config MACH_NET5BIG_V2 bool "LaCie 5Big Network v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie 5Big Network v2 NAS. config MACH_NETSPACE_MAX_V2 bool "LaCie Network Space Max v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie Network Space Max v2 NAS. config MACH_NETSPACE_V2 bool "LaCie Network Space v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie Network Space v2 NAS. @@ -67,6 +80,7 @@ config MACH_OPENRD config MACH_OPENRD_BASE bool "Marvell OpenRD Base Board" + select KIRKWOOD_LEGACY select MACH_OPENRD help Say 'Y' here if you want your kernel to support the @@ -74,6 +88,7 @@ config MACH_OPENRD_BASE config MACH_OPENRD_CLIENT bool "Marvell OpenRD Client Board" + select KIRKWOOD_LEGACY select MACH_OPENRD help Say 'Y' here if you want your kernel to support the @@ -81,6 +96,7 @@ config MACH_OPENRD_CLIENT config MACH_OPENRD_ULTIMATE bool "Marvell OpenRD Ultimate Board" + select KIRKWOOD_LEGACY select MACH_OPENRD help Say 'Y' here if you want your kernel to support the @@ -88,30 +104,35 @@ config MACH_OPENRD_ULTIMATE config MACH_RD88F6192_NAS bool "Marvell RD-88F6192-NAS Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell RD-88F6192-NAS Reference Board. config MACH_RD88F6281 bool "Marvell RD-88F6281 Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell RD-88F6281 Reference Board. config MACH_SHEEVAPLUG bool "Marvell SheevaPlug Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell SheevaPlug Reference Board. config MACH_T5325 bool "HP t5325 Thin Client" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the HP t5325 Thin Client. config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and @@ -119,6 +140,7 @@ config MACH_TS219 config MACH_TS41X bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo @@ -129,6 +151,8 @@ comment "Device tree entries" config ARCH_KIRKWOOD_DT bool "Marvell Kirkwood Flattened Device Tree" select KIRKWOOD_CLK + select ORION_IRQCHIP + select ORION_TIMER select POWER_SUPPLY select POWER_RESET select POWER_RESET_GPIO diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 53caf14..91be973 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile @@ -1,5 +1,5 @@ -obj-y += common.o irq.o pcie.o mpp.o - +obj-y += common.o pcie.o +obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 1e4eac3..cec736b 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -49,10 +52,6 @@ static void __init kirkwood_legacy_clk_init(void) orion_clkdev_add("1", "pcie", of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CGC_BIT_SDIO; - orion_clkdev_add(NULL, "mvsdio", - of_clk_get_from_provider(&clkspec)); - /* * The ethernet interfaces forget the MAC address assigned by * u-boot if the clocks are turned off. Until proper DT support @@ -67,10 +66,18 @@ static void __init kirkwood_legacy_clk_init(void) clk_prepare_enable(clk); } -static void __init kirkwood_of_clk_init(void) +static void __init kirkwood_dt_time_init(void) { of_clk_init(NULL); - kirkwood_legacy_clk_init(); + clocksource_of_init(); +} + +static void __init kirkwood_dt_init_early(void) +{ + init_dma_coherent_pool_size(SZ_1M); + mvebu_mbus_init("marvell,kirkwood-mbus", + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, + DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); } static void __init kirkwood_dt_init(void) @@ -91,8 +98,8 @@ static void __init kirkwood_dt_init(void) kirkwood_cpufreq_init(); - /* Setup root of clk tree */ - kirkwood_of_clk_init(); + /* setup clocks for legacy devices */ + kirkwood_legacy_clk_init(); kirkwood_cpuidle_init(); @@ -117,9 +124,8 @@ static const char * const kirkwood_dt_board_compat[] = { DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") /* Maintainer: Jason Cooper */ .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = orion_dt_init_irq, - .init_time = kirkwood_timer_init, + .init_early = kirkwood_dt_init_early, + .init_time = kirkwood_dt_time_init, .init_machine = kirkwood_dt_init, .restart = kirkwood_restart, .dt_compat = kirkwood_dt_board_compat,