ARM: ux500: Change IRQ from low-to-high edge triggered to high-to-low

When the STMPE IRQ is triggered to be active high level-sensitive, the
Nomadik GPIO controller it uses complains, although it still works.
Recently we attempted to move triggering to low-to-high in an attempt
to prevent the warning; however, this ensured that the IRQ was actually
missed completely. Now we have a solution which both works and keeps the
GPIO controller happy.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Include the PRCMU's Secure Registers in DB8500's DT

Currently we only include the PRCMU's primary registers when
referencing the register count in the 'reg' property. This patch
expands that count to include the secure registers also.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Provide a means to obtain the SMSC9115 clock when DT is enabled

Device Tree names devices differently to how some frameworks expect
them. Until we can move a platform over to the new way of obtaining
resources, we have to use the OF_DEV_AUXDATA() macros to craft a
device name which can be used in searches during allocation time.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
clk: ux500: Ensure the FMSC clock is obtainable

The FMSC clock is traditionally used for NAND flash devices when
used on the ux500 series platforms. This patch makes it searchable
during a clock-name search.

Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
clk: ux500: Provide an alias for the SMSC911x Ethernet chip

In the case of some of the ux500 platforms, an Ethernet chip is
placed on an extended bus which is traditionally used as a NAND
flash chip placeholder. The p3_pclk0 clock is used to control it,
so we are required to provide and easy way to access it from the
SMSC911x driver. We do this using an alias provided by this patch.

Acked-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
net/smsc911x: Provide common clock functionality

Some platforms provide clocks which require enabling before the
SMSC911x chip will power on. This patch uses the new common clk
framework to do just that. If no clock is provided, it will just
be ignored and the driver will continue to assume that no clock
is required for the chip to run successfully.

Acked-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
mmc: mmci: Move ios_handler functionality into the driver

There are currently two instances of the ios_handler being used.
Both of which mearly toy with some regulator settings. Now there
is a GPIO regulator API, we can use that instead, and lessen the
per platform burden. By doing this, we also become more Device
Tree compatible.

Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Set correct MMCI regulator voltages in the ux5x0 Device Tree

Correct the voltage specified by the mmci regulator node in Device
Tree. Despite the MMC subsystem insisting on v3.3, we actually only
offer v2.9, and not v2.6 which must have actually been a typo.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Specify the ux5x0 MMCI regulator's on/off GPIO as high-enable

If not specified, the GPIO control bit is inverted by default i.e.
low-enable and high-disable. This is not the case with the MMCI
regulator, hence it will turn on during a disable and off when
regulator_enable() is invoked.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Specify which IOS regulator to use for MMCI

In an effort to move platform specific GPIO controlled regulators
out from platform code we've created a new mechanism to specify
them from within the MMCI driver using the supply name 'vmmc-ios'.
For that to happen when booting device tree, we need to supply it
in the MMCI (SDI) node.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Use the correct name when supplying a GPIO enable pin

Correct a typo in the Device Tree source file, where instead of
specifying property 'enable-gpio', which the driver is expecting
we specified 'gpio-enable' instead.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Setup correct settling time for the MMCI regulator

The GPIO controlled MMCI regulator used on the ux5x0 boards takes
100us to settle. There's already a binding to provide such
information. Let's make use of it.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Use the GPIO regulator framework for SDI0's 'en' and 'vsel'

To prevent lots of unnecessary call-backs into platform code, we're
now using the GPIO regulator framework to control the 'enable' (en)
and 'voltage select' (vsel) GPIO pins which in turn control the
MMCI's secondary regulator settings. This already works with Device
Tree, but when booting with ATAGs we need to register it as a
platform device.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: Remove traces of the ios_handler from platform code

Now MMCI on/off functionality is using the regulator framework
from the MMCI driver, there is no need to keep the ios_handler
laying around, duplicating functionality. So we're removing it.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: enable AB8500 GPIO for HREF

The AB8500 GPIO driver has been un-BROKEN and rewritten as a pinctrl
driver. Now that it's back in use, let's ensure that it's available
when booting HREF with Device Tree enabled.

Cc: arm@kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
ARM: ux500: allow Snowball access to the AB8500 GPIO pins

The AB8500 GPIO driver has been un-BROKEN and rewritten as a pinctrl
driver. Now that it's back in use, let's ensure that it's available
when booting Snowball with Device Tree enabled.

Cc: arm@kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
mmc: s3cmci: moved mach/regs-sdi.h into s3cmci device driver

Since mach/regs-sdi.h is used only for s3cmci.c, so this moves the
header file into the driver file, drivers/mmc/host/s3cmci.c file.

Cc: Chris Ball <cjb@laptop.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S3C24XX: plat/common-smdk.h local

The header file plat/common-smdk.h is used only in mach-s3c24xx/,
so this patch moves it into mach-s3c24xx directory.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S3C24XX: remove plat/irq.h in plat-samsung

plat-samsung/irq.h did only contain functions for handling the spread out
subirqs on s3c24xx arches, which are not needed anymore.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[kgene.kim@samsung.com: fixed build error on bast-irq.c]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
ARM: S3C24XX: move plat-samsung/s3c24XX headers to local common.h

The different soc functions are now only used in the mach-s3c24xx
directory, so it's not necessary anymore to keep the globally
visible.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>