Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331332
b: refs/heads/master
c: 0510c8a
h: refs/heads/master
v: v3
  • Loading branch information
Valentin Longchamp authored and Jason Cooper committed Sep 21, 2012
1 parent 9893e17 commit cea0566
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 903234673f1421f5ad9a74bafca427b812f59c93
refs/heads/master: 0510c8a014432b45f09509d1fb450922ec96b40d
29 changes: 29 additions & 0 deletions trunk/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/dts-v1/;

/include/ "kirkwood.dtsi"

/ {
model = "Keymile Kirkwood Reference Design";
compatible = "keymile,km_kirkwood", "marvell,kirkwood-98DX4122", "marvell,kirkwood";

memory {
device_type = "memory";
reg = <0x00000000 0x08000000>;
};

chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
};

ocp@f1000000 {
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};

nand@3000000 {
status = "ok";
chip-delay = <25>;
};
};
};
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-kirkwood/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ config MACH_IOMEGA_IX2_200_DT
Say 'Y' here if you want your kernel to support the
Iomega StorCenter ix2-200 (Flattened Device Tree).

config MACH_KM_KIRKWOOD_DT
bool "Keymile Kirkwood Reference Design (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the
Keymile Kirkwood Reference Desgin, using Flattened Device Tree.

config MACH_TS219
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
help
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-kirkwood/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o
obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-kirkwood/Makefile.boot
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb
dtb-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb
dtb-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += kirkwood-iomega_ix2_200.dtb
dtb-$(CONFIG_MACH_DOCKSTAR_DT) += kirkwood-dockstar.dtb
dtb-$(CONFIG_MACH_KM_KIRKWOOD_DT) += kirkwood-km_kirkwood.dtb
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-kirkwood/board-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ static void __init kirkwood_dt_init(void)
if (of_machine_is_compatible("iom,ix2-200"))
iomega_ix2_200_init();

if (of_machine_is_compatible("keymile,km_kirkwood"))
km_kirkwood_init();

of_platform_populate(NULL, kirkwood_dt_match_table,
kirkwood_auxdata_lookup, NULL);
}
Expand All @@ -108,6 +111,7 @@ static const char *kirkwood_dt_board_compat[] = {
"seagate,goflexnet",
"buffalo,lsxl",
"iom,ix2-200",
"keymile,km_kirkwood",
NULL
};

Expand Down
57 changes: 57 additions & 0 deletions trunk/arch/arm/mach-kirkwood/board-km_kirkwood.c
Original file line number Diff line number Diff line change
@@ -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);
}
6 changes: 6 additions & 0 deletions trunk/arch/arm/mach-kirkwood/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ void iomega_ix2_200_init(void);
static inline void iomega_ix2_200_init(void) {};
#endif

#ifdef CONFIG_MACH_KM_KIRKWOOD_DT
void km_kirkwood_init(void);
#else
static inline void km_kirkwood_init(void) {};
#endif

/* early init functions not converted to fdt yet */
char *kirkwood_id(void);
void kirkwood_l2_init(void);
Expand Down

0 comments on commit cea0566

Please sign in to comment.