spi: dw-mid: get a proper clock frequency for SPI2

The clock information is being kept in the custom register on Intel MID
platforms. Each controller has its own dedicated custom register for that.
Thus, to get a proper frequency we have to read value from the specific offset
to the register block. This patch makes this happen.

Fixes: d58cf5ff65 (spi: dw-pci: describe Intel MID controllers better)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andy Shevchenko
2015-01-22 17:59:34 +02:00
committed by Mark Brown
parent d58cf5ff65
commit d9c14743a3
2 changed files with 11 additions and 8 deletions

View File

@@ -82,14 +82,14 @@ static int spi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* clock rate, FIFO depth.
*/
if (desc) {
dws->num_cs = desc->num_cs;
dws->bus_num = desc->bus_num;
if (desc->setup) {
ret = desc->setup(dws);
if (ret)
return ret;
}
dws->num_cs = desc->num_cs;
dws->bus_num = desc->bus_num;
} else {
return -ENODEV;
}