X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=arch%2Farm%2Fmach-kirkwood%2Fboard-dt.c;h=f087b5f22425541b92864f572f2f13afdc66d8d5;hb=7f69f8a4997ad12e062ddac8d6f996a50b26ebc2;hp=682b7ac8deb892e51a24452ff7460f082c6fe38e;hpb=fe870ae70bda4bb19ae6920a62e7d05f1dde9b2b;p=cascardo%2Flinux.git diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 682b7ac8deb8..f087b5f22425 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -49,10 +52,6 @@ static void __init kirkwood_legacy_clk_init(void) orion_clkdev_add("1", "pcie", of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CGC_BIT_SDIO; - orion_clkdev_add(NULL, "mvsdio", - of_clk_get_from_provider(&clkspec)); - /* * The ethernet interfaces forget the MAC address assigned by * u-boot if the clocks are turned off. Until proper DT support @@ -60,19 +59,24 @@ static void __init kirkwood_legacy_clk_init(void) */ clkspec.args[0] = CGC_BIT_GE0; clk = of_clk_get_from_provider(&clkspec); - orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk); clk_prepare_enable(clk); clkspec.args[0] = CGC_BIT_GE1; clk = of_clk_get_from_provider(&clkspec); - orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk); clk_prepare_enable(clk); } -static void __init kirkwood_of_clk_init(void) +static void __init kirkwood_dt_time_init(void) { of_clk_init(NULL); - kirkwood_legacy_clk_init(); + clocksource_of_init(); +} + +static void __init kirkwood_dt_init_early(void) +{ + mvebu_mbus_init("marvell,kirkwood-mbus", + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, + DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); } static void __init kirkwood_dt_init(void) @@ -88,14 +92,13 @@ static void __init kirkwood_dt_init(void) writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); BUG_ON(mvebu_mbus_dt_init()); - kirkwood_setup_wins(); kirkwood_l2_init(); kirkwood_cpufreq_init(); - /* Setup root of clk tree */ - kirkwood_of_clk_init(); + /* Setup clocks for legacy devices */ + kirkwood_legacy_clk_init(); kirkwood_cpuidle_init(); @@ -103,105 +106,22 @@ static void __init kirkwood_dt_init(void) kexec_reinit = kirkwood_enable_pcie; #endif - if (of_machine_is_compatible("globalscale,dreamplug")) - dreamplug_init(); - - if (of_machine_is_compatible("globalscale,guruplug")) - guruplug_dt_init(); - - if (of_machine_is_compatible("globalscale,sheevaplug")) - sheevaplug_dt_init(); - - if (of_machine_is_compatible("dlink,dns-kirkwood")) - dnskw_init(); - - if (of_machine_is_compatible("iom,iconnect")) - iconnect_init(); - - if (of_machine_is_compatible("raidsonic,ib-nas62x0")) - ib62x0_init(); - - if (of_machine_is_compatible("qnap,ts219")) - qnap_dt_ts219_init(); - - if (of_machine_is_compatible("seagate,dockstar")) - dockstar_dt_init(); - - if (of_machine_is_compatible("seagate,goflexnet")) - goflexnet_init(); - - if (of_machine_is_compatible("buffalo,lsxl")) - lsxl_init(); - - if (of_machine_is_compatible("iom,ix2-200")) - iomega_ix2_200_init(); - - if (of_machine_is_compatible("keymile,km_kirkwood")) - km_kirkwood_init(); - - if (of_machine_is_compatible("lacie,cloudbox") || - of_machine_is_compatible("lacie,inetspace_v2") || - of_machine_is_compatible("lacie,netspace_lite_v2") || - of_machine_is_compatible("lacie,netspace_max_v2") || - of_machine_is_compatible("lacie,netspace_mini_v2") || - of_machine_is_compatible("lacie,netspace_v2")) - ns2_init(); - - if (of_machine_is_compatible("marvell,db-88f6281-bp") || - of_machine_is_compatible("marvell,db-88f6282-bp")) - db88f628x_init(); - - if (of_machine_is_compatible("mpl,cec4")) - mplcec4_init(); - - if (of_machine_is_compatible("netgear,readynas-duo-v2")) - netgear_readynas_init(); - - if (of_machine_is_compatible("plathome,openblocks-a6")) - openblocks_a6_init(); - - if (of_machine_is_compatible("usi,topkick")) - usi_topkick_init(); + if (of_machine_is_compatible("marvell,mv88f6281gtw-ge")) + mv88f6281gtw_ge_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } static const char * const kirkwood_dt_board_compat[] = { - "globalscale,dreamplug", - "globalscale,guruplug", - "globalscale,sheevaplug", - "dlink,dns-320", - "dlink,dns-325", - "iom,iconnect", - "raidsonic,ib-nas62x0", - "qnap,ts219", - "seagate,dockstar", - "seagate,goflexnet", - "buffalo,lsxl", - "iom,ix2-200", - "keymile,km_kirkwood", - "lacie,cloudbox", - "lacie,inetspace_v2", - "lacie,netspace_lite_v2", - "lacie,netspace_max_v2", - "lacie,netspace_mini_v2", - "lacie,netspace_v2", - "marvell,db-88f6281-bp", - "marvell,db-88f6282-bp", - "mpl,cec4", - "netgear,readynas-duo-v2", - "plathome,openblocks-a6", - "usi,topkick", - "zyxel,nsa310", + "marvell,kirkwood", NULL }; DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") /* Maintainer: Jason Cooper */ .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = orion_dt_init_irq, - .init_time = kirkwood_timer_init, + .init_early = kirkwood_dt_init_early, + .init_time = kirkwood_dt_time_init, .init_machine = kirkwood_dt_init, .restart = kirkwood_restart, .dt_compat = kirkwood_dt_board_compat,