Commit c5b88f29ba46997e1cae39153980cae475b87b82

Authored by Mario Six
Committed by Jagan Teki
1 parent 547bcc3d18

spi: Remove obsolete spi_base_setup_slave_fdt

0efc024 ("spi_flash: Add spi_flash_probe_fdt() to locate SPI by FDT
node") added a helper function spi_base_setup_slave_fdt to to set up a
SPI slave from a given FDT blob. The only user was the exynos SPI
driver.

But commit 73186c9 ("dm: exynos: Convert SPI to driver model") removed
the use of this function, hence rendering it obsolete.

Remove this function, as well as the CONFIG_OF_SPI option, which guarded
only this function.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Mario Six <mario.six@gdsys.cc>

Showing 3 changed files with 0 additions and 35 deletions Side-by-side Diff

... ... @@ -39,24 +39,4 @@
39 39  
40 40 return ptr;
41 41 }
42   -
43   -#ifdef CONFIG_OF_SPI
44   -struct spi_slave *spi_base_setup_slave_fdt(const void *blob, int busnum,
45   - int node)
46   -{
47   - int cs, max_hz, mode = 0;
48   -
49   - cs = fdtdec_get_int(blob, node, "reg", -1);
50   - max_hz = fdtdec_get_int(blob, node, "spi-max-frequency", 100000);
51   - if (fdtdec_get_bool(blob, node, "spi-cpol"))
52   - mode |= SPI_CPOL;
53   - if (fdtdec_get_bool(blob, node, "spi-cpha"))
54   - mode |= SPI_CPHA;
55   - if (fdtdec_get_bool(blob, node, "spi-cs-high"))
56   - mode |= SPI_CS_HIGH;
57   - if (fdtdec_get_bool(blob, node, "spi-half-duplex"))
58   - mode |= SPI_PREAMBLE;
59   - return spi_setup_slave(busnum, cs, max_hz, mode);
60   -}
61   -#endif
... ... @@ -330,20 +330,6 @@
330 330 */
331 331 struct spi_slave *spi_setup_slave_fdt(const void *blob, int slave_node,
332 332 int spi_node);
333   -
334   -/**
335   - * spi_base_setup_slave_fdt() - helper function to set up a SPI slace
336   - *
337   - * This decodes SPI properties from the slave node to determine the
338   - * chip select and SPI parameters.
339   - *
340   - * @blob: Device tree blob
341   - * @busnum: Bus number to use
342   - * @node: Device tree node for the SPI bus
343   - */
344   -struct spi_slave *spi_base_setup_slave_fdt(const void *blob, int busnum,
345   - int node);
346   -
347 333 #ifdef CONFIG_DM_SPI
348 334  
349 335 /**
scripts/config_whitelist.txt
... ... @@ -1554,7 +1554,6 @@
1554 1554 CONFIG_ODROID_REV_AIN
1555 1555 CONFIG_OFF_PADCONF
1556 1556 CONFIG_OF_
1557   -CONFIG_OF_SPI
1558 1557 CONFIG_OF_SPI_FLASH
1559 1558 CONFIG_OF_STDOUT_PATH
1560 1559 CONFIG_OMAP_EHCI_PHY1_RESET_GPIO