History log of /arch/arm/mach-ep93xx/core.c
Revision Date Author Comments
67e108c530c77cf6b939907536f2ceda3b196dd6 13-Mar-2014 Arnd Bergmann <arnd@arndb.de> ARM: ep93xx: export ep93xx_chip_revision

ep93xx_chip_revision is used by the pata_ep93xx driver,
which can be a loadable module. Exporting the symbol
avoids a link error in this case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
a509ad0ca71cfb2419e8da15e71519b18ad585b3 12-Nov-2013 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> ARM: ep93xx: stop using mach/timex.h

mach/timex.h is the last remaining header that is unused for multiarch
builds but necessary for singlearch builds. To allow to get rid of it
for singlearch builds, too, drop its usage in ep93xx arch code by
substituting CLOCK_TICK_RATE by an already defined local cpp symbol.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
b19e11fbb2d445a95afbf54bdf47010b77980329 19-Nov-2013 H Hartley Sweeten <hsweeten@visionengravers.com> ARM: ep93xx: use soc bus

Use the soc bus to report the silicon revision and Maverick Key. Both
are not currently exposed to the user. In addition, fill in the SoC
family and machine for completeness.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
3a71ae4796fdaedbdbdab94660b7b7b5bfe61d1d 19-Nov-2013 Michael Opdenacker <michael.opdenacker@free-electrons.com> ARM: ep93xx: remove deprecated IRQF_DISABLED

This patch proposes to remove the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
e55f7cd2467631980f749fb0aef197c06ce38d6a 21-Oct-2013 H Hartley Sweeten <hartleys@visionengravers.com> usb: ohci: remove ep93xx bus glue platform driver

Convert ep93xx to use the OHCI platform driver and remove the
ohci-ep93xx bus glue driver.

Enable CONFIG_OHCI_HCD_PLATFORM in the ep93xx_defconfig so that USB
is still enabled by default on the EP93xx platform.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc3874fe56923e713427e4a3737c40746397347e 29-Aug-2013 Petr Štetiar <ynezz@true.cz> ARM: ep93xx: Don't use modem interface on the second UART

Second UART doesn't have modem interface, so any attempt to use set_mctrl() it
produce unwanted garbage on the line. There's no such 0x100 register offset
for the second UART either.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
7b6d864b48d95e6ea1df7df64475b9cb9616dcf9 09-Jul-2013 Robin Holt <holt@sgi.com> reboot: arm: change reboot_mode to use enum reboot_mode

Preparing to move the parsing of reboot= to generic kernel code forces
the change in reboot_mode handling to use the enum.

[akpm@linux-foundation.org: fix arch/arm/mach-socfpga/socfpga.c]
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Russ Anderson <rja@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9e47b8bf9815523a5816f2f83e73b13812d74014 07-Jan-2013 Rob Herring <rob.herring@calxeda.com> irqchip: Move ARM vic.h to include/linux/irqchip/arm-vic.h

Now that we have VIC moved to drivers/irqchip and all VIC DT init for
platforms using irqchip_init, move gic.h and update the remaining
includes.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: STEricsson <STEricsson_nomadik_linux@list.st.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
6bb27d7349db51b50c40534710fe164ca0d58902 08-Nov-2012 Stephen Warren <swarren@nvidia.com> ARM: delete struct sys_timer

Now that the only field in struct sys_timer is .init, delete the struct,
and replace the machine descriptor .timer field with the initialization
function itself.

This will enable moving timer drivers into drivers/clocksource without
having to place a public prototype of each struct sys_timer object into
include/linux; the intent is to create a single of_clocksource_init()
function that determines which timer driver to initialize by scanning
the device dtree, much like the proposed irqchip_init() at:
http://www.spinics.net/lists/arm-kernel/msg203686.html

Includes mach-omap2 fixes from Igor Grinberg.

Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
23c197b77f9553c30f9c8a5ab41279a35f135f37 08-Nov-2012 Stephen Warren <swarren@nvidia.com> ARM: set arch_gettimeoffset directly

remove ARM's struct sys_timer .offset function pointer, and instead
directly set the arch_gettimeoffset function pointer when the timer
driver is initialized. This requires multiplying all function results
by 1000, since the removed arm_gettimeoffset() did this. Also,
s/unsigned long/u32/ just to make the function prototypes exactly
match that of arch_gettimeoffset.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
a3b2924547a79cb6dba683d737501c01476f9fb3 24-Aug-2012 Arnd Bergmann <arnd@arndb.de> ARM: ep93xx: move platform_data definitions

Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the ep93xx include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Axel Lin <axel.lin@gmail.com>
eb774a09017e39a3255e144465d150877b6e6e2f 12-Apr-2012 Rafal Prylowski <prylowski@metasoft.pl> ep93xx: IDE driver platform support code

Add IDE driver platform support code for ep93xx.

Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
c914283f5e5f55ddf770b8632a5e65e5aa24343e 26-Apr-2012 Shawn Guo <shawn.guo@linaro.org> ARM: ep93xx: use machine specific hook for late init

Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
a1eacd79a602707f97201edbac9a03edaaea1847 12-Apr-2012 H Hartley Sweeten <hartleys@visionengravers.com> arm: ep93xx: use gpio_led_register_device

Use gpio_led_register_device to register the two leds
connected to the ep93xx.

Since this is a common feature for all ep93xx based boards,
create a new Kconfig option, EP93XX_SOC_COMMON, to select
the LEDS_GPIO_REGISTER feature.

The struct gpio_led and struct gpio_led_platform_data variables
have been changed to const struct because of:

commit 9517f925f2eb9ffca78b3f0f9389fc675bcb572c
leds: make *struct gpio_led_platform_data.leds const

They have also been marked as __initconst because the helper
function gpio_led_register_device makes a deep copy of the
platform data to allow it to live in init memory:

commit 4440673a95e63ad888a41db596edaa0c55d3a332
leds: provide helper to register "leds-gpio" devices

Signed-off-by: Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
011b2e84582ba873f63f2c42829f1677782b5cfe 12-Apr-2012 Ryan Mallon <rmallon@gmail.com> Fix build breakage in ep93xx-core

Commit ede55aaa8bb2dd37e302b2f94312306d216e5f97 "arm: ep93xx: use
DEFINE_RES_* macros" introduced a build breakage in ep93xx due to a
typo. Fix it.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
5528a8469fbc01db218fbc00ebec1e3fc088e759 05-Apr-2012 Rafal Prylowski <prylowski@metasoft.pl> arm: ep93xx: Don't try to release not acquired GPIO lines

Fail path of ep93xx_keypad_acquire_gpio() tries to release
GPIO lines not acquired successfully before. Fix this.

Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
ede55aaa8bb2dd37e302b2f94312306d216e5f97 21-Mar-2012 H Hartley Sweeten <hartleys@visionengravers.com> arm: ep93xx: use DEFINE_RES_* macros

Use the DEFINE_RES_* macros to reduce some of the boilerplate code.

Signed-off-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
3e0113a896803f792ffdf19b016578420824573f 12-Mar-2012 H Hartley Sweeten <hsweeten@visionengravers.com> watchdog: ep93xx: Convert the watchdog driver into a platform device.

Convert the ep93xx watchdog driver into a platform device and
remove it's dependency on <mach/hardware.h>.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
999c53fb2200070bdb8923c1894f9e14a5ec2de3 11-Jan-2012 Ryan Mallon <rmallon@gmail.com> ep93xx: Make syscon access functions private to SoC

The syscon access functions are no longer used outside of the core
EP93xx code. Move their definitions into the SoC code.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
08932d81961b1c57870949d069ce2dad235da443 10-Jan-2012 Ryan Mallon <rmallon@gmail.com> ep93xx: Configure GPIO ports in core code

Move the pinmux setting of the EP93xx GPIOs to the core code. This
removes the need for the GPIO driver to have access to the system
controller registers.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
a05baf335b8bc25e0fab0fd1821e796174f98ea1 10-Jan-2012 Ryan Mallon <rmallon@gmail.com> ep93xx: Move peripheral defines to local SoC header

Move the AHB/APB peripheral defines to local SoC header since they are
only needed by the core SoC code. The UART defines are not moved
because they are used by the mach/uncompress.h header.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
73303d129201de7af7fa837597e9c470c5efa71f 22-Jan-2012 H Hartley Sweeten <hsweeten@visionengravers.com> ep93xx: Convert the watchdog driver into a platform device.

Convert the ep93xx watchdog driver into a platform device and
remove it's dependency on <mach/hardware.h>.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
0fd1958050e92c859152e775e548284582335d25 22-Jan-2012 Ryan Mallon <rmallon@gmail.com> ep93xx: Use ioremap for backlight driver

The ep93xx backlight driver uses a single register within the
framebuffer's register space. Currently the backlight driver uses a
static IO mapping for the register since the memory cannot be
requested by both drivers.

Convert the static mapping to use ioremap so that we can remove the
dependency on mach/hardware.h. To do so, we need remove the
request_mem_region from both the backlight and framebuffer drivers,
since whichever driver is loaded second will fail with -EBUSY
otherwise.

A proper fix is still required, and a FIXME comment has been added to
both drivers.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
f15855bfaad29b2badd4a5c30ad73e0542a19d16 11-Jan-2012 Ryan Mallon <rmallon@gmail.com> ep93xx: Don't use system controller defines in audio drivers

Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
0b26051b3e28c8877e69f183318561ac0926bdc8 18-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: ep93xx: use common amba device initializers

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
0250eb5e7d19b0f89330be30a88e216db1849aed 18-Dec-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: get rid of NO_IRQ initializers

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
44fb864b8f696d3e8328b294e6515ad45aecfeb0 11-Jan-2012 Ryan Mallon <rmallon@gmail.com> ep93xx: Don't use system controller defines in audio drivers

Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
3275166e0355131aa2349bf614a32591cfe1e118 05-Nov-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: restart: ep93xx: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
dc28094b905a872f8884f1f1c48ca86b3b78583a 31-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> arm: Add export.h to ARM specific files as required.

These files all make use of one of the EXPORT_SYMBOL variants
or the THIS_MODULE macro. So they will need <linux/export.h>

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
bd5f12a24766c1f299def0a78b008d4746f528f2 22-Sep-2011 Linus Walleij <linus.walleij@linaro.org> ARM: 7042/3: mach-ep93xx: break out GPIO driver specifics

The <mach/gpio.h> file is included from upper directories
and deal with generic GPIO and gpiolib stuff. Break out the
platform and driver specific defines and functions into its own
header file.

Cc: Ryan Mallon <rmallon@gmail.com>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
186dcaa448c0a7a99933efac2af225fc4fe82c53 17-Jun-2011 Petr Štetiar <ynezz@true.cz> ARM: 6966/1: ep93xx: fix inverted RTS/DTR signals on uart1

It was discovered by Roberto Bergo, that RTS/DTR signals are inverted after
the boot, because it was causing him problems with hardware controlled modem
connected on ttyAM0. Todd Valentic came with this patch for the issue.

Discussion: http://tech.groups.yahoo.com/group/ts-7000/message/20259

Comments from Petr Štetiar:

Sorry, but forget to add Acked-by[1]:

1. https://patchwork.kernel.org/patch/873052/

Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Todd Valentic <todd.valentic@sri.com>
Tested-by: Roberto Bergo <roberto.bergo@robson.it>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
fa70cf472c0bc3a0d7e613a418cfc1117b796c6c 11-Jun-2011 Mika Westerberg <mika.westerberg@iki.fi> ep93xx: set DMA masks for the ep93xx_eth

Since the driver uses the DMA API, we should pass it valid DMA masks.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
1e4c88420e0da3c855c17770a807cabd5b16dd7a 08-Jun-2011 H Hartley Sweeten <hartleys@visionengravers.com> gpio/ep93xx: convert to platform_driver and use basic_mmio_gpio library

This converts the gpio-ep93xx driver into a platform_driver and uses
the basic_mmio_gpio library.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
626a96db11698119a67eeda130488e869aa6f14e 29-May-2011 Mika Westerberg <mika.westerberg@iki.fi> spi/ep93xx: add DMA support

This patch adds DMA support for the EP93xx SPI driver. By default the DMA is
not enabled but it can be enabled by setting ep93xx_spi_info.use_dma to true
in board configuration file.

Note that the SPI driver still uses PIO for small transfers (<= 8 bytes) for
performance reasons.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
d41071575b0b20b780bb0e8e7e70c62c1b07a883 29-May-2011 Mika Westerberg <mika.westerberg@iki.fi> spi/ep93xx: add DMA support

This patch adds DMA support for the EP93xx SPI driver. By default the DMA is
not enabled but it can be enabled by setting ep93xx_spi_info.use_dma to true
in board configuration file.

Note that the SPI driver still uses PIO for small transfers (<= 8 bytes) for
performance reasons.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
ec11594fbd5a3d2a47a7a7eda6d076363b78957c 05-Feb-2011 Mika Westerberg <mika.westerberg@iki.fi> ARM: 6652/1: ep93xx: correct the end address of the AC97 memory resource

The last register is at offset 0xa8 making the resource end to be 0xac - 1
instead of 0xb0 - 1.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
534bc7fa3c0a9084e7a2db33898d92577c64e4eb 14-Oct-2010 Mika Westerberg <mika.westerberg@iki.fi> ARM: ep93xx: add AC97 platform support

Add platform support for the EP93xx AC97 controller driver.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
f0fba2ad1b6b53d5360125c41953b7afcd6deff0 17-Mar-2010 Liam Girdwood <lrg@slimlogic.co.uk> ASoC: multi-component - ASoC Multi-Component Support

This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

struct snd_soc_codec ---> struct snd_soc_codec (device data)
+-> struct snd_soc_codec_driver (driver data)

struct snd_soc_platform ---> struct snd_soc_platform (device data)
+-> struct snd_soc_platform_driver (driver data)

struct snd_soc_dai ---> struct snd_soc_dai (device data)
+-> struct snd_soc_dai_driver (driver data)

struct snd_soc_device ---> deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

* Stream operations now de-reference less structures.
* close_delayed work() now runs on a DAI basis rather than looping all DAIs
in a card.
* PM suspend()/resume() operations can now handle N CODECs and Platforms
per sound card.
* Added soc_bind_dai_link() to bind the component devices to the sound card.
* Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
DAI link components.
* sysfs entries can now be registered per component per card.
* snd_soc_new_pcms() functionailty rolled into dai_link_probe().
* snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

o Make CODEC driver a platform driver
o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
o Removed all static codec pointers (drivers now support > 1 codec dev)
o snd_soc_register_pcms() now done by core.
o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
a0fb007bf0c7de9ae361a9ad3821df4c69d4d2d9 14-Jun-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 6174/1: ep93xx: clear devcfg bits before setting them

The ep93xx core helper function ep93xx_devcfg_set_clear should mask the
clear_bits before setting the new set_bits in case the clear_bits are a
mask value that also includes the set_bits.

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>
16bcf78f8cac9cc3057c6ce3800490cb6e684ce8 10-Jun-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 6168/1: ep93xx: move physmap flash registration into core.c

Create a core.c __init function to handle the physmap flash
registration for all the ep93xx platforms. Also, modify all
the ep93xx platforms to use this new function.

This simplifies all the ep93xx platform init code and reduces
the size of the kernel when including multiple ep93xx boards.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Martin Guy <martinwguy@gmail.com>
Acked-by: Hubert Feurstein <hubert.feurstein@contec.at>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
6ea4b7418dfd07dc76d20a3c3bf632ee7b59a2c4 09-Jun-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 6167/1: ep93xx: register backlight driver

Add the platform registration for the ep93xx backlight driver that
is now merged.

Since the pwm BRIGHT signal only functions if the video system is
operating, register the backlight when the framebuffer device is
registered.

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>
ed67ea82c0d9a163458dc6a69a7a3123db1a8b3b 08-Jun-2010 Ryan Mallon <ryan@bluewatersys.com> EP93xx: Add i2s core support

Add core support for EP93xx i2s audio

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
4fec9978822a66b25f5645eb20c115034a18cfd1 11-May-2010 Mika Westerberg <mika.westerberg@iki.fi> ARM: 6124/1: ep93xx: SPI driver platform support code

This patch adds platform side support code for the EP93xx SPI
driver. This includes clock, resources and muxing. There is a new
function: ep93xx_register_spi() which can be used by board support
code to register new SPI devices for the board.

This patch depends on patch
5998/1 ep93xx: added chip revision reading function

Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Martin Guy <martinwguy@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
99e6a23adfadc2da2006f3715c4332c3bf502c07 27-Mar-2010 Mika Westerberg <mika.westerberg@iki.fi> ARM: 5998/1: ep93xx: added chip revision reading function

Added a new function: ep93xx_chip_revision() which reads chip revision
from the sysconfig register.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
b370e082e7c4bd47195b2ec117ceeadd9286d8c0 18-Mar-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5992/1: ep93xx: pass platform startup data as __initdata

A number of the peripherals for the ep93xx are registered at
startup using platform_data that is passed from the board init
code to the core code. This data is then copied to a local
static variable in the core code. Since the data is copied,
the original data can be marked as __initdata and discarded
after startup is complete.

This adds the __initdata tag to all the appropriate data in
the various ep93xx board init's. Specifically, all the
struct ep93xx_eth_data, struct ep93xxfb_mach_info, and
struct i2c_gpio_platform_data.

Also, document the various registration functions and note
what data should be marked as __initdata.

While here, also cleanup a couple over zealous whitespace tabs.

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>
1587a373f06ab700004758d6970abb530decef76 23-Feb-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5955/1: ep93xx: move timer defines into core.c and document

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>
d056ab78558c03e6d31c031f7b83f0cb10bee7d4 23-Feb-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c

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>
6bd4b382664d188daed8a48f7df88d188dcd95fa 18-Feb-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5945/1: ep93xx: include correct irq.h in core.c

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>
64d6882d02b0e5f74dd5572039e88517e40edb50 11-Jan-2010 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5877/1: ep93xx: use pr_fmt in core.c

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>
12f56c6889b02453fe050268e9c676e0f8678560 28-Oct-2009 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5775/1: ep93xx: add keypad core support

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>
f248dc626e95a2b61fed3631df49aef23f1736b8 21-Oct-2009 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5768/1: ep93xx: remove dead code in ep93xx_gpio_ab_irq_handler()

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 d8aa0251f12546e9bd1e9ee1d9782d6492819a04
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>
6531a991f95f2f34fc00cf0a030b1cdd5e19dc02 08-Oct-2009 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5754/1: ep93xx: update i2c support

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>
c6012189a40d33213ead5d15769fab615443206f 23-Sep-2009 Ryan Mallon <ryan@bluewatersys.com> ep93xx video driver platform support

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>
af1057abd7d5f97e17ab96e34d1920746188ddcb 03-Aug-2009 Julia Lawall <julia@diku.dk> ARM: 5635/1: Use DIV_ROUND_CLOSEST

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>
ef12379f205bed7e92434e12ddd44e62d13bebe1 29-Jul-2009 Hartley Sweeten <hartleys@visionengravers.com> ARM: 5628/1: ep93xx: Introduce Pulse Width Modulator (PWM) driver

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>
3aa7a9a3cf8774f6701b1903a6353f9545f561ce 20-Jul-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5612/1: ep93xx: add platform LEDs

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>
fbeeea5386ab213bd55b223f3a75c823fccd6df5 15-Jul-2009 Ryan Mallon <ryan@bluewatersys.com> [ARM] 5607/1: ep93xx: Use __iomem pointer on syscon write function

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>
5b1c3c858cff4da95b9f7091eef424e706784cab 13-Jul-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5600/1: ep93xx: core.c remove cast when copying dev_addr

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>
5396730b3caad500ceba84c9391143cafb5938a8 10-Jul-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5598/1: ep93xx: core.c typesafe vic_init

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>
583ddafe1787528d08b0026bb3273490a499b730 06-Jul-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5592/1: ep93xx: cleanup platform header includes

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>
02239f0a4264608686cc0015d906c7b2dead89df 08-Jul-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5577/2: ep93xx: syscon locked register functions

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>
68ee3d83b238fa97e12775963f2b526c5dc74823 28-May-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5527/1: ep93xx: core.c: trivial spelling error

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>
c07f87f22ecc94201893b7a25430b7f5d5fd6de8 24-Mar-2009 Ben Dooks <ben-linux@fluff.org> [ARM] VIC: Add power management device

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>
38f7b009a6ae1708fcf0f208aba9a9a4364bcfcf 16-Apr-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5452/1: ep93x: rtc: use ioremap'ed addresses

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>
d5565f76d30a164570d883ab2e77a24b6b8686a0 14-Apr-2009 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5451/1: ep93xx:core.c: build warning fix

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>
1d559e29138834bbcdf34ac072232bf543bfc4e0 06-Jan-2009 Kay Sievers <kay.sievers@vrfy.org> arm: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
799a0600ac49b03c1a6244847c2725c0082ba775 28-Oct-2008 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5324/2: ep93xx: support gpio interrupt debounce

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>
d52a26a956d3925c6eaf8770e95e4d5f13740696 17-Oct-2008 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5311/1: ep93xx: add core support for built in i2c bus

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>
63890a0ee1af994122094bd01f87ea6251631a3f 29-Oct-2008 Matthias Kaehlcke <matthias@kaehlcke.net> [ARM] ep93xx: fix OHCI DMA mask

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>
d8aa0251f12546e9bd1e9ee1d9782d6492819a04 09-Oct-2008 Dmitry Baryshkov <dbaryshkov@gmail.com> [ARM] 5298/1: Drop desc_handle_irq()

desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a0a08fdca534e1dffc6d8bb239f53177ab06f946 04-Oct-2008 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5273/2: ep93xx: move ethernet support into core.c

All EP93xx based systems can support Ethernet. This patch moves
the platform_device setup from the various board support files
into the core support file. The Ethernet driver data still remains
in the individual platform setup files to allow specific platform
configuration.

This also adds Ethernet support to the edb9302, edb9312, and
edb9315 platforms.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
f69162ae63a5fa045aff35b535906696ba85666f 05-Sep-2008 Hartley Sweeten <hartleys@visionengravers.com> [ARM] 5242/1: ep93xx: bugfix, GPIO port F enable register offset

The GPIO port F enable register offset points to the wrong register,
0x5c is the IntStsF register. The correct offset is 0x58. This patch
corrects it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
fced80c735941fa518ac67c0b61bbe153fb8c050 06-Sep-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Convert asm/io.h to linux/io.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a09e64fbc0094e3073dbb09c3b4bfe4ab669244b 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
be509729356b7433f73df2b9a966674a437fbbc1 04-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead

Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
6cab48602996cdbcb277375a8107d53e21e8c9b9 27-Jul-2008 Dmitry Baryshkov <dbaryshkov@gmail.com> [ARM] 5179/1: Replace obsolete IRQT_* and __IRQT_* values with IRQ_TYPE_*

IRQT_* and __IRQT_* were obsoleted long ago by patch [3692/1].
Remove them completely. Sed script for the reference:

s/__IRQT_RISEDGE/IRQ_TYPE_EDGE_RISING/g
s/__IRQT_FALEDGE/IRQ_TYPE_EDGE_FALLING/g
s/__IRQT_LOWLVL/IRQ_TYPE_LEVEL_LOW/g
s/__IRQT_HIGHLVL/IRQ_TYPE_LEVEL_HIGH/g
s/IRQT_RISING/IRQ_TYPE_EDGE_RISING/g
s/IRQT_FALLING/IRQ_TYPE_EDGE_FALLING/g
s/IRQT_BOTHEDGE/IRQ_TYPE_EDGE_BOTH/g
s/IRQT_LOW/IRQ_TYPE_LEVEL_LOW/g
s/IRQT_HIGH/IRQ_TYPE_LEVEL_HIGH/g
s/IRQT_PROBE/IRQ_TYPE_PROBE/g
s/IRQT_NOEDGE/IRQ_TYPE_NONE/g

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
f8b6389bd53361a19ec5236e298527c9c905ca4d 29-Apr-2008 Ryan Mallon <ryan@bluewatersys.com> [ARM] 5023/1: Fix broken gpio interrupts on ep93xx

Change gpio_direction_output to gpio_direction_input in
ep93xx_gpio_irq_type. Fixes broken gpio interrupts.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
b685004f8dea2daae0306edcd358ed7de751aee9 16-Apr-2008 Ryan Mallon <ryan@bluewatersys.com> [ARM] 4988/1: Add GPIO lib support to the EP93xx

Adds support for the generic GPIO lib to the EP93xx family. The gpio
handling code has been moved from core.c to a new file called gpio.c.
The GPIO based IRQ code has not been changed.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
193c3cc12583344be01206078d9ad3fec5dbc397 28-Jan-2008 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Fix timer damage from d3d74453c34f8fd87674a8cf5b8a327c68f22e99

