serial: altera_jtag_uart: use BIT macro
Subsystems (2)
PATCH 1/8 serial: altera_jtag_uart: use BIT macro
Replace numerical bit shift with BIT macro
in altera_jtag_uart
:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31
--- drivers/serial/altera_jtag_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/serial/altera_jtag_uart.c +3 -3
@@ -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
Signature · 1 line
2.5.0
PATCH 1/8 serial: altera_jtag_uart: use BIT macro
Quoted 11 lines · Thomas Chou
Replace numerical bit shift with BIT macro
inaltera_jtag_uart:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31Signed-off-by Thomas Chou <[email protected]>--- drivers/serial/altera_jtag_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-nios.
Quoted 20 lines
drivers/serial/altera_jtag_uart.c +3
-3@@ -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
PATCH 2/8 serial: altera_jtag_uart: minor clean up
In reply to Thomas Chou- Moved macro definitions to top
- Give spaces around the '>>' in ALTERA_JTAG_WSPACE()
- Re-arrange header includes ascending order
- Remove unused header linux/compiler.h
- Remove the penultimate comma in of_match ids
--- drivers/serial/altera_jtag_uart.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)
drivers/serial/altera_jtag_uart.c +12 -13
@@ -8,18 +8,10 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <asm/io.h> -#include <linux/compiler.h> #include <serial.h> +#include <asm/io.h> -struct altera_jtaguart_regs { -u32 data;/* Data register */ -u32 control;/* Control register */ -}; - -struct altera_jtaguart_platdata { -struct altera_jtaguart_regs *regs; -}; +DECLARE_GLOBAL_DATA_PTR ;/* data register */ #define ALTERA_JTAG_RVALID BIT(15)/* Read valid */
@@ -27,11 +19,18 @@ struct altera_jtaguart_platdata {/* control register */ #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 */ +#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 -DECLARE_GLOBAL_DATA_PTR ; +struct altera_jtaguart_regs { +u32 data;/* Data register */ +u32 control;/* Control register */ +}; + +struct altera_jtaguart_platdata { +struct altera_jtaguart_regs *regs; +};static int altera_jtaguart_setbrg (struct udevice *dev,int baudrate) {
@@ -112,7 +111,7 @@ static const struct dm_serial_ops altera_jtaguart_ops = { };static const struct udevice_id altera_jtaguart_ids[] = { - { .compatible ="altr,juart-1.0" , }, + { .compatible ="altr,juart-1.0" }, { } };
Signature · 1 line
2.5.0
PATCH 2/8 serial: altera_jtag_uart: minor clean up
Quoted 8 lines · Thomas Chou
- Moved macro definitions to top
- Give spaces around the '>>' inALTERA_JTAG_WSPACE()
- Re-arrange header includes ascending order
- Remove unused headerlinux/compiler.h
- Remove the penultimate comma inof_matchidsSigned-off-by Thomas Chou <[email protected]>---
Quoted 59 lines
drivers/serial/altera_jtag_uart.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)drivers/serial/altera_jtag_uart.c +12
-14@@ -8,18 +8,10 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <asm/io.h> -#include <linux/compiler.h> #include <serial.h> +#include <asm/io.h> -struct altera_jtaguart_regs { -u32 data;/* Data register */ -u32 control;/* Control register */ -}; - -struct altera_jtaguart_platdata { -struct altera_jtaguart_regs *regs; -}; +DECLARE_GLOBAL_DATA_PTR ;/* data register */ #define ALTERA_JTAG_RVALID BIT(15)/* Read valid */ @@ -27,11 +19,18 @@ struct altera_jtaguart_platdata {/* control register */ #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 */ +#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 -DECLARE_GLOBAL_DATA_PTR ; +struct altera_jtaguart_regs { +u32 data;/* Data register */ +u32 control;/* Control register */ +}; + +struct altera_jtaguart_platdata { +struct altera_jtaguart_regs *regs; +};static int altera_jtaguart_setbrg (struct udevice *dev,int baudrate) {@@ -112,7 +111,7 @@ static const struct dm_serial_ops altera_jtaguart_ops = { };static const struct udevice_id altera_jtaguart_ids[] = { - { .compatible ="altr,juart-1.0" , }, + { .compatible ="altr,juart-1.0" }, { } }; --
Quoted 1 line
2.5.0
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 2/8 serial: altera_jtag_uart: minor clean up
In reply to Thomas ChouQuoted 11 lines · Thomas Chou
- Moved macro definitions to top
- Give spaces around the '>>' inALTERA_JTAG_WSPACE()
- Re-arrange header includes ascending order
- Remove unused headerlinux/compiler.h
- Remove the penultimate comma inof_matchidsSigned-off-by Thomas Chou <[email protected]>--- drivers/serial/altera_jtag_uart.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)
Applied to u-boot-nios.
Quoted 56 lines
drivers/serial/altera_jtag_uart.c +12
-13@@ -8,18 +8,10 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <asm/io.h> -#include <linux/compiler.h> #include <serial.h> +#include <asm/io.h> -struct altera_jtaguart_regs { -u32 data;/* Data register */ -u32 control;/* Control register */ -}; - -struct altera_jtaguart_platdata { -struct altera_jtaguart_regs *regs; -}; +DECLARE_GLOBAL_DATA_PTR ;/* data register */ #define ALTERA_JTAG_RVALID BIT(15)/* Read valid */ @@ -27,11 +19,18 @@ struct altera_jtaguart_platdata {/* control register */ #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 */ +#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 -DECLARE_GLOBAL_DATA_PTR ; +struct altera_jtaguart_regs { +u32 data;/* Data register */ +u32 control;/* Control register */ +}; + +struct altera_jtaguart_platdata { +struct altera_jtaguart_regs *regs; +};static int altera_jtaguart_setbrg (struct udevice *dev,int baudrate) {@@ -112,7 +111,7 @@ static const struct dm_serial_ops altera_jtaguart_ops = { };static const struct udevice_id altera_jtaguart_ids[] = { - { .compatible ="altr,juart-1.0" , }, + { .compatible ="altr,juart-1.0" }, { } };
PATCH 3/8 serial: altera_uart: use BIT macro
In reply to Thomas ChouReplace numerical bit shift with BIT macro
in altera_uart
:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31
--- drivers/serial/altera_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/serial/altera_uart.c +3 -3
@@ -27,9 +27,9 @@ struct altera_uart_platdata { };/* status register */ -#define ALTERA_UART_TMT (1 << 5)/* tx empty */ -#define ALTERA_UART_TRDY (1 << 6)/* tx ready */ -#define ALTERA_UART_RRDY (1 << 7)/* rx ready */ +#define ALTERA_UART_TMT BIT(5)/* tx empty */ +#define ALTERA_UART_TRDY BIT(6)/* tx ready */ +#define ALTERA_UART_RRDY BIT(7)/* rx ready */ DECLARE_GLOBAL_DATA_PTR ;
Signature · 1 line
2.5.0
PATCH 3/8 serial: altera_uart: use BIT macro
Quoted 8 lines · Thomas Chou
Replace numerical bit shift with BIT macro
inaltera_uart:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31Signed-off-by Thomas Chou <[email protected]>---
Quoted 9 lines
drivers/serial/altera_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/serial/altera_uart.c +0
-0@@ -27,9 +27,9 @@ struct altera_uart_platdata { };
drivers/serial/altera_uart.c struct altera_uart_platdata { · line 34
Quoted 10 lines
drivers/serial/altera_uart.c +3
-3/* status register */ -#define ALTERA_UART_TMT (1 << 5)/* tx empty */ -#define ALTERA_UART_TRDY (1 << 6)/* tx ready */ -#define ALTERA_UART_RRDY (1 << 7)/* rx ready */ +#define ALTERA_UART_TMT BIT(5)/* tx empty */ +#define ALTERA_UART_TRDY BIT(6)/* tx ready */ +#define ALTERA_UART_RRDY BIT(7)/* rx ready */ DECLARE_GLOBAL_DATA_PTR ;
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 3/8 serial: altera_uart: use BIT macro
In reply to Thomas ChouQuoted 11 lines · Thomas Chou
Replace numerical bit shift with BIT macro
inaltera_uart:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31Signed-off-by Thomas Chou <[email protected]>--- drivers/serial/altera_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-nios.
Quoted 18 lines
drivers/serial/altera_uart.c +3
-3@@ -27,9 +27,9 @@ struct altera_uart_platdata { };/* status register */ -#define ALTERA_UART_TMT (1 << 5)/* tx empty */ -#define ALTERA_UART_TRDY (1 << 6)/* tx ready */ -#define ALTERA_UART_RRDY (1 << 7)/* rx ready */ +#define ALTERA_UART_TMT BIT(5)/* tx empty */ +#define ALTERA_UART_TRDY BIT(6)/* tx ready */ +#define ALTERA_UART_RRDY BIT(7)/* rx ready */ DECLARE_GLOBAL_DATA_PTR ;
PATCH 4/8 serial: altera_uart: minor clean up
In reply to Thomas Chou- Moved macro definitions to top
- Re-arrange header includes ascending order
- Remove unused header linux/compiler.h
- Remove the penultimate comma in of_match ids
--- drivers/serial/altera_uart.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
drivers/serial/altera_uart.c +9 -10
@@ -8,9 +8,15 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <asm/io.h> -#include <linux/compiler.h> #include <serial.h> +#include <asm/io.h> + +DECLARE_GLOBAL_DATA_PTR ; + +/* status register */ +#define ALTERA_UART_TMT BIT(5)/* tx empty */ +#define ALTERA_UART_TRDY BIT(6)/* tx ready */ +#define ALTERA_UART_RRDY BIT(7)/* rx ready */ struct altera_uart_regs {u32 rxdata;/* Rx data reg */
@@ -26,13 +32,6 @@ struct altera_uart_platdata {unsigned int uartclk; }; -/* status register */ -#define ALTERA_UART_TMT BIT(5)/* tx empty */ -#define ALTERA_UART_TRDY BIT(6)/* tx ready */ -#define ALTERA_UART_RRDY BIT(7)/* rx ready */ - -DECLARE_GLOBAL_DATA_PTR ; -static int altera_uart_setbrg (struct udevice *dev,int baudrate) {struct altera_uart_platdata *plat = dev->platdata;
@@ -106,7 +105,7 @@ static const struct dm_serial_ops altera_uart_ops = { };static const struct udevice_id altera_uart_ids[] = { - { .compatible ="altr,uart-1.0" , }, + { .compatible ="altr,uart-1.0" }, { } };
Signature · 1 line
2.5.0
PATCH 4/8 serial: altera_uart: minor clean up
Quoted 7 lines · Thomas Chou
- Moved macro definitions to top
- Re-arrange header includes ascending order
- Remove unused headerlinux/compiler.h
- Remove the penultimate comma inof_matchidsSigned-off-by Thomas Chou <[email protected]>---
Quoted 49 lines
drivers/serial/altera_uart.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)drivers/serial/altera_uart.c +9
-11@@ -8,9 +8,15 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <asm/io.h> -#include <linux/compiler.h> #include <serial.h> +#include <asm/io.h> + +DECLARE_GLOBAL_DATA_PTR ; + +/* status register */ +#define ALTERA_UART_TMT BIT(5)/* tx empty */ +#define ALTERA_UART_TRDY BIT(6)/* tx ready */ +#define ALTERA_UART_RRDY BIT(7)/* rx ready */ struct altera_uart_regs {u32 rxdata;/* Rx data reg */ @@ -26,13 +32,6 @@ struct altera_uart_platdata {unsigned int uartclk; }; -/* status register */ -#define ALTERA_UART_TMT BIT(5)/* tx empty */ -#define ALTERA_UART_TRDY BIT(6)/* tx ready */ -#define ALTERA_UART_RRDY BIT(7)/* rx ready */ - -DECLARE_GLOBAL_DATA_PTR ; -static int altera_uart_setbrg (struct udevice *dev,int baudrate) {struct altera_uart_platdata *plat = dev->platdata;@@ -106,7 +105,7 @@ static const struct dm_serial_ops altera_uart_ops = { };static const struct udevice_id altera_uart_ids[] = { - { .compatible ="altr,uart-1.0" , }, + { .compatible ="altr,uart-1.0" }, { } }; --
Quoted 1 line
2.5.0
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 4/8 serial: altera_uart: minor clean up
In reply to Thomas ChouQuoted 10 lines · Thomas Chou
- Moved macro definitions to top
- Re-arrange header includes ascending order
- Remove unused headerlinux/compiler.h
- Remove the penultimate comma inof_matchidsSigned-off-by Thomas Chou <[email protected]>--- drivers/serial/altera_uart.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
Applied to u-boot-nios.
Quoted 46 lines
drivers/serial/altera_uart.c +9
-10@@ -8,9 +8,15 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <asm/io.h> -#include <linux/compiler.h> #include <serial.h> +#include <asm/io.h> + +DECLARE_GLOBAL_DATA_PTR ; + +/* status register */ +#define ALTERA_UART_TMT BIT(5)/* tx empty */ +#define ALTERA_UART_TRDY BIT(6)/* tx ready */ +#define ALTERA_UART_RRDY BIT(7)/* rx ready */ struct altera_uart_regs {u32 rxdata;/* Rx data reg */ @@ -26,13 +32,6 @@ struct altera_uart_platdata {unsigned int uartclk; }; -/* status register */ -#define ALTERA_UART_TMT BIT(5)/* tx empty */ -#define ALTERA_UART_TRDY BIT(6)/* tx ready */ -#define ALTERA_UART_RRDY BIT(7)/* rx ready */ - -DECLARE_GLOBAL_DATA_PTR ; -static int altera_uart_setbrg (struct udevice *dev,int baudrate) {struct altera_uart_platdata *plat = dev->platdata;@@ -106,7 +105,7 @@ static const struct dm_serial_ops altera_uart_ops = { };static const struct udevice_id altera_uart_ids[] = { - { .compatible ="altr,uart-1.0" , }, + { .compatible ="altr,uart-1.0" }, { } };
PATCH 5/8 timer: altera_timer: use BIT macro
In reply to Thomas ChouReplace numerical bit shift with BIT macro
in altera_timer
:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31
--- drivers/timer/altera_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/timer/altera_timer.c +3 -3
@@ -31,9 +31,9 @@ struct altera_timer_platdata { };/* control register */ -#define ALTERA_TIMER_CONT (1 << 1)/* Continuous mode */ -#define ALTERA_TIMER_START (1 << 2)/* Start timer */ -#define ALTERA_TIMER_STOP (1 << 3)/* Stop timer */ +#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ +#define ALTERA_TIMER_START BIT(2)/* Start timer */ +#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ static int altera_timer_get_count (struct udevice *dev,unsigned long *count) {
Signature · 1 line
2.5.0
PATCH 5/8 timer: altera_timer: use BIT macro
Quoted 8 lines · Thomas Chou
Replace numerical bit shift with BIT macro
inaltera_timer:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31Signed-off-by Thomas Chou <[email protected]>---
Quoted 21 lines
drivers/timer/altera_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/timer/altera_timer.c +3
-4@@ -31,9 +31,9 @@ struct altera_timer_platdata { };/* control register */ -#define ALTERA_TIMER_CONT (1 << 1)/* Continuous mode */ -#define ALTERA_TIMER_START (1 << 2)/* Start timer */ -#define ALTERA_TIMER_STOP (1 << 3)/* Stop timer */ +#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ +#define ALTERA_TIMER_START BIT(2)/* Start timer */ +#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ static int altera_timer_get_count (struct udevice *dev,unsigned long *count) { --
Quoted 1 line
2.5.0
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 5/8 timer: altera_timer: use BIT macro
In reply to Thomas ChouQuoted 11 lines · Thomas Chou
Replace numerical bit shift with BIT macro
inaltera_timer:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31Signed-off-by Thomas Chou <[email protected]>--- drivers/timer/altera_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-nios.
Quoted 18 lines
drivers/timer/altera_timer.c +3
-3@@ -31,9 +31,9 @@ struct altera_timer_platdata { };/* control register */ -#define ALTERA_TIMER_CONT (1 << 1)/* Continuous mode */ -#define ALTERA_TIMER_START (1 << 2)/* Start timer */ -#define ALTERA_TIMER_STOP (1 << 3)/* Stop timer */ +#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ +#define ALTERA_TIMER_START BIT(2)/* Start timer */ +#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ static int altera_timer_get_count (struct udevice *dev,unsigned long *count) {
PATCH 6/8 timer: altera_timer: minor clean up
In reply to Thomas Chou- Moved macro definitions to top
- Remove the penultimate comma in of_match ids
--- drivers/timer/altera_timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/timer/altera_timer.c +6 -6
@@ -16,6 +16,11 @@DECLARE_GLOBAL_DATA_PTR ; +/* control register */ +#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ +#define ALTERA_TIMER_START BIT(2)/* Start timer */ +#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ +struct altera_timer_regs {u32 status;/* Timer status reg */ u32 control;/* Timer control reg */
@@ -30,11 +35,6 @@ struct altera_timer_platdata {unsigned long clock_rate; }; -/* control register */ -#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ -#define ALTERA_TIMER_START BIT(2)/* Start timer */ -#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ -static int altera_timer_get_count (struct udevice *dev,unsigned long *count) {struct altera_timer_platdata *plat = dev->platdata;
@@ -88,7 +88,7 @@ static const struct timer_ops altera_timer_ops = { };static const struct udevice_id altera_timer_ids[] = { - { .compatible ="altr,timer-1.0" , }, + { .compatible ="altr,timer-1.0" }, { } };
Signature · 1 line
2.5.0
PATCH 6/8 timer: altera_timer: minor clean up
Quoted 5 lines · Thomas Chou
- Moved macro definitions to top
- Remove the penultimate comma inof_matchidsSigned-off-by Thomas Chou <[email protected]>---
Quoted 32 lines
drivers/timer/altera_timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/timer/altera_timer.c +5
-5@@ -16,6 +16,11 @@DECLARE_GLOBAL_DATA_PTR ; +/* control register */ +#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ +#define ALTERA_TIMER_START BIT(2)/* Start timer */ +#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ +struct altera_timer_regs {u32 status;/* Timer status reg */ u32 control;/* Timer control reg */ @@ -30,11 +35,6 @@ struct altera_timer_platdata {unsigned long clock_rate; }; -/* control register */ -#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ -#define ALTERA_TIMER_START BIT(2)/* Start timer */ -#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ -static int altera_timer_get_count (struct udevice *dev,unsigned long *count) {struct altera_timer_platdata *plat = dev->platdata;
drivers/timer/altera_timer.c static const struct timer_ops altera_timer_ops = { · line 94
Quoted 8 lines
drivers/timer/altera_timer.c +1
-1@@ -88,7 +88,7 @@ static const struct timer_ops altera_timer_ops = { };static const struct udevice_id altera_timer_ids[] = { - { .compatible ="altr,timer-1.0" , }, + { .compatible ="altr,timer-1.0" }, { } };
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 6/8 timer: altera_timer: minor clean up
In reply to Thomas ChouQuoted 8 lines · Thomas Chou
- Moved macro definitions to top
- Remove the penultimate comma inof_matchidsSigned-off-by Thomas Chou <[email protected]>--- drivers/timer/altera_timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Applied to u-boot-nios.
Quoted 38 lines
drivers/timer/altera_timer.c +6
-6@@ -16,6 +16,11 @@DECLARE_GLOBAL_DATA_PTR ; +/* control register */ +#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ +#define ALTERA_TIMER_START BIT(2)/* Start timer */ +#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ +struct altera_timer_regs {u32 status;/* Timer status reg */ u32 control;/* Timer control reg */ @@ -30,11 +35,6 @@ struct altera_timer_platdata {unsigned long clock_rate; }; -/* control register */ -#define ALTERA_TIMER_CONT BIT(1)/* Continuous mode */ -#define ALTERA_TIMER_START BIT(2)/* Start timer */ -#define ALTERA_TIMER_STOP BIT(3)/* Stop timer */ -static int altera_timer_get_count (struct udevice *dev,unsigned long *count) {struct altera_timer_platdata *plat = dev->platdata;@@ -88,7 +88,7 @@ static const struct timer_ops altera_timer_ops = { };static const struct udevice_id altera_timer_ids[] = { - { .compatible ="altr,timer-1.0" , }, + { .compatible ="altr,timer-1.0" }, { } };
PATCH 7/8 misc: altera_sysid: minor clean up
In reply to Thomas Chou- Remove the penultimate comma in of_match ids
--- drivers/misc/altera_sysid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/altera_sysid.c +1 -1
@@ -87,7 +87,7 @@ static const struct misc_ops altera_sysid_ops = { };static const struct udevice_id altera_sysid_ids[] = { - { .compatible ="altr,sysid-1.0" , }, + { .compatible ="altr,sysid-1.0" }, { } };
Signature · 1 line
2.5.0
PATCH 7/8 misc: altera_sysid: minor clean up
Quoted 4 lines · Thomas Chou
- Remove the penultimate comma in
of_matchidsSigned-off-by Thomas Chou <[email protected]>---
Quoted 8 lines
drivers/misc/altera_sysid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/altera_sysid.c +0
-0
drivers/misc/altera_sysid.c static const struct misc_ops altera_sysid_ops = { · line 93
Quoted 8 lines
drivers/misc/altera_sysid.c +1
-1@@ -87,7 +87,7 @@ static const struct misc_ops altera_sysid_ops = { };static const struct udevice_id altera_sysid_ids[] = { - { .compatible ="altr,sysid-1.0" , }, + { .compatible ="altr,sysid-1.0" }, { } };
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 7/8 misc: altera_sysid: minor clean up
In reply to Thomas ChouQuoted 7 lines · Thomas Chou
- Remove the penultimate comma in
of_matchidsSigned-off-by Thomas Chou <[email protected]>--- drivers/misc/altera_sysid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-nios.
Quoted 14 lines
drivers/misc/altera_sysid.c +1
-1@@ -87,7 +87,7 @@ static const struct misc_ops altera_sysid_ops = { };static const struct udevice_id altera_sysid_ids[] = { - { .compatible ="altr,sysid-1.0" , }, + { .compatible ="altr,sysid-1.0" }, { } };
PATCH 1/8 serial: altera_jtag_uart: use BIT macro
In reply to Thomas ChouQuoted 8 lines · Thomas Chou
Replace numerical bit shift with BIT macro
inaltera_jtag_uart:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31Signed-off-by Thomas Chou <[email protected]>---
Quoted 23 lines
drivers/serial/altera_jtag_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/serial/altera_jtag_uart.c +3
-4@@ -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 --
Quoted 1 line
2.5.0
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 8/8 spi: altera_spi: minor clean up
In reply to Thomas Chou- Remove the penultimate comma in of_match ids
--- drivers/spi/altera_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/altera_spi.c +1 -1
@@ -193,7 +193,7 @@ static const struct dm_spi_ops altera_spi_ops = { };static const struct udevice_id altera_spi_ids[] = { - { .compatible ="altr,spi-1.0" , }, + { .compatible ="altr,spi-1.0" }, { } };
Signature · 1 line
2.5.0
PATCH 8/8 spi: altera_spi: minor clean up
Quoted 5 lines · Thomas Chou
- Remove the penultimate comma in
of_matchidsSigned-off-by Thomas Chou <[email protected]>Cc Jagan Teki <[email protected]>---
Quoted 8 lines
drivers/spi/altera_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/spi/altera_spi.c +0
-0
drivers/spi/altera_spi.c static const struct dm_spi_ops altera_spi_ops = {
Quoted 9 lines
drivers/spi/altera_spi.c +1
-2@@ -193,7 +193,7 @@ static const struct dm_spi_ops altera_spi_ops = { };static const struct udevice_id altera_spi_ids[] = { - { .compatible ="altr,spi-1.0" , }, + { .compatible ="altr,spi-1.0" }, { } }; --
thanks!
Signature · 1 line
Jagan | openedev.
PATCH 8/8 spi: altera_spi: minor clean up
In reply to Thomas ChouQuoted 8 lines · Thomas Chou
- Remove the penultimate comma in
of_matchidsSigned-off-by Thomas Chou <[email protected]>Cc Jagan Teki <[email protected]>--- drivers/spi/altera_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-nios.
Quoted 14 lines
drivers/spi/altera_spi.c +1
-1@@ -193,7 +193,7 @@ static const struct dm_spi_ops altera_spi_ops = { };static const struct udevice_id altera_spi_ids[] = { - { .compatible ="altr,spi-1.0" , }, + { .compatible ="altr,spi-1.0" }, { } };