arch/mips/rb532/serial.c

Source file repositories/reference/linux-study-clean/arch/mips/rb532/serial.c

File Facts

System
Linux kernel
Corpus path
arch/mips/rb532/serial.c
Extension
.c
Size
1926 bytes
Lines
55
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/init.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <linux/serial_8250.h>
#include <linux/irq.h>

#include <asm/serial.h>
#include <asm/mach-rc32434/rb.h>

extern unsigned int idt_cpu_freq;

static struct uart_port rb532_uart = {
	.flags = UPF_BOOT_AUTOCONF,
	.line = 0,
	.irq = UART0_IRQ,
	.iotype = UPIO_MEM,
	.membase = (char *)KSEG1ADDR(REGBASE + UART0BASE),
	.regshift = 2
};

static int __init setup_serial_port(void)
{
	rb532_uart.uartclk = idt_cpu_freq;

	return early_serial_setup(&rb532_uart);
}
arch_initcall(setup_serial_port);

Annotation

Implementation Notes