From patchwork Mon Feb 10 17:23:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 3621271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 444DB9F382 for ; Mon, 10 Feb 2014 17:36:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62E5F201CD for ; Mon, 10 Feb 2014 17:36:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58844201BC for ; Mon, 10 Feb 2014 17:36:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCulI-0002DZ-TB; Mon, 10 Feb 2014 17:35:17 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCubv-0004N3-5d; Mon, 10 Feb 2014 17:25:35 +0000 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCuaY-0004Dl-To for linux-arm-kernel@lists.infradead.org; Mon, 10 Feb 2014 17:24:22 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id A27C0A07; Mon, 10 Feb 2014 18:23:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (AToulouse-651-1-134-190.w109-222.abo.wanadoo.fr [109.222.213.190]) by mail.free-electrons.com (Postfix) with ESMTPSA id 5187B7BE; Mon, 10 Feb 2014 18:23:38 +0100 (CET) From: Thomas Petazzoni To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Subject: [PATCH 07/11] ARM: mvebu: add initial support for the Armada 380/385 SOCs Date: Mon, 10 Feb 2014 18:23:18 +0100 Message-Id: <1392053002-19831-8-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392053002-19831-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1392053002-19831-1-git-send-email-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140210_122411_927181_EC4C4C4A X-CRM114-Status: GOOD ( 14.02 ) X-Spam-Score: -1.8 (-) Cc: Lior Amsalem , Tawfik Bayouk , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org 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 X-Virus-Scanned: ClamAV using ClamSMTP This commit adds the basic support for the Armada 380 and Armada 385 SOCs. These SoCs share most of their IP with the Armada 370/XP SoCs. The main difference is the use of a Cortex A9 CPU instead of the PJ4B CPU. The Armada 380 is a single core Cortex-A9, while the Armada 385 is a dual-core Cortex-A9. Signed-off-by: Thomas Petazzoni --- .../devicetree/bindings/arm/armada-38x.txt | 10 ++++++ arch/arm/mach-mvebu/Kconfig | 15 ++++++++ arch/arm/mach-mvebu/Makefile | 1 + arch/arm/mach-mvebu/armada-38x.c | 42 ++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/armada-38x.txt create mode 100644 arch/arm/mach-mvebu/armada-38x.c diff --git a/Documentation/devicetree/bindings/arm/armada-38x.txt b/Documentation/devicetree/bindings/arm/armada-38x.txt new file mode 100644 index 0000000..11f2330 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-38x.txt @@ -0,0 +1,10 @@ +Marvell Armada 38x Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 38x family shall have the +following property: + +Required root node property: + + - compatible: must contain either "marvell,armada380" or + "marvell,armada385" depending on the variant of the SoC being used. diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 3aefdcd..7d01583 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -52,6 +52,21 @@ config MACH_ARMADA_375 Say 'Y' here if you want your kernel to support boards based on the Marvell Armada 375 SoC with device tree. +config MACH_ARMADA_380 + bool "Marvell Armada 380/385 boards" + select ARM_ERRATA_720789 + select ARM_ERRATA_753970 + select ARM_GIC + select ARMADA_370_XP_TIMER + select ARMADA_38X_CLK + select CACHE_L2X0 + select CPU_V7 + select NEON + select PINCTRL_ARMADA_38X + help + Say 'Y' here if you want your kernel to support boards based + on the Marvell Armada 380/385 SoC with device tree. + config MACH_ARMADA_XP bool "Marvell Armada XP boards" select ARMADA_XP_CLK diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 9862e0f..7a439f9 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -6,6 +6,7 @@ AFLAGS_coherency_ll.o := -Wa,-march=armv7-a obj-y += system-controller.o mvebu-soc-id.o obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o obj-$(CONFIG_MACH_ARMADA_375) += armada-375.o +obj-$(CONFIG_MACH_ARMADA_380) += armada-38x.o obj-$(CONFIG_ARCH_MVEBU) += coherency.o coherency_ll.o pmsu.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o diff --git a/arch/arm/mach-mvebu/armada-38x.c b/arch/arm/mach-mvebu/armada-38x.c new file mode 100644 index 0000000..936f606 --- /dev/null +++ b/arch/arm/mach-mvebu/armada-38x.c @@ -0,0 +1,42 @@ +/* + * Device Tree support for Armada 380/385 platforms. + * + * Copyright (C) 2014 Marvell + * + * Thomas Petazzoni + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "common.h" + +static void __init armada_380_timer_and_clk_init(void) +{ + of_clk_init(NULL); + clocksource_of_init(); + BUG_ON(mvebu_mbus_dt_init()); + l2x0_of_init(0, ~0UL); +} + +static const char * const armada_380_dt_compat[] = { + "marvell,armada380", + "marvell,armada385", + NULL, +}; + +DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 380/385 (Device Tree)") + .init_time = armada_380_timer_and_clk_init, + .restart = mvebu_restart, + .dt_compat = armada_380_dt_compat, +MACHINE_END