public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/8] serial: altera_jtag_uart: use BIT macro
@ 2015-10-30  7:18 Thomas Chou
  2015-10-30  7:18 ` [U-Boot] [PATCH 2/8] serial: altera_jtag_uart: minor clean up Thomas Chou
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Thomas Chou @ 2015-10-30  7:18 UTC (permalink / raw)
  To: u-boot

Replace numerical bit shift with BIT macro
in altera_jtag_uart

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/serial/altera_jtag_uart.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 39d4a4e..0aa741c 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -22,11 +22,11 @@ struct altera_jtaguart_platdata {
 };
 
 /* data register */
-#define ALTERA_JTAG_RVALID	(1<<15)		/* Read valid */
+#define ALTERA_JTAG_RVALID	BIT(15)	/* Read valid */
 
 /* control register */
-#define ALTERA_JTAG_AC		(1 << 10)	/* activity indicator */
-#define ALTERA_JTAG_RRDY	(1 << 12)	/* read available */
+#define ALTERA_JTAG_AC		BIT(10)	/* activity indicator */
+#define ALTERA_JTAG_RRDY	BIT(12)	/* read available */
 #define ALTERA_JTAG_WSPACE(d)	((d)>>16)	/* Write space avail */
 /* Write fifo size. FIXME: this should be extracted with sopc2dts */
 #define ALTERA_JTAG_WRITE_DEPTH	64
-- 
2.5.0

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

end of thread, other threads:[~2015-11-03  5:22 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30  7:18 [U-Boot] [PATCH 1/8] serial: altera_jtag_uart: use BIT macro Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 2/8] serial: altera_jtag_uart: minor clean up Thomas Chou
2015-10-30  8:09   ` Jagan Teki
2015-11-03  5:20   ` Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 3/8] serial: altera_uart: use BIT macro Thomas Chou
2015-10-30  8:10   ` Jagan Teki
2015-11-03  5:20   ` Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 4/8] serial: altera_uart: minor clean up Thomas Chou
2015-10-30  8:12   ` Jagan Teki
2015-11-03  5:21   ` Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 5/8] timer: altera_timer: use BIT macro Thomas Chou
2015-10-30  8:13   ` Jagan Teki
2015-11-03  5:21   ` Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 6/8] timer: altera_timer: minor clean up Thomas Chou
2015-10-30  8:13   ` Jagan Teki
2015-11-03  5:21   ` Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 7/8] misc: altera_sysid: " Thomas Chou
2015-10-30  8:14   ` Jagan Teki
2015-11-03  5:21   ` Thomas Chou
2015-10-30  7:18 ` [U-Boot] [PATCH 8/8] spi: altera_spi: " Thomas Chou
2015-10-30  8:15   ` Jagan Teki
2015-11-03  5:22   ` Thomas Chou
2015-10-30  8:07 ` [U-Boot] [PATCH 1/8] serial: altera_jtag_uart: use BIT macro Jagan Teki
2015-11-03  5:19 ` Thomas Chou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox