summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik/i2c-8815nhk.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-01-05 00:29:31 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-01-28 23:23:44 +0100
commitf8635abd38776a413d1e84c79353693b8ecf45c9 (patch)
tree335410b72facf10dac9bbd53aeafd570eb4dd538 /arch/arm/mach-nomadik/i2c-8815nhk.c
parenta352d85adbe8ed0c5c8c69e3ea0ee1833b3ee27e (diff)
downloadop-kernel-dev-f8635abd38776a413d1e84c79353693b8ecf45c9.zip
op-kernel-dev-f8635abd38776a413d1e84c79353693b8ecf45c9.tar.gz
ARM: nomadik: initial devicetree support
Support basic device tree boot on the Nomadik. Implement the support in the cpu file with the intent of deleting the board files later. At this stage IRQ controllers, system timer, l2x0 cache, UARTs and thus console boot is fully functional. Patch out the code adding devices by initcalls for now so as not to disturb the boot. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-nomadik/i2c-8815nhk.c')
-rw-r--r--arch/arm/mach-nomadik/i2c-8815nhk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c
index f0e9e64..299ff5a 100644
--- a/arch/arm/mach-nomadik/i2c-8815nhk.c
+++ b/arch/arm/mach-nomadik/i2c-8815nhk.c
@@ -4,6 +4,7 @@
#include <linux/i2c-algo-bit.h>
#include <linux/i2c-gpio.h>
#include <linux/platform_device.h>
+#include <asm/mach-types.h>
/*
* There are two busses in the 8815NHK.
@@ -58,6 +59,10 @@ static struct platform_device nhk8815_i2c_dev2 = {
static int __init nhk8815_i2c_init(void)
{
+ /* For e.g. devicetree boot */
+ if (!machine_is_nomadik())
+ return 0;
+
platform_device_register(&nhk8815_i2c_dev0);
platform_device_register(&nhk8815_i2c_dev1);
platform_device_register(&nhk8815_i2c_dev2);
OpenPOWER on IntegriCloud