mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 05:50:19 +00:00
Merge branch 'for-rmk' of git://github.com/at91linux/linux-2.6-at91 into devel-stable
This commit is contained in:
commit
ae1d3b974e
1
.gitignore
vendored
1
.gitignore
vendored
@ -57,6 +57,7 @@ modules.builtin
|
||||
include/config
|
||||
include/linux/version.h
|
||||
include/generated
|
||||
arch/*/include/generated
|
||||
|
||||
# stgit generated dirs
|
||||
patches-*
|
||||
|
@ -73,7 +73,7 @@ installmandocs: mandocs
|
||||
###
|
||||
#External programs used
|
||||
KERNELDOC = $(srctree)/scripts/kernel-doc
|
||||
DOCPROC = $(objtree)/scripts/basic/docproc
|
||||
DOCPROC = $(objtree)/scripts/docproc
|
||||
|
||||
XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl
|
||||
XMLTOFLAGS += --skip-validation
|
||||
|
@ -115,28 +115,8 @@ ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs
|
||||
Module Parameters for Debugging
|
||||
===============================
|
||||
|
||||
When UBIFS has been compiled with debugging enabled, there are 3 module
|
||||
When UBIFS has been compiled with debugging enabled, there are 2 module
|
||||
parameters that are available to control aspects of testing and debugging.
|
||||
The parameters are unsigned integers where each bit controls an option.
|
||||
The parameters are:
|
||||
|
||||
debug_msgs Selects which debug messages to display, as follows:
|
||||
|
||||
Message Type Flag value
|
||||
|
||||
General messages 1
|
||||
Journal messages 2
|
||||
Mount messages 4
|
||||
Commit messages 8
|
||||
LEB search messages 16
|
||||
Budgeting messages 32
|
||||
Garbage collection messages 64
|
||||
Tree Node Cache (TNC) messages 128
|
||||
LEB properties (lprops) messages 256
|
||||
Input/output messages 512
|
||||
Log messages 1024
|
||||
Scan messages 2048
|
||||
Recovery messages 4096
|
||||
|
||||
debug_chks Selects extra checks that UBIFS can do while running:
|
||||
|
||||
@ -154,11 +134,9 @@ debug_tsts Selects a mode of testing, as follows:
|
||||
|
||||
Test mode Flag value
|
||||
|
||||
Force in-the-gaps method 2
|
||||
Failure mode for recovery testing 4
|
||||
|
||||
For example, set debug_msgs to 5 to display General messages and Mount
|
||||
messages.
|
||||
For example, set debug_chks to 3 to enable general and TNC checks.
|
||||
|
||||
|
||||
References
|
||||
|
@ -19,6 +19,7 @@ Supported adapters:
|
||||
* Intel 6 Series (PCH)
|
||||
* Intel Patsburg (PCH)
|
||||
* Intel DH89xxCC (PCH)
|
||||
* Intel Panther Point (PCH)
|
||||
Datasheets: Publicly available at the Intel website
|
||||
|
||||
On Intel Patsburg and later chipsets, both the normal host SMBus controller
|
||||
|
@ -38,7 +38,7 @@ static struct i2c_driver foo_driver = {
|
||||
.name = "foo",
|
||||
},
|
||||
|
||||
.id_table = foo_ids,
|
||||
.id_table = foo_idtable,
|
||||
.probe = foo_probe,
|
||||
.remove = foo_remove,
|
||||
/* if device autodetection is needed: */
|
||||
|
@ -34,7 +34,8 @@ Contents
|
||||
Currently the Linux Elantech touchpad driver is aware of two different
|
||||
hardware versions unimaginatively called version 1 and version 2. Version 1
|
||||
is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to
|
||||
be introduced with the EeePC and uses 6 bytes per packet.
|
||||
be introduced with the EeePC and uses 6 bytes per packet, and provides
|
||||
additional features such as position of two fingers, and width of the touch.
|
||||
|
||||
The driver tries to support both hardware versions and should be compatible
|
||||
with the Xorg Synaptics touchpad driver and its graphical configuration
|
||||
@ -94,18 +95,44 @@ Currently the Linux Elantech touchpad driver provides two extra knobs under
|
||||
can check these bits and reject any packet that appears corrupted. Using
|
||||
this knob you can bypass that check.
|
||||
|
||||
It is not known yet whether hardware version 2 provides the same parity
|
||||
bits. Hence checking is disabled by default. Currently even turning it on
|
||||
will do nothing.
|
||||
|
||||
Hardware version 2 does not provide the same parity bits. Only some basic
|
||||
data consistency checking can be done. For now checking is disabled by
|
||||
default. Currently even turning it on will do nothing.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
3. Differentiating hardware versions
|
||||
=================================
|
||||
|
||||
3. Hardware version 1
|
||||
To detect the hardware version, read the version number as param[0].param[1].param[2]
|
||||
|
||||
4 bytes version: (after the arrow is the name given in the Dell-provided driver)
|
||||
02.00.22 => EF013
|
||||
02.06.00 => EF019
|
||||
In the wild, there appear to be more versions, such as 00.01.64, 01.00.21,
|
||||
02.00.00, 02.00.04, 02.00.06.
|
||||
|
||||
6 bytes:
|
||||
02.00.30 => EF113
|
||||
02.08.00 => EF023
|
||||
02.08.XX => EF123
|
||||
02.0B.00 => EF215
|
||||
04.01.XX => Scroll_EF051
|
||||
04.02.XX => EF051
|
||||
In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There
|
||||
appears to be almost no difference, except for EF113, which does not report
|
||||
pressure/width and has different data consistency checks.
|
||||
|
||||
Probably all the versions with param[0] <= 01 can be considered as
|
||||
4 bytes/firmware 1. The versions < 02.08.00, with the exception of 02.00.30, as
|
||||
4 bytes/firmware 2. Everything >= 02.08.00 can be considered as 6 bytes.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
4. Hardware version 1
|
||||
==================
|
||||
|
||||
3.1 Registers
|
||||
4.1 Registers
|
||||
~~~~~~~~~
|
||||
|
||||
By echoing a hexadecimal value to a register it contents can be altered.
|
||||
@ -168,7 +195,7 @@ For example:
|
||||
smart edge activation area width?
|
||||
|
||||
|
||||
3.2 Native relative mode 4 byte packet format
|
||||
4.2 Native relative mode 4 byte packet format
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
byte 0:
|
||||
@ -226,9 +253,13 @@ byte 3:
|
||||
positive = down
|
||||
|
||||
|
||||
3.3 Native absolute mode 4 byte packet format
|
||||
4.3 Native absolute mode 4 byte packet format
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
EF013 and EF019 have a special behaviour (due to a bug in the firmware?), and
|
||||
when 1 finger is touching, the first 2 position reports must be discarded.
|
||||
This counting is reset whenever a different number of fingers is reported.
|
||||
|
||||
byte 0:
|
||||
firmware version 1.x:
|
||||
|
||||
@ -279,11 +310,11 @@ byte 3:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
4. Hardware version 2
|
||||
5. Hardware version 2
|
||||
==================
|
||||
|
||||
|
||||
4.1 Registers
|
||||
5.1 Registers
|
||||
~~~~~~~~~
|
||||
|
||||
By echoing a hexadecimal value to a register it contents can be altered.
|
||||
@ -316,16 +347,41 @@ For example:
|
||||
0x7f = never i.e. tap again to release)
|
||||
|
||||
|
||||
4.2 Native absolute mode 6 byte packet format
|
||||
5.2 Native absolute mode 6 byte packet format
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
5.2.1 Parity checking and packet re-synchronization
|
||||
There is no parity checking, however some consistency checks can be performed.
|
||||
|
||||
4.2.1 One finger touch
|
||||
For instance for EF113:
|
||||
SA1= packet[0];
|
||||
A1 = packet[1];
|
||||
B1 = packet[2];
|
||||
SB1= packet[3];
|
||||
C1 = packet[4];
|
||||
D1 = packet[5];
|
||||
if( (((SA1 & 0x3C) != 0x3C) && ((SA1 & 0xC0) != 0x80)) || // check Byte 1
|
||||
(((SA1 & 0x0C) != 0x0C) && ((SA1 & 0xC0) == 0x80)) || // check Byte 1 (one finger pressed)
|
||||
(((SA1 & 0xC0) != 0x80) && (( A1 & 0xF0) != 0x00)) || // check Byte 2
|
||||
(((SB1 & 0x3E) != 0x38) && ((SA1 & 0xC0) != 0x80)) || // check Byte 4
|
||||
(((SB1 & 0x0E) != 0x08) && ((SA1 & 0xC0) == 0x80)) || // check Byte 4 (one finger pressed)
|
||||
(((SA1 & 0xC0) != 0x80) && (( C1 & 0xF0) != 0x00)) ) // check Byte 5
|
||||
// error detected
|
||||
|
||||
For all the other ones, there are just a few constant bits:
|
||||
if( ((packet[0] & 0x0C) != 0x04) ||
|
||||
((packet[3] & 0x0f) != 0x02) )
|
||||
// error detected
|
||||
|
||||
|
||||
In case an error is detected, all the packets are shifted by one (and packet[0] is discarded).
|
||||
|
||||
5.2.1 One/Three finger touch
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
byte 0:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
n1 n0 . . . . R L
|
||||
n1 n0 w3 w2 . . R L
|
||||
|
||||
L, R = 1 when Left, Right mouse button pressed
|
||||
n1..n0 = numbers of fingers on touchpad
|
||||
@ -333,24 +389,40 @@ byte 0:
|
||||
byte 1:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
. . . . . x10 x9 x8
|
||||
p7 p6 p5 p4 . x10 x9 x8
|
||||
|
||||
byte 2:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
x7 x6 x5 x4 x4 x2 x1 x0
|
||||
x7 x6 x5 x4 x3 x2 x1 x0
|
||||
|
||||
x10..x0 = absolute x value (horizontal)
|
||||
|
||||
byte 3:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
. . . . . . . .
|
||||
n4 vf w1 w0 . . . b2
|
||||
|
||||
n4 = set if more than 3 fingers (only in 3 fingers mode)
|
||||
vf = a kind of flag ? (only on EF123, 0 when finger is over one
|
||||
of the buttons, 1 otherwise)
|
||||
w3..w0 = width of the finger touch (not EF113)
|
||||
b2 (on EF113 only, 0 otherwise), b2.R.L indicates one button pressed:
|
||||
0 = none
|
||||
1 = Left
|
||||
2 = Right
|
||||
3 = Middle (Left and Right)
|
||||
4 = Forward
|
||||
5 = Back
|
||||
6 = Another one
|
||||
7 = Another one
|
||||
|
||||
byte 4:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
. . . . . . y9 y8
|
||||
p3 p1 p2 p0 . . y9 y8
|
||||
|
||||
p7..p0 = pressure (not EF113)
|
||||
|
||||
byte 5:
|
||||
|
||||
@ -363,6 +435,11 @@ byte 5:
|
||||
4.2.2 Two finger touch
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Note that the two pairs of coordinates are not exactly the coordinates of the
|
||||
two fingers, but only the pair of the lower-left and upper-right coordinates.
|
||||
So the actual fingers might be situated on the other diagonal of the square
|
||||
defined by these two points.
|
||||
|
||||
byte 0:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
@ -376,14 +453,14 @@ byte 1:
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0
|
||||
|
||||
ax8..ax0 = first finger absolute x value
|
||||
ax8..ax0 = lower-left finger absolute x value
|
||||
|
||||
byte 2:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0
|
||||
|
||||
ay8..ay0 = first finger absolute y value
|
||||
ay8..ay0 = lower-left finger absolute y value
|
||||
|
||||
byte 3:
|
||||
|
||||
@ -395,11 +472,11 @@ byte 4:
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0
|
||||
|
||||
bx8..bx0 = second finger absolute x value
|
||||
bx8..bx0 = upper-right finger absolute x value
|
||||
|
||||
byte 5:
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
by7 by8 by5 by4 by3 by2 by1 by0
|
||||
|
||||
by8..by0 = second finger absolute y value
|
||||
by8..by0 = upper-right finger absolute y value
|
||||
|
@ -9,6 +9,9 @@ peripherals with two wires. The outputs are phase-shifted by 90 degrees
|
||||
and by triggering on falling and rising edges, the turn direction can
|
||||
be determined.
|
||||
|
||||
Some encoders have both outputs low in stable states, whereas others also have
|
||||
a stable state with both outputs high (half-period mode).
|
||||
|
||||
The phase diagram of these two outputs look like this:
|
||||
|
||||
_____ _____ _____
|
||||
@ -26,6 +29,8 @@ The phase diagram of these two outputs look like this:
|
||||
|<-------->|
|
||||
one step
|
||||
|
||||
|<-->|
|
||||
one step (half-period mode)
|
||||
|
||||
For more information, please see
|
||||
http://en.wikipedia.org/wiki/Rotary_encoder
|
||||
@ -34,6 +39,13 @@ For more information, please see
|
||||
1. Events / state machine
|
||||
-------------------------
|
||||
|
||||
In half-period mode, state a) and c) above are used to determine the
|
||||
rotational direction based on the last stable state. Events are reported in
|
||||
states b) and d) given that the new stable state is different from the last
|
||||
(i.e. the rotation was not reversed half-way).
|
||||
|
||||
Otherwise, the following apply:
|
||||
|
||||
a) Rising edge on channel A, channel B in low state
|
||||
This state is used to recognize a clockwise turn
|
||||
|
||||
@ -96,6 +108,7 @@ static struct rotary_encoder_platform_data my_rotary_encoder_info = {
|
||||
.gpio_b = GPIO_ROTARY_B,
|
||||
.inverted_a = 0,
|
||||
.inverted_b = 0,
|
||||
.half_period = false,
|
||||
};
|
||||
|
||||
static struct platform_device rotary_encoder_device = {
|
||||
|
@ -201,3 +201,16 @@ KBUILD_ENABLE_EXTRA_GCC_CHECKS
|
||||
--------------------------------------------------
|
||||
If enabled over the make command line with "W=1", it turns on additional
|
||||
gcc -W... options for more extensive build-time checking.
|
||||
|
||||
KBUILD_BUILD_TIMESTAMP
|
||||
--------------------------------------------------
|
||||
Setting this to a date string overrides the timestamp used in the
|
||||
UTS_VERSION definition (uname -v in the running kernel). The value has to
|
||||
be a string that can be passed to date -d. The default value
|
||||
is the output of the date command at one point during build.
|
||||
|
||||
KBUILD_BUILD_USER, KBUILD_BUILD_HOST
|
||||
--------------------------------------------------
|
||||
These two variables allow to override the user@host string displayed during
|
||||
boot and in /proc/version. The default value is the output of the commands
|
||||
whoami and host, respectively.
|
||||
|
@ -40,11 +40,13 @@ This document describes the Linux kernel Makefiles.
|
||||
--- 6.6 Commands useful for building a boot image
|
||||
--- 6.7 Custom kbuild commands
|
||||
--- 6.8 Preprocessing linker scripts
|
||||
--- 6.9 Generic header files
|
||||
|
||||
=== 7 Kbuild syntax for exported headers
|
||||
--- 7.1 header-y
|
||||
--- 7.2 objhdr-y
|
||||
--- 7.3 destination-y
|
||||
--- 7.4 generic-y
|
||||
|
||||
=== 8 Kbuild Variables
|
||||
=== 9 Makefile language
|
||||
@ -499,6 +501,18 @@ more details, with real examples.
|
||||
gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used.
|
||||
Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options
|
||||
|
||||
cc-disable-warning
|
||||
cc-disable-warning checks if gcc supports a given warning and returns
|
||||
the commandline switch to disable it. This special function is needed,
|
||||
because gcc 4.4 and later accept any unknown -Wno-* option and only
|
||||
warn about it if there is another warning in the source file.
|
||||
|
||||
Example:
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||
|
||||
In the above example, -Wno-unused-but-set-variable will be added to
|
||||
KBUILD_CFLAGS only if gcc really accepts it.
|
||||
|
||||
cc-version
|
||||
cc-version returns a numerical version of the $(CC) compiler version.
|
||||
The format is <major><minor> where both are two digits. So for example
|
||||
@ -955,6 +969,11 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
used when linking modules. This is often a linker script.
|
||||
From commandline LDFLAGS_MODULE shall be used (see kbuild.txt).
|
||||
|
||||
KBUILD_ARFLAGS Options for $(AR) when creating archives
|
||||
|
||||
$(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic
|
||||
mode) if this option is supported by $(AR).
|
||||
|
||||
--- 6.2 Add prerequisites to archprepare:
|
||||
|
||||
The archprepare: rule is used to list prerequisites that need to be
|
||||
@ -1209,6 +1228,14 @@ When kbuild executes, the following steps are followed (roughly):
|
||||
The kbuild infrastructure for *lds file are used in several
|
||||
architecture-specific files.
|
||||
|
||||
--- 6.9 Generic header files
|
||||
|
||||
The directory include/asm-generic contains the header files
|
||||
that may be shared between individual architectures.
|
||||
The recommended approach how to use a generic header file is
|
||||
to list the file in the Kbuild file.
|
||||
See "7.4 generic-y" for further info on syntax etc.
|
||||
|
||||
=== 7 Kbuild syntax for exported headers
|
||||
|
||||
The kernel include a set of headers that is exported to userspace.
|
||||
@ -1265,6 +1292,32 @@ See subsequent chapter for the syntax of the Kbuild file.
|
||||
In the example above all exported headers in the Kbuild file
|
||||
will be located in the directory "include/linux" when exported.
|
||||
|
||||
--- 7.4 generic-y
|
||||
|
||||
If an architecture uses a verbatim copy of a header from
|
||||
include/asm-generic then this is listed in the file
|
||||
arch/$(ARCH)/include/asm/Kbuild like this:
|
||||
|
||||
Example:
|
||||
#arch/x86/include/asm/Kbuild
|
||||
generic-y += termios.h
|
||||
generic-y += rtc.h
|
||||
|
||||
During the prepare phase of the build a wrapper include
|
||||
file is generated in the directory:
|
||||
|
||||
arch/$(ARCH)/include/generated/asm
|
||||
|
||||
When a header is exported where the architecture uses
|
||||
the generic header a similar wrapper is generated as part
|
||||
of the set of exported headers in the directory:
|
||||
|
||||
usr/include/asm
|
||||
|
||||
The generated wrapper will in both cases look like the following:
|
||||
|
||||
Example: termios.h
|
||||
#include <asm-generic/termios.h>
|
||||
|
||||
=== 8 Kbuild Variables
|
||||
|
||||
|
@ -2245,10 +2245,10 @@ F: drivers/gpu/drm/
|
||||
F: include/drm/
|
||||
|
||||
INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
|
||||
M: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
M: Keith Packard <keithp@keithp.com>
|
||||
L: intel-gfx@lists.freedesktop.org (subscribers-only)
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6.git
|
||||
S: Supported
|
||||
F: drivers/gpu/drm/i915
|
||||
F: include/drm/i915*
|
||||
@ -5592,10 +5592,11 @@ M: James Morris <jmorris@namei.org>
|
||||
M: Eric Paris <eparis@parisplace.org>
|
||||
L: selinux@tycho.nsa.gov (subscribers-only, general discussion)
|
||||
W: http://selinuxproject.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
|
||||
T: git git://git.infradead.org/users/eparis/selinux.git
|
||||
S: Supported
|
||||
F: include/linux/selinux*
|
||||
F: security/selinux/
|
||||
F: scripts/selinux/
|
||||
|
||||
APPARMOR SECURITY MODULE
|
||||
M: John Johansen <john.johansen@canonical.com>
|
||||
|
50
Makefile
50
Makefile
@ -103,7 +103,7 @@ ifeq ("$(origin O)", "command line")
|
||||
endif
|
||||
|
||||
ifeq ("$(origin W)", "command line")
|
||||
export KBUILD_ENABLE_EXTRA_GCC_CHECKS := 1
|
||||
export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
|
||||
endif
|
||||
|
||||
# That's our default target when none is given on the command line
|
||||
@ -349,7 +349,8 @@ CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
|
||||
|
||||
# Use LINUXINCLUDE when you must reference the include/ directory.
|
||||
# Needed to be compatible with the O= option
|
||||
LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
|
||||
LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include \
|
||||
-Iarch/$(hdr-arch)/include/generated -Iinclude \
|
||||
$(if $(KBUILD_SRC), -I$(srctree)/include) \
|
||||
-include include/generated/autoconf.h
|
||||
|
||||
@ -382,6 +383,7 @@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
|
||||
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
|
||||
export KBUILD_ARFLAGS
|
||||
|
||||
# When compiling out-of-tree modules, put MODVERDIR in the module
|
||||
# tree rather than in the kernel tree. The kernel tree might
|
||||
@ -416,6 +418,12 @@ ifneq ($(KBUILD_SRC),)
|
||||
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
|
||||
endif
|
||||
|
||||
# Support for using generic headers in asm-generic
|
||||
PHONY += asm-generic
|
||||
asm-generic:
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
|
||||
obj=arch/$(SRCARCH)/include/generated/asm
|
||||
|
||||
# To make sure we do not include .config for any of the *config targets
|
||||
# catch them early, and hand them over to scripts/kconfig/Makefile
|
||||
# It is allowed to specify more targets when calling make, including
|
||||
@ -559,6 +567,10 @@ ifndef CONFIG_CC_STACKPROTECTOR
|
||||
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
|
||||
endif
|
||||
|
||||
# This warning generated too much noise in a regular build.
|
||||
# Use make W=1 to enable this warning (see scripts/Makefile.build)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||
|
||||
ifdef CONFIG_FRAME_POINTER
|
||||
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||
else
|
||||
@ -604,7 +616,7 @@ CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
|
||||
|
||||
# disable pointer signed / unsigned warnings in gcc 4.0
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
|
||||
|
||||
# disable invalid "can't wrap" optimizations for signed / pointers
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
|
||||
@ -612,6 +624,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
|
||||
# conserve stack if available
|
||||
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
|
||||
|
||||
# use the deterministic mode of AR if available
|
||||
KBUILD_ARFLAGS := $(call ar-option,D)
|
||||
|
||||
# check for 'asm goto'
|
||||
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
|
||||
KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
|
||||
@ -797,15 +812,17 @@ ifdef CONFIG_KALLSYMS
|
||||
# o The correct .tmp_kallsyms2.o is linked into the final vmlinux.
|
||||
# o Verify that the System.map from vmlinux matches the map from
|
||||
# .tmp_vmlinux2, just in case we did not generate kallsyms correctly.
|
||||
# o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using
|
||||
# o If 'make KALLSYMS_EXTRA_PASS=1" was used, do an extra pass using
|
||||
# .tmp_vmlinux3 and .tmp_kallsyms3.o. This is only meant as a
|
||||
# temporary bypass to allow the kernel to be built while the
|
||||
# maintainers work out what went wrong with kallsyms.
|
||||
|
||||
ifdef CONFIG_KALLSYMS_EXTRA_PASS
|
||||
last_kallsyms := 3
|
||||
else
|
||||
last_kallsyms := 2
|
||||
|
||||
ifdef KALLSYMS_EXTRA_PASS
|
||||
ifneq ($(KALLSYMS_EXTRA_PASS),0)
|
||||
last_kallsyms := 3
|
||||
endif
|
||||
endif
|
||||
|
||||
kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
|
||||
@ -816,7 +833,8 @@ define verify_kallsyms
|
||||
$(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map
|
||||
$(Q)cmp -s System.map .tmp_System.map || \
|
||||
(echo Inconsistent kallsyms data; \
|
||||
echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \
|
||||
echo This is a bug - please report about it; \
|
||||
echo Try "make KALLSYMS_EXTRA_PASS=1" as a workaround; \
|
||||
rm .tmp_kallsyms* ; /bin/false )
|
||||
endef
|
||||
|
||||
@ -947,7 +965,7 @@ ifneq ($(KBUILD_SRC),)
|
||||
endif
|
||||
|
||||
# prepare2 creates a makefile if using a separate output directory
|
||||
prepare2: prepare3 outputmakefile
|
||||
prepare2: prepare3 outputmakefile asm-generic
|
||||
|
||||
prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
|
||||
include/config/auto.conf
|
||||
@ -1021,7 +1039,7 @@ hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
|
||||
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
|
||||
|
||||
PHONY += __headers
|
||||
__headers: include/linux/version.h scripts_basic FORCE
|
||||
__headers: include/linux/version.h scripts_basic asm-generic FORCE
|
||||
$(Q)$(MAKE) $(build)=scripts build_unifdef
|
||||
|
||||
PHONY += headers_install_all
|
||||
@ -1136,7 +1154,8 @@ CLEAN_FILES += vmlinux System.map \
|
||||
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
MRPROPER_DIRS += include/config usr/include include/generated
|
||||
MRPROPER_DIRS += include/config usr/include include/generated \
|
||||
arch/*/include/generated
|
||||
MRPROPER_FILES += .config .config.old .version .old_version \
|
||||
include/linux/version.h \
|
||||
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
|
||||
@ -1267,7 +1286,11 @@ help:
|
||||
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
|
||||
@echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)'
|
||||
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
|
||||
@echo ' make W=1 [targets] Enable extra gcc checks'
|
||||
@echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
|
||||
@echo ' 1: warnings which may be relevant and do not occur too often'
|
||||
@echo ' 2: warnings which occur quite often but may still be relevant'
|
||||
@echo ' 3: more obscure warnings, can most likely be ignored'
|
||||
@echo ' Multiple levels can be combined with W=12 or W=123'
|
||||
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
|
||||
@echo ''
|
||||
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
|
||||
@ -1291,6 +1314,7 @@ $(help-board-dirs): help-%:
|
||||
# Documentation targets
|
||||
# ---------------------------------------------------------------------------
|
||||
%docs: scripts_basic FORCE
|
||||
$(Q)$(MAKE) $(build)=scripts build_docproc
|
||||
$(Q)$(MAKE) $(build)=Documentation/DocBook $@
|
||||
|
||||
else # KBUILD_EXTMOD
|
||||
@ -1375,7 +1399,7 @@ endif # KBUILD_EXTMOD
|
||||
clean: $(clean-dirs)
|
||||
$(call cmd,rmdirs)
|
||||
$(call cmd,rmfiles)
|
||||
@find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
|
||||
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
|
||||
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
|
||||
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
|
||||
-o -name '*.symtypes' -o -name 'modules.order' \
|
||||
|
@ -39,7 +39,7 @@ SECTIONS
|
||||
__init_begin = ALIGN(PAGE_SIZE);
|
||||
INIT_TEXT_SECTION(PAGE_SIZE)
|
||||
INIT_DATA_SECTION(16)
|
||||
PERCPU(L1_CACHE_BYTES, PAGE_SIZE)
|
||||
PERCPU_SECTION(L1_CACHE_BYTES)
|
||||
/* Align to THREAD_SIZE rather than PAGE_SIZE here so any padding page
|
||||
needed for the THREAD_SIZE aligned init_task gets freed after init */
|
||||
. = ALIGN(THREAD_SIZE);
|
||||
|
@ -294,6 +294,8 @@ config ARCH_AT91
|
||||
bool "Atmel AT91"
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select HAVE_CLK
|
||||
select CLKDEV_LOOKUP
|
||||
select ARM_PATCH_PHYS_VIRT if MMU
|
||||
help
|
||||
This enables support for systems based on the Atmel AT91RM9200,
|
||||
AT91SAM9 and AT91CAP9 processors.
|
||||
|
@ -1,358 +0,0 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_LOCALVERSION="-AT572D940HF"
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_TASK_IO_ACCOUNTING=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_OPROFILE=m
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_AT572D940HF=y
|
||||
CONFIG_MACH_AT572D940HFEB=y
|
||||
CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_CMDLINE="mem=48M console=ttyS0 initrd=0x21100000,3145728 root=/dev/ram0 rw ip=172.16.1.181"
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_FPE_NWFPE_XP=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=m
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_NET_PKTGEN=m
|
||||
CONFIG_NET_TCPPROBE=m
|
||||
CONFIG_CAN=m
|
||||
CONFIG_CAN_RAW=m
|
||||
CONFIG_CAN_BCM=m
|
||||
CONFIG_CAN_VCAN=m
|
||||
CONFIG_CAN_DEBUG_DEVICES=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_CONNECTOR=m
|
||||
CONFIG_MTD=m
|
||||
CONFIG_MTD_DEBUG=y
|
||||
CONFIG_MTD_DEBUG_VERBOSE=1
|
||||
CONFIG_MTD_CONCAT=m
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=m
|
||||
CONFIG_MTD_BLOCK=m
|
||||
CONFIG_MTD_BLOCK_RO=m
|
||||
CONFIG_FTL=m
|
||||
CONFIG_NFTL=m
|
||||
CONFIG_NFTL_RW=y
|
||||
CONFIG_INFTL=m
|
||||
CONFIG_RFD_FTL=m
|
||||
CONFIG_SSFDC=m
|
||||
CONFIG_MTD_OOPS=m
|
||||
CONFIG_MTD_CFI=m
|
||||
CONFIG_MTD_JEDECPROBE=m
|
||||
CONFIG_MTD_CFI_INTELEXT=m
|
||||
CONFIG_MTD_CFI_AMDSTD=m
|
||||
CONFIG_MTD_CFI_STAA=m
|
||||
CONFIG_MTD_ROM=m
|
||||
CONFIG_MTD_ABSENT=m
|
||||
CONFIG_MTD_COMPLEX_MAPPINGS=y
|
||||
CONFIG_MTD_PHYSMAP=m
|
||||
CONFIG_MTD_PLATRAM=m
|
||||
CONFIG_MTD_DATAFLASH=m
|
||||
CONFIG_MTD_M25P80=m
|
||||
CONFIG_MTD_SLRAM=m
|
||||
CONFIG_MTD_PHRAM=m
|
||||
CONFIG_MTD_MTDRAM=m
|
||||
CONFIG_MTD_BLOCK2MTD=m
|
||||
CONFIG_MTD_NAND=m
|
||||
CONFIG_MTD_NAND_VERIFY_WRITE=y
|
||||
CONFIG_MTD_NAND_DISKONCHIP=m
|
||||
CONFIG_MTD_NAND_NANDSIM=m
|
||||
CONFIG_MTD_NAND_PLATFORM=m
|
||||
CONFIG_MTD_ALAUDA=m
|
||||
CONFIG_MTD_UBI=m
|
||||
CONFIG_MTD_UBI_GLUEBI=m
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=65536
|
||||
CONFIG_ATMEL_TCLIB=y
|
||||
CONFIG_ATMEL_SSC=m
|
||||
CONFIG_SENSORS_TSL2550=m
|
||||
CONFIG_DS1682=m
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_SCSI=m
|
||||
CONFIG_SCSI_TGT=m
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_BLK_DEV_SD=m
|
||||
CONFIG_BLK_DEV_SR=m
|
||||
CONFIG_CHR_DEV_SG=m
|
||||
CONFIG_CHR_DEV_SCH=m
|
||||
CONFIG_SCSI_MULTI_LUN=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_LOGGING=y
|
||||
CONFIG_SCSI_SCAN_ASYNC=y
|
||||
CONFIG_SCSI_ISCSI_ATTRS=m
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_BONDING=m
|
||||
CONFIG_MACVLAN=m
|
||||
CONFIG_EQUALIZER=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_VETH=m
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_MARVELL_PHY=m
|
||||
CONFIG_DAVICOM_PHY=m
|
||||
CONFIG_QSEMI_PHY=m
|
||||
CONFIG_LXT_PHY=m
|
||||
CONFIG_CICADA_PHY=m
|
||||
CONFIG_VITESSE_PHY=m
|
||||
CONFIG_SMSC_PHY=m
|
||||
CONFIG_BROADCOM_PHY=m
|
||||
CONFIG_ICPLUS_PHY=m
|
||||
CONFIG_MDIO_BITBANG=m
|
||||
CONFIG_NET_ETHERNET=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_HOSTAP_FIRMWARE=y
|
||||
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
|
||||
CONFIG_USB_CATC=m
|
||||
CONFIG_USB_KAWETH=m
|
||||
CONFIG_USB_PEGASUS=m
|
||||
CONFIG_USB_RTL8150=m
|
||||
CONFIG_USB_USBNET=m
|
||||
CONFIG_USB_NET_DM9601=m
|
||||
CONFIG_USB_NET_GL620A=m
|
||||
CONFIG_USB_NET_PLUSB=m
|
||||
CONFIG_USB_NET_MCS7830=m
|
||||
CONFIG_USB_NET_RNDIS_HOST=m
|
||||
CONFIG_USB_ALI_M5632=y
|
||||
CONFIG_USB_AN2720=y
|
||||
CONFIG_USB_EPSON2888=y
|
||||
CONFIG_USB_KC2190=y
|
||||
# CONFIG_USB_NET_ZAURUS is not set
|
||||
CONFIG_INPUT_MOUSEDEV=m
|
||||
CONFIG_INPUT_EVDEV=m
|
||||
CONFIG_INPUT_EVBUG=m
|
||||
CONFIG_KEYBOARD_LKKBD=m
|
||||
CONFIG_KEYBOARD_GPIO=m
|
||||
CONFIG_KEYBOARD_NEWTON=m
|
||||
CONFIG_KEYBOARD_STOWAWAY=m
|
||||
CONFIG_KEYBOARD_SUNKBD=m
|
||||
CONFIG_KEYBOARD_XTKBD=m
|
||||
CONFIG_MOUSE_PS2=m
|
||||
CONFIG_MOUSE_SERIAL=m
|
||||
CONFIG_MOUSE_APPLETOUCH=m
|
||||
CONFIG_MOUSE_VSXXXAA=m
|
||||
CONFIG_MOUSE_GPIO=m
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_UINPUT=m
|
||||
CONFIG_SERIO_SERPORT=m
|
||||
CONFIG_SERIO_RAW=m
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_SERIAL_NONSTANDARD=y
|
||||
CONFIG_N_HDLC=m
|
||||
CONFIG_SPECIALIX=m
|
||||
CONFIG_STALDRV=y
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_IPMI_HANDLER=m
|
||||
CONFIG_IPMI_DEVICE_INTERFACE=m
|
||||
CONFIG_IPMI_SI=m
|
||||
CONFIG_IPMI_WATCHDOG=m
|
||||
CONFIG_IPMI_POWEROFF=m
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_R3964=m
|
||||
CONFIG_RAW_DRIVER=m
|
||||
CONFIG_TCG_TPM=m
|
||||
CONFIG_TCG_NSC=m
|
||||
CONFIG_TCG_ATMEL=m
|
||||
CONFIG_I2C=m
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_ATMEL=y
|
||||
CONFIG_SPI_BITBANG=m
|
||||
CONFIG_SPI_SPIDEV=m
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_SOUND=m
|
||||
CONFIG_SND=m
|
||||
CONFIG_SND_SEQUENCER=m
|
||||
CONFIG_SND_SEQ_DUMMY=m
|
||||
CONFIG_SND_MIXER_OSS=m
|
||||
CONFIG_SND_PCM_OSS=m
|
||||
# CONFIG_SND_PCM_OSS_PLUGINS is not set
|
||||
CONFIG_SND_SEQUENCER_OSS=y
|
||||
CONFIG_SND_DYNAMIC_MINORS=y
|
||||
# CONFIG_SND_VERBOSE_PROCFS is not set
|
||||
CONFIG_SND_DUMMY=m
|
||||
CONFIG_SND_VIRMIDI=m
|
||||
CONFIG_SND_USB_AUDIO=m
|
||||
CONFIG_SND_USB_CAIAQ=m
|
||||
CONFIG_SND_USB_CAIAQ_INPUT=y
|
||||
CONFIG_HID=m
|
||||
CONFIG_HIDRAW=y
|
||||
CONFIG_USB_HID=m
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_USB_KBD=m
|
||||
CONFIG_USB_MOUSE=m
|
||||
CONFIG_HID_A4TECH=m
|
||||
CONFIG_HID_APPLE=m
|
||||
CONFIG_HID_BELKIN=m
|
||||
CONFIG_HID_CHERRY=m
|
||||
CONFIG_HID_CHICONY=m
|
||||
CONFIG_HID_CYPRESS=m
|
||||
CONFIG_HID_EZKEY=m
|
||||
CONFIG_HID_GYRATION=m
|
||||
CONFIG_HID_LOGITECH=m
|
||||
CONFIG_HID_MICROSOFT=m
|
||||
CONFIG_HID_MONTEREY=m
|
||||
CONFIG_HID_PANTHERLORD=m
|
||||
CONFIG_HID_PETALYNX=m
|
||||
CONFIG_HID_SAMSUNG=m
|
||||
CONFIG_HID_SONY=m
|
||||
CONFIG_HID_SUNPLUS=m
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
# CONFIG_USB_DEVICE_CLASS is not set
|
||||
CONFIG_USB_DYNAMIC_MINORS=y
|
||||
CONFIG_USB_MON=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=m
|
||||
CONFIG_USB_STORAGE_DATAFAB=m
|
||||
CONFIG_USB_STORAGE_FREECOM=m
|
||||
CONFIG_USB_STORAGE_ISD200=m
|
||||
CONFIG_USB_STORAGE_USBAT=m
|
||||
CONFIG_USB_STORAGE_SDDR09=m
|
||||
CONFIG_USB_STORAGE_SDDR55=m
|
||||
CONFIG_USB_STORAGE_JUMPSHOT=m
|
||||
CONFIG_USB_STORAGE_ALAUDA=m
|
||||
CONFIG_USB_STORAGE_KARMA=m
|
||||
CONFIG_USB_LIBUSUAL=y
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_EZUSB=y
|
||||
CONFIG_USB_SERIAL_GENERIC=y
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_USB_SERIAL_SPCP8X5=m
|
||||
CONFIG_USB_SERIAL_DEBUG=m
|
||||
CONFIG_USB_EMI62=m
|
||||
CONFIG_USB_EMI26=m
|
||||
CONFIG_USB_ADUTUX=m
|
||||
CONFIG_USB_TEST=m
|
||||
CONFIG_USB_GADGET=m
|
||||
CONFIG_USB_GADGET_DEBUG_FILES=y
|
||||
CONFIG_USB_GADGET_DEBUG_FS=y
|
||||
CONFIG_USB_ZERO=m
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_USB_GADGETFS=m
|
||||
CONFIG_USB_FILE_STORAGE=m
|
||||
CONFIG_USB_G_SERIAL=m
|
||||
CONFIG_USB_MIDI_GADGET=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_SDIO_UART=m
|
||||
CONFIG_MMC_AT91=m
|
||||
CONFIG_MMC_SPI=m
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=m
|
||||
CONFIG_LEDS_GPIO=m
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=m
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_INTF_DEV_UIE_EMUL=y
|
||||
CONFIG_RTC_DRV_DS1307=m
|
||||
CONFIG_RTC_DRV_DS1305=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_POSIX_ACL=y
|
||||
CONFIG_EXT2_FS_SECURITY=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS_SECURITY=y
|
||||
CONFIG_JBD_DEBUG=y
|
||||
CONFIG_REISERFS_FS=m
|
||||
CONFIG_REISERFS_CHECK=y
|
||||
CONFIG_REISERFS_PROC_INFO=y
|
||||
CONFIG_REISERFS_FS_XATTR=y
|
||||
CONFIG_REISERFS_FS_POSIX_ACL=y
|
||||
CONFIG_REISERFS_FS_SECURITY=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_MSDOS_FS=m
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_NTFS_FS=m
|
||||
CONFIG_NTFS_RW=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_JFFS2_FS=m
|
||||
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
|
||||
CONFIG_JFFS2_LZO=y
|
||||
CONFIG_JFFS2_CMODE_FAVOURLZO=y
|
||||
CONFIG_CRAMFS=m
|
||||
CONFIG_NFS_FS=m
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_NFSD=m
|
||||
CONFIG_NFSD_V3_ACL=y
|
||||
CONFIG_NFSD_V4=y
|
||||
CONFIG_CIFS=m
|
||||
CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
CONFIG_BSD_DISKLABEL=y
|
||||
CONFIG_MINIX_SUBPARTITION=y
|
||||
CONFIG_SOLARIS_X86_PARTITION=y
|
||||
CONFIG_UNIXWARE_DISKLABEL=y
|
||||
CONFIG_LDM_PARTITION=y
|
||||
CONFIG_LDM_DEBUG=y
|
||||
CONFIG_SGI_PARTITION=y
|
||||
CONFIG_SUN_PARTITION=y
|
||||
CONFIG_NLS_DEFAULT="cp437"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=m
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_UTF8=m
|
||||
CONFIG_DLM=m
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_UNUSED_SYMBOLS=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
# CONFIG_CRYPTO_ANSI_CPRNG is not set
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_CRC_CCITT=m
|
||||
CONFIG_CRC16=m
|
@ -1,9 +1,13 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
@ -15,18 +19,27 @@ CONFIG_ARCH_AT91SAM9261=y
|
||||
CONFIG_MACH_AT91SAM9261EK=y
|
||||
CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
|
||||
# CONFIG_ARM_THUMB is not set
|
||||
CONFIG_AEABI=y
|
||||
# CONFIG_OABI_COMPAT is not set
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_VFP=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_LIB80211=y
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
@ -34,8 +47,12 @@ CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ATMEL=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_GLUEBI=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_ATMEL_TCLIB=y
|
||||
CONFIG_ATMEL_SSC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
@ -45,12 +62,27 @@ CONFIG_NET_ETHERNET=y
|
||||
CONFIG_DM9000=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_RTL8187=m
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_LIBERTAS_SPI=m
|
||||
CONFIG_RT2X00=m
|
||||
CONFIG_RT2500USB=m
|
||||
CONFIG_RT73USB=m
|
||||
CONFIG_ZD1211RW=m
|
||||
CONFIG_INPUT_POLLDEV=m
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_KEYBOARD_ATKBD is not set
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ADS7846=y
|
||||
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
@ -65,31 +97,62 @@ CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_AT91SAM9X_WATCHDOG=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_ATMEL=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
# CONFIG_LCD_CLASS_DEVICE is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_ATMEL_LCDC=y
|
||||
# CONFIG_BACKLIGHT_GENERIC is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_SEQUENCER=y
|
||||
CONFIG_SND_MIXER_OSS=y
|
||||
CONFIG_SND_PCM_OSS=y
|
||||
# CONFIG_SND_SUPPORT_OLD_API is not set
|
||||
# CONFIG_SND_VERBOSE_PROCFS is not set
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
# CONFIG_SND_ARM is not set
|
||||
CONFIG_SND_AT73C213=y
|
||||
CONFIG_SND_USB_AUDIO=m
|
||||
# CONFIG_USB_HID is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
CONFIG_USB_MON=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_STORAGE_DEBUG=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ZERO=m
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_USB_GADGETFS=m
|
||||
CONFIG_USB_FILE_STORAGE=m
|
||||
CONFIG_USB_G_SERIAL=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_AT91=m
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AT91SAM9=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_CRAMFS=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_LZO=y
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_NLS_ISO8859_15=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_FTRACE=y
|
||||
CONFIG_CRC_CCITT=m
|
@ -1,9 +1,13 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
@ -13,53 +17,81 @@ CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_AT91SAM9263=y
|
||||
CONFIG_MACH_AT91SAM9263EK=y
|
||||
CONFIG_MACH_USB_A9263=y
|
||||
CONFIG_MACH_NEOCORE926=y
|
||||
CONFIG_MTD_AT91_DATAFLASH_CARD=y
|
||||
# CONFIG_ARM_THUMB is not set
|
||||
CONFIG_AEABI=y
|
||||
# CONFIG_OABI_COMPAT is not set
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_ROUTE_VERBOSE=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_IP_PNP_RARP=y
|
||||
CONFIG_NET_IPIP=y
|
||||
CONFIG_IP_MROUTE=y
|
||||
CONFIG_IP_PIMSM_V1=y
|
||||
CONFIG_IP_PIMSM_V2=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_NFTL=y
|
||||
CONFIG_NFTL_RW=y
|
||||
CONFIG_MTD_DATAFLASH=y
|
||||
CONFIG_MTD_BLOCK2MTD=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ATMEL=y
|
||||
CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_GLUEBI=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_ATMEL_SSC=y
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_ATMEL_PWM=y
|
||||
CONFIG_ATMEL_TCLIB=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_MULTI_LUN=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_SMSC_PHY=y
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MACB=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_INPUT_POLLDEV=m
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=240
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_KEYBOARD_ATKBD is not set
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ADS7846=y
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_LEGACY_PTY_COUNT=4
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
@ -74,8 +106,25 @@ CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_AT91SAM9X_WATCHDOG=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_ATMEL=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
# CONFIG_USB_HID is not set
|
||||
CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_ATMEL_LCDC=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_SEQUENCER=y
|
||||
CONFIG_SND_MIXER_OSS=y
|
||||
CONFIG_SND_PCM_OSS=y
|
||||
# CONFIG_SND_SUPPORT_OLD_API is not set
|
||||
# CONFIG_SND_VERBOSE_PROCFS is not set
|
||||
# CONFIG_SND_DRIVERS is not set
|
||||
# CONFIG_SND_ARM is not set
|
||||
CONFIG_SND_ATMEL_AC97C=y
|
||||
# CONFIG_SND_SPI is not set
|
||||
CONFIG_SND_USB_AUDIO=m
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
CONFIG_USB_MON=y
|
||||
@ -83,24 +132,37 @@ CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ZERO=m
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_USB_GADGETFS=m
|
||||
CONFIG_USB_FILE_STORAGE=m
|
||||
CONFIG_USB_G_SERIAL=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_SDIO_UART=m
|
||||
CONFIG_MMC_AT91=m
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_ATMEL_PWM=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AT91SAM9=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_CRAMFS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_FTRACE=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_XZ_DEC=y
|
@ -1,104 +0,0 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_AT91SAM9263=y
|
||||
CONFIG_MACH_NEOCORE926=y
|
||||
CONFIG_MTD_AT91_DATAFLASH_CARD=y
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_IP_PNP_RARP=y
|
||||
CONFIG_NET_IPIP=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_NFTL=y
|
||||
CONFIG_NFTL_RW=y
|
||||
CONFIG_MTD_BLOCK2MTD=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ECC_SMC=y
|
||||
CONFIG_MTD_NAND_VERIFY_WRITE=y
|
||||
CONFIG_MTD_NAND_ATMEL=y
|
||||
CONFIG_MTD_NAND_PLATFORM=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_NBD=y
|
||||
CONFIG_ATMEL_PWM=y
|
||||
CONFIG_ATMEL_TCLIB=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_SMSC_PHY=y
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MACB=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ADS7846=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_NONSTANDARD=y
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
# CONFIG_SERIAL_ATMEL_PDC is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_ATMEL=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_VIDEO_OUTPUT_CONTROL=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_ATMEL=y
|
||||
CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_ATMEL_LCDC=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
CONFIG_USB_MON=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_SDIO_UART=y
|
||||
CONFIG_MMC_AT91=m
|
||||
CONFIG_EXT2_FS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
CONFIG_AUTOFS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_WBUF_VERIFY=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
# CONFIG_ENABLE_WARN_DEPRECATED is not set
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
@ -1,106 +0,0 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_AT91SAM9263=y
|
||||
CONFIG_MACH_USB_A9263=y
|
||||
CONFIG_AT91_SLOW_CLOCK=y
|
||||
# CONFIG_ARM_THUMB is not set
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_CMDLINE="mem=64M console=ttyS0,115200"
|
||||
CONFIG_FPE_NWFPE=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_ROUTE_VERBOSE=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_IP_PNP_RARP=y
|
||||
CONFIG_IP_MROUTE=y
|
||||
CONFIG_IP_PIMSM_V1=y
|
||||
CONFIG_IP_PIMSM_V2=y
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_DATAFLASH=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ATMEL=y
|
||||
CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_MULTI_LUN=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MACB=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_EVBUG=y
|
||||
# CONFIG_KEYBOARD_ATKBD is not set
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_ATMEL=y
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
# CONFIG_USB_HID is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
CONFIG_USB_MON=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_850=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
@ -82,7 +82,7 @@ SECTIONS
|
||||
#endif
|
||||
}
|
||||
|
||||
PERCPU(32, PAGE_SIZE)
|
||||
PERCPU_SECTION(32)
|
||||
|
||||
#ifndef CONFIG_XIP_KERNEL
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
|
@ -3,9 +3,6 @@ if ARCH_AT91
|
||||
config HAVE_AT91_DATAFLASH_CARD
|
||||
bool
|
||||
|
||||
config HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
bool
|
||||
|
||||
config HAVE_AT91_USART3
|
||||
bool
|
||||
|
||||
@ -85,11 +82,6 @@ config ARCH_AT91CAP9
|
||||
select HAVE_FB_ATMEL
|
||||
select HAVE_NET_MACB
|
||||
|
||||
config ARCH_AT572D940HF
|
||||
bool "AT572D940HF"
|
||||
select CPU_ARM926T
|
||||
select GENERIC_CLOCKEVENTS
|
||||
|
||||
config ARCH_AT91X40
|
||||
bool "AT91x40"
|
||||
select ARCH_USES_GETTIMEOFFSET
|
||||
@ -209,7 +201,6 @@ comment "AT91SAM9260 / AT91SAM9XE Board Type"
|
||||
config MACH_AT91SAM9260EK
|
||||
bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit"
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
|
||||
<http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
|
||||
@ -270,7 +261,6 @@ comment "AT91SAM9261 Board Type"
|
||||
config MACH_AT91SAM9261EK
|
||||
bool "Atmel AT91SAM9261-EK Evaluation Kit"
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit.
|
||||
<http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820>
|
||||
@ -286,7 +276,6 @@ comment "AT91SAM9G10 Board Type"
|
||||
config MACH_AT91SAM9G10EK
|
||||
bool "Atmel AT91SAM9G10-EK Evaluation Kit"
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit.
|
||||
<http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588>
|
||||
@ -302,7 +291,6 @@ comment "AT91SAM9263 Board Type"
|
||||
config MACH_AT91SAM9263EK
|
||||
bool "Atmel AT91SAM9263-EK Evaluation Kit"
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit.
|
||||
<http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057>
|
||||
@ -343,7 +331,6 @@ comment "AT91SAM9G20 Board Type"
|
||||
config MACH_AT91SAM9G20EK
|
||||
bool "Atmel AT91SAM9G20-EK Evaluation Kit"
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit
|
||||
that embeds only one SD/MMC slot.
|
||||
@ -351,7 +338,6 @@ config MACH_AT91SAM9G20EK
|
||||
config MACH_AT91SAM9G20EK_2MMC
|
||||
depends on MACH_AT91SAM9G20EK
|
||||
bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots"
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
|
||||
with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
|
||||
@ -416,7 +402,6 @@ comment "AT91SAM9G45 Board Type"
|
||||
|
||||
config MACH_AT91SAM9M10G45EK
|
||||
bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.
|
||||
"ES" at the end of the name means that this board is an
|
||||
@ -433,7 +418,6 @@ comment "AT91CAP9 Board Type"
|
||||
config MACH_AT91CAP9ADK
|
||||
bool "Atmel AT91CAP9A-DK Evaluation Kit"
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit.
|
||||
<http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138>
|
||||
@ -442,23 +426,6 @@ endif
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
if ARCH_AT572D940HF
|
||||
|
||||
comment "AT572D940HF Board Type"
|
||||
|
||||
config MACH_AT572D940HFEB
|
||||
bool "AT572D940HF-EK"
|
||||
depends on ARCH_AT572D940HF
|
||||
select HAVE_AT91_DATAFLASH_CARD
|
||||
select HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
Select this if you are using Atmel's AT572D940HF-EK evaluation kit.
|
||||
<http://www.atmel.com/products/diopsis/default.asp>
|
||||
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
if ARCH_AT91X40
|
||||
|
||||
comment "AT91X40 Board Type"
|
||||
@ -483,13 +450,6 @@ config MTD_AT91_DATAFLASH_CARD
|
||||
help
|
||||
Enable support for the DataFlash card.
|
||||
|
||||
config MTD_NAND_ATMEL_BUSWIDTH_16
|
||||
bool "Enable 16-bit data bus interface to NAND flash"
|
||||
depends on HAVE_NAND_ATMEL_BUSWIDTH_16
|
||||
help
|
||||
On AT91SAM926x boards both types of NAND flash can be present
|
||||
(8 and 16 bit data bus width).
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
comment "AT91 Feature Selections"
|
||||
|
@ -19,7 +19,6 @@ obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devi
|
||||
obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9_alt_reset.o
|
||||
obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
|
||||
obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o
|
||||
obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o
|
||||
obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
|
||||
|
||||
# AT91RM9200 board-specific support
|
||||
@ -78,9 +77,6 @@ obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o
|
||||
# AT91CAP9 board-specific support
|
||||
obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o
|
||||
|
||||
# AT572D940HF board-specific support
|
||||
obj-$(CONFIG_MACH_AT572D940HFEB) += board-at572d940hf_ek.o
|
||||
|
||||
# AT91X40 board-specific support
|
||||
obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o
|
||||
|
||||
|
@ -1,377 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-at91/at572d940hf.c
|
||||
*
|
||||
* Antonio R. Costa <costa.antonior@gmail.com>
|
||||
* Copyright (C) 2008 Atmel
|
||||
*
|
||||
* Copyright (C) 2005 SAN People
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/at572d940hf.h>
|
||||
#include <mach/at91_pmc.h>
|
||||
#include <mach/at91_rstc.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
|
||||
static struct map_desc at572d940hf_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = AT91_VA_BASE_SYS,
|
||||
.pfn = __phys_to_pfn(AT91_BASE_SYS),
|
||||
.length = SZ_16K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = AT91_IO_VIRT_BASE - AT572D940HF_SRAM_SIZE,
|
||||
.pfn = __phys_to_pfn(AT572D940HF_SRAM_BASE),
|
||||
.length = AT572D940HF_SRAM_SIZE,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* The peripheral clocks.
|
||||
*/
|
||||
static struct clk pioA_clk = {
|
||||
.name = "pioA_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_PIOA,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk pioB_clk = {
|
||||
.name = "pioB_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_PIOB,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk pioC_clk = {
|
||||
.name = "pioC_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_PIOC,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk macb_clk = {
|
||||
.name = "macb_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_EMAC,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart0_clk = {
|
||||
.name = "usart0_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_US0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart1_clk = {
|
||||
.name = "usart1_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_US1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk usart2_clk = {
|
||||
.name = "usart2_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_US2,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk mmc_clk = {
|
||||
.name = "mci_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_MCI,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk udc_clk = {
|
||||
.name = "udc_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_UDP,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk twi0_clk = {
|
||||
.name = "twi0_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_TWI0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk spi0_clk = {
|
||||
.name = "spi0_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_SPI0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk spi1_clk = {
|
||||
.name = "spi1_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_SPI1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ssc0_clk = {
|
||||
.name = "ssc0_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_SSC0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ssc1_clk = {
|
||||
.name = "ssc1_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_SSC1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ssc2_clk = {
|
||||
.name = "ssc2_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_SSC2,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tc0_clk = {
|
||||
.name = "tc0_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_TC0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tc1_clk = {
|
||||
.name = "tc1_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_TC1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk tc2_clk = {
|
||||
.name = "tc2_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_TC2,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ohci_clk = {
|
||||
.name = "ohci_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_UHP,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk ssc3_clk = {
|
||||
.name = "ssc3_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_SSC3,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk twi1_clk = {
|
||||
.name = "twi1_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_TWI1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk can0_clk = {
|
||||
.name = "can0_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_CAN0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk can1_clk = {
|
||||
.name = "can1_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_CAN1,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
static struct clk mAgicV_clk = {
|
||||
.name = "mAgicV_clk",
|
||||
.pmc_mask = 1 << AT572D940HF_ID_MSIRQ0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
|
||||
|
||||
static struct clk *periph_clocks[] __initdata = {
|
||||
&pioA_clk,
|
||||
&pioB_clk,
|
||||
&pioC_clk,
|
||||
&macb_clk,
|
||||
&usart0_clk,
|
||||
&usart1_clk,
|
||||
&usart2_clk,
|
||||
&mmc_clk,
|
||||
&udc_clk,
|
||||
&twi0_clk,
|
||||
&spi0_clk,
|
||||
&spi1_clk,
|
||||
&ssc0_clk,
|
||||
&ssc1_clk,
|
||||
&ssc2_clk,
|
||||
&tc0_clk,
|
||||
&tc1_clk,
|
||||
&tc2_clk,
|
||||
&ohci_clk,
|
||||
&ssc3_clk,
|
||||
&twi1_clk,
|
||||
&can0_clk,
|
||||
&can1_clk,
|
||||
&mAgicV_clk,
|
||||
/* irq0 .. irq2 */
|
||||
};
|
||||
|
||||
/*
|
||||
* The five programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
*/
|
||||
static struct clk pck0 = {
|
||||
.name = "pck0",
|
||||
.pmc_mask = AT91_PMC_PCK0,
|
||||
.type = CLK_TYPE_PROGRAMMABLE,
|
||||
.id = 0,
|
||||
};
|
||||
static struct clk pck1 = {
|
||||
.name = "pck1",
|
||||
.pmc_mask = AT91_PMC_PCK1,
|
||||
.type = CLK_TYPE_PROGRAMMABLE,
|
||||
.id = 1,
|
||||
};
|
||||
static struct clk pck2 = {
|
||||
.name = "pck2",
|
||||
.pmc_mask = AT91_PMC_PCK2,
|
||||
.type = CLK_TYPE_PROGRAMMABLE,
|
||||
.id = 2,
|
||||
};
|
||||
static struct clk pck3 = {
|
||||
.name = "pck3",
|
||||
.pmc_mask = AT91_PMC_PCK3,
|
||||
.type = CLK_TYPE_PROGRAMMABLE,
|
||||
.id = 3,
|
||||
};
|
||||
|
||||
static struct clk mAgicV_mem_clk = {
|
||||
.name = "mAgicV_mem_clk",
|
||||
.pmc_mask = AT91_PMC_PCK4,
|
||||
.type = CLK_TYPE_PROGRAMMABLE,
|
||||
.id = 4,
|
||||
};
|
||||
|
||||
/* HClocks */
|
||||
static struct clk hck0 = {
|
||||
.name = "hck0",
|
||||
.pmc_mask = AT91_PMC_HCK0,
|
||||
.type = CLK_TYPE_SYSTEM,
|
||||
.id = 0,
|
||||
};
|
||||
static struct clk hck1 = {
|
||||
.name = "hck1",
|
||||
.pmc_mask = AT91_PMC_HCK1,
|
||||
.type = CLK_TYPE_SYSTEM,
|
||||
.id = 1,
|
||||
};
|
||||
|
||||
static void __init at572d940hf_register_clocks(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
clk_register(&pck2);
|
||||
clk_register(&pck3);
|
||||
clk_register(&mAgicV_mem_clk);
|
||||
|
||||
clk_register(&hck0);
|
||||
clk_register(&hck1);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
static struct at91_gpio_bank at572d940hf_gpio[] = {
|
||||
{
|
||||
.id = AT572D940HF_ID_PIOA,
|
||||
.offset = AT91_PIOA,
|
||||
.clock = &pioA_clk,
|
||||
}, {
|
||||
.id = AT572D940HF_ID_PIOB,
|
||||
.offset = AT91_PIOB,
|
||||
.clock = &pioB_clk,
|
||||
}, {
|
||||
.id = AT572D940HF_ID_PIOC,
|
||||
.offset = AT91_PIOC,
|
||||
.clock = &pioC_clk,
|
||||
}
|
||||
};
|
||||
|
||||
static void at572d940hf_reset(void)
|
||||
{
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* AT572D940HF processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at572d940hf_initialize(unsigned long main_clock)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at572d940hf_io_desc, ARRAY_SIZE(at572d940hf_io_desc));
|
||||
|
||||
at91_arch_reset = at572d940hf_reset;
|
||||
at91_extern_irq = (1 << AT572D940HF_ID_IRQ0) | (1 << AT572D940HF_ID_IRQ1)
|
||||
| (1 << AT572D940HF_ID_IRQ2);
|
||||
|
||||
/* Init clock subsystem */
|
||||
at91_clock_init(main_clock);
|
||||
|
||||
/* Register the processor-specific clocks */
|
||||
at572d940hf_register_clocks();
|
||||
|
||||
/* Register GPIO subsystem */
|
||||
at91_gpio_init(at572d940hf_gpio, 3);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Interrupt initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* The default interrupt priority levels (0 = lowest, 7 = highest).
|
||||
*/
|
||||
static unsigned int at572d940hf_default_irq_priority[NR_AIC_IRQS] __initdata = {
|
||||
7, /* Advanced Interrupt Controller */
|
||||
7, /* System Peripherals */
|
||||
0, /* Parallel IO Controller A */
|
||||
0, /* Parallel IO Controller B */
|
||||
0, /* Parallel IO Controller C */
|
||||
3, /* Ethernet */
|
||||
6, /* USART 0 */
|
||||
6, /* USART 1 */
|
||||
6, /* USART 2 */
|
||||
0, /* Multimedia Card Interface */
|
||||
4, /* USB Device Port */
|
||||
0, /* Two-Wire Interface 0 */
|
||||
6, /* Serial Peripheral Interface 0 */
|
||||
6, /* Serial Peripheral Interface 1 */
|
||||
5, /* Serial Synchronous Controller 0 */
|
||||
5, /* Serial Synchronous Controller 1 */
|
||||
5, /* Serial Synchronous Controller 2 */
|
||||
0, /* Timer Counter 0 */
|
||||
0, /* Timer Counter 1 */
|
||||
0, /* Timer Counter 2 */
|
||||
3, /* USB Host port */
|
||||
3, /* Serial Synchronous Controller 3 */
|
||||
0, /* Two-Wire Interface 1 */
|
||||
0, /* CAN Controller 0 */
|
||||
0, /* CAN Controller 1 */
|
||||
0, /* mAgicV HALT line */
|
||||
0, /* mAgicV SIRQ0 line */
|
||||
0, /* mAgicV exception line */
|
||||
0, /* mAgicV end of DMA line */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
};
|
||||
|
||||
void __init at572d940hf_init_interrupts(unsigned int priority[NR_AIC_IRQS])
|
||||
{
|
||||
if (!priority)
|
||||
priority = at572d940hf_default_irq_priority;
|
||||
|
||||
/* Initialize the AIC interrupt controller */
|
||||
at91_aic_init(priority);
|
||||
|
||||
/* Enable GPIO interrupts */
|
||||
at91_gpio_irq_setup();
|
||||
}
|
||||
|
@ -1,970 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-at91/at572d940hf_devices.c
|
||||
*
|
||||
* Copyright (C) 2008 Atmel Antonio R. Costa <costa.antonior@gmail.com>
|
||||
* Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
|
||||
* Copyright (C) 2005 David Brownell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at572d940hf.h>
|
||||
#include <mach/at572d940hf_matrix.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Host
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
|
||||
static u64 ohci_dmamask = DMA_BIT_MASK(32);
|
||||
static struct at91_usbh_data usbh_data;
|
||||
|
||||
static struct resource usbh_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_UHP_BASE,
|
||||
.end = AT572D940HF_UHP_BASE + SZ_1M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_UHP,
|
||||
.end = AT572D940HF_ID_UHP,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_usbh_device = {
|
||||
.name = "at91_ohci",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &ohci_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &usbh_data,
|
||||
},
|
||||
.resource = usbh_resources,
|
||||
.num_resources = ARRAY_SIZE(usbh_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_usbh(struct at91_usbh_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
usbh_data = *data;
|
||||
platform_device_register(&at572d940hf_usbh_device);
|
||||
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* USB Device (Gadget)
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#ifdef CONFIG_USB_GADGET_AT91
|
||||
static struct at91_udc_data udc_data;
|
||||
|
||||
static struct resource udc_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_UDP,
|
||||
.end = AT572D940HF_BASE_UDP + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_UDP,
|
||||
.end = AT572D940HF_ID_UDP,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_udc_device = {
|
||||
.name = "at91_udc",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &udc_data,
|
||||
},
|
||||
.resource = udc_resources,
|
||||
.num_resources = ARRAY_SIZE(udc_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_udc(struct at91_udc_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (data->vbus_pin) {
|
||||
at91_set_gpio_input(data->vbus_pin, 0);
|
||||
at91_set_deglitch(data->vbus_pin, 1);
|
||||
}
|
||||
|
||||
/* Pullup pin is handled internally */
|
||||
|
||||
udc_data = *data;
|
||||
platform_device_register(&at572d940hf_udc_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_udc(struct at91_udc_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Ethernet
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
|
||||
static u64 eth_dmamask = DMA_BIT_MASK(32);
|
||||
static struct at91_eth_data eth_data;
|
||||
|
||||
static struct resource eth_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_EMAC,
|
||||
.end = AT572D940HF_BASE_EMAC + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_EMAC,
|
||||
.end = AT572D940HF_ID_EMAC,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_eth_device = {
|
||||
.name = "macb",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = ð_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = ð_data,
|
||||
},
|
||||
.resource = eth_resources,
|
||||
.num_resources = ARRAY_SIZE(eth_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_eth(struct at91_eth_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (data->phy_irq_pin) {
|
||||
at91_set_gpio_input(data->phy_irq_pin, 0);
|
||||
at91_set_deglitch(data->phy_irq_pin, 1);
|
||||
}
|
||||
|
||||
/* Only RMII is supported */
|
||||
data->is_rmii = 1;
|
||||
|
||||
/* Pins used for RMII */
|
||||
at91_set_A_periph(AT91_PIN_PA16, 0); /* ETXCK_EREFCK */
|
||||
at91_set_A_periph(AT91_PIN_PA17, 0); /* ERXDV */
|
||||
at91_set_A_periph(AT91_PIN_PA18, 0); /* ERX0 */
|
||||
at91_set_A_periph(AT91_PIN_PA19, 0); /* ERX1 */
|
||||
at91_set_A_periph(AT91_PIN_PA20, 0); /* ERXER */
|
||||
at91_set_A_periph(AT91_PIN_PA23, 0); /* ETXEN */
|
||||
at91_set_A_periph(AT91_PIN_PA21, 0); /* ETX0 */
|
||||
at91_set_A_periph(AT91_PIN_PA22, 0); /* ETX1 */
|
||||
at91_set_A_periph(AT91_PIN_PA13, 0); /* EMDIO */
|
||||
at91_set_A_periph(AT91_PIN_PA14, 0); /* EMDC */
|
||||
|
||||
eth_data = *data;
|
||||
platform_device_register(&at572d940hf_eth_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_eth(struct at91_eth_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* MMC / SD
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
|
||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
||||
static struct at91_mmc_data mmc_data;
|
||||
|
||||
static struct resource mmc_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_MCI,
|
||||
.end = AT572D940HF_BASE_MCI + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_MCI,
|
||||
.end = AT572D940HF_ID_MCI,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_mmc_device = {
|
||||
.name = "at91_mci",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &mmc_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &mmc_data,
|
||||
},
|
||||
.resource = mmc_resources,
|
||||
.num_resources = ARRAY_SIZE(mmc_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
/* input/irq */
|
||||
if (data->det_pin) {
|
||||
at91_set_gpio_input(data->det_pin, 1);
|
||||
at91_set_deglitch(data->det_pin, 1);
|
||||
}
|
||||
if (data->wp_pin)
|
||||
at91_set_gpio_input(data->wp_pin, 1);
|
||||
if (data->vcc_pin)
|
||||
at91_set_gpio_output(data->vcc_pin, 0);
|
||||
|
||||
/* CLK */
|
||||
at91_set_A_periph(AT91_PIN_PC22, 0);
|
||||
|
||||
/* CMD */
|
||||
at91_set_A_periph(AT91_PIN_PC23, 1);
|
||||
|
||||
/* DAT0, maybe DAT1..DAT3 */
|
||||
at91_set_A_periph(AT91_PIN_PC24, 1);
|
||||
if (data->wire4) {
|
||||
at91_set_A_periph(AT91_PIN_PC25, 1);
|
||||
at91_set_A_periph(AT91_PIN_PC26, 1);
|
||||
at91_set_A_periph(AT91_PIN_PC27, 1);
|
||||
}
|
||||
|
||||
mmc_data = *data;
|
||||
platform_device_register(&at572d940hf_mmc_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* NAND / SmartMedia
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL) || defined(CONFIG_MTD_NAND_ATMEL_MODULE)
|
||||
static struct atmel_nand_data nand_data;
|
||||
|
||||
#define NAND_BASE AT91_CHIPSELECT_3
|
||||
|
||||
static struct resource nand_resources[] = {
|
||||
{
|
||||
.start = NAND_BASE,
|
||||
.end = NAND_BASE + SZ_256M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_nand_device = {
|
||||
.name = "atmel_nand",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &nand_data,
|
||||
},
|
||||
.resource = nand_resources,
|
||||
.num_resources = ARRAY_SIZE(nand_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_nand(struct atmel_nand_data *data)
|
||||
{
|
||||
unsigned long csa;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
|
||||
/* enable pin */
|
||||
if (data->enable_pin)
|
||||
at91_set_gpio_output(data->enable_pin, 1);
|
||||
|
||||
/* ready/busy pin */
|
||||
if (data->rdy_pin)
|
||||
at91_set_gpio_input(data->rdy_pin, 1);
|
||||
|
||||
/* card detect pin */
|
||||
if (data->det_pin)
|
||||
at91_set_gpio_input(data->det_pin, 1);
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PB28, 0); /* A[22] */
|
||||
at91_set_B_periph(AT91_PIN_PA28, 0); /* NANDOE */
|
||||
at91_set_B_periph(AT91_PIN_PA29, 0); /* NANDWE */
|
||||
|
||||
nand_data = *data;
|
||||
platform_device_register(&at572d940hf_nand_device);
|
||||
}
|
||||
|
||||
#else
|
||||
void __init at91_add_device_nand(struct atmel_nand_data *data) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* TWI (i2c)
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Prefer the GPIO code since the TWI controller isn't robust
|
||||
* (gets overruns and underruns under load) and can only issue
|
||||
* repeated STARTs in one scenario (the driver doesn't yet handle them).
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
|
||||
|
||||
static struct i2c_gpio_platform_data pdata = {
|
||||
.sda_pin = AT91_PIN_PC7,
|
||||
.sda_is_open_drain = 1,
|
||||
.scl_pin = AT91_PIN_PC8,
|
||||
.scl_is_open_drain = 1,
|
||||
.udelay = 2, /* ~100 kHz */
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_twi_device {
|
||||
.name = "i2c-gpio",
|
||||
.id = -1,
|
||||
.dev.platform_data = &pdata,
|
||||
};
|
||||
|
||||
void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices)
|
||||
{
|
||||
at91_set_GPIO_periph(AT91_PIN_PC7, 1); /* TWD (SDA) */
|
||||
at91_set_multi_drive(AT91_PIN_PC7, 1);
|
||||
|
||||
at91_set_GPIO_periph(AT91_PIN_PA8, 1); /* TWCK (SCL) */
|
||||
at91_set_multi_drive(AT91_PIN_PC8, 1);
|
||||
|
||||
i2c_register_board_info(0, devices, nr_devices);
|
||||
platform_device_register(&at572d940hf_twi_device);
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE)
|
||||
|
||||
static struct resource twi0_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_TWI0,
|
||||
.end = AT572D940HF_BASE_TWI0 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_TWI0,
|
||||
.end = AT572D940HF_ID_TWI0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_twi0_device = {
|
||||
.name = "at91_i2c",
|
||||
.id = 0,
|
||||
.resource = twi0_resources,
|
||||
.num_resources = ARRAY_SIZE(twi0_resources),
|
||||
};
|
||||
|
||||
static struct resource twi1_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_TWI1,
|
||||
.end = AT572D940HF_BASE_TWI1 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_TWI1,
|
||||
.end = AT572D940HF_ID_TWI1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_twi1_device = {
|
||||
.name = "at91_i2c",
|
||||
.id = 1,
|
||||
.resource = twi1_resources,
|
||||
.num_resources = ARRAY_SIZE(twi1_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices)
|
||||
{
|
||||
/* pins used for TWI0 interface */
|
||||
at91_set_A_periph(AT91_PIN_PC7, 0); /* TWD */
|
||||
at91_set_multi_drive(AT91_PIN_PC7, 1);
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PC8, 0); /* TWCK */
|
||||
at91_set_multi_drive(AT91_PIN_PC8, 1);
|
||||
|
||||
/* pins used for TWI1 interface */
|
||||
at91_set_A_periph(AT91_PIN_PC20, 0); /* TWD */
|
||||
at91_set_multi_drive(AT91_PIN_PC20, 1);
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PC21, 0); /* TWCK */
|
||||
at91_set_multi_drive(AT91_PIN_PC21, 1);
|
||||
|
||||
i2c_register_board_info(0, devices, nr_devices);
|
||||
platform_device_register(&at572d940hf_twi0_device);
|
||||
platform_device_register(&at572d940hf_twi1_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* SPI
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
|
||||
static u64 spi_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct resource spi0_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_SPI0,
|
||||
.end = AT572D940HF_BASE_SPI0 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_SPI0,
|
||||
.end = AT572D940HF_ID_SPI0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_spi0_device = {
|
||||
.name = "atmel_spi",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &spi_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
.resource = spi0_resources,
|
||||
.num_resources = ARRAY_SIZE(spi0_resources),
|
||||
};
|
||||
|
||||
static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 };
|
||||
|
||||
static struct resource spi1_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_SPI1,
|
||||
.end = AT572D940HF_BASE_SPI1 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_SPI1,
|
||||
.end = AT572D940HF_ID_SPI1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_spi1_device = {
|
||||
.name = "atmel_spi",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.dma_mask = &spi_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
.resource = spi1_resources,
|
||||
.num_resources = ARRAY_SIZE(spi1_resources),
|
||||
};
|
||||
|
||||
static const unsigned spi1_standard_cs[4] = { AT91_PIN_PC3, AT91_PIN_PC4, AT91_PIN_PC5, AT91_PIN_PC6 };
|
||||
|
||||
void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
{
|
||||
int i;
|
||||
unsigned long cs_pin;
|
||||
short enable_spi0 = 0;
|
||||
short enable_spi1 = 0;
|
||||
|
||||
/* Choose SPI chip-selects */
|
||||
for (i = 0; i < nr_devices; i++) {
|
||||
if (devices[i].controller_data)
|
||||
cs_pin = (unsigned long) devices[i].controller_data;
|
||||
else if (devices[i].bus_num == 0)
|
||||
cs_pin = spi0_standard_cs[devices[i].chip_select];
|
||||
else
|
||||
cs_pin = spi1_standard_cs[devices[i].chip_select];
|
||||
|
||||
if (devices[i].bus_num == 0)
|
||||
enable_spi0 = 1;
|
||||
else
|
||||
enable_spi1 = 1;
|
||||
|
||||
/* enable chip-select pin */
|
||||
at91_set_gpio_output(cs_pin, 1);
|
||||
|
||||
/* pass chip-select pin to driver */
|
||||
devices[i].controller_data = (void *) cs_pin;
|
||||
}
|
||||
|
||||
spi_register_board_info(devices, nr_devices);
|
||||
|
||||
/* Configure SPI bus(es) */
|
||||
if (enable_spi0) {
|
||||
at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */
|
||||
at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */
|
||||
|
||||
at91_clock_associate("spi0_clk", &at572d940hf_spi0_device.dev, "spi_clk");
|
||||
platform_device_register(&at572d940hf_spi0_device);
|
||||
}
|
||||
if (enable_spi1) {
|
||||
at91_set_A_periph(AT91_PIN_PC0, 0); /* SPI1_MISO */
|
||||
at91_set_A_periph(AT91_PIN_PC1, 0); /* SPI1_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PC2, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi1_clk", &at572d940hf_spi1_device.dev, "spi_clk");
|
||||
platform_device_register(&at572d940hf_spi1_device);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Timer/Counter blocks
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#ifdef CONFIG_ATMEL_TCLIB
|
||||
|
||||
static struct resource tcb_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_TCB,
|
||||
.end = AT572D940HF_BASE_TCB + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_TC0,
|
||||
.end = AT572D940HF_ID_TC0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
.start = AT572D940HF_ID_TC1,
|
||||
.end = AT572D940HF_ID_TC1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[3] = {
|
||||
.start = AT572D940HF_ID_TC2,
|
||||
.end = AT572D940HF_ID_TC2,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_tcb_device = {
|
||||
.name = "atmel_tcb",
|
||||
.id = 0,
|
||||
.resource = tcb_resources,
|
||||
.num_resources = ARRAY_SIZE(tcb_resources),
|
||||
};
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has a separate clock and irq for each TC channel */
|
||||
at91_clock_associate("tc0_clk", &at572d940hf_tcb_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc1_clk", &at572d940hf_tcb_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc2_clk", &at572d940hf_tcb_device.dev, "t2_clk");
|
||||
platform_device_register(&at572d940hf_tcb_device);
|
||||
}
|
||||
#else
|
||||
static void __init at91_add_device_tc(void) { }
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* RTT
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
static struct resource rtt_resources[] = {
|
||||
{
|
||||
.start = AT91_BASE_SYS + AT91_RTT,
|
||||
.end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device at572d940hf_rtt_device = {
|
||||
.name = "at91_rtt",
|
||||
.id = 0,
|
||||
.resource = rtt_resources,
|
||||
.num_resources = ARRAY_SIZE(rtt_resources),
|
||||
};
|
||||
|
||||
static void __init at91_add_device_rtt(void)
|
||||
{
|
||||
platform_device_register(&at572d940hf_rtt_device);
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Watchdog
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
|
||||
static struct platform_device at572d940hf_wdt_device = {
|
||||
.name = "at91_wdt",
|
||||
.id = -1,
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static void __init at91_add_device_watchdog(void)
|
||||
{
|
||||
platform_device_register(&at572d940hf_wdt_device);
|
||||
}
|
||||
#else
|
||||
static void __init at91_add_device_watchdog(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* UART
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_SERIAL_ATMEL)
|
||||
static struct resource dbgu_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91_VA_BASE_SYS + AT91_DBGU,
|
||||
.end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT91_ID_SYS,
|
||||
.end = AT91_ID_SYS,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct atmel_uart_data dbgu_data = {
|
||||
.use_dma_tx = 0,
|
||||
.use_dma_rx = 0, /* DBGU not capable of receive DMA */
|
||||
.regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
|
||||
};
|
||||
|
||||
static u64 dbgu_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device at572d940hf_dbgu_device = {
|
||||
.name = "atmel_usart",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &dbgu_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &dbgu_data,
|
||||
},
|
||||
.resource = dbgu_resources,
|
||||
.num_resources = ARRAY_SIZE(dbgu_resources),
|
||||
};
|
||||
|
||||
static inline void configure_dbgu_pins(void)
|
||||
{
|
||||
at91_set_A_periph(AT91_PIN_PC31, 1); /* DTXD */
|
||||
at91_set_A_periph(AT91_PIN_PC30, 0); /* DRXD */
|
||||
}
|
||||
|
||||
static struct resource uart0_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_US0,
|
||||
.end = AT572D940HF_BASE_US0 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_US0,
|
||||
.end = AT572D940HF_ID_US0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct atmel_uart_data uart0_data = {
|
||||
.use_dma_tx = 1,
|
||||
.use_dma_rx = 1,
|
||||
};
|
||||
|
||||
static u64 uart0_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device at572d940hf_uart0_device = {
|
||||
.name = "atmel_usart",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.dma_mask = &uart0_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &uart0_data,
|
||||
},
|
||||
.resource = uart0_resources,
|
||||
.num_resources = ARRAY_SIZE(uart0_resources),
|
||||
};
|
||||
|
||||
static inline void configure_usart0_pins(unsigned pins)
|
||||
{
|
||||
at91_set_A_periph(AT91_PIN_PA8, 1); /* TXD0 */
|
||||
at91_set_A_periph(AT91_PIN_PA7, 0); /* RXD0 */
|
||||
|
||||
if (pins & ATMEL_UART_RTS)
|
||||
at91_set_A_periph(AT91_PIN_PA10, 0); /* RTS0 */
|
||||
if (pins & ATMEL_UART_CTS)
|
||||
at91_set_A_periph(AT91_PIN_PA9, 0); /* CTS0 */
|
||||
}
|
||||
|
||||
static struct resource uart1_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_US1,
|
||||
.end = AT572D940HF_BASE_US1 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_US1,
|
||||
.end = AT572D940HF_ID_US1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct atmel_uart_data uart1_data = {
|
||||
.use_dma_tx = 1,
|
||||
.use_dma_rx = 1,
|
||||
};
|
||||
|
||||
static u64 uart1_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device at572d940hf_uart1_device = {
|
||||
.name = "atmel_usart",
|
||||
.id = 2,
|
||||
.dev = {
|
||||
.dma_mask = &uart1_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &uart1_data,
|
||||
},
|
||||
.resource = uart1_resources,
|
||||
.num_resources = ARRAY_SIZE(uart1_resources),
|
||||
};
|
||||
|
||||
static inline void configure_usart1_pins(unsigned pins)
|
||||
{
|
||||
at91_set_A_periph(AT91_PIN_PC10, 1); /* TXD1 */
|
||||
at91_set_A_periph(AT91_PIN_PC9 , 0); /* RXD1 */
|
||||
|
||||
if (pins & ATMEL_UART_RTS)
|
||||
at91_set_A_periph(AT91_PIN_PC12, 0); /* RTS1 */
|
||||
if (pins & ATMEL_UART_CTS)
|
||||
at91_set_A_periph(AT91_PIN_PC11, 0); /* CTS1 */
|
||||
}
|
||||
|
||||
static struct resource uart2_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_BASE_US2,
|
||||
.end = AT572D940HF_BASE_US2 + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AT572D940HF_ID_US2,
|
||||
.end = AT572D940HF_ID_US2,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct atmel_uart_data uart2_data = {
|
||||
.use_dma_tx = 1,
|
||||
.use_dma_rx = 1,
|
||||
};
|
||||
|
||||
static u64 uart2_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device at572d940hf_uart2_device = {
|
||||
.name = "atmel_usart",
|
||||
.id = 3,
|
||||
.dev = {
|
||||
.dma_mask = &uart2_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &uart2_data,
|
||||
},
|
||||
.resource = uart2_resources,
|
||||
.num_resources = ARRAY_SIZE(uart2_resources),
|
||||
};
|
||||
|
||||
static inline void configure_usart2_pins(unsigned pins)
|
||||
{
|
||||
at91_set_A_periph(AT91_PIN_PC15, 1); /* TXD2 */
|
||||
at91_set_A_periph(AT91_PIN_PC14, 0); /* RXD2 */
|
||||
|
||||
if (pins & ATMEL_UART_RTS)
|
||||
at91_set_A_periph(AT91_PIN_PC17, 0); /* RTS2 */
|
||||
if (pins & ATMEL_UART_CTS)
|
||||
at91_set_A_periph(AT91_PIN_PC16, 0); /* CTS2 */
|
||||
}
|
||||
|
||||
static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
|
||||
struct platform_device *atmel_default_console_device; /* the serial console device */
|
||||
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at572d940hf_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT572D940HF_ID_US0:
|
||||
pdev = &at572d940hf_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT572D940HF_ID_US1:
|
||||
pdev = &at572d940hf_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT572D940HF_ID_US2:
|
||||
pdev = &at572d940hf_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
}
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ATMEL_MAX_UART; i++) {
|
||||
if (at91_uarts[i])
|
||||
platform_device_register(at91_uarts[i]);
|
||||
}
|
||||
|
||||
if (!atmel_default_console_device)
|
||||
printk(KERN_INFO "AT91: No default serial console defined.\n");
|
||||
}
|
||||
|
||||
#else
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
|
||||
void __init at91_set_serial_console(unsigned portnr) {}
|
||||
void __init at91_add_device_serial(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* mAgic
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#ifdef CONFIG_MAGICV
|
||||
static struct resource mAgic_resources[] = {
|
||||
{
|
||||
.start = AT91_MAGIC_PM_BASE,
|
||||
.end = AT91_MAGIC_PM_BASE + AT91_MAGIC_PM_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = AT91_MAGIC_DM_I_BASE,
|
||||
.end = AT91_MAGIC_DM_I_BASE + AT91_MAGIC_DM_I_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = AT91_MAGIC_DM_F_BASE,
|
||||
.end = AT91_MAGIC_DM_F_BASE + AT91_MAGIC_DM_F_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = AT91_MAGIC_DM_DB_BASE,
|
||||
.end = AT91_MAGIC_DM_DB_BASE + AT91_MAGIC_DM_DB_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = AT91_MAGIC_REGS_BASE,
|
||||
.end = AT91_MAGIC_REGS_BASE + AT91_MAGIC_REGS_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = AT91_MAGIC_EXTPAGE_BASE,
|
||||
.end = AT91_MAGIC_EXTPAGE_BASE + AT91_MAGIC_EXTPAGE_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = AT572D940HF_ID_MSIRQ0,
|
||||
.end = AT572D940HF_ID_MSIRQ0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = AT572D940HF_ID_MHALT,
|
||||
.end = AT572D940HF_ID_MHALT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = AT572D940HF_ID_MEXC,
|
||||
.end = AT572D940HF_ID_MEXC,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = AT572D940HF_ID_MEDMA,
|
||||
.end = AT572D940HF_ID_MEDMA,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device mAgic_device = {
|
||||
.name = "mAgic",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(mAgic_resources),
|
||||
.resource = mAgic_resources,
|
||||
};
|
||||
|
||||
void __init at91_add_device_mAgic(void)
|
||||
{
|
||||
platform_device_register(&mAgic_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_mAgic(void) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* These devices are always present and don't need any board-specific
|
||||
* setup.
|
||||
*/
|
||||
static int __init at91_add_standard_devices(void)
|
||||
{
|
||||
at91_add_device_rtt();
|
||||
at91_add_device_watchdog();
|
||||
at91_add_device_tc();
|
||||
return 0;
|
||||
}
|
||||
|
||||
arch_initcall(at91_add_standard_devices);
|
@ -222,6 +222,25 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
// irq0 .. irq1
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
|
||||
CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk),
|
||||
CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
* The four programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
@ -258,12 +277,29 @@ static void __init at91cap9_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
clk_register(&pck2);
|
||||
clk_register(&pck3);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91cap9_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -303,11 +339,14 @@ static void at91cap9_poweroff(void)
|
||||
* AT91CAP9 processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at91cap9_initialize(unsigned long main_clock)
|
||||
void __init at91cap9_map_io(void)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc));
|
||||
}
|
||||
|
||||
void __init at91cap9_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91cap9_reset;
|
||||
pm_power_off = at91cap9_poweroff;
|
||||
at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
|
||||
|
@ -181,10 +181,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
|
||||
|
||||
/* Pullup pin is handled internally by USB device peripheral */
|
||||
|
||||
/* Clocks */
|
||||
at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk");
|
||||
at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk");
|
||||
|
||||
platform_device_register(&at91_usba_udc_device);
|
||||
}
|
||||
#else
|
||||
@ -355,7 +351,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
||||
}
|
||||
|
||||
mmc0_data = *data;
|
||||
at91_clock_associate("mci0_clk", &at91cap9_mmc0_device.dev, "mci_clk");
|
||||
platform_device_register(&at91cap9_mmc0_device);
|
||||
} else { /* MCI1 */
|
||||
/* CLK */
|
||||
@ -373,7 +368,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
||||
}
|
||||
|
||||
mmc1_data = *data;
|
||||
at91_clock_associate("mci1_clk", &at91cap9_mmc1_device.dev, "mci_clk");
|
||||
platform_device_register(&at91cap9_mmc1_device);
|
||||
}
|
||||
}
|
||||
@ -614,7 +608,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
|
||||
at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */
|
||||
|
||||
at91_clock_associate("spi0_clk", &at91cap9_spi0_device.dev, "spi_clk");
|
||||
platform_device_register(&at91cap9_spi0_device);
|
||||
}
|
||||
if (enable_spi1) {
|
||||
@ -622,7 +615,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi1_clk", &at91cap9_spi1_device.dev, "spi_clk");
|
||||
platform_device_register(&at91cap9_spi1_device);
|
||||
}
|
||||
}
|
||||
@ -659,8 +651,6 @@ static struct platform_device at91cap9_tcb_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has one clock and irq for all three TC channels */
|
||||
at91_clock_associate("tcb_clk", &at91cap9_tcb_device.dev, "t0_clk");
|
||||
platform_device_register(&at91cap9_tcb_device);
|
||||
}
|
||||
#else
|
||||
@ -1001,12 +991,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91CAP9_ID_SSC0:
|
||||
pdev = &at91cap9_ssc0_device;
|
||||
configure_ssc0_pins(pins);
|
||||
at91_clock_associate("ssc0_clk", &pdev->dev, "ssc");
|
||||
break;
|
||||
case AT91CAP9_ID_SSC1:
|
||||
pdev = &at91cap9_ssc1_device;
|
||||
configure_ssc1_pins(pins);
|
||||
at91_clock_associate("ssc1_clk", &pdev->dev, "ssc");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1199,32 +1187,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91cap9_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91CAP9_ID_US0:
|
||||
pdev = &at91cap9_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91CAP9_ID_US1:
|
||||
pdev = &at91cap9_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91CAP9_ID_US2:
|
||||
pdev = &at91cap9_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1232,8 +1218,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91cap9_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <mach/at91rm9200.h>
|
||||
#include <mach/at91_pmc.h>
|
||||
#include <mach/at91_st.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
@ -191,6 +192,26 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
// irq0 .. irq6
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
|
||||
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
|
||||
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk),
|
||||
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
|
||||
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
|
||||
CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk),
|
||||
CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk),
|
||||
CLKDEV_CON_DEV_ID("ssc", "ssc.2", &ssc2_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
* The four programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
@ -227,12 +248,29 @@ static void __init at91rm9200_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
clk_register(&pck2);
|
||||
clk_register(&pck3);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91rm9200_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -266,15 +304,25 @@ static void at91rm9200_reset(void)
|
||||
at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
|
||||
}
|
||||
|
||||
int rm9200_type;
|
||||
EXPORT_SYMBOL(rm9200_type);
|
||||
|
||||
void __init at91rm9200_set_type(int type)
|
||||
{
|
||||
rm9200_type = type;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* AT91RM9200 processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks)
|
||||
void __init at91rm9200_map_io(void)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
|
||||
}
|
||||
|
||||
void __init at91rm9200_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91rm9200_reset;
|
||||
at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
|
||||
| (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
|
||||
@ -288,7 +336,8 @@ void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks
|
||||
at91rm9200_register_clocks();
|
||||
|
||||
/* Initialize GPIO subsystem */
|
||||
at91_gpio_init(at91rm9200_gpio, banks);
|
||||
at91_gpio_init(at91rm9200_gpio,
|
||||
cpu_is_at91rm9200_bga() ? AT91RM9200_BGA : AT91RM9200_PQFP);
|
||||
}
|
||||
|
||||
|
||||
|
@ -644,15 +644,7 @@ static struct platform_device at91rm9200_tcb1_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has a separate clock and irq for each TC channel */
|
||||
at91_clock_associate("tc0_clk", &at91rm9200_tcb0_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc1_clk", &at91rm9200_tcb0_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc2_clk", &at91rm9200_tcb0_device.dev, "t2_clk");
|
||||
platform_device_register(&at91rm9200_tcb0_device);
|
||||
|
||||
at91_clock_associate("tc3_clk", &at91rm9200_tcb1_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc4_clk", &at91rm9200_tcb1_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc5_clk", &at91rm9200_tcb1_device.dev, "t2_clk");
|
||||
platform_device_register(&at91rm9200_tcb1_device);
|
||||
}
|
||||
#else
|
||||
@ -849,17 +841,14 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91RM9200_ID_SSC0:
|
||||
pdev = &at91rm9200_ssc0_device;
|
||||
configure_ssc0_pins(pins);
|
||||
at91_clock_associate("ssc0_clk", &pdev->dev, "ssc");
|
||||
break;
|
||||
case AT91RM9200_ID_SSC1:
|
||||
pdev = &at91rm9200_ssc1_device;
|
||||
configure_ssc1_pins(pins);
|
||||
at91_clock_associate("ssc1_clk", &pdev->dev, "ssc");
|
||||
break;
|
||||
case AT91RM9200_ID_SSC2:
|
||||
pdev = &at91rm9200_ssc2_device;
|
||||
configure_ssc2_pins(pins);
|
||||
at91_clock_associate("ssc2_clk", &pdev->dev, "ssc");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1109,37 +1098,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91rm9200_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91RM9200_ID_US0:
|
||||
pdev = &at91rm9200_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91RM9200_ID_US1:
|
||||
pdev = &at91rm9200_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91RM9200_ID_US2:
|
||||
pdev = &at91rm9200_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91RM9200_ID_US3:
|
||||
pdev = &at91rm9200_uart3_device;
|
||||
configure_usart3_pins(pins);
|
||||
at91_clock_associate("usart3_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1147,8 +1133,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91rm9200_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -231,6 +231,28 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
// irq0 .. irq2
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
|
||||
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
|
||||
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
|
||||
CLKDEV_CON_DEV_ID("t3_clk", "atmel_tcb.1", &tc3_clk),
|
||||
CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk),
|
||||
CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.5", &usart4_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.6", &usart5_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
* The two programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
@ -255,10 +277,27 @@ static void __init at91sam9260_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91sam9260_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -289,7 +328,7 @@ static void at91sam9260_poweroff(void)
|
||||
* AT91SAM9260 processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
static void __init at91sam9xe_initialize(void)
|
||||
static void __init at91sam9xe_map_io(void)
|
||||
{
|
||||
unsigned long cidr, sram_size;
|
||||
|
||||
@ -310,18 +349,21 @@ static void __init at91sam9xe_initialize(void)
|
||||
iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc));
|
||||
}
|
||||
|
||||
void __init at91sam9260_initialize(unsigned long main_clock)
|
||||
void __init at91sam9260_map_io(void)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc));
|
||||
|
||||
if (cpu_is_at91sam9xe())
|
||||
at91sam9xe_initialize();
|
||||
at91sam9xe_map_io();
|
||||
else if (cpu_is_at91sam9g20())
|
||||
iotable_init(at91sam9g20_sram_desc, ARRAY_SIZE(at91sam9g20_sram_desc));
|
||||
else
|
||||
iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc));
|
||||
}
|
||||
|
||||
void __init at91sam9260_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91sam9_alt_reset;
|
||||
pm_power_off = at91sam9260_poweroff;
|
||||
at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
|
||||
|
@ -609,7 +609,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi0_clk", &at91sam9260_spi0_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9260_spi0_device);
|
||||
}
|
||||
if (enable_spi1) {
|
||||
@ -617,7 +616,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi1_clk", &at91sam9260_spi1_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9260_spi1_device);
|
||||
}
|
||||
}
|
||||
@ -694,15 +692,7 @@ static struct platform_device at91sam9260_tcb1_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has a separate clock and irq for each TC channel */
|
||||
at91_clock_associate("tc0_clk", &at91sam9260_tcb0_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc1_clk", &at91sam9260_tcb0_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc2_clk", &at91sam9260_tcb0_device.dev, "t2_clk");
|
||||
platform_device_register(&at91sam9260_tcb0_device);
|
||||
|
||||
at91_clock_associate("tc3_clk", &at91sam9260_tcb1_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc4_clk", &at91sam9260_tcb1_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc5_clk", &at91sam9260_tcb1_device.dev, "t2_clk");
|
||||
platform_device_register(&at91sam9260_tcb1_device);
|
||||
}
|
||||
#else
|
||||
@ -820,7 +810,6 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91SAM9260_ID_SSC:
|
||||
pdev = &at91sam9260_ssc_device;
|
||||
configure_ssc_pins(pins);
|
||||
at91_clock_associate("ssc_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1139,47 +1128,42 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91sam9260_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9260_ID_US0:
|
||||
pdev = &at91sam9260_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9260_ID_US1:
|
||||
pdev = &at91sam9260_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9260_ID_US2:
|
||||
pdev = &at91sam9260_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9260_ID_US3:
|
||||
pdev = &at91sam9260_uart3_device;
|
||||
configure_usart3_pins(pins);
|
||||
at91_clock_associate("usart3_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9260_ID_US4:
|
||||
pdev = &at91sam9260_uart4_device;
|
||||
configure_usart4_pins();
|
||||
at91_clock_associate("usart4_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9260_ID_US5:
|
||||
pdev = &at91sam9260_uart5_device;
|
||||
configure_usart5_pins();
|
||||
at91_clock_associate("usart5_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1187,8 +1171,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91sam9260_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -178,6 +178,24 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
// irq0 .. irq2
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
|
||||
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
|
||||
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
* The four programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
@ -228,6 +246,11 @@ static void __init at91sam9261_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
clk_register(&pck2);
|
||||
@ -237,6 +260,18 @@ static void __init at91sam9261_register_clocks(void)
|
||||
clk_register(&hck1);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91sam9261_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -267,7 +302,7 @@ static void at91sam9261_poweroff(void)
|
||||
* AT91SAM9261 processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at91sam9261_initialize(unsigned long main_clock)
|
||||
void __init at91sam9261_map_io(void)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
|
||||
@ -276,8 +311,10 @@ void __init at91sam9261_initialize(unsigned long main_clock)
|
||||
iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc));
|
||||
else
|
||||
iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
|
||||
}
|
||||
|
||||
|
||||
void __init at91sam9261_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91sam9_alt_reset;
|
||||
pm_power_off = at91sam9261_poweroff;
|
||||
at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
|
||||
|
@ -426,7 +426,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */
|
||||
|
||||
at91_clock_associate("spi0_clk", &at91sam9261_spi0_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9261_spi0_device);
|
||||
}
|
||||
if (enable_spi1) {
|
||||
@ -434,7 +433,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi1_clk", &at91sam9261_spi1_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9261_spi1_device);
|
||||
}
|
||||
}
|
||||
@ -581,10 +579,6 @@ static struct platform_device at91sam9261_tcb_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has a separate clock and irq for each TC channel */
|
||||
at91_clock_associate("tc0_clk", &at91sam9261_tcb_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc1_clk", &at91sam9261_tcb_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc2_clk", &at91sam9261_tcb_device.dev, "t2_clk");
|
||||
platform_device_register(&at91sam9261_tcb_device);
|
||||
}
|
||||
#else
|
||||
@ -786,17 +780,14 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91SAM9261_ID_SSC0:
|
||||
pdev = &at91sam9261_ssc0_device;
|
||||
configure_ssc0_pins(pins);
|
||||
at91_clock_associate("ssc0_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
case AT91SAM9261_ID_SSC1:
|
||||
pdev = &at91sam9261_ssc1_device;
|
||||
configure_ssc1_pins(pins);
|
||||
at91_clock_associate("ssc1_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
case AT91SAM9261_ID_SSC2:
|
||||
pdev = &at91sam9261_ssc2_device;
|
||||
configure_ssc2_pins(pins);
|
||||
at91_clock_associate("ssc2_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -989,32 +980,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91sam9261_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9261_ID_US0:
|
||||
pdev = &at91sam9261_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9261_ID_US1:
|
||||
pdev = &at91sam9261_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9261_ID_US2:
|
||||
pdev = &at91sam9261_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1022,8 +1011,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91sam9261_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -199,6 +199,23 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
// irq0 .. irq1
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
* The four programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
@ -235,12 +252,29 @@ static void __init at91sam9263_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
clk_register(&pck2);
|
||||
clk_register(&pck3);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91sam9263_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -279,11 +313,14 @@ static void at91sam9263_poweroff(void)
|
||||
* AT91SAM9263 processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at91sam9263_initialize(unsigned long main_clock)
|
||||
void __init at91sam9263_map_io(void)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc));
|
||||
}
|
||||
|
||||
void __init at91sam9263_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91sam9_alt_reset;
|
||||
pm_power_off = at91sam9263_poweroff;
|
||||
at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
|
||||
|
@ -308,7 +308,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
||||
}
|
||||
|
||||
mmc0_data = *data;
|
||||
at91_clock_associate("mci0_clk", &at91sam9263_mmc0_device.dev, "mci_clk");
|
||||
platform_device_register(&at91sam9263_mmc0_device);
|
||||
} else { /* MCI1 */
|
||||
/* CLK */
|
||||
@ -339,7 +338,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
||||
}
|
||||
|
||||
mmc1_data = *data;
|
||||
at91_clock_associate("mci1_clk", &at91sam9263_mmc1_device.dev, "mci_clk");
|
||||
platform_device_register(&at91sam9263_mmc1_device);
|
||||
}
|
||||
}
|
||||
@ -686,7 +684,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */
|
||||
at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */
|
||||
|
||||
at91_clock_associate("spi0_clk", &at91sam9263_spi0_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9263_spi0_device);
|
||||
}
|
||||
if (enable_spi1) {
|
||||
@ -694,7 +691,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi1_clk", &at91sam9263_spi1_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9263_spi1_device);
|
||||
}
|
||||
}
|
||||
@ -941,8 +937,6 @@ static struct platform_device at91sam9263_tcb_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has one clock and irq for all three TC channels */
|
||||
at91_clock_associate("tcb_clk", &at91sam9263_tcb_device.dev, "t0_clk");
|
||||
platform_device_register(&at91sam9263_tcb_device);
|
||||
}
|
||||
#else
|
||||
@ -1171,12 +1165,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91SAM9263_ID_SSC0:
|
||||
pdev = &at91sam9263_ssc0_device;
|
||||
configure_ssc0_pins(pins);
|
||||
at91_clock_associate("ssc0_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
case AT91SAM9263_ID_SSC1:
|
||||
pdev = &at91sam9263_ssc1_device;
|
||||
configure_ssc1_pins(pins);
|
||||
at91_clock_associate("ssc1_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1370,32 +1362,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91sam9263_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9263_ID_US0:
|
||||
pdev = &at91sam9263_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9263_ID_US1:
|
||||
pdev = &at91sam9263_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9263_ID_US2:
|
||||
pdev = &at91sam9263_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1403,8 +1393,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91sam9263_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -184,22 +184,6 @@ static struct clk vdec_clk = {
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
};
|
||||
|
||||
/* One additional fake clock for ohci */
|
||||
static struct clk ohci_clk = {
|
||||
.name = "ohci_clk",
|
||||
.pmc_mask = 0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
.parent = &uhphs_clk,
|
||||
};
|
||||
|
||||
/* One additional fake clock for second TC block */
|
||||
static struct clk tcb1_clk = {
|
||||
.name = "tcb1_clk",
|
||||
.pmc_mask = 0,
|
||||
.type = CLK_TYPE_PERIPHERAL,
|
||||
.parent = &tcb0_clk,
|
||||
};
|
||||
|
||||
static struct clk *periph_clocks[] __initdata = {
|
||||
&pioA_clk,
|
||||
&pioB_clk,
|
||||
@ -228,8 +212,30 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
&udphs_clk,
|
||||
&mmc1_clk,
|
||||
// irq0
|
||||
&ohci_clk,
|
||||
&tcb1_clk,
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
/* One additional fake clock for ohci */
|
||||
CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
|
||||
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci.0", &uhphs_clk),
|
||||
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb0_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
@ -256,6 +262,11 @@ static void __init at91sam9g45_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11())
|
||||
clk_register(&vdec_clk);
|
||||
|
||||
@ -263,6 +274,18 @@ static void __init at91sam9g45_register_clocks(void)
|
||||
clk_register(&pck1);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91sam9g45_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -306,11 +329,14 @@ static void at91sam9g45_poweroff(void)
|
||||
* AT91SAM9G45 processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at91sam9g45_initialize(unsigned long main_clock)
|
||||
void __init at91sam9g45_map_io(void)
|
||||
{
|
||||
/* Map peripherals */
|
||||
iotable_init(at91sam9g45_io_desc, ARRAY_SIZE(at91sam9g45_io_desc));
|
||||
}
|
||||
|
||||
void __init at91sam9g45_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91sam9g45_reset;
|
||||
pm_power_off = at91sam9g45_poweroff;
|
||||
at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
|
||||
|
@ -180,7 +180,6 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
|
||||
}
|
||||
|
||||
usbh_ehci_data = *data;
|
||||
at91_clock_associate("uhphs_clk", &at91_usbh_ehci_device.dev, "ehci_clk");
|
||||
platform_device_register(&at91_usbh_ehci_device);
|
||||
}
|
||||
#else
|
||||
@ -266,10 +265,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
|
||||
|
||||
/* Pullup pin is handled internally by USB device peripheral */
|
||||
|
||||
/* Clocks */
|
||||
at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk");
|
||||
at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk");
|
||||
|
||||
platform_device_register(&at91_usba_udc_device);
|
||||
}
|
||||
#else
|
||||
@ -478,7 +473,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
|
||||
}
|
||||
|
||||
mmc0_data = *data;
|
||||
at91_clock_associate("mci0_clk", &at91sam9g45_mmc0_device.dev, "mci_clk");
|
||||
platform_device_register(&at91sam9g45_mmc0_device);
|
||||
|
||||
} else { /* MCI1 */
|
||||
@ -504,7 +498,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
|
||||
}
|
||||
|
||||
mmc1_data = *data;
|
||||
at91_clock_associate("mci1_clk", &at91sam9g45_mmc1_device.dev, "mci_clk");
|
||||
platform_device_register(&at91sam9g45_mmc1_device);
|
||||
|
||||
}
|
||||
@ -801,7 +794,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI0_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI0_SPCK */
|
||||
|
||||
at91_clock_associate("spi0_clk", &at91sam9g45_spi0_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9g45_spi0_device);
|
||||
}
|
||||
if (enable_spi1) {
|
||||
@ -809,7 +801,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
at91_set_A_periph(AT91_PIN_PB15, 0); /* SPI1_MOSI */
|
||||
at91_set_A_periph(AT91_PIN_PB16, 0); /* SPI1_SPCK */
|
||||
|
||||
at91_clock_associate("spi1_clk", &at91sam9g45_spi1_device.dev, "spi_clk");
|
||||
platform_device_register(&at91sam9g45_spi1_device);
|
||||
}
|
||||
}
|
||||
@ -999,10 +990,7 @@ static struct platform_device at91sam9g45_tcb1_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has one clock and irq for all six TC channels */
|
||||
at91_clock_associate("tcb0_clk", &at91sam9g45_tcb0_device.dev, "t0_clk");
|
||||
platform_device_register(&at91sam9g45_tcb0_device);
|
||||
at91_clock_associate("tcb1_clk", &at91sam9g45_tcb1_device.dev, "t0_clk");
|
||||
platform_device_register(&at91sam9g45_tcb1_device);
|
||||
}
|
||||
#else
|
||||
@ -1286,12 +1274,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91SAM9G45_ID_SSC0:
|
||||
pdev = &at91sam9g45_ssc0_device;
|
||||
configure_ssc0_pins(pins);
|
||||
at91_clock_associate("ssc0_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
case AT91SAM9G45_ID_SSC1:
|
||||
pdev = &at91sam9g45_ssc1_device;
|
||||
configure_ssc1_pins(pins);
|
||||
at91_clock_associate("ssc1_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1527,37 +1513,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91sam9g45_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9G45_ID_US0:
|
||||
pdev = &at91sam9g45_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9G45_ID_US1:
|
||||
pdev = &at91sam9g45_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9G45_ID_US2:
|
||||
pdev = &at91sam9g45_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9G45_ID_US3:
|
||||
pdev = &at91sam9g45_uart3_device;
|
||||
configure_usart3_pins(pins);
|
||||
at91_clock_associate("usart3_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1565,8 +1548,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91sam9g45_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -190,6 +190,24 @@ static struct clk *periph_clocks[] __initdata = {
|
||||
// irq0
|
||||
};
|
||||
|
||||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk),
|
||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
|
||||
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
|
||||
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
|
||||
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
|
||||
};
|
||||
|
||||
static struct clk_lookup usart_clocks_lookups[] = {
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk),
|
||||
CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk),
|
||||
};
|
||||
|
||||
/*
|
||||
* The two programmable clocks.
|
||||
* You must configure pin multiplexing to bring these signals out.
|
||||
@ -214,10 +232,27 @@ static void __init at91sam9rl_register_clocks(void)
|
||||
for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
|
||||
clk_register(periph_clocks[i]);
|
||||
|
||||
clkdev_add_table(periph_clocks_lookups,
|
||||
ARRAY_SIZE(periph_clocks_lookups));
|
||||
clkdev_add_table(usart_clocks_lookups,
|
||||
ARRAY_SIZE(usart_clocks_lookups));
|
||||
|
||||
clk_register(&pck0);
|
||||
clk_register(&pck1);
|
||||
}
|
||||
|
||||
static struct clk_lookup console_clock_lookup;
|
||||
|
||||
void __init at91sam9rl_set_console_clock(int id)
|
||||
{
|
||||
if (id >= ARRAY_SIZE(usart_clocks_lookups))
|
||||
return;
|
||||
|
||||
console_clock_lookup.con_id = "usart";
|
||||
console_clock_lookup.clk = usart_clocks_lookups[id].clk;
|
||||
clkdev_add(&console_clock_lookup);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* GPIO
|
||||
* -------------------------------------------------------------------- */
|
||||
@ -252,7 +287,7 @@ static void at91sam9rl_poweroff(void)
|
||||
* AT91SAM9RL processor initialization
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
void __init at91sam9rl_initialize(unsigned long main_clock)
|
||||
void __init at91sam9rl_map_io(void)
|
||||
{
|
||||
unsigned long cidr, sram_size;
|
||||
|
||||
@ -275,7 +310,10 @@ void __init at91sam9rl_initialize(unsigned long main_clock)
|
||||
|
||||
/* Map SRAM */
|
||||
iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc));
|
||||
}
|
||||
|
||||
void __init at91sam9rl_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_arch_reset = at91sam9_alt_reset;
|
||||
pm_power_off = at91sam9rl_poweroff;
|
||||
at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
|
||||
|
@ -155,10 +155,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
|
||||
|
||||
/* Pullup pin is handled internally by USB device peripheral */
|
||||
|
||||
/* Clocks */
|
||||
at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk");
|
||||
at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk");
|
||||
|
||||
platform_device_register(&at91_usba_udc_device);
|
||||
}
|
||||
#else
|
||||
@ -605,10 +601,6 @@ static struct platform_device at91sam9rl_tcb_device = {
|
||||
|
||||
static void __init at91_add_device_tc(void)
|
||||
{
|
||||
/* this chip has a separate clock and irq for each TC channel */
|
||||
at91_clock_associate("tc0_clk", &at91sam9rl_tcb_device.dev, "t0_clk");
|
||||
at91_clock_associate("tc1_clk", &at91sam9rl_tcb_device.dev, "t1_clk");
|
||||
at91_clock_associate("tc2_clk", &at91sam9rl_tcb_device.dev, "t2_clk");
|
||||
platform_device_register(&at91sam9rl_tcb_device);
|
||||
}
|
||||
#else
|
||||
@ -892,12 +884,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
|
||||
case AT91SAM9RL_ID_SSC0:
|
||||
pdev = &at91sam9rl_ssc0_device;
|
||||
configure_ssc0_pins(pins);
|
||||
at91_clock_associate("ssc0_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
case AT91SAM9RL_ID_SSC1:
|
||||
pdev = &at91sam9rl_ssc1_device;
|
||||
configure_ssc1_pins(pins);
|
||||
at91_clock_associate("ssc1_clk", &pdev->dev, "pclk");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -1141,37 +1131,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (id) {
|
||||
case 0: /* DBGU */
|
||||
pdev = &at91sam9rl_dbgu_device;
|
||||
configure_dbgu_pins();
|
||||
at91_clock_associate("mck", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9RL_ID_US0:
|
||||
pdev = &at91sam9rl_uart0_device;
|
||||
configure_usart0_pins(pins);
|
||||
at91_clock_associate("usart0_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9RL_ID_US1:
|
||||
pdev = &at91sam9rl_uart1_device;
|
||||
configure_usart1_pins(pins);
|
||||
at91_clock_associate("usart1_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9RL_ID_US2:
|
||||
pdev = &at91sam9rl_uart2_device;
|
||||
configure_usart2_pins(pins);
|
||||
at91_clock_associate("usart2_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
case AT91SAM9RL_ID_US3:
|
||||
pdev = &at91sam9rl_uart3_device;
|
||||
configure_usart3_pins(pins);
|
||||
at91_clock_associate("usart3_clk", &pdev->dev, "usart");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
pdev->id = portnr; /* update to mapped ID */
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr; /* update to mapped ID */
|
||||
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
at91_uarts[portnr] = pdev;
|
||||
@ -1179,8 +1166,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
|
||||
|
||||
void __init at91_set_serial_console(unsigned portnr)
|
||||
{
|
||||
if (portnr < ATMEL_MAX_UART)
|
||||
if (portnr < ATMEL_MAX_UART) {
|
||||
atmel_default_console_device = at91_uarts[portnr];
|
||||
at91sam9rl_set_console_clock(portnr);
|
||||
}
|
||||
}
|
||||
|
||||
void __init at91_add_device_serial(void)
|
||||
|
@ -37,11 +37,6 @@ unsigned long clk_get_rate(struct clk *clk)
|
||||
return AT91X40_MASTER_CLOCK;
|
||||
}
|
||||
|
||||
struct clk *clk_get(struct device *dev, const char *id)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void __init at91x40_initialize(unsigned long main_clock)
|
||||
{
|
||||
at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
|
||||
|
@ -35,14 +35,18 @@
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init onearm_map_io(void)
|
||||
static void __init onearm_init_early(void)
|
||||
{
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
@ -92,9 +96,9 @@ static void __init onearm_board_init(void)
|
||||
|
||||
MACHINE_START(ONEARM, "Ajeco 1ARM single board computer")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = onearm_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = onearm_init_early,
|
||||
.init_irq = onearm_init_irq,
|
||||
.init_machine = onearm_board_init,
|
||||
MACHINE_END
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init afeb9260_map_io(void)
|
||||
static void __init afeb9260_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -218,9 +218,9 @@ static void __init afeb9260_board_init(void)
|
||||
|
||||
MACHINE_START(AFEB9260, "Custom afeb9260 board")
|
||||
/* Maintainer: Sergey Lapin <slapin@ossfans.org> */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = afeb9260_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = afeb9260_init_early,
|
||||
.init_irq = afeb9260_init_irq,
|
||||
.init_machine = afeb9260_board_init,
|
||||
MACHINE_END
|
||||
|
@ -1,326 +0,0 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-at91/board-at572d940hf_ek.c
|
||||
*
|
||||
* Copyright (C) 2008 Atmel Antonio R. Costa <costa.antonior@gmail.com>
|
||||
* Copyright (C) 2005 SAN People
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ds1305.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init eb_map_io(void)
|
||||
{
|
||||
/* Initialize processor: 12.500 MHz crystal */
|
||||
at572d940hf_initialize(12000000);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
|
||||
/* USART0 on ttyS1. (Rx & Tx only) */
|
||||
at91_register_uart(AT572D940HF_ID_US0, 1, 0);
|
||||
|
||||
/* USART1 on ttyS2. (Rx & Tx only) */
|
||||
at91_register_uart(AT572D940HF_ID_US1, 2, 0);
|
||||
|
||||
/* USART2 on ttyS3. (Tx & Rx only */
|
||||
at91_register_uart(AT572D940HF_ID_US2, 3, 0);
|
||||
|
||||
/* set serial console to ttyS0 (ie, DBGU) */
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init eb_init_irq(void)
|
||||
{
|
||||
at572d940hf_init_interrupts(NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* USB Host Port
|
||||
*/
|
||||
static struct at91_usbh_data __initdata eb_usbh_data = {
|
||||
.ports = 2,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* USB Device Port
|
||||
*/
|
||||
static struct at91_udc_data __initdata eb_udc_data = {
|
||||
.vbus_pin = 0, /* no VBUS detection,UDC always on */
|
||||
.pullup_pin = 0, /* pull-up driven by UDC */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* MCI (SD/MMC)
|
||||
*/
|
||||
static struct at91_mmc_data __initdata eb_mmc_data = {
|
||||
.wire4 = 1,
|
||||
/* .det_pin = ... not connected */
|
||||
/* .wp_pin = ... not connected */
|
||||
/* .vcc_pin = ... not connected */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* MACB Ethernet device
|
||||
*/
|
||||
static struct at91_eth_data __initdata eb_eth_data = {
|
||||
.phy_irq_pin = AT91_PIN_PB25,
|
||||
.is_rmii = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
* NOR flash
|
||||
*/
|
||||
|
||||
static struct mtd_partition eb_nor_partitions[] = {
|
||||
{
|
||||
.name = "Raw Environment",
|
||||
.offset = 0,
|
||||
.size = SZ_4M,
|
||||
.mask_flags = 0,
|
||||
},
|
||||
{
|
||||
.name = "OS FS",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = 3 * SZ_1M,
|
||||
.mask_flags = 0,
|
||||
},
|
||||
{
|
||||
.name = "APP FS",
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
.mask_flags = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static void nor_flash_set_vpp(struct map_info* mi, int i) {
|
||||
};
|
||||
|
||||
static struct physmap_flash_data nor_flash_data = {
|
||||
.width = 4,
|
||||
.parts = eb_nor_partitions,
|
||||
.nr_parts = ARRAY_SIZE(eb_nor_partitions),
|
||||
.set_vpp = nor_flash_set_vpp,
|
||||
};
|
||||
|
||||
static struct resource nor_flash_resources[] = {
|
||||
{
|
||||
.start = AT91_CHIPSELECT_0,
|
||||
.end = AT91_CHIPSELECT_0 + SZ_16M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device nor_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &nor_flash_data,
|
||||
},
|
||||
.resource = nor_flash_resources,
|
||||
.num_resources = ARRAY_SIZE(nor_flash_resources),
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata eb_nor_smc_config = {
|
||||
.ncs_read_setup = 1,
|
||||
.nrd_setup = 1,
|
||||
.ncs_write_setup = 1,
|
||||
.nwe_setup = 1,
|
||||
|
||||
.ncs_read_pulse = 7,
|
||||
.nrd_pulse = 7,
|
||||
.ncs_write_pulse = 7,
|
||||
.nwe_pulse = 7,
|
||||
|
||||
.read_cycle = 9,
|
||||
.write_cycle = 9,
|
||||
|
||||
.mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_32,
|
||||
.tdf_cycles = 1,
|
||||
};
|
||||
|
||||
static void __init eb_add_device_nor(void)
|
||||
{
|
||||
/* configure chip-select 0 (NOR) */
|
||||
sam9_smc_configure(0, &eb_nor_smc_config);
|
||||
platform_device_register(&nor_flash);
|
||||
}
|
||||
|
||||
/*
|
||||
* NAND flash
|
||||
*/
|
||||
static struct mtd_partition __initdata eb_nand_partition[] = {
|
||||
{
|
||||
.name = "Partition 1",
|
||||
.offset = 0,
|
||||
.size = SZ_16M,
|
||||
},
|
||||
{
|
||||
.name = "Partition 2",
|
||||
.offset = MTDPART_OFS_NXTBLK,
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
}
|
||||
};
|
||||
|
||||
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
|
||||
{
|
||||
*num_partitions = ARRAY_SIZE(eb_nand_partition);
|
||||
return eb_nand_partition;
|
||||
}
|
||||
|
||||
static struct atmel_nand_data __initdata eb_nand_data = {
|
||||
.ale = 22,
|
||||
.cle = 21,
|
||||
/* .det_pin = ... not connected */
|
||||
/* .rdy_pin = AT91_PIN_PC16, */
|
||||
.enable_pin = AT91_PIN_PA15,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata eb_nand_smc_config = {
|
||||
.ncs_read_setup = 0,
|
||||
.nrd_setup = 0,
|
||||
.ncs_write_setup = 1,
|
||||
.nwe_setup = 1,
|
||||
|
||||
.ncs_read_pulse = 3,
|
||||
.nrd_pulse = 3,
|
||||
.ncs_write_pulse = 3,
|
||||
.nwe_pulse = 3,
|
||||
|
||||
.read_cycle = 5,
|
||||
.write_cycle = 5,
|
||||
|
||||
.mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
|
||||
.tdf_cycles = 12,
|
||||
};
|
||||
|
||||
static void __init eb_add_device_nand(void)
|
||||
{
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (eb_nand_data.bus_width_16)
|
||||
eb_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
else
|
||||
eb_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &eb_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&eb_nand_data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SPI devices
|
||||
*/
|
||||
static struct resource rtc_resources[] = {
|
||||
[0] = {
|
||||
.start = AT572D940HF_ID_IRQ1,
|
||||
.end = AT572D940HF_ID_IRQ1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct ds1305_platform_data ds1306_data = {
|
||||
.is_ds1306 = true,
|
||||
.en_1hz = false,
|
||||
};
|
||||
|
||||
static struct spi_board_info eb_spi_devices[] = {
|
||||
{ /* RTC Dallas DS1306 */
|
||||
.modalias = "rtc-ds1305",
|
||||
.chip_select = 3,
|
||||
.mode = SPI_CS_HIGH | SPI_CPOL | SPI_CPHA,
|
||||
.max_speed_hz = 500000,
|
||||
.bus_num = 0,
|
||||
.irq = AT572D940HF_ID_IRQ1,
|
||||
.platform_data = (void *) &ds1306_data,
|
||||
},
|
||||
#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
|
||||
{ /* Dataflash card */
|
||||
.modalias = "mtd_dataflash",
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 15 * 1000 * 1000,
|
||||
.bus_num = 0,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static void __init eb_board_init(void)
|
||||
{
|
||||
/* Serial */
|
||||
at91_add_device_serial();
|
||||
/* USB Host */
|
||||
at91_add_device_usbh(&eb_usbh_data);
|
||||
/* USB Device */
|
||||
at91_add_device_udc(&eb_udc_data);
|
||||
/* I2C */
|
||||
at91_add_device_i2c(NULL, 0);
|
||||
/* NOR */
|
||||
eb_add_device_nor();
|
||||
/* NAND */
|
||||
eb_add_device_nand();
|
||||
/* SPI */
|
||||
at91_add_device_spi(eb_spi_devices, ARRAY_SIZE(eb_spi_devices));
|
||||
/* MMC */
|
||||
at91_add_device_mmc(0, &eb_mmc_data);
|
||||
/* Ethernet */
|
||||
at91_add_device_eth(&eb_eth_data);
|
||||
/* mAgic */
|
||||
at91_add_device_mAgic();
|
||||
}
|
||||
|
||||
MACHINE_START(AT572D940HFEB, "Atmel AT91D940HF-EB")
|
||||
/* Maintainer: Atmel <costa.antonior@gmail.com> */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = eb_map_io,
|
||||
.init_irq = eb_init_irq,
|
||||
.init_machine = eb_board_init,
|
||||
MACHINE_END
|
@ -45,7 +45,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init cam60_map_io(void)
|
||||
static void __init cam60_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 10 MHz crystal */
|
||||
at91sam9260_initialize(10000000);
|
||||
@ -198,9 +198,9 @@ static void __init cam60_board_init(void)
|
||||
|
||||
MACHINE_START(CAM60, "KwikByte CAM60")
|
||||
/* Maintainer: KwikByte */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = cam60_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = cam60_init_early,
|
||||
.init_irq = cam60_init_irq,
|
||||
.init_machine = cam60_board_init,
|
||||
MACHINE_END
|
||||
|
@ -44,12 +44,13 @@
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91cap9_matrix.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/system_rev.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init cap9adk_map_io(void)
|
||||
static void __init cap9adk_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 12 MHz crystal */
|
||||
at91cap9_initialize(12000000);
|
||||
@ -187,11 +188,6 @@ static struct atmel_nand_data __initdata cap9adk_nand_data = {
|
||||
// .rdy_pin = ... not connected
|
||||
.enable_pin = AT91_PIN_PD15,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata cap9adk_nand_smc_config = {
|
||||
@ -219,6 +215,7 @@ static void __init cap9adk_add_device_nand(void)
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V);
|
||||
|
||||
cap9adk_nand_data.bus_width_16 = !board_have_nand_8bit();
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (cap9adk_nand_data.bus_width_16)
|
||||
cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
@ -399,9 +396,9 @@ static void __init cap9adk_board_init(void)
|
||||
|
||||
MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK")
|
||||
/* Maintainer: Stelian Pop <stelian.pop@leadtechdesign.com> */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = cap9adk_map_io,
|
||||
.map_io = at91cap9_map_io,
|
||||
.init_early = cap9adk_init_early,
|
||||
.init_irq = cap9adk_init_irq,
|
||||
.init_machine = cap9adk_board_init,
|
||||
MACHINE_END
|
||||
|
@ -40,10 +40,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init carmeva_map_io(void)
|
||||
static void __init carmeva_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 20.000 MHz crystal */
|
||||
at91rm9200_initialize(20000000, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(20000000);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
@ -162,9 +162,9 @@ static void __init carmeva_board_init(void)
|
||||
|
||||
MACHINE_START(CARMEVA, "Carmeva")
|
||||
/* Maintainer: Conitec Datasystems */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = carmeva_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = carmeva_init_early,
|
||||
.init_irq = carmeva_init_irq,
|
||||
.init_machine = carmeva_board_init,
|
||||
MACHINE_END
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
static void __init cpu9krea_map_io(void)
|
||||
static void __init cpu9krea_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -375,9 +375,9 @@ MACHINE_START(CPUAT9260, "Eukrea CPU9260")
|
||||
MACHINE_START(CPUAT9G20, "Eukrea CPU9G20")
|
||||
#endif
|
||||
/* Maintainer: Eric Benard - EUKREA Electromatique */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = cpu9krea_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = cpu9krea_init_early,
|
||||
.init_irq = cpu9krea_init_irq,
|
||||
.init_machine = cpu9krea_board_init,
|
||||
MACHINE_END
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91rm9200_mc.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
@ -50,10 +51,13 @@ static struct gpio_led cpuat91_leds[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cpuat91_map_io(void)
|
||||
static void __init cpuat91_init_early(void)
|
||||
{
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
@ -175,9 +179,9 @@ static void __init cpuat91_board_init(void)
|
||||
|
||||
MACHINE_START(CPUAT91, "Eukrea")
|
||||
/* Maintainer: Eric Benard - EUKREA Electromatique */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = cpuat91_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = cpuat91_init_early,
|
||||
.init_irq = cpuat91_init_irq,
|
||||
.init_machine = cpuat91_board_init,
|
||||
MACHINE_END
|
||||
|
@ -43,10 +43,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init csb337_map_io(void)
|
||||
static void __init csb337_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 3.6864 MHz crystal */
|
||||
at91rm9200_initialize(3686400, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(3686400);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
|
||||
@ -257,9 +257,9 @@ static void __init csb337_board_init(void)
|
||||
|
||||
MACHINE_START(CSB337, "Cogent CSB337")
|
||||
/* Maintainer: Bill Gatliff */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = csb337_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = csb337_init_early,
|
||||
.init_irq = csb337_init_irq,
|
||||
.init_machine = csb337_board_init,
|
||||
MACHINE_END
|
||||
|
@ -40,10 +40,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init csb637_map_io(void)
|
||||
static void __init csb637_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 3.6864 MHz crystal */
|
||||
at91rm9200_initialize(3686400, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(3686400);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
@ -138,9 +138,9 @@ static void __init csb637_board_init(void)
|
||||
|
||||
MACHINE_START(CSB637, "Cogent CSB637")
|
||||
/* Maintainer: Bill Gatliff */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = csb637_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = csb637_init_early,
|
||||
.init_irq = csb637_init_irq,
|
||||
.init_machine = csb637_board_init,
|
||||
MACHINE_END
|
||||
|
@ -35,7 +35,7 @@ static void __init at91eb01_init_irq(void)
|
||||
at91x40_init_interrupts(NULL);
|
||||
}
|
||||
|
||||
static void __init at91eb01_map_io(void)
|
||||
static void __init at91eb01_init_early(void)
|
||||
{
|
||||
at91x40_initialize(40000000);
|
||||
}
|
||||
@ -43,7 +43,7 @@ static void __init at91eb01_map_io(void)
|
||||
MACHINE_START(AT91EB01, "Atmel AT91 EB01")
|
||||
/* Maintainer: Greg Ungerer <gerg@snapgear.com> */
|
||||
.timer = &at91x40_timer,
|
||||
.init_early = at91eb01_init_early,
|
||||
.init_irq = at91eb01_init_irq,
|
||||
.map_io = at91eb01_map_io,
|
||||
MACHINE_END
|
||||
|
||||
|
@ -40,10 +40,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init eb9200_map_io(void)
|
||||
static void __init eb9200_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
@ -120,9 +120,9 @@ static void __init eb9200_board_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(ATEB9200, "Embest ATEB9200")
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = eb9200_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = eb9200_init_early,
|
||||
.init_irq = eb9200_init_irq,
|
||||
.init_machine = eb9200_board_init,
|
||||
MACHINE_END
|
||||
|
@ -38,14 +38,18 @@
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ecb_at91map_io(void)
|
||||
static void __init ecb_at91init_early(void)
|
||||
{
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
|
||||
@ -168,9 +172,9 @@ static void __init ecb_at91board_init(void)
|
||||
|
||||
MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
|
||||
/* Maintainer: emQbit.com */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = ecb_at91map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = ecb_at91init_early,
|
||||
.init_irq = ecb_at91init_irq,
|
||||
.init_machine = ecb_at91board_init,
|
||||
MACHINE_END
|
||||
|
@ -26,11 +26,16 @@
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/at91rm9200_mc.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
static void __init eco920_map_io(void)
|
||||
static void __init eco920_init_early(void)
|
||||
{
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
|
||||
@ -86,21 +91,6 @@ static struct platform_device eco920_flash = {
|
||||
.num_resources = 1,
|
||||
};
|
||||
|
||||
static struct resource at91_beeper_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91RM9200_BASE_TC3,
|
||||
.end = AT91RM9200_BASE_TC3 + 0x39,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device at91_beeper = {
|
||||
.name = "at91_beeper",
|
||||
.id = 0,
|
||||
.resource = at91_beeper_resources,
|
||||
.num_resources = ARRAY_SIZE(at91_beeper_resources),
|
||||
};
|
||||
|
||||
static struct spi_board_info eco920_spi_devices[] = {
|
||||
{ /* CAN controller */
|
||||
.modalias = "tlv5638",
|
||||
@ -139,18 +129,14 @@ static void __init eco920_board_init(void)
|
||||
AT91_SMC_TDF_(1) /* float time */
|
||||
);
|
||||
|
||||
at91_clock_associate("tc3_clk", &at91_beeper.dev, "at91_beeper");
|
||||
at91_set_B_periph(AT91_PIN_PB6, 0);
|
||||
platform_device_register(&at91_beeper);
|
||||
|
||||
at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
|
||||
}
|
||||
|
||||
MACHINE_START(ECO920, "eco920")
|
||||
/* Maintainer: Sascha Hauer */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = eco920_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = eco920_init_early,
|
||||
.init_irq = eco920_init_irq,
|
||||
.init_machine = eco920_board_init,
|
||||
MACHINE_END
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
static void __init flexibity_map_io(void)
|
||||
static void __init flexibity_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -154,9 +154,9 @@ static void __init flexibity_board_init(void)
|
||||
|
||||
MACHINE_START(FLEXIBITY, "Flexibity Connect")
|
||||
/* Maintainer: Maxim Osipov */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = flexibity_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = flexibity_init_early,
|
||||
.init_irq = flexibity_init_irq,
|
||||
.init_machine = flexibity_board_init,
|
||||
MACHINE_END
|
||||
|
@ -57,7 +57,7 @@
|
||||
*/
|
||||
|
||||
|
||||
static void __init foxg20_map_io(void)
|
||||
static void __init foxg20_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -266,9 +266,9 @@ static void __init foxg20_board_init(void)
|
||||
|
||||
MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
|
||||
/* Maintainer: Sergio Tanzilli */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = foxg20_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = foxg20_init_early,
|
||||
.init_irq = foxg20_init_irq,
|
||||
.init_machine = foxg20_board_init,
|
||||
MACHINE_END
|
||||
|
@ -38,9 +38,9 @@
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
static void __init gsia18s_map_io(void)
|
||||
static void __init gsia18s_init_early(void)
|
||||
{
|
||||
stamp9g20_map_io();
|
||||
stamp9g20_init_early();
|
||||
|
||||
/*
|
||||
* USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
|
||||
@ -576,9 +576,9 @@ static void __init gsia18s_board_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(GSIA18S, "GS_IA18_S")
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = gsia18s_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = gsia18s_init_early,
|
||||
.init_irq = init_irq,
|
||||
.init_machine = gsia18s_board_init,
|
||||
MACHINE_END
|
||||
|
@ -35,14 +35,18 @@
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init kafa_map_io(void)
|
||||
static void __init kafa_init_early(void)
|
||||
{
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* Set up the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
|
||||
@ -94,9 +98,9 @@ static void __init kafa_board_init(void)
|
||||
|
||||
MACHINE_START(KAFA, "Sperry-Sun KAFA")
|
||||
/* Maintainer: Sergei Sharonov */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = kafa_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = kafa_init_early,
|
||||
.init_irq = kafa_init_irq,
|
||||
.init_machine = kafa_board_init,
|
||||
MACHINE_END
|
||||
|
@ -36,16 +36,19 @@
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
#include <mach/cpu.h>
|
||||
#include <mach/at91rm9200_mc.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init kb9202_map_io(void)
|
||||
static void __init kb9202_init_early(void)
|
||||
{
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
/* Initialize processor: 10 MHz crystal */
|
||||
at91rm9200_initialize(10000000, AT91RM9200_PQFP);
|
||||
at91rm9200_initialize(10000000);
|
||||
|
||||
/* Set up the LEDs */
|
||||
at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
|
||||
@ -136,9 +139,9 @@ static void __init kb9202_board_init(void)
|
||||
|
||||
MACHINE_START(KB9200, "KB920x")
|
||||
/* Maintainer: KwikByte, Inc. */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = kb9202_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = kb9202_init_early,
|
||||
.init_irq = kb9202_init_irq,
|
||||
.init_machine = kb9202_board_init,
|
||||
MACHINE_END
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init neocore926_map_io(void)
|
||||
static void __init neocore926_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 20 MHz crystal */
|
||||
at91sam9263_initialize(20000000);
|
||||
@ -387,9 +387,9 @@ static void __init neocore926_board_init(void)
|
||||
|
||||
MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926")
|
||||
/* Maintainer: ADENEO */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = neocore926_map_io,
|
||||
.map_io = at91sam9263_map_io,
|
||||
.init_early = neocore926_init_early,
|
||||
.init_irq = neocore926_init_irq,
|
||||
.init_machine = neocore926_board_init,
|
||||
MACHINE_END
|
||||
|
@ -37,9 +37,9 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init pcontrol_g20_map_io(void)
|
||||
static void __init pcontrol_g20_init_early(void)
|
||||
{
|
||||
stamp9g20_map_io();
|
||||
stamp9g20_init_early();
|
||||
|
||||
/* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */
|
||||
at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
|
||||
@ -222,9 +222,9 @@ static void __init pcontrol_g20_board_init(void)
|
||||
|
||||
MACHINE_START(PCONTROL_G20, "PControl G20")
|
||||
/* Maintainer: pgsellmann@portner-elektronik.at */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = pcontrol_g20_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = pcontrol_g20_init_early,
|
||||
.init_irq = init_irq,
|
||||
.init_machine = pcontrol_g20_board_init,
|
||||
MACHINE_END
|
||||
|
@ -43,10 +43,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init picotux200_map_io(void)
|
||||
static void __init picotux200_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* DBGU on ttyS0. (Rx & Tx only) */
|
||||
at91_register_uart(0, 0, 0);
|
||||
@ -123,9 +123,9 @@ static void __init picotux200_board_init(void)
|
||||
|
||||
MACHINE_START(PICOTUX2XX, "picotux 200")
|
||||
/* Maintainer: Kleinhenz Elektronik GmbH */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = picotux200_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = picotux200_init_early,
|
||||
.init_irq = picotux200_init_irq,
|
||||
.init_machine = picotux200_board_init,
|
||||
MACHINE_END
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 12.000 MHz crystal */
|
||||
at91sam9260_initialize(12000000);
|
||||
@ -268,9 +268,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(QIL_A9260, "CALAO QIL_A9260")
|
||||
/* Maintainer: calao-systems */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -45,10 +45,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init dk_map_io(void)
|
||||
static void __init dk_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
|
||||
@ -227,9 +227,9 @@ static void __init dk_board_init(void)
|
||||
|
||||
MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
|
||||
/* Maintainer: SAN People/Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = dk_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = dk_init_early,
|
||||
.init_irq = dk_init_irq,
|
||||
.init_machine = dk_board_init,
|
||||
MACHINE_END
|
||||
|
@ -45,10 +45,10 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_BGA);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* Setup the LEDs */
|
||||
at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
|
||||
@ -193,9 +193,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
|
||||
/* Maintainer: SAN People/Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -212,9 +212,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")
|
||||
/* Maintainer: Olimex */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -44,12 +44,13 @@
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/at91_shdwc.h>
|
||||
#include <mach/system_rev.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -191,11 +192,6 @@ static struct atmel_nand_data __initdata ek_nand_data = {
|
||||
.rdy_pin = AT91_PIN_PC13,
|
||||
.enable_pin = AT91_PIN_PC14,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
@ -218,6 +214,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (ek_nand_data.bus_width_16)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
@ -356,9 +353,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -48,12 +48,13 @@
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/at91_shdwc.h>
|
||||
#include <mach/system_rev.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9261_initialize(18432000);
|
||||
@ -197,11 +198,6 @@ static struct atmel_nand_data __initdata ek_nand_data = {
|
||||
.rdy_pin = AT91_PIN_PC15,
|
||||
.enable_pin = AT91_PIN_PC14,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
@ -224,6 +220,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (ek_nand_data.bus_width_16)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
@ -623,9 +620,9 @@ MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
|
||||
MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
|
||||
#endif
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9261_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -47,12 +47,13 @@
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/at91_shdwc.h>
|
||||
#include <mach/system_rev.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 16.367 MHz crystal */
|
||||
at91sam9263_initialize(16367660);
|
||||
@ -198,11 +199,6 @@ static struct atmel_nand_data __initdata ek_nand_data = {
|
||||
.rdy_pin = AT91_PIN_PA22,
|
||||
.enable_pin = AT91_PIN_PD15,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
@ -225,6 +221,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (ek_nand_data.bus_width_16)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
@ -454,9 +451,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9263_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/system_rev.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
@ -60,7 +61,7 @@ static int inline ek_have_2mmc(void)
|
||||
}
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -175,11 +176,6 @@ static struct atmel_nand_data __initdata ek_nand_data = {
|
||||
.rdy_pin = AT91_PIN_PC13,
|
||||
.enable_pin = AT91_PIN_PC14,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
@ -202,6 +198,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (ek_nand_data.bus_width_16)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
@ -406,18 +403,18 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -41,12 +41,13 @@
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91sam9_smc.h>
|
||||
#include <mach/at91_shdwc.h>
|
||||
#include <mach/system_rev.h>
|
||||
|
||||
#include "sam9_smc.h"
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 12.000 MHz crystal */
|
||||
at91sam9g45_initialize(12000000);
|
||||
@ -155,11 +156,6 @@ static struct atmel_nand_data __initdata ek_nand_data = {
|
||||
.rdy_pin = AT91_PIN_PC8,
|
||||
.enable_pin = AT91_PIN_PC14,
|
||||
.partition_info = nand_partitions,
|
||||
#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
|
||||
.bus_width_16 = 1,
|
||||
#else
|
||||
.bus_width_16 = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
@ -182,6 +178,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
ek_nand_data.bus_width_16 = !board_have_nand_8bit();
|
||||
/* setup bus-width (8 or 16) */
|
||||
if (ek_nand_data.bus_width_16)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
|
||||
@ -424,9 +421,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK")
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9g45_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 12.000 MHz crystal */
|
||||
at91sam9rl_initialize(12000000);
|
||||
@ -329,9 +329,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
|
||||
/* Maintainer: Atmel */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9rl_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x))
|
||||
|
||||
static void __init snapper9260_map_io(void)
|
||||
static void __init snapper9260_init_early(void)
|
||||
{
|
||||
at91sam9260_initialize(18432000);
|
||||
|
||||
@ -178,9 +178,9 @@ static void __init snapper9260_board_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module")
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = snapper9260_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = snapper9260_init_early,
|
||||
.init_irq = snapper9260_init_irq,
|
||||
.init_machine = snapper9260_board_init,
|
||||
MACHINE_END
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
void __init stamp9g20_map_io(void)
|
||||
void __init stamp9g20_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91sam9260_initialize(18432000);
|
||||
@ -44,9 +44,9 @@ void __init stamp9g20_map_io(void)
|
||||
at91_set_serial_console(0);
|
||||
}
|
||||
|
||||
static void __init stamp9g20evb_map_io(void)
|
||||
static void __init stamp9g20evb_init_early(void)
|
||||
{
|
||||
stamp9g20_map_io();
|
||||
stamp9g20_init_early();
|
||||
|
||||
/* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
||||
at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
||||
@ -54,9 +54,9 @@ static void __init stamp9g20evb_map_io(void)
|
||||
| ATMEL_UART_DCD | ATMEL_UART_RI);
|
||||
}
|
||||
|
||||
static void __init portuxg20_map_io(void)
|
||||
static void __init portuxg20_init_early(void)
|
||||
{
|
||||
stamp9g20_map_io();
|
||||
stamp9g20_init_early();
|
||||
|
||||
/* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
||||
at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
||||
@ -298,18 +298,18 @@ static void __init stamp9g20evb_board_init(void)
|
||||
|
||||
MACHINE_START(PORTUXG20, "taskit PortuxG20")
|
||||
/* Maintainer: taskit GmbH */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = portuxg20_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = portuxg20_init_early,
|
||||
.init_irq = init_irq,
|
||||
.init_machine = portuxg20_board_init,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(STAMP9G20, "taskit Stamp9G20")
|
||||
/* Maintainer: taskit GmbH */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = stamp9g20evb_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = stamp9g20evb_init_early,
|
||||
.init_irq = init_irq,
|
||||
.init_machine = stamp9g20evb_board_init,
|
||||
MACHINE_END
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 12.000 MHz crystal */
|
||||
at91sam9260_initialize(12000000);
|
||||
@ -228,9 +228,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(USB_A9260, "CALAO USB_A9260")
|
||||
/* Maintainer: calao-systems */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9260_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init ek_map_io(void)
|
||||
static void __init ek_init_early(void)
|
||||
{
|
||||
/* Initialize processor: 12.00 MHz crystal */
|
||||
at91sam9263_initialize(12000000);
|
||||
@ -244,9 +244,9 @@ static void __init ek_board_init(void)
|
||||
|
||||
MACHINE_START(USB_A9263, "CALAO USB_A9263")
|
||||
/* Maintainer: calao-systems */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91sam926x_timer,
|
||||
.map_io = ek_map_io,
|
||||
.map_io = at91sam9263_map_io,
|
||||
.init_early = ek_init_early,
|
||||
.init_irq = ek_init_irq,
|
||||
.init_machine = ek_board_init,
|
||||
MACHINE_END
|
||||
|
@ -45,14 +45,18 @@
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/at91rm9200_mc.h>
|
||||
#include <mach/cpu.h>
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
|
||||
static void __init yl9200_map_io(void)
|
||||
static void __init yl9200_init_early(void)
|
||||
{
|
||||
/* Set cpu type: PQFP */
|
||||
at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
|
||||
|
||||
/* Initialize processor: 18.432 MHz crystal */
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
at91rm9200_initialize(18432000);
|
||||
|
||||
/* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
|
||||
at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
|
||||
@ -594,9 +598,9 @@ static void __init yl9200_board_init(void)
|
||||
|
||||
MACHINE_START(YL9200, "uCdragon YL-9200")
|
||||
/* Maintainer: S.Birtles */
|
||||
.boot_params = AT91_SDRAM_BASE + 0x100,
|
||||
.timer = &at91rm9200_timer,
|
||||
.map_io = yl9200_map_io,
|
||||
.map_io = at91rm9200_map_io,
|
||||
.init_early = yl9200_init_early,
|
||||
.init_irq = yl9200_init_irq,
|
||||
.init_machine = yl9200_board_init,
|
||||
MACHINE_END
|
||||
|
@ -163,7 +163,7 @@ static struct clk udpck = {
|
||||
.parent = &pllb,
|
||||
.mode = pmc_sys_mode,
|
||||
};
|
||||
static struct clk utmi_clk = {
|
||||
struct clk utmi_clk = {
|
||||
.name = "utmi_clk",
|
||||
.parent = &main_clk,
|
||||
.pmc_mask = AT91_PMC_UPLLEN, /* in CKGR_UCKR */
|
||||
@ -182,7 +182,7 @@ static struct clk uhpck = {
|
||||
* memory, interfaces to on-chip peripherals, the AIC, and sometimes more
|
||||
* (e.g baud rate generation). It's sourced from one of the primary clocks.
|
||||
*/
|
||||
static struct clk mck = {
|
||||
struct clk mck = {
|
||||
.name = "mck",
|
||||
.pmc_mask = AT91_PMC_MCKRDY, /* in PMC_SR */
|
||||
};
|
||||
@ -215,43 +215,6 @@ static struct clk __init *at91_css_to_clk(unsigned long css)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Associate a particular clock with a function (eg, "uart") and device.
|
||||
* The drivers can then request the same 'function' with several different
|
||||
* devices and not care about which clock name to use.
|
||||
*/
|
||||
void __init at91_clock_associate(const char *id, struct device *dev, const char *func)
|
||||
{
|
||||
struct clk *clk = clk_get(NULL, id);
|
||||
|
||||
if (!dev || !clk || !IS_ERR(clk_get(dev, func)))
|
||||
return;
|
||||
|
||||
clk->function = func;
|
||||
clk->dev = dev;
|
||||
}
|
||||
|
||||
/* clocks cannot be de-registered no refcounting necessary */
|
||||
struct clk *clk_get(struct device *dev, const char *id)
|
||||
{
|
||||
struct clk *clk;
|
||||
|
||||
list_for_each_entry(clk, &clocks, node) {
|
||||
if (strcmp(id, clk->name) == 0)
|
||||
return clk;
|
||||
if (clk->function && (dev == clk->dev) && strcmp(id, clk->function) == 0)
|
||||
return clk;
|
||||
}
|
||||
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
EXPORT_SYMBOL(clk_get);
|
||||
|
||||
void clk_put(struct clk *clk)
|
||||
{
|
||||
}
|
||||
EXPORT_SYMBOL(clk_put);
|
||||
|
||||
static void __clk_enable(struct clk *clk)
|
||||
{
|
||||
if (clk->parent)
|
||||
@ -498,32 +461,38 @@ postcore_initcall(at91_clk_debugfs_init);
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/* Register a new clock */
|
||||
static void __init at91_clk_add(struct clk *clk)
|
||||
{
|
||||
list_add_tail(&clk->node, &clocks);
|
||||
|
||||
clk->cl.con_id = clk->name;
|
||||
clk->cl.clk = clk;
|
||||
clkdev_add(&clk->cl);
|
||||
}
|
||||
|
||||
int __init clk_register(struct clk *clk)
|
||||
{
|
||||
if (clk_is_peripheral(clk)) {
|
||||
if (!clk->parent)
|
||||
clk->parent = &mck;
|
||||
clk->mode = pmc_periph_mode;
|
||||
list_add_tail(&clk->node, &clocks);
|
||||
}
|
||||
else if (clk_is_sys(clk)) {
|
||||
clk->parent = &mck;
|
||||
clk->mode = pmc_sys_mode;
|
||||
|
||||
list_add_tail(&clk->node, &clocks);
|
||||
}
|
||||
#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
|
||||
else if (clk_is_programmable(clk)) {
|
||||
clk->mode = pmc_sys_mode;
|
||||
init_programmable_clock(clk);
|
||||
list_add_tail(&clk->node, &clocks);
|
||||
}
|
||||
#endif
|
||||
|
||||
at91_clk_add(clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg)
|
||||
@ -630,7 +599,7 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock)
|
||||
at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP);
|
||||
} else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() ||
|
||||
cpu_is_at91sam9263() || cpu_is_at91sam9g20() ||
|
||||
cpu_is_at91sam9g10() || cpu_is_at572d940hf()) {
|
||||
cpu_is_at91sam9g10()) {
|
||||
uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
|
||||
udpck.pmc_mask = AT91SAM926x_PMC_UDP;
|
||||
} else if (cpu_is_at91cap9()) {
|
||||
@ -754,19 +723,19 @@ int __init at91_clock_init(unsigned long main_clock)
|
||||
|
||||
/* Register the PMC's standard clocks */
|
||||
for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++)
|
||||
list_add_tail(&standard_pmc_clocks[i]->node, &clocks);
|
||||
at91_clk_add(standard_pmc_clocks[i]);
|
||||
|
||||
if (cpu_has_pllb())
|
||||
list_add_tail(&pllb.node, &clocks);
|
||||
at91_clk_add(&pllb);
|
||||
|
||||
if (cpu_has_uhp())
|
||||
list_add_tail(&uhpck.node, &clocks);
|
||||
at91_clk_add(&uhpck);
|
||||
|
||||
if (cpu_has_udpfs())
|
||||
list_add_tail(&udpck.node, &clocks);
|
||||
at91_clk_add(&udpck);
|
||||
|
||||
if (cpu_has_utmi())
|
||||
list_add_tail(&utmi_clk.node, &clocks);
|
||||
at91_clk_add(&utmi_clk);
|
||||
|
||||
/* MCK and CPU clock are "always on" */
|
||||
clk_enable(&mck);
|
||||
|
@ -6,6 +6,8 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/clkdev.h>
|
||||
|
||||
#define CLK_TYPE_PRIMARY 0x1
|
||||
#define CLK_TYPE_PLL 0x2
|
||||
#define CLK_TYPE_PROGRAMMABLE 0x4
|
||||
@ -16,8 +18,7 @@
|
||||
struct clk {
|
||||
struct list_head node;
|
||||
const char *name; /* unique clock name */
|
||||
const char *function; /* function of the clock */
|
||||
struct device *dev; /* device associated with function */
|
||||
struct clk_lookup cl;
|
||||
unsigned long rate_hz;
|
||||
struct clk *parent;
|
||||
u32 pmc_mask;
|
||||
@ -29,3 +30,18 @@ struct clk {
|
||||
|
||||
|
||||
extern int __init clk_register(struct clk *clk);
|
||||
extern struct clk mck;
|
||||
extern struct clk utmi_clk;
|
||||
|
||||
#define CLKDEV_CON_ID(_id, _clk) \
|
||||
{ \
|
||||
.con_id = _id, \
|
||||
.clk = _clk, \
|
||||
}
|
||||
|
||||
#define CLKDEV_CON_DEV_ID(_con_id, _dev_id, _clk) \
|
||||
{ \
|
||||
.con_id = _con_id, \
|
||||
.dev_id = _dev_id, \
|
||||
.clk = _clk, \
|
||||
}
|
||||
|
@ -8,8 +8,21 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/clkdev.h>
|
||||
|
||||
/* Map io */
|
||||
extern void __init at91rm9200_map_io(void);
|
||||
extern void __init at91sam9260_map_io(void);
|
||||
extern void __init at91sam9261_map_io(void);
|
||||
extern void __init at91sam9263_map_io(void);
|
||||
extern void __init at91sam9rl_map_io(void);
|
||||
extern void __init at91sam9g45_map_io(void);
|
||||
extern void __init at91x40_map_io(void);
|
||||
extern void __init at91cap9_map_io(void);
|
||||
|
||||
/* Processors */
|
||||
extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks);
|
||||
extern void __init at91rm9200_set_type(int type);
|
||||
extern void __init at91rm9200_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9260_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9261_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9263_initialize(unsigned long main_clock);
|
||||
@ -17,7 +30,6 @@ extern void __init at91sam9rl_initialize(unsigned long main_clock);
|
||||
extern void __init at91sam9g45_initialize(unsigned long main_clock);
|
||||
extern void __init at91x40_initialize(unsigned long main_clock);
|
||||
extern void __init at91cap9_initialize(unsigned long main_clock);
|
||||
extern void __init at572d940hf_initialize(unsigned long main_clock);
|
||||
|
||||
/* Interrupts */
|
||||
extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
|
||||
@ -28,7 +40,6 @@ extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91sam9g45_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91x40_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91cap9_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at572d940hf_init_interrupts(unsigned int priority[]);
|
||||
extern void __init at91_aic_init(unsigned int priority[]);
|
||||
|
||||
/* Timer */
|
||||
@ -39,8 +50,19 @@ extern struct sys_timer at91x40_timer;
|
||||
|
||||
/* Clocks */
|
||||
extern int __init at91_clock_init(unsigned long main_clock);
|
||||
/*
|
||||
* function to specify the clock of the default console. As we do not
|
||||
* use the device/driver bus, the dev_name is not intialize. So we need
|
||||
* to link the clock to a specific con_id only "usart"
|
||||
*/
|
||||
extern void __init at91rm9200_set_console_clock(int id);
|
||||
extern void __init at91sam9260_set_console_clock(int id);
|
||||
extern void __init at91sam9261_set_console_clock(int id);
|
||||
extern void __init at91sam9263_set_console_clock(int id);
|
||||
extern void __init at91sam9rl_set_console_clock(int id);
|
||||
extern void __init at91sam9g45_set_console_clock(int id);
|
||||
extern void __init at91cap9_set_console_clock(int id);
|
||||
struct device;
|
||||
extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func);
|
||||
|
||||
/* Power Management */
|
||||
extern void at91_irq_suspend(void);
|
||||
|
@ -1,123 +0,0 @@
|
||||
/*
|
||||
* include/mach/at572d940hf.h
|
||||
*
|
||||
* Antonio R. Costa <costa.antonior@gmail.com>
|
||||
* Copyright (C) 2008 Atmel
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AT572D940HF_H
|
||||
#define AT572D940HF_H
|
||||
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripherals */
|
||||
#define AT572D940HF_ID_PIOA 2 /* Parallel IO Controller A */
|
||||
#define AT572D940HF_ID_PIOB 3 /* Parallel IO Controller B */
|
||||
#define AT572D940HF_ID_PIOC 4 /* Parallel IO Controller C */
|
||||
#define AT572D940HF_ID_EMAC 5 /* MACB ethernet controller */
|
||||
#define AT572D940HF_ID_US0 6 /* USART 0 */
|
||||
#define AT572D940HF_ID_US1 7 /* USART 1 */
|
||||
#define AT572D940HF_ID_US2 8 /* USART 2 */
|
||||
#define AT572D940HF_ID_MCI 9 /* Multimedia Card Interface */
|
||||
#define AT572D940HF_ID_UDP 10 /* USB Device Port */
|
||||
#define AT572D940HF_ID_TWI0 11 /* Two-Wire Interface 0 */
|
||||
#define AT572D940HF_ID_SPI0 12 /* Serial Peripheral Interface 0 */
|
||||
#define AT572D940HF_ID_SPI1 13 /* Serial Peripheral Interface 1 */
|
||||
#define AT572D940HF_ID_SSC0 14 /* Serial Synchronous Controller 0 */
|
||||
#define AT572D940HF_ID_SSC1 15 /* Serial Synchronous Controller 1 */
|
||||
#define AT572D940HF_ID_SSC2 16 /* Serial Synchronous Controller 2 */
|
||||
#define AT572D940HF_ID_TC0 17 /* Timer Counter 0 */
|
||||
#define AT572D940HF_ID_TC1 18 /* Timer Counter 1 */
|
||||
#define AT572D940HF_ID_TC2 19 /* Timer Counter 2 */
|
||||
#define AT572D940HF_ID_UHP 20 /* USB Host port */
|
||||
#define AT572D940HF_ID_SSC3 21 /* Serial Synchronous Controller 3 */
|
||||
#define AT572D940HF_ID_TWI1 22 /* Two-Wire Interface 1 */
|
||||
#define AT572D940HF_ID_CAN0 23 /* CAN Controller 0 */
|
||||
#define AT572D940HF_ID_CAN1 24 /* CAN Controller 1 */
|
||||
#define AT572D940HF_ID_MHALT 25 /* mAgicV HALT line */
|
||||
#define AT572D940HF_ID_MSIRQ0 26 /* mAgicV SIRQ0 line */
|
||||
#define AT572D940HF_ID_MEXC 27 /* mAgicV exception line */
|
||||
#define AT572D940HF_ID_MEDMA 28 /* mAgicV end of DMA line */
|
||||
#define AT572D940HF_ID_IRQ0 29 /* External Interrupt Source (IRQ0) */
|
||||
#define AT572D940HF_ID_IRQ1 30 /* External Interrupt Source (IRQ1) */
|
||||
#define AT572D940HF_ID_IRQ2 31 /* External Interrupt Source (IRQ2) */
|
||||
|
||||
|
||||
/*
|
||||
* User Peripheral physical base addresses.
|
||||
*/
|
||||
#define AT572D940HF_BASE_TCB 0xfffa0000
|
||||
#define AT572D940HF_BASE_TC0 0xfffa0000
|
||||
#define AT572D940HF_BASE_TC1 0xfffa0040
|
||||
#define AT572D940HF_BASE_TC2 0xfffa0080
|
||||
#define AT572D940HF_BASE_UDP 0xfffa4000
|
||||
#define AT572D940HF_BASE_MCI 0xfffa8000
|
||||
#define AT572D940HF_BASE_TWI0 0xfffac000
|
||||
#define AT572D940HF_BASE_US0 0xfffb0000
|
||||
#define AT572D940HF_BASE_US1 0xfffb4000
|
||||
#define AT572D940HF_BASE_US2 0xfffb8000
|
||||
#define AT572D940HF_BASE_SSC0 0xfffbc000
|
||||
#define AT572D940HF_BASE_SSC1 0xfffc0000
|
||||
#define AT572D940HF_BASE_SSC2 0xfffc4000
|
||||
#define AT572D940HF_BASE_SPI0 0xfffc8000
|
||||
#define AT572D940HF_BASE_SPI1 0xfffcc000
|
||||
#define AT572D940HF_BASE_SSC3 0xfffd0000
|
||||
#define AT572D940HF_BASE_TWI1 0xfffd4000
|
||||
#define AT572D940HF_BASE_EMAC 0xfffd8000
|
||||
#define AT572D940HF_BASE_CAN0 0xfffdc000
|
||||
#define AT572D940HF_BASE_CAN1 0xfffe0000
|
||||
#define AT91_BASE_SYS 0xffffea00
|
||||
|
||||
|
||||
/*
|
||||
* System Peripherals (offset from AT91_BASE_SYS)
|
||||
*/
|
||||
#define AT91_SDRAMC0 (0xffffea00 - AT91_BASE_SYS)
|
||||
#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
|
||||
#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
|
||||
#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
|
||||
#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
|
||||
#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
|
||||
#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
|
||||
#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
|
||||
#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
|
||||
#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
|
||||
#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
|
||||
#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
|
||||
#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
|
||||
|
||||
#define AT91_USART0 AT572D940HF_ID_US0
|
||||
#define AT91_USART1 AT572D940HF_ID_US1
|
||||
#define AT91_USART2 AT572D940HF_ID_US2
|
||||
|
||||
|
||||
/*
|
||||
* Internal Memory.
|
||||
*/
|
||||
#define AT572D940HF_SRAM_BASE 0x00300000 /* Internal SRAM base address */
|
||||
#define AT572D940HF_SRAM_SIZE (48 * SZ_1K) /* Internal SRAM size (48Kb) */
|
||||
|
||||
#define AT572D940HF_ROM_BASE 0x00400000 /* Internal ROM base address */
|
||||
#define AT572D940HF_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
|
||||
|
||||
#define AT572D940HF_UHP_BASE 0x00500000 /* USB Host controller */
|
||||
|
||||
|
||||
#endif
|
@ -1,123 +0,0 @@
|
||||
/*
|
||||
* include/mach//at572d940hf_matrix.h
|
||||
*
|
||||
* Antonio R. Costa <costa.antonior@gmail.com>
|
||||
* Copyright (C) 2008 Atmel
|
||||
*
|
||||
* Copyright (C) 2005 SAN People
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef AT572D940HF_MATRIX_H
|
||||
#define AT572D940HF_MATRIX_H
|
||||
|
||||
#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
|
||||
#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
|
||||
#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
|
||||
#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
|
||||
#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
|
||||
#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
|
||||
|
||||
#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
|
||||
#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
|
||||
#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
|
||||
#define AT91_MATRIX_ULBT_FOUR (2 << 0)
|
||||
#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
|
||||
#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
|
||||
|
||||
#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
|
||||
#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
|
||||
#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
|
||||
#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
|
||||
#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
|
||||
#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
|
||||
#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
|
||||
#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
|
||||
#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
|
||||
#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
|
||||
#define AT91_MATRIX_FIXED_DEFMSTR (0x7 << 18) /* Fixed Index of Default Master */
|
||||
#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
|
||||
#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
|
||||
#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
|
||||
|
||||
#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
|
||||
#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
|
||||
#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
|
||||
#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
|
||||
#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
|
||||
|
||||
#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
|
||||
#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
|
||||
#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
|
||||
#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
|
||||
#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
|
||||
#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
|
||||
#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
|
||||
|
||||
#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
|
||||
#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
|
||||
#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
|
||||
|
||||
#define AT91_MATRIX_SFR0 (AT91_MATRIX + 0x110) /* Special Function Register 0 */
|
||||
#define AT91_MATRIX_SFR1 (AT91_MATRIX + 0x114) /* Special Function Register 1 */
|
||||
#define AT91_MATRIX_SFR2 (AT91_MATRIX + 0x118) /* Special Function Register 2 */
|
||||
#define AT91_MATRIX_SFR3 (AT91_MATRIX + 0x11C) /* Special Function Register 3 */
|
||||
#define AT91_MATRIX_SFR4 (AT91_MATRIX + 0x120) /* Special Function Register 4 */
|
||||
#define AT91_MATRIX_SFR5 (AT91_MATRIX + 0x124) /* Special Function Register 5 */
|
||||
#define AT91_MATRIX_SFR6 (AT91_MATRIX + 0x128) /* Special Function Register 6 */
|
||||
#define AT91_MATRIX_SFR7 (AT91_MATRIX + 0x12C) /* Special Function Register 7 */
|
||||
#define AT91_MATRIX_SFR8 (AT91_MATRIX + 0x130) /* Special Function Register 8 */
|
||||
#define AT91_MATRIX_SFR9 (AT91_MATRIX + 0x134) /* Special Function Register 9 */
|
||||
#define AT91_MATRIX_SFR10 (AT91_MATRIX + 0x138) /* Special Function Register 10 */
|
||||
#define AT91_MATRIX_SFR11 (AT91_MATRIX + 0x13C) /* Special Function Register 11 */
|
||||
#define AT91_MATRIX_SFR12 (AT91_MATRIX + 0x140) /* Special Function Register 12 */
|
||||
#define AT91_MATRIX_SFR13 (AT91_MATRIX + 0x144) /* Special Function Register 13 */
|
||||
#define AT91_MATRIX_SFR14 (AT91_MATRIX + 0x148) /* Special Function Register 14 */
|
||||
#define AT91_MATRIX_SFR15 (AT91_MATRIX + 0x14C) /* Special Function Register 15 */
|
||||
|
||||
|
||||
/*
|
||||
* The following registers / bits are not defined in the Datasheet (Revision A)
|
||||
*/
|
||||
|
||||
#define AT91_MATRIX_TCR (AT91_MATRIX + 0x100) /* TCM Configuration Register */
|
||||
#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
|
||||
#define AT91_MATRIX_ITCM_0 (0 << 0)
|
||||
#define AT91_MATRIX_ITCM_16 (5 << 0)
|
||||
#define AT91_MATRIX_ITCM_32 (6 << 0)
|
||||
#define AT91_MATRIX_ITCM_64 (7 << 0)
|
||||
#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
|
||||
#define AT91_MATRIX_DTCM_0 (0 << 4)
|
||||
#define AT91_MATRIX_DTCM_16 (5 << 4)
|
||||
#define AT91_MATRIX_DTCM_32 (6 << 4)
|
||||
#define AT91_MATRIX_DTCM_64 (7 << 4)
|
||||
|
||||
#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */
|
||||
#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
|
||||
#define AT91_MATRIX_CS1A_SMC (0 << 1)
|
||||
#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
|
||||
#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
|
||||
#define AT91_MATRIX_CS3A_SMC (0 << 3)
|
||||
#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
|
||||
#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
|
||||
#define AT91_MATRIX_CS4A_SMC (0 << 4)
|
||||
#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
|
||||
#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
|
||||
#define AT91_MATRIX_CS5A_SMC (0 << 5)
|
||||
#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
|
||||
#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
|
||||
|
||||
#endif
|
@ -20,8 +20,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripherals */
|
||||
#define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */
|
||||
#define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */
|
||||
#define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */
|
||||
@ -123,6 +121,4 @@
|
||||
#define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */
|
||||
#define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */
|
||||
|
||||
#define CONFIG_DRAM_BASE AT91_CHIPSELECT_6
|
||||
|
||||
#endif
|
||||
|
@ -19,8 +19,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripheral */
|
||||
#define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */
|
||||
#define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */
|
||||
#define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */
|
||||
|
@ -20,8 +20,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripherals */
|
||||
#define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */
|
||||
#define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */
|
||||
#define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */
|
||||
|
@ -18,8 +18,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripherals */
|
||||
#define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */
|
||||
#define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */
|
||||
#define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */
|
||||
|
@ -18,8 +18,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripherals */
|
||||
#define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */
|
||||
#define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */
|
||||
#define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */
|
||||
|
@ -18,8 +18,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Controller Interrupt */
|
||||
#define AT91SAM9G45_ID_PIOA 2 /* Parallel I/O Controller A */
|
||||
#define AT91SAM9G45_ID_PIOB 3 /* Parallel I/O Controller B */
|
||||
#define AT91SAM9G45_ID_PIOC 4 /* Parallel I/O Controller C */
|
||||
@ -131,8 +129,6 @@
|
||||
#define AT91SAM9G45_EHCI_BASE 0x00800000 /* USB Host controller (EHCI) */
|
||||
#define AT91SAM9G45_VDEC_BASE 0x00900000 /* Video Decoder Controller */
|
||||
|
||||
#define CONFIG_DRAM_BASE AT91_CHIPSELECT_6
|
||||
|
||||
#define CONSISTENT_DMA_SIZE SZ_4M
|
||||
|
||||
/*
|
||||
|
@ -17,8 +17,6 @@
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Controller */
|
||||
#define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */
|
||||
#define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */
|
||||
#define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */
|
||||
|
@ -15,8 +15,6 @@
|
||||
/*
|
||||
* IRQ list.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* FIQ */
|
||||
#define AT91_ID_SYS 1 /* System Peripheral */
|
||||
#define AT91X40_ID_USART0 2 /* USART port 0 */
|
||||
#define AT91X40_ID_USART1 3 /* USART port 1 */
|
||||
#define AT91X40_ID_TC0 4 /* Timer/Counter 0 */
|
||||
|
@ -90,7 +90,7 @@ struct at91_eth_data {
|
||||
extern void __init at91_add_device_eth(struct at91_eth_data *data);
|
||||
|
||||
#if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) \
|
||||
|| defined(CONFIG_ARCH_AT91SAM9G45) || defined(CONFIG_ARCH_AT572D940HF)
|
||||
|| defined(CONFIG_ARCH_AT91SAM9G45)
|
||||
#define eth_platform_data at91_eth_data
|
||||
#endif
|
||||
|
||||
@ -140,6 +140,7 @@ extern void __init at91_set_serial_console(unsigned portnr);
|
||||
extern struct platform_device *atmel_default_console_device;
|
||||
|
||||
struct atmel_uart_data {
|
||||
int num; /* port num */
|
||||
short use_dma_tx; /* use transmit DMA? */
|
||||
short use_dma_rx; /* use receive DMA? */
|
||||
void __iomem *regs; /* virt. base address, if any */
|
||||
@ -203,9 +204,6 @@ extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
|
||||
extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
|
||||
extern void __init at91_pwm_leds(struct gpio_led *leds, int nr);
|
||||
|
||||
/* AT572D940HF DSP */
|
||||
extern void __init at91_add_device_mAgic(void);
|
||||
|
||||
/* FIXME: this needs a better location, but gets stuff building again */
|
||||
extern int at91_suspend_entering_slow_clock(void);
|
||||
|
||||
|
7
arch/arm/mach-at91/include/mach/clkdev.h
Normal file
7
arch/arm/mach-at91/include/mach/clkdev.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
@ -34,8 +34,6 @@
|
||||
#define ARCH_ID_AT91SAM9XE256 0x329a93a0
|
||||
#define ARCH_ID_AT91SAM9XE512 0x329aa3a0
|
||||
|
||||
#define ARCH_ID_AT572D940HF 0x0e0303e0
|
||||
|
||||
#define ARCH_ID_AT91M40800 0x14080044
|
||||
#define ARCH_ID_AT91R40807 0x44080746
|
||||
#define ARCH_ID_AT91M40807 0x14080745
|
||||
@ -90,9 +88,16 @@ static inline unsigned long at91cap9_rev_identify(void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_AT91RM9200
|
||||
extern int rm9200_type;
|
||||
#define ARCH_REVISON_9200_BGA (0 << 0)
|
||||
#define ARCH_REVISON_9200_PQFP (1 << 0)
|
||||
#define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200)
|
||||
#define cpu_is_at91rm9200_bga() (!cpu_is_at91rm9200_pqfp())
|
||||
#define cpu_is_at91rm9200_pqfp() (cpu_is_at91rm9200() && rm9200_type & ARCH_REVISON_9200_PQFP)
|
||||
#else
|
||||
#define cpu_is_at91rm9200() (0)
|
||||
#define cpu_is_at91rm9200_bga() (0)
|
||||
#define cpu_is_at91rm9200_pqfp() (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_AT91SAM9260
|
||||
@ -181,12 +186,6 @@ static inline unsigned long at91cap9_rev_identify(void)
|
||||
#define cpu_is_at91cap9_revC() (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_AT572D940HF
|
||||
#define cpu_is_at572d940hf() (at91_cpu_identify() == ARCH_ID_AT572D940HF)
|
||||
#else
|
||||
#define cpu_is_at572d940hf() (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Since this is ARM, we will never run on any AVR32 CPU. But these
|
||||
* definitions may reduce clutter in common drivers.
|
||||
|
@ -32,13 +32,17 @@
|
||||
#include <mach/at91cap9.h>
|
||||
#elif defined(CONFIG_ARCH_AT91X40)
|
||||
#include <mach/at91x40.h>
|
||||
#elif defined(CONFIG_ARCH_AT572D940HF)
|
||||
#include <mach/at572d940hf.h>
|
||||
#else
|
||||
#error "Unsupported AT91 processor"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Peripheral identifiers/interrupts.
|
||||
*/
|
||||
#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
|
||||
#define AT91_ID_SYS 1 /* System Peripherals */
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/*
|
||||
* Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF
|
||||
@ -82,13 +86,6 @@
|
||||
#define AT91_CHIPSELECT_6 0x70000000
|
||||
#define AT91_CHIPSELECT_7 0x80000000
|
||||
|
||||
/* SDRAM */
|
||||
#ifdef CONFIG_DRAM_BASE
|
||||
#define AT91_SDRAM_BASE CONFIG_DRAM_BASE
|
||||
#else
|
||||
#define AT91_SDRAM_BASE AT91_CHIPSELECT_1
|
||||
#endif
|
||||
|
||||
/* Clocks */
|
||||
#define AT91_SLOW_CLOCK 32768 /* slow clock */
|
||||
|
||||
|
@ -23,6 +23,4 @@
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#define PLAT_PHYS_OFFSET (AT91_SDRAM_BASE)
|
||||
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __MACH_STAMP9G20_H
|
||||
#define __MACH_STAMP9G20_H
|
||||
|
||||
void stamp9g20_map_io(void);
|
||||
void stamp9g20_init_early(void);
|
||||
void stamp9g20_board_init(void);
|
||||
|
||||
#endif
|
||||
|
25
arch/arm/mach-at91/include/mach/system_rev.h
Normal file
25
arch/arm/mach-at91/include/mach/system_rev.h
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
||||
*
|
||||
* Under GPLv2 only
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SYSTEM_REV_H__
|
||||
#define __ARCH_SYSTEM_REV_H__
|
||||
|
||||
/*
|
||||
* board revision encoding
|
||||
* mach specific
|
||||
* the 16-31 bit are reserved for at91 generic information
|
||||
*
|
||||
* bit 31:
|
||||
* 0 => nand 16 bit
|
||||
* 1 => nand 8 bit
|
||||
*/
|
||||
#define BOARD_HAVE_NAND_8BIT (1 << 31)
|
||||
static int inline board_have_nand_8bit(void)
|
||||
{
|
||||
return system_rev & BOARD_HAVE_NAND_8BIT;
|
||||
}
|
||||
|
||||
#endif /* __ARCH_SYSTEM_REV_H__ */
|
@ -82,11 +82,6 @@
|
||||
#define AT91X40_MASTER_CLOCK 40000000
|
||||
#define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK)
|
||||
|
||||
#elif defined(CONFIG_ARCH_AT572D940HF)
|
||||
|
||||
#define AT572D940HF_MASTER_CLOCK 80000000
|
||||
#define CLOCK_TICK_RATE (AT572D940HF_MASTER_CLOCK/16)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -50,13 +50,11 @@ struct tegra_kbc_platform_data {
|
||||
unsigned int debounce_cnt;
|
||||
unsigned int repeat_cnt;
|
||||
|
||||
unsigned int wake_cnt; /* 0:wake on any key >1:wake on wake_cfg */
|
||||
const struct tegra_kbc_wake_key *wake_cfg;
|
||||
|
||||
struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO];
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
|
||||
bool wakeup;
|
||||
bool use_fn_map;
|
||||
bool use_ghost_filter;
|
||||
};
|
||||
#endif
|
||||
|
@ -204,7 +204,7 @@ static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
|
||||
#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, t_out, _sm) \
|
||||
static struct nmk_i2c_controller u8500_i2c##id##_data = { \
|
||||
/* \
|
||||
* slave data setup time, which is \
|
||||
@ -219,19 +219,21 @@ static struct nmk_i2c_controller u8500_i2c##id##_data = { \
|
||||
.rft = _rft, \
|
||||
/* std. mode operation */ \
|
||||
.clk_freq = clk, \
|
||||
/* Slave response timeout(ms) */\
|
||||
.timeout = t_out, \
|
||||
.sm = _sm, \
|
||||
}
|
||||
|
||||
/*
|
||||
* The board uses 4 i2c controllers, initialize all of
|
||||
* them with slave data setup time of 250 ns,
|
||||
* Tx & Rx FIFO threshold values as 1 and standard
|
||||
* Tx & Rx FIFO threshold values as 8 and standard
|
||||
* mode of operation
|
||||
*/
|
||||
U8500_I2C_CONTROLLER(0, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
|
||||
U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
|
||||
U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
|
||||
U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
|
||||
U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
|
||||
U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
|
||||
U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
|
||||
U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
|
||||
|
||||
static void __init mop500_i2c_init(void)
|
||||
{
|
||||
|
@ -11,8 +11,8 @@
|
||||
enum i2c_freq_mode {
|
||||
I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */
|
||||
I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */
|
||||
I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */
|
||||
I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */
|
||||
I2C_FREQ_MODE_HIGH_SPEED /* up to 3.4 Mb/s */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -24,13 +24,15 @@ enum i2c_freq_mode {
|
||||
* to the values of 14, 6, 2 for a 48 MHz i2c clk
|
||||
* @tft: Tx FIFO Threshold in bytes
|
||||
* @rft: Rx FIFO Threshold in bytes
|
||||
* @timeout Slave response timeout(ms)
|
||||
* @sm: speed mode
|
||||
*/
|
||||
struct nmk_i2c_controller {
|
||||
unsigned long clk_freq;
|
||||
unsigned short slsu;
|
||||
unsigned char tft;
|
||||
unsigned char rft;
|
||||
unsigned char tft;
|
||||
unsigned char rft;
|
||||
int timeout;
|
||||
enum i2c_freq_mode sm;
|
||||
};
|
||||
|
||||
|
@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4];
|
||||
void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct atmel_uart_data *pdata;
|
||||
|
||||
switch (hw_id) {
|
||||
case 0:
|
||||
@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
|
||||
data->regs = (void __iomem *)pdev->resource[0].start;
|
||||
}
|
||||
|
||||
pdev->id = line;
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata->num = portnr;
|
||||
at32_usarts[line] = pdev;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user