linux串口终端ttySAC,Linux串口终端驱动——S3C6410平台

1、serial文件夹下Kconfig分析

config SERIAL_SAMSUNG

tristate "Samsung SoC serial support"

depends on ARM && PLAT_S3C

select SERIAL_CORE

help

Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,为支持三星的片上UARTs控制器

providing /dev/ttySAC0, 1 and 2 (note, some machines may not

provide all of these ports, depending on how the serial port

pins are configured.

config SERIAL_SAMSUNG_UARTS有多少个UART控制器

int

depends on SERIAL_SAMSUNG

default 2 if ARCH_S3C2400

default 4 if ARCH_S3C64XX || ARCH_S5P64XX || CPU_S3C2443 || ARCH_S5PC1XX

default 3

help

Select the number of available UART ports for the Samsung S3C

serial driver

config SERIAL_SAMSUNG_DEBUG 调试用

bool "Samsung SoC serial debug"

depends on SERIAL_SAMSUNG && DEBUG_LL

help

Add support for debugging the serial driver. Since this is

generally being used as a console, we use our own output

routines that go via the low-level debug printascii()

function.

config SERIAL_SAMSUNG_CONSOLE 用于定义串口为控制台终端

bool "Support for console on Samsung SoC serial port"

depends on SERIAL_SAMSUNG=y

select SERIAL_CORE_CONSOLE

help

Allow selection of the S3C24XX on-board serial ports for use as

an virtual console.

Even if you say Y here, the currently visible virtual console

(/dev/tty0) will still be used as the system console by default, but

you can alter that using a kernel command line option such as

"console=ttySACx". (Try "man bootparam" or see the documentation of

your boot loader about how to pass options to the kernel at

boot time.)

config SERIAL_S3C2400 用于S3C2400

tristate "Samsung S3C2410 Serial port support"

depends on ARM && SERIAL_SAMSUNG && CPU_S3C2400

default y if CPU_S3C2400

help

Serial port support for the Samsung S3C2400 SoC

config SERIAL_S3C2410 用于S3C2410

tristate "Samsung S3C2410 Serial port support"

depends on SERIAL_SAMSUNG && CPU_S3C2410

default y if CPU_S3C2410

help

Serial port support for the Samsung S3C2410 SoC

config SERIAL_S3C2412

tristate "Samsung S3C2412/S3C2413 Serial port support"

depends on SERIAL_SAMSUNG && CPU_S3C2412

default y if CPU_S3C2412

help

Serial port support for the Samsung S3C2412 and S3C2413 SoC

config SERIAL_S3C2440

tristate "Samsung S3C2440/S3C2442 Serial port support"

depends on SERIAL_SAMSUNG && (CPU_S3C2440 || CPU_S3C2442)

default y if CPU_S3C2440

default y if CPU_S3C2442

help

Serial port support for the Samsung S3C2440 and S3C2442 SoC

config SERIAL_S3C24A0

tristate "Samsung S3C24A0 Serial port support"

depends on SERIAL_SAMSUNG && CPU_S3C24A0

default y if CPU_S3C24A0

help

Serial port support for the Samsung S3C24A0 SoC

config SERIAL_S3C6400 用于 (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440)

tristate "Samsung S3C6400/S3C6410/S5P6440 Serial port support"

depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440)

default y

help

Serial port support for the Samsung S3C6400, S3C6410 and S5P6440

SoCs

2、serial文件夹下Makefile文件摘要

obj-$(CONFIG_SERIAL_CORE) += serial_core.o

obj-$(CONFIG_SERIAL_SAMSUNG) += samsung.o

obj-$(CONFIG_SERIAL_S3C2400) += s3c2400.o

obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o

obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o

obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o

obj-$(CONFIG_SERIAL_S3C24A0) += s3c24a0.o

obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o

3、顶层.config配置文件

CONFIG_SERIAL_SAMSUNG=y

CONFIG_SERIAL_SAMSUNG_UARTS=4

# CONFIG_SERIAL_SAMSUNG_DEBUG is not set

CONFIG_SERIAL_SAMSUNG_CONSOLE=y

CONFIG_SERIAL_S3C6400=y

CONFIG_SERIAL_CORE=y

CONFIG_SERIAL_CORE_CONSOLE=y

4、从上面这些可知,serial串口驱动主要涉及的文件有

(1)、serial_core.c

(2)、samsung.c

(3)、s3c6400.c0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值