mvebu drivers for v3.9
- use rtc-mv in mvebu armv7 SoCs - add pci-e hotplug for kirkwood Depends on: - tags/mvebu_fixes_for_v3.8-rc6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJRCqOnAAoJEAi3KVZQDZAewlUH/04tpMdf2rvgNP8uUVPVx62T cXMga9qLTyXQ9hn31KP7fd/JPLRJFsG/+jy4x687EurJGIXXaWGNadjlE69DEPAZ jt78sPa+Mo/xYD4XoNCr/ng1cbnTwc1ebSRSfN+nIjWynE8Do7tkOKxfJodTgQCM XbE3EHfvAktKfJTsFDPsFwoIycEYxFsN4jQPwiCdPHVb24py3FWBy+qep7wtLfSO gTnakEcOsQc7aFzrFdZ1ZnQ9KRlBYXVN636o4sQkM+UM9Vf7FAWBM4OCi2KP4trU IlTzknoMAMYat+AtYzq1FcDmajeP/EgG6DbQh7lqUK0LEILn2rdAUlgN2QB3VIs= =6oef -----END PGP SIGNATURE----- Merge tag 'tags/drivers_for_v3.9' into mvebu/boards mvebu drivers for v3.9 - use rtc-mv in mvebu armv7 SoCs - add pci-e hotplug for kirkwood Depends on: - tags/mvebu_fixes_for_v3.8-rc6
This commit is contained in:
commit
222922189c
@ -56,6 +56,7 @@ CONFIG_AEABI=y
|
|||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CPU_IDLE=y
|
CONFIG_CPU_IDLE=y
|
||||||
|
CONFIG_CPU_IDLE_KIRKWOOD=y
|
||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_PACKET=y
|
CONFIG_PACKET=y
|
||||||
CONFIG_UNIX=y
|
CONFIG_UNIX=y
|
||||||
|
@ -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_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o
|
||||||
obj-$(CONFIG_MACH_T5325) += t5325-setup.o
|
obj-$(CONFIG_MACH_T5325) += t5325-setup.o
|
||||||
|
|
||||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
|
||||||
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
|
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
|
||||||
obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
|
obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
|
||||||
obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
|
obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
|
||||||
|
@ -98,6 +98,8 @@ static void __init kirkwood_dt_init(void)
|
|||||||
/* Setup root of clk tree */
|
/* Setup root of clk tree */
|
||||||
kirkwood_of_clk_init();
|
kirkwood_of_clk_init();
|
||||||
|
|
||||||
|
kirkwood_cpuidle_init();
|
||||||
|
|
||||||
#ifdef CONFIG_KEXEC
|
#ifdef CONFIG_KEXEC
|
||||||
kexec_reinit = kirkwood_enable_pcie;
|
kexec_reinit = kirkwood_enable_pcie;
|
||||||
#endif
|
#endif
|
||||||
|
@ -499,6 +499,28 @@ void __init kirkwood_wdt_init(void)
|
|||||||
orion_wdt_init();
|
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
|
* Time handling
|
||||||
@ -671,6 +693,7 @@ void __init kirkwood_init(void)
|
|||||||
kirkwood_xor1_init();
|
kirkwood_xor1_init();
|
||||||
kirkwood_crypto_init();
|
kirkwood_crypto_init();
|
||||||
|
|
||||||
|
kirkwood_cpuidle_init();
|
||||||
#ifdef CONFIG_KEXEC
|
#ifdef CONFIG_KEXEC
|
||||||
kexec_reinit = kirkwood_enable_pcie;
|
kexec_reinit = kirkwood_enable_pcie;
|
||||||
#endif
|
#endif
|
||||||
|
@ -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,
|
void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
|
||||||
int (*dev_ready)(struct mtd_info *));
|
int (*dev_ready)(struct mtd_info *));
|
||||||
void kirkwood_audio_init(void);
|
void kirkwood_audio_init(void);
|
||||||
|
void kirkwood_cpuidle_init(void);
|
||||||
void kirkwood_restart(char, const char *);
|
void kirkwood_restart(char, const char *);
|
||||||
void kirkwood_clk_init(void);
|
void kirkwood_clk_init(void);
|
||||||
|
|
||||||
|
@ -60,8 +60,9 @@
|
|||||||
* Register Map
|
* Register Map
|
||||||
*/
|
*/
|
||||||
#define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x00000)
|
#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_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_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE + 0x10000)
|
||||||
#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x10000)
|
#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE + 0x10000)
|
||||||
|
@ -247,13 +247,9 @@ static struct hw_pci kirkwood_pci __initdata = {
|
|||||||
|
|
||||||
static void __init add_pcie_port(int index, void __iomem *base)
|
static void __init add_pcie_port(int index, void __iomem *base)
|
||||||
{
|
{
|
||||||
pr_info("Kirkwood PCIe port %d: ", index);
|
pcie_port_map[num_pcie_ports++] = index;
|
||||||
|
pr_info("Kirkwood PCIe port %d: link %s\n", index,
|
||||||
if (orion_pcie_link_up(base)) {
|
orion_pcie_link_up(base) ? "up" : "down");
|
||||||
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)
|
void __init kirkwood_pcie_init(unsigned int portmask)
|
||||||
|
@ -39,4 +39,10 @@ config CPU_IDLE_CALXEDA
|
|||||||
help
|
help
|
||||||
Select this to enable cpuidle on Calxeda processors.
|
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
|
endif
|
||||||
|
@ -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_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o
|
||||||
|
|
||||||
obj-$(CONFIG_CPU_IDLE_CALXEDA) += cpuidle-calxeda.o
|
obj-$(CONFIG_CPU_IDLE_CALXEDA) += cpuidle-calxeda.o
|
||||||
|
obj-$(CONFIG_CPU_IDLE_KIRKWOOD) += cpuidle-kirkwood.o
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/cpuidle.h>
|
#include <linux/cpuidle.h>
|
||||||
@ -21,16 +22,17 @@
|
|||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
#include <asm/cpuidle.h>
|
#include <asm/cpuidle.h>
|
||||||
#include <mach/kirkwood.h>
|
|
||||||
|
|
||||||
#define KIRKWOOD_MAX_STATES 2
|
#define KIRKWOOD_MAX_STATES 2
|
||||||
|
|
||||||
|
static void __iomem *ddr_operation_base;
|
||||||
|
|
||||||
/* Actual code that puts the SoC in different idle states */
|
/* Actual code that puts the SoC in different idle states */
|
||||||
static int kirkwood_enter_idle(struct cpuidle_device *dev,
|
static int kirkwood_enter_idle(struct cpuidle_device *dev,
|
||||||
struct cpuidle_driver *drv,
|
struct cpuidle_driver *drv,
|
||||||
int index)
|
int index)
|
||||||
{
|
{
|
||||||
writel(0x7, DDR_OPERATION_BASE);
|
writel(0x7, ddr_operation_base);
|
||||||
cpu_do_idle();
|
cpu_do_idle();
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
@ -51,13 +53,22 @@ static struct cpuidle_driver kirkwood_idle_driver = {
|
|||||||
},
|
},
|
||||||
.state_count = KIRKWOOD_MAX_STATES,
|
.state_count = KIRKWOOD_MAX_STATES,
|
||||||
};
|
};
|
||||||
|
static struct cpuidle_device *device;
|
||||||
|
|
||||||
static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device);
|
static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device);
|
||||||
|
|
||||||
/* Initialize CPU idle by registering the idle states */
|
/* 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 = &per_cpu(kirkwood_cpuidle_device, smp_processor_id());
|
||||||
device->state_count = KIRKWOOD_MAX_STATES;
|
device->state_count = KIRKWOOD_MAX_STATES;
|
||||||
@ -70,4 +81,26 @@ static int kirkwood_init_cpuidle(void)
|
|||||||
return 0;
|
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");
|
@ -1023,7 +1023,7 @@ config RTC_DRV_TX4939
|
|||||||
|
|
||||||
config RTC_DRV_MV
|
config RTC_DRV_MV
|
||||||
tristate "Marvell SoC RTC"
|
tristate "Marvell SoC RTC"
|
||||||
depends on ARCH_KIRKWOOD || ARCH_DOVE
|
depends on ARCH_KIRKWOOD || ARCH_DOVE || ARCH_MVEBU
|
||||||
help
|
help
|
||||||
If you say yes here you will get support for the in-chip RTC
|
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
|
that can be found in some of Marvell's SoC devices, such as
|
||||||
|
Loading…
Reference in New Issue
Block a user