Re: [PATCH 2/6] spi: dw-g2: Add Synopsys DWC SSI v2.02a driver
From: Prakriti Sharma
Date: Sun Nov 29 2026 - 21:42:07 EST
Hi Mark,
Thanks for the review on the base driver. v2 addresses these points;
notes inline below.
> F: drivers/spi/spi-dw-g2-*.[ch]
> There's drivers/spi/spi-dw-g2.h too.
MAINTAINERS now uses F: drivers/spi/spi-dw-g2*.
> drop debugfs / consider regmap
Dropped debugfs entirely (no register dump / regset). XIP runtime knobs
(continuous, prefetch, mode) are sysfs-only.
> dev_warn_once()
Done for speed clamping in dw_spi_g2_setup().
> timeouts should be scaled by transfer length / bus speed
FIFO loops use one deadline per transfer from dw_spi_g2_xfer_timeout_us()
(BAUDR for the active CS plus slack), not a per-byte 1s reset.
> half duplex vs transfer_one()
Regular SPI uses IRQ-driven full-duplex transfer_one() (TMOD=TR). spi-mem
paths still poll the FIFO with IMR masked so CS timing stays atomic on
exec_op().
> open coding spi_mem_exec_op()
Same constraint as spi-dw-core: native CS drops when the TX FIFO empties, so
we cannot use the generic split-transfer fallback. Each op is one FIFO
stream with SER set after prefill; the rationale is in the driver.
> drop dev_info() in init
Removed from core init and probe paths.
> transfer_one / local_irq_disable
transfer_one() and set_cs() are registered. No local_irq_disable() on the
transfer path.
> only clear interrupts you handled
The IRQ handler acknowledges only the FIFO error bits it handles via
selective ICR writes.
> mandatory IRQ / named lines
The binding requires interrupts. Probe requests rxf/txe/txaf/wsf by name
when present, else interrupt index 0. dw_spi_g2_irq() services TXEI/RXFI
for transfer_one and FIFO errors.
> validate num-cs
Validated to 1..4 when the property is present.
> devm vs remove() ordering
Probe uses devm throughout (devm_spi_alloc_host, devm reset,
devm_spi_register_controller); remove() is gone. CS for non-mem SPI goes
through set_cs() at message scope.
Thanks,
Prakriti