summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/wago-pfc-am35xx/board.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-12-13 08:46:39 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-07 12:46:22 +0100
commit309112fce0171381a06c1c1b721a3102c2ed711f (patch)
tree7bc06b20fe4031b17f968a058bf026cee6a583d5 /arch/arm/boards/wago-pfc-am35xx/board.c
parent7ccff2074025881f3e1a8bb83d6c7b737be5abbc (diff)
downloadbarebox-309112fce0171381a06c1c1b721a3102c2ed711f.tar.gz
barebox-309112fce0171381a06c1c1b721a3102c2ed711f.tar.xz
ARM: omap: Add board support for WAGO pfc200 platform
This adds support for the AM3517 based WAGO pfc200 SPS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/wago-pfc-am35xx/board.c')
-rw-r--r--arch/arm/boards/wago-pfc-am35xx/board.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/boards/wago-pfc-am35xx/board.c b/arch/arm/boards/wago-pfc-am35xx/board.c
new file mode 100644
index 0000000000..2bad40912d
--- /dev/null
+++ b/arch/arm/boards/wago-pfc-am35xx/board.c
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2014 WAGO Kontakttechnik GmbH & Co. KG <http://global.wago.com>
+ * Author: Heinrich Toews <heinrich.toews@wago.com>
+ */
+
+#include <common.h>
+#include <init.h>
+#include <driver.h>
+#include <gpio.h>
+#include <linux/sizes.h>
+#include <linux/err.h>
+#include <asm/memory.h>
+#include <mach/generic.h>
+
+static int pfc200_mem_init(void)
+{
+ if (!of_machine_is_compatible("ti,pfc200"))
+ return 0;
+
+ arm_add_mem_device("ram0", 0x80000000, SZ_256M);
+ return 0;
+}
+mem_initcall(pfc200_mem_init);
+
+#define GPIO_KSZ886x_RESET 136
+
+static int pfc200_devices_init(void)
+{
+ if (!of_machine_is_compatible("ti,pfc200"))
+ return 0;
+
+ gpio_direction_output(GPIO_KSZ886x_RESET, 1);
+
+ omap_set_bootmmc_devname("mmc0");
+
+ return 0;
+}
+coredevice_initcall(pfc200_devices_init);