[FE training-materials-updates] Kernel slides: remove references to sources that no longer exist
Michael Opdenacker
michael.opdenacker at free-electrons.com
Wed Mar 9 21:37:55 CET 2016
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=96b1c6823d488d14383588b77ca369203f554a96
>---------------------------------------------------------------
commit 96b1c6823d488d14383588b77ca369203f554a96
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date: Wed Mar 9 21:37:55 2016 +0100
Kernel slides: remove references to sources that no longer exist
- Or highlight that some files don't exist anymore
(like the i.mx uart examples that no longer exist,
corresponding to a section that needs deeper updating.
Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>
>---------------------------------------------------------------
96b1c6823d488d14383588b77ca369203f554a96
slides/kernel-device-model/kernel-device-model.tex | 47 ++++++++++++----------
.../kernel-driver-development-general-apis.tex | 6 +--
.../kernel-porting-content.tex | 25 +++++++-----
.../kernel-power-management-content.tex | 7 ++--
.../kernel-source-code-layout.tex | 4 +-
5 files changed, 48 insertions(+), 41 deletions(-)
diff --git a/slides/kernel-device-model/kernel-device-model.tex b/slides/kernel-device-model/kernel-device-model.tex
index d256400..bd274a6 100644
--- a/slides/kernel-device-model/kernel-device-model.tex
+++ b/slides/kernel-device-model/kernel-device-model.tex
@@ -331,16 +331,19 @@ static int rtl8150_probe(struct usb_interface *intf,
\frametitle{Implementation of a Platform Driver}
\begin{itemize}
\item The driver implements a \kstruct{platform_driver}
- structure (example taken from \kpath{drivers/serial/imx.c})
+ structure (example taken from \kpath{drivers/tty/serial/imx.c},
+ simplified)
\begin{block}{}
\begin{minted}[fontsize=\scriptsize]{c}
static struct platform_driver serial_imx_driver = {
- .probe = serial_imx_probe,
- .remove = serial_imx_remove,
- .driver = {
- .name = "imx-uart",
- .owner = THIS_MODULE,
- },
+ .probe = serial_imx_probe,
+ .remove = serial_imx_remove,
+ .id_table = imx_uart_devtype,
+ .driver = {
+ .name = "imx-uart",
+ .of_match_table = imx_uart_dt_ids,
+ .pm = &imx_serial_port_pm_ops,
+ },
};
\end{minted}
\end{block}
@@ -372,8 +375,8 @@ static void __exit imx_serial_cleanup(void) {
most ARM platforms) from which \kstruct{platform_device}
structures are created
\end{itemize}
- \item Example on ARM, where the instantiation is done in
- \kpath{arch/arm/mach-imx/mx1ads.c}
+ \item Example on ARM, where the instantiation was done in
+ \kpathversion{arch/arm/mach-imx/mx1ads.c}{2.6.30}
\begin{block}{}
\begin{minted}[fontsize=\scriptsize]{c}
static struct platform_device imx_uart1_device = {
@@ -393,7 +396,7 @@ static struct platform_device imx_uart1_device = {
\begin{frame}[fragile]
\frametitle{Platform device instantiation: old style (2/2)}
\begin{itemize}
- \item The device is part of a list
+ \item The device was part of a list
\begin{block}{}
\begin{minted}[fontsize=\scriptsize]{c}
static struct platform_device *devices[] __initdata = {
@@ -403,7 +406,7 @@ static struct platform_device *devices[] __initdata = {
};
\end{minted}
\end{block}
- \item And the list of devices is added to the system during
+ \item And the list of devices was added to the system during
board initialization
\begin{block}{}
\begin{minted}[fontsize=\scriptsize]{c}
@@ -437,7 +440,7 @@ MACHINE_END
\end{frame}
\begin{frame}[fragile]
- \frametitle{Declaring resources}
+ \frametitle{Declaring resources (old style)}
\begin{block}{}
\begin{minted}[fontsize=\footnotesize]{c}
static struct resource imx_uart1_resources[] = {
@@ -457,11 +460,11 @@ static struct resource imx_uart1_resources[] = {
\end{frame}
\begin{frame}[fragile]
- \frametitle{Using Resources}
+ \frametitle{Using Resources (old style)}
\begin{itemize}
- \item When a \kstruct{platform_device} is added to the system using
+ \item When a \kstruct{platform_device} was added to the system using
\kfunc{platform_add_device}, the \code{probe()} method of the
- platform driver gets called
+ platform driver was called
\item This method is responsible for initializing the hardware,
registering the device to the proper framework (in our case, the
serial driver framework)
@@ -477,14 +480,14 @@ sport->rxirq = platform_get_irq(pdev, 0);
\end{frame}
\begin{frame}
- \frametitle{platform\_data Mechanism}
+ \frametitle{platform\_data Mechanism (old style)}
\begin{itemize}
\item In addition to the well-defined resources, many drivers
require driver-specific information for each platform device
- \item Such information can be passed using the \code{platform_data}
+ \item Such information could be passed using the \code{platform_data}
field of \kstruct{device} (from which
\kstruct{platform_device} inherits)
- \item As it is a \code{void *} pointer, it can be used to pass any
+ \item As it is a \code{void *} pointer, it could be used to pass any
type of information.
\begin{itemize}
\item Typically, each driver defines a structure to pass
@@ -511,7 +514,7 @@ struct imxuart_platform_data {
};
\end{minted}
\end{block}
- \item The MX1ADS board code instantiates such a structure
+ \item The MX1ADS board code instantiated such a structure
\begin{block}{}
\begin{minted}[fontsize=\footnotesize]{c}
static struct imxuart_platform_data uart1_pdata = {
@@ -525,9 +528,9 @@ static struct imxuart_platform_data uart1_pdata = {
\begin{frame}[fragile]
\frametitle{platform\_data Example 2/2}
\begin{itemize}
- \item The \code{uart_pdata} structure is associated to the
- \kstruct{platform_device} structure in the MX1ADS board file (the real code is
- slightly more complicated)
+ \item The \code{uart_pdata} structure was associated to the
+ \kstruct{platform_device} structure in the MX1ADS board file (the
+ real code was slightly more complicated)
\begin{block}{}
\begin{minted}[fontsize=\scriptsize]{c}
struct platform_device mx1ads_uart1 = {
diff --git a/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex b/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex
index 008baf3..ff7addc 100644
--- a/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex
+++ b/slides/kernel-driver-development-general-apis/kernel-driver-development-general-apis.tex
@@ -3,7 +3,7 @@
\begin{frame}
\frametitle{Memory/string utilities}
\begin{itemize}
- \item In \kpath{linux/string.h}
+ \item In \kpath{include/linux/string.h}
\begin{itemize}
\item Memory-related: \kfunc{memset}, \kfunc{memcpy},
\kfunc{memmove}, \kfunc{memscan}, \kfunc{memcmp}, \kfunc{memchr}
@@ -12,7 +12,7 @@
\item Allocate and copy a string: \kfunc{kstrdup}, \kfunc{kstrndup}
\item Allocate and copy a memory area: \kfunc{kmemdup}
\end{itemize}
- \item In \kpath{linux/kernel.h}
+ \item In \kpath{include/linux/kernel.h}
\begin{itemize}
\item String to int conversion: \kfunc{simple_strtoul},
\kfunc{simple_strtol}, \kfunc{simple_strtoull},
@@ -25,7 +25,7 @@
\begin{frame}
\frametitle{Linked lists}
\begin{itemize}
- \item Convenient linked-list facility in \kpath{linux/list.h}
+ \item Convenient linked-list facility in \kpath{include/linux/list.h}
\begin{itemize}
\item Used in thousands of places in the kernel
\end{itemize}
diff --git a/slides/kernel-porting-content/kernel-porting-content.tex b/slides/kernel-porting-content/kernel-porting-content.tex
index f0541d0..44cfbd4 100644
--- a/slides/kernel-porting-content/kernel-porting-content.tex
+++ b/slides/kernel-porting-content/kernel-porting-content.tex
@@ -371,7 +371,7 @@ dtb-$(CONFIG_ARCH_MXS) += imx28-cfa10036.dtb \
370/XP.
\item For this platform, the core of the SoC support is located in
\kpath{arch/arm/mach-mvebu}
- \item The \code{armada-370-xp.c} (see code on the next slide)
+ \item The \code{board-v7.c} file (see code on the next slide)
contains the "{\em entry point}" of the SoC definition, the
\code{DT_MACHINE_START} .. \code{MACHINE_END} definition:
\begin{itemize}
@@ -389,25 +389,30 @@ dtb-$(CONFIG_ARCH_MXS) += imx28-cfa10036.dtb \
\end{frame}
\begin{frame}[fragile]
- \frametitle{{\tt arch/arm/mach-mvebu/armada-370-xp.c}}
+ \frametitle{{\tt arch/arm/mach-mvebu/board-v7.c}}
\begin{block}{}
\begin{minted}[fontsize=\tiny]{c}
-static void __init armada_370_xp_dt_init(void)
+static void __init mvebu_dt_init(void)
{
+ if (of_machine_is_compatible("marvell,armadaxp"))
+ i2c_quirk();
+
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
-static const char * const armada_370_xp_dt_compat[] = {
+static const char * const armada_370_xp_dt_compat[] __initconst = {
"marvell,armada-370-xp",
NULL,
};
-DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)")
+DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
+ .l2c_aux_val = 0,
+ .l2c_aux_mask = ~0,
.smp = smp_ops(armada_xp_smp_ops),
- .init_machine = armada_370_xp_dt_init,
- .map_io = armada_370_xp_map_io,
- .init_time = armada_370_xp_timer_and_clk_init,
+ .init_machine = mvebu_dt_init,
+ .init_irq = mvebu_init_irq,
.restart = mvebu_restart,
+ .reserve = mvebu_memblock_reserve,
.dt_compat = armada_370_xp_dt_compat,
MACHINE_END
\end{minted}
@@ -420,7 +425,7 @@ MACHINE_END
\footnotesize
\begin{itemize}
\item An SoC {\em entry point} file,
- \kpath{arch/arm/mach-mvebu/armada-370-xp.c}
+ \kpath{arch/arm/mach-mvebu/board-v7.c}
\item At least one SoC \code{.dtsi} DT and one board \code{.dts} DT,
in \kpath{arch/arm/boot/dts}
\item A interrupt controller driver,
@@ -463,7 +468,7 @@ MACHINE_END
Once the core pieces of the SoC support have been implemented, the
remaining part is to add drivers for the different hardware blocks:
\begin{itemize}
- \item Ethernet driver, in \kpath{drivers/net/ethernet/mvneta.c}
+ \item Ethernet driver, in \kpath{drivers/net/ethernet/marvell/mvneta.c}
\item SATA driver, in \kpath{drivers/ata/sata_mv.c}
\item I2C driver, in \kpath{drivers/i2c/busses/i2c-mv64xxx.c}
\item SPI driver, in \kpath{drivers/spi/spi-orion.c}
diff --git a/slides/kernel-power-management-content/kernel-power-management-content.tex b/slides/kernel-power-management-content/kernel-power-management-content.tex
index bc2b763..6c584e0 100644
--- a/slides/kernel-power-management-content/kernel-power-management-content.tex
+++ b/slides/kernel-power-management-content/kernel-power-management-content.tex
@@ -250,8 +250,8 @@
\begin{frame}
\frametitle{Frequency and Voltage Scaling (2)}
\begin{itemize}
- \item CPU support code in architecture dependent files. Example to
- read: \kpath{arch/arm/plat-omap/cpu-omap.c}
+ \item CPU drivers in \kpath{drivers/cpufreq}. Example:
+ \kpath{drivers/cpufreq/omap-cpufreq.c}
\item Must implement the operations of the \code{cpufreq_driver}
structure and register them using \code{cpufreq_register_driver()}
\begin{itemize}
@@ -281,8 +281,7 @@
\item According to these requirements, PM QoS allows kernel drivers
to adjust their power management
\item See \kerneldoc{power/pm_qos_interface.txt}
- \item Still in very early deployment (only used in about 15 drivers in
- 3.12).
+ \item Still needs deploying in most drivers
\end{itemize}
\end{frame}
diff --git a/slides/kernel-source-code-layout/kernel-source-code-layout.tex b/slides/kernel-source-code-layout/kernel-source-code-layout.tex
index 0fbe137..2fff47d 100644
--- a/slides/kernel-source-code-layout/kernel-source-code-layout.tex
+++ b/slides/kernel-source-code-layout/kernel-source-code-layout.tex
@@ -49,7 +49,7 @@
\end{itemize}
\item \kpath{fs/}
\begin{itemize}
- \item Filesystems (\kpath{fs/ext3/}, etc.)
+ \item Filesystems (\kpath{fs/ext4/}, etc.)
\end{itemize}
\item \kpath{include/}
\begin{itemize}
@@ -65,7 +65,7 @@
\end{itemize}
\item \kpath{init/}
\begin{itemize}
- \item Linux initialization (including \kpath{main.c})
+ \item Linux initialization (including \kpath{init/main.c})
\end{itemize}
\item \kpath{ipc/}
\begin{itemize}
More information about the training-materials-updates
mailing list