Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a814290e authored by Russell King's avatar Russell King
Browse files

Merge branch 'for-rmk/samsung3' of git://git.fluff.org/bjdooks/linux into devel-stable

parents e55d1936 ab5d97db
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ modules.builtin
tags
TAGS
vmlinux
vmlinuz
System.map
Module.markers
Module.symvers
+86 −0
Original line number Diff line number Diff line
		Samsung ARM Linux Overview
		==========================

Introduction
------------

  The Samsung range of ARM SoCs spans many similar devices, from the initial
  ARM9 through to the newest ARM cores. This document shows an overview of
  the current kernel support, how to use it and where to find the code
  that supports this.

  The currently supported SoCs are:

  - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list
  - S3C64XX: S3C6400 and S3C6410
  - S5PC6440

  S5PC100 and S5PC110 support is currently being merged


S3C24XX Systems
---------------

  There is still documentation in Documnetation/arm/Samsung-S3C24XX/ which
  deals with the architecture and drivers specific to these devices.

  See Documentation/arm/Samsung-S3C24XX/Overview.txt for more information
  on the implementation details and specific support.


Configuration
-------------

  A number of configurations are supplied, as there is no current way of
  unifying all the SoCs into one kernel.

  s5p6440_defconfig - S5P6440 specific default configuration
  s5pc100_defconfig - S5PC100 specific default configuration


Layout
------

  The directory layout is currently being restructured, and consists of
  several platform directories and then the machine specific directories
  of the CPUs being built for.

  plat-samsung provides the base for all the implementations, and is the
  last in the line of include directories that are processed for the build
  specific information. It contains the base clock, GPIO and device definitions
  to get the system running.

  plat-s3c is the s3c24xx/s3c64xx platform directory, although it is currently
  involved in other builds this will be phased out once the relevant code is
  moved elsewhere.

  plat-s3c24xx is for s3c24xx specific builds, see the S3C24XX docs.

  plat-s3c64xx is for the s3c64xx specific bits, see the S3C24XX docs.

  plat-s5p is for s5p specific builds, more to be added.


  [ to finish ]


Port Contributors
-----------------

  Ben Dooks (BJD)
  Vincent Sanders
  Herbert Potzl
  Arnaud Patard (RTP)
  Roc Wu
  Klaus Fetscher
  Dimitry Andric
  Shannon Holland
  Guillaume Gourat (NexVision)
  Christer Weinigel (wingel) (Acer N30)
  Lucas Correia Villa Real (S3C2400 port)


Document Author
---------------

Copyright 2009-2010 Ben Dooks <ben-linux@fluff.org>
+167 −0
Original line number Diff line number Diff line
#!/usr/bin/awk -f
#
# Copyright 2010 Ben Dooks <ben-linux@fluff.org>
#
# Released under GPLv2

# example usage
# ./clksrc-change-registers.awk arch/arm/plat-s5pc1xx/include/plat/regs-clock.h < src > dst

function extract_value(s)
{
    eqat = index(s, "=")
    comat = index(s, ",")
    return substr(s, eqat+2, (comat-eqat)-2)
}

function remove_brackets(b)
{
    return substr(b, 2, length(b)-2)
}

function splitdefine(l, p)
{
    r = split(l, tp)

    p[0] = tp[2]
    p[1] = remove_brackets(tp[3])
}

function find_length(f)
{
    if (0)
	printf "find_length " f "\n" > "/dev/stderr"

    if (f ~ /0x1/)
	return 1
    else if (f ~ /0x3/)
	return 2
    else if (f ~ /0x7/)
	return 3
    else if (f ~ /0xf/)
	return 4

    printf "unknown legnth " f "\n" > "/dev/stderr"
    exit
}

function find_shift(s)
{
    id = index(s, "<")
    if (id <= 0) {
	printf "cannot find shift " s "\n" > "/dev/stderr"
	exit
    }

    return substr(s, id+2)
}


BEGIN {
    if (ARGC < 2) {
	print "too few arguments" > "/dev/stderr"
	exit
    }

# read the header file and find the mask values that we will need
# to replace and create an associative array of values

    while (getline line < ARGV[1] > 0) {
	if (line ~ /\#define.*_MASK/ &&
	    !(line ~ /S5PC100_EPLL_MASK/) &&
	    !(line ~ /USB_SIG_MASK/)) {
	    splitdefine(line, fields)
	    name = fields[0]
	    if (0)
		printf "MASK " line "\n" > "/dev/stderr"
	    dmask[name,0] = find_length(fields[1])
	    dmask[name,1] = find_shift(fields[1])
	    if (0)
		printf "=> '" name "' LENGTH=" dmask[name,0] " SHIFT=" dmask[name,1] "\n" > "/dev/stderr"
	} else {
	}
    }

    delete ARGV[1]
}

/clksrc_clk.*=.*{/ {
    shift=""
    mask=""
    divshift=""
    reg_div=""
    reg_src=""
    indent=1

    print $0

    for(; indent >= 1;) {
	if ((getline line) <= 0) {
	    printf "unexpected end of file" > "/dev/stderr"
	    exit 1;
	}

	if (line ~ /\.shift/) {
	    shift = extract_value(line)
	} else if (line ~ /\.mask/) {
	    mask = extract_value(line)
	} else if (line ~ /\.reg_divider/) {
	    reg_div = extract_value(line)
	} else if (line ~ /\.reg_source/) {
	    reg_src = extract_value(line)
	} else if (line ~ /\.divider_shift/) {
	    divshift = extract_value(line)
	} else if (line ~ /{/) {
		indent++
		print line
	    } else if (line ~ /}/) {
	    indent--

	    if (indent == 0) {
		if (0) {
		    printf "shift '" shift   "' ='" dmask[shift,0] "'\n" > "/dev/stderr"
		    printf "mask  '" mask    "'\n" > "/dev/stderr"
		    printf "dshft '" divshift "'\n" > "/dev/stderr"
		    printf "rdiv  '" reg_div "'\n" > "/dev/stderr"
		    printf "rsrc  '" reg_src "'\n" > "/dev/stderr"
		}

		generated = mask
		sub(reg_src, reg_div, generated)

		if (0) {
		    printf "/* rsrc " reg_src " */\n"
		    printf "/* rdiv " reg_div " */\n"
		    printf "/* shift " shift " */\n"
		    printf "/* mask " mask " */\n"
		    printf "/* generated " generated " */\n"
		}

		if (reg_div != "") {
		    printf "\t.reg_div = { "
		    printf ".reg = " reg_div ", "
		    printf ".shift = " dmask[generated,1] ", "
		    printf ".size = " dmask[generated,0] ", "
		    printf "},\n"
		}

		printf "\t.reg_src = { "
		printf ".reg = " reg_src ", "
		printf ".shift = " dmask[mask,1] ", "
		printf ".size = " dmask[mask,0] ", "

		printf "},\n"

	    }

	    print line
	} else {
	    print line
	}

	if (0)
	    printf indent ":" line "\n" > "/dev/stderr"
    }
}

// && ! /clksrc_clk.*=.*{/ { print $0 }
+0 −2
Original line number Diff line number Diff line
@@ -177,7 +177,6 @@ read the file /proc/PID/status:
  CapBnd: ffffffffffffffff
  voluntary_ctxt_switches:        0
  nonvoluntary_ctxt_switches:     1
  Stack usage:    12 kB

This shows you nearly the same information you would get if you viewed it with
the ps  command.  In  fact,  ps  uses  the  proc  file  system  to  obtain its
@@ -231,7 +230,6 @@ Table 1-2: Contents of the statm files (as of 2.6.30-rc7)
 Mems_allowed_list           Same as previous, but in "list format"
 voluntary_ctxt_switches     number of voluntary context switches
 nonvoluntary_ctxt_switches  number of non voluntary context switches
 Stack usage:                stack usage high water mark (round up to page size)
..............................................................................

Table 1-3: Contents of the statm files (as of 2.6.8-rc3)
+102 −0
Original line number Diff line number Diff line
Kernel driver amc6821
=====================

Supported chips:
	Texas Instruments AMC6821
	Prefix: 'amc6821'
	Addresses scanned: 0x18, 0x19, 0x1a, 0x2c, 0x2d, 0x2e, 0x4c, 0x4d, 0x4e
	Datasheet: http://focus.ti.com/docs/prod/folders/print/amc6821.html

Authors:
	Tomaz Mertelj <tomaz.mertelj@guest.arnes.si>


Description
-----------

This driver implements support for the Texas Instruments amc6821 chip.
The chip has one on-chip and one remote temperature sensor and one pwm fan
regulator.
The pwm can be controlled either from software or automatically.

The driver provides the following sensor accesses in sysfs:

temp1_input		ro	on-chip temperature
temp1_min		rw	"
temp1_max		rw	"
temp1_crit	 	rw	"
temp1_min_alarm		ro	"
temp1_max_alarm		ro	"
temp1_crit_alarm	ro	"

temp2_input		ro	remote temperature
temp2_min		rw	"
temp2_max		rw	"
temp2_crit	 	rw	"
temp2_min_alarm		ro	"
temp2_max_alarm		ro	"
temp2_crit_alarm	ro	"
temp2_fault		ro	"

fan1_input	 	ro	tachometer speed
fan1_min		rw	"
fan1_max		rw	"
fan1_fault	 	ro	"
fan1_div		rw	Fan divisor can be either 2 or 4.

pwm1			rw	pwm1
pwm1_enable		rw	regulator mode, 1=open loop, 2=fan controlled
				by remote temperature, 3=fan controlled by
				combination of the on-chip temperature and
				remote-sensor temperature,
pwm1_auto_channels_temp ro	1 if pwm_enable==2, 3 if pwm_enable==3
pwm1_auto_point1_pwm	ro	Hardwired to 0, shared for both
				temperature channels.
pwm1_auto_point2_pwm	rw	This value is shared for both temperature
				channels.
pwm1_auto_point3_pwm	rw	Hardwired to 255, shared for both
				temperature channels.

temp1_auto_point1_temp	ro	Hardwired to temp2_auto_point1_temp
				which is rw. Below this temperature fan stops.
temp1_auto_point2_temp	rw	The low-temperature limit of the proportional
				range. Below this temperature
				pwm1 = pwm1_auto_point2_pwm. It can go from
				0 degree C to 124 degree C in steps of
				4 degree C. Read it out after writing to get
				the actual value.
temp1_auto_point3_temp	rw	Above this temperature fan runs at maximum
				speed. It can go from temp1_auto_point2_temp.
				It can only have certain discrete values
				which depend on temp1_auto_point2_temp and
				pwm1_auto_point2_pwm. Read it out after
				writing to get the actual value.

temp2_auto_point1_temp	rw	Must be between 0 degree C and 63 degree C and
				it defines the passive cooling temperature.
				Below this temperature the fan stops in
				the closed loop mode.
temp2_auto_point2_temp	rw	The low-temperature limit of the proportional
				range. Below this temperature
				pwm1 = pwm1_auto_point2_pwm. It can go from
				0 degree C to 124 degree C in steps
				of 4 degree C.

temp2_auto_point3_temp	rw	Above this temperature fan runs at maximum
				speed. It can only have certain discrete
				values which depend on temp2_auto_point2_temp
				and pwm1_auto_point2_pwm. Read it out after
				writing to get actual value.


Module parameters
-----------------

If your board has a BIOS that initializes the amc6821 correctly, you should
load the module with: init=0.

If your board BIOS doesn't initialize the chip, or you want
different settings, you can set the following parameters:
init=1,
pwminv: 0 default pwm output, 1 inverts pwm output.
Loading