mfd: intel-lpss: Program REMAP register in PIO mode
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Apr 2018 15:00:10 +0000 (18:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:21:32 +0000 (11:21 +0200)
commit d28b62520830b2d0bffa2d98e81afc9f5e537e8b upstream.

According to documentation REMAP register has to be programmed in
either DMA or PIO mode of the slice.

Move the DMA capability check below to let REMAP register be programmed
in PIO mode.

Cc: stable@vger.kernel.org # 4.3+
Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/intel-lpss.c

index fe89e5e337d5461b51b2c9ba4fbb971bf858a52a..ac867489b5a9b783024ce58741f0f00d7288e7c5 100644 (file)
@@ -269,11 +269,11 @@ static void intel_lpss_init_dev(const struct intel_lpss *lpss)
 
        intel_lpss_deassert_reset(lpss);
 
+       intel_lpss_set_remap_addr(lpss);
+
        if (!intel_lpss_has_idma(lpss))
                return;
 
-       intel_lpss_set_remap_addr(lpss);
-
        /* Make sure that SPI multiblock DMA transfers are re-enabled */
        if (lpss->type == LPSS_DEV_SPI)
                writel(value, lpss->priv + LPSS_PRIV_SSP_REG);