Move the xtime write mode seqlock into timer_tick(), so it only
surrounds the call to do_timer().

This avoids a deadlock in update_process_times() ...
hrtimer_get_softirq_time() which tries to get a read mode seqlock
on xtime, thereby preventing booting.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1d7d4f54b1337bf64605dc9cb3c540f67843be39 21-Nov-2007 Lucas Woods <woodzy@gmail.com> [ARM] remove duplicate includes

Signed-off-by: Lucas Woods <woodzy@gmail.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
6331acd78f7916db16ec20b50d7838bd4944cd27 26-Nov-2007 Herbert Valerio Riedel <hvr@gnu.org> [ARM] 4671/1: ep93xx: remove obsolete gpio_line_* operations

With the new GPIO methods in place the old gpio_line_* methods are redundant,
so this patch finally removes the old legacy gpio_line_* wrappers.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
3c9a071d77e007464952a2d41b6686d98eb3f0b8 26-Nov-2007 Herbert Valerio Riedel <hvr@gnu.org> [ARM] 4670/1: ep93xx: implement IRQT_BOTHEDGE gpio irq sense type

Having a both-edge sensitive irq trigger type is required for the
generic gpio-keys input driver; alas the ep93xx does not support
both-edge gpio triggers in hardware, so this patch implements them by
switching edge polarity on each triggered interrupt. This is the same
approach as taken by the Orion SoC both-edge gpio irq support
implementation.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
7ca722533979d47563e75a40c86c405153818b83 26-Nov-2007 Herbert Valerio Riedel <hvr@gnu.org> [ARM] 4669/1: ep93xx: simplify GPIO code and cleanups

This patch renumbers the (virtual) GPIO line numbering to have all
irq-capable gpio lines <= EP93XX_GPIO_LINE_MAX_IRQ by swapping the
port f range with the port c range; This simplifies code such as

#define IRQ_EP93XX_GPIO(x) (64 + (((x) + (((x) >> 2) & 8)) & 0x1f))

or

if (line >= 0 && line < 16) {
/* Port A/B */
} else if (line >= 40 && line < 48) {
/* Port F */
}

considerably; in addition to the renumbering this patch also
introduces macro constants EP93XX_GPIO_LINE_MAX_IRQ and
EP93XX_GPIO_LINE_MAX, and replaces most magic numbers by those and
invocations of gpio_to_irq()/irq_to_gpio().

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
4e9f9fd5148004b983b29e15de66918e71da56c0 26-Nov-2007 Herbert Valerio Riedel <hvr@gnu.org> [ARM] 4668/1: ep93xx: implement new GPIO API

Implement new GPIO API for ep93xx platform as defined in Documentation/gpio.txt
and provide transitional __deprecated wrappers for the previous gpio_line_*
functions.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
8742bc92c36324ac4bac739ab413acc6630a875d 16-Sep-2007 Herbert Valerio Riedel <hvr@gnu.org> [ARM] 4569/1: ep93xx_gpio_irq_type(): fix spurious enumeration offset for FGPIO handling

The EP93XX_GPIO_LINE_F() macro is supposed to be called with a line
number between 0 and 7, but the current code causes it to get called
with an spuriously offset number range {16..23}.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
b30fabadae2b3c1a65e3662be98f105d5718db70 08-May-2007 Bernhard Walle <bwalle@suse.de> Add IRQF_IRQPOLL flag on arm

Add IRQF_IRQPOLL for each timer interrupt.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
271f5ca638b322248c6bb0a797284886f39ccce6 08-Feb-2007 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 4142/1: ep93xx: handle IRQT_NOEDGE

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
4932e397be71370b95f555f87d3b424d2b5ca57b 05-Feb-2007 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 4122/1: ep93xx: add support for GPIO port F interrupts

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
fac105d05e4b410c586de55dfbf34f40a95f6977 05-Feb-2007 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 4121/1: ep93xx: move setting of HWCAP_CRUNCH

Move the setting of HWCAP_CRUNCH to kernel/crunch.c, where it belongs.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
51dd249eff28924f838a72a50c417b2089e0f6a9 04-Feb-2007 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 4120/1: ep93xx: make clock init an arch_initcall()

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
99e4a6dda9dc4b863773c0a5857b762474b817cf 18-Dec-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 4054/1: ep93xx: add HWCAP_CRUNCH

