Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359900
b: refs/heads/master
c: 04ee16b
h: refs/heads/master
v: v3
  • Loading branch information
Jason Cooper committed Jan 31, 2013
1 parent 5cf61af commit 8bf6d6b
Show file tree
Hide file tree
Showing 20 changed files with 95 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2938758caae523768f60208dbc8a487be3f0bd5
refs/heads/master: 04ee16bdf486061147c608410c2c9181352aaa3a
2 changes: 2 additions & 0 deletions trunk/arch/arm/boot/dts/dove.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
reg = <0xd0400 0x20>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <12>, <13>, <14>, <60>;
};

Expand All @@ -103,6 +104,7 @@
reg = <0xd0420 0x20>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <61>;
};

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/configs/kirkwood_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ 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
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/configs/mvebu_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ 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
Expand Down
29 changes: 9 additions & 20 deletions trunk/arch/arm/mach-dove/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,24 @@
* warranty of any kind, whether express or implied.
*/

#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/clk-provider.h>
#include <linux/clk/mvebu.h>
#include <linux/ata_platform.h>
#include <linux/gpio.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <asm/timex.h>
#include <linux/platform_data/dma-mv_xor.h>
#include <linux/platform_data/usb-ehci-orion.h>
#include <linux/platform_device.h>
#include <asm/hardware/cache-tauros2.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/mach/pci.h>
#include <mach/dove.h>
#include <mach/pm.h>
#include <mach/bridge-regs.h>
#include <asm/mach/arch.h>
#include <linux/irq.h>
#include <plat/time.h>
#include <linux/platform_data/usb-ehci-orion.h>
#include <linux/platform_data/dma-mv_xor.h>
#include <plat/irq.h>
#include <mach/pm.h>
#include <plat/common.h>
#include <plat/addr-map.h>
#include <plat/irq.h>
#include <plat/time.h>
#include "common.h"

/*****************************************************************************
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-kirkwood/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-kirkwood/board-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ 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
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-kirkwood/board-ib62x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mv643xx_eth.h>
#include <linux/input.h>
#include "common.h"

static struct mv643xx_eth_platform_data ib62x0_ge00_data = {
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-kirkwood/board-mplcec4.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/mv643xx_eth.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"

static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(1),
Expand Down
8 changes: 1 addition & 7 deletions trunk/arch/arm/mach-kirkwood/board-nsa310.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/gpio.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include <linux/of.h>
#include "common.h"
#include "mpp.h"

Expand Down Expand Up @@ -79,14 +77,10 @@ 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));
}

Expand Down
23 changes: 23 additions & 0 deletions trunk/arch/arm/mach-kirkwood/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,28 @@ 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
Expand Down Expand Up @@ -671,6 +693,7 @@ void __init kirkwood_init(void)
kirkwood_xor1_init();
kirkwood_crypto_init();

kirkwood_cpuidle_init();
#ifdef CONFIG_KEXEC
kexec_reinit = kirkwood_enable_pcie;
#endif
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-kirkwood/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ 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);

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-kirkwood/dockstar-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-kirkwood/include/mach/kirkwood.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@
* 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_VIRT_BASE + 0x1418)
#define DDR_OPERATION_BASE (DDR_PHYS_BASE + 0x1418)

#define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x10000)
#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x10000)
Expand Down
10 changes: 3 additions & 7 deletions trunk/arch/arm/mach-kirkwood/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,9 @@ static struct hw_pci kirkwood_pci __initdata = {

static void __init add_pcie_port(int index, void __iomem *base)
{
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");
pcie_port_map[num_pcie_ports++] = index;
pr_info("Kirkwood PCIe port %d: link %s\n", index,
orion_pcie_link_up(base) ? "up" : "down");
}

void __init kirkwood_pcie_init(unsigned int portmask)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-orion/mpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/cpuidle/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ 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
1 change: 1 addition & 0 deletions trunk/drivers/cpuidle/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@
*/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/cpuidle.h>
#include <linux/io.h>
#include <linux/export.h>
#include <asm/proc-fns.h>
#include <asm/cpuidle.h>
#include <mach/kirkwood.h>

#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;
Expand All @@ -51,13 +53,22 @@ 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_init_cpuidle(void)
static int kirkwood_cpuidle_probe(struct platform_device *pdev)
{
struct cpuidle_device *device;
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;

device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id());
device->state_count = KIRKWOOD_MAX_STATES;
Expand All @@ -70,4 +81,26 @@ static int kirkwood_init_cpuidle(void)
return 0;
}

device_initcall(kirkwood_init_cpuidle);
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 <andrew@lunn.ch>");
MODULE_DESCRIPTION("Kirkwood cpu idle driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:kirkwood-cpuidle");
2 changes: 1 addition & 1 deletion trunk/drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ config RTC_DRV_TX4939

config RTC_DRV_MV
tristate "Marvell SoC RTC"
depends on ARCH_KIRKWOOD || ARCH_DOVE
depends on ARCH_KIRKWOOD || ARCH_DOVE || ARCH_MVEBU
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
Expand Down

0 comments on commit 8bf6d6b

Please sign in to comment.