From 6e4d82722cbe026632ba680d89daa5839d9f9042 Mon Sep 17 00:00:00 2001 From: Subhash Jadavani Date: Tue, 4 Dec 2012 17:06:18 +0530 Subject: [PATCH] --- yaml --- r: 359866 b: refs/heads/master c: af321b13cffc080451f5e802e041decf60666d26 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/boot/dts/dove.dtsi | 2 - trunk/arch/arm/configs/kirkwood_defconfig | 1 - trunk/arch/arm/configs/mvebu_defconfig | 2 - trunk/arch/arm/mach-dove/common.c | 29 ++++++++---- trunk/arch/arm/mach-kirkwood/Makefile | 1 + trunk/arch/arm/mach-kirkwood/board-dt.c | 2 - trunk/arch/arm/mach-kirkwood/board-ib62x0.c | 1 + trunk/arch/arm/mach-kirkwood/board-mplcec4.c | 1 + trunk/arch/arm/mach-kirkwood/board-nsa310.c | 8 +++- trunk/arch/arm/mach-kirkwood/common.c | 23 ---------- trunk/arch/arm/mach-kirkwood/common.h | 1 - .../arm/mach-kirkwood/cpuidle.c} | 45 +++---------------- trunk/arch/arm/mach-kirkwood/dockstar-setup.c | 1 + .../arm/mach-kirkwood/include/mach/kirkwood.h | 3 +- trunk/arch/arm/mach-kirkwood/pcie.c | 10 +++-- trunk/arch/arm/plat-orion/mpp.c | 2 +- trunk/drivers/cpuidle/Kconfig | 6 --- trunk/drivers/cpuidle/Makefile | 1 - trunk/drivers/mmc/core/sdio.c | 6 ++- trunk/drivers/rtc/Kconfig | 2 +- 21 files changed, 52 insertions(+), 97 deletions(-) rename trunk/{drivers/cpuidle/cpuidle-kirkwood.c => arch/arm/mach-kirkwood/cpuidle.c} (61%) diff --git a/[refs] b/[refs] index f9a1f71dd108..eeb0eeab39e9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 222922189c0b3c6e3ba117ca6e964278c1e0ccc8 +refs/heads/master: af321b13cffc080451f5e802e041decf60666d26 diff --git a/trunk/arch/arm/boot/dts/dove.dtsi b/trunk/arch/arm/boot/dts/dove.dtsi index 740630f9cd65..42eac1ff3cc8 100644 --- a/trunk/arch/arm/boot/dts/dove.dtsi +++ b/trunk/arch/arm/boot/dts/dove.dtsi @@ -93,7 +93,6 @@ reg = <0xd0400 0x20>; ngpios = <32>; interrupt-controller; - #interrupt-cells = <2>; interrupts = <12>, <13>, <14>, <60>; }; @@ -104,7 +103,6 @@ reg = <0xd0420 0x20>; ngpios = <32>; interrupt-controller; - #interrupt-cells = <2>; interrupts = <61>; }; diff --git a/trunk/arch/arm/configs/kirkwood_defconfig b/trunk/arch/arm/configs/kirkwood_defconfig index 13482ea58b09..93f3794ba5cb 100644 --- a/trunk/arch/arm/configs/kirkwood_defconfig +++ b/trunk/arch/arm/configs/kirkwood_defconfig @@ -56,7 +56,6 @@ CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_KIRKWOOD=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y diff --git a/trunk/arch/arm/configs/mvebu_defconfig b/trunk/arch/arm/configs/mvebu_defconfig index cbd91bce1ca9..b5bc96cb65a7 100644 --- a/trunk/arch/arm/configs/mvebu_defconfig +++ b/trunk/arch/arm/configs/mvebu_defconfig @@ -33,8 +33,6 @@ CONFIG_MVNETA=y CONFIG_MARVELL_PHY=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_I2C=y -CONFIG_I2C_MV64XXX=y CONFIG_SERIAL_8250_DW=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y diff --git a/trunk/arch/arm/mach-dove/common.c b/trunk/arch/arm/mach-dove/common.c index be887feea828..89f4f993cd03 100644 --- a/trunk/arch/arm/mach-dove/common.c +++ b/trunk/arch/arm/mach-dove/common.c @@ -8,24 +8,35 @@ * warranty of any kind, whether express or implied. */ +#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include #include -#include #include #include -#include +#include +#include #include -#include -#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include "common.h" /***************************************************************************** diff --git a/trunk/arch/arm/mach-kirkwood/Makefile b/trunk/arch/arm/mach-kirkwood/Makefile index d6653095a1eb..8d2e5a96247c 100644 --- a/trunk/arch/arm/mach-kirkwood/Makefile +++ b/trunk/arch/arm/mach-kirkwood/Makefile @@ -19,6 +19,7 @@ obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_T5325) += t5325-setup.o +obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o diff --git a/trunk/arch/arm/mach-kirkwood/board-dt.c b/trunk/arch/arm/mach-kirkwood/board-dt.c index f964cdc44b1a..de4fd2bb1e27 100644 --- a/trunk/arch/arm/mach-kirkwood/board-dt.c +++ b/trunk/arch/arm/mach-kirkwood/board-dt.c @@ -98,8 +98,6 @@ static void __init kirkwood_dt_init(void) /* Setup root of clk tree */ kirkwood_of_clk_init(); - kirkwood_cpuidle_init(); - #ifdef CONFIG_KEXEC kexec_reinit = kirkwood_enable_pcie; #endif diff --git a/trunk/arch/arm/mach-kirkwood/board-ib62x0.c b/trunk/arch/arm/mach-kirkwood/board-ib62x0.c index 9a857ae83984..9f6f496380d8 100644 --- a/trunk/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/trunk/arch/arm/mach-kirkwood/board-ib62x0.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "common.h" static struct mv643xx_eth_platform_data ib62x0_ge00_data = { diff --git a/trunk/arch/arm/mach-kirkwood/board-mplcec4.c b/trunk/arch/arm/mach-kirkwood/board-mplcec4.c index 3264925b8318..56bfe5a1605a 100644 --- a/trunk/arch/arm/mach-kirkwood/board-mplcec4.c +++ b/trunk/arch/arm/mach-kirkwood/board-mplcec4.c @@ -14,6 +14,7 @@ #include #include #include "common.h" +#include "mpp.h" static struct mv643xx_eth_platform_data mplcec4_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(1), diff --git a/trunk/arch/arm/mach-kirkwood/board-nsa310.c b/trunk/arch/arm/mach-kirkwood/board-nsa310.c index 2fa71400ecb3..f58d2e1a4042 100644 --- a/trunk/arch/arm/mach-kirkwood/board-nsa310.c +++ b/trunk/arch/arm/mach-kirkwood/board-nsa310.c @@ -12,8 +12,10 @@ #include #include #include + +#include +#include #include -#include #include "common.h" #include "mpp.h" @@ -77,10 +79,14 @@ static void __init nsa310_gpio_init(void) void __init nsa310_init(void) { + u32 dev, rev; + kirkwood_mpp_conf(nsa310_mpp_config); nsa310_gpio_init(); + kirkwood_pcie_id(&dev, &rev); + i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); } diff --git a/trunk/arch/arm/mach-kirkwood/common.c b/trunk/arch/arm/mach-kirkwood/common.c index 5ed1f2e8c5f8..bac21a554c91 100644 --- a/trunk/arch/arm/mach-kirkwood/common.c +++ b/trunk/arch/arm/mach-kirkwood/common.c @@ -499,28 +499,6 @@ void __init kirkwood_wdt_init(void) orion_wdt_init(); } -/***************************************************************************** - * CPU idle - ****************************************************************************/ -static struct resource kirkwood_cpuidle_resource[] = { - { - .flags = IORESOURCE_MEM, - .start = DDR_OPERATION_BASE, - .end = DDR_OPERATION_BASE + 3, - }, -}; - -static struct platform_device kirkwood_cpuidle = { - .name = "kirkwood_cpuidle", - .id = -1, - .resource = kirkwood_cpuidle_resource, - .num_resources = 1, -}; - -void __init kirkwood_cpuidle_init(void) -{ - platform_device_register(&kirkwood_cpuidle); -} /***************************************************************************** * Time handling @@ -693,7 +671,6 @@ void __init kirkwood_init(void) kirkwood_xor1_init(); kirkwood_crypto_init(); - kirkwood_cpuidle_init(); #ifdef CONFIG_KEXEC kexec_reinit = kirkwood_enable_pcie; #endif diff --git a/trunk/arch/arm/mach-kirkwood/common.h b/trunk/arch/arm/mach-kirkwood/common.h index 320aa61ff505..5ffa57f08c80 100644 --- a/trunk/arch/arm/mach-kirkwood/common.h +++ b/trunk/arch/arm/mach-kirkwood/common.h @@ -50,7 +50,6 @@ void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); void kirkwood_audio_init(void); -void kirkwood_cpuidle_init(void); void kirkwood_restart(char, const char *); void kirkwood_clk_init(void); diff --git a/trunk/drivers/cpuidle/cpuidle-kirkwood.c b/trunk/arch/arm/mach-kirkwood/cpuidle.c similarity index 61% rename from trunk/drivers/cpuidle/cpuidle-kirkwood.c rename to trunk/arch/arm/mach-kirkwood/cpuidle.c index 670aa1e55cd6..f7304670f2f8 100644 --- a/trunk/drivers/cpuidle/cpuidle-kirkwood.c +++ b/trunk/arch/arm/mach-kirkwood/cpuidle.c @@ -14,7 +14,6 @@ */ #include -#include #include #include #include @@ -22,17 +21,16 @@ #include #include #include +#include #define KIRKWOOD_MAX_STATES 2 -static void __iomem *ddr_operation_base; - /* Actual code that puts the SoC in different idle states */ static int kirkwood_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, + struct cpuidle_driver *drv, int index) { - writel(0x7, ddr_operation_base); + writel(0x7, DDR_OPERATION_BASE); cpu_do_idle(); return index; @@ -53,22 +51,13 @@ static struct cpuidle_driver kirkwood_idle_driver = { }, .state_count = KIRKWOOD_MAX_STATES, }; -static struct cpuidle_device *device; static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device); /* Initialize CPU idle by registering the idle states */ -static int kirkwood_cpuidle_probe(struct platform_device *pdev) +static int kirkwood_init_cpuidle(void) { - struct resource *res; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) - return -EINVAL; - - ddr_operation_base = devm_request_and_ioremap(&pdev->dev, res); - if (!ddr_operation_base) - return -EADDRNOTAVAIL; + struct cpuidle_device *device; device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id()); device->state_count = KIRKWOOD_MAX_STATES; @@ -81,26 +70,4 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev) return 0; } -int kirkwood_cpuidle_remove(struct platform_device *pdev) -{ - cpuidle_unregister_device(device); - cpuidle_unregister_driver(&kirkwood_idle_driver); - - return 0; -} - -static struct platform_driver kirkwood_cpuidle_driver = { - .probe = kirkwood_cpuidle_probe, - .remove = kirkwood_cpuidle_remove, - .driver = { - .name = "kirkwood_cpuidle", - .owner = THIS_MODULE, - }, -}; - -module_platform_driver(kirkwood_cpuidle_driver); - -MODULE_AUTHOR("Andrew Lunn "); -MODULE_DESCRIPTION("Kirkwood cpu idle driver"); -MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:kirkwood-cpuidle"); +device_initcall(kirkwood_init_cpuidle); diff --git a/trunk/arch/arm/mach-kirkwood/dockstar-setup.c b/trunk/arch/arm/mach-kirkwood/dockstar-setup.c index 272af6970f61..791a98fafa29 100644 --- a/trunk/arch/arm/mach-kirkwood/dockstar-setup.c +++ b/trunk/arch/arm/mach-kirkwood/dockstar-setup.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "common.h" #include "mpp.h" diff --git a/trunk/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/trunk/arch/arm/mach-kirkwood/include/mach/kirkwood.h index a05563a31c95..041653a04a9c 100644 --- a/trunk/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/trunk/arch/arm/mach-kirkwood/include/mach/kirkwood.h @@ -60,9 +60,8 @@ * Register Map */ #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x00000) -#define DDR_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x00000) #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE + 0x1500) -#define DDR_OPERATION_BASE (DDR_PHYS_BASE + 0x1418) +#define DDR_OPERATION_BASE (DDR_VIRT_BASE + 0x1418) #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x10000) #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x10000) diff --git a/trunk/arch/arm/mach-kirkwood/pcie.c b/trunk/arch/arm/mach-kirkwood/pcie.c index d96ad4c09972..a1c3ab6fc809 100644 --- a/trunk/arch/arm/mach-kirkwood/pcie.c +++ b/trunk/arch/arm/mach-kirkwood/pcie.c @@ -247,9 +247,13 @@ static struct hw_pci kirkwood_pci __initdata = { static void __init add_pcie_port(int index, void __iomem *base) { - pcie_port_map[num_pcie_ports++] = index; - pr_info("Kirkwood PCIe port %d: link %s\n", index, - orion_pcie_link_up(base) ? "up" : "down"); + pr_info("Kirkwood PCIe port %d: ", index); + + if (orion_pcie_link_up(base)) { + pr_info("link up\n"); + pcie_port_map[num_pcie_ports++] = index; + } else + pr_info("link down, ignoring\n"); } void __init kirkwood_pcie_init(unsigned int portmask) diff --git a/trunk/arch/arm/plat-orion/mpp.c b/trunk/arch/arm/plat-orion/mpp.c index 7310bcfb299f..e686fe76a96b 100644 --- a/trunk/arch/arm/plat-orion/mpp.c +++ b/trunk/arch/arm/plat-orion/mpp.c @@ -49,7 +49,7 @@ void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, "number (%u)\n", num); continue; } - if (variant_mask && !(*mpp_list & variant_mask)) { + if (variant_mask & !(*mpp_list & variant_mask)) { printk(KERN_WARNING "orion_mpp_conf: requested MPP%u config " "unavailable on this hardware\n", num); diff --git a/trunk/drivers/cpuidle/Kconfig b/trunk/drivers/cpuidle/Kconfig index 071e2c3eec4f..c4cc27e5c8a5 100644 --- a/trunk/drivers/cpuidle/Kconfig +++ b/trunk/drivers/cpuidle/Kconfig @@ -39,10 +39,4 @@ config CPU_IDLE_CALXEDA help Select this to enable cpuidle on Calxeda processors. -config CPU_IDLE_KIRKWOOD - bool "CPU Idle Driver for Kirkwood processors" - depends on ARCH_KIRKWOOD - help - Select this to enable cpuidle on Kirkwood processors. - endif diff --git a/trunk/drivers/cpuidle/Makefile b/trunk/drivers/cpuidle/Makefile index 24c6e7d945ed..03ee87482c71 100644 --- a/trunk/drivers/cpuidle/Makefile +++ b/trunk/drivers/cpuidle/Makefile @@ -6,4 +6,3 @@ obj-y += cpuidle.o driver.o governor.o sysfs.o governors/ obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o obj-$(CONFIG_CPU_IDLE_CALXEDA) += cpuidle-calxeda.o -obj-$(CONFIG_CPU_IDLE_KIRKWOOD) += cpuidle-kirkwood.o diff --git a/trunk/drivers/mmc/core/sdio.c b/trunk/drivers/mmc/core/sdio.c index 2273ce6b6c1a..34ad4c877c1f 100644 --- a/trunk/drivers/mmc/core/sdio.c +++ b/trunk/drivers/mmc/core/sdio.c @@ -937,10 +937,12 @@ static int mmc_sdio_resume(struct mmc_host *host) mmc_claim_host(host); /* No need to reinitialize powered-resumed nonremovable cards */ - if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) + if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) { + sdio_reset(host); + mmc_go_idle(host); err = mmc_sdio_init_card(host, host->ocr, host->card, mmc_card_keep_power(host)); - else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { + } else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { /* We may have switched to 1-bit mode during suspend */ err = sdio_enable_4bit_bus(host->card); if (err > 0) { diff --git a/trunk/drivers/rtc/Kconfig b/trunk/drivers/rtc/Kconfig index 20354b43932e..923a9da9c829 100644 --- a/trunk/drivers/rtc/Kconfig +++ b/trunk/drivers/rtc/Kconfig @@ -1023,7 +1023,7 @@ config RTC_DRV_TX4939 config RTC_DRV_MV tristate "Marvell SoC RTC" - depends on ARCH_KIRKWOOD || ARCH_DOVE || ARCH_MVEBU + depends on ARCH_KIRKWOOD || ARCH_DOVE help If you say yes here you will get support for the in-chip RTC that can be found in some of Marvell's SoC devices, such as