From patchwork Thu Mar 5 01:58:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 5942311 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D92509F373 for ; Thu, 5 Mar 2015 01:59:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2068A20386 for ; Thu, 5 Mar 2015 01:59:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FD0120384 for ; Thu, 5 Mar 2015 01:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177AbbCEB7B (ORCPT ); Wed, 4 Mar 2015 20:59:01 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:38077 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754166AbbCEB7A (ORCPT ); Wed, 4 Mar 2015 20:59:00 -0500 Received: from penelope.kanocho.kobe.vergenet.net (g1-27-253-251-9.bmobile.ne.jp [27.253.251.9]) by kirsty.vergenet.net (Postfix) with ESMTP id 71C8D267199; Thu, 5 Mar 2015 12:58:37 +1100 (EST) Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id 716BA66C3A; Thu, 5 Mar 2015 10:58:28 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Magnus Damm , Geert Uytterhoeven , Simon Horman Subject: [PATCH 01/11] ARM: shmobile: sh73a0: Introduce generic setup callback Date: Thu, 5 Mar 2015 10:58:17 +0900 Message-Id: <0b52b2508b1e410c2e80408a580412d85401ecd3.1425518682.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 From: Magnus Damm Add a generic sh73a0 machine setup callback for the upcoming sh73a0 multiplatform case. Cache needs to be configured, and legacy clocks must be omitted. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-sh73a0.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index faea74a..48f2447 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -782,8 +783,6 @@ void __init sh73a0_add_early_devices(void) shmobile_setup_console(); } -#ifdef CONFIG_USE_OF - void __init sh73a0_add_standard_devices_dt(void) { /* clocks are setup late during boot in the case of DT */ @@ -800,6 +799,17 @@ static void sh73a0_restart(enum reboot_mode mode, const char *cmd) writel((1 << 31), RESCNT2); } +#ifdef CONFIG_USE_OF + +static void __init sh73a0_generic_init(void) +{ +#ifdef CONFIG_CACHE_L2X0 + /* Shared attribute override enable, 64K*8way */ + l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff); +#endif + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + static const char *sh73a0_boards_compat_dt[] __initdata = { "renesas,sh73a0", NULL, @@ -809,7 +819,7 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, .init_early = shmobile_init_delay, - .init_machine = sh73a0_add_standard_devices_dt, + .init_machine = sh73a0_generic_init, .init_late = shmobile_init_late, .restart = sh73a0_restart, .dt_compat = sh73a0_boards_compat_dt,