Beside the additional helper irq_chip_(enable|disable)_parent
I also cleaned up Kconfig.debug by adding ARM_SINGLE_ARMV7M as
UNCOMPRESS_INCLUDE/DEBUG_UNCOMPRESS dependencies. This avoids
that each ARMv7-M ARCH_/SOC_ needs to be added.
Shawn, if ok, could you pickup that patchset as Arnd suggested?
I guess the IRQ stuff still should go through Jason's tree
directly (Patch 1-5)?
The patchset has proven to be working on the Cortex-M4 of the
Vybrid SoC using a Colibri VF61 module.
Note: The patch "ARM: ARMv7M: define size of vector table for
Vybrid" has a dependency on "ARM: ARMv7-M: Enlarge vector table
up to 256 entries" (Maxime Coquelin), which is in Russels patch
system (marked as applied, see 8340/1). However, since the
vector table defaults to 240 with that patch, defining the size
of the vector table for Vybrid is not absolutely required.
Therefor patch 6 can also be applied at a later point in time...
Changes since v6:
- Add genirq irq_chip_(enable|disable)_parent helper
- Add ARM_SINGLE_ARMV7M to UNCOMPRESS_INCLUDE/DEBUG_UNCOMPRESS
since all supported ARMv7-M platforms so far support early
debug through DEBUG_LL
Changes since v5:
- Remove unnecessary empty lines in Kconfig
- Add non-hierarchy helper irq_domain_set_info
- Rebased on v4.1-rc1
Changes since v4:
- Added ARM_SINGLE_ARMV7M as top-level config symbol for ARMv7-M
architectures
- Cleaned up unnecessary selects within SOC_VF610
- Added linux,stdout-path to device tree
Changes since v3:
- Added dependency IRQ_DOMAIN_HIERARCHY for ARM_NVIC
- Fix MSCM IR disable function check
- Remove "ARM: imx: depend MXC debug board on 3DS machines",
the patch has been merged
Changes since v2:
- Update MSCM patches to merged version of MSCM interrupt router
- Use the GPLv2/X11 dual license in the new device tree files
- Drop SD controller in device tree (initramfs works now and is
probably more appropriate for most cases)
- Disable GPIO nodes since the A5 is using them
- Drop CONFIG_ prefixes in Kconfig changes for MXC_DEBUG_BOARD
- Drop vector table resizing in favor of Maxime Coquelin's patch
(https://lkml.org/lkml/2015/2/20/399)
- Remove !MMU dependency for ARCH_EFM32 since its part of
ARCH_MULTI_V7M
- Rebased on v4.0-rc1
Changes since v1:
- Remove MSCM driver
- Support irq domain hierarchy with NVIC irq controller
- Extend MSCM interrupt router with NVIC as parent in the irq
domain hierarchy
- Rebased on v3.19-rc1 with MSCM driver
- NVIC: Register only the amount of IRQ's which vectors are
available for
Changes since RFC:
- Unified addruart calls for MMU/!MMU
- Add MSCM support along with routable IRQ support in NVIC
- Rebased on Shawns for-next tree which made some changes
obsolete (mainly the Vybrid SoC device tree files in for-next
are already prepared for Cortex-M4 support)
- Removed SRC_GPR3 hack, this is now part of a mini boot-loader:
https://github.com/falstaff84/vf610m4bootldr
Stefan Agner (13):
irqdomain: Add non-hierarchy helper irq_domain_set_info
genirq: Add irq_chip_(enable|disable)_parent
genirq: generic chip: support hierarchy domain
irqchip: nvic: support hierarchy irq domain
irqchip: vf610-mscm: support NVIC parent
ARM: ARMv7M: define size of vector table for Vybrid
clocksource: add dependencies for Vybrid pit clocksource
ARM: unify MMU/!MMU addruart calls
ARM: introduce ARM_SINGLE_ARMV7M for ARMv7-M platforms
ARM: efm32: use ARM_SINGLE_ARMV7M
ARM: vf610: enable Cortex-M4 configuration on Vybrid SoC
ARM: dts: add support for Vybrid running on Cortex-M4
ARM: vf610m4: add defconfig for Linux on Vybrids Cortex-M4
Documentation/devicetree/bindings/arm/fsl.txt | 3 +
arch/arm/Kconfig | 41 ++++++-----
arch/arm/Kconfig.debug | 4 +-
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/vf610m4-colibri.dts | 99 +++++++++++++++++++++++++++
arch/arm/boot/dts/vf610m4.dtsi | 50 ++++++++++++++
arch/arm/configs/efm32_defconfig | 1 +
arch/arm/configs/vf610m4_defconfig | 42 ++++++++++++
arch/arm/include/debug/efm32.S | 2 +-
arch/arm/kernel/debug.S | 2 +-
arch/arm/mach-imx/Kconfig | 38 +++++-----
arch/arm/mach-imx/Makefile.boot | 0
arch/arm/mach-imx/mach-vf610.c | 1 +
arch/arm/mm/Kconfig | 1 +
drivers/clocksource/Kconfig | 2 +
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-nvic.c | 28 +++++++-
drivers/irqchip/irq-vf610-mscm-ir.c | 23 +++++--
include/linux/irq.h | 2 +
include/linux/irqdomain.h | 8 +--
kernel/irq/chip.c | 28 ++++++++
kernel/irq/generic-chip.c | 5 +-
kernel/irq/irqdomain.c | 21 ++++++
23 files changed, 350 insertions(+), 53 deletions(-)
create mode 100644 arch/arm/boot/dts/vf610m4-colibri.dts
create mode 100644 arch/arm/boot/dts/vf610m4.dtsi
create mode 100644 arch/arm/configs/vf610m4_defconfig
create mode 100644 arch/arm/mach-imx/Makefile.boot
--
2.4.1
This adds the helper irq_domain_set_info() in a non-domain hierarchy
variant. This allows to use the helper for generic chip since not
all chips using generic chip support domain hierarchy.
Signed-off-by: Stefan Agner <[email protected]>
---
include/linux/irqdomain.h | 8 ++++----
kernel/irq/irqdomain.c | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 676d730..744ac0e 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -258,6 +258,10 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,
/* V2 interfaces to support hierarchy IRQ domains. */
extern struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain,
unsigned int virq);
+extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
+ irq_hw_number_t hwirq, struct irq_chip *chip,
+ void *chip_data, irq_flow_handler_t handler,
+ void *handler_data, const char *handler_name);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
extern struct irq_domain *irq_domain_add_hierarchy(struct irq_domain *parent,
unsigned int flags, unsigned int size,
@@ -281,10 +285,6 @@ extern int irq_domain_set_hwirq_and_chip(struct irq_domain *domain,
irq_hw_number_t hwirq,
struct irq_chip *chip,
void *chip_data);
-extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
- irq_hw_number_t hwirq, struct irq_chip *chip,
- void *chip_data, irq_flow_handler_t handler,
- void *handler_data, const char *handler_name);
extern void irq_domain_reset_irq_data(struct irq_data *irq_data);
extern void irq_domain_free_irqs_common(struct irq_domain *domain,
unsigned int virq,
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 7fac311..41bf6dc 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1232,6 +1232,27 @@ struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain,
return (irq_data && irq_data->domain == domain) ? irq_data : NULL;
}
+/**
+ * irq_domain_set_info - Set the complete data for a @virq in @domain
+ * @domain: Interrupt domain to match
+ * @virq: IRQ number
+ * @hwirq: The hardware interrupt number
+ * @chip: The associated interrupt chip
+ * @chip_data: The associated interrupt chip data
+ * @handler: The interrupt flow handler
+ * @handler_data: The interrupt flow handler data
+ * @handler_name: The interrupt handler name
+ */
+void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
+ irq_hw_number_t hwirq, struct irq_chip *chip,
+ void *chip_data, irq_flow_handler_t handler,
+ void *handler_data, const char *handler_name)
+{
+ irq_set_chip_and_handler_name(virq, chip, handler, handler_name);
+ irq_set_chip_data(virq, chip_data);
+ irq_set_handler_data(virq, handler_data);
+}
+
static void irq_domain_check_hierarchy(struct irq_domain *domain)
{
}
--
2.4.1
Add helper irq_chip_enable_parent and irq_chip_disable_parent. The
helper implement the default behavior in case irq_enable or irq_disable
is not implemented for the parent interrupt chip, which is calling the
irq_mask or irq_unmask respectively.
Signed-off-by: Stefan Agner <[email protected]>
---
include/linux/irq.h | 2 ++
kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 62c6901..2633061 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -458,6 +458,8 @@ extern void handle_nested_irq(unsigned int irq);
extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
+extern void irq_chip_enable_parent(struct irq_data *data);
+extern void irq_chip_disable_parent(struct irq_data *data);
extern void irq_chip_ack_parent(struct irq_data *data);
extern int irq_chip_retrigger_hierarchy(struct irq_data *data);
extern void irq_chip_mask_parent(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index eb9a4ea..2456fe8 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -876,6 +876,34 @@ void irq_cpu_offline(void)
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
/**
+ * irq_chip_enable_parent - Enable the parent interrupt (defaults to unmask if
+ * NULL)
+ * @data: Pointer to interrupt specific data
+ */
+void irq_chip_enable_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data->chip->irq_enable)
+ data->chip->irq_enable(data);
+ else
+ data->chip->irq_unmask(data);
+}
+
+/**
+ * irq_chip_disable_parent - Disable the parent interrupt (defaults to mask if
+ * NULL)
+ * @data: Pointer to interrupt specific data
+ */
+void irq_chip_disable_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data->chip->irq_disable)
+ data->chip->irq_disable(data);
+ else
+ data->chip->irq_mask(data);
+}
+
+/**
* irq_chip_ack_parent - Acknowledge the parent interrupt
* @data: Pointer to interrupt specific data
*/
--
2.4.1
Use the new helper function irq_domain_set_info to make sure the
function irq_domain_set_hwirq_and_chip is being called, which is
crucial to save irqdomain specific data to irq_data.
Signed-off-by: Stefan Agner <[email protected]>
---
kernel/irq/generic-chip.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 61024e8..15b370d 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -360,7 +360,7 @@ static struct lock_class_key irq_nested_lock_class;
int irq_map_generic_chip(struct irq_domain *d, unsigned int virq,
irq_hw_number_t hw_irq)
{
- struct irq_data *data = irq_get_irq_data(virq);
+ struct irq_data *data = irq_domain_get_irq_data(d, virq);
struct irq_domain_chip_generic *dgc = d->gc;
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
@@ -405,8 +405,7 @@ int irq_map_generic_chip(struct irq_domain *d, unsigned int virq,
else
data->mask = 1 << idx;
- irq_set_chip_and_handler(virq, chip, ct->handler);
- irq_set_chip_data(virq, gc);
+ irq_domain_set_info(d, virq, hw_irq, chip, gc, ct->handler, NULL, NULL);
irq_modify_status(virq, dgc->irq_flags_to_clear, dgc->irq_flags_to_set);
return 0;
}
--
2.4.1
Add support for hierarchy irq domains. This is required to stack
the MSCM interrupt router and the NVIC controller found in Vybrid
SoC.
Signed-off-by: Stefan Agner <[email protected]>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-nvic.c | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 6de62a9..99b9a97 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -30,6 +30,7 @@ config ARM_GIC_V3_ITS
config ARM_NVIC
bool
select IRQ_DOMAIN
+ select IRQ_DOMAIN_HIERARCHY
select GENERIC_IRQ_CHIP
config ARM_VIC
diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c
index 4ff0805..5fac910 100644
--- a/drivers/irqchip/irq-nvic.c
+++ b/drivers/irqchip/irq-nvic.c
@@ -49,6 +49,31 @@ nvic_handle_irq(irq_hw_number_t hwirq, struct pt_regs *regs)
handle_IRQ(irq, regs);
}
+static int nvic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
+ unsigned int nr_irqs, void *arg)
+{
+ int i, ret;
+ irq_hw_number_t hwirq;
+ unsigned int type = IRQ_TYPE_NONE;
+ struct of_phandle_args *irq_data = arg;
+
+ ret = irq_domain_xlate_onecell(domain, irq_data->np, irq_data->args,
+ irq_data->args_count, &hwirq, &type);
+ if (ret)
+ return ret;
+
+ for (i = 0; i < nr_irqs; i++)
+ irq_map_generic_chip(domain, virq + i, hwirq + i);
+
+ return 0;
+}
+
+static const struct irq_domain_ops nvic_irq_domain_ops = {
+ .xlate = irq_domain_xlate_onecell,
+ .alloc = nvic_irq_domain_alloc,
+ .free = irq_domain_free_irqs_top,
+};
+
static int __init nvic_of_init(struct device_node *node,
struct device_node *parent)
{
@@ -70,7 +95,8 @@ static int __init nvic_of_init(struct device_node *node,
irqs = NVIC_MAX_IRQ;
nvic_irq_domain =
- irq_domain_add_linear(node, irqs, &irq_generic_chip_ops, NULL);
+ irq_domain_add_linear(node, irqs, &nvic_irq_domain_ops, NULL);
+
if (!nvic_irq_domain) {
pr_warn("Failed to allocate irq domain\n");
return -ENOMEM;
--
2.4.1
Support the NVIC interrupt controller as node parent of the MSCM
interrupt router. On the dual-core variants of Vybird (VF6xx), the
NVIC interrupt controller is used by the Cortex-M4. To support
running Linux on this core too, MSCM needs NVIC parent support too.
Signed-off-by: Stefan Agner <[email protected]>
---
drivers/irqchip/irq-vf610-mscm-ir.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-vf610-mscm-ir.c b/drivers/irqchip/irq-vf610-mscm-ir.c
index 9521057..b932ecb 100644
--- a/drivers/irqchip/irq-vf610-mscm-ir.c
+++ b/drivers/irqchip/irq-vf610-mscm-ir.c
@@ -47,6 +47,7 @@ struct vf610_mscm_ir_chip_data {
void __iomem *mscm_ir_base;
u16 cpu_mask;
u16 saved_irsprc[MSCM_IRSPRC_NUM];
+ bool is_nvic;
};
static struct vf610_mscm_ir_chip_data *mscm_ir_data;
@@ -101,7 +102,7 @@ static void vf610_mscm_ir_enable(struct irq_data *data)
writew_relaxed(chip_data->cpu_mask,
chip_data->mscm_ir_base + MSCM_IRSPRC(hwirq));
- irq_chip_unmask_parent(data);
+ irq_chip_enable_parent(data);
}
static void vf610_mscm_ir_disable(struct irq_data *data)
@@ -111,7 +112,7 @@ static void vf610_mscm_ir_disable(struct irq_data *data)
writew_relaxed(0x0, chip_data->mscm_ir_base + MSCM_IRSPRC(hwirq));
- irq_chip_mask_parent(data);
+ irq_chip_disable_parent(data);
}
static struct irq_chip vf610_mscm_ir_irq_chip = {
@@ -143,10 +144,17 @@ static int vf610_mscm_ir_domain_alloc(struct irq_domain *domain, unsigned int vi
domain->host_data);
gic_data.np = domain->parent->of_node;
- gic_data.args_count = 3;
- gic_data.args[0] = GIC_SPI;
- gic_data.args[1] = irq_data->args[0];
- gic_data.args[2] = irq_data->args[1];
+
+ if (mscm_ir_data->is_nvic) {
+ gic_data.args_count = 1;
+ gic_data.args[0] = irq_data->args[0];
+ } else {
+ gic_data.args_count = 3;
+ gic_data.args[0] = GIC_SPI;
+ gic_data.args[1] = irq_data->args[0];
+ gic_data.args[2] = irq_data->args[1];
+ }
+
return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &gic_data);
}
@@ -199,6 +207,9 @@ static int __init vf610_mscm_ir_of_init(struct device_node *node,
goto out_unmap;
}
+ if (of_device_is_compatible(domain->parent->of_node, "arm,armv7m-nvic"))
+ mscm_ir_data->is_nvic = true;
+
cpu_pm_register_notifier(&mscm_ir_notifier_block);
return 0;
--
2.4.1
Vybrids has 112 peripherial interrupts which can be routed to the
Cortex-M4's NVIC interrupt controller.
Signed-off-by: Stefan Agner <[email protected]>
---
arch/arm/mm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 3937af0..527ea03 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -609,6 +609,7 @@ config CPUV7M_NUM_IRQ
depends on CPU_V7M
default 90 if ARCH_STM32
default 38 if ARCH_EFM32
+ default 112 if SOC_VF610
default 240
help
This option indicates the number of interrupts connected to the NVIC.
--
2.4.1
Add the minimal dependencies required to use the Vybrid PIT
clocksource driver. Those are not part of the SoC dependencies.
Acked-by: Daniel Lezcano <[email protected]>
Signed-off-by: Stefan Agner <[email protected]>
---
drivers/clocksource/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 51d7865f..9626c40 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -174,6 +174,8 @@ config FSL_FTM_TIMER
config VF_PIT_TIMER
bool
+ select CLKSRC_MMIO
+ select CLKSRC_OF
help
Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
--
2.4.1
Remove the needless differences between MMU/!MMU addruart calls.
This allows to use the same addruart macro on SoC level. Useful
for SoC consisting of multiple CPUs with and without MMU such as
Freescale Vybrid.
Signed-off-by: Stefan Agner <[email protected]>
---
arch/arm/include/debug/efm32.S | 2 +-
arch/arm/kernel/debug.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/debug/efm32.S b/arch/arm/include/debug/efm32.S
index 2265a19..660fa1e 100644
--- a/arch/arm/include/debug/efm32.S
+++ b/arch/arm/include/debug/efm32.S
@@ -16,7 +16,7 @@
#define UARTn_TXDATA 0x0034
- .macro addruart, rx, tmp
+ .macro addruart, rx, tmp, tmp2
ldr \rx, =(CONFIG_DEBUG_UART_PHYS)
/*
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index 78c91b5..ea9646c 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -35,7 +35,7 @@
#else /* !CONFIG_MMU */
.macro addruart_current, rx, tmp1, tmp2
- addruart \rx, \tmp1
+ addruart \rx, \tmp1, \tmp2
.endm
#endif /* CONFIG_MMU */
--
2.4.1
This introduces a new top level config symbol ARM_SINGLE_ARMV7M
for non-MMU, ARMv7-M platforms. It also support multiple ARMv7-M
platforms in one kernel image since the cores share the same
basic memory layout and interrupt controller. However, this works
only if the combined platforms also have a similar (main) memory
layout.
Signed-off-by: Stefan Agner <[email protected]>
---
arch/arm/Kconfig | 13 +++++++++++++
arch/arm/Kconfig.debug | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 45df48b..2361efc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -329,6 +329,19 @@ config ARCH_MULTIPLATFORM
select SPARSE_IRQ
select USE_OF
+config ARM_SINGLE_ARMV7M
+ bool "ARMv7-M based platforms (Cortex-M0/M3/M4)"
+ depends on !MMU
+ select ARCH_WANT_OPTIONAL_GPIOLIB
+ select ARM_NVIC
+ select CLKSRC_OF
+ select COMMON_CLK
+ select CPU_V7M
+ select GENERIC_CLOCKEVENTS
+ select NO_IOPORT_MAP
+ select SPARSE_IRQ
+ select USE_OF
+
config ARCH_REALVIEW
bool "ARM Ltd. RealView family"
select ARCH_WANT_OPTIONAL_GPIOLIB
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0c12ffb..e4441de 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1544,7 +1544,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
config DEBUG_UNCOMPRESS
bool
- depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG
+ depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
(!DEBUG_TEGRA_UART || !ZBOOT_ROM)
help
--
2.4.1
Use the new config symbol ARM_SINGLE_ARMV7M which groups config
symbols used by modern ARMv7-M platforms. It also support multiple
ARMv7-M platforms in one kernel image. However, this only works if
the combined platforms share the same (main) memory layout.
Also use generic debug/uncompress.h for all ARMv7-M platforms.
Signed-off-by: Stefan Agner <[email protected]>
---
arch/arm/Kconfig | 28 ++++++++++------------------
arch/arm/Kconfig.debug | 2 +-
arch/arm/configs/efm32_defconfig | 1 +
3 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2361efc..d1c035d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -411,24 +411,6 @@ config ARCH_EBSA110
Ethernet interface, two PCMCIA sockets, two serial ports and a
parallel port.
-config ARCH_EFM32
- bool "Energy Micro efm32"
- depends on !MMU
- select ARCH_REQUIRE_GPIOLIB
- select ARM_NVIC
- select AUTO_ZRELADDR
- select CLKSRC_OF
- select COMMON_CLK
- select CPU_V7M
- select GENERIC_CLOCKEVENTS
- select NO_DMA
- select NO_IOPORT_MAP
- select SPARSE_IRQ
- select USE_OF
- help
- Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko
- processors.
-
config ARCH_EP93XX
bool "EP93xx-based"
select ARCH_HAS_HOLES_MEMORYMODEL
@@ -963,6 +945,16 @@ source "arch/arm/mach-w90x900/Kconfig"
source "arch/arm/mach-zynq/Kconfig"
+# ARMv7-M architecture
+config ARCH_EFM32
+ bool "Energy Micro efm32"
+ depends on ARM_SINGLE_ARMV7M
+ select ARCH_REQUIRE_GPIOLIB
+ select AUTO_ZRELADDR
+ help
+ Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko
+ processors.
+
# Definitions to make life easier
config ARCH_ACORN
bool
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index e4441de..5d63c56 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1561,7 +1561,7 @@ config DEBUG_UNCOMPRESS
config UNCOMPRESS_INCLUDE
string
default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
- PLAT_SAMSUNG || ARCH_EFM32 || \
+ PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
ARCH_SHMOBILE_LEGACY
default "mach/uncompress.h"
diff --git a/arch/arm/configs/efm32_defconfig b/arch/arm/configs/efm32_defconfig
index c4c17e3..e969f78 100644
--- a/arch/arm/configs/efm32_defconfig
+++ b/arch/arm/configs/efm32_defconfig
@@ -16,6 +16,7 @@ CONFIG_EMBEDDED=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_MMU is not set
+CONFIG_ARM_SINGLE_ARMV7M=y
CONFIG_ARCH_EFM32=y
CONFIG_SET_MEM_PARAM=y
CONFIG_DRAM_BASE=0x88000000
--
2.4.1
This patch allows to build the Kernel for Vybrid (VF6xx) SoC
when ARMv7-M CPU is selected. The resulting image runs on the
secondary Cortex-M4 core. This core has equally access to all
peripherals as the main Cortex-A5 core. However, there is no
resource control mechanism, hence when both cores are used
simultaneously, orthogonal device tree's are required.
The boot CPU is dependent on the SoC variant. The available
boards use mostly variants where the Cortex-A5 is the primary
and hence the boot CPU. Booting the secondary Cortex-M4 CPU
needs SoC specific registers written. There is no in kernel
support for this right now, a external userspace utility
called "m4boot" can be used to boot the kernel:
m4boot xipImage initramfs.cpio.lzo vf610m4-colibri.dtb
Signed-off-by: Stefan Agner <[email protected]>
---
Documentation/devicetree/bindings/arm/fsl.txt | 3 +++
arch/arm/mach-imx/Kconfig | 38 +++++++++++++++------------
arch/arm/mach-imx/Makefile.boot | 0
arch/arm/mach-imx/mach-vf610.c | 1 +
4 files changed, 25 insertions(+), 17 deletions(-)
create mode 100644 arch/arm/mach-imx/Makefile.boot
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index a5462b6..2a3ba73 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -81,12 +81,15 @@ Freescale Vybrid Platform Device Tree Bindings
For the Vybrid SoC familiy all variants with DDR controller are supported,
which is the VF5xx and VF6xx series. Out of historical reasons, in most
places the kernel uses vf610 to refer to the whole familiy.
+The compatible string "fsl,vf610m4" is used for the secondary Cortex-M4
+core support.
Required root node compatible property (one of them):
- compatible = "fsl,vf500";
- compatible = "fsl,vf510";
- compatible = "fsl,vf600";
- compatible = "fsl,vf610";
+ - compatible = "fsl,vf610m4";
Freescale LS1021A Platform Device Tree Bindings
------------------------------------------------
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 3a3d3e9..2e3c458 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -1,5 +1,5 @@
menuconfig ARCH_MXC
- bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
+ bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
select ARCH_REQUIRE_GPIOLIB
select ARM_CPU_SUSPEND if PM
select CLKSRC_MMIO
@@ -496,10 +496,10 @@ config MACH_VPR200
endif
-if ARCH_MULTI_V5
-
comment "Device tree only"
+if ARCH_MULTI_V5
+
config SOC_IMX25
bool "i.MX25 support"
select ARCH_MXC_IOMUX_V3
@@ -512,7 +512,7 @@ endif
if ARCH_MULTI_V7
-comment "Device tree only"
+comment "Cortex-A platforms"
config SOC_IMX5
bool
@@ -582,10 +582,24 @@ config SOC_IMX6SX
help
This enables support for Freescale i.MX6 SoloX processor.
+config SOC_LS1021A
+ bool "Freescale LS1021A support"
+ select ARM_GIC
+ select HAVE_ARM_ARCH_TIMER
+ select PCI_DOMAINS if PCI
+ select ZONE_DMA if ARM_LPAE
+ help
+ This enables support for Freescale LS1021A processor.
+
+endif
+
+comment "Cortex-A/Cortex-M asymmetric multiprocessing platforms"
+
+if ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
+
config SOC_VF610
bool "Vybrid Family VF610 support"
- select IRQ_DOMAIN_HIERARCHY
- select ARM_GIC
+ select ARM_GIC if ARCH_MULTI_V7
select PINCTRL_VF610
select PL310_ERRATA_769419 if CACHE_L2X0
select SMP_ON_UP if SMP
@@ -599,7 +613,7 @@ choice
default VF_USE_ARM_GLOBAL_TIMER
config VF_USE_ARM_GLOBAL_TIMER
- bool "Use ARM Global Timer"
+ bool "Use ARM Global Timer" if ARCH_MULTI_V7
select ARM_GLOBAL_TIMER
select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
help
@@ -613,16 +627,6 @@ choice
endchoice
-config SOC_LS1021A
- bool "Freescale LS1021A support"
- select ARM_GIC
- select HAVE_ARM_ARCH_TIMER
- select PCI_DOMAINS if PCI
- select ZONE_DMA if ARM_LPAE
-
- help
- This enables support for Freescale LS1021A processor.
-
endif
source "arch/arm/mach-imx/devices/Kconfig"
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
new file mode 100644
index 0000000..e69de29
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index 2e7c75b..b20f6c1 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -17,6 +17,7 @@ static const char * const vf610_dt_compat[] __initconst = {
"fsl,vf510",
"fsl,vf600",
"fsl,vf610",
+ "fsl,vf610m4",
NULL,
};
--
2.4.1
This adds an initial device tree to run Linux on the Cortex-M4 on
the Vybrid based Colibri VF61 module.
Signed-off-by: Stefan Agner <[email protected]>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/vf610m4-colibri.dts | 99 +++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/vf610m4.dtsi | 50 ++++++++++++++++++
3 files changed, 150 insertions(+)
create mode 100644 arch/arm/boot/dts/vf610m4-colibri.dts
create mode 100644 arch/arm/boot/dts/vf610m4.dtsi
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 86217db..32806fd 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -319,6 +319,7 @@ dtb-$(CONFIG_SOC_LS1021A) += \
dtb-$(CONFIG_SOC_VF610) += \
vf500-colibri-eval-v3.dtb \
vf610-colibri-eval-v3.dtb \
+ vf610m4-colibri.dtb \
vf610-cosmic.dtb \
vf610-twr.dtb
dtb-$(CONFIG_ARCH_MXS) += \
diff --git a/arch/arm/boot/dts/vf610m4-colibri.dts b/arch/arm/boot/dts/vf610m4-colibri.dts
new file mode 100644
index 0000000..2931a80
--- /dev/null
+++ b/arch/arm/boot/dts/vf610m4-colibri.dts
@@ -0,0 +1,99 @@
+/*
+ * Device tree for Colibri VF61 Cortex-M4 support
+ *
+ * Copyright (C) 2015 Stefan Agner
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "vf610m4.dtsi"
+
+/ {
+ model = "VF610 Cortex-M4";
+ compatible = "fsl,vf610m4";
+
+ chosen {
+ bootargs = "console=ttyLP2,115200 clk_ignore_unused init=/linuxrc rw";
+ linux,stdout-path = "&uart2";
+ };
+
+ memory {
+ reg = <0x8c000000 0x3000000>;
+ };
+};
+
+&gpio0 {
+ status = "disabled";
+};
+
+&gpio1 {
+ status = "disabled";
+};
+
+&gpio2 {
+ status = "disabled";
+};
+
+&gpio3 {
+ status = "disabled";
+};
+
+&gpio4 {
+ status = "disabled";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ status = "okay";
+};
+
+&iomuxc {
+ vf610-colibri {
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ VF610_PAD_PTD0__UART2_TX 0x21a2
+ VF610_PAD_PTD1__UART2_RX 0x21a1
+ VF610_PAD_PTD2__UART2_RTS 0x21a2
+ VF610_PAD_PTD3__UART2_CTS 0x21a1
+ >;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/vf610m4.dtsi b/arch/arm/boot/dts/vf610m4.dtsi
new file mode 100644
index 0000000..9ffe2eb
--- /dev/null
+++ b/arch/arm/boot/dts/vf610m4.dtsi
@@ -0,0 +1,50 @@
+/*
+ * Device tree for VF6xx Cortex-M4 support
+ *
+ * Copyright (C) 2015 Stefan Agner
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "armv7-m.dtsi"
+#include "vfxxx.dtsi"
+
+&mscm_ir {
+ interrupt-parent = <&nvic>;
+};
--
2.4.1
Add defconfig for Linux on Vybrid (vf610) on the secondary Cortex-
M4 CPU. The use of a XIP image has been tested which needs to be
loaded (e.g. using the custom m4boot loader) to the end of the
available RAM at address 0x8f000000. The Cortex-M4 has a code-alias
which makes sure that the instructions get fetched through the code
bus (alias starts at 0x00800000 => 0x80800000 in system address).
Hence, to get optimal performance, use 0x0f000000 as XIP_PHYS_ADDR.
This address is additionally shifted by the length of the minimal
loader which is inserted by m4boot. Currently, this offset is 0x80.
The standard DRAM base address is configured to 0x8C000000, which
gives the Cortex-M4 48MiB of RAM.
Signed-off-by: Stefan Agner <[email protected]>
---
arch/arm/configs/vf610m4_defconfig | 42 ++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 arch/arm/configs/vf610m4_defconfig
diff --git a/arch/arm/configs/vf610m4_defconfig b/arch/arm/configs/vf610m4_defconfig
new file mode 100644
index 0000000..aeb2482
--- /dev/null
+++ b/arch/arm/configs/vf610m4_defconfig
@@ -0,0 +1,42 @@
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+# CONFIG_RD_XZ is not set
+# CONFIG_RD_LZ4 is not set
+CONFIG_KALLSYMS_ALL=y
+CONFIG_EMBEDDED=y
+# CONFIG_MMU is not set
+CONFIG_ARM_SINGLE_ARMV7M=y
+CONFIG_ARCH_MXC=y
+CONFIG_SOC_VF610=y
+CONFIG_SET_MEM_PARAM=y
+CONFIG_DRAM_BASE=0x8c000000
+CONFIG_FLASH_MEM_BASE=0x8f000000
+CONFIG_FLASH_SIZE=0x01000000
+CONFIG_CMDLINE="console=/dev/ttyLP2"
+CONFIG_XIP_KERNEL=y
+CONFIG_XIP_PHYS_ADDR=0x0f000080
+CONFIG_BINFMT_FLAT=y
+CONFIG_BINFMT_ZFLAT=y
+CONFIG_BINFMT_SHARED_FLAT=y
+# CONFIG_SUSPEND is not set
+# CONFIG_UEVENT_HELPER is not set
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_FIRMWARE_IN_KERNEL is not set
+# CONFIG_ALLOW_DEV_COREDUMP is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=4
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_MFD_SYSCON=y
+# CONFIG_HID is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MISC_FILESYSTEMS is not set
+# CONFIG_FTRACE is not set
--
2.4.1
On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
> Remove the needless differences between MMU/!MMU addruart calls.
> This allows to use the same addruart macro on SoC level. Useful
> for SoC consisting of multiple CPUs with and without MMU such as
> Freescale Vybrid.
>
> Signed-off-by: Stefan Agner <[email protected]>
Depending on the merge plan for the remainder (has tglx reviewed the IRQ
changes yet? I think he needs to before this can be merged)... if it's
not going to go in for the next merge window, this should find its way
into the patch system so it can be applied anyway.
> ---
> arch/arm/include/debug/efm32.S | 2 +-
> arch/arm/kernel/debug.S | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/debug/efm32.S b/arch/arm/include/debug/efm32.S
> index 2265a19..660fa1e 100644
> --- a/arch/arm/include/debug/efm32.S
> +++ b/arch/arm/include/debug/efm32.S
> @@ -16,7 +16,7 @@
>
> #define UARTn_TXDATA 0x0034
>
> - .macro addruart, rx, tmp
> + .macro addruart, rx, tmp, tmp2
> ldr \rx, =(CONFIG_DEBUG_UART_PHYS)
>
> /*
> diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
> index 78c91b5..ea9646c 100644
> --- a/arch/arm/kernel/debug.S
> +++ b/arch/arm/kernel/debug.S
> @@ -35,7 +35,7 @@
>
> #else /* !CONFIG_MMU */
> .macro addruart_current, rx, tmp1, tmp2
> - addruart \rx, \tmp1
> + addruart \rx, \tmp1, \tmp2
> .endm
>
> #endif /* CONFIG_MMU */
> --
> 2.4.1
>
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
On Sat, 16 May 2015, Russell King - ARM Linux wrote:
> On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
> > Remove the needless differences between MMU/!MMU addruart calls.
> > This allows to use the same addruart macro on SoC level. Useful
> > for SoC consisting of multiple CPUs with and without MMU such as
> > Freescale Vybrid.
> >
> > Signed-off-by: Stefan Agner <[email protected]>
>
> Depending on the merge plan for the remainder (has tglx reviewed the IRQ
> changes yet? I think he needs to before this can be merged)... if it's
> not going to go in for the next merge window, this should find its way
> into the patch system so it can be applied anyway.
I'm going to apply the irq core and chip driver modifications to a
separate branch later today, so you or ARM-SOC folks can pull that
in. Will send you a mail where it can be found.
Thanks,
tglx
Commit-ID: 5f22f5c668204f3af7557018b2ad6cf2074defac
Gitweb: http://git.kernel.org/tip/5f22f5c668204f3af7557018b2ad6cf2074defac
Author: Stefan Agner <[email protected]>
AuthorDate: Sat, 16 May 2015 11:44:13 +0200
Committer: Thomas Gleixner <[email protected]>
CommitDate: Mon, 18 May 2015 17:32:43 +0200
irqdomain: Add non-hierarchy helper irq_domain_set_info
This adds the helper irq_domain_set_info() in a non-domain hierarchy
variant. This allows to use the helper for generic chip since not
all chips using generic chip support domain hierarchy.
Signed-off-by: Stefan Agner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
---
include/linux/irqdomain.h | 8 ++++----
kernel/irq/irqdomain.c | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 676d730..744ac0e 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -258,6 +258,10 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,
/* V2 interfaces to support hierarchy IRQ domains. */
extern struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain,
unsigned int virq);
+extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
+ irq_hw_number_t hwirq, struct irq_chip *chip,
+ void *chip_data, irq_flow_handler_t handler,
+ void *handler_data, const char *handler_name);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
extern struct irq_domain *irq_domain_add_hierarchy(struct irq_domain *parent,
unsigned int flags, unsigned int size,
@@ -281,10 +285,6 @@ extern int irq_domain_set_hwirq_and_chip(struct irq_domain *domain,
irq_hw_number_t hwirq,
struct irq_chip *chip,
void *chip_data);
-extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
- irq_hw_number_t hwirq, struct irq_chip *chip,
- void *chip_data, irq_flow_handler_t handler,
- void *handler_data, const char *handler_name);
extern void irq_domain_reset_irq_data(struct irq_data *irq_data);
extern void irq_domain_free_irqs_common(struct irq_domain *domain,
unsigned int virq,
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 7fac311..41bf6dc 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1232,6 +1232,27 @@ struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain,
return (irq_data && irq_data->domain == domain) ? irq_data : NULL;
}
+/**
+ * irq_domain_set_info - Set the complete data for a @virq in @domain
+ * @domain: Interrupt domain to match
+ * @virq: IRQ number
+ * @hwirq: The hardware interrupt number
+ * @chip: The associated interrupt chip
+ * @chip_data: The associated interrupt chip data
+ * @handler: The interrupt flow handler
+ * @handler_data: The interrupt flow handler data
+ * @handler_name: The interrupt handler name
+ */
+void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
+ irq_hw_number_t hwirq, struct irq_chip *chip,
+ void *chip_data, irq_flow_handler_t handler,
+ void *handler_data, const char *handler_name)
+{
+ irq_set_chip_and_handler_name(virq, chip, handler, handler_name);
+ irq_set_chip_data(virq, chip_data);
+ irq_set_handler_data(virq, handler_data);
+}
+
static void irq_domain_check_hierarchy(struct irq_domain *domain)
{
}
On Sun, 17 May 2015, Thomas Gleixner wrote:
> On Sat, 16 May 2015, Russell King - ARM Linux wrote:
>
> > On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
> > > Remove the needless differences between MMU/!MMU addruart calls.
> > > This allows to use the same addruart macro on SoC level. Useful
> > > for SoC consisting of multiple CPUs with and without MMU such as
> > > Freescale Vybrid.
> > >
> > > Signed-off-by: Stefan Agner <[email protected]>
> >
> > Depending on the merge plan for the remainder (has tglx reviewed the IRQ
> > changes yet? I think he needs to before this can be merged)... if it's
> > not going to go in for the next merge window, this should find its way
> > into the patch system so it can be applied anyway.
>
> I'm going to apply the irq core and chip driver modifications to a
> separate branch later today, so you or ARM-SOC folks can pull that
> in. Will send you a mail where it can be found.
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-arm
That contains the first 5 patches which touch kernel/irq/ and
drivers/irqchip/
Thanks,
tglx
Commit-ID: 3cfeffc265791bc953527458e0a44ea77c459340
Gitweb: http://git.kernel.org/tip/3cfeffc265791bc953527458e0a44ea77c459340
Author: Stefan Agner <[email protected]>
AuthorDate: Sat, 16 May 2015 11:44:14 +0200
Committer: Thomas Gleixner <[email protected]>
CommitDate: Mon, 18 May 2015 17:32:44 +0200
genirq: Add irq_chip_(enable/disable)_parent
Add helper irq_chip_enable_parent and irq_chip_disable_parent. The
helper implement the default behavior in case irq_enable or irq_disable
is not implemented for the parent interrupt chip, which is calling the
irq_mask or irq_unmask respectively.
Signed-off-by: Stefan Agner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
---
include/linux/irq.h | 2 ++
kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 62c6901..2633061 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -458,6 +458,8 @@ extern void handle_nested_irq(unsigned int irq);
extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
+extern void irq_chip_enable_parent(struct irq_data *data);
+extern void irq_chip_disable_parent(struct irq_data *data);
extern void irq_chip_ack_parent(struct irq_data *data);
extern int irq_chip_retrigger_hierarchy(struct irq_data *data);
extern void irq_chip_mask_parent(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index eb9a4ea..2456fe8 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -876,6 +876,34 @@ void irq_cpu_offline(void)
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
/**
+ * irq_chip_enable_parent - Enable the parent interrupt (defaults to unmask if
+ * NULL)
+ * @data: Pointer to interrupt specific data
+ */
+void irq_chip_enable_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data->chip->irq_enable)
+ data->chip->irq_enable(data);
+ else
+ data->chip->irq_unmask(data);
+}
+
+/**
+ * irq_chip_disable_parent - Disable the parent interrupt (defaults to mask if
+ * NULL)
+ * @data: Pointer to interrupt specific data
+ */
+void irq_chip_disable_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data->chip->irq_disable)
+ data->chip->irq_disable(data);
+ else
+ data->chip->irq_mask(data);
+}
+
+/**
* irq_chip_ack_parent - Acknowledge the parent interrupt
* @data: Pointer to interrupt specific data
*/
Commit-ID: c5863484c16b37a266ef9c0d728352b4e115a46a
Gitweb: http://git.kernel.org/tip/c5863484c16b37a266ef9c0d728352b4e115a46a
Author: Stefan Agner <[email protected]>
AuthorDate: Sat, 16 May 2015 11:44:15 +0200
Committer: Thomas Gleixner <[email protected]>
CommitDate: Mon, 18 May 2015 17:32:44 +0200
genirq: generic chip: Support hierarchy domain
Use the new helper function irq_domain_set_info to make sure the
function irq_domain_set_hwirq_and_chip is being called, which is
crucial to save irqdomain specific data to irq_data.
Signed-off-by: Stefan Agner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
---
kernel/irq/generic-chip.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 61024e8..15b370d 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -360,7 +360,7 @@ static struct lock_class_key irq_nested_lock_class;
int irq_map_generic_chip(struct irq_domain *d, unsigned int virq,
irq_hw_number_t hw_irq)
{
- struct irq_data *data = irq_get_irq_data(virq);
+ struct irq_data *data = irq_domain_get_irq_data(d, virq);
struct irq_domain_chip_generic *dgc = d->gc;
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
@@ -405,8 +405,7 @@ int irq_map_generic_chip(struct irq_domain *d, unsigned int virq,
else
data->mask = 1 << idx;
- irq_set_chip_and_handler(virq, chip, ct->handler);
- irq_set_chip_data(virq, gc);
+ irq_domain_set_info(d, virq, hw_irq, chip, gc, ct->handler, NULL, NULL);
irq_modify_status(virq, dgc->irq_flags_to_clear, dgc->irq_flags_to_set);
return 0;
}
Commit-ID: 2d9f59f7bf8ef5704b0b6ca8406be12568a1c2da
Gitweb: http://git.kernel.org/tip/2d9f59f7bf8ef5704b0b6ca8406be12568a1c2da
Author: Stefan Agner <[email protected]>
AuthorDate: Sat, 16 May 2015 11:44:16 +0200
Committer: Thomas Gleixner <[email protected]>
CommitDate: Mon, 18 May 2015 17:32:44 +0200
irqchip: nvic: Support hierarchy irq domain
Add support for hierarchy irq domains. This is required to stack
the MSCM interrupt router and the NVIC controller found in Vybrid
SoC.
Signed-off-by: Stefan Agner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
---
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-nvic.c | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 6de62a9..99b9a97 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -30,6 +30,7 @@ config ARM_GIC_V3_ITS
config ARM_NVIC
bool
select IRQ_DOMAIN
+ select IRQ_DOMAIN_HIERARCHY
select GENERIC_IRQ_CHIP
config ARM_VIC
diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c
index 4ff0805..5fac910 100644
--- a/drivers/irqchip/irq-nvic.c
+++ b/drivers/irqchip/irq-nvic.c
@@ -49,6 +49,31 @@ nvic_handle_irq(irq_hw_number_t hwirq, struct pt_regs *regs)
handle_IRQ(irq, regs);
}
+static int nvic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
+ unsigned int nr_irqs, void *arg)
+{
+ int i, ret;
+ irq_hw_number_t hwirq;
+ unsigned int type = IRQ_TYPE_NONE;
+ struct of_phandle_args *irq_data = arg;
+
+ ret = irq_domain_xlate_onecell(domain, irq_data->np, irq_data->args,
+ irq_data->args_count, &hwirq, &type);
+ if (ret)
+ return ret;
+
+ for (i = 0; i < nr_irqs; i++)
+ irq_map_generic_chip(domain, virq + i, hwirq + i);
+
+ return 0;
+}
+
+static const struct irq_domain_ops nvic_irq_domain_ops = {
+ .xlate = irq_domain_xlate_onecell,
+ .alloc = nvic_irq_domain_alloc,
+ .free = irq_domain_free_irqs_top,
+};
+
static int __init nvic_of_init(struct device_node *node,
struct device_node *parent)
{
@@ -70,7 +95,8 @@ static int __init nvic_of_init(struct device_node *node,
irqs = NVIC_MAX_IRQ;
nvic_irq_domain =
- irq_domain_add_linear(node, irqs, &irq_generic_chip_ops, NULL);
+ irq_domain_add_linear(node, irqs, &nvic_irq_domain_ops, NULL);
+
if (!nvic_irq_domain) {
pr_warn("Failed to allocate irq domain\n");
return -ENOMEM;
Commit-ID: 81eb67f0ed8d3aa799f909c12c8f1addcf8a0b79
Gitweb: http://git.kernel.org/tip/81eb67f0ed8d3aa799f909c12c8f1addcf8a0b79
Author: Stefan Agner <[email protected]>
AuthorDate: Sat, 16 May 2015 11:44:17 +0200
Committer: Thomas Gleixner <[email protected]>
CommitDate: Mon, 18 May 2015 17:32:44 +0200
irqchip: vf610-mscm: Support NVIC parent chip
Support the NVIC interrupt controller as node parent of the MSCM
interrupt router. On the dual-core variants of Vybird (VF6xx), the
NVIC interrupt controller is used by the Cortex-M4. To support
running Linux on this core too, MSCM needs NVIC parent support too.
[ tglx: Moved initialization of is_nvic before the domain registration ]
Signed-off-by: Stefan Agner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
---
drivers/irqchip/irq-vf610-mscm-ir.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-vf610-mscm-ir.c b/drivers/irqchip/irq-vf610-mscm-ir.c
index 9521057..9baad02 100644
--- a/drivers/irqchip/irq-vf610-mscm-ir.c
+++ b/drivers/irqchip/irq-vf610-mscm-ir.c
@@ -47,6 +47,7 @@ struct vf610_mscm_ir_chip_data {
void __iomem *mscm_ir_base;
u16 cpu_mask;
u16 saved_irsprc[MSCM_IRSPRC_NUM];
+ bool is_nvic;
};
static struct vf610_mscm_ir_chip_data *mscm_ir_data;
@@ -101,7 +102,7 @@ static void vf610_mscm_ir_enable(struct irq_data *data)
writew_relaxed(chip_data->cpu_mask,
chip_data->mscm_ir_base + MSCM_IRSPRC(hwirq));
- irq_chip_unmask_parent(data);
+ irq_chip_enable_parent(data);
}
static void vf610_mscm_ir_disable(struct irq_data *data)
@@ -111,7 +112,7 @@ static void vf610_mscm_ir_disable(struct irq_data *data)
writew_relaxed(0x0, chip_data->mscm_ir_base + MSCM_IRSPRC(hwirq));
- irq_chip_mask_parent(data);
+ irq_chip_disable_parent(data);
}
static struct irq_chip vf610_mscm_ir_irq_chip = {
@@ -143,10 +144,17 @@ static int vf610_mscm_ir_domain_alloc(struct irq_domain *domain, unsigned int vi
domain->host_data);
gic_data.np = domain->parent->of_node;
- gic_data.args_count = 3;
- gic_data.args[0] = GIC_SPI;
- gic_data.args[1] = irq_data->args[0];
- gic_data.args[2] = irq_data->args[1];
+
+ if (mscm_ir_data->is_nvic) {
+ gic_data.args_count = 1;
+ gic_data.args[0] = irq_data->args[0];
+ } else {
+ gic_data.args_count = 3;
+ gic_data.args[0] = GIC_SPI;
+ gic_data.args[1] = irq_data->args[0];
+ gic_data.args[2] = irq_data->args[1];
+ }
+
return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &gic_data);
}
@@ -191,6 +199,9 @@ static int __init vf610_mscm_ir_of_init(struct device_node *node,
regmap_read(mscm_cp_regmap, MSCM_CPxNUM, &cpuid);
mscm_ir_data->cpu_mask = 0x1 << cpuid;
+ if (of_device_is_compatible(domain->parent->of_node, "arm,armv7m-nvic"))
+ mscm_ir_data->is_nvic = true;
+
domain = irq_domain_add_hierarchy(domain_parent, 0,
MSCM_IRSPRC_NUM, node,
&mscm_irq_domain_ops, mscm_ir_data);
Commit-ID: b5cc5cbc116975812917db6de023cde928935910
Gitweb: http://git.kernel.org/tip/b5cc5cbc116975812917db6de023cde928935910
Author: Stefan Agner <[email protected]>
AuthorDate: Sat, 16 May 2015 11:44:17 +0200
Committer: Thomas Gleixner <[email protected]>
CommitDate: Mon, 18 May 2015 23:58:10 +0200
irqchip: vf610-mscm: Support NVIC parent chip
Support the NVIC interrupt controller as node parent of the MSCM
interrupt router. On the dual-core variants of Vybird (VF6xx), the
NVIC interrupt controller is used by the Cortex-M4. To support
running Linux on this core too, MSCM needs NVIC parent support too.
Signed-off-by: Stefan Agner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
---
drivers/irqchip/irq-vf610-mscm-ir.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-vf610-mscm-ir.c b/drivers/irqchip/irq-vf610-mscm-ir.c
index 9521057..b932ecb 100644
--- a/drivers/irqchip/irq-vf610-mscm-ir.c
+++ b/drivers/irqchip/irq-vf610-mscm-ir.c
@@ -47,6 +47,7 @@ struct vf610_mscm_ir_chip_data {
void __iomem *mscm_ir_base;
u16 cpu_mask;
u16 saved_irsprc[MSCM_IRSPRC_NUM];
+ bool is_nvic;
};
static struct vf610_mscm_ir_chip_data *mscm_ir_data;
@@ -101,7 +102,7 @@ static void vf610_mscm_ir_enable(struct irq_data *data)
writew_relaxed(chip_data->cpu_mask,
chip_data->mscm_ir_base + MSCM_IRSPRC(hwirq));
- irq_chip_unmask_parent(data);
+ irq_chip_enable_parent(data);
}
static void vf610_mscm_ir_disable(struct irq_data *data)
@@ -111,7 +112,7 @@ static void vf610_mscm_ir_disable(struct irq_data *data)
writew_relaxed(0x0, chip_data->mscm_ir_base + MSCM_IRSPRC(hwirq));
- irq_chip_mask_parent(data);
+ irq_chip_disable_parent(data);
}
static struct irq_chip vf610_mscm_ir_irq_chip = {
@@ -143,10 +144,17 @@ static int vf610_mscm_ir_domain_alloc(struct irq_domain *domain, unsigned int vi
domain->host_data);
gic_data.np = domain->parent->of_node;
- gic_data.args_count = 3;
- gic_data.args[0] = GIC_SPI;
- gic_data.args[1] = irq_data->args[0];
- gic_data.args[2] = irq_data->args[1];
+
+ if (mscm_ir_data->is_nvic) {
+ gic_data.args_count = 1;
+ gic_data.args[0] = irq_data->args[0];
+ } else {
+ gic_data.args_count = 3;
+ gic_data.args[0] = GIC_SPI;
+ gic_data.args[1] = irq_data->args[0];
+ gic_data.args[2] = irq_data->args[1];
+ }
+
return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &gic_data);
}
@@ -199,6 +207,9 @@ static int __init vf610_mscm_ir_of_init(struct device_node *node,
goto out_unmap;
}
+ if (of_device_is_compatible(domain->parent->of_node, "arm,armv7m-nvic"))
+ mscm_ir_data->is_nvic = true;
+
cpu_pm_register_notifier(&mscm_ir_notifier_block);
return 0;
On Mon, May 18, 2015 at 05:36:43PM +0200, Thomas Gleixner wrote:
>
>
> On Sun, 17 May 2015, Thomas Gleixner wrote:
>
> > On Sat, 16 May 2015, Russell King - ARM Linux wrote:
> >
> > > On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
> > > > Remove the needless differences between MMU/!MMU addruart calls.
> > > > This allows to use the same addruart macro on SoC level. Useful
> > > > for SoC consisting of multiple CPUs with and without MMU such as
> > > > Freescale Vybrid.
> > > >
> > > > Signed-off-by: Stefan Agner <[email protected]>
> > >
> > > Depending on the merge plan for the remainder (has tglx reviewed the IRQ
> > > changes yet? I think he needs to before this can be merged)... if it's
> > > not going to go in for the next merge window, this should find its way
> > > into the patch system so it can be applied anyway.
> >
> > I'm going to apply the irq core and chip driver modifications to a
> > separate branch later today, so you or ARM-SOC folks can pull that
> > in. Will send you a mail where it can be found.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-arm
>
> That contains the first 5 patches which touch kernel/irq/ and
> drivers/irqchip/
Russell, Arnd,
I guess the easiest way to merge rest of the series is to have them go
via i.MX tree with your nods?
Shawn
On Tue, 19 May 2015, Shawn Guo wrote:
> On Mon, May 18, 2015 at 05:36:43PM +0200, Thomas Gleixner wrote:
> >
> >
> > On Sun, 17 May 2015, Thomas Gleixner wrote:
> >
> > > On Sat, 16 May 2015, Russell King - ARM Linux wrote:
> > >
> > > > On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
> > > > > Remove the needless differences between MMU/!MMU addruart calls.
> > > > > This allows to use the same addruart macro on SoC level. Useful
> > > > > for SoC consisting of multiple CPUs with and without MMU such as
> > > > > Freescale Vybrid.
> > > > >
> > > > > Signed-off-by: Stefan Agner <[email protected]>
> > > >
> > > > Depending on the merge plan for the remainder (has tglx reviewed the IRQ
> > > > changes yet? I think he needs to before this can be merged)... if it's
> > > > not going to go in for the next merge window, this should find its way
> > > > into the patch system so it can be applied anyway.
> > >
> > > I'm going to apply the irq core and chip driver modifications to a
> > > separate branch later today, so you or ARM-SOC folks can pull that
> > > in. Will send you a mail where it can be found.
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-arm
> >
> > That contains the first 5 patches which touch kernel/irq/ and
> > drivers/irqchip/
>
> Russell, Arnd,
>
> I guess the easiest way to merge rest of the series is to have them go
> via i.MX tree with your nods?
If you pull the irq stuff. Make sure that the HEAD is b5cc5cbc11697. I
pushed out a broken version earlier.
Thanks,
tglx
On Tue, May 19, 2015 at 10:11:40AM +0200, Thomas Gleixner wrote:
> If you pull the irq stuff. Make sure that the HEAD is b5cc5cbc11697. I
> pushed out a broken version earlier.
Okay, thanks for the info, Thomas. I will take care of it if rmk and
Arnd agree with the approach.
Shawn
On Tue, May 19, 2015 at 01:35:03PM +0800, Shawn Guo wrote:
> On Mon, May 18, 2015 at 05:36:43PM +0200, Thomas Gleixner wrote:
> > On Sun, 17 May 2015, Thomas Gleixner wrote:
> > > On Sat, 16 May 2015, Russell King - ARM Linux wrote:
> > > > On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
> > > > > Remove the needless differences between MMU/!MMU addruart calls.
> > > > > This allows to use the same addruart macro on SoC level. Useful
> > > > > for SoC consisting of multiple CPUs with and without MMU such as
> > > > > Freescale Vybrid.
> > > > >
> > > > > Signed-off-by: Stefan Agner <[email protected]>
> > > >
> > > > Depending on the merge plan for the remainder (has tglx reviewed the IRQ
> > > > changes yet? I think he needs to before this can be merged)... if it's
> > > > not going to go in for the next merge window, this should find its way
> > > > into the patch system so it can be applied anyway.
> > >
> > > I'm going to apply the irq core and chip driver modifications to a
> > > separate branch later today, so you or ARM-SOC folks can pull that
> > > in. Will send you a mail where it can be found.
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-arm
> >
> > That contains the first 5 patches which touch kernel/irq/ and
> > drivers/irqchip/
>
> Russell, Arnd,
>
> I guess the easiest way to merge rest of the series is to have them go
> via i.MX tree with your nods?
I don't know, I've not looked at the remainder of the patches. Having
looked briefly at them, it looks like they touch EFM32 as well, so I'm
not sure having them all go through iMX is the right approach either.
Looking at the EFM32 patch, it looks like we've adopted my suggestion
(discussed with Arnd in the previous month) wrt noMMU, so I'll post a
couple of patches in a moment which fix Integrator for this as well.
Integrator is independent of this series, and it fixes real problems
caused by the single zImage stuff for noMMU there.
It makes sense for these to all go through arm-soc - but the question
is how do we get them all into arm-soc...
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
On 2015-05-19 12:16, Russell King - ARM Linux wrote:
> On Tue, May 19, 2015 at 01:35:03PM +0800, Shawn Guo wrote:
>> On Mon, May 18, 2015 at 05:36:43PM +0200, Thomas Gleixner wrote:
>> > On Sun, 17 May 2015, Thomas Gleixner wrote:
>> > > On Sat, 16 May 2015, Russell King - ARM Linux wrote:
>> > > > On Sat, May 16, 2015 at 11:44:20AM +0200, Stefan Agner wrote:
>> > > > > Remove the needless differences between MMU/!MMU addruart calls.
>> > > > > This allows to use the same addruart macro on SoC level. Useful
>> > > > > for SoC consisting of multiple CPUs with and without MMU such as
>> > > > > Freescale Vybrid.
>> > > > >
>> > > > > Signed-off-by: Stefan Agner <[email protected]>
>> > > >
>> > > > Depending on the merge plan for the remainder (has tglx reviewed the IRQ
>> > > > changes yet? I think he needs to before this can be merged)... if it's
>> > > > not going to go in for the next merge window, this should find its way
>> > > > into the patch system so it can be applied anyway.
>> > >
>> > > I'm going to apply the irq core and chip driver modifications to a
>> > > separate branch later today, so you or ARM-SOC folks can pull that
>> > > in. Will send you a mail where it can be found.
>> >
>> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-arm
>> >
>> > That contains the first 5 patches which touch kernel/irq/ and
>> > drivers/irqchip/
>>
>> Russell, Arnd,
>>
>> I guess the easiest way to merge rest of the series is to have them go
>> via i.MX tree with your nods?
>
> I don't know, I've not looked at the remainder of the patches. Having
> looked briefly at them, it looks like they touch EFM32 as well, so I'm
> not sure having them all go through iMX is the right approach either.
>
> Looking at the EFM32 patch, it looks like we've adopted my suggestion
> (discussed with Arnd in the previous month) wrt noMMU, so I'll post a
> couple of patches in a moment which fix Integrator for this as well.
> Integrator is independent of this series, and it fixes real problems
> caused by the single zImage stuff for noMMU there.
>
> It makes sense for these to all go through arm-soc - but the question
> is how do we get them all into arm-soc...
Sorry for the mess, I see, I should have tried split it in pieces which
match the subsystems.
Patch 06 defines a smaller vector table size, which is by default too
large. Hence this patch is quite independent, the rest of the patch set
works flawless without that patch. However, that patch relies on 8340/1
being applied ("ARM: ARMv7-M: Enlarge vector table up to 256 entries").
If this is ok for you Russel, I would submit that to your patch system.
Patch 07 defines dependencies a bit more explicitly, however, with the
current Kconfig symbol setup, both should be selected by other config
symbols (CLKSRC_OF by ARM_SINGLE_ARMV7M and CLKSRC_MMIO by ARCH_MXC).
Hence this can go independently through clocksource trees
(Daniel/Thomas?)
Not sure how we can deal with the EFM32 vs. IMX changes... Patches 08-10
has no dependencies on the clock changes which Thomas merged. They could
go through whatever EFM32 is merged normally (last time Arnd directly
merged from Uwe), and then Shawn could base the rest of the changes on
that too?
--
Stefan
On Tuesday 19 May 2015 13:23:22 Stefan Agner wrote:
> On 2015-05-19 12:16, Russell King - ARM Linux wrote:
> > On Tue, May 19, 2015 at 01:35:03PM +0800, Shawn Guo wrote:
> >> On Mon, May 18, 2015 at 05:36:43PM +0200, Thomas Gleixner wrote:
> >> > On Sun, 17 May 2015, Thomas Gleixner wrote:
> >> > > I'm going to apply the irq core and chip driver modifications to a
> >> > > separate branch later today, so you or ARM-SOC folks can pull that
> >> > > in. Will send you a mail where it can be found.
> >> >
> >> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/for-arm
> >> >
> >> > That contains the first 5 patches which touch kernel/irq/ and
> >> > drivers/irqchip/
> >>
> >> Russell, Arnd,
> >>
> >> I guess the easiest way to merge rest of the series is to have them go
> >> via i.MX tree with your nods?
Yes, that would be good.
> > I don't know, I've not looked at the remainder of the patches. Having
> > looked briefly at them, it looks like they touch EFM32 as well, so I'm
> > not sure having them all go through iMX is the right approach either.
> >
> > Looking at the EFM32 patch, it looks like we've adopted my suggestion
> > (discussed with Arnd in the previous month) wrt noMMU, so I'll post a
> > couple of patches in a moment which fix Integrator for this as well.
> > Integrator is independent of this series, and it fixes real problems
> > caused by the single zImage stuff for noMMU there.
> >
> > It makes sense for these to all go through arm-soc - but the question
> > is how do we get them all into arm-soc...
>
> Sorry for the mess, I see, I should have tried split it in pieces which
> match the subsystems.
>
> Patch 06 defines a smaller vector table size, which is by default too
> large. Hence this patch is quite independent, the rest of the patch set
> works flawless without that patch. However, that patch relies on 8340/1
> being applied ("ARM: ARMv7-M: Enlarge vector table up to 256 entries").
> If this is ok for you Russel, I would submit that to your patch system.
>
> Patch 07 defines dependencies a bit more explicitly, however, with the
> current Kconfig symbol setup, both should be selected by other config
> symbols (CLKSRC_OF by ARM_SINGLE_ARMV7M and CLKSRC_MMIO by ARCH_MXC).
> Hence this can go independently through clocksource trees
> (Daniel/Thomas?)
>
> Not sure how we can deal with the EFM32 vs. IMX changes... Patches 08-10
> has no dependencies on the clock changes which Thomas merged. They could
> go through whatever EFM32 is merged normally (last time Arnd directly
> merged from Uwe), and then Shawn could base the rest of the changes on
> that too?
Do you have a dependency on patch 10 (the one for EFM32) in your later
patches?
If not, you can send the other ones to Shawn, so I pull them as
a branch, and then I apply that on top of the merges. I have also
merged two other ARMv7M platforms for 4.2 now (both in next/soc),
so we should do the same change for those as well, and I'd rather
apply a patch for that, than merge a branch that is based on
next/soc.
Arnd
On Sat, May 16, 2015 at 11:44:22AM +0200, Stefan Agner wrote:
> Use the new config symbol ARM_SINGLE_ARMV7M which groups config
> symbols used by modern ARMv7-M platforms. It also support multiple
> ARMv7-M platforms in one kernel image. However, this only works if
> the combined platforms share the same (main) memory layout.
>
> Also use generic debug/uncompress.h for all ARMv7-M platforms.
>
> Signed-off-by: Stefan Agner <[email protected]>
Acked-by: Uwe Kleine-K?nig <[email protected]>
I don't have anything in the queu that would conflict with this patch,
so merge it whereever you, Russell and Arnd see fit.
Best regards
Uwe
> ---
> arch/arm/Kconfig | 28 ++++++++++------------------
> arch/arm/Kconfig.debug | 2 +-
> arch/arm/configs/efm32_defconfig | 1 +
> 3 files changed, 12 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 2361efc..d1c035d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -411,24 +411,6 @@ config ARCH_EBSA110
> Ethernet interface, two PCMCIA sockets, two serial ports and a
> parallel port.
>
> -config ARCH_EFM32
> - bool "Energy Micro efm32"
> - depends on !MMU
> - select ARCH_REQUIRE_GPIOLIB
> - select ARM_NVIC
> - select AUTO_ZRELADDR
> - select CLKSRC_OF
> - select COMMON_CLK
> - select CPU_V7M
> - select GENERIC_CLOCKEVENTS
> - select NO_DMA
> - select NO_IOPORT_MAP
> - select SPARSE_IRQ
> - select USE_OF
> - help
> - Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko
> - processors.
> -
> config ARCH_EP93XX
> bool "EP93xx-based"
> select ARCH_HAS_HOLES_MEMORYMODEL
> @@ -963,6 +945,16 @@ source "arch/arm/mach-w90x900/Kconfig"
>
> source "arch/arm/mach-zynq/Kconfig"
>
> +# ARMv7-M architecture
> +config ARCH_EFM32
> + bool "Energy Micro efm32"
> + depends on ARM_SINGLE_ARMV7M
> + select ARCH_REQUIRE_GPIOLIB
> + select AUTO_ZRELADDR
> + help
> + Support for Energy Micro's (now Silicon Labs) efm32 Giant Gecko
> + processors.
> +
> # Definitions to make life easier
> config ARCH_ACORN
> bool
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index e4441de..5d63c56 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1561,7 +1561,7 @@ config DEBUG_UNCOMPRESS
> config UNCOMPRESS_INCLUDE
> string
> default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
> - PLAT_SAMSUNG || ARCH_EFM32 || \
> + PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
> ARCH_SHMOBILE_LEGACY
> default "mach/uncompress.h"
>
> diff --git a/arch/arm/configs/efm32_defconfig b/arch/arm/configs/efm32_defconfig
> index c4c17e3..e969f78 100644
> --- a/arch/arm/configs/efm32_defconfig
> +++ b/arch/arm/configs/efm32_defconfig
> @@ -16,6 +16,7 @@ CONFIG_EMBEDDED=y
> # CONFIG_IOSCHED_DEADLINE is not set
> # CONFIG_IOSCHED_CFQ is not set
> # CONFIG_MMU is not set
> +CONFIG_ARM_SINGLE_ARMV7M=y
> CONFIG_ARCH_EFM32=y
> CONFIG_SET_MEM_PARAM=y
> CONFIG_DRAM_BASE=0x88000000
> --
> 2.4.1
>
>
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On 2015-05-19 13:50, Arnd Bergmann wrote:
> On Tuesday 19 May 2015 13:23:22 Stefan Agner wrote:
>> On 2015-05-19 12:16, Russell King - ARM Linux wrote:
<snip>
>> Not sure how we can deal with the EFM32 vs. IMX changes... Patches 08-10
>> has no dependencies on the clock changes which Thomas merged. They could
>> go through whatever EFM32 is merged normally (last time Arnd directly
>> merged from Uwe), and then Shawn could base the rest of the changes on
>> that too?
>
> Do you have a dependency on patch 10 (the one for EFM32) in your later
> patches?
Unfortunately, there is a dependency on that patch: I change the default
of UNCOMPRESS_INCLUDE to debug/uncompress.h for all ARM_SINGLE_ARMV7M
platforms. Without that patch, it would default to mach/uncompress.h,
which does not exist for MACH_MXC/SOC_VF610.
>
> If not, you can send the other ones to Shawn, so I pull them as
> a branch, and then I apply that on top of the merges. I have also
> merged two other ARMv7M platforms for 4.2 now (both in next/soc),
> so we should do the same change for those as well, and I'd rather
> apply a patch for that, than merge a branch that is based on
> next/soc.
I guess, in that case, you need to take the others too? (08/09?)
--
Stefan
On Tuesday 19 May 2015 18:06:53 Stefan Agner wrote:
> On 2015-05-19 13:50, Arnd Bergmann wrote:
> > On Tuesday 19 May 2015 13:23:22 Stefan Agner wrote:
> >> On 2015-05-19 12:16, Russell King - ARM Linux wrote:
> <snip>
> >> Not sure how we can deal with the EFM32 vs. IMX changes... Patches 08-10
> >> has no dependencies on the clock changes which Thomas merged. They could
> >> go through whatever EFM32 is merged normally (last time Arnd directly
> >> merged from Uwe), and then Shawn could base the rest of the changes on
> >> that too?
> >
> > Do you have a dependency on patch 10 (the one for EFM32) in your later
> > patches?
>
> Unfortunately, there is a dependency on that patch: I change the default
> of UNCOMPRESS_INCLUDE to debug/uncompress.h for all ARM_SINGLE_ARMV7M
> platforms. Without that patch, it would default to mach/uncompress.h,
> which does not exist for MACH_MXC/SOC_VF610.
An easy approach would be to list both ARM_SINGLE_ARMV7M and
EFM32 in the UNCOMPRESS_INCLUDE option initially, and then
follow-up with a patch that converts the three other platforms
(efm32, stm32 and lpc18xx) to ARM_SINGLE_ARMV7M and also
change the UNCOMPRESS_INCLUDE statement.
Note that I've already added both stm32 and lpc18xx to the
UNCOMPRESS_INCLUDE list in the next/soc branch.
> > If not, you can send the other ones to Shawn, so I pull them as
> > a branch, and then I apply that on top of the merges. I have also
> > merged two other ARMv7M platforms for 4.2 now (both in next/soc),
> > so we should do the same change for those as well, and I'd rather
> > apply a patch for that, than merge a branch that is based on
> > next/soc.
>
> I guess, in that case, you need to take the others too? (08/09?)
I'm fine with that, too. If Shawn thinks the patches are ok, you can
just send all patches you want me to apply in arm-soc based on
the appropriate branches (next/soc, next/dt and next/defconfig, I
presume), and I'll apply them this time. In the future, you should
send all patches to Shawn though.
Arnd
On 2015-05-19 20:24, Arnd Bergmann wrote:
> On Tuesday 19 May 2015 18:06:53 Stefan Agner wrote:
>> On 2015-05-19 13:50, Arnd Bergmann wrote:
>> > Do you have a dependency on patch 10 (the one for EFM32) in your later
>> > patches?
>>
>> Unfortunately, there is a dependency on that patch: I change the default
>> of UNCOMPRESS_INCLUDE to debug/uncompress.h for all ARM_SINGLE_ARMV7M
>> platforms. Without that patch, it would default to mach/uncompress.h,
>> which does not exist for MACH_MXC/SOC_VF610.
>
> An easy approach would be to list both ARM_SINGLE_ARMV7M and
> EFM32 in the UNCOMPRESS_INCLUDE option initially, and then
> follow-up with a patch that converts the three other platforms
> (efm32, stm32 and lpc18xx) to ARM_SINGLE_ARMV7M and also
> change the UNCOMPRESS_INCLUDE statement.
>
> Note that I've already added both stm32 and lpc18xx to the
> UNCOMPRESS_INCLUDE list in the next/soc branch.
Afaiks, only ARCH_LPC18XX is in UNCOMPRESS_INCLUDE, probably STM32
doesn't support compressed image/earlyprintk?
>> > If not, you can send the other ones to Shawn, so I pull them as
>> > a branch, and then I apply that on top of the merges. I have also
>> > merged two other ARMv7M platforms for 4.2 now (both in next/soc),
>> > so we should do the same change for those as well, and I'd rather
>> > apply a patch for that, than merge a branch that is based on
>> > next/soc.
>>
>> I guess, in that case, you need to take the others too? (08/09?)
>
> I'm fine with that, too. If Shawn thinks the patches are ok, you can
> just send all patches you want me to apply in arm-soc based on
> the appropriate branches (next/soc, next/dt and next/defconfig, I
> presume), and I'll apply them this time. In the future, you should
> send all patches to Shawn though.
Ok, I will rebase this patchset (06-13) then, send the clocksource patch
(07) as a single patch and send the EFM32 convertion patch (10) together
with a conversion patch of the other two platforms as a follow-up.
--
Stefan
On Tue, 19 May 2015, Stefan Agner wrote:
> Ok, I will rebase this patchset (06-13) then, send the clocksource patch
> (07) as a single patch and send the EFM32 convertion patch (10) together
> with a conversion patch of the other two platforms as a follow-up.
Is the clocksource one independent? Then I can just pick it up now and
route it through tip.
Thanks,
tglx
On 2015-05-19 23:32, Thomas Gleixner wrote:
> On Tue, 19 May 2015, Stefan Agner wrote:
>> Ok, I will rebase this patchset (06-13) then, send the clocksource patch
>> (07) as a single patch and send the EFM32 convertion patch (10) together
>> with a conversion patch of the other two platforms as a follow-up.
>
> Is the clocksource one independent? Then I can just pick it up now and
> route it through tip.
With the current Kconfig symbol setup, both should be selected by other
config symbols (CLKSRC_OF by ARM_SINGLE_ARMV7M and CLKSRC_MMIO by
ARCH_MXC).
Hence yes, this can go independently through tip.
--
Stefan
On Tuesday 19 May 2015 23:26:53 Stefan Agner wrote:
> On 2015-05-19 20:24, Arnd Bergmann wrote:
> > On Tuesday 19 May 2015 18:06:53 Stefan Agner wrote:
> >> On 2015-05-19 13:50, Arnd Bergmann wrote:
> >> > Do you have a dependency on patch 10 (the one for EFM32) in your later
> >> > patches?
> >>
> >> Unfortunately, there is a dependency on that patch: I change the default
> >> of UNCOMPRESS_INCLUDE to debug/uncompress.h for all ARM_SINGLE_ARMV7M
> >> platforms. Without that patch, it would default to mach/uncompress.h,
> >> which does not exist for MACH_MXC/SOC_VF610.
> >
> > An easy approach would be to list both ARM_SINGLE_ARMV7M and
> > EFM32 in the UNCOMPRESS_INCLUDE option initially, and then
> > follow-up with a patch that converts the three other platforms
> > (efm32, stm32 and lpc18xx) to ARM_SINGLE_ARMV7M and also
> > change the UNCOMPRESS_INCLUDE statement.
> >
> > Note that I've already added both stm32 and lpc18xx to the
> > UNCOMPRESS_INCLUDE list in the next/soc branch.
>
> Afaiks, only ARCH_LPC18XX is in UNCOMPRESS_INCLUDE, probably STM32
> doesn't support compressed image/earlyprintk?
It's actually a bug, and I have sent a patch to add the entry
(and was looking at my local tree), but haven't applied the
fix to the next/soc branch yet.
> >> > If not, you can send the other ones to Shawn, so I pull them as
> >> > a branch, and then I apply that on top of the merges. I have also
> >> > merged two other ARMv7M platforms for 4.2 now (both in next/soc),
> >> > so we should do the same change for those as well, and I'd rather
> >> > apply a patch for that, than merge a branch that is based on
> >> > next/soc.
> >>
> >> I guess, in that case, you need to take the others too? (08/09?)
> >
> > I'm fine with that, too. If Shawn thinks the patches are ok, you can
> > just send all patches you want me to apply in arm-soc based on
> > the appropriate branches (next/soc, next/dt and next/defconfig, I
> > presume), and I'll apply them this time. In the future, you should
> > send all patches to Shawn though.
>
> Ok, I will rebase this patchset (06-13) then, send the clocksource patch
> (07) as a single patch and send the EFM32 convertion patch (10) together
> with a conversion patch of the other two platforms as a follow-up.
Ok, sounds good.
Arnd
Hi Stefan,
On 19 May 2015 at 23:26, Stefan Agner <[email protected]> wrote:
> On 2015-05-19 20:24, Arnd Bergmann wrote:
>> On Tuesday 19 May 2015 18:06:53 Stefan Agner wrote:
>>> On 2015-05-19 13:50, Arnd Bergmann wrote:
>>> > Do you have a dependency on patch 10 (the one for EFM32) in your later
>>> > patches?
>>>
>>> Unfortunately, there is a dependency on that patch: I change the default
>>> of UNCOMPRESS_INCLUDE to debug/uncompress.h for all ARM_SINGLE_ARMV7M
>>> platforms. Without that patch, it would default to mach/uncompress.h,
>>> which does not exist for MACH_MXC/SOC_VF610.
>>
>> An easy approach would be to list both ARM_SINGLE_ARMV7M and
>> EFM32 in the UNCOMPRESS_INCLUDE option initially, and then
>> follow-up with a patch that converts the three other platforms
>> (efm32, stm32 and lpc18xx) to ARM_SINGLE_ARMV7M and also
>> change the UNCOMPRESS_INCLUDE statement.
>>
>> Note that I've already added both stm32 and lpc18xx to the
>> UNCOMPRESS_INCLUDE list in the next/soc branch.
>
> Afaiks, only ARCH_LPC18XX is in UNCOMPRESS_INCLUDE, probably STM32
> doesn't support compressed image/earlyprintk?
See: http://marc.info/?l=linux-arm-kernel&m=143196230014437&w=2
Seems like Arnd hasn't pushed it to the repo yet, though.
>>> > If not, you can send the other ones to Shawn, so I pull them as
>>> > a branch, and then I apply that on top of the merges. I have also
>>> > merged two other ARMv7M platforms for 4.2 now (both in next/soc),
>>> > so we should do the same change for those as well, and I'd rather
>>> > apply a patch for that, than merge a branch that is based on
>>> > next/soc.
>>>
>>> I guess, in that case, you need to take the others too? (08/09?)
>>
>> I'm fine with that, too. If Shawn thinks the patches are ok, you can
>> just send all patches you want me to apply in arm-soc based on
>> the appropriate branches (next/soc, next/dt and next/defconfig, I
>> presume), and I'll apply them this time. In the future, you should
>> send all patches to Shawn though.
>
> Ok, I will rebase this patchset (06-13) then, send the clocksource patch
> (07) as a single patch and send the EFM32 convertion patch (10) together
> with a conversion patch of the other two platforms as a follow-up.
Thanks for fixing up LPC18xx as well.
regards,
Joachim Eastwood