Introduction to Linux Device Drivers

Slides:



Advertisements
Similar presentations
Jim Chen ( 14/06/2011 Hytec Electronics Ltd.
Advertisements

Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability.
Primary Author: Girish Verma Secondary Author(s): Navya Prabhakar Presenter: Navya Prabhakar Company/Organization: CircuitSutra USB Modeling Quick Start.
Operating Systems Manage system resources –CPU scheduling –Process management –Memory management –Input/Output device management –Storage device management.
USERSPACE I/O Reporter: R 張凱富.
MIGSOCK Migratable TCP Socket in Linux Demonstration of Functionality Karthik Rajan Bryan Kuntz.
Building an Application Server for Home Network based on Android Platform Yi-hsien Liao Supervised by : Dr. Chao-huang Wei Department of Electrical Engineering.
Final presentation- Part A Avi Urman, Kobi Maltinsky Supervisor: Inna Rivkin Linux on SOPC – Embedded System Implementation.
Hacking the Bluetooth Pairing Authentication Process Graduate Operating System Mini Project Siyuan Jiang and Haipeng Cai.
Image Processing for Remote Sensing Matthew E. Nelson Joseph Coleman.
Introduction to USB Development. USB Development Introduction Technical Overview USB in Embedded Systems Recent Developments Extensions to USB USB as.
UART and UART Driver B. Ramamurthy.
Department of Electrical Engineering Electronics Computers Communications Technion Israel Institute of Technology High Speed Digital Systems Lab. High.
Operating Systems Structure what is the organizational principle?
Intel Open Source Technology Center Lu Baolu 2015/09
A Look Inside The Processor
ICOM Noack Linux I/O structure Device special files Device switch tables and fops How the kernel finds a device Parts of a device driver or module.
B. Ramamurthy 2/28/ Copyright 2009 B. Ramamurthy.
Business-logic Layer Presentation Layer Network Layer Digital Signal Processing Layer SmartHome API SmartHome Software Architecture SH mobile application.
The World Leader in High Performance Signal Processing Solutions Linux Industrial I/O Subsystem Open Platform Solutions Michael Hennerich.
The World Leader in High Performance Signal Processing Solutions IP-PBX introduction Jerry Zeng Blackfin uClinux Team.
Matthew Locke November 2007 A Linux Power Management Architecture.
Multiple Passes of the FreeBSD Device Tree
Introduction to Operating Systems Concepts
Digi-Cell V2 Driver Setup
FPGA Support in the upstream kernel Alan Tull
Chapter 13: I/O Systems.
Supporting Multiple Pointing Devices in Microsoft Windows
Android Mobile Application Development
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Linux Details: Device Drivers
By Sonia Thakur James M.Conrad Presenter: Bin Huang
Current Generation Hypervisor Type 1 Type 2.
Linux Realtime Preemption and Its Impact on ULDD* - Progress Report -
Implementation of Embedded OS
Operating Systems (CS 340 D)
Linux Operating System Architecture
Group Manager – PXI™/VXI Software
OPNFV: Support for HA Guest APIs: Introduction
UART and UART Driver B. Ramamurthy.
Performance Tuning Team Chia-heng Tu June 30, 2009
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
Embedded XINU and WRT54GL
Introducing low-power buses for Windows 8
An Introduction to Device Drivers
CSCI 315 Operating Systems Design
Serial Data Hub (Proj Dec13-13).
Introduction to Linux Device Drivers
UART and UART Driver B. Ramamurthy.
CPSC 457 Operating Systems
QNX Technology Overview
HOME AUTOMATION: WEB BASED CONTROL
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
Linux Details: Device Drivers
Chapter 2: The Linux System Part 5
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Outline Device Management Device Manager Design Buffering
Introduction to Virtual Machines
Embedded XINU and WRT54GL
Introduction to Linux Device Drivers
Universal Serial Bus (USB)
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
NVMe.
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Introduction to Linux Device Drivers Class 3: Serial Drivers using Linux Aug 6, 2014 Khem Raj

Introduction Serial port is commonly used communication channel Implemented using UART On PCs UART is part of SuperIO chipset Kernel Drivers for serial devices are generic

Introduction Serial subsystem is use when Terminal session over serial console Using modem or dialup Touch controllers, IR devices, bluetooth USB-2-serial converters

Serial Subsystem Architecture Low level drivers to interact with UART Tty driver layer above driver Data exchange core layer talks to tty driver Shapes behavior of serial subsystem

Serial Drivers Serial over USB Char drivers USB driver talks in a layers setup Tty driver interacts with USB drivers and insulated the serial data exchange (data discipline) Char drivers But do not expose syscall APIs like regular char drivers Services tty layer

UART Driver 3 main Data structures uart_driver – Per UART uart_port – Per port owned by UART uart_ops – Common tty file operations Each UART driver must support Used by tty layer Defines methods to access hardware

UART Driver Register with serial subsystem uart_register_driver(struct uart_driver *); Register every port on device uart_add_one_port(struct uart_driver * , struct uart_port *) serial8250_register_port(struct uart_port *) Internally calls uart_add_one_port

USB UART Platform Driver Implemented at platform Driver Platform drivers used for platform devices Autonomous, appear on port-based devices, host-bridges, controllers on SOCs Directly accessible from CPU bus Has a name, driver bindings, resources list

USB UART Platform Driver Standard Driver Model Device discovery handled outside driver Provides probe() and remove() functions Support Power management and notifications on shutdown

USB UART Platform Driver Registers with USB core Uses uart_register_driver() New tty entries /proc/tty/drivers/ Registers Platform devices Uses platform_device_register_simple() Platform Driver entry points ( functions ) Registers probe(), remove(), suspend(), resume() functions

tty Drivers Registration tty_struct tty_flip_buffer tty_driver Contains information about opening tty tty_flip_buffer Data collection Serial drivers use it. tty_driver Tty driver API used by upper layers Uses tty_register_driver() and tty_register_device () for devices

Line Discipline Registered with tty_register_ldisc() Removed with tty_unregister_ldisc() TTY side APIs Used to call into tty driver Driver access Calls tty driver functions e.g. write(), read() .. Via function pointers Driver Side Interfaces Talks between line discipline and driver receive_buf, write_wakeup, dcd_change

Line Discipline Callers from tty layer as well as driver should take locks If More info in Documentation/serial/tty.txt

Thanks Questions?