[Letux-kernel] [PATCH 00/20] A bunch of JZ4730 fixups for letux-kernel

H. Nikolaus Schaller hns at goldelico.com
Sat Dec 5 20:27:27 CET 2020


Ok, first finding

> Am 05.12.2020 um 20:07 schrieb H. Nikolaus Schaller <hns at goldelico.com>:

>> [    0.035805] jz4780-dma 10020000.dma: failed to get I/O memory
>> [    0.036100] jz4780-dma: probe of 10020000.dma failed with error -22
> 
> 
> Now let's look why the DMA fails in first place. I'll take a look at that now.
> 
> Yes, it is adjacent to the mmc controller:
> 
> 	mmc: mmc at 10021000 {
> 		compatible = "ingenic,jz4740-mmc";
> 		reg = <0x10021000 0x100>;
> 
> 	dma: dma at 10020000 {
> 		compatible = "ingenic,jz4730-dma";
> 		reg = <0x10020000 0x100>;

jz4725 uses:

	dmac: dma-controller at 13020000 {
		compatible = "ingenic,jz4725b-dma";
		reg = <0x13020000 0xd8>, <0x13020300 0x14>;

jz4740 uses:

	dmac: dma-controller at 13020000 {
		compatible = "ingenic,jz4740-dma";
		reg = <0x13020000 0xbc>, <0x13020300 0x14>;
		#dma-cells = <2>;

jz4780 uses:

	dma: dma at 13420000 {
		compatible = "ingenic,jz4780-dma";
		reg = <0x13420000 0x400>, <0x13421000 0x40>;

So there is a second IORESOURCE_MEM plus logic to check if
it exists. This is missing and the driver emits the

> [    0.035805] jz4780-dma 10020000.dma: failed to get I/O memory
> [    0.036100] jz4780-dma: probe of 10020000.dma failed with error -22

If I understand correctly, we could set the JZ_SOC_DATA_ALLOW_LEGACY_DT
flag or add a second register range to the DT.

I think the second is intended by upstream maintainers or the flag
would not be called "LEGACY_DT" and be used only for the JZ4780.

So I tried the assumption that memory layout is more similar to the
JZ475 and JZ4740 than the JZ4780.

> 	dma: dma at 10020000 {
> 		compatible = "ingenic,jz4730-dma";
> 		reg = <0x10020000 0x100>, <0x10020300 0x14>;


Unfortunately it has an effect - which is that boot hangs after

[    0.009935] Console: colour dummy device 80x25
[    0.014479] printk: console [tty0] enabled
[    0.001103] printk: bootconsole [jz4740_uart0] disabled

Maybe something in the dma driver is hanging.

Questionable is the 0x100 - but it is usually not a problem to allocate
a little more as long as there is no overlap.

Or does someone have a JZ4730 programmer's manual?
Probably we also could dig out this from the older kernels or U-Boot.


BR,
Nikolaus





More information about the Letux-kernel mailing list