drivers: serial: ns16550: fix typo
Correct the following typo in Kconfig and the corresponding function. - Kconfig.it8xxx2 from `BUADRATE` to `BAUDRATE` - Correspoding function from `burdrate` to `baudrate` Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
parent
fab42c1176
commit
e868b6b49d
3 changed files with 10 additions and 10 deletions
|
@ -4,7 +4,7 @@
|
||||||
config UART_ITE_IT8XXX2
|
config UART_ITE_IT8XXX2
|
||||||
bool "ITE IT8XXX2 UART driver"
|
bool "ITE IT8XXX2 UART driver"
|
||||||
default y
|
default y
|
||||||
select UART_NS16550_ITE_HIGH_SPEED_BUADRATE
|
select UART_NS16550_ITE_HIGH_SPEED_BAUDRATE
|
||||||
depends on DT_HAS_ITE_IT8XXX2_UART_ENABLED
|
depends on DT_HAS_ITE_IT8XXX2_UART_ENABLED
|
||||||
help
|
help
|
||||||
IT8XXX2 uses shared ns16550.c driver which does not
|
IT8XXX2 uses shared ns16550.c driver which does not
|
||||||
|
|
|
@ -74,7 +74,7 @@ config UART_NS16550_TI_K3
|
||||||
Texas Instruments K3 SoCs by enabling a vendor specific extended register
|
Texas Instruments K3 SoCs by enabling a vendor specific extended register
|
||||||
set.
|
set.
|
||||||
|
|
||||||
config UART_NS16550_ITE_HIGH_SPEED_BUADRATE
|
config UART_NS16550_ITE_HIGH_SPEED_BAUDRATE
|
||||||
bool "IT8XXX2 specific baud rate configuration"
|
bool "IT8XXX2 specific baud rate configuration"
|
||||||
help
|
help
|
||||||
Enable IT8XXX2 specific baud rate configuration.
|
Enable IT8XXX2 specific baud rate configuration.
|
||||||
|
|
|
@ -267,7 +267,7 @@ BUILD_ASSERT(IS_ENABLED(CONFIG_PCIE), "NS16550(s) in DT need CONFIG_PCIE");
|
||||||
|
|
||||||
#define IIRC(dev) (((struct uart_ns16550_dev_data *)(dev)->data)->iir_cache)
|
#define IIRC(dev) (((struct uart_ns16550_dev_data *)(dev)->data)->iir_cache)
|
||||||
|
|
||||||
#ifdef CONFIG_UART_NS16550_ITE_HIGH_SPEED_BUADRATE
|
#ifdef CONFIG_UART_NS16550_ITE_HIGH_SPEED_BAUDRATE
|
||||||
/* Register definitions (ITE_IT8XXX2) */
|
/* Register definitions (ITE_IT8XXX2) */
|
||||||
#define REG_ECSPMR 0x08 /* EC Serial port mode reg */
|
#define REG_ECSPMR 0x08 /* EC Serial port mode reg */
|
||||||
|
|
||||||
|
@ -482,7 +482,7 @@ static inline uintptr_t get_port(const struct device *dev)
|
||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t get_uart_burdrate_divisor(const struct device *dev,
|
static uint32_t get_uart_baudrate_divisor(const struct device *dev,
|
||||||
uint32_t baud_rate,
|
uint32_t baud_rate,
|
||||||
uint32_t pclk)
|
uint32_t pclk)
|
||||||
{
|
{
|
||||||
|
@ -494,8 +494,8 @@ static uint32_t get_uart_burdrate_divisor(const struct device *dev,
|
||||||
return ((pclk + (baud_rate << 3)) / baud_rate) >> 4;
|
return ((pclk + (baud_rate << 3)) / baud_rate) >> 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_UART_NS16550_ITE_HIGH_SPEED_BUADRATE
|
#ifdef CONFIG_UART_NS16550_ITE_HIGH_SPEED_BAUDRATE
|
||||||
static uint32_t get_ite_uart_burdrate_divisor(const struct device *dev,
|
static uint32_t get_ite_uart_baudrate_divisor(const struct device *dev,
|
||||||
uint32_t baud_rate,
|
uint32_t baud_rate,
|
||||||
uint32_t pclk)
|
uint32_t pclk)
|
||||||
{
|
{
|
||||||
|
@ -517,7 +517,7 @@ static uint32_t get_ite_uart_burdrate_divisor(const struct device *dev,
|
||||||
*/
|
*/
|
||||||
ns16550_outbyte(dev_cfg, ECSPMR(dev), ECSPMR_ECHS);
|
ns16550_outbyte(dev_cfg, ECSPMR(dev), ECSPMR_ECHS);
|
||||||
} else {
|
} else {
|
||||||
divisor = get_uart_burdrate_divisor(dev, baud_rate, pclk);
|
divisor = get_uart_baudrate_divisor(dev, baud_rate, pclk);
|
||||||
/* Set ECSPMR register as default */
|
/* Set ECSPMR register as default */
|
||||||
ns16550_outbyte(dev_cfg, ECSPMR(dev), 0);
|
ns16550_outbyte(dev_cfg, ECSPMR(dev), 0);
|
||||||
}
|
}
|
||||||
|
@ -534,10 +534,10 @@ static void set_baud_rate(const struct device *dev, uint32_t baud_rate, uint32_t
|
||||||
uint8_t lcr_cache;
|
uint8_t lcr_cache;
|
||||||
|
|
||||||
if ((baud_rate != 0U) && (pclk != 0U)) {
|
if ((baud_rate != 0U) && (pclk != 0U)) {
|
||||||
#ifdef CONFIG_UART_NS16550_ITE_HIGH_SPEED_BUADRATE
|
#ifdef CONFIG_UART_NS16550_ITE_HIGH_SPEED_BAUDRATE
|
||||||
divisor = get_ite_uart_burdrate_divisor(dev, baud_rate, pclk);
|
divisor = get_ite_uart_baudrate_divisor(dev, baud_rate, pclk);
|
||||||
#else
|
#else
|
||||||
divisor = get_uart_burdrate_divisor(dev, baud_rate, pclk);
|
divisor = get_uart_baudrate_divisor(dev, baud_rate, pclk);
|
||||||
#endif
|
#endif
|
||||||
/* set the DLAB to access the baud rate divisor registers */
|
/* set the DLAB to access the baud rate divisor registers */
|
||||||
lcr_cache = ns16550_inbyte(dev_cfg, LCR(dev));
|
lcr_cache = ns16550_inbyte(dev_cfg, LCR(dev));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue