From patchwork Tue Nov 5 14:28:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 3142061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9C15BEEB2 for ; Tue, 5 Nov 2013 14:31:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 632722039D for ; Tue, 5 Nov 2013 14:31:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04F2120256 for ; Tue, 5 Nov 2013 14:31:27 +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 1Vdhdt-0001WV-S3; Tue, 05 Nov 2013 14:30:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vdhdf-0003kx-Uk; Tue, 05 Nov 2013 14:29:51 +0000 Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vdhd8-0003e7-Sx for linux-arm-kernel@lists.infradead.org; Tue, 05 Nov 2013 14:29:26 +0000 Received: by mail-ee0-f44.google.com with SMTP id d41so1691851eek.3 for ; Tue, 05 Nov 2013 06:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x1JGd1BPKsien++X8aTc4HYsL45msv104+AUZRtk718=; b=tg4vYd4RNUSg/Gtb9vsbRUaZqce6rsVPNJeRD2Bv/4MJ2vNhDUeIHMzaq4GoEDdmZI fekYGpJxCmQoFHWYtSb5jaxzK615aeqt+3deEYZOIBsaoZ91xEckXfNfuO2cqs8kI+Jr czIhQ2gVs1oIohioZwdl+2jHARQclYDmMu97D/p4ocit/oeUti2DEvy90fzFJE35QsDw CX8xkBJGWu2G/kkNoRzWaDWDcZavCi7Q3UQurhxT+80wQvyYF8SZSP1pBNcvNGsZC7Op Qh6a5NP2fdFpA0/k8ieJ5RsP68q4+Mfh4evaLkK9rhl5jm2tcysARy48mvXGmBHQq+XY xlXw== X-Received: by 10.14.193.198 with SMTP id k46mr114638een.128.1383661737819; Tue, 05 Nov 2013 06:28:57 -0800 (PST) Received: from topkick.lan (dslc-082-083-251-183.pools.arcor-ip.net. [82.83.251.183]) by mx.google.com with ESMTPSA id b42sm60884290eem.9.2013.11.05.06.28.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2013 06:28:56 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH v3 9/9] ARM: add initial support for Marvell Berlin SoCs Date: Tue, 5 Nov 2013 15:28:43 +0100 Message-Id: <1383661723-17956-10-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1383661723-17956-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1381235073-17134-1-git-send-email-sebastian.hesselbarth@gmail.com> <1383661723-17956-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131105_092919_267550_07E49096 X-CRM114-Status: GOOD ( 16.31 ) X-Spam-Score: -2.0 (--) Cc: Russell King , Arnd Bergmann , Kevin Hilman , linux-kernel@vger.kernel.org, Olof Johansson , 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds initial support for the Marvell Berlin SoC family with Armada 1500 (88DE3100) and Armada 1500-mini (88DE3005) SoCs. Signed-off-by: Sebastian Hesselbarth Reviewed-by: Jason Cooper Reviewed-by: Thomas Petazzoni Reviewed-by: Arnd Bergmann --- Changelog: v2->v3: - add Armada 1500-mini (BG2CD) Kconfig v1->v2: - replace 88DE3xxx numbering with SoC variant name (Requested by Jisheng Zhang) - remove LOCAL_TIMERS dependency (Suggested by Dinh Nguyen) RFCv2->v1: - remove custom .init_time, adds dependency for arch-wide of_clk_init call RFCv1->RFCv2: - nuke .map_io (Reported by Arnd Bergmann) - add copyright reference - switch to mach-berlin instead of mach-mvebu Cc: Russell King Cc: Arnd Bergmann Cc: Olof Johansson Cc: Kevin Hilman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-berlin/Kconfig | 30 ++++++++++++++++++++++++++++++ arch/arm/mach-berlin/Makefile | 1 + arch/arm/mach-berlin/berlin.c | 39 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 arch/arm/mach-berlin/Kconfig create mode 100644 arch/arm/mach-berlin/Makefile create mode 100644 arch/arm/mach-berlin/berlin.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1ad6fb6..5692426 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -932,6 +932,8 @@ source "arch/arm/mach-bcm/Kconfig" source "arch/arm/mach-bcm2835/Kconfig" +source "arch/arm/mach-berlin/Kconfig" + source "arch/arm/mach-clps711x/Kconfig" source "arch/arm/mach-cns3xxx/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index db50b62..07258c7 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -147,6 +147,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 machine-$(CONFIG_ARCH_AT91) += at91 machine-$(CONFIG_ARCH_BCM) += bcm machine-$(CONFIG_ARCH_BCM2835) += bcm2835 +machine-$(CONFIG_ARCH_BERLIN) += berlin machine-$(CONFIG_ARCH_CLPS711X) += clps711x machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx machine-$(CONFIG_ARCH_DAVINCI) += davinci diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig new file mode 100644 index 0000000..c5b39b1 --- /dev/null +++ b/arch/arm/mach-berlin/Kconfig @@ -0,0 +1,30 @@ +config ARCH_BERLIN + bool "Marvell Berlin SoCs" if ARCH_MULTI_V7 + select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_CHIP + select COMMON_CLK + select DW_APB_ICTL + select DW_APB_TIMER_OF + +if ARCH_BERLIN + +menu "Marvell Berlin SoC variants" + +config MACH_BERLIN_BG2 + bool "Marvell Armada 1500 (BG2)" + select ARM_GIC + select CACHE_L2X0 + select CPU_PJ4B + select HAVE_ARM_TWD + select HAVE_SMP + +config MACH_BERLIN_BG2CD + bool "Marvell Armada 1500-mini (BG2CD)" + select ARM_GIC + select CACHE_L2X0 + select CPU_V7 + select HAVE_ARM_TWD + +endmenu + +endif diff --git a/arch/arm/mach-berlin/Makefile b/arch/arm/mach-berlin/Makefile new file mode 100644 index 0000000..ab69fe9 --- /dev/null +++ b/arch/arm/mach-berlin/Makefile @@ -0,0 +1 @@ +obj-y += berlin.o diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c new file mode 100644 index 0000000..16c2942 --- /dev/null +++ b/arch/arm/mach-berlin/berlin.c @@ -0,0 +1,39 @@ +/* + * Device Tree support for Marvell Berlin SoCs. + * + * Sebastian Hesselbarth + * + * based on GPL'ed 2.6 kernel sources + * (c) Marvell International Ltd. + * + * 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 + +static void __init berlin_init_machine(void) +{ + /* + * with DT probing for L2CCs, berlin_init_machine can be removed. + * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc + */ + l2x0_of_init(0x70c00000, 0xfeffffff); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static const char * const berlin_dt_compat[] = { + "marvell,berlin", + NULL, +}; + +DT_MACHINE_START(BERLIN_DT, "Marvell Berlin") + .dt_compat = berlin_dt_compat, + .init_machine = berlin_init_machine, +MACHINE_END