From: Arnd Bergmann Date: Mon, 9 Jan 2012 17:06:36 +0000 (+0000) Subject: Merge branch 'samsung/cleanup' into next/boards X-Git-Tag: v3.3-rc1~140^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=421b759b86eb8a914cbbd11f6d09a74f411762c6;p=linux.git Merge branch 'samsung/cleanup' into next/boards Conflicts: arch/arm/mach-imx/mach-imx6q.c arch/arm/mach-omap2/board-ti8168evm.c arch/arm/mach-s3c64xx/Kconfig arch/arm/mach-tegra/Makefile arch/arm/mach-tegra/board-dt-tegra20.c arch/arm/mach-tegra/common.c Lots of relatively simple conflicts between the board changes and stuff from the arm tree. This pulls in the resolution from the samsung/cleanup tree, so we don't get conflicting merges. Signed-off-by: Arnd Bergmann --- 421b759b86eb8a914cbbd11f6d09a74f411762c6 diff --cc arch/arm/mach-imx/mach-imx6q.c index bee633496f7b,05b49bb5d677..c25728106917 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@@ -14,10 -16,9 +16,11 @@@ #include #include #include + #include #include #include +#include +#include #include #include #include @@@ -25,27 -26,38 +28,57 @@@ #include #include + void imx6q_restart(char mode, const char *cmd) + { + struct device_node *np; + void __iomem *wdog_base; + + np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt"); + wdog_base = of_iomap(np, 0); + if (!wdog_base) + goto soft; + + imx_src_prepare_restart(); + + /* enable wdog */ + writew_relaxed(1 << 2, wdog_base); + /* write twice to ensure the request will not get ignored */ + writew_relaxed(1 << 2, wdog_base); + + /* wait for reset to assert ... */ + mdelay(500); + + pr_err("Watchdog reset failed to assert reset\n"); + + /* delay to allow the serial port to show the message */ + mdelay(50); + + soft: + /* we'll take a jump through zero as a poor second */ + soft_restart(0); + } + +/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ +static int ksz9021rn_phy_fixup(struct phy_device *phydev) +{ + /* min rx data delay */ + phy_write(phydev, 0x0b, 0x8105); + phy_write(phydev, 0x0c, 0x0000); + + /* max rx/tx clock delay, min rx/tx control delay */ + phy_write(phydev, 0x0b, 0x8104); + phy_write(phydev, 0x0c, 0xf0f0); + phy_write(phydev, 0x0b, 0x104); + + return 0; +} + static void __init imx6q_init_machine(void) { + if (of_machine_is_compatible("fsl,imx6q-sabrelite")) + phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, + ksz9021rn_phy_fixup); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); imx6q_pm_init(); diff --cc arch/arm/mach-omap2/board-ti8168evm.c index 5b6ad6e3ccb4,74713e3993e5..ab9a7a9e9d64 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@@ -47,19 -43,10 +47,21 @@@ static void __init ti81xx_evm_init(void MACHINE_START(TI8168EVM, "ti8168evm") /* Maintainer: Texas Instruments */ .atag_offset = 0x100, - .map_io = ti8168_evm_map_io, - .init_early = ti816x_init_early, - .init_irq = ti816x_init_irq, + .map_io = ti81xx_map_io, + .init_early = ti81xx_init_early, + .init_irq = ti81xx_init_irq, + .timer = &omap3_timer, + .init_machine = ti81xx_evm_init, ++ .restart = omap_prcm_restart, +MACHINE_END + +MACHINE_START(TI8148EVM, "ti8148evm") + /* Maintainer: Texas Instruments */ + .atag_offset = 0x100, + .map_io = ti81xx_map_io, + .init_early = ti81xx_init_early, + .init_irq = ti81xx_init_irq, .timer = &omap3_timer, - .init_machine = ti8168_evm_init, + .init_machine = ti81xx_evm_init, + .restart = omap_prcm_restart, MACHINE_END diff --cc arch/arm/mach-omap2/common.h index 4b2b416fafe1,cda888a2e635..9403b2ce6c85 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@@ -90,8 -82,9 +90,9 @@@ void omap35xx_init_early(void) void omap3630_init_early(void); void omap3_init_early(void); /* Do not use this one */ void am35xx_init_early(void); -void ti816x_init_early(void); +void ti81xx_init_early(void); void omap4430_init_early(void); + void omap_prcm_restart(char, const char *); /* * IO bases for various OMAP processors diff --cc arch/arm/mach-s3c64xx/Kconfig index 4d8c489edc04,90b34ab75b53..e9dae9105df6 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig @@@ -286,8 -292,8 +292,8 @@@ config MACH_WLF_CRAGG_641 select S3C_DEV_I2C1 select S3C_DEV_WDT select S3C_DEV_RTC - select S3C64XX_DEV_SPI + select S3C64XX_DEV_SPI0 - select S3C24XX_GPIO_EXTRA128 + select SAMSUNG_GPIO_EXTRA128 select I2C help Machine support for the Wolfson Cragganmore S3C6410 variant. diff --cc arch/arm/mach-tegra/board-dt-tegra20.c index 70f060251f00,e417a8383dbb..c2ff8e020105 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c @@@ -146,5 -134,6 +146,6 @@@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegr .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_dt_init, + .restart = tegra_assert_system_reset, - .dt_compat = tegra_dt_board_compat, + .dt_compat = tegra20_dt_board_compat, MACHINE_END diff --cc arch/arm/mach-tegra/common.c index 72b666bd3043,20f396d740fa..a2eb90169aed --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@@ -33,28 -31,14 +33,26 @@@ #include "clock.h" #include "fuse.h" - void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset; - +#ifdef CONFIG_OF +static const struct of_device_id tegra_dt_irq_match[] __initconst = { + { .compatible = "arm,cortex-a9-gic", .data = gic_of_init }, + { } +}; + +void __init tegra_dt_init_irq(void) +{ + tegra_init_irq(); + of_irq_init(tegra_dt_irq_match); +} +#endif + void tegra_assert_system_reset(char mode, const char *cmd) { - void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04); + void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0); u32 reg; - /* use *_related to avoid spinlock since caches are off */ reg = readl_relaxed(reset); - reg |= 0x04; + reg |= 0x10; writel_relaxed(reg, reset); }