Commit 71ea0e3a authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: pxa2xx-pci: Refactor Quark X1000 to use ->setup()

Refactor Quark X1000 handling code to use ->setup() instead of using
the configuration data structure directly.

It will allow to refactor further to avoid intermediate storage for
the used configuration parameters.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220225172350.69797-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 78e27f97
...@@ -167,6 +167,14 @@ static int mrfld_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c) ...@@ -167,6 +167,14 @@ static int mrfld_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c)
return 0; return 0;
} }
static int qrk_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c)
{
c->num_chipselect = 1;
c->max_clk_rate = 50000000;
return 0;
}
static struct pxa_spi_info spi_info_configs[] = { static struct pxa_spi_info spi_info_configs[] = {
[PORT_CE4100] = { [PORT_CE4100] = {
.type = PXA25x_SSP, .type = PXA25x_SSP,
...@@ -209,8 +217,7 @@ static struct pxa_spi_info spi_info_configs[] = { ...@@ -209,8 +217,7 @@ static struct pxa_spi_info spi_info_configs[] = {
[PORT_QUARK_X1000] = { [PORT_QUARK_X1000] = {
.type = QUARK_X1000_SSP, .type = QUARK_X1000_SSP,
.port_id = -1, .port_id = -1,
.num_chipselect = 1, .setup = qrk_spi_setup,
.max_clk_rate = 50000000,
}, },
[PORT_LPT0] = { [PORT_LPT0] = {
.type = LPSS_LPT_SSP, .type = LPSS_LPT_SSP,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment