Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) S3C24XX ARM Linux Overview
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)   The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)   by the 's3c2410' architecture of ARM Linux. Currently the S3C2410,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)   S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)   are supported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)   Support for the S3C2400 and S3C24A0 series was never completed and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)   corresponding code has been removed after a while.  If someone wishes to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)   revive this effort, partial support can be retrieved from earlier Linux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)   versions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)   The S3C2416 and S3C2450 devices are very similar and S3C2450 support is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)   included under the arch/arm/mach-s3c2416 directory. Note, while core
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)   support for these SoCs is in, work on some of the extra peripherals
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)   and extra interrupts is still ongoing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) Configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)   A generic S3C2410 configuration is provided, and can be used as the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)   default by `make s3c2410_defconfig`. This configuration has support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)   for all the machines, and the commonly used features on them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)   Certain machines may have their own default configurations as well,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)   please check the machine specific documentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) Layout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)   The core support files are located in the platform code contained in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)   arch/arm/plat-s3c24xx with headers in include/asm-arm/plat-s3c24xx.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)   This directory should be kept to items shared between the platform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)   code (arch/arm/plat-s3c24xx) and the arch/arm/mach-s3c24* code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)   Each cpu has a directory with the support files for it, and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)   machines that carry the device. For example S3C2410 is contained
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)   in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c2440
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)   Register, kernel and platform data definitions are held in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)   arch/arm/mach-s3c2410 directory./include/mach
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) arch/arm/plat-s3c24xx:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)   Files in here are either common to all the s3c24xx family,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)   or are common to only some of them with names to indicate this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)   status. The files that are not common to all are generally named
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)   with the initial cpu they support in the series to ensure a short
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)   name without any possibility of confusion with newer devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)   As an example, initially s3c244x would cover s3c2440 and s3c2442, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)   with the s3c2443 which does not share many of the same drivers in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)   this directory, the name becomes invalid. We stick to s3c2440-<x>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)   to indicate a driver that is s3c2440 and s3c2442 compatible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65)   This does mean that to find the status of any given SoC, a number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)   of directories may need to be searched.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) Machines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)   The currently supported machines are as follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)   Simtec Electronics EB2410ITX (BAST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)     A general purpose development board, see EB2410ITX.txt for further
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)     details
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)   Simtec Electronics IM2440D20 (Osiris)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)     CPU Module from Simtec Electronics, with a S3C2440A CPU, nand flash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)     and a PCMCIA controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)   Samsung SMDK2410
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)     Samsung's own development board, geared for PDA work.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)   Samsung/Aiji SMDK2412
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)     The S3C2412 version of the SMDK2440.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)   Samsung/Aiji SMDK2413
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)     The S3C2412 version of the SMDK2440.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)   Samsung/Meritech SMDK2440
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)     The S3C2440 compatible version of the SMDK2440, which has the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)     option of an S3C2440 or S3C2442 CPU module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)   Thorcom VR1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)     Custom embedded board
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)   HP IPAQ 1940
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)     Handheld (IPAQ), available in several varieties
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)   HP iPAQ rx3715
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)     S3C2440 based IPAQ, with a number of variations depending on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)     features shipped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)   Acer N30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)     A S3C2410 based PDA from Acer.  There is a Wiki page at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)     http://handhelds.org/moin/moin.cgi/AcerN30Documentation .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)   AML M5900
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)     American Microsystems' M5900
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)   Nex Vision Nexcoder
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)   Nex Vision Otom
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)     Two machines by Nex Vision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) Adding New Machines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)   The architecture has been designed to support as many machines as can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)   be configured for it in one kernel build, and any future additions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)   should keep this in mind before altering items outside of their own
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)   machine files.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)   Machine definitions should be kept in linux/arch/arm/mach-s3c2410,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)   and there are a number of examples that can be looked at.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)   Read the kernel patch submission policies as well as the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)   Documentation/arm directory before submitting patches. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)   ARM kernel series is managed by Russell King, and has a patch system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)   located at http://www.arm.linux.org.uk/developer/patches/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)   as well as mailing lists that can be found from the same site.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)   As a courtesy, please notify <ben-linux@fluff.org> of any new
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)   machines or other modifications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)   Any large scale modifications, or new drivers should be discussed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)   on the ARM kernel mailing list (linux-arm-kernel) before being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)   attempted. See http://www.arm.linux.org.uk/mailinglists/ for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)   mailing list information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) I2C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)   The hardware I2C core in the CPU is supported in single master
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)   mode, and can be configured via platform data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) RTC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)   Support for the onboard RTC unit, including alarm function.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)   This has recently been upgraded to use the new RTC core,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)   and the module has been renamed to rtc-s3c to fit in with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)   the new rtc naming scheme.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Watchdog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)   The onchip watchdog is available via the standard watchdog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)   interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) NAND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)   The current kernels now have support for the s3c2410 NAND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)   controller. If there are any problems the latest linux-mtd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)   code can be found from http://www.linux-mtd.infradead.org/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)   For more information see Documentation/arm/samsung-s3c24xx/nand.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) SD/MMC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)   The SD/MMC hardware pre S3C2443 is supported in the current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)   kernel, the driver is drivers/mmc/host/s3cmci.c and supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)   1 and 4 bit SD or MMC cards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)   The SDIO behaviour of this driver has not been fully tested. There is no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)   current support for hardware SDIO interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) Serial
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)   The s3c2410 serial driver provides support for the internal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)   serial ports. These devices appear as /dev/ttySAC0 through 3.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)   To create device nodes for these, use the following commands
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)     mknod ttySAC0 c 204 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)     mknod ttySAC1 c 204 65
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)     mknod ttySAC2 c 204 66
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) GPIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)   The core contains support for manipulating the GPIO, see the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)   documentation in GPIO.txt in the same directory as this file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)   Newer kernels carry GPIOLIB, and support is being moved towards
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)   this with some of the older support in line to be removed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)   As of v2.6.34, the move towards using gpiolib support is almost
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)   complete, and very little of the old calls are left.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)   See Documentation/arm/samsung-s3c24xx/gpio.rst for the S3C24XX specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)   support and Documentation/arm/samsung/gpio.rst for the core Samsung
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)   implementation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) Clock Management
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) ----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)   The core provides the interface defined in the header file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)   include/asm-arm/hardware/clock.h, to allow control over the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)   various clock units
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) Suspend to RAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)   For boards that provide support for suspend to RAM, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)   system can be placed into low power suspend.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)   See Suspend.txt for more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) SPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)   SPI drivers are available for both the in-built hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)   (although there is no DMA support yet) and a generic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)   GPIO based solution.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) LEDs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)   There is support for GPIO based LEDs via a platform driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)   in the LED subsystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) Platform Data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)   Whenever a device has platform specific data that is specified
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)   on a per-machine basis, care should be taken to ensure the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)   following:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)     1) that default data is not left in the device to confuse the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)        driver if a machine does not set it at startup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)     2) the data should (if possible) be marked as __initdata,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)        to ensure that the data is thrown away if the machine is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)        not the one currently in use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)        The best way of doing this is to make a function that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)        kmalloc()s an area of memory, and copies the __initdata
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)        and then sets the relevant device's platform data. Making
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)        the function `__init` takes care of ensuring it is discarded
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)        with the rest of the initialisation code::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)          static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)          {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)              struct s3c2410_xxx_mach_info *npd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	   npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	   if (npd) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	      memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	      s3c_device_xxx.dev.platform_data = npd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 	   } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)                 printk(KERN_ERR "no memory for xxx platform data\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	   }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	Note, since the code is marked as __init, it should not be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	exported outside arch/arm/mach-s3c2410/, or exported to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	modules via EXPORT_SYMBOL() and related functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) Port Contributors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303)   Ben Dooks (BJD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)   Vincent Sanders
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)   Herbert Potzl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)   Arnaud Patard (RTP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)   Roc Wu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)   Klaus Fetscher
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)   Dimitry Andric
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)   Shannon Holland
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)   Guillaume Gourat (NexVision)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)   Christer Weinigel (wingel) (Acer N30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)   Lucas Correia Villa Real (S3C2400 port)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) Document Author
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) Ben Dooks, Copyright 2004-2006 Simtec Electronics