Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4062121imm; Mon, 25 Jun 2018 09:05:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK/DjmUtmYDtzSkS4W/7JrOLHxWdEobZ/+PkNwV1xtHwLiWgZjsKgzNSP5uoaJ+rCWy4zzH X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr13061633plp.333.1529942731955; Mon, 25 Jun 2018 09:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529942731; cv=none; d=google.com; s=arc-20160816; b=lBm4+Mogp/gZE0nujwP+gaDbSuCcSrrSlziK5OJEKv7aFHPaZxbOzrrp8C5uHsFs5H gSCoIAiF/KEXCaVY9LMQXbHpmL4WNyAqD0C/5xQHqCOCmpsT6GwaeAFEs9qeprhjmdvv hnB/pZDJQ7/dlmIisJJcf62shbZJkd2SLVxPWKFGuZwrL0gAf+VhpDD0YikmouZ6Ypm4 KDeDFSL2YByFcqJ0kWtOrP1C+OjZRJWMYviNAaP9SfDfWG4jPfXOfIRhbUo8RLHXmy5i IPQyVqk6p+ol6wlgjpMVIx1K5ki5c2nbS6aoWMT3LXDIogDzzt7slxCQLbwbUNFh7mIT yTUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date :arc-authentication-results; bh=UmLGpWig8DKuYoKNDfPDM1qJgpxthrpdgYT4L2yb7tI=; b=U4Ijwg2mJXTGKge42NC4x6e0NdcD5tayU+n+e9S2tcNwaf+56KQkh4yzuuraUs0Xop fIW3qO9IfP3rSZAEalfVPbTQ791Zq+E4uCSvEKefyvHxZA1NzjMu1xwA+x+wqVIPRsII RaSmmBa0jNSs1GdMygbg1LuaUamux7z9hgugAFHUUCjarCATkxHWsZ4JcpaXZY5la0B+ 6c5ndjSipCiHAa+KU8JiBnC8uhNH479BrYZh7G8PzCOL1zOLoI9FSJl2LQZWxfQySc13 gupFBVAWV7iKXtEDsfNUNy++IMY4rmQ52y7IH3IvgA1IT6eo16ZarLwqziJvtSiSIIS6 FH8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d18-v6si11869602pgp.214.2018.06.25.09.05.17; Mon, 25 Jun 2018 09:05:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755159AbeFYQE3 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 25 Jun 2018 12:04:29 -0400 Received: from hermes.aosc.io ([199.195.250.187]:55340 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754627AbeFYQE0 (ORCPT ); Mon, 25 Jun 2018 12:04:26 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id ECD5263409; Mon, 25 Jun 2018 16:04:03 +0000 (UTC) Date: Mon, 25 Jun 2018 23:59:37 +0800 In-Reply-To: <20180625155805.kds7bl3cburblwv6@flea> References: <20180622124540.56203-1-icenowy@aosc.io> <20180622124540.56203-2-icenowy@aosc.io> <20180625155805.kds7bl3cburblwv6@flea> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v2 3/7] bus: add bus driver for accessing Allwinner A64 DE2 To: Maxime Ripard CC: Rob Herring , Chen-Yu Tsai , Jagan Teki , Jernej Skrabec , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-sunxi@googlegroups.com From: Icenowy Zheng Message-ID: <4DFADAD6-3E17-425F-8B03-CAC4402BF14F@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2018年6月25日 GMT+08:00 下午11:58:05, Maxime Ripard 写到: >On Fri, Jun 22, 2018 at 08:45:36PM +0800, Icenowy Zheng wrote: >> The "Display Engine 2.0" (usually called DE2) on the Allwinner A64 >SoC >> is different from the ones on other Allwinner SoCs. It requires a >SRAM >> region to be claimed, otherwise all DE2 subblocks won't be >accessible. >> >> Add a bus driver for the Allwinner A64 DE2 part which claims the SRAM >> region when probing. >> >> Signed-off-by: Icenowy Zheng >> --- >> No changes since v1. >> >> drivers/bus/Kconfig | 10 ++++++++ >> drivers/bus/Makefile | 1 + >> drivers/bus/sun50i-de2.c | 49 >++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 60 insertions(+) >> create mode 100644 drivers/bus/sun50i-de2.c >> >> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig >> index d1c0b60e9326..1851112ccc29 100644 >> --- a/drivers/bus/Kconfig >> +++ b/drivers/bus/Kconfig >> @@ -103,6 +103,16 @@ config SIMPLE_PM_BUS >> Controller (BSC, sometimes called "LBSC within Bus Bridge", or >> "External Bus Interface") as found on several Renesas ARM SoCs. >> >> +config SUN50I_DE2_BUS >> + bool "Allwinner A64 DE2 Bus Driver" >> + default ARM64 >> + depends on ARCH_SUNXI >> + select SUNXI_SRAM >> + help > >The alignment here should be one tab. > >> +static int sun50i_de2_bus_probe(struct platform_device *pdev) >> +{ >> + struct device_node *np = pdev->dev.of_node; >> + int ret; >> + >> + ret = sunxi_sram_claim(&pdev->dev); >> + if (ret) { >> + dev_err(&pdev->dev, "Error couldn't map SRAM to device\n"); >> + return ret; >> + } >> + >> + if (np) >> + of_platform_populate(np, NULL, NULL, &pdev->dev); > >Why do you need to test np here? Oh thanks. Currently it's only probeable via dt. > >Maxime