[FE training-materials-updates] Remove obsolete serial driver slides
Michael Opdenacker
michael.opdenacker at free-electrons.com
Mon Jan 9 14:02:14 CET 2017
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=ee22e63db15a379255964ccb6b406fbd7f17f688
>---------------------------------------------------------------
commit ee22e63db15a379255964ccb6b406fbd7f17f688
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Mon Jan 9 14:02:14 2017 +0100
Remove obsolete serial driver slides
- Now available on http://free-electrons.com/doc/serial-drivers/
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
ee22e63db15a379255964ccb6b406fbd7f17f688
.../kernel-serial-drivers-content/architecture.dia | 677 -----------------
.../kernel-serial-drivers-content.tex | 802 ---------------------
.../kernel-serial-drivers-lab.tex | 8 -
.../kernel-serial-drivers-title.tex | 1 -
4 files changed, 1488 deletions(-)
diff --git a/slides/kernel-serial-drivers-content/architecture.dia b/slides/kernel-serial-drivers-content/architecture.dia
deleted file mode 100644
index 101012c..0000000
--- a/slides/kernel-serial-drivers-content/architecture.dia
+++ /dev/null
@@ -1,677 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
- <dia:diagramdata>
- <dia:attribute name="background">
- <dia:color val="#ffffff"/>
- </dia:attribute>
- <dia:attribute name="pagebreak">
- <dia:color val="#000099"/>
- </dia:attribute>
- <dia:attribute name="paper">
- <dia:composite type="paper">
- <dia:attribute name="name">
- <dia:string>#A4#</dia:string>
- </dia:attribute>
- <dia:attribute name="tmargin">
- <dia:real val="2.8222000598907471"/>
- </dia:attribute>
- <dia:attribute name="bmargin">
- <dia:real val="2.8222000598907471"/>
- </dia:attribute>
- <dia:attribute name="lmargin">
- <dia:real val="2.8222000598907471"/>
- </dia:attribute>
- <dia:attribute name="rmargin">
- <dia:real val="2.8222000598907471"/>
- </dia:attribute>
- <dia:attribute name="is_portrait">
- <dia:boolean val="true"/>
- </dia:attribute>
- <dia:attribute name="scaling">
- <dia:real val="1"/>
- </dia:attribute>
- <dia:attribute name="fitto">
- <dia:boolean val="false"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="grid">
- <dia:composite type="grid">
- <dia:attribute name="width_x">
- <dia:real val="1"/>
- </dia:attribute>
- <dia:attribute name="width_y">
- <dia:real val="1"/>
- </dia:attribute>
- <dia:attribute name="visible_x">
- <dia:int val="1"/>
- </dia:attribute>
- <dia:attribute name="visible_y">
- <dia:int val="1"/>
- </dia:attribute>
- <dia:composite type="color"/>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#d8e5e5"/>
- </dia:attribute>
- <dia:attribute name="guides">
- <dia:composite type="guides">
- <dia:attribute name="hguides"/>
- <dia:attribute name="vguides"/>
- </dia:composite>
- </dia:attribute>
- </dia:diagramdata>
- <dia:layer name="Arrière-plan" visible="true" active="true">
- <dia:object type="Standard - Box" version="0" id="O0">
- <dia:attribute name="obj_pos">
- <dia:point val="3,2"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="2.95,1.95;24.05,4.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="3,2"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="21"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="2"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#868686"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#e5e5e5"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O1">
- <dia:attribute name="obj_pos">
- <dia:point val="13.5,3"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="10.0725,2.62625;16.9275,3.37375"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#System Call Interface#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="13.5,3.22125"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="1"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O0" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Box" version="0" id="O2">
- <dia:attribute name="obj_pos">
- <dia:point val="3,6"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="2.95,5.95;15.05,12.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="3,6"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="12"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="6"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#5cacff"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#add8e6"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Box" version="0" id="O3">
- <dia:attribute name="obj_pos">
- <dia:point val="16,6"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="15.95,5.95;24.05,8.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="16,6"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="8"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="2"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#2f004a"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#efb9ff"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O4">
- <dia:attribute name="obj_pos">
- <dia:point val="20,7"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="17.3337,6.62625;22.6662,7.37375"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#Character Driver#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="20,7.22125"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="1"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O3" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O5">
- <dia:attribute name="obj_pos">
- <dia:point val="9,9"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="9,8.22625;14.3325,9.77375"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#Character Driver
-TTY Core#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="9,8.82125"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="0"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O2" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Box" version="0" id="O6">
- <dia:attribute name="obj_pos">
- <dia:point val="2,7"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="1.95,6.95;7.05,11.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="2,7"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="5"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="4"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#5cacff"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#add8e6"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O7">
- <dia:attribute name="obj_pos">
- <dia:point val="4.5,9"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="2.9525,8.22625;6.0475,9.77375"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#Line
-Discipline#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="4.5,8.82125"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="1"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O6" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Box" version="0" id="O8">
- <dia:attribute name="obj_pos">
- <dia:point val="3,14"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="2.95,13.95;8.05,16.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="3,14"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="5"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="2"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#6a8954"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#c5e387"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Box" version="0" id="O9">
- <dia:attribute name="obj_pos">
- <dia:point val="10,14"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="9.95,13.95;15.05,16.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="10,14"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="5"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="2"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#6a8954"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#c5e387"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O10">
- <dia:attribute name="obj_pos">
- <dia:point val="5.5,15"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="3.83125,14.6263;7.16875,15.3738"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#TTY Driver#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="5.5,15.2213"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="1"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O8" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O11">
- <dia:attribute name="obj_pos">
- <dia:point val="12.5,15"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="10.7513,14.2263;14.2488,15.7737"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#TTY Driver
-Serial Core#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="12.5,14.8213"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="1"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O9" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Box" version="0" id="O12">
- <dia:attribute name="obj_pos">
- <dia:point val="10,18"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="9.95,17.95;15.05,20.05"/>
- </dia:attribute>
- <dia:attribute name="elem_corner">
- <dia:point val="10,18"/>
- </dia:attribute>
- <dia:attribute name="elem_width">
- <dia:real val="5"/>
- </dia:attribute>
- <dia:attribute name="elem_height">
- <dia:real val="2"/>
- </dia:attribute>
- <dia:attribute name="border_width">
- <dia:real val="0.10000000149011612"/>
- </dia:attribute>
- <dia:attribute name="border_color">
- <dia:color val="#a34804"/>
- </dia:attribute>
- <dia:attribute name="inner_color">
- <dia:color val="#ffd192"/>
- </dia:attribute>
- <dia:attribute name="show_background">
- <dia:boolean val="true"/>
- </dia:attribute>
- </dia:object>
- <dia:object type="Standard - Text" version="1" id="O13">
- <dia:attribute name="obj_pos">
- <dia:point val="12.5,19"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="10.5075,18.6262;14.4925,19.3737"/>
- </dia:attribute>
- <dia:attribute name="text">
- <dia:composite type="text">
- <dia:attribute name="string">
- <dia:string>#Serial Driver#</dia:string>
- </dia:attribute>
- <dia:attribute name="font">
- <dia:font family="Latin Modern Sans" style="0" name="Courier"/>
- </dia:attribute>
- <dia:attribute name="height">
- <dia:real val="0.80000000000000004"/>
- </dia:attribute>
- <dia:attribute name="pos">
- <dia:point val="12.5,19.2212"/>
- </dia:attribute>
- <dia:attribute name="color">
- <dia:color val="#000000"/>
- </dia:attribute>
- <dia:attribute name="alignment">
- <dia:enum val="1"/>
- </dia:attribute>
- </dia:composite>
- </dia:attribute>
- <dia:attribute name="valign">
- <dia:enum val="2"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O12" connection="8"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - ZigZagLine" version="1" id="O14">
- <dia:attribute name="obj_pos">
- <dia:point val="9,12"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="8.95,11.95;12.8618,14.1118"/>
- </dia:attribute>
- <dia:attribute name="orth_points">
- <dia:point val="9,12"/>
- <dia:point val="9,13"/>
- <dia:point val="12.5,13"/>
- <dia:point val="12.5,14"/>
- </dia:attribute>
- <dia:attribute name="orth_orient">
- <dia:enum val="1"/>
- <dia:enum val="0"/>
- <dia:enum val="1"/>
- </dia:attribute>
- <dia:attribute name="autorouting">
- <dia:boolean val="true"/>
- </dia:attribute>
- <dia:attribute name="end_arrow">
- <dia:enum val="22"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_length">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_width">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O2" connection="6"/>
- <dia:connection handle="1" to="O9" connection="1"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - ZigZagLine" version="1" id="O15">
- <dia:attribute name="obj_pos">
- <dia:point val="9,12"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="5.1382,11.95;9.05,14.1118"/>
- </dia:attribute>
- <dia:attribute name="orth_points">
- <dia:point val="9,12"/>
- <dia:point val="9,13"/>
- <dia:point val="5.5,13"/>
- <dia:point val="5.5,14"/>
- </dia:attribute>
- <dia:attribute name="orth_orient">
- <dia:enum val="1"/>
- <dia:enum val="0"/>
- <dia:enum val="1"/>
- </dia:attribute>
- <dia:attribute name="autorouting">
- <dia:boolean val="true"/>
- </dia:attribute>
- <dia:attribute name="end_arrow">
- <dia:enum val="22"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_length">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_width">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O2" connection="6"/>
- <dia:connection handle="1" to="O8" connection="1"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Line" version="0" id="O16">
- <dia:attribute name="obj_pos">
- <dia:point val="12.5,16"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="12.1382,15.95;12.8618,18.1118"/>
- </dia:attribute>
- <dia:attribute name="conn_endpoints">
- <dia:point val="12.5,16"/>
- <dia:point val="12.5,18"/>
- </dia:attribute>
- <dia:attribute name="numcp">
- <dia:int val="1"/>
- </dia:attribute>
- <dia:attribute name="end_arrow">
- <dia:enum val="22"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_length">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_width">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="0" to="O9" connection="6"/>
- <dia:connection handle="1" to="O12" connection="1"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Line" version="0" id="O17">
- <dia:attribute name="obj_pos">
- <dia:point val="20,4"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="19.6382,3.95;20.3618,6.1118"/>
- </dia:attribute>
- <dia:attribute name="conn_endpoints">
- <dia:point val="20,4"/>
- <dia:point val="20,6"/>
- </dia:attribute>
- <dia:attribute name="numcp">
- <dia:int val="1"/>
- </dia:attribute>
- <dia:attribute name="end_arrow">
- <dia:enum val="22"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_length">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_width">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="1" to="O3" connection="1"/>
- </dia:connections>
- </dia:object>
- <dia:object type="Standard - Line" version="0" id="O18">
- <dia:attribute name="obj_pos">
- <dia:point val="9,4"/>
- </dia:attribute>
- <dia:attribute name="obj_bb">
- <dia:rectangle val="8.6382,3.95;9.3618,6.1118"/>
- </dia:attribute>
- <dia:attribute name="conn_endpoints">
- <dia:point val="9,4"/>
- <dia:point val="9,6"/>
- </dia:attribute>
- <dia:attribute name="numcp">
- <dia:int val="1"/>
- </dia:attribute>
- <dia:attribute name="end_arrow">
- <dia:enum val="22"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_length">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:attribute name="end_arrow_width">
- <dia:real val="0.5"/>
- </dia:attribute>
- <dia:connections>
- <dia:connection handle="1" to="O2" connection="1"/>
- </dia:connections>
- </dia:object>
- </dia:layer>
-</dia:diagram>
diff --git a/slides/kernel-serial-drivers-content/kernel-serial-drivers-content.tex b/slides/kernel-serial-drivers-content/kernel-serial-drivers-content.tex
deleted file mode 100644
index 7d306d2..0000000
--- a/slides/kernel-serial-drivers-content/kernel-serial-drivers-content.tex
+++ /dev/null
@@ -1,802 +0,0 @@
-\begin{frame}
- \frametitle{Architecture (1)}
- \begin{center}
- \includegraphics[height=0.8\textheight]{slides/kernel-serial-drivers-content/architecture.pdf}
- \end{center}
-\end{frame}
-
-\begin{frame}
- \frametitle{Architecture (2)}
- \begin{itemize}
- \item To be properly integrated in a Linux system, serial ports must
- be visible as TTY devices from user space applications
- \item Therefore, the serial driver must be part of the kernel TTY
- subsystem
- \item Until 2.6, serial drivers were implemented directly behind the
- TTY core
- \begin{itemize}
- \item A lot of complexity was involved
- \end{itemize}
- \item Since 2.6, a specialized TTY driver, \code{serial_core}, eases
- the development of serial drivers
- \begin{itemize}
- \item See \code{include/linux/serial_core.h} for the main
- definitions of the \code{serial_core} infrastructure
- \end{itemize}
- \item The line discipline that cooks the data exchanged with the
- \code{tty} driver. For normal serial ports, \code{N_TTY} is used.
- \end{itemize}
-\end{frame}
-
-\begin{frame}
- \frametitle{Data Structures}
- \begin{itemize}
- \item A data structure representing a driver: \code{uart_driver}
- \begin{itemize}
- \item Single instance for each driver
- \item \code{uart_register_driver()} and
- \code{uart_unregister_driver()}
- \end{itemize}
- \item A data structure representing a port: \code{uart_port}
- \begin{itemize}
- \item One instance for each port (several per driver are possible)
- \item \code{uart_add_one_port()} and \code{uart_remove_one_port()}
- \end{itemize}
- \item A data structure containing the pointers to the operations:
- \code{uart_ops}
- \begin{itemize}
- \item Linked from \code{uart_port} through the \code{ops} field
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}
- \frametitle{uart\_driver}
- \begin{itemize}
- \item Usually
- \begin{itemize}
- \item Defined statically in the driver
- \item Registered in \code{module_init()}
- \item Unregistered in \code{module_cleanup()}
- \end{itemize}
- \item Contains
- \begin{itemize}
- \item \code{owner}, usually set to \code{THIS_MODULE}
- \item \code{driver_name}
- \item \code{dev_name}, the device name prefix, usually \code{ttyS}
- \item \code{major} and \code{minor}
- \begin{itemize}
- \item Use \code{TTY_MAJOR} and \code{64} to get the normal
- numbers. But they might conflict with the 8250-reserved
- numbers
- \end{itemize}
- \item \code{nr}, the maximum number of ports
- \item \code{cons}, pointer to the console device (covered later)
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{uart\_driver Code Example (1)}
-\begin{minted}[fontsize=\scriptsize]{c}
-static struct uart_driver atmel_uart = {
- .owner = THIS_MODULE,
- .driver_name = "atmel_serial",
- .dev_name = ATMEL_DEVICENAME,
- .major = SERIAL_ATMEL_MAJOR,
- .minor = MINOR_START,
- .nr = ATMEL_MAX_UART,
- .cons = ATMEL_CONSOLE_DEVICE,
-};
-
-static struct platform_driver atmel_serial_driver = {
- .probe = atmel_serial_probe,
- .remove = atmel_serial_remove,
- .suspend = atmel_serial_suspend,
- .resume = atmel_serial_resume,
- .driver = {
- .name = "atmel_usart",
- .owner = THIS_MODULE,
- },
-};
-\end{minted}
-Example code from \code{drivers/serial/atmel_serial.c}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{uart\_driver Code Example (2)}
-\begin{minted}[fontsize=\small]{c}
-static int __init atmel_serial_init(void)
-{
- /* Warning: Error management removed */
- uart_register_driver(&atmel_uart);
- platform_driver_register(&atmel_serial_driver);
- return 0;
-}
-
-static void __exit atmel_serial_exit(void)
-{
- platform_driver_unregister(&atmel_serial_driver);
- uart_unregister_driver(&atmel_uart);
-}
-
-module_init(atmel_serial_init);
-module_exit(atmel_serial_exit);
-\end{minted}
-\end{frame}
-
-\begin{frame}
- \frametitle{uart\_port}
- \begin{itemize}
- \item Can be allocated statically or dynamically
- \item Usually registered at \code{probe()} time and unregistered at
- \code{remove()} time
- \item Most important fields
- \begin{itemize}
- \item \code{iotype}, type of I/O access, usually \code{UPIO_MEM}
- for memory-mapped devices
- \item \code{mapbase}, physical address of the registers
- \item \code{irq}, the IRQ channel number
- \item \code{membase}, the virtual address of the registers
- \item \code{uartclk}, the clock rate
- \item \code{ops}, pointer to the operations
- \item \code{dev}, pointer to the device (\code{platform_device}
- or other)
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{uart\_port Code Example (1)}
-\begin{minted}[fontsize=\tiny]{c}
-static int atmel_serial_probe(struct platform_device *pdev)
-{
- struct atmel_uart_port *port;
-
- port = &atmel_ports[pdev->id];
- port->backup_imr = 0;
-
- atmel_init_port(port, pdev);
-
- uart_add_one_port(&atmel_uart, &port->uart);
-
- platform_set_drvdata(pdev, port);
-
- return 0;
-}
-
-static int atmel_serial_remove(struct platform_device *pdev)
-{
- struct uart_port *port = platform_get_drvdata(pdev);
-
- platform_set_drvdata(pdev, NULL);
- uart_remove_one_port(&atmel_uart, port);
-
- return 0;
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{uart\_port Code Example (2)}
-\begin{minted}[fontsize=\footnotesize]{c}
-static void atmel_init_port(
- struct atmel_uart_port *atmel_port,
- struct platform_device *pdev)
-{
- struct uart_port *port = &atmelt_port->uart;
- struct atmel_uart_data *data = pdev->dev.platform_data;
-
- port->iotype = UPIO_MEM;
- port->flags = UPF_BOOT_AUTOCONF;
- port->ops = &atmel_pops;
- port->fifosize = 1;
- port->line = pdev->id;
- port->dev = &pdev->dev;
-
- port->mapbase = pdev->resource[0].start;
- port->irq = pdev->resource[1].start;
-
- tasklet_init(&atmel_port->tasklet, atmel_tasklet_func,
- (unsigned long)port);
-
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{uart\_port Code Example (3)}
-\begin{minted}[fontsize=\footnotesize]{c}
- if (data->regs)
- /* Already mapped by setup code */
- port->membase = data->regs;
- else {
- port->flags |= UPF_IOREMAP;
- port->membase = NULL;
- }
-
- /* for console, the clock could already be configured */
- if (!atmel_port->clk) {
- atmel_port->clk = clk_get(&pdev->dev, "usart");
- clk_enable(atmel_port->clk);
- port->uartclk = clk_get_rate(atmel_port->clk);
- clk_disable(atmel_port->clk);
- /* only enable clock when USART is in use */
- }
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}
- \frametitle{uart\_ops}
- \begin{itemize}
- \item Important operations
- \begin{itemize}
- \item \code{tx_empty()}, tells whether the transmission FIFO is
- empty or not
- \item \code{set_mctrl()} and \code{get_mctrl()}, allow to set and
- get the modem control parameters (RTS, DTR, LOOP, etc.)
- \item \code{start_tx()} and \code{stop_tx()}, to start and stop
- the transmission
- \item \code{stop_rx()}, to stop the reception
- \item \code{startup()} and \code{shutdown()}, called when the port
- is opened/closed
- \item \code{request_port()} and \code{release_port()},
- request/release I/O or memory regions
- \item \code{set_termios()}, change port parameters
- \end{itemize}
- \item See the detailed description in
- \kerneldoctext{serial/driver}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Implementing Transmission}
- \begin{itemize}
- \item The \code{start_tx()} method should start transmitting
- characters over the serial port
- \item The characters to transmit are stored in a circular buffer,
- implemented by a \kstruct{uart_circ} structure. It contains
- \begin{itemize}
- \item \code{buf[]}, the buffer of characters
- \item \code{tail}, the index of the next character to
- transmit. After transmit, tail must be updated using
- \mint{c}+tail = tail &(UART_XMIT_SIZE - 1)+
- \end{itemize}
- \item Utility functions on \code{uart_circ}
- \begin{itemize}
- \item \code{uart_circ_empty()}, tells whether the circular buffer
- is empty
- \item \code{uart_circ_chars_pending()}, returns the number of
- characters left to transmit
- \end{itemize}
- \item From an \code{uart_port} pointer, this structure can be
- reached using \code{port->state->xmit}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Polled-Mode Transmission}
-\begin{minted}[fontsize=\footnotesize]{c}
-foo_uart_putc(struct uart_port *port, unsigned char c) {
- while(__raw_readl(port->membase + UART_REG1) & UART_TX_FULL)
- cpu_relax();
- __raw_writel(c, port->membase + UART_REG2);
-}
-
-foo_uart_start_tx(struct uart_port *port) {
- struct circ_buf *xmit = &port->state->xmit;
-
- while (!uart_circ_empty(xmit)) {
- foo_uart_putc(port, xmit->buf[xmit->tail]);
- xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
- port->icount.tx++;
- }
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Transmission with Interrupts (1)}
-\begin{minted}{c}
-foo_uart_interrupt(int irq, void *dev_id) {
- [...]
- if (interrupt_cause & END_OF_TRANSMISSION)
- foo_uart_handle_transmit(port);
- [...]
-}
-
-foo_uart_start_tx(struct uart_port *port) {
- enable_interrupt_on_txrdy();
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{Transmission with Interrupts (2)}
-\begin{minted}[fontsize=\footnotesize]{c}
-foo_uart_handle_transmit(port) {
- struct circ_buf *xmit = &port->state->xmit;
- if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
- disable_interrupt_on_txrdy();
- return;
- }
-
- while (!uart_circ_empty(xmit)) {
- if (!(__raw_readl(port->membase + UART_REG1) &
- UART_TX_FULL))
- break;
- __raw_writel(xmit->buf[xmit->tail],
- port->membase + UART_REG2);
- xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
- port->icount.tx++;
- }
-
- if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
- uart_write_wakeup(port);
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}
- \frametitle{Reception}
- \begin{itemize}
- \item On reception, usually in an interrupt handler, the driver must
- \begin{itemize}
- \item Increment \code{port->icount.rx}
- \item Call \code{uart_handle_break()} if a \code{BRK} has been
- received, and if it returns TRUE, skip to the next character
- \item If an error occurred, increment \code{port->icount.parity},
- \code{port->icount.frame}, \code{port->icount.overrun} depending
- on the error type
- \item Call \code{uart_handle_sysrq_char()} with the received
- character, and if it returns TRUE, skip to the next character
- \item Call \code{uart_insert_char()} with the received character
- and a status
- \begin{itemize}
- \item Status is \code{TTY_NORMAL} is everything is OK, or
- \code{TTY_BREAK}, \code{TTY_PARITY}, \code{TTY_FRAME} in case
- of error
- \end{itemize}
- \item Call \code{tty_flip_buffer_push()} to push data to the TTY
- layer
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}
- \frametitle{Understanding Sysrq}
- \begin{itemize}
- \item Part of the reception work is dedicated to handling
- \code{Sysrq}
- \begin{itemize}
- \item Sysrq are special commands that can be sent to the kernel to
- make it reboot, unmount filesystems, dump the task state, nice
- real-time tasks, etc.
- \item These commands are implemented at the lowest possible level
- so that even if the system is locked, you can recover it.
- \item Through serial port: send a \code{BRK} character, send the
- character of the \code{Sysrq} command
- \item See \kerneldoctext{sysrq.txt}
- \end{itemize}
- \item In the driver
- \begin{itemize}
- \item \code{uart_handle_break()} saves the current time + 5
- seconds in a variable
- \item \code{uart_handle_sysrq_char()} will test if the current
- time is below the saved time, and if so, will trigger the
- execution of the Sysrq command
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Reception Code Sample (1)}
-\begin{minted}[fontsize=\scriptsize]{c}
-foo_receive_chars(struct uart_port *port) {
- int limit = 256;
-
- while (limit-- > 0) {
- status = __raw_readl(port->membase + REG_STATUS);
- ch = __raw_readl(port->membase + REG_DATA);
- flag = TTY_NORMAL;
-
- if (status & BREAK) {
- port->icount.break++;
- if (uart_handle_break(port))
- continue;
- }
- else if (status & PARITY)
- port->icount.parity++;
- else if (status & FRAME)
- port->icount.frame++;
- else if (status & OVERRUN)
- port->icount.overrun++;
-
- [...]
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{Reception Code Sample (2)}
-\begin{minted}[fontsize=\scriptsize]{c}
- [...]
- status &= port->read_status_mask;
-
- if (status & BREAK)
- flag = TTY_BREAK;
- else if (status & PARITY)
- flag = TTY_PARITY;
- else if (status & FRAME)
- flag = TTY_FRAME;
-
- if (uart_handle_sysrq_char(port, ch))
- continue;
-
- uart_insert_char(port, status, OVERRUN, ch, flag);
- }
-
- spin_unlock(& port->lock);
- tty_flip_buffer_push(port->state->port.tty);
- spin_lock(& port->lock);
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}
- \frametitle{Modem Control Lines}
- \begin{itemize}
- \item Set using the \code{set_mctrl()} operation
- \begin{itemize}
- \item The \code{mctrl} argument can be a mask of \code{TIOCM_RTS}
- (request to send), \code{TIOCM_DTR} (Data Terminal Ready),
- \code{TIOCM_OUT1}, \code{TIOCM_OUT2}, \code{TIOCM_LOOP} (enable
- loop mode)
- \item If a bit is set in \code{mctrl}, the signal must be driven
- active, if the bit is cleared, the signal must be driven
- inactive
- \end{itemize}
- \item Status using the \code{get_mctrl()} operation
- \begin{itemize}
- \item Must return read hardware status and return a combination of
- \code{TIOCM_CD} (Carrier Detect), \code{TIOCM_CTS} (Clear to
- Send), \code{TIOCM_DSR} (Data Set Ready) and \code{TIOCM_RI}
- (Ring Indicator)
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{set\_mctrl() Example}
-\begin{minted}[fontsize=\scriptsize]{c}
-foo_set_mctrl(struct uart_port *uart, u_int mctrl) {
- unsigned int control = 0, mode = 0;
-
- if (mctrl & TIOCM_RTS)
- control |= ATMEL_US_RTSEN;
- else
- control |= ATMEL_US_RTSDIS;
-
- if (mctrl & TIOCM_DTS)
- control |= ATMEL_US_DTREN;
- else
- control |= ATMEL_US_DTRDIS;
-
- __raw_writel(port->membase + REG_CTRL, control);
-
- if (mctrl & TIOCM_LOOP)
- mode |= ATMEL_US_CHMODE_LOC_LOOP;
- else
- mode |= ATMEL_US_CHMODE_NORMAL;
-
- __raw_writel(port->membase + REG_MODE, mode);
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{get\_mctrl() example}
-\begin{minted}[fontsize=\footnotesize]{c}
-foo_get_mctrl(struct uart_port *uart, u_int mctrl) {
- unsigned int status, ret = 0;
-
- status = __raw_readl(port->membase + REG_STATUS);
-
- /*
- * The control signals are active low.
- */
- if (!(status & ATMEL_US_DCD))
- ret |= TIOCM_CD;
- if (!(status & ATMEL_US_CTS))
- ret |= TIOCM_CTS;
- if (!(status & ATMEL_US_DSR))
- ret |= TIOCM_DSR;
- if (!(status & ATMEL_US_RI))
- ret |= TIOCM_RI;
-
- return ret;
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}
- \frametitle{termios}
- \begin{itemize}
- \item \emph{The termios functions describe a general terminal
- interface that is provided to control asynchronous
- communication ports}
- \item A mechanism to control from user space serial port parameters
- such as
- \begin{itemize}
- \item Speed
- \item Parity
- \item Byte size
- \item Stop bit
- \item Hardware handshake
- \item Etc.
- \end{itemize}
- \item See \code{termios(3)} for details
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{set\_termios()}
- \begin{itemize}
- \item The \code{set_termios()} operation must
- \begin{itemize}
- \item apply configuration changes according to the arguments
- \item update \code{port->read_config_mask} and
- \code{port->ignore_config_mask} to indicate the events we are
- interested in receiving
- \end{itemize}
- \item \mint{c}+static void set_termios(struct uart_port *port,+
- \mint{c}+struct ktermios *termios, struct ktermios *old)+
- \begin{itemize}
- \item \code{port}, the port, \code{termios}, the new values and
- \code{old}, the old values
- \end{itemize}
- \item Relevant \code{ktermios} structure fields are
- \begin{itemize}
- \item \code{c_cflag} with word size, stop bits, parity, reception
- enable, CTS status change reporting, enable modem status change
- reporting
- \item \code{c_iflag} with frame and parity errors reporting, break
- event reporting
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{set\_termios() example (1)}
-\begin{minted}[fontsize=\scriptsize]{c}
-static void atmel_set_termios(struct uart_port *port,
- struct ktermios *termios, struct ktermios *old)
-{
- unsigned long flags;
- unsigned int mode, imr, quot, baud;
-
- mode = __raw_readl(port->membase + REG_MODE);
- baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16);
- /* Read current configuration */
- quot = uart_get_divisor(port, baud);
-
- /* Compute the mode modification for the byte size parameter */
- switch (termios->c_cflag & CSIZE) {
- case CS5:
- mode |= ATMEL_US_CHRL_5;
- break;
- case CS6:
- mode |= ATMEL_US_CHRL_6;
- break;
- [...]
- default:
- mode |= ATMEL_US_CHRL_8;
- break;
- }
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{set\_termios() example (2)}
-\begin{minted}[fontsize=\scriptsize]{c}
- /* Compute the mode modification for the stop bit */
- if (termios->c_cflag & CSTOPB)
- mode |= ATMEL_US_NBSTOP_2;
-
- /* Compute the mode modification for parity */
- if (termios->c_cflag & PARENB) {
- /* Mark or Space parity */
- if (termios->c_cflag & CMSPAR) {
- if (termios->c_cflag & PARODD)
- mode |= ATMEL_US_PAR_MARK;
- else
- mode |= ATMEL_US_PAR_SPACE;
- } else if (termios->c_cflag & PARODD)
- mode |= ATMEL_US_PAR_ODD;
- else
- mode |= ATMEL_US_PAR_EVEN;
- } else
- mode |= ATMEL_US_PAR_NONE;
-
- /* Compute the mode modification for CTS reporting */
- if (termios->c_cflag & CRTSCTS)
- mode |= ATMEL_US_USMODE_HWHS;
- else
- mode |= ATMEL_US_USMODE_NORMAL;
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{set\_termios() Example (3)}
-\begin{minted}[fontsize=\scriptsize]{c}
- /* Compute the read_status_mask and ignore_status_mask
- * according to the events we're interested in. These
- * values are used in the interrupt handler. */
- port->read_status_mask = ATMEL_US_OVRE;
- if (termios->c_iflag & INPCK)
- port->read_status_mask |= (ATMEL_US_FRAME | ATMEL_US_PARE);
- if (termios->c_iflag & (BRKINT | PARMRK))
- port->read_status_mask |= ATMEL_US_RXBRK;
-
- port->ignore_status_mask = 0;
- if (termios->c_iflag & IGNPAR)
- port->ignore_status_mask |= (ATMEL_US_FRAME | ATMEL_US_PARE);
- if (termios->c_iflag & IGNBRK) {
- port->ignore_status_mask |= ATMEL_US_RXBRK;
- if (termios->c_iflag & IGNPAR)
- port->ignore_status_mask |= ATMEL_US_OVRE;
- }
- /* The serial_core maintains a timeout that corresponds to the
- * duration it takes to send the full transmit FIFO. This timeout has
- * to be updated. */
- uart_update_timeout(port, termios->c_cflag, baud);
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{set\_termios() Example (4)}
-\begin{minted}[fontsize=\scriptsize]{c}
- /* Finally, apply the mode and baud rate modifications. Interrupts,
- * transmission and reception are disabled when the modifications
- * are made. */
-
- /* Save and disable interrupts */
- imr = UART_GET_IMR(port);
- UART_PUT_IDR(port, -1);
- /* disable receiver and transmitter */
- UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS);
- /* set the parity, stop bits and data size */
- UART_PUT_MR(port, mode);
- /* set the baud rate */
- UART_PUT_BRGR(port, quot);
- UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
- UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN);
- /* restore interrupts */
- UART_PUT_IER(port, imr);
- /* CTS flow-control and modem-status interrupts */
- if (UART_ENABLE_MS(port, termios->c_cflag))
- port->ops->enable_ms(port);
-}
- \end{minted}
-\end{frame}
-
-\begin{frame}
- \frametitle{Console}
- \begin{itemize}
- \item To allows early boot messages to be printed, the kernel
- provides a separate but related facility: \code{console}
- \begin{itemize}
- \item This console can be enabled using the \code{console=} kernel
- argument
- \end{itemize}
- \item The driver developer must
- \begin{itemize}
- \item Implement a \code{console_write()} operation, called to
- print characters on the console
- \item Implement a \code{console_setup()} operation, called to
- parse the \code{console=} argument
- \item Declare a \kstruct{console} structure
- \item Register the console using a \code{console_initcall()}
- function
- \end{itemize}
- \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Console: Registration}
-\begin{minted}[fontsize=\scriptsize]{c}
-static struct console serial_txx9_console = {
- .name = TXX9_TTY_NAME,
- .write = serial_txx9_console_write,
- /* Helper function from the serial_core layer */
- .device = uart_console_device,
- .setup = serial_txx9_console_setup,
- /* Ask for the kernel messages buffered during
- * boot to be printed to the console when activated */
- .flags = CON_PRINTBUFFER,
- .index = -1,
- .data = &serial_txx9_reg,
-};
-
-static int __init serial_txx9_console_init(void)
-{
- register_console(&serial_txx9_console);
- return 0;
-}
-
-/* This will make sure the function is called early during the boot process.
- * start_kernel() calls console_init() that calls our function */
-console_initcall(serial_txx9_console_init);
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Console: Setup}
-\begin{minted}[fontsize=\tiny]{c}
-static int __init serial_txx9_console_setup(struct console *co,
- char *options)
-{
- struct uart_port *port;
- struct uart_txx9_port *up;
- int baud = 9600;
- int bits = 8;
- int parity = 'n';
- int flow = 'n';
-
- if (co->index >= UART_NR)
- co->index = 0;
- up = &serial_txx9_ports[co->index];
- port = &up->port;
- if (!port->ops)
- return -ENODEV;
-
- /* Function shared with the normal serial driver */
- serial_txx9_initialize(&up->port);
-
- if (options)
- /* Helper function from serial_core that parses the console= string */
- uart_parse_options(options, &baud, &parity, &bits, &flow);
-
- /* Helper function from serial_core that calls the ->set_termios() */
- /* operation with the proper arguments to configure the port */
- return uart_set_options(port, co, baud, parity, bits, flow);
-}
-\end{minted}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Console: Write}
-\begin{minted}[fontsize=\tiny]{c}
-static void serial_txx9_console_putchar(struct uart_port *port, int ch)
-{
- struct uart_txx9_port *up = (struct uart_txx9_port *)port;
- /* Busy-wait for transmitter ready and output a single character. */
- wait_for_xmitr(up);
- sio_out(up, TXX9_SITFIFO, ch);
-}
-
-static void serial_txx9_console_write(struct console *co,
- const char *s, unsigned int count)
-{
- struct uart_txx9_port *up = &serial_txx9_ports[co->index];
- unsigned int ier, flcr;
-
- /* Disable interrupts */
- ier = sio_in(up, TXX9_SIDICR);
- sio_out(up, TXX9_SIDICR, 0);
-
- /* Disable flow control */
- flcr = sio_in(up, TXX9_SIFLCR);
- if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES))
- sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES);
-
- /* Helper function from serial_core that repeatedly calls the given putchar() */
- /* callback */
- uart_console_write(&up->port, s, count, serial_txx9_console_putchar);
-
- /* Re-enable interrupts */
- wait_for_xmitr(up);
- sio_out(up, TXX9_SIFLCR, flcr);
- sio_out(up, TXX9_SIDICR, ier);
-}
-\end{minted}
-\end{frame}
diff --git a/slides/kernel-serial-drivers-lab/kernel-serial-drivers-lab.tex b/slides/kernel-serial-drivers-lab/kernel-serial-drivers-lab.tex
deleted file mode 100644
index 30c6303..0000000
--- a/slides/kernel-serial-drivers-lab/kernel-serial-drivers-lab.tex
+++ /dev/null
@@ -1,8 +0,0 @@
-\setuplabframe
-{Serial drivers}
-{
- \begin{itemize}
- \item Improve the character driver of the previous labs to make it a
- real serial driver
- \end{itemize}
-}
diff --git a/slides/kernel-serial-drivers-title/kernel-serial-drivers-title.tex b/slides/kernel-serial-drivers-title/kernel-serial-drivers-title.tex
deleted file mode 100644
index 1aa91a8..0000000
--- a/slides/kernel-serial-drivers-title/kernel-serial-drivers-title.tex
+++ /dev/null
@@ -1 +0,0 @@
-\section{Serial Drivers}
More information about the training-materials-updates
mailing list