* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
doc: fix typo in comment explaining rb_tree usage
Remove fs/ntfs/ChangeLog
doc: fix console doc typo
doc: cpuset: Update the cpuset flag file
Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
Remove drivers/parport/ChangeLog
Remove drivers/char/ChangeLog
doc: typo - Table 1-2 should refer to "status", not "statm"
tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
devres/irq: Fix devm_irq_match comment
Remove reference to kthread_create_on_cpu
tree-wide: Assorted spelling fixes
tree-wide: fix 'lenght' typo in comments and code
drm/kms: fix spelling in error message
doc: capitalization and other minor fixes in pnp doc
devres: typo fix s/dev/devm/
Remove redundant trailing semicolons from macros
fix typo "definetly" -> "definitely" in comment
tree-wide: s/widht/width/g typo in comments
...
Fix trivial conflict in Documentation/laptops/00-INDEX
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (62 commits)
Input: atkbd - release previously reserved keycodes 248 - 254
Input: add KEY_WPS_BUTTON definition
Input: ads7846 - add regulator support
Input: winbond-cir - fix suspend/resume
Input: gamecon - use pr_err() and friends
Input: gamecon - constify some of the setup structures
Input: gamecon - simplify pad type handling
Input: gamecon - simplify coordinate calculation for PSX
Input: gamecon - fix some formatting issues
Input: gamecon - add rumble support for N64 pads
Input: wacom - add device type to device name string
Input: s3c24xx_ts - report touch only when stylus is down
Input: s3c24xx_ts - re-enable IRQ on resume
Input: wacom - constify product features data
Input: wacom - use per-device instance of wacom_features
Input: sh_keysc - enable building on SH-Mobile ARM
Input: wacom - get features from driver info
Input: rotary-encoder - set gpio direction for each requested gpio
Input: sh_keysc - update the driver with mode 6
Input: sh_keysc - switch to using bitmaps
...
The timer defines are only used in core.c. Move them so
they will not be globaly exposed.
While here, add additional defines to document the magic
numbers used in the registers. Also, add some comments
for clarification.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The GPIO support in core.c handles the interrupt support for GPIO
ports A, B, and F. The gpiolib implementation in gpio.c needs to
access the function ep93xx_gpio_int_mask when a gpio pin is made
an output and ep93xx_gpio_update_int_params in order to update
the registers.
Moving this support from core.c to gpio.c allows making the two
functions static. It also keeps all the GPIO handling together in one
file.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patch 5879/1: ep93xx: define magic numbers for pll1 and pll2 broke
the ep93xx build due to one missing rename of EP93XX_SYSCON_CLOCK_SET2.
The correct name should be EP93XX_SYSCON_CLKSET2.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Currently <asm/mach/irq.h> is included by core.c. This header
includes <linux/irq.h> and defines a number of internal functions.
These internal functions are not needed by this file. Change the
include so that we just get what is needed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Makes it consistent with VMALLOC_START
Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add support for Bluewater Systems EP9315 based Snapper CL15 single board
computer module.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Most machine classes want some way to register a block of clk_lookup
structures, and most do it by implementing a clks_register() type
function which walks an array, or by open-coding a loop.
Consolidate all this into clkdev_add_table().
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Otherwise more complicated uart configuration won't be possible.
We can use r1 for tmp register for both head.S and debug.S.
NOTE: This patch depends on another patch to add the the tmp register
into all debug-macro.S files. That can be done with:
$ sed -i -e "s/addruart,rx|addruart, rx/addruart, rx, tmp/"
arch/arm/*/include/*/debug-macro.S
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add support for the Simplemachines EP9307 based Sim.One board.
Cc: Hartley Sweeten <hartleys@visionengravers.com>
Cc: Sergio Sorrenti <sergio.sorrenti@gmail.com>
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use struct matrix_keymap_data to supply the keymap from the platform code
and matrix_keypad_build_keymap() to initialize the keymap.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add defines for the pll register magic numbers that determine if
the pll's are bypassed and if pll2 is enabled. Rename the clock
set registers to more closely match the datasheet. Also, remove
the unnecessary braces since each conditional statement is a single
statement.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add the platform init code to register the pwm devices that exist
on the various edb93xx development boards.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use pr_fmt to prefix kernel output with the module name.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use pr_fmt to prefix kernel output with the module name.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use pr_fmt to prefix kernel output with the module name and change
all printk messages to pr_<level> format.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The ts72xx platform has been updated to use the generic platform nand
driver (plat_nand.c). This removes the now-defunct ts7250.c nand driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
Cc: Jesse Off <joff@embeddedARM.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Update the ts72xx platform's nand driver support.
This changes the ts72xx platform from using a custom nand driver
(ts7250.c) to the generic platform nand driver (plat_nand.c).
Tested on TS-7250 with 32MiB NAND.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Matthieu Crapet <mcrapet@gmail.com>
Cc: Jesse Off <joff@embeddedARM.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This driver was merged before the ep93xx core support was added
for the keypad clock and acquiring/releasing the necessary gpio's.
Now that the proper support is in the ep93xx core this driver
needs to be updated to work correctly.
Summary of changes:
1) Remove some unused members from the platform data.
2) Remove the custom KEY macro and use the ones available in
<linux/input/matrix_keypad.h>
3) Remove the keypad_{readl/writel} macros and just use
__raw_{readl/writel} directly.
4) Update the clk_set_rate() call to work with the core support.
5) Cleanup the probe routine and remove some unneeded messages.
6) Use the ep93xx core functions to acquire and release the gpio's.
7) Fix the clk_get() call to get the keypad clock.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Just for the sake of consistency across the ep93xx-tree.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Just for the sake of consistency across the ep93xx-tree.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add the core support needed by the ep93xx matrix keypad driver.
The keypad driver unfortunately was merged early and the core
support is missing. The clkdev support has been resolved and
is now merged. This adds the platform device to the ep93xx
core and supplies the functions needed to acquire/free the gpio
pins and actually enable/disable the controller peripheral.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Remove unnecessary code in ep93xx_gpio_ab_irq_handler().
The desc calculation for gpio port B was left in when the following
commit was merged.
commit d8aa0251f1
Author: Dmitry Baryshkov <dbaryshkov@gmail.com>
Date: Thu Oct 9 13:36:24 2008 +0100
[ARM] 5298/1: Drop desc_handle_irq()
It's not needed so remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Remove unused prototype for ep93xx_init_time(). This function
is not defined in the kernel.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix a build error due to a typo (missing comma) in:
ARM: 5754/1: ep93xx: update i2c support
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The clock generation system in the ep93xx uses two external oscillator's
and two internal PLLs to derive all the internal clocks. Many of these
internal clocks can be stopped to save power.
This introduces a "parent" hierarchy for the clocks so that the users
count can be correctly tracked for power management.
The "parent" for the video clock can either be one of the PLL outputs
or the external oscillator. In order to correctly track the "parent"
for the video clock calc_clk_div() needed to be modified. It now
returns an error code if the desired rate cannot be generated.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Update the ep93xx i2c support:
1) The platform init code passes the configuration data for the
i2c-gpio driver. This allows any gpio pin do be used for the
sda and scl pins. It also allows the platform to specify the
udelay and timeout.
2) Program the gpio configuration register to enable/disable the
open drain drivers. Note that this really only works if the
sda and scl pins are set to EP93XX_GPIO_LINE_EEDAT and
EP93XX_GPIO_LINE_EECLK.
3) Update the edb93xx.c platform init to use the new support.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Most of the EP93XX_GPIO_*_INT_* register defines in ep93xx-regs.h
not required due to how the ep93xx core and gpiolib support handle
gpio interrupts. Remove the defines to prevent future confusion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Change the #define's for the EP93XX_*_PHYS_BASE addresses to use
macros for easier readability.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add Contec Micro9-Slim support
Cc: Ryan Mallon <ryan@bluewatersys.com>
Requires: 5750/1
Signed-off-by: Hubert Feurstein <hubert.feurstein@contec.at>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
From: Ryan Mallon <ryan@bluewatersys.com>
Change the gpio_to_irq and irq_to_gpio static inline functions to
macros so that they can be used in variable initialisers.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This adds the missing Kconfig options for the first SDRAM bank address
on ep93xx boards.
Cc: Hubert Feurstein <(address hidden)>
Signed-off-by: H Hartley Sweeten <(address hidden)>
Acked-by: Ryan Mallon <(address hidden)>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Daniele Venzano <linux@brownhat.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The kernel.h macro DIV_ROUND_CLOSEST performs the computation
(x + d/2)/d but is perhaps more readable.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The EP93xx features two PWMs (one on the EP9307) with the following
features:
* Configurable dual output
* Separate input clocks for each PWM output
* 16-bit resolution
* Programmable pulse width (duty cycle), interval (frequency), and
polarity
This adds the necessary core support as well as the driver. A sysfs
interface is provided to control the PWM outputs.
Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Update the NOR flash support for TS-7200.
The TS-7200 models all have 16-bit NOR flash. Update the platform
init to support this.
Remove the private TS72XX_NOR_* defines and use the common ep93xx
defines for the external chip select physical base address instead.
Move the NOR flash registration into a static __init function. When
the NAND flash support is updated this function will also be used
to register the NAND flash for the TS-7250 and TS-7260.
Tested-by: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The EP93xx has two gpio pins specifically assigned to drive
external LEDs. Add core support for these LEDs.
On the EDB93xx development boards, the rdled is connected to
an external reset circuit. Turning this led on for an extended
amount of time will cause the circuit to issue a manual reset.
Refer to Cirrus App Note AN258 for more information.
http://www.cirrus.com/en/pubs/appNote/AN258REV2.pdf
This led can be safely used as the system heartbeat with the
ledtrig-heartbeat driver.
echo heartbeat > /sys/class/leds/platform:rdled/trigger
The grled can be used for any desired purpose.
Tested-by: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add missing register defines for ep93xx keypad clock support.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Change the reg argument of the ep93xx_syscon_swlocked_write function
to be an __iomem pointer. Fixes a number of build warnings.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix a number of build errors in ep93xx gpio.c due to to missing irq.h
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The MAC address for the ep93xx ethernet driver can be optionally
copied from registers in the controller when booting. Due to
[ARM] 5573/1: ep93xx: ensure typesafe io, the cast for the source
address is no longer needed.
EP93XX_ETHERNET_BASE is typed as a (void __iomem __force *) so
memcpy_fromio() needs to be used instead of memcpy().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The EP93XX_VIC{1/2}_BASE defines are now typesafe due to
[ARM] 5573/1: ep93xx: ensure typesafe io. The (void *) cast
is not needed when calling vic_init().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
To ensure typesafe io, the enable_reg variable should be a
void __iomem pointer not u32.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ep93xx/include/mach/hardware.h
1. Properly name the include files so that they are loaded
from the <mach/*> directory and not the local directory.
2. Remove including the ts72xx.h header. This header is not
generic to the ep93xx platform. It should only be included
by the ts72xx specific files that require it. The only
two users in the tree are arch/arm/mach-ep93xx/ts72xx.c
and drivers/mtd/nand/ts7250.c.
arch/arm/mach-ep93xx/include/mach/ts72xx.h
1. <linux/io.h> should already be included by any user of this
header. Doing the include here hides it from being needed
by the calling source file.
arch/arm/mach-ep93xx/core.c
1. Remove unnecessary headers. They were probably included
originally due to cut-and-paste from other files.
2. <linux/io.h> should be included not <mach/gpio.h>
arch/arm/mach-ep93xx/adsphere.c
arch/arm/mach-ep93xx/edb93xx.c
arch/arm/mach-ep93xx/gesbc9312.c
arch/arm/mach-ep93xx/micro9.c
arch/arm/mach-ep93xx/ts72xx.c
1. Remove unnecessary headers.
arch/arm/mach-ep93xx/ts72xx.c
1. Remove unnecessary headers.
2. Add platform specific header <mach/ts72xx.h>.
drivers/mtd/nand/ts7250.c
1. <linux/io.h> should be included not <asm/io.h>.
2. Add platform specific header <mach/ts72xx.h>.
Cc: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
<linux/io.h> was getting included by <mach/ts72xx.h>, is should be
included by this file.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add clkdev support for the ep93xx_keypad driver.
A matrix keypad driver for the ep93xx just got merged via the
input subsystem group. For this driver to work the keypad clock
needs to be added to the ep93xx clkdev support. In order to
accomplish this the following changes are implemented:
1) Move the EP93XX_EXT_*_RATE defines to mach/include/hardware.h.
2) Add EP93XX_KEYTCHCLK_DIV{4/16} for the keypad driver.
3) Add support for programmable clocks (set_rate() callback).
4) Add clk_keypad for the keypad driver.
5) tab indent the clk_lookup table for easier reading.
6) Add the set_rate() callback to program the keypad clock.
This callback is generalized since the ADC clock (touchscreen)
can use the same callback.
7) Use the ep93xx_syscon_swlocked_write() core function for updating
the software locked register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add core functions to handle writes to the ep93xx software locked
registers.
There are a number of registers in the EP93xx System Controller
that require a write to the software lock register before they
can be updated. This patch adds a number of exported functions
to the ep93xx core that handle this access.
The software locked clock divider registers, VidClkDiv, MIRClkDiv,
I2SClkDiv and KeyTchClkDiv would typically involve writing a
specific value to the register. To support this the
ep93xx_syscon_swlocked_write() function is provided.
For the DeviceCfg register it's more typical to only need to
set or clear a single bit. A generic ep93xx_devcfg_set_clear()
function is provided to handle both operations. Two inline
functions, ep93xx_devcfg_set_bits() and ep93xx_devcfg_clear_bits()
are also provided to improve code readability.
In addition, the remaining bits in the System Controller Device
Config Register have been documented and the previously defined
names shortened.
All code paths that use this functionality have been updated
except for arch/arm/kernel/crunch.c. That code is in a context
switch path, which is not reentrant, so it is safe against itself.
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ep93xx: Show gpio interrupt type in debugfs output.
EP93xx uses a private implementation for the debugfs output.
Modify this output so it includes the interrupt type when the
gpio is configured as an interrupt
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix ep93xx gpio.c header includes and __iomem pointers.
1. <linux/gpio.h> should be included instead of <asm/gpio.h>
2. <mach/hardware.h> should be included instead of <mach/ep93xx-regs.h>
3. data_reg and data_dir_reg in struct ep93xx_gpio_chip should be
void __iomem pointers not unsigned int
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: ep93xx: ensure typesafe io
For the ep93xx platform, all EP93XX_*_BASE defines are based
on virtual addresses. Ensure that all these defines are
properly typesafe for the __raw_{read/write}* macros.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
Input: add driver for Synaptics I2C touchpad
Input: synaptics - add support for reporting x/y resolution
Input: ALPS - handle touchpoints buttons correctly
Input: gpio-keys - change timer to workqueue
Input: ads7846 - pin change interrupt support
Input: add support for touchscreen on W90P910 ARM platform
Input: appletouch - improve finger detection
Input: wacom - clear Intuos4 wheel data when finger leaves proximity
Input: ucb1400 - move static function from header into core
Input: add driver for EETI touchpanels
Input: ads7846 - more detailed model name in sysfs
Input: ads7846 - support swapping x and y axes
Input: ati_remote2 - use non-atomic bitops
Input: introduce lm8323 keypad driver
Input: psmouse - ESD workaround fix for OLPC XO touchpad
Input: tsc2007 - make sure platform provides get_pendown_state()
Input: uinput - flush all pending ff effects before destroying device
Input: simplify name handling for certain input handles
Input: serio - do not use deprecated dev.power.power_state
Input: wacom - add support for Intuos4 tablets
...
ep93xx: get_uart_rate() uses the constants EP93XX_SYSCON_CLOCK_CONTROL
and EP93XX_SYSCON_CLOCK_UARTBAUD, which no longer exist. Use
EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCNT_UARTBAUD instead
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Update the dma clocks so that the magic numbers are named.
All the dma clocks have an enable bit to turn them on/off as
needed. Currently these bits are in the code as "magic"
numbers. This changes all of them to named defines to
improve code readability.
Also, the EP93XX_SYSCON_CLOCK_CONTROL register is improperly
named. In the EP93xx User's Guide this register is called
PwrCnt (Power Control). All of the uses of this register
are associated with the clock support so this patch also
modifies the names to match the User's Guide.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix trivial spelling error in arch/arm/mach-ep93xx/core.c
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cleanup the ohci-ep93xx driver.
1) Use the usb.h dbg() macro instead of pr_debug() so that
the source filename is prefixed to the message and it is
terminated with a linefeed.
2) Add error handling for the clk_get() call.
3) Update clkdev support so that the usb clock is matched by
the dev_id instead of the con_id.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This patch adds a Kconfig option to select between ep93xx boards which
boot from the SDRAM bank at 0x00000000 (SDCE3/SyncBoot) and those which
boot from 0xc0000000 (SDCE0). This corrects a problem which causes
invalid images to be built for boards which boot from 0xc0000000.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix the clkdev API support for the ep93xx uart clocks.
The uarts available in the ep93xx have individual clock controls.
The current implementation assumes that the bootloader has enabled
the clocks before the kernel has booted. It also assumes that the
bootloader has set the UARTBAUD bit indicating that the uarts are
running off the 14.7456MHz external crystal.
This fixes both issues. It also allows the uart clocks to be stopped
when there are no users.
Tested-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The Cirrus Logic EDB93xx development board platform init files
share redundant code. The only differences are in the flash
memory configuration, MACH_TYPE, and additional on-board
I2C devices. This patch merges all of them into one file.
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Cc: Toufeeq Hussain <toufeeq_hussain@infosys.com>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add power management support to the VIC by registering
each VIC as a system device to get suspend/resume
events going.
Since the VIC registeration is done early, we need to
record the VICs in a static array which is used to add
the system devices later once the initcalls are run. This
means there is now a configuration value for the number
of VICs in the system.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Update the rtc-ep93xx driver to use ioremap'ed addresses.
This removes the dependency on <mach/hardware.h> and properly
reports the memory addresses used by the driver in /proc/iomem.
In addition, ep93xx_rtc_init() is updated to use
platform_driver_probe() instead of platform_driver_register().
Also, the device_create_file() calls are now properly checked for
error conditions. The created sysfs files are also now removed
when the driver is removed.
The version number for the driver has been bumped at the request
of Alessandro Zummo.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This is a keyboard driver for the Cirrus Logic EP93xx keypad matrix
peripheral. This driver is based on the pxa27x_keypad driver.
[dtor@mail.ru: Plug in input_dev->keycode so keymap can be changed
from userspace.]
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Fix trivial build warning due to incompatible pointer type.
ep93xx_timer_interrupt() has the wrong return type causing a
warning during the build.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
OMAP wishes to pass state to the boot loader upon reboot in order to
instruct it whether to wait for USB-based reflashing or not. There is
already a facility to do this via the reboot() syscall, except we ignore
the string passed to machine_restart().
This patch fixes things to pass this string to arch_reset(). This means
that we keep the reboot mode limited to telling the kernel _how_ to
perform the reboot which should be independent of what we request the
boot loader to do.
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix build warnings due to struct i2c_board_info in <mach/platform.h>
Patch "5311/1: add core support for built in i2c bus" is causing 11 of
39 the build warnings with Kautobuild for ep93xx_defconfig on kernel
2.6.29-rc5-git4. This patch fixes it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add m2p dma support to the ep93xx
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add the clocks for ep93xx m2p dma engine.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Remove the gesbc9312.h header since it is unused.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add the on-board rtc i2c device to the edb9307a platform init.
The EP93xx based EDB9307A dev board has an on-board ISL1208 RTC
connected to the I2C bus. Now that the core code supports the
I2C bus, this patch will add support for the device.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Include <linux/i2c.h> in all ep93xx platforms.
Patch "5311/1: add core support for built in i2c bus" will cause build errors due to the following in
arch/arm/mach-ep93xx/include/mach/platform.h:
+void ep93xx_register_i2c(struct i2c_board_info *devices, int num);
The i2c.h header needs to be included in order to define struct i2c_board_info.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use EP93XX_*_PHYS_BASE and SZ_* defines in ep93xx platform inits.
The following patch changes the flash memory hard-coded resource
addresses and MACHINE_START boot_params to EP93XX_*_PHYS_BASE and
SZ_* defines to improve readability. Also some minor whitespace
cleanup resulting from previous patches.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add debounce support for ep93xx gpio interrupts.
On the EP93xx, GPIO ports A, B, and F can be used to generate
interrupts. For each port, if interrupts are enabled, it is
possible to debouce the input signal. Debouncing is implemented
by passing the input signal through a 2-bit shift register clocked
by a 128Hz clock.
This patch adds a platform specific way to enable the debouce
feature for these input ports.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Allow the ep93xx platform init code to register the built-in i2c bus.
The EP93xx processor has two GPIO pins dedicated for an I2C bus. This
patch registers the platform supplied i2c_board_info and the necessary
platform_device information for the i2c-gpio driver to use these pins.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add Cirrus Logic EDB9307A Dev Board to arch/arm/mach-ep93xx
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
As Al did for Versatile in 2ad4f86b60,
add a typesafe __io implementation for platforms to use. Convert
platforms to use this new simple typesafe implementation.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.
This allows us to remove a lot of mach/dma.h files which don't contain
any useful code. Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Let's provide an overridable default instead of having every machine
class define __virt_to_bus and __bus_to_virt to the same thing. What
most platforms are using is bus_addr == phys_addr so such is the default.
One exception is ebsa110 which has no DMA what so ever, so the actual
definition is not important except only for proper compilation. Also
added a comment about the special footbridge bus translation.
Let's also remove comments alluding to set_dma_addr which is not
(and should not) be commonly used.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>