From patchwork Mon May 4 21:11:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Schwebel X-Patchwork-Id: 6330111 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A85179F1C2 for ; Mon, 4 May 2015 21:14:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 900682028D for ; Mon, 4 May 2015 21:14:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 7A5AA200F2 for ; Mon, 4 May 2015 21:14:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YpNf2-0002RW-HS; Mon, 04 May 2015 21:12:20 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YpNez-0002Q4-5T for linux-arm-kernel@lists.infradead.org; Mon, 04 May 2015 21:12:18 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0] ident=Debian-exim) by metis.ext.pengutronix.de with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YpNeZ-0005a6-90; Mon, 04 May 2015 23:11:51 +0200 Received: from rsc by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1YpNeY-0003Kq-7C; Mon, 04 May 2015 23:11:50 +0200 Date: Mon, 4 May 2015 23:11:50 +0200 From: Robert Schwebel To: Tony Lindgren Subject: Re: EDMA oftree entry for AM335x Message-ID: <20150504211150.GU15254@pengutronix.de> References: <20150504064323.GU15254@pengutronix.de> <20150504141103.GD24469@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150504141103.GD24469@atomide.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 23:07:50 up 49 days, 8:59, 78 users, load average: 0, 08, 0, 09, 0, 11 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: rsc@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150504_141217_434048_8FB91AA3 X-CRM114-Status: GOOD ( 21.70 ) X-Spam-Score: -0.0 (/) Cc: linux-omap@vger.kernel.org, =?utf-8?Q?Beno=C3=AEt?= Cousson , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Hi Tony, On Mon, May 04, 2015 at 07:11:03AM -0700, Tony Lindgren wrote: > Adding Peter to Cc as well. You didn't :) > > The patch description says the device should be split into more devices instead > > of specifying several ti,hwmods entries, but unfortunately the Documentation > > still suggests the above format in Documentation/devicetree/bindings/dma/ti-edma.txt. > > > > How would a correct entry look like? > > Each tptc instance has it's own sysconfig register. This means each > one of them can be clocked and idled independently. They should be > treated as separate device instances. I believe the interrupts all > belong to the tpcc, which should be also treated as a separate > device instance. > > In order to get rid of the ti,hwmods property, we want to have a > 1-1-1 mapping of the compatible property, ti,hwmod property, and > the device entry. > > Looking at the TRM "Table 2-1. L3 Memory Map", these all are on > the L3, so they should be like this for now (assuming the > interrupts all belong to tpcc): > > ocp { > ... > > edma: tpcc@49000000 { > compatible = "ti,edma3"; > ti,hwmods = "tpcc"; > reg = <0x49000000 0x10000>; > interrupts = <12 13 14>; > #dma-cells = <1>; > }; > > tptc0: tptc@49800000 { > compatible = "ti,tptc3"; > ti,hwmods = "tptc0"; > reg = <0x49800000 0x10000>; > }; > > tptc1: tptc@49900000 { > compatible = "ti,tptc3"; > ti,hwmods = "tptc1"; > reg = <0x49900000 0x10000>; > }; > > tptc2: tptc@49a00000 { > compatible = "ti,tptc3"; > ti,hwmods = "tptc2"; > reg = <0x49a00000 0x10000>; > }; > ... > }; I tried this, with the patch below, but it doesn't work: ----------8<---------- Output with 4.1-rc1 vanilla ----------8<---------- Loading ARM Linux zImage '/mnt/mmc0.1//boot/zImage' Loading devicetree from '/mnt/mmc0.1//boot/am335x-afi-gf.dtb' commandline: console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait loglevel=6 [ 0.000000] Linux version 4.1.0-rc1 (rsc@callisto) (gcc version 4.8.3 20131111 (prerelease) (OSELAS.Toolchain-2013.12.2 linaro-4.8-2013.11) ) #9 PREEMPT Mon May 4 22:24:41 CEST 2015 [ 0.000000] earlycon: no match for ttyO2,115200n8 [ 0.000000] Kernel command line: console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait loglevel=6 [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB) [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0674ed4 (6580 kB) [ 0.000000] .init : 0xc0675000 - 0xc06b2000 ( 244 kB) [ 0.000000] .data : 0xc06b2000 - 0xc06fd3e8 ( 301 kB) [ 0.000000] .bss : 0xc0700000 - 0xc073a5d8 ( 234 kB) [ 0.145038] omap_hwmod: tptc0 using broken dt data from edma [ 0.145247] omap_hwmod: tptc1 using broken dt data from edma [ 0.145425] omap_hwmod: tptc2 using broken dt data from edma [ 0.151051] omap_hwmod: debugss: _wait_target_disable failed [ 0.323079] SCSI subsystem initialized [ 0.356218] NFS: Registering the id_resolver key type [ 0.356339] Key type id_resolver registered [ 0.356354] Key type id_legacy registered [ 0.518782] 47401300.usb-phy supply vcc not found, using dummy regulator [ 0.532356] 47401b00.usb-phy supply vcc not found, using dummy regulator [ 0.554370] Key type dns_resolver registered [ 0.559333] omap_voltage_late_init: Voltage driver support not added [ 0.775905] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.140875] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_vrise (80, ----------8<---------- Output with patch ----------8<---------- [ 0.000000] Linux version 4.1.0-rc1+ (rsc@callisto) (gcc version 4.8.3 20131111 (prerelease) (OSELAS.Toolchain-2013.12.2 linaro-4.8-2013.11) ) #10 PREEMPT Mon May 4 23:03:27 CEST 2015 [ 0.000000] earlycon: no match for ttyO2,115200n8 [ 0.000000] Kernel command line: console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait loglevel=6 [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB) [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0674ed4 (6580 kB) [ 0.000000] .init : 0xc0675000 - 0xc06b2000 ( 244 kB) [ 0.000000] .data : 0xc06b2000 - 0xc06fd3e8 ( 301 kB) [ 0.000000] .bss : 0xc0700000 - 0xc073a5d8 ( 234 kB) [ 0.151101] omap_hwmod: debugss: _wait_target_disable failed [ 0.278517] edma 49000000.tpcc: failed to get DT data [ 0.278670] edma: probe of 49000000.tpcc failed with error -12 [ 0.312864] SCSI subsystem initialized [ 0.345860] NFS: Registering the id_resolver key type [ 0.345977] Key type id_resolver registered [ 0.345992] Key type id_legacy registered [ 0.493001] spi spi1.0: not using DMA for McSPI [ 0.498211] spi spi1.1: not using DMA for McSPI [ 0.511199] 47401300.usb-phy supply vcc not found, using dummy regulator [ 0.524715] 47401b00.usb-phy supply vcc not found, using dummy regulator [ 0.546556] Key type dns_resolver registered [ 0.551522] omap_voltage_late_init: Voltage driver support not added [ 0.644175] omap_hsmmc 48060000.mmc: unable to obtain RX DMA engine channel 3473832464 [ 1.133193] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in a_wait_vrise (80, ----------8<---------- patch ----------8<---------- rsc diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 21fcc44..34eb437 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -156,15 +156,32 @@ reg = <0x48200000 0x1000>; }; - edma: edma@49000000 { + edma: tpcc@49000000 { compatible = "ti,edma3"; - ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; - reg = <0x49000000 0x10000>, - <0x44e10f90 0x40>; + ti,hwmods = "tpcc"; + reg = <0x49000000 0x10000>; interrupts = <12 13 14>; #dma-cells = <1>; }; + tptc0: tptc@49800000 { + compatible = "ti,tptc3"; + ti,hwmods = "tptc0"; + reg = <0x49800000 0x10000>; + }; + + tptc1: tptc@49900000 { + compatible = "ti,tptc3"; + ti,hwmods = "tptc1"; + reg = <0x49900000 0x10000>; + }; + + tptc2: tptc@49a00000 { + compatible = "ti,tptc3"; + ti,hwmods = "tptc2"; + reg = <0x49a00000 0x10000>; + }; + gpio0: gpio@44e07000 { compatible = "ti,omap4-gpio"; ti,hwmods = "gpio1";