Re: [PATCH v4] i2c: qcom-geni: Add support for GPI DMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



19.10.2021 09:01, Vinod Koul wrote:
This adds capability to use GSI DMA for I2C transfers

Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
---
Changes since v3:
  - remove separate tx and rx function for gsi dma and make a common one
  - remove global structs and use local variables instead


Hi, I've tried this patch on sm8150 board and I'm seeing weird things:

[    0.428829] gpi c00000.dma-controller: Adding to iommu group 0
[    0.480453] geni_se_qup cc0000.geniqup: Adding to iommu group 1
[ 0.484019] geni_i2c c80000.i2c: Bus frequency not specified, default to 100kHz. [ 0.487172] geni_i2c c80000.i2c: error 0000000000000000: Failed to get tx DMA ch [ 0.495499] geni_i2c c80000.i2c: error 0000000000000000: Failed to get rx DMA ch
[    0.499842] geni_i2c c80000.i2c: Grabbed GPI dma channels
[    0.504784] geni_i2c c80000.i2c: Using GPI DMA mode for I2C
[    0.510812] geni_i2c c80000.i2c: Geni-I2C adaptor successfully added

It seems weird to me that it "failed to get DMA channels", but then says anyway "Grabbed GPI DMA channels" and "Using GPI DMA mode for I2C".

What I did in dts is basically include sm8150.dtsi and do

&gpi_dma2 {
	status = "okay";
};

&i2c17 {
	status = "okay";
	dmas = <&gpi_dma2 0 0 QCOM_GPI_I2C>,
		<&gpi_dma2 1 0 QCOM_GPI_I2C>;
	dma-names = "tx", "rx";
	/* empty - no clients */
}

Another observation, even if I comment out "dmas" and "dma-names" in i2c17 node, I get

[ 0.487037] geni_i2c c80000.i2c: error (____ptrval____): Failed to get tx DMA ch [ 0.490077] geni_i2c c80000.i2c: error (____ptrval____): Failed to get rx DMA ch
[    0.493077] geni_i2c c80000.i2c: Grabbed GPI dma channels
[    0.496061] geni_i2c c80000.i2c: Using GPI DMA mode for I2C
[    0.500155] geni_i2c c80000.i2c: Geni-I2C adaptor successfully added

--
Regards
Alexey Minnekhanov



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux