From patchwork Tue Oct 8 12:24:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 3003571 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 60F979F1E1 for ; Tue, 8 Oct 2013 12:50:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 316F6201E9 for ; Tue, 8 Oct 2013 12:50:08 +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 36ABD20134 for ; Tue, 8 Oct 2013 12:50:03 +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 1VTWNR-0005BX-In; Tue, 08 Oct 2013 12:27:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTWMf-0006NR-KA; Tue, 08 Oct 2013 12:26:13 +0000 Received: from mail-bk0-x236.google.com ([2a00:1450:4008:c01::236]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTWLc-0006EL-Q6 for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2013 12:25:17 +0000 Received: by mail-bk0-f54.google.com with SMTP id mz12so3255316bkb.13 for ; Tue, 08 Oct 2013 05:24:47 -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:in-reply-to:references; bh=z1dx9D5dJ3pNoRLv5+kOYTVyP+VI+B0Z9KpLcJTIWHM=; b=K8rxnaHSpG/p4m+Xjva6wHezA2I0e2chYjST2hNA4wrhtmNOCt+OPf9r77GZCLacFa LR0zrAiHBbVmGpUDhR+FiMcxfQUtUvZROrKGA4yv+1kMG2nERaWPH81iFlWppUxzLpw5 pFCN3pJnTkKs609zLGoNwCFlm6Zhk3gPg+ovlcRXhqup07Pc16armj8QWstsWHI25nES VLIeO54hGUAIEKQ9j6Dz98qzzcG9wq2zUAmZBKggqiWav159mjr3Jmx78HBKSwLwzxuI 5VDA6xHqi37ELUlaDUMECgzJJgjXbOvlQbrrOQEh7Risk3Ioq7v0iqdDetBujLpdLdr3 Iy7A== X-Received: by 10.204.123.199 with SMTP id q7mr1322291bkr.10.1381235087138; Tue, 08 Oct 2013 05:24:47 -0700 (PDT) Received: from topkick.lan (dslc-082-083-247-252.pools.arcor-ip.net. [82.83.247.252]) by mx.google.com with ESMTPSA id b6sm20310171bko.16.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 05:24:45 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 8/8] ARM: add initial support for Marvell Berlin SoCs Date: Tue, 8 Oct 2013 14:24:33 +0200 Message-Id: <1381235073-17134-9-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1381235073-17134-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1381235073-17134-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131008_082509_212400_9A5FF812 X-CRM114-Status: GOOD ( 15.25 ) X-Spam-Score: -2.0 (--) Cc: Thomas Petazzoni , Russell King , Jason Cooper , Arnd Bergmann , linux-kernel@vger.kernel.org, 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.4 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 (88DE3xxx) SoC family and basic machine setup for Armada 1500 (88DE3100) SoCs. Signed-off-by: Sebastian Hesselbarth Reviewed-by: Jason Cooper Reviewed-by: Thomas Petazzoni Reviewed-by: Arnd Bergmann --- Changelog: 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: Jason Cooper Cc: Thomas Petazzoni Cc: Arnd Bergmann Cc: Russell King 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 | 24 ++++++++++++++++++++++++ arch/arm/mach-berlin/Makefile | 1 + arch/arm/mach-berlin/berlin.c | 39 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 67 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 a37a50f..3ba332b 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..56a671e --- /dev/null +++ b/arch/arm/mach-berlin/Kconfig @@ -0,0 +1,24 @@ +config ARCH_BERLIN + bool "Marvell Berlin (88DE3xxx) 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 (88DE3xxx) SoC variants" + +config MACH_MV88DE3100 + bool "Marvell 88DE3100 (Armada 1500)" + select ARM_GIC + select CACHE_L2X0 + select CPU_PJ4B + select HAVE_ARM_TWD if LOCAL_TIMERS + select HAVE_SMP + select LOCAL_TIMERS if SMP + +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..54b3ba7 --- /dev/null +++ b/arch/arm/mach-berlin/berlin.c @@ -0,0 +1,39 @@ +/* + * Device Tree support for Marvell Berlin (88DE3xxx) platforms. + * + * 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 (88DE3xxx)") + .dt_compat = berlin_dt_compat, + .init_machine = berlin_init_machine, +MACHINE_END