From: Tony Lindgren <tony@atomide.com>
To: Robert Schwebel <r.schwebel@pengutronix.de>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
"Benoît Cousson" <bcousson@baylibre.com>,
"Peter Ujfalusi" <peter.ujfalusi@ti.com>
Subject: Re: EDMA oftree entry for AM335x
Date: Mon, 4 May 2015 14:24:57 -0700 [thread overview]
Message-ID: <20150504212457.GB4810@atomide.com> (raw)
In-Reply-To: <20150504211150.GU15254@pengutronix.de>
* Robert Schwebel <r.schwebel@pengutronix.de> [150504 14:13]:
> Hi Tony,
>
> On Mon, May 04, 2015 at 07:11:03AM -0700, Tony Lindgren wrote:
> > Adding Peter to Cc as well.
>
> You didn't :)
Trying again :)
> > > 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:
With the above the tptc instances are being probed as separate
device entries that do not register with tpcc without the
related driver changes. I don't think we even parse the
compatible = "ti,tptc3" property currently.
Regards,
Tony
> ----------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, <SessEnd), retry #3, port1 0008010c
> [ 1.561977] random: systemd urandom read with 17 bits of entropy available
>
> Welcome to PTXdist / af inventions-GF!
>
> <userspace starts>
>
> ----------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, <SessEnd), retry #3, port1 0008010c
>
> <hangs>
>
> ----------8<---------- patch ----------8<----------
>
> 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";
>
> rsc
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: EDMA oftree entry for AM335x
Date: Mon, 4 May 2015 14:24:57 -0700 [thread overview]
Message-ID: <20150504212457.GB4810@atomide.com> (raw)
In-Reply-To: <20150504211150.GU15254@pengutronix.de>
* Robert Schwebel <r.schwebel@pengutronix.de> [150504 14:13]:
> Hi Tony,
>
> On Mon, May 04, 2015 at 07:11:03AM -0700, Tony Lindgren wrote:
> > Adding Peter to Cc as well.
>
> You didn't :)
Trying again :)
> > > 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 at 49000000 {
> > compatible = "ti,edma3";
> > ti,hwmods = "tpcc";
> > reg = <0x49000000 0x10000>;
> > interrupts = <12 13 14>;
> > #dma-cells = <1>;
> > };
> >
> > tptc0: tptc at 49800000 {
> > compatible = "ti,tptc3";
> > ti,hwmods = "tptc0";
> > reg = <0x49800000 0x10000>;
> > };
> >
> > tptc1: tptc at 49900000 {
> > compatible = "ti,tptc3";
> > ti,hwmods = "tptc1";
> > reg = <0x49900000 0x10000>;
> > };
> >
> > tptc2: tptc at 49a00000 {
> > compatible = "ti,tptc3";
> > ti,hwmods = "tptc2";
> > reg = <0x49a00000 0x10000>;
> > };
> > ...
> > };
>
> I tried this, with the patch below, but it doesn't work:
With the above the tptc instances are being probed as separate
device entries that do not register with tpcc without the
related driver changes. I don't think we even parse the
compatible = "ti,tptc3" property currently.
Regards,
Tony
> ----------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 at 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, <SessEnd), retry #3, port1 0008010c
> [ 1.561977] random: systemd urandom read with 17 bits of entropy available
>
> Welcome to PTXdist / af inventions-GF!
>
> <userspace starts>
>
> ----------8<---------- Output with patch ----------8<----------
>
> [ 0.000000] Linux version 4.1.0-rc1+ (rsc at 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, <SessEnd), retry #3, port1 0008010c
>
> <hangs>
>
> ----------8<---------- patch ----------8<----------
>
> 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 at 49000000 {
> + edma: tpcc at 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 at 49800000 {
> + compatible = "ti,tptc3";
> + ti,hwmods = "tptc0";
> + reg = <0x49800000 0x10000>;
> + };
> +
> + tptc1: tptc at 49900000 {
> + compatible = "ti,tptc3";
> + ti,hwmods = "tptc1";
> + reg = <0x49900000 0x10000>;
> + };
> +
> + tptc2: tptc at 49a00000 {
> + compatible = "ti,tptc3";
> + ti,hwmods = "tptc2";
> + reg = <0x49a00000 0x10000>;
> + };
> +
> gpio0: gpio at 44e07000 {
> compatible = "ti,omap4-gpio";
> ti,hwmods = "gpio1";
>
> rsc
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2015-05-04 21:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 6:43 EDMA oftree entry for AM335x Robert Schwebel
2015-05-04 6:43 ` Robert Schwebel
2015-05-04 14:11 ` Tony Lindgren
2015-05-04 14:11 ` Tony Lindgren
2015-05-04 21:11 ` Robert Schwebel
2015-05-04 21:11 ` Robert Schwebel
2015-05-04 21:24 ` Tony Lindgren [this message]
2015-05-04 21:24 ` Tony Lindgren
2015-05-04 21:33 ` Robert Schwebel
2015-05-04 21:33 ` Robert Schwebel
2015-05-04 21:42 ` Tony Lindgren
2015-05-04 21:42 ` Tony Lindgren
2015-05-05 13:53 ` Peter Ujfalusi
2015-05-05 13:53 ` Peter Ujfalusi
2015-05-05 14:58 ` Tony Lindgren
2015-05-05 14:58 ` Tony Lindgren
2015-05-06 11:22 ` Peter Ujfalusi
2015-05-06 11:22 ` Peter Ujfalusi
2015-05-06 14:39 ` Tony Lindgren
2015-05-06 14:39 ` Tony Lindgren
2015-06-08 10:59 ` Robert Schwebel
2015-06-08 10:59 ` Robert Schwebel
2015-06-10 5:10 ` Tony Lindgren
2015-06-10 5:10 ` Tony Lindgren
2015-06-10 11:13 ` Peter Ujfalusi
2015-06-10 11:13 ` Peter Ujfalusi
2015-06-11 14:13 ` Tony Lindgren
2015-06-11 14:13 ` Tony Lindgren
2015-06-11 14:53 ` Peter Ujfalusi
2015-06-11 14:53 ` Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150504212457.GB4810@atomide.com \
--to=tony@atomide.com \
--cc=bcousson@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=r.schwebel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.