aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood/board-km_kirkwood.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-22 13:22:21 -0700
committerOlof Johansson <olof@lixom.net>2012-09-22 13:22:21 -0700
commit80868a36913e11cfcd06764699b4284d34be0e59 (patch)
treeaf4c634ccde4c0b4b7bf361e53611ab9903d1a2c /arch/arm/mach-kirkwood/board-km_kirkwood.c
parentb1618547bb68bd32a8b5ed20f97fa577d16b6801 (diff)
parent0f81bd438bed6af47a01a97d5ecbb23a7e478de6 (diff)
Merge branch 'kirkwood/boards' of git://git.infradead.org/users/jcooper/linux into late/kirkwood
* 'kirkwood/boards' of git://git.infradead.org/users/jcooper/linux: ARM: Dove: allow PCI to be disabled ARM: dove: SolidRun CuBox DT ARM: dove: add device tree descriptors ARM: dove: add device tree based machine descriptor ARM: dove: add crypto engine ARM: dove: add clock gating control ARM: dove: unify clock setup ARM: initial DTS support for km_kirkwood arm: add documentation describing Marvell families of SoC ARM: kirkwood: DT descriptor for Seagate FreeAgent Dockstar ARM: kirkwood: DT board setup for Seagate FreeAgent Dockstar ARM: Kirkwood: Iomega ix2-200 DT support Context conflicts in arch/arm/Kconfig and arch/arm/mach-dove/common.c. The new device trees added to arch/arm/mach-kirkwood/Makefile.boot are kept and dealt with in a separate changeset, since moving them out to the new Makefile in this merge commit doesn't work well. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-kirkwood/board-km_kirkwood.c')
-rw-r--r--arch/arm/mach-kirkwood/board-km_kirkwood.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c
new file mode 100644
index 00000000000..f7d32834b75
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-km_kirkwood.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2012 2012 KEYMILE AG, CH-3097 Bern
+ * Valentin Longchamp <valentin.longchamp@keymile.com>
+ *
+ * arch/arm/mach-kirkwood/board-km_kirkwood.c
+ *
+ * Keymile km_kirkwood Reference Desing Init for drivers not converted to
+ * flattened device tree yet.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/clk.h>
+#include <linux/clk-private.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
+};
+
+static unsigned int km_kirkwood_mpp_config[] __initdata = {
+ MPP8_GPIO, /* I2C SDA */
+ MPP9_GPIO, /* I2C SCL */
+ 0
+};
+
+void __init km_kirkwood_init(void)
+{
+ struct clk *sata_clk;
+ /*
+ * Basic setup. Needs to be called early.
+ */
+ kirkwood_mpp_conf(km_kirkwood_mpp_config);
+
+ /*
+ * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing
+ * SATA bits (14-15) of the Clock Gating Control Register. Since these
+ * devices are also not present in this variant, their clocks get
+ * disabled because unused when clk_disable_unused() gets called.
+ * That's why we change the flags to these clocks to CLK_IGNORE_UNUSED
+ */
+ sata_clk = clk_get_sys("sata_mv.0", "0");
+ if (!IS_ERR(sata_clk))
+ sata_clk->flags |= CLK_IGNORE_UNUSED;
+ sata_clk = clk_get_sys("sata_mv.0", "1");
+ if (!IS_ERR(sata_clk))
+ sata_clk->flags |= CLK_IGNORE_UNUSED;
+
+ kirkwood_ehci_init();
+ kirkwood_ge00_init(&km_kirkwood_ge00_data);
+}