From patchwork Sat Jun 25 05:26:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 9198413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3192060752 for ; Sat, 25 Jun 2016 05:29:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1855E28495 for ; Sat, 25 Jun 2016 05:29:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CF34284F2; Sat, 25 Jun 2016 05:29:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8AA528495 for ; Sat, 25 Jun 2016 05:28:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGg7M-00006V-Sn; Sat, 25 Jun 2016 05:26:56 +0000 Received: from smtp24.mail.ru ([94.100.181.179]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bGg7J-00005q-Tg for linux-arm-kernel@lists.infradead.org; Sat, 25 Jun 2016 05:26:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Message-Id:Date:Subject:Cc:To:From; bh=tQnybxfYAIk3ammAPDGBAH9YGqMBw5zTKVwAqsXUSFA=; b=QBl7NKzxjmOxis91hYauJiFHjRNm0JSv6o3TFbDm/DnVj/Av/1u0aNF2zJ6HSjNfQRkQaHBuJ+hjDZ8mVHjWfZE1RxUkRUn9PpIEUBhvdkwwQLsQDoA4QEAkPPlFa/SbIxYCrKwb4vEgOlluZjOMSlGgvta6OTpmZWvt1D7ikoo=; Received: from [5.18.96.7] (port=43918 helo=shc.zet) by smtp24.mail.ru with esmtpa (envelope-from ) id 1bGg6r-0008EO-S2; Sat, 25 Jun 2016 08:26:26 +0300 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: i.MX: Disable supervisor protect for i.MX51 Date: Sat, 25 Jun 2016 08:26:15 +0300 Message-Id: <1466832375-32071-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 2.4.9 X-Mras: OK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160624_222654_382489_41670609 X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Alexander Shiyan , Shawn Guo , Russell King , Sascha Hauer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Most peripherals on the i.MX51 have an Off-Platform Peripheral Access Control Register (OPACR) in which the access rights (together with the MPROT registers) can be declared. However, this does not seem to work for example for SSI1+SDMA, because the supervisor bit is not set for the SDMA unit. A similar problem was described in the patch for i.MX53 CPU (ARM: i.MX53: globally disable supervisor protect), and the same solution is applicable for i.MX51 CPU. Patch has tested on custom board based on Digi CCMX-51 module (i.MX51). Signed-off-by: Alexander Shiyan --- DTS-part of this patch, I'll send a bit later. Another mention of this problem: https://community.nxp.com/thread/333710 --- arch/arm/mach-imx/mach-imx51.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 10a82a4..1e91740 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -54,6 +54,8 @@ static void __init imx51_dt_init(void) imx_src_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + imx_aips_allow_unprivileged_access("fsl,imx51-aipstz"); } static void __init imx51_init_late(void)