uart: add config options into struct uart_device_config
This adds the UART initialization information into the UART device config struct. This is in preparation to move driver initialization from platform config files into the driver themselves. Change-Id: I0e2d501b2c6c2ed19648882031cc5f07ff0f386a Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
d95b958cfa
commit
846f5f4272
|
@ -39,9 +39,18 @@ extern "C" {
|
|||
/* options for uart init */
|
||||
#define UART_OPTION_AFCE 0x01
|
||||
|
||||
struct uart_init_info;
|
||||
/** UART configuration structure */
|
||||
struct uart_init_info {
|
||||
int baud_rate; /* Baud rate */
|
||||
uint32_t sys_clk_freq; /* System clock frequency in Hz */
|
||||
|
||||
/* UART device configuration */
|
||||
uint8_t irq_pri; /* Interrupt priority level */
|
||||
uint8_t options; /* HW Flow Control option */
|
||||
|
||||
uint32_t regs; /* Register address */
|
||||
};
|
||||
|
||||
/** UART device configuration */
|
||||
struct uart_device_config {
|
||||
/**
|
||||
* Base port number
|
||||
|
@ -56,6 +65,8 @@ struct uart_device_config {
|
|||
uint8_t irq; /**< interrupt request level */
|
||||
uint8_t irq_pri; /**< interrupt priority */
|
||||
|
||||
struct uart_init_info init_info;
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
struct pci_dev_info pci_dev;
|
||||
#endif /* CONFIG_PCI */
|
||||
|
@ -71,19 +82,6 @@ struct uart_device_config {
|
|||
int (*config_func)(struct device *dev);
|
||||
};
|
||||
|
||||
/** UART configuration structure */
|
||||
|
||||
|
||||
struct uart_init_info {
|
||||
int baud_rate; /* Baud rate */
|
||||
uint32_t sys_clk_freq; /* System clock frequency in Hz */
|
||||
|
||||
uint8_t irq_pri; /* Interrupt priority level */
|
||||
uint8_t options; /* HW Flow Control option */
|
||||
|
||||
uint32_t regs; /* Register address */
|
||||
};
|
||||
|
||||
/**< Driver API struct */
|
||||
struct uart_driver_api {
|
||||
/* console I/O functions */
|
||||
|
|
Loading…
Reference in a new issue