* [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up
@ 2015-09-14 8:32 Andy Shevchenko
2015-09-14 8:32 ` [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP Andy Shevchenko
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Andy Shevchenko @ 2015-09-14 8:32 UTC (permalink / raw)
To: Lee Jones, linux-kernel, Mika Westerberg; +Cc: Andy Shevchenko
There are two small patches to fix a bug which was found next day after driver
was merged and one clean up to allow 64-bit writes with generic helpers.
Lee, please apply them for v4.3-rc2.
Andy Shevchenko (2):
mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP
mfd: intel-lpss: use writeq() helper
drivers/mfd/intel-lpss.c | 12 ++++--------
drivers/mfd/intel-lpss.h | 2 ++
2 files changed, 6 insertions(+), 8 deletions(-)
--
2.5.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP
2015-09-14 8:32 [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko
@ 2015-09-14 8:32 ` Andy Shevchenko
2015-09-20 4:16 ` Lee Jones
2015-09-14 8:32 ` [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper Andy Shevchenko
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2015-09-14 8:32 UTC (permalink / raw)
To: Lee Jones, linux-kernel, Mika Westerberg; +Cc: Andy Shevchenko
Jim Davis reported the compilation error with a random configuration which
apparently has CONFIG_PM=y and CONFIG_PM_SLEEP=n. With that conditions we have
missed definition of INTEL_LPSS_SLEEP_PM_OPS macro. Add it here.
Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel-lpss.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h
index f28cb28a..2c7f8d7 100644
--- a/drivers/mfd/intel-lpss.h
+++ b/drivers/mfd/intel-lpss.h
@@ -42,6 +42,8 @@ int intel_lpss_resume(struct device *dev);
.thaw = intel_lpss_resume, \
.poweroff = intel_lpss_suspend, \
.restore = intel_lpss_resume,
+#else
+#define INTEL_LPSS_SLEEP_PM_OPS
#endif
#define INTEL_LPSS_RUNTIME_PM_OPS \
--
2.5.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper
2015-09-14 8:32 [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko
2015-09-14 8:32 ` [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP Andy Shevchenko
@ 2015-09-14 8:32 ` Andy Shevchenko
2015-09-20 4:16 ` Lee Jones
2015-09-14 14:43 ` [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Mika Westerberg
2015-09-17 8:20 ` Andy Shevchenko
3 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2015-09-14 8:32 UTC (permalink / raw)
To: Lee Jones, linux-kernel, Mika Westerberg; +Cc: Andy Shevchenko
There are already helper functions to do 64-bit I/O on 32-bit machines, thus we
don't need to reinvent the wheel. In our case we can't use readq() / writeq()
even on 64-bit kernel since there is a hardware limitation (OCP bus is a 32-bit
bus).
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel-lpss.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index fdf4d5c..001a7d7 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -26,6 +26,8 @@
#include <linux/pm_runtime.h>
#include <linux/seq_file.h>
+#include <asm-generic/io-64-nonatomic-lo-hi.h>
+
#include "intel-lpss.h"
#define LPSS_DEV_OFFSET 0x000
@@ -52,8 +54,7 @@
#define LPSS_PRIV_SSP_REG 0x20
#define LPSS_PRIV_SSP_REG_DIS_DMA_FIN BIT(0)
-#define LPSS_PRIV_REMAP_ADDR_LO 0x40
-#define LPSS_PRIV_REMAP_ADDR_HI 0x44
+#define LPSS_PRIV_REMAP_ADDR 0x40
#define LPSS_PRIV_CAPS 0xfc
#define LPSS_PRIV_CAPS_NO_IDMA BIT(8)
@@ -250,12 +251,7 @@ static void intel_lpss_set_remap_addr(const struct intel_lpss *lpss)
{
resource_size_t addr = lpss->info->mem->start;
- writel(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR_LO);
-#if BITS_PER_LONG > 32
- writel(addr >> 32, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI);
-#else
- writel(0, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI);
-#endif
+ lo_hi_writeq(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR);
}
static void intel_lpss_deassert_reset(const struct intel_lpss *lpss)
--
2.5.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up
2015-09-14 8:32 [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko
2015-09-14 8:32 ` [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP Andy Shevchenko
2015-09-14 8:32 ` [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper Andy Shevchenko
@ 2015-09-14 14:43 ` Mika Westerberg
2015-09-17 8:20 ` Andy Shevchenko
3 siblings, 0 replies; 8+ messages in thread
From: Mika Westerberg @ 2015-09-14 14:43 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Lee Jones, linux-kernel
On Mon, Sep 14, 2015 at 11:32:46AM +0300, Andy Shevchenko wrote:
> There are two small patches to fix a bug which was found next day after driver
> was merged and one clean up to allow 64-bit writes with generic helpers.
>
> Lee, please apply them for v4.3-rc2.
>
> Andy Shevchenko (2):
> mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP
> mfd: intel-lpss: use writeq() helper
>
> drivers/mfd/intel-lpss.c | 12 ++++--------
> drivers/mfd/intel-lpss.h | 2 ++
> 2 files changed, 6 insertions(+), 8 deletions(-)
For both,
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up
2015-09-14 8:32 [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko
` (2 preceding siblings ...)
2015-09-14 14:43 ` [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Mika Westerberg
@ 2015-09-17 8:20 ` Andy Shevchenko
2015-09-17 13:12 ` Lee Jones
3 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2015-09-17 8:20 UTC (permalink / raw)
To: Lee Jones, linux-kernel, Mika Westerberg
On Mon, 2015-09-14 at 11:32 +0300, Andy Shevchenko wrote:
> There are two small patches to fix a bug which was found next day
> after driver
> was merged and one clean up to allow 64-bit writes with generic
> helpers.
>
> Lee, please apply them for v4.3-rc2.
Gentle ping for this series. It would be really nice to have it in v4.3
-rc2.
>
> Andy Shevchenko (2):
> mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP
> mfd: intel-lpss: use writeq() helper
>
> drivers/mfd/intel-lpss.c | 12 ++++--------
> drivers/mfd/intel-lpss.h | 2 ++
> 2 files changed, 6 insertions(+), 8 deletions(-)
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up
2015-09-17 8:20 ` Andy Shevchenko
@ 2015-09-17 13:12 ` Lee Jones
0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2015-09-17 13:12 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel, Mika Westerberg
On Thu, 17 Sep 2015, Andy Shevchenko wrote:
> On Mon, 2015-09-14 at 11:32 +0300, Andy Shevchenko wrote:
> > There are two small patches to fix a bug which was found next day
> > after driver
> > was merged and one clean up to allow 64-bit writes with generic
> > helpers.
> >
> > Lee, please apply them for v4.3-rc2.
>
> Gentle ping for this series. It would be really nice to have it in v4.3
> -rc2.
I plan to start reviewing again tomorrow (on the plane), as I have a
few loose ends to tie up before travelling.
> > Andy Shevchenko (2):
> > mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP
> > mfd: intel-lpss: use writeq() helper
> >
> > drivers/mfd/intel-lpss.c | 12 ++++--------
> > drivers/mfd/intel-lpss.h | 2 ++
> > 2 files changed, 6 insertions(+), 8 deletions(-)
> >
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP
2015-09-14 8:32 ` [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP Andy Shevchenko
@ 2015-09-20 4:16 ` Lee Jones
0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2015-09-20 4:16 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel, Mika Westerberg
On Mon, 14 Sep 2015, Andy Shevchenko wrote:
> Jim Davis reported the compilation error with a random configuration which
> apparently has CONFIG_PM=y and CONFIG_PM_SLEEP=n. With that conditions we have
> missed definition of INTEL_LPSS_SLEEP_PM_OPS macro. Add it here.
>
> Reported-by: Jim Davis <jim.epost@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/mfd/intel-lpss.h | 2 ++
> 1 file changed, 2 insertions(+)
Applied for -fixes.
> diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h
> index f28cb28a..2c7f8d7 100644
> --- a/drivers/mfd/intel-lpss.h
> +++ b/drivers/mfd/intel-lpss.h
> @@ -42,6 +42,8 @@ int intel_lpss_resume(struct device *dev);
> .thaw = intel_lpss_resume, \
> .poweroff = intel_lpss_suspend, \
> .restore = intel_lpss_resume,
> +#else
> +#define INTEL_LPSS_SLEEP_PM_OPS
> #endif
>
> #define INTEL_LPSS_RUNTIME_PM_OPS \
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper
2015-09-14 8:32 ` [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper Andy Shevchenko
@ 2015-09-20 4:16 ` Lee Jones
0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2015-09-20 4:16 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel, Mika Westerberg
On Mon, 14 Sep 2015, Andy Shevchenko wrote:
> There are already helper functions to do 64-bit I/O on 32-bit machines, thus we
> don't need to reinvent the wheel. In our case we can't use readq() / writeq()
> even on 64-bit kernel since there is a hardware limitation (OCP bus is a 32-bit
> bus).
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/mfd/intel-lpss.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
> index fdf4d5c..001a7d7 100644
> --- a/drivers/mfd/intel-lpss.c
> +++ b/drivers/mfd/intel-lpss.c
> @@ -26,6 +26,8 @@
> #include <linux/pm_runtime.h>
> #include <linux/seq_file.h>
>
> +#include <asm-generic/io-64-nonatomic-lo-hi.h>
> +
> #include "intel-lpss.h"
>
> #define LPSS_DEV_OFFSET 0x000
> @@ -52,8 +54,7 @@
> #define LPSS_PRIV_SSP_REG 0x20
> #define LPSS_PRIV_SSP_REG_DIS_DMA_FIN BIT(0)
>
> -#define LPSS_PRIV_REMAP_ADDR_LO 0x40
> -#define LPSS_PRIV_REMAP_ADDR_HI 0x44
> +#define LPSS_PRIV_REMAP_ADDR 0x40
>
> #define LPSS_PRIV_CAPS 0xfc
> #define LPSS_PRIV_CAPS_NO_IDMA BIT(8)
> @@ -250,12 +251,7 @@ static void intel_lpss_set_remap_addr(const struct intel_lpss *lpss)
> {
> resource_size_t addr = lpss->info->mem->start;
>
> - writel(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR_LO);
> -#if BITS_PER_LONG > 32
> - writel(addr >> 32, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI);
> -#else
> - writel(0, lpss->priv + LPSS_PRIV_REMAP_ADDR_HI);
> -#endif
> + lo_hi_writeq(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR);
> }
>
> static void intel_lpss_deassert_reset(const struct intel_lpss *lpss)
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-20 4:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-14 8:32 [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Andy Shevchenko
2015-09-14 8:32 ` [PATCH v1 1/2] mfd: intel-lpss: fix build error when !CONFIG_PM_SLEEP Andy Shevchenko
2015-09-20 4:16 ` Lee Jones
2015-09-14 8:32 ` [PATCH v1 2/2] mfd: intel-lpss: use writeq() helper Andy Shevchenko
2015-09-20 4:16 ` Lee Jones
2015-09-14 14:43 ` [PATCH v1 0/2] mfd: intel-lpss: fix a bug and clean up Mika Westerberg
2015-09-17 8:20 ` Andy Shevchenko
2015-09-17 13:12 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).