History log of /linux-master/drivers/spi/spi-altera-dfl.c
Revision Date Author Comments
# ec168190 29-Dec-2022 Yang Yingliang <yangyingliang@huawei.com>

spi: spi-altera-dfl: switch to use modern name

Change legacy name master to modern name host or controller.

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221229103837.4192759-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 26c48aea 29-Dec-2022 Yang Yingliang <yangyingliang@huawei.com>

spi: altera: switch to use modern name

Change legacy name master/slave to modern name host/target or controller.

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221229103837.4192759-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8e3ca32f 29-May-2022 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

spi: spi-altera-dfl: Fix an error handling path

The spi_alloc_master() call is not undone in all error handling paths.
Moreover, there is no .remove function to release the allocated memory.

In order to fix both this issues, switch to devm_spi_alloc_master().

This allows further simplification of the probe.

Fixes: ba2fc167e944 ("spi: altera: Add DFL bus driver for Altera API Controller")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/0607bb59f4073f86abe5c585d35245aef0b045c6.1653805901.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>


# f09f6dfe 18-Oct-2021 Russ Weight <russell.h.weight@intel.com>

spi: altera: Change to dynamic allocation of spi id

The spi-altera driver has two flavors: platform and dfl. I'm seeing
a case where I have both device types in the same machine, and they
are conflicting on the SPI ID:

... kernel: couldn't get idr
... kernel: WARNING: CPU: 28 PID: 912 at drivers/spi/spi.c:2920 spi_register_controller.cold+0x84/0xc0a

Both the platform and dfl drivers use the parent's driver ID as the SPI
ID. In the error case, the parent devices are dfl_dev.4 and
subdev_spi_altera.4.auto. When the second spi-master is created, the
failure occurs because the SPI ID of 4 has already been allocated.

Change the ID allocation to dynamic (by initializing bus_num to -1) to
avoid duplicate SPI IDs.

Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Link: https://lore.kernel.org/r/20211019002401.24041-1-russell.h.weight@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4f45f340 16-Jul-2021 Martin Hundebøll <mhu@silicom.dk>

spi: spi-altera-dfl: support n5010 feature revision

The Max10 BMC on the Silicom n5010 PAC is slightly different than the
existing BMCs, so use a dedicated feature revision detect it.

Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Martin Hundebøll <mhu@silicom.dk>
Signed-off-by: Moritz Fischer <mdf@kernel.org>


# 532259bf 11-May-2021 Zou Wei <zou_wei@huawei.com>

spi: altera: Remove redundant dev_err call in dfl_spi_altera_probe()

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Link: https://lore.kernel.org/r/1620716922-108572-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# ba2fc167 16-Apr-2021 Matthew Gerlach <matthew.gerlach@linux.intel.com>

spi: altera: Add DFL bus driver for Altera API Controller

This patch adds a Device Feature List (DFL) bus driver for the
Altera SPI Master controller. The SPI master is connected to an
Intel SPI Slave to Avalon Bridge inside an Intel MAX10
BMC Chip.

Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Link: https://lore.kernel.org/r/20210416165720.554144-3-matthew.gerlach@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>