From patchwork Wed Apr 2 13:34:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 3928811 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 6054A9F2B6 for ; Wed, 2 Apr 2014 13:35:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AF29201FD for ; Wed, 2 Apr 2014 13:35:24 +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 9E51620173 for ; Wed, 2 Apr 2014 13:35:23 +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 1WVLJw-0001PT-Hn; Wed, 02 Apr 2014 13:35:12 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVLJu-0003vf-0G; Wed, 02 Apr 2014 13:35:10 +0000 Received: from mail-pa0-f44.google.com ([209.85.220.44]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVLJr-0003ur-JC for linux-arm-kernel@lists.infradead.org; Wed, 02 Apr 2014 13:35:08 +0000 Received: by mail-pa0-f44.google.com with SMTP id bj1so199151pad.3 for ; Wed, 02 Apr 2014 06:34:43 -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; bh=V4E9NKZLTq00Dq1OzbkihiJ9HG91l9KSUh9g2kvWwuI=; b=VNSR0O2dzBUc7ttrbuLHq1isecuQUD7q+Zk6xBJNFsXr7HONRmxTnQarBgmd9KABlm J4Q2blsQfFBaM3JnF+3dNfpP5weVDNwbn/JCWUjlKoLtpUYOkhslFyv0CXe89oBfBT9x NY9ne9vONcsNN10kHKOMokICBopWCvD4xVW5HpFyoXacsUbZipNN7gQZeoxswuqTfnB5 SRK2qOk63uhxCnCFZdRJSPQCebD8ZZvXkaVDMNjqq6ndTZ+fsJOFi3BBaE53be2nAQ9j tIwu9kpCxDHzS/4Nd6pw/BscDVbR7/HG+Uxie7gUFc0FRfoInJIB3As6QEpj1DgyLBmz sIAw== X-Gm-Message-State: ALoCoQkMq/cbfpD5TAt0rJwZR/4O1K1sRoAf7uRnwWpcj8WA3JWnUN4Nzt2ivEyaKOA/W0UyuNDL X-Received: by 10.66.190.161 with SMTP id gr1mr2604pac.79.1396445683817; Wed, 02 Apr 2014 06:34:43 -0700 (PDT) Received: from localhost.localdomain ([140.206.182.114]) by mx.google.com with ESMTPSA id ac5sm4560323pbc.37.2014.04.02.06.34.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 06:34:43 -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 1/2] ARM: hisi: enable L2 driver Date: Wed, 2 Apr 2014 21:34:22 +0800 Message-Id: <1396445663-1357-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140402_093507_695271_F4835561 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) 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..3a6f244 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, ~0UL); + 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