[Letux-kernel] X1600 / LX16 support - here: adding MMC
Paul Boddie
paul at boddie.org.uk
Wed Feb 7 16:54:23 CET 2024
On Tuesday, 6 February 2024 22:18:52 CET H. Nikolaus Schaller wrote:
> > Am 06.02.2024 um 21:21 schrieb Paul Boddie <paul at boddie.org.uk>:
> >
> > On Tuesday, 6 February 2024 19:47:27 CET H. Nikolaus Schaller wrote:
> >>
> >> So we likely can take the compatible string ingenic,jz4780-mmc", move
> >> some stuff from lx16.dts to x1600.dtsi and set up the clock (and
> >> potentially the DMA nodes) and it might start to do something...
> >
> > I might even give that a try.
>
> Would be fine!
OK, I gave it a try. First of all, I changed the compatible property, as
suggested. Then, I had to change the DMA usage in the X1600 device tree to use
the mainline JZ4780 driver, also introducing a suitable header file for the
X1600 request types and removing usage of the vendor header for DMA.
I also found that the LX16 device tree was using pinctrl configurations for
"disable" and "enable" that were not recognised, but these appear superfluous
and it seems that they can be removed. And I found that this line had been
added to the MMC driver immediately after the indicated structure member had
been set:
host->use_dma = false;
I suppose this was done to avoid DMA since it wasn't working yet. In any case,
this is what I have achieved so far:
[ 0.000188] jz4740-mmc 13450000.mmc: Ingenic SD/MMC card driver registered
[ 0.000188] jz4740-mmc 13450000.mmc: Using DMA, 4-bit mode
[ 0.000188] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 0.000188] clk: Not disabling unused clocks
[ 0.000188] jz4740-mmc 13460000.mmc: Ingenic SD/MMC card driver registered
[ 0.000188] jz4740-mmc 13460000.mmc: Using DMA, 4-bit mode
[ 0.000188] /dev/root: Can't open blockdev
[ 0.000188] VFS: Cannot open root device "/dev/mmcblk0p2" or unknown-
block(0,0): error -6
[ 0.000188] Please append a correct "root=" boot option; here are the
available partitions:
Unfortunately, all of the partitions are ram0..15. In principle, the desired
root device seems correct, so I don't think this is caused by the absent
cmdline parsing.
Anyway, I have pushed the changes to the paulb-letux-6.7-rc8-mmc branch in
case someone else can see what I have missed.
Paul
More information about the Letux-kernel
mailing list