From patchwork Thu Apr 3 01:01:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 3931131 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 3CAC39F2F7 for ; Thu, 3 Apr 2014 01:02:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75D48202C8 for ; Thu, 3 Apr 2014 01:02:00 +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 711C6202A1 for ; Thu, 3 Apr 2014 01:01:59 +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 1WVW2V-0004Ah-OA; Thu, 03 Apr 2014 01:01:55 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVW2T-0004LH-8w; Thu, 03 Apr 2014 01:01:53 +0000 Received: from mail-pd0-f173.google.com ([209.85.192.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVW2Q-0004KI-T6 for linux-arm-kernel@lists.infradead.org; Thu, 03 Apr 2014 01:01:51 +0000 Received: by mail-pd0-f173.google.com with SMTP id z10so969493pdj.4 for ; Wed, 02 Apr 2014 18:01:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VEx81ytxTLZ0DwQPeRoOySSU0kA9nBjmCwDMAQVWXyU=; b=V7lhpu5k9Nf8TDLwqTmcGpmSGvrJMkluGI+ET7HLXVqGT5tGMrq2ZL7jkwmIw1plzb ke+WkJ1Rgv8RcfBcAvFrMzPi0JU4Af1goPnmRrr2r0jykax2G9j4Zg8T6bFaUKEF5nQV yhbI7MTftlU5kB9SdkbudjOPD2JcwdBwM7vA9HanRvRykb8GjbIKfIglGKBgbaCjOLEs VGxa2ft0EjI0ibQF/kL2EbrT40Xo39QLwNOguqVtmEiHO16WqyUE5iIuDXSqlOnrGIG7 3FtNIT8PDuvkKpVsMn7Kzy6dYmu1hXCBjiYOCScqYKxhait5xDqE67WT4R4dFIrqTzUI kF7g== X-Gm-Message-State: ALoCoQkUDRyEQHt/2SfBm814inq3zB8QUoKGPtRR1njCQ9pXFOa1BSAuspOLaVJDnigXs+2MYS4Z X-Received: by 10.67.8.102 with SMTP id dj6mr3788237pad.10.1396486887214; Wed, 02 Apr 2014 18:01:27 -0700 (PDT) Received: from localhost.localdomain ([140.206.182.114]) by mx.google.com with ESMTPSA id yo9sm16869375pab.16.2014.04.02.18.01.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 18:01:24 -0700 (PDT) From: Haojian Zhuang To: linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, arnd@arndb.de, olof@lixom.net, khilman@kernel.org, xuwei5@hisilicon.com Subject: [PATCH v2 1/2] ARM: hisi: enable L2 driver Date: Thu, 3 Apr 2014 09:01:04 +0800 Message-Id: <1396486864-13813-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <20140402170034.GK7528@n2100.arm.linux.org.uk> References: <20140402170034.GK7528@n2100.arm.linux.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140402_210151_010750_8FC1CA0F X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: Haojian Zhuang 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 l2x0_of_init() is necessary to enable PL310 L2 cache controller. Signed-off-by: Haojian Zhuang --- arch/arm/mach-hisi/hisilicon.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c index 741faf3..5877e7d 100644 --- a/arch/arm/mach-hisi/hisilicon.c +++ b/arch/arm/mach-hisi/hisilicon.c @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -51,6 +52,12 @@ static void __init hi3620_map_io(void) iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc)); } +static void __init hi3xxx_init(void) +{ + l2x0_of_init(0, ~0); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + static void hi3xxx_restart(enum reboot_mode mode, const char *cmd) { struct device_node *np; @@ -86,5 +93,6 @@ DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)") .map_io = hi3620_map_io, .dt_compat = hi3xxx_compat, .smp = smp_ops(hi3xxx_smp_ops), + .init_machine = hi3xxx_init, .restart = hi3xxx_restart, MACHINE_END