All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] platform/x86: intel_pmc_ipc: Use BIT() macro
@ 2019-04-09 11:25 Andy Shevchenko
  2019-04-09 11:25 ` [PATCH v1 2/4] platform/x86: intel_pmc_ipc: Apply same width for offset definitions Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Andy Shevchenko @ 2019-04-09 11:25 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86, Zha Qipeng,
	Kuppuswamy Sathyanarayanan, junxiao.chang, linux-kernel
  Cc: Andy Shevchenko

Use BIT() and BIT_MASK() macros for definitions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/platform/x86/intel_pmc_ipc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index d37cbd1cf58c..eb0b342996ca 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -41,13 +41,13 @@
  * the IPC1 registers, updates the IPC_STS response register with the status.
  */
 #define IPC_CMD			0x0
-#define		IPC_CMD_MSI		0x100
+#define		IPC_CMD_MSI		BIT(8)
 #define		IPC_CMD_SIZE		16
 #define		IPC_CMD_SUBCMD		12
 #define IPC_STATUS		0x04
-#define		IPC_STATUS_IRQ		0x4
-#define		IPC_STATUS_ERR		0x2
-#define		IPC_STATUS_BUSY		0x1
+#define		IPC_STATUS_IRQ		BIT(2)
+#define		IPC_STATUS_ERR		BIT(1)
+#define		IPC_STATUS_BUSY		BIT(0)
 #define IPC_SPTR		0x08
 #define IPC_DPTR		0x0C
 #define IPC_WRITE_BUFFER	0x80
@@ -107,7 +107,7 @@
 /* PMC register bit definitions */
 
 /* PMC_CFG_REG bit masks */
-#define PMC_CFG_NO_REBOOT_MASK		(1 << 4)
+#define PMC_CFG_NO_REBOOT_MASK		BIT_MASK(4)
 #define PMC_CFG_NO_REBOOT_EN		(1 << 4)
 #define PMC_CFG_NO_REBOOT_DIS		(0 << 4)
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-10 18:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 11:25 [PATCH v1 1/4] platform/x86: intel_pmc_ipc: Use BIT() macro Andy Shevchenko
2019-04-09 11:25 ` [PATCH v1 2/4] platform/x86: intel_pmc_ipc: Apply same width for offset definitions Andy Shevchenko
2019-04-09 17:09   ` sathyanarayanan kuppuswamy
2019-04-09 11:25 ` [PATCH v1 3/4] platform/x86: intel_pmc_ipc: Don't map non-used optional resources Andy Shevchenko
2019-04-10 18:05   ` sathyanarayanan kuppuswamy
2019-04-09 11:25 ` [PATCH v1 4/4] platform/x86: intel_punit_ipc: Revert "Fix resource ioremap warning" Andy Shevchenko
2019-04-10 18:06   ` sathyanarayanan kuppuswamy
     [not found] ` <7bb60283-f99f-679d-4efa-45962ccd68f3@linux.intel.com>
2019-04-09 17:39   ` [PATCH v1 1/4] platform/x86: intel_pmc_ipc: Use BIT() macro Andy Shevchenko
2019-04-10 13:59     ` Andy Shevchenko
2019-04-10 17:55       ` sathyanarayanan kuppuswamy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.