serial/uart_ns16550: make UART_REG_ADDR_INTERVAL
On behalf of : Timo Teräs <timo.teras@iki.fi> UART_REG_ADDR_INTERVAL is SOC / chip implementation specific feature, and its width does not always correspond to current settings for IOPORT/non IOPORT access method. Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
This commit is contained in:
parent
d267250f7b
commit
2ab60eb0ab
1 changed files with 7 additions and 1 deletions
|
@ -190,16 +190,22 @@
|
|||
|
||||
#define IIRC(dev) (DEV_DATA(dev)->iir_cache)
|
||||
|
||||
#ifdef CONFIG_NS16550_REG_SHIFT
|
||||
#define UART_REG_ADDR_INTERVAL (1<<CONFIG_NS16550_REG_SHIFT)
|
||||
#endif
|
||||
|
||||
#ifdef UART_NS16550_ACCESS_IOPORT
|
||||
#define INBYTE(x) sys_in8(x)
|
||||
#define OUTBYTE(x, d) sys_out8(d, x)
|
||||
#ifndef UART_REG_ADDR_INTERVAL
|
||||
#define UART_REG_ADDR_INTERVAL 1 /* address diff of adjacent regs. */
|
||||
#endif
|
||||
#endif /* UART_REG_ADDR_INTERVAL */
|
||||
#else
|
||||
#define INBYTE(x) sys_read8(x)
|
||||
#define OUTBYTE(x, d) sys_write8(d, x)
|
||||
#ifndef UART_REG_ADDR_INTERVAL
|
||||
#define UART_REG_ADDR_INTERVAL 4 /* address diff of adjacent regs. */
|
||||
#endif
|
||||
#endif /* UART_NS16550_ACCESS_IOPORT */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue