Linux serial port driver - s3c6410 platform (I)

Publisher:HappyExplorerLatest update time:2022-06-15 Source: eefocusKeywords:linux Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Kconfig analysis in the serial folder


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, to support Samsung's on-chip UARTs controller

  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 how many UART controllers are there

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 for debugging

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 is used to define the serial port as a console terminal

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 for 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 for 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 for (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. Summary of Makefile in serial folder


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. Top-level .config configuration file


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. From the above, we can see that the main files involved in the serial port driver are


(1)、serial_core.c


(2)、samsung.c


(3)、s3c6400.c



Keywords:linux Reference address:Linux serial port driver - s3c6410 platform (I)

Previous article:Linux serial terminal driver - s3c6410 platform (Part 3)
Next article:Analysis of nandflash driver under Linux (1)——Based on s3c6410 platform

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号