Add HWCAP_CRUNCH so that the dynamic linker knows whether it can
use Crunch-optimised libraries or not.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
10dd5ce28d78e2440e8fa1135d17e33399d75340 23-Nov-2006 Russell King <rmk@dyn-67.arm.linux.org.uk> [ARM] Remove compatibility layer for ARM irqs

set_irq_chipdata -> set_irq_chip_data
get_irq_chipdata -> get_irq_chip_data
do_level_IRQ -> handle_level_irq
do_edge_IRQ -> handle_edge_irq
do_simple_IRQ -> handle_simple_irq
irqdesc -> irq_desc
irqchip -> irq_chip

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
0cd61b68c340a4f901a06e8bb5e0dea4353161c0 06-Oct-2006 Linus Torvalds <torvalds@g5.osdl.org> Initial blind fixup for arm for irq changes

Untested, but this should fix up the bulk of the totally mechanical
issues, and should make the actual detail fixing easier.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
52e405eaa9806968e88b35d65e57acad954a5ab5 03-Jul-2006 Thomas Gleixner <tglx@linutronix.de> [PATCH] ARM: fixup irqflags breakage after ARM genirq merge

The irgflags consolidation did conflict with the ARM to generic IRQ
conversion and was not applied for ARM. Fix it up.

Use the new IRQF_ constants and remove the SA_INTERRUPT define

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
1f64eb379cfc95d5f627b779685f7ac6721df322 24-Jun-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3646/1: ep93xx: instantiate ep93xx-ohci platform device

Patch from Lennert Buytenhek

The ep93xx ohci bits have been merged into the gregkh-2.6 tree, which
means that they will probably go upstream soon, so make the core ep93xx
code instantiate an appropriate ep93xx-ohci platform device.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1d81eedb8f6c13c262a70b8167530ec24b09c0ff 24-Jun-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3634/1: ep93xx: initial implementation of the clk_* API

Patch from Lennert Buytenhek

Add an initial implementation of the clk_* API for the cirrus ep93xx
to the tree. The initial implementation is somewhat minimal, with the
intention of extending it as we go along.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a059e33ce67cec5e990fdec43f242d3b06c60d1a 22-Jun-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3617/1: ep93xx: fix slightly incorrect timer tick rate

Patch from Lennert Buytenhek

The tick rate of timers 1-3 isn't exactly 508 kHz as some parts of the
relevant documentation claim, but more like 508.469 kHz (14.7456 MHz
divided by 29.)

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
f869afab8f36c5f8561557f74b4b9846719092da 22-Jun-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3616/1: fix timer handler wrap logic for a number of platforms

Patch from Lennert Buytenhek

A couple of platforms aren't using the right comparison type in their
timer interrupt handlers (as we're comparing two wrapping timestamps,
we need a bmi/bpl-type comparison, not an unsigned comparison) -- this
patch fixes them up.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
41658132e650c01529dd5cc5cea8b0055def1165 02-Apr-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3450/1: ep93xx: use the ep93xx rtc driver

Patch from Lennert Buytenhek

Instantiate the recently merged ep93xx rtc driver in the ep93xx code.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
aee85fe8e8143d3f54d9e6d3c6cdd40ead563267 27-Mar-2006 Lennert Buytenhek <buytenh@wantstofly.org> [SERIAL] Provide Cirrus EP93xx AMBA PL010 serial support.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
bd20ff5793b4ece4fa3e9e0fcf8e6bbd93526215 20-Mar-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3374/1: ep93xx: gpio interrupt support

Patch from Lennert Buytenhek

Add GPIO interrupt support for the first 16 GPIO lines (port A
and B.)

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
a8e19667a42d752f3eca6eaa17aa5d6f93066dfe 20-Mar-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3371/1: ep93xx: gpio support

Patch from Lennert Buytenhek

Add support for setting the direction of and getting/setting the
value of the 64 GPIO lines.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
e7736d47a11a771ba87314be563b2cb6b8d11d14 20-Mar-2006 Lennert Buytenhek <buytenh@wantstofly.org> [ARM] 3369/1: ep93xx: add core cirrus ep93xx support

Patch from Lennert Buytenhek

This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.

This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>