其中: 结构体s3c24xx_uart_port源码如下:
struct s3c24xx_uart_port {
unsigned charrx_claimed;
unsigned chartx_claimed;
unsigned intpm_level;
unsigned longbaudclk_rate;
unsigned intrx_irq;
unsigned inttx_irq;
struct s3c24xx_uart_info*info;
struct s3c24xx_uart_clksrc*clksrc;
struct clk*clk;
struct clk*baudclk;
struct uart_portport;
#ifdef CONFIG_CPU_FREQ
struct notifier_blockfreq_transition;
#endif
};
其中:struct uart_port源码如下:
struct uart_port {
spinlock_tlock;/* port lock */
unsigned long iobase; /* in/out[bwl] */
unsigned char __iomem*membase;/* read/write[bwl] */
unsigned int irq; /* irq number */
unsigned intuartclk;/* base uart clock */
unsigned intfifosize;/* tx fifo size */
unsigned charx_char;/* xon/xoff char */
unsigned charregshift;/* reg offset shift */
unsigned chariotype;/* io access style */
unsigned charunused1;
#define UPIO_PORT(0)
#define UPIO_HUB6(1)
#define UPIO_MEM(2)
#define UPIO_MEM32(3)
#define UPIO_AU(4)/* Au1x00 type IO */
#define UPIO_TSI(5)/* Tsi108/109 type IO */
#define UPIO_DWAPB(6)/* DesignWare APB UART */
#define UPIO_RM9000(7)/* RM9000 type IO */
unsigned intread_status_mask;/* driver specific */
unsigned intignore_status_mask;/* driver specific */
struct uart_info*info;/* pointer to parent info */
struct uart_icounticount;/* statistics */
struct console*cons;/* struct console, if any */
#ifdef CONFIG_SERIAL_CORE_CONSOLE
unsigned longsysrq;/* sysrq timeout */
#endif
upf_tflags;
#define UPF_FOURPORT((__force upf_t) (1 << 1))
#define UPF_SAK((__force upf_t) (1 << 2))
#define UPF_SPD_MASK((__force upf_t) (0x1030))
#define UPF_SPD_HI((__force upf_t) (0x0010))
#define UPF_SPD_VHI((__force upf_t) (0x0020))
#define UPF_SPD_CUST((__force upf_t) (0x0030))
#define UPF_SPD_SHI((__force upf_t) (0x1000))
#define UPF_SPD_WARP((__force upf_t) (0x1010))
#define UPF_SKIP_TEST((__force upf_t) (1 << 6))
#define UPF_AUTO_IRQ((__force upf_t) (1 << 7))
#define UPF_HARDPPS_CD((__force upf_t) (1 << 11))
#define UPF_LOW_LATENCY((__force upf_t) (1 << 13))
#define UPF_BUGGY_UART((__force upf_t) (1 << 14))
#define UPF_MAGIC_MULTIPLIER((__force upf_t) (1 << 16))
#define UPF_CONS_FLOW((__force upf_t) (1 << 23))
#define UPF_SHARE_IRQ((__force upf_t) (1 << 24))
#define UPF_BOOT_AUTOCONF((__force upf_t) (1 << 28))
#define UPF_FIXED_PORT((__force upf_t) (1 << 29))
#define UPF_DEAD((__force upf_t) (1 << 30))
#define UPF_IOREMAP((__force upf_t) (1 << 31))
#define UPF_CHANGE_MASK((__force upf_t) (0x17fff))
#define UPF_USR_MASK((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY))
unsigned intmctrl;/* current modem ctrl settings */
unsigned inttimeout;/* character-based timeout */
unsigned inttype;/* port type */
const struct uart_ops*ops;
unsigned intcustom_divisor;
unsigned intline;/* port index */
resource_size_tmapbase;/* for ioremap */
struct device*dev;/* parent device */
unsigned charhub6;/* this should be in the 8250 driver */
unsigned charsuspended;
unsigned charunused[2];
void*private_data;/* generic platform data pointer */
};
