mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
Merge branch 'musb' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into omap/musb
This commit is contained in:
commit
705eb64e2e
@ -51,15 +51,14 @@ ffc00000 ffefffff DMA memory mapping region. Memory returned
|
|||||||
ff000000 ffbfffff Reserved for future expansion of DMA
|
ff000000 ffbfffff Reserved for future expansion of DMA
|
||||||
mapping region.
|
mapping region.
|
||||||
|
|
||||||
VMALLOC_END feffffff Free for platform use, recommended.
|
|
||||||
VMALLOC_END must be aligned to a 2MB
|
|
||||||
boundary.
|
|
||||||
|
|
||||||
VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space.
|
VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space.
|
||||||
Memory returned by vmalloc/ioremap will
|
Memory returned by vmalloc/ioremap will
|
||||||
be dynamically placed in this region.
|
be dynamically placed in this region.
|
||||||
VMALLOC_START may be based upon the value
|
Machine specific static mappings are also
|
||||||
of the high_memory variable.
|
located here through iotable_init().
|
||||||
|
VMALLOC_START is based upon the value
|
||||||
|
of the high_memory variable, and VMALLOC_END
|
||||||
|
is equal to 0xff000000.
|
||||||
|
|
||||||
PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region.
|
PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region.
|
||||||
This maps the platforms RAM, and typically
|
This maps the platforms RAM, and typically
|
||||||
|
@ -42,6 +42,10 @@ Optional
|
|||||||
- interrupts : Interrupt source of the parent interrupt controller. Only
|
- interrupts : Interrupt source of the parent interrupt controller. Only
|
||||||
present on secondary GICs.
|
present on secondary GICs.
|
||||||
|
|
||||||
|
- cpu-offset : per-cpu offset within the distributor and cpu interface
|
||||||
|
regions, used when the GIC doesn't have banked registers. The offset is
|
||||||
|
cpu-offset * cpu-nr.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
intc: interrupt-controller@fff11000 {
|
intc: interrupt-controller@fff11000 {
|
||||||
|
29
Documentation/devicetree/bindings/arm/vic.txt
Normal file
29
Documentation/devicetree/bindings/arm/vic.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
* ARM Vectored Interrupt Controller
|
||||||
|
|
||||||
|
One or more Vectored Interrupt Controllers (VIC's) can be connected in an ARM
|
||||||
|
system for interrupt routing. For multiple controllers they can either be
|
||||||
|
nested or have the outputs wire-OR'd together.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible : should be one of
|
||||||
|
"arm,pl190-vic"
|
||||||
|
"arm,pl192-vic"
|
||||||
|
- interrupt-controller : Identifies the node as an interrupt controller
|
||||||
|
- #interrupt-cells : The number of cells to define the interrupts. Must be 1 as
|
||||||
|
the VIC has no configuration options for interrupt sources. The cell is a u32
|
||||||
|
and defines the interrupt number.
|
||||||
|
- reg : The register bank for the VIC.
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
|
||||||
|
- interrupts : Interrupt source for parent controllers if the VIC is nested.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
vic0: interrupt-controller@60000 {
|
||||||
|
compatible = "arm,pl192-vic";
|
||||||
|
interrupt-controller;
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
reg = <0x60000 0x1000>;
|
||||||
|
};
|
@ -1,8 +1,14 @@
|
|||||||
config ARM_GIC
|
config ARM_GIC
|
||||||
select IRQ_DOMAIN
|
select IRQ_DOMAIN
|
||||||
|
select MULTI_IRQ_HANDLER
|
||||||
|
bool
|
||||||
|
|
||||||
|
config GIC_NON_BANKED
|
||||||
bool
|
bool
|
||||||
|
|
||||||
config ARM_VIC
|
config ARM_VIC
|
||||||
|
select IRQ_DOMAIN
|
||||||
|
select MULTI_IRQ_HANDLER
|
||||||
bool
|
bool
|
||||||
|
|
||||||
config ARM_VIC_NR
|
config ARM_VIC_NR
|
||||||
|
@ -40,13 +40,36 @@
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
#include <asm/exception.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
#include <asm/hardware/gic.h>
|
#include <asm/hardware/gic.h>
|
||||||
|
|
||||||
static DEFINE_RAW_SPINLOCK(irq_controller_lock);
|
union gic_base {
|
||||||
|
void __iomem *common_base;
|
||||||
|
void __percpu __iomem **percpu_base;
|
||||||
|
};
|
||||||
|
|
||||||
/* Address of GIC 0 CPU interface */
|
struct gic_chip_data {
|
||||||
void __iomem *gic_cpu_base_addr __read_mostly;
|
unsigned int irq_offset;
|
||||||
|
union gic_base dist_base;
|
||||||
|
union gic_base cpu_base;
|
||||||
|
#ifdef CONFIG_CPU_PM
|
||||||
|
u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)];
|
||||||
|
u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)];
|
||||||
|
u32 saved_spi_target[DIV_ROUND_UP(1020, 4)];
|
||||||
|
u32 __percpu *saved_ppi_enable;
|
||||||
|
u32 __percpu *saved_ppi_conf;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_IRQ_DOMAIN
|
||||||
|
struct irq_domain domain;
|
||||||
|
#endif
|
||||||
|
unsigned int gic_irqs;
|
||||||
|
#ifdef CONFIG_GIC_NON_BANKED
|
||||||
|
void __iomem *(*get_base)(union gic_base *);
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
static DEFINE_RAW_SPINLOCK(irq_controller_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Supported arch specific GIC irq extension.
|
* Supported arch specific GIC irq extension.
|
||||||
@ -67,16 +90,48 @@ struct irq_chip gic_arch_extn = {
|
|||||||
|
|
||||||
static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;
|
static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;
|
||||||
|
|
||||||
|
#ifdef CONFIG_GIC_NON_BANKED
|
||||||
|
static void __iomem *gic_get_percpu_base(union gic_base *base)
|
||||||
|
{
|
||||||
|
return *__this_cpu_ptr(base->percpu_base);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __iomem *gic_get_common_base(union gic_base *base)
|
||||||
|
{
|
||||||
|
return base->common_base;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void __iomem *gic_data_dist_base(struct gic_chip_data *data)
|
||||||
|
{
|
||||||
|
return data->get_base(&data->dist_base);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void __iomem *gic_data_cpu_base(struct gic_chip_data *data)
|
||||||
|
{
|
||||||
|
return data->get_base(&data->cpu_base);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void gic_set_base_accessor(struct gic_chip_data *data,
|
||||||
|
void __iomem *(*f)(union gic_base *))
|
||||||
|
{
|
||||||
|
data->get_base = f;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define gic_data_dist_base(d) ((d)->dist_base.common_base)
|
||||||
|
#define gic_data_cpu_base(d) ((d)->cpu_base.common_base)
|
||||||
|
#define gic_set_base_accessor(d,f)
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void __iomem *gic_dist_base(struct irq_data *d)
|
static inline void __iomem *gic_dist_base(struct irq_data *d)
|
||||||
{
|
{
|
||||||
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
|
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
|
||||||
return gic_data->dist_base;
|
return gic_data_dist_base(gic_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __iomem *gic_cpu_base(struct irq_data *d)
|
static inline void __iomem *gic_cpu_base(struct irq_data *d)
|
||||||
{
|
{
|
||||||
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
|
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
|
||||||
return gic_data->cpu_base;
|
return gic_data_cpu_base(gic_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int gic_irq(struct irq_data *d)
|
static inline unsigned int gic_irq(struct irq_data *d)
|
||||||
@ -215,6 +270,32 @@ static int gic_set_wake(struct irq_data *d, unsigned int on)
|
|||||||
#define gic_set_wake NULL
|
#define gic_set_wake NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
u32 irqstat, irqnr;
|
||||||
|
struct gic_chip_data *gic = &gic_data[0];
|
||||||
|
void __iomem *cpu_base = gic_data_cpu_base(gic);
|
||||||
|
|
||||||
|
do {
|
||||||
|
irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK);
|
||||||
|
irqnr = irqstat & ~0x1c00;
|
||||||
|
|
||||||
|
if (likely(irqnr > 15 && irqnr < 1021)) {
|
||||||
|
irqnr = irq_domain_to_irq(&gic->domain, irqnr);
|
||||||
|
handle_IRQ(irqnr, regs);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (irqnr < 16) {
|
||||||
|
writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI);
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
handle_IPI(irqnr, regs);
|
||||||
|
#endif
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} while (1);
|
||||||
|
}
|
||||||
|
|
||||||
static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
|
static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
struct gic_chip_data *chip_data = irq_get_handler_data(irq);
|
struct gic_chip_data *chip_data = irq_get_handler_data(irq);
|
||||||
@ -225,7 +306,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
|
|||||||
chained_irq_enter(chip, desc);
|
chained_irq_enter(chip, desc);
|
||||||
|
|
||||||
raw_spin_lock(&irq_controller_lock);
|
raw_spin_lock(&irq_controller_lock);
|
||||||
status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK);
|
status = readl_relaxed(gic_data_cpu_base(chip_data) + GIC_CPU_INTACK);
|
||||||
raw_spin_unlock(&irq_controller_lock);
|
raw_spin_unlock(&irq_controller_lock);
|
||||||
|
|
||||||
gic_irq = (status & 0x3ff);
|
gic_irq = (status & 0x3ff);
|
||||||
@ -270,7 +351,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic)
|
|||||||
u32 cpumask;
|
u32 cpumask;
|
||||||
unsigned int gic_irqs = gic->gic_irqs;
|
unsigned int gic_irqs = gic->gic_irqs;
|
||||||
struct irq_domain *domain = &gic->domain;
|
struct irq_domain *domain = &gic->domain;
|
||||||
void __iomem *base = gic->dist_base;
|
void __iomem *base = gic_data_dist_base(gic);
|
||||||
u32 cpu = 0;
|
u32 cpu = 0;
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
@ -330,8 +411,8 @@ static void __init gic_dist_init(struct gic_chip_data *gic)
|
|||||||
|
|
||||||
static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
|
static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
|
||||||
{
|
{
|
||||||
void __iomem *dist_base = gic->dist_base;
|
void __iomem *dist_base = gic_data_dist_base(gic);
|
||||||
void __iomem *base = gic->cpu_base;
|
void __iomem *base = gic_data_cpu_base(gic);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -368,7 +449,7 @@ static void gic_dist_save(unsigned int gic_nr)
|
|||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
gic_irqs = gic_data[gic_nr].gic_irqs;
|
gic_irqs = gic_data[gic_nr].gic_irqs;
|
||||||
dist_base = gic_data[gic_nr].dist_base;
|
dist_base = gic_data_dist_base(&gic_data[gic_nr]);
|
||||||
|
|
||||||
if (!dist_base)
|
if (!dist_base)
|
||||||
return;
|
return;
|
||||||
@ -403,7 +484,7 @@ static void gic_dist_restore(unsigned int gic_nr)
|
|||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
gic_irqs = gic_data[gic_nr].gic_irqs;
|
gic_irqs = gic_data[gic_nr].gic_irqs;
|
||||||
dist_base = gic_data[gic_nr].dist_base;
|
dist_base = gic_data_dist_base(&gic_data[gic_nr]);
|
||||||
|
|
||||||
if (!dist_base)
|
if (!dist_base)
|
||||||
return;
|
return;
|
||||||
@ -439,8 +520,8 @@ static void gic_cpu_save(unsigned int gic_nr)
|
|||||||
if (gic_nr >= MAX_GIC_NR)
|
if (gic_nr >= MAX_GIC_NR)
|
||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
dist_base = gic_data[gic_nr].dist_base;
|
dist_base = gic_data_dist_base(&gic_data[gic_nr]);
|
||||||
cpu_base = gic_data[gic_nr].cpu_base;
|
cpu_base = gic_data_cpu_base(&gic_data[gic_nr]);
|
||||||
|
|
||||||
if (!dist_base || !cpu_base)
|
if (!dist_base || !cpu_base)
|
||||||
return;
|
return;
|
||||||
@ -465,8 +546,8 @@ static void gic_cpu_restore(unsigned int gic_nr)
|
|||||||
if (gic_nr >= MAX_GIC_NR)
|
if (gic_nr >= MAX_GIC_NR)
|
||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
dist_base = gic_data[gic_nr].dist_base;
|
dist_base = gic_data_dist_base(&gic_data[gic_nr]);
|
||||||
cpu_base = gic_data[gic_nr].cpu_base;
|
cpu_base = gic_data_cpu_base(&gic_data[gic_nr]);
|
||||||
|
|
||||||
if (!dist_base || !cpu_base)
|
if (!dist_base || !cpu_base)
|
||||||
return;
|
return;
|
||||||
@ -491,6 +572,11 @@ static int gic_notifier(struct notifier_block *self, unsigned long cmd, void *v)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_GIC_NR; i++) {
|
for (i = 0; i < MAX_GIC_NR; i++) {
|
||||||
|
#ifdef CONFIG_GIC_NON_BANKED
|
||||||
|
/* Skip over unused GICs */
|
||||||
|
if (!gic_data[i].get_base)
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case CPU_PM_ENTER:
|
case CPU_PM_ENTER:
|
||||||
gic_cpu_save(i);
|
gic_cpu_save(i);
|
||||||
@ -564,8 +650,9 @@ const struct irq_domain_ops gic_irq_domain_ops = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init gic_init(unsigned int gic_nr, int irq_start,
|
void __init gic_init_bases(unsigned int gic_nr, int irq_start,
|
||||||
void __iomem *dist_base, void __iomem *cpu_base)
|
void __iomem *dist_base, void __iomem *cpu_base,
|
||||||
|
u32 percpu_offset)
|
||||||
{
|
{
|
||||||
struct gic_chip_data *gic;
|
struct gic_chip_data *gic;
|
||||||
struct irq_domain *domain;
|
struct irq_domain *domain;
|
||||||
@ -575,8 +662,36 @@ void __init gic_init(unsigned int gic_nr, int irq_start,
|
|||||||
|
|
||||||
gic = &gic_data[gic_nr];
|
gic = &gic_data[gic_nr];
|
||||||
domain = &gic->domain;
|
domain = &gic->domain;
|
||||||
gic->dist_base = dist_base;
|
#ifdef CONFIG_GIC_NON_BANKED
|
||||||
gic->cpu_base = cpu_base;
|
if (percpu_offset) { /* Frankein-GIC without banked registers... */
|
||||||
|
unsigned int cpu;
|
||||||
|
|
||||||
|
gic->dist_base.percpu_base = alloc_percpu(void __iomem *);
|
||||||
|
gic->cpu_base.percpu_base = alloc_percpu(void __iomem *);
|
||||||
|
if (WARN_ON(!gic->dist_base.percpu_base ||
|
||||||
|
!gic->cpu_base.percpu_base)) {
|
||||||
|
free_percpu(gic->dist_base.percpu_base);
|
||||||
|
free_percpu(gic->cpu_base.percpu_base);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for_each_possible_cpu(cpu) {
|
||||||
|
unsigned long offset = percpu_offset * cpu_logical_map(cpu);
|
||||||
|
*per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
|
||||||
|
*per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
gic_set_base_accessor(gic, gic_get_percpu_base);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{ /* Normal, sane GIC... */
|
||||||
|
WARN(percpu_offset,
|
||||||
|
"GIC_NON_BANKED not enabled, ignoring %08x offset!",
|
||||||
|
percpu_offset);
|
||||||
|
gic->dist_base.common_base = dist_base;
|
||||||
|
gic->cpu_base.common_base = cpu_base;
|
||||||
|
gic_set_base_accessor(gic, gic_get_common_base);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For primary GICs, skip over SGIs.
|
* For primary GICs, skip over SGIs.
|
||||||
@ -584,8 +699,6 @@ void __init gic_init(unsigned int gic_nr, int irq_start,
|
|||||||
*/
|
*/
|
||||||
domain->hwirq_base = 32;
|
domain->hwirq_base = 32;
|
||||||
if (gic_nr == 0) {
|
if (gic_nr == 0) {
|
||||||
gic_cpu_base_addr = cpu_base;
|
|
||||||
|
|
||||||
if ((irq_start & 31) > 0) {
|
if ((irq_start & 31) > 0) {
|
||||||
domain->hwirq_base = 16;
|
domain->hwirq_base = 16;
|
||||||
if (irq_start != -1)
|
if (irq_start != -1)
|
||||||
@ -597,7 +710,7 @@ void __init gic_init(unsigned int gic_nr, int irq_start,
|
|||||||
* Find out how many interrupts are supported.
|
* Find out how many interrupts are supported.
|
||||||
* The GIC only supports up to 1020 interrupt sources.
|
* The GIC only supports up to 1020 interrupt sources.
|
||||||
*/
|
*/
|
||||||
gic_irqs = readl_relaxed(dist_base + GIC_DIST_CTR) & 0x1f;
|
gic_irqs = readl_relaxed(gic_data_dist_base(gic) + GIC_DIST_CTR) & 0x1f;
|
||||||
gic_irqs = (gic_irqs + 1) * 32;
|
gic_irqs = (gic_irqs + 1) * 32;
|
||||||
if (gic_irqs > 1020)
|
if (gic_irqs > 1020)
|
||||||
gic_irqs = 1020;
|
gic_irqs = 1020;
|
||||||
@ -645,7 +758,7 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
|
|||||||
dsb();
|
dsb();
|
||||||
|
|
||||||
/* this always happens on GIC0 */
|
/* this always happens on GIC0 */
|
||||||
writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
|
writel_relaxed(map << 16 | irq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -656,6 +769,7 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent)
|
|||||||
{
|
{
|
||||||
void __iomem *cpu_base;
|
void __iomem *cpu_base;
|
||||||
void __iomem *dist_base;
|
void __iomem *dist_base;
|
||||||
|
u32 percpu_offset;
|
||||||
int irq;
|
int irq;
|
||||||
struct irq_domain *domain = &gic_data[gic_cnt].domain;
|
struct irq_domain *domain = &gic_data[gic_cnt].domain;
|
||||||
|
|
||||||
@ -668,9 +782,12 @@ int __init gic_of_init(struct device_node *node, struct device_node *parent)
|
|||||||
cpu_base = of_iomap(node, 1);
|
cpu_base = of_iomap(node, 1);
|
||||||
WARN(!cpu_base, "unable to map gic cpu registers\n");
|
WARN(!cpu_base, "unable to map gic cpu registers\n");
|
||||||
|
|
||||||
|
if (of_property_read_u32(node, "cpu-offset", &percpu_offset))
|
||||||
|
percpu_offset = 0;
|
||||||
|
|
||||||
domain->of_node = of_node_get(node);
|
domain->of_node = of_node_get(node);
|
||||||
|
|
||||||
gic_init(gic_cnt, -1, dist_base, cpu_base);
|
gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset);
|
||||||
|
|
||||||
if (parent) {
|
if (parent) {
|
||||||
irq = irq_of_parse_and_map(node, 0);
|
irq = irq_of_parse_and_map(node, 0);
|
||||||
|
@ -19,17 +19,22 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/export.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/irqdomain.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_address.h>
|
||||||
|
#include <linux/of_irq.h>
|
||||||
#include <linux/syscore_ops.h>
|
#include <linux/syscore_ops.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/amba/bus.h>
|
#include <linux/amba/bus.h>
|
||||||
|
|
||||||
|
#include <asm/exception.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
#include <asm/hardware/vic.h>
|
#include <asm/hardware/vic.h>
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
/**
|
/**
|
||||||
* struct vic_device - VIC PM device
|
* struct vic_device - VIC PM device
|
||||||
* @irq: The IRQ number for the base of the VIC.
|
* @irq: The IRQ number for the base of the VIC.
|
||||||
@ -40,6 +45,7 @@
|
|||||||
* @int_enable: Save for VIC_INT_ENABLE.
|
* @int_enable: Save for VIC_INT_ENABLE.
|
||||||
* @soft_int: Save for VIC_INT_SOFT.
|
* @soft_int: Save for VIC_INT_SOFT.
|
||||||
* @protect: Save for VIC_PROTECT.
|
* @protect: Save for VIC_PROTECT.
|
||||||
|
* @domain: The IRQ domain for the VIC.
|
||||||
*/
|
*/
|
||||||
struct vic_device {
|
struct vic_device {
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
@ -50,13 +56,13 @@ struct vic_device {
|
|||||||
u32 int_enable;
|
u32 int_enable;
|
||||||
u32 soft_int;
|
u32 soft_int;
|
||||||
u32 protect;
|
u32 protect;
|
||||||
|
struct irq_domain domain;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* we cannot allocate memory when VICs are initially registered */
|
/* we cannot allocate memory when VICs are initially registered */
|
||||||
static struct vic_device vic_devices[CONFIG_ARM_VIC_NR];
|
static struct vic_device vic_devices[CONFIG_ARM_VIC_NR];
|
||||||
|
|
||||||
static int vic_id;
|
static int vic_id;
|
||||||
#endif /* CONFIG_PM */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vic_init2 - common initialisation code
|
* vic_init2 - common initialisation code
|
||||||
@ -156,39 +162,50 @@ static int __init vic_pm_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
late_initcall(vic_pm_init);
|
late_initcall(vic_pm_init);
|
||||||
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* vic_pm_register - Register a VIC for later power management control
|
* vic_register() - Register a VIC.
|
||||||
* @base: The base address of the VIC.
|
* @base: The base address of the VIC.
|
||||||
* @irq: The base IRQ for the VIC.
|
* @irq: The base IRQ for the VIC.
|
||||||
* @resume_sources: bitmask of interrupts allowed for resume sources.
|
* @resume_sources: bitmask of interrupts allowed for resume sources.
|
||||||
|
* @node: The device tree node associated with the VIC.
|
||||||
*
|
*
|
||||||
* Register the VIC with the system device tree so that it can be notified
|
* Register the VIC with the system device tree so that it can be notified
|
||||||
* of suspend and resume requests and ensure that the correct actions are
|
* of suspend and resume requests and ensure that the correct actions are
|
||||||
* taken to re-instate the settings on resume.
|
* taken to re-instate the settings on resume.
|
||||||
|
*
|
||||||
|
* This also configures the IRQ domain for the VIC.
|
||||||
*/
|
*/
|
||||||
static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 resume_sources)
|
static void __init vic_register(void __iomem *base, unsigned int irq,
|
||||||
|
u32 resume_sources, struct device_node *node)
|
||||||
{
|
{
|
||||||
struct vic_device *v;
|
struct vic_device *v;
|
||||||
|
|
||||||
if (vic_id >= ARRAY_SIZE(vic_devices))
|
if (vic_id >= ARRAY_SIZE(vic_devices)) {
|
||||||
printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__);
|
printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__);
|
||||||
else {
|
return;
|
||||||
v = &vic_devices[vic_id];
|
|
||||||
v->base = base;
|
|
||||||
v->resume_sources = resume_sources;
|
|
||||||
v->irq = irq;
|
|
||||||
vic_id++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v = &vic_devices[vic_id];
|
||||||
|
v->base = base;
|
||||||
|
v->resume_sources = resume_sources;
|
||||||
|
v->irq = irq;
|
||||||
|
vic_id++;
|
||||||
|
|
||||||
|
v->domain.irq_base = irq;
|
||||||
|
v->domain.nr_irq = 32;
|
||||||
|
#ifdef CONFIG_OF_IRQ
|
||||||
|
v->domain.of_node = of_node_get(node);
|
||||||
|
v->domain.ops = &irq_domain_simple_ops;
|
||||||
|
#endif /* CONFIG_OF */
|
||||||
|
irq_domain_add(&v->domain);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { }
|
|
||||||
#endif /* CONFIG_PM */
|
|
||||||
|
|
||||||
static void vic_ack_irq(struct irq_data *d)
|
static void vic_ack_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
void __iomem *base = irq_data_get_irq_chip_data(d);
|
void __iomem *base = irq_data_get_irq_chip_data(d);
|
||||||
unsigned int irq = d->irq & 31;
|
unsigned int irq = d->hwirq;
|
||||||
writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
|
writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
|
||||||
/* moreover, clear the soft-triggered, in case it was the reason */
|
/* moreover, clear the soft-triggered, in case it was the reason */
|
||||||
writel(1 << irq, base + VIC_INT_SOFT_CLEAR);
|
writel(1 << irq, base + VIC_INT_SOFT_CLEAR);
|
||||||
@ -197,14 +214,14 @@ static void vic_ack_irq(struct irq_data *d)
|
|||||||
static void vic_mask_irq(struct irq_data *d)
|
static void vic_mask_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
void __iomem *base = irq_data_get_irq_chip_data(d);
|
void __iomem *base = irq_data_get_irq_chip_data(d);
|
||||||
unsigned int irq = d->irq & 31;
|
unsigned int irq = d->hwirq;
|
||||||
writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
|
writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vic_unmask_irq(struct irq_data *d)
|
static void vic_unmask_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
void __iomem *base = irq_data_get_irq_chip_data(d);
|
void __iomem *base = irq_data_get_irq_chip_data(d);
|
||||||
unsigned int irq = d->irq & 31;
|
unsigned int irq = d->hwirq;
|
||||||
writel(1 << irq, base + VIC_INT_ENABLE);
|
writel(1 << irq, base + VIC_INT_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +243,7 @@ static struct vic_device *vic_from_irq(unsigned int irq)
|
|||||||
static int vic_set_wake(struct irq_data *d, unsigned int on)
|
static int vic_set_wake(struct irq_data *d, unsigned int on)
|
||||||
{
|
{
|
||||||
struct vic_device *v = vic_from_irq(d->irq);
|
struct vic_device *v = vic_from_irq(d->irq);
|
||||||
unsigned int off = d->irq & 31;
|
unsigned int off = d->hwirq;
|
||||||
u32 bit = 1 << off;
|
u32 bit = 1 << off;
|
||||||
|
|
||||||
if (!v)
|
if (!v)
|
||||||
@ -330,15 +347,9 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start,
|
|||||||
vic_set_irq_sources(base, irq_start, vic_sources);
|
vic_set_irq_sources(base, irq_start, vic_sources);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void __init __vic_init(void __iomem *base, unsigned int irq_start,
|
||||||
* vic_init - initialise a vectored interrupt controller
|
u32 vic_sources, u32 resume_sources,
|
||||||
* @base: iomem base address
|
struct device_node *node)
|
||||||
* @irq_start: starting interrupt number, must be muliple of 32
|
|
||||||
* @vic_sources: bitmask of interrupt sources to allow
|
|
||||||
* @resume_sources: bitmask of interrupt sources to allow for resume
|
|
||||||
*/
|
|
||||||
void __init vic_init(void __iomem *base, unsigned int irq_start,
|
|
||||||
u32 vic_sources, u32 resume_sources)
|
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
u32 cellid = 0;
|
u32 cellid = 0;
|
||||||
@ -375,5 +386,81 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
|
|||||||
|
|
||||||
vic_set_irq_sources(base, irq_start, vic_sources);
|
vic_set_irq_sources(base, irq_start, vic_sources);
|
||||||
|
|
||||||
vic_pm_register(base, irq_start, resume_sources);
|
vic_register(base, irq_start, resume_sources, node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vic_init() - initialise a vectored interrupt controller
|
||||||
|
* @base: iomem base address
|
||||||
|
* @irq_start: starting interrupt number, must be muliple of 32
|
||||||
|
* @vic_sources: bitmask of interrupt sources to allow
|
||||||
|
* @resume_sources: bitmask of interrupt sources to allow for resume
|
||||||
|
*/
|
||||||
|
void __init vic_init(void __iomem *base, unsigned int irq_start,
|
||||||
|
u32 vic_sources, u32 resume_sources)
|
||||||
|
{
|
||||||
|
__vic_init(base, irq_start, vic_sources, resume_sources, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
int __init vic_of_init(struct device_node *node, struct device_node *parent)
|
||||||
|
{
|
||||||
|
void __iomem *regs;
|
||||||
|
int irq_base;
|
||||||
|
|
||||||
|
if (WARN(parent, "non-root VICs are not supported"))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
regs = of_iomap(node, 0);
|
||||||
|
if (WARN_ON(!regs))
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
|
||||||
|
if (WARN_ON(irq_base < 0))
|
||||||
|
goto out_unmap;
|
||||||
|
|
||||||
|
__vic_init(regs, irq_base, ~0, ~0, node);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
out_unmap:
|
||||||
|
iounmap(regs);
|
||||||
|
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG OF */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handle each interrupt in a single VIC. Returns non-zero if we've
|
||||||
|
* handled at least one interrupt. This does a single read of the
|
||||||
|
* status register and handles all interrupts in order from LSB first.
|
||||||
|
*/
|
||||||
|
static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
u32 stat, irq;
|
||||||
|
int handled = 0;
|
||||||
|
|
||||||
|
stat = readl_relaxed(vic->base + VIC_IRQ_STATUS);
|
||||||
|
while (stat) {
|
||||||
|
irq = ffs(stat) - 1;
|
||||||
|
handle_IRQ(irq_domain_to_irq(&vic->domain, irq), regs);
|
||||||
|
stat &= ~(1 << irq);
|
||||||
|
handled = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return handled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keep iterating over all registered VIC's until there are no pending
|
||||||
|
* interrupts.
|
||||||
|
*/
|
||||||
|
asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
int i, handled;
|
||||||
|
|
||||||
|
do {
|
||||||
|
for (i = 0, handled = 0; i < vic_id; ++i)
|
||||||
|
handled |= handle_one_vic(&vic_devices[i], regs);
|
||||||
|
} while (handled);
|
||||||
}
|
}
|
||||||
|
179
arch/arm/include/asm/cti.h
Normal file
179
arch/arm/include/asm/cti.h
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
#ifndef __ASMARM_CTI_H
|
||||||
|
#define __ASMARM_CTI_H
|
||||||
|
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
/* The registers' definition is from section 3.2 of
|
||||||
|
* Embedded Cross Trigger Revision: r0p0
|
||||||
|
*/
|
||||||
|
#define CTICONTROL 0x000
|
||||||
|
#define CTISTATUS 0x004
|
||||||
|
#define CTILOCK 0x008
|
||||||
|
#define CTIPROTECTION 0x00C
|
||||||
|
#define CTIINTACK 0x010
|
||||||
|
#define CTIAPPSET 0x014
|
||||||
|
#define CTIAPPCLEAR 0x018
|
||||||
|
#define CTIAPPPULSE 0x01c
|
||||||
|
#define CTIINEN 0x020
|
||||||
|
#define CTIOUTEN 0x0A0
|
||||||
|
#define CTITRIGINSTATUS 0x130
|
||||||
|
#define CTITRIGOUTSTATUS 0x134
|
||||||
|
#define CTICHINSTATUS 0x138
|
||||||
|
#define CTICHOUTSTATUS 0x13c
|
||||||
|
#define CTIPERIPHID0 0xFE0
|
||||||
|
#define CTIPERIPHID1 0xFE4
|
||||||
|
#define CTIPERIPHID2 0xFE8
|
||||||
|
#define CTIPERIPHID3 0xFEC
|
||||||
|
#define CTIPCELLID0 0xFF0
|
||||||
|
#define CTIPCELLID1 0xFF4
|
||||||
|
#define CTIPCELLID2 0xFF8
|
||||||
|
#define CTIPCELLID3 0xFFC
|
||||||
|
|
||||||
|
/* The below are from section 3.6.4 of
|
||||||
|
* CoreSight v1.0 Architecture Specification
|
||||||
|
*/
|
||||||
|
#define LOCKACCESS 0xFB0
|
||||||
|
#define LOCKSTATUS 0xFB4
|
||||||
|
|
||||||
|
/* write this value to LOCKACCESS will unlock the module, and
|
||||||
|
* other value will lock the module
|
||||||
|
*/
|
||||||
|
#define LOCKCODE 0xC5ACCE55
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct cti - cross trigger interface struct
|
||||||
|
* @base: mapped virtual address for the cti base
|
||||||
|
* @irq: irq number for the cti
|
||||||
|
* @trig_out_for_irq: triger out number which will cause
|
||||||
|
* the @irq happen
|
||||||
|
*
|
||||||
|
* cti struct used to operate cti registers.
|
||||||
|
*/
|
||||||
|
struct cti {
|
||||||
|
void __iomem *base;
|
||||||
|
int irq;
|
||||||
|
int trig_out_for_irq;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_init - initialize the cti instance
|
||||||
|
* @cti: cti instance
|
||||||
|
* @base: mapped virtual address for the cti base
|
||||||
|
* @irq: irq number for the cti
|
||||||
|
* @trig_out: triger out number which will cause
|
||||||
|
* the @irq happen
|
||||||
|
*
|
||||||
|
* called by machine code to pass the board dependent
|
||||||
|
* @base, @irq and @trig_out to cti.
|
||||||
|
*/
|
||||||
|
static inline void cti_init(struct cti *cti,
|
||||||
|
void __iomem *base, int irq, int trig_out)
|
||||||
|
{
|
||||||
|
cti->base = base;
|
||||||
|
cti->irq = irq;
|
||||||
|
cti->trig_out_for_irq = trig_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_map_trigger - use the @chan to map @trig_in to @trig_out
|
||||||
|
* @cti: cti instance
|
||||||
|
* @trig_in: trigger in number
|
||||||
|
* @trig_out: trigger out number
|
||||||
|
* @channel: channel number
|
||||||
|
*
|
||||||
|
* This function maps one trigger in of @trig_in to one trigger
|
||||||
|
* out of @trig_out using the channel @chan.
|
||||||
|
*/
|
||||||
|
static inline void cti_map_trigger(struct cti *cti,
|
||||||
|
int trig_in, int trig_out, int chan)
|
||||||
|
{
|
||||||
|
void __iomem *base = cti->base;
|
||||||
|
unsigned long val;
|
||||||
|
|
||||||
|
val = __raw_readl(base + CTIINEN + trig_in * 4);
|
||||||
|
val |= BIT(chan);
|
||||||
|
__raw_writel(val, base + CTIINEN + trig_in * 4);
|
||||||
|
|
||||||
|
val = __raw_readl(base + CTIOUTEN + trig_out * 4);
|
||||||
|
val |= BIT(chan);
|
||||||
|
__raw_writel(val, base + CTIOUTEN + trig_out * 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_enable - enable the cti module
|
||||||
|
* @cti: cti instance
|
||||||
|
*
|
||||||
|
* enable the cti module
|
||||||
|
*/
|
||||||
|
static inline void cti_enable(struct cti *cti)
|
||||||
|
{
|
||||||
|
__raw_writel(0x1, cti->base + CTICONTROL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_disable - disable the cti module
|
||||||
|
* @cti: cti instance
|
||||||
|
*
|
||||||
|
* enable the cti module
|
||||||
|
*/
|
||||||
|
static inline void cti_disable(struct cti *cti)
|
||||||
|
{
|
||||||
|
__raw_writel(0, cti->base + CTICONTROL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_irq_ack - clear the cti irq
|
||||||
|
* @cti: cti instance
|
||||||
|
*
|
||||||
|
* clear the cti irq
|
||||||
|
*/
|
||||||
|
static inline void cti_irq_ack(struct cti *cti)
|
||||||
|
{
|
||||||
|
void __iomem *base = cti->base;
|
||||||
|
unsigned long val;
|
||||||
|
|
||||||
|
val = __raw_readl(base + CTIINTACK);
|
||||||
|
val |= BIT(cti->trig_out_for_irq);
|
||||||
|
__raw_writel(val, base + CTIINTACK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_unlock - unlock cti module
|
||||||
|
* @cti: cti instance
|
||||||
|
*
|
||||||
|
* unlock the cti module, or else any writes to the cti
|
||||||
|
* module is not allowed.
|
||||||
|
*/
|
||||||
|
static inline void cti_unlock(struct cti *cti)
|
||||||
|
{
|
||||||
|
void __iomem *base = cti->base;
|
||||||
|
unsigned long val;
|
||||||
|
|
||||||
|
val = __raw_readl(base + LOCKSTATUS);
|
||||||
|
|
||||||
|
if (val & 1) {
|
||||||
|
val = LOCKCODE;
|
||||||
|
__raw_writel(val, base + LOCKACCESS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cti_lock - lock cti module
|
||||||
|
* @cti: cti instance
|
||||||
|
*
|
||||||
|
* lock the cti module, so any writes to the cti
|
||||||
|
* module will be not allowed.
|
||||||
|
*/
|
||||||
|
static inline void cti_lock(struct cti *cti)
|
||||||
|
{
|
||||||
|
void __iomem *base = cti->base;
|
||||||
|
unsigned long val;
|
||||||
|
|
||||||
|
val = __raw_readl(base + LOCKSTATUS);
|
||||||
|
|
||||||
|
if (!(val & 1)) {
|
||||||
|
val = ~LOCKCODE;
|
||||||
|
__raw_writel(val, base + LOCKACCESS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
@ -1,57 +0,0 @@
|
|||||||
/* arch/arm/include/asm/entry-macro-vic2.S
|
|
||||||
*
|
|
||||||
* Originally arch/arm/mach-s3c6400/include/mach/entry-macro.S
|
|
||||||
*
|
|
||||||
* Copyright 2008 Openmoko, Inc.
|
|
||||||
* Copyright 2008 Simtec Electronics
|
|
||||||
* http://armlinux.simtec.co.uk/
|
|
||||||
* Ben Dooks <ben@simtec.co.uk>
|
|
||||||
*
|
|
||||||
* Low-level IRQ helper macros for a device with two VICs
|
|
||||||
*
|
|
||||||
* This file is licensed under the terms of the GNU General Public
|
|
||||||
* License version 2. This program is licensed "as is" without any
|
|
||||||
* warranty of any kind, whether express or implied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This should be included from <mach/entry-macro.S> with the necessary
|
|
||||||
* defines for virtual addresses and IRQ bases for the two vics.
|
|
||||||
*
|
|
||||||
* The code needs the following defined:
|
|
||||||
* IRQ_VIC0_BASE IRQ number of VIC0's first IRQ
|
|
||||||
* IRQ_VIC1_BASE IRQ number of VIC1's first IRQ
|
|
||||||
* VA_VIC0 Virtual address of VIC0
|
|
||||||
* VA_VIC1 Virtual address of VIC1
|
|
||||||
*
|
|
||||||
* Note, code assumes VIC0's virtual address is an ARM immediate constant
|
|
||||||
* away from VIC1.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm/hardware/vic.h>
|
|
||||||
|
|
||||||
.macro disable_fiq
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro get_irqnr_preamble, base, tmp
|
|
||||||
ldr \base, =VA_VIC0
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro arch_ret_to_user, tmp1, tmp2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
||||||
|
|
||||||
@ check the vic0
|
|
||||||
mov \irqnr, #IRQ_VIC0_BASE + 31
|
|
||||||
ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
|
|
||||||
teq \irqstat, #0
|
|
||||||
|
|
||||||
@ otherwise try vic1
|
|
||||||
addeq \tmp, \base, #(VA_VIC1 - VA_VIC0)
|
|
||||||
addeq \irqnr, \irqnr, #(IRQ_VIC1_BASE - IRQ_VIC0_BASE)
|
|
||||||
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
|
|
||||||
teqeq \irqstat, #0
|
|
||||||
|
|
||||||
clzne \irqstat, \irqstat
|
|
||||||
subne \irqnr, \irqnr, \irqstat
|
|
||||||
.endm
|
|
@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/include/asm/hardware/entry-macro-gic.S
|
|
||||||
*
|
|
||||||
* Low-level IRQ helper macros for GIC
|
|
||||||
*
|
|
||||||
* This file is licensed under the terms of the GNU General Public
|
|
||||||
* License version 2. This program is licensed "as is" without any
|
|
||||||
* warranty of any kind, whether express or implied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm/hardware/gic.h>
|
|
||||||
|
|
||||||
#ifndef HAVE_GET_IRQNR_PREAMBLE
|
|
||||||
.macro get_irqnr_preamble, base, tmp
|
|
||||||
ldr \base, =gic_cpu_base_addr
|
|
||||||
ldr \base, [\base]
|
|
||||||
.endm
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The interrupt numbering scheme is defined in the
|
|
||||||
* interrupt controller spec. To wit:
|
|
||||||
*
|
|
||||||
* Interrupts 0-15 are IPI
|
|
||||||
* 16-31 are local. We allow 30 to be used for the watchdog.
|
|
||||||
* 32-1020 are global
|
|
||||||
* 1021-1022 are reserved
|
|
||||||
* 1023 is "spurious" (no interrupt)
|
|
||||||
*
|
|
||||||
* A simple read from the controller will tell us the number of the highest
|
|
||||||
* priority enabled interrupt. We then just need to check whether it is in the
|
|
||||||
* valid range for an IRQ (30-1020 inclusive).
|
|
||||||
*/
|
|
||||||
|
|
||||||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
||||||
|
|
||||||
ldr \irqstat, [\base, #GIC_CPU_INTACK]
|
|
||||||
/* bits 12-10 = src CPU, 9-0 = int # */
|
|
||||||
|
|
||||||
ldr \tmp, =1021
|
|
||||||
bic \irqnr, \irqstat, #0x1c00
|
|
||||||
cmp \irqnr, #15
|
|
||||||
cmpcc \irqnr, \irqnr
|
|
||||||
cmpne \irqnr, \tmp
|
|
||||||
cmpcs \irqnr, \irqnr
|
|
||||||
.endm
|
|
||||||
|
|
||||||
/* We assume that irqstat (the raw value of the IRQ acknowledge
|
|
||||||
* register) is preserved from the macro above.
|
|
||||||
* If there is an IPI, we immediately signal end of interrupt on the
|
|
||||||
* controller, since this requires the original irqstat value which
|
|
||||||
* we won't easily be able to recreate later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.macro test_for_ipi, irqnr, irqstat, base, tmp
|
|
||||||
bic \irqnr, \irqstat, #0x1c00
|
|
||||||
cmp \irqnr, #16
|
|
||||||
strcc \irqstat, [\base, #GIC_CPU_EOI]
|
|
||||||
cmpcs \irqnr, \irqnr
|
|
||||||
.endm
|
|
@ -36,30 +36,22 @@
|
|||||||
#include <linux/irqdomain.h>
|
#include <linux/irqdomain.h>
|
||||||
struct device_node;
|
struct device_node;
|
||||||
|
|
||||||
extern void __iomem *gic_cpu_base_addr;
|
|
||||||
extern struct irq_chip gic_arch_extn;
|
extern struct irq_chip gic_arch_extn;
|
||||||
|
|
||||||
void gic_init(unsigned int, int, void __iomem *, void __iomem *);
|
void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
|
||||||
|
u32 offset);
|
||||||
int gic_of_init(struct device_node *node, struct device_node *parent);
|
int gic_of_init(struct device_node *node, struct device_node *parent);
|
||||||
void gic_secondary_init(unsigned int);
|
void gic_secondary_init(unsigned int);
|
||||||
|
void gic_handle_irq(struct pt_regs *regs);
|
||||||
void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
|
void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
|
||||||
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
|
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
|
||||||
|
|
||||||
struct gic_chip_data {
|
static inline void gic_init(unsigned int nr, int start,
|
||||||
void __iomem *dist_base;
|
void __iomem *dist , void __iomem *cpu)
|
||||||
void __iomem *cpu_base;
|
{
|
||||||
#ifdef CONFIG_CPU_PM
|
gic_init_bases(nr, start, dist, cpu, 0);
|
||||||
u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)];
|
}
|
||||||
u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)];
|
|
||||||
u32 saved_spi_target[DIV_ROUND_UP(1020, 4)];
|
|
||||||
u32 __percpu *saved_ppi_enable;
|
|
||||||
u32 __percpu *saved_ppi_conf;
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_IRQ_DOMAIN
|
|
||||||
struct irq_domain domain;
|
|
||||||
#endif
|
|
||||||
unsigned int gic_irqs;
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,7 +41,15 @@
|
|||||||
#define VIC_PL192_VECT_ADDR 0xF00
|
#define VIC_PL192_VECT_ADDR 0xF00
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
|
#include <linux/compiler.h>
|
||||||
#endif
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
struct device_node;
|
||||||
|
struct pt_regs;
|
||||||
|
|
||||||
|
void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
|
||||||
|
int vic_of_init(struct device_node *node, struct device_node *parent);
|
||||||
|
void vic_handle_irq(struct pt_regs *regs);
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,10 +31,10 @@ struct machine_desc {
|
|||||||
unsigned int video_start; /* start of video RAM */
|
unsigned int video_start; /* start of video RAM */
|
||||||
unsigned int video_end; /* end of video RAM */
|
unsigned int video_end; /* end of video RAM */
|
||||||
|
|
||||||
unsigned int reserve_lp0 :1; /* never has lp0 */
|
unsigned char reserve_lp0 :1; /* never has lp0 */
|
||||||
unsigned int reserve_lp1 :1; /* never has lp1 */
|
unsigned char reserve_lp1 :1; /* never has lp1 */
|
||||||
unsigned int reserve_lp2 :1; /* never has lp2 */
|
unsigned char reserve_lp2 :1; /* never has lp2 */
|
||||||
unsigned int soft_reboot :1; /* soft reboot */
|
char restart_mode; /* default restart mode */
|
||||||
void (*fixup)(struct tag *, char **,
|
void (*fixup)(struct tag *, char **,
|
||||||
struct meminfo *);
|
struct meminfo *);
|
||||||
void (*reserve)(void);/* reserve mem blocks */
|
void (*reserve)(void);/* reserve mem blocks */
|
||||||
@ -46,6 +46,7 @@ struct machine_desc {
|
|||||||
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
||||||
void (*handle_irq)(struct pt_regs *);
|
void (*handle_irq)(struct pt_regs *);
|
||||||
#endif
|
#endif
|
||||||
|
void (*restart)(char, const char *);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -32,7 +32,4 @@ enum arm_perf_pmu_ids {
|
|||||||
extern enum arm_perf_pmu_ids
|
extern enum arm_perf_pmu_ids
|
||||||
armpmu_get_pmu_id(void);
|
armpmu_get_pmu_id(void);
|
||||||
|
|
||||||
extern int
|
|
||||||
armpmu_get_max_events(void);
|
|
||||||
|
|
||||||
#endif /* __ARM_PERF_EVENT_H__ */
|
#endif /* __ARM_PERF_EVENT_H__ */
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#include <asm/memory.h>
|
#include <asm/memory.h>
|
||||||
#include <mach/vmalloc.h>
|
|
||||||
#include <asm/pgtable-hwdef.h>
|
#include <asm/pgtable-hwdef.h>
|
||||||
|
|
||||||
#include <asm/pgtable-2level.h>
|
#include <asm/pgtable-2level.h>
|
||||||
@ -33,14 +32,16 @@
|
|||||||
* any out-of-bounds memory accesses will hopefully be caught.
|
* any out-of-bounds memory accesses will hopefully be caught.
|
||||||
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
||||||
* area for the same reason. ;)
|
* area for the same reason. ;)
|
||||||
*
|
|
||||||
* Note that platforms may override VMALLOC_START, but they must provide
|
|
||||||
* VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space,
|
|
||||||
* which may not overlap IO space.
|
|
||||||
*/
|
*/
|
||||||
#ifndef VMALLOC_START
|
|
||||||
#define VMALLOC_OFFSET (8*1024*1024)
|
#define VMALLOC_OFFSET (8*1024*1024)
|
||||||
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
|
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
|
||||||
|
#define VMALLOC_END 0xff000000UL
|
||||||
|
|
||||||
|
/* This is a temporary hack until shmobile's DMA area size is sorted out */
|
||||||
|
#ifdef CONFIG_ARCH_SHMOBILE
|
||||||
|
#warning "SH-Mobile's consistent DMA size conflicts with VMALLOC_END by 144MB"
|
||||||
|
#undef VMALLOC_END
|
||||||
|
#define VMALLOC_END 0xF6000000UL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBRARY_TEXT_START 0x0c000000
|
#define LIBRARY_TEXT_START 0x0c000000
|
||||||
|
@ -27,13 +27,22 @@ enum arm_pmu_type {
|
|||||||
/*
|
/*
|
||||||
* struct arm_pmu_platdata - ARM PMU platform data
|
* struct arm_pmu_platdata - ARM PMU platform data
|
||||||
*
|
*
|
||||||
* @handle_irq: an optional handler which will be called from the interrupt and
|
* @handle_irq: an optional handler which will be called from the
|
||||||
* passed the address of the low level handler, and can be used to implement
|
* interrupt and passed the address of the low level handler,
|
||||||
* any platform specific handling before or after calling it.
|
* and can be used to implement any platform specific handling
|
||||||
|
* before or after calling it.
|
||||||
|
* @enable_irq: an optional handler which will be called after
|
||||||
|
* request_irq and be used to handle some platform specific
|
||||||
|
* irq enablement
|
||||||
|
* @disable_irq: an optional handler which will be called before
|
||||||
|
* free_irq and be used to handle some platform specific
|
||||||
|
* irq disablement
|
||||||
*/
|
*/
|
||||||
struct arm_pmu_platdata {
|
struct arm_pmu_platdata {
|
||||||
irqreturn_t (*handle_irq)(int irq, void *dev,
|
irqreturn_t (*handle_irq)(int irq, void *dev,
|
||||||
irq_handler_t pmu_handler);
|
irq_handler_t pmu_handler);
|
||||||
|
void (*enable_irq)(int irq);
|
||||||
|
void (*disable_irq)(int irq);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_HAS_PMU
|
#ifdef CONFIG_CPU_HAS_PMU
|
||||||
|
@ -101,6 +101,7 @@ extern int __pure cpu_architecture(void);
|
|||||||
extern void cpu_init(void);
|
extern void cpu_init(void);
|
||||||
|
|
||||||
void arm_machine_restart(char mode, const char *cmd);
|
void arm_machine_restart(char mode, const char *cmd);
|
||||||
|
void soft_restart(unsigned long);
|
||||||
extern void (*arm_pm_restart)(char str, const char *cmd);
|
extern void (*arm_pm_restart)(char str, const char *cmd);
|
||||||
|
|
||||||
#define UDBG_UNDEFINED (1 << 0)
|
#define UDBG_UNDEFINED (1 << 0)
|
||||||
|
@ -36,12 +36,11 @@
|
|||||||
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
||||||
ldr r1, =handle_arch_irq
|
ldr r1, =handle_arch_irq
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
ldr r1, [r1]
|
|
||||||
adr lr, BSYM(9997f)
|
adr lr, BSYM(9997f)
|
||||||
teq r1, #0
|
ldr pc, [r1]
|
||||||
movne pc, r1
|
#else
|
||||||
#endif
|
|
||||||
arch_irq_handler_default
|
arch_irq_handler_default
|
||||||
|
#endif
|
||||||
9997:
|
9997:
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
extern const unsigned char relocate_new_kernel[];
|
extern const unsigned char relocate_new_kernel[];
|
||||||
extern const unsigned int relocate_new_kernel_size;
|
extern const unsigned int relocate_new_kernel_size;
|
||||||
|
|
||||||
extern void setup_mm_for_reboot(char mode);
|
extern void setup_mm_for_reboot(void);
|
||||||
|
|
||||||
extern unsigned long kexec_start_address;
|
extern unsigned long kexec_start_address;
|
||||||
extern unsigned long kexec_indirection_page;
|
extern unsigned long kexec_indirection_page;
|
||||||
@ -113,7 +113,7 @@ void machine_kexec(struct kimage *image)
|
|||||||
kexec_reinit();
|
kexec_reinit();
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
local_fiq_disable();
|
local_fiq_disable();
|
||||||
setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/
|
setup_mm_for_reboot();
|
||||||
flush_cache_all();
|
flush_cache_all();
|
||||||
outer_flush_all();
|
outer_flush_all();
|
||||||
outer_disable();
|
outer_disable();
|
||||||
|
@ -59,8 +59,7 @@ armpmu_get_pmu_id(void)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(armpmu_get_pmu_id);
|
EXPORT_SYMBOL_GPL(armpmu_get_pmu_id);
|
||||||
|
|
||||||
int
|
int perf_num_counters(void)
|
||||||
armpmu_get_max_events(void)
|
|
||||||
{
|
{
|
||||||
int max_events = 0;
|
int max_events = 0;
|
||||||
|
|
||||||
@ -69,12 +68,6 @@ armpmu_get_max_events(void)
|
|||||||
|
|
||||||
return max_events;
|
return max_events;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(armpmu_get_max_events);
|
|
||||||
|
|
||||||
int perf_num_counters(void)
|
|
||||||
{
|
|
||||||
return armpmu_get_max_events();
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(perf_num_counters);
|
EXPORT_SYMBOL_GPL(perf_num_counters);
|
||||||
|
|
||||||
#define HW_OP_UNSUPPORTED 0xFFFF
|
#define HW_OP_UNSUPPORTED 0xFFFF
|
||||||
@ -380,6 +373,8 @@ armpmu_release_hardware(struct arm_pmu *armpmu)
|
|||||||
{
|
{
|
||||||
int i, irq, irqs;
|
int i, irq, irqs;
|
||||||
struct platform_device *pmu_device = armpmu->plat_device;
|
struct platform_device *pmu_device = armpmu->plat_device;
|
||||||
|
struct arm_pmu_platdata *plat =
|
||||||
|
dev_get_platdata(&pmu_device->dev);
|
||||||
|
|
||||||
irqs = min(pmu_device->num_resources, num_possible_cpus());
|
irqs = min(pmu_device->num_resources, num_possible_cpus());
|
||||||
|
|
||||||
@ -387,8 +382,11 @@ armpmu_release_hardware(struct arm_pmu *armpmu)
|
|||||||
if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs))
|
if (!cpumask_test_and_clear_cpu(i, &armpmu->active_irqs))
|
||||||
continue;
|
continue;
|
||||||
irq = platform_get_irq(pmu_device, i);
|
irq = platform_get_irq(pmu_device, i);
|
||||||
if (irq >= 0)
|
if (irq >= 0) {
|
||||||
|
if (plat && plat->disable_irq)
|
||||||
|
plat->disable_irq(irq);
|
||||||
free_irq(irq, armpmu);
|
free_irq(irq, armpmu);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
release_pmu(armpmu->type);
|
release_pmu(armpmu->type);
|
||||||
@ -448,7 +446,8 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu)
|
|||||||
irq);
|
irq);
|
||||||
armpmu_release_hardware(armpmu);
|
armpmu_release_hardware(armpmu);
|
||||||
return err;
|
return err;
|
||||||
}
|
} else if (plat && plat->enable_irq)
|
||||||
|
plat->enable_irq(irq);
|
||||||
|
|
||||||
cpumask_set_cpu(i, &armpmu->active_irqs);
|
cpumask_set_cpu(i, &armpmu->active_irqs);
|
||||||
}
|
}
|
||||||
|
@ -65,13 +65,15 @@ enum armv6_counters {
|
|||||||
* accesses/misses in hardware.
|
* accesses/misses in hardware.
|
||||||
*/
|
*/
|
||||||
static const unsigned armv6_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned armv6_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = ARMV6_PERFCTR_CPU_CYCLES,
|
[PERF_COUNT_HW_CPU_CYCLES] = ARMV6_PERFCTR_CPU_CYCLES,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV6_PERFCTR_INSTR_EXEC,
|
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV6_PERFCTR_INSTR_EXEC,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6_PERFCTR_BR_EXEC,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6_PERFCTR_BR_EXEC,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV6_PERFCTR_BR_MISPREDICT,
|
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV6_PERFCTR_BR_MISPREDICT,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV6_PERFCTR_IBUF_STALL,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV6_PERFCTR_LSU_FULL_STALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
@ -218,13 +220,15 @@ enum armv6mpcore_perf_types {
|
|||||||
* accesses/misses in hardware.
|
* accesses/misses in hardware.
|
||||||
*/
|
*/
|
||||||
static const unsigned armv6mpcore_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned armv6mpcore_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = ARMV6MPCORE_PERFCTR_CPU_CYCLES,
|
[PERF_COUNT_HW_CPU_CYCLES] = ARMV6MPCORE_PERFCTR_CPU_CYCLES,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_INSTR_EXEC,
|
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_INSTR_EXEC,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_BR_EXEC,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV6MPCORE_PERFCTR_BR_EXEC,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV6MPCORE_PERFCTR_BR_MISPREDICT,
|
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV6MPCORE_PERFCTR_BR_MISPREDICT,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV6MPCORE_PERFCTR_IBUF_STALL,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV6MPCORE_PERFCTR_LSU_FULL_STALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
|
@ -28,165 +28,87 @@ static struct arm_pmu armv7pmu;
|
|||||||
* they are not available.
|
* they are not available.
|
||||||
*/
|
*/
|
||||||
enum armv7_perf_types {
|
enum armv7_perf_types {
|
||||||
ARMV7_PERFCTR_PMNC_SW_INCR = 0x00,
|
ARMV7_PERFCTR_PMNC_SW_INCR = 0x00,
|
||||||
ARMV7_PERFCTR_IFETCH_MISS = 0x01,
|
ARMV7_PERFCTR_L1_ICACHE_REFILL = 0x01,
|
||||||
ARMV7_PERFCTR_ITLB_MISS = 0x02,
|
ARMV7_PERFCTR_ITLB_REFILL = 0x02,
|
||||||
ARMV7_PERFCTR_DCACHE_REFILL = 0x03, /* L1 */
|
ARMV7_PERFCTR_L1_DCACHE_REFILL = 0x03,
|
||||||
ARMV7_PERFCTR_DCACHE_ACCESS = 0x04, /* L1 */
|
ARMV7_PERFCTR_L1_DCACHE_ACCESS = 0x04,
|
||||||
ARMV7_PERFCTR_DTLB_REFILL = 0x05,
|
ARMV7_PERFCTR_DTLB_REFILL = 0x05,
|
||||||
ARMV7_PERFCTR_DREAD = 0x06,
|
ARMV7_PERFCTR_MEM_READ = 0x06,
|
||||||
ARMV7_PERFCTR_DWRITE = 0x07,
|
ARMV7_PERFCTR_MEM_WRITE = 0x07,
|
||||||
ARMV7_PERFCTR_INSTR_EXECUTED = 0x08,
|
ARMV7_PERFCTR_INSTR_EXECUTED = 0x08,
|
||||||
ARMV7_PERFCTR_EXC_TAKEN = 0x09,
|
ARMV7_PERFCTR_EXC_TAKEN = 0x09,
|
||||||
ARMV7_PERFCTR_EXC_EXECUTED = 0x0A,
|
ARMV7_PERFCTR_EXC_EXECUTED = 0x0A,
|
||||||
ARMV7_PERFCTR_CID_WRITE = 0x0B,
|
ARMV7_PERFCTR_CID_WRITE = 0x0B,
|
||||||
/* ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS.
|
|
||||||
|
/*
|
||||||
|
* ARMV7_PERFCTR_PC_WRITE is equivalent to HW_BRANCH_INSTRUCTIONS.
|
||||||
* It counts:
|
* It counts:
|
||||||
* - all branch instructions,
|
* - all (taken) branch instructions,
|
||||||
* - instructions that explicitly write the PC,
|
* - instructions that explicitly write the PC,
|
||||||
* - exception generating instructions.
|
* - exception generating instructions.
|
||||||
*/
|
*/
|
||||||
ARMV7_PERFCTR_PC_WRITE = 0x0C,
|
ARMV7_PERFCTR_PC_WRITE = 0x0C,
|
||||||
ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D,
|
ARMV7_PERFCTR_PC_IMM_BRANCH = 0x0D,
|
||||||
ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E,
|
ARMV7_PERFCTR_PC_PROC_RETURN = 0x0E,
|
||||||
ARMV7_PERFCTR_UNALIGNED_ACCESS = 0x0F,
|
ARMV7_PERFCTR_MEM_UNALIGNED_ACCESS = 0x0F,
|
||||||
|
ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10,
|
||||||
|
ARMV7_PERFCTR_CLOCK_CYCLES = 0x11,
|
||||||
|
ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12,
|
||||||
|
|
||||||
/* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */
|
/* These events are defined by the PMUv2 supplement (ARM DDI 0457A). */
|
||||||
ARMV7_PERFCTR_PC_BRANCH_MIS_PRED = 0x10,
|
ARMV7_PERFCTR_MEM_ACCESS = 0x13,
|
||||||
ARMV7_PERFCTR_CLOCK_CYCLES = 0x11,
|
ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14,
|
||||||
ARMV7_PERFCTR_PC_BRANCH_PRED = 0x12,
|
ARMV7_PERFCTR_L1_DCACHE_WB = 0x15,
|
||||||
ARMV7_PERFCTR_MEM_ACCESS = 0x13,
|
ARMV7_PERFCTR_L2_CACHE_ACCESS = 0x16,
|
||||||
ARMV7_PERFCTR_L1_ICACHE_ACCESS = 0x14,
|
ARMV7_PERFCTR_L2_CACHE_REFILL = 0x17,
|
||||||
ARMV7_PERFCTR_L1_DCACHE_WB = 0x15,
|
ARMV7_PERFCTR_L2_CACHE_WB = 0x18,
|
||||||
ARMV7_PERFCTR_L2_DCACHE_ACCESS = 0x16,
|
ARMV7_PERFCTR_BUS_ACCESS = 0x19,
|
||||||
ARMV7_PERFCTR_L2_DCACHE_REFILL = 0x17,
|
ARMV7_PERFCTR_MEM_ERROR = 0x1A,
|
||||||
ARMV7_PERFCTR_L2_DCACHE_WB = 0x18,
|
ARMV7_PERFCTR_INSTR_SPEC = 0x1B,
|
||||||
ARMV7_PERFCTR_BUS_ACCESS = 0x19,
|
ARMV7_PERFCTR_TTBR_WRITE = 0x1C,
|
||||||
ARMV7_PERFCTR_MEMORY_ERROR = 0x1A,
|
ARMV7_PERFCTR_BUS_CYCLES = 0x1D,
|
||||||
ARMV7_PERFCTR_INSTR_SPEC = 0x1B,
|
|
||||||
ARMV7_PERFCTR_TTBR_WRITE = 0x1C,
|
|
||||||
ARMV7_PERFCTR_BUS_CYCLES = 0x1D,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_CPU_CYCLES = 0xFF
|
ARMV7_PERFCTR_CPU_CYCLES = 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ARMv7 Cortex-A8 specific event types */
|
/* ARMv7 Cortex-A8 specific event types */
|
||||||
enum armv7_a8_perf_types {
|
enum armv7_a8_perf_types {
|
||||||
ARMV7_PERFCTR_WRITE_BUFFER_FULL = 0x40,
|
ARMV7_A8_PERFCTR_L2_CACHE_ACCESS = 0x43,
|
||||||
ARMV7_PERFCTR_L2_STORE_MERGED = 0x41,
|
ARMV7_A8_PERFCTR_L2_CACHE_REFILL = 0x44,
|
||||||
ARMV7_PERFCTR_L2_STORE_BUFF = 0x42,
|
ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS = 0x50,
|
||||||
ARMV7_PERFCTR_L2_ACCESS = 0x43,
|
ARMV7_A8_PERFCTR_STALL_ISIDE = 0x56,
|
||||||
ARMV7_PERFCTR_L2_CACH_MISS = 0x44,
|
|
||||||
ARMV7_PERFCTR_AXI_READ_CYCLES = 0x45,
|
|
||||||
ARMV7_PERFCTR_AXI_WRITE_CYCLES = 0x46,
|
|
||||||
ARMV7_PERFCTR_MEMORY_REPLAY = 0x47,
|
|
||||||
ARMV7_PERFCTR_UNALIGNED_ACCESS_REPLAY = 0x48,
|
|
||||||
ARMV7_PERFCTR_L1_DATA_MISS = 0x49,
|
|
||||||
ARMV7_PERFCTR_L1_INST_MISS = 0x4A,
|
|
||||||
ARMV7_PERFCTR_L1_DATA_COLORING = 0x4B,
|
|
||||||
ARMV7_PERFCTR_L1_NEON_DATA = 0x4C,
|
|
||||||
ARMV7_PERFCTR_L1_NEON_CACH_DATA = 0x4D,
|
|
||||||
ARMV7_PERFCTR_L2_NEON = 0x4E,
|
|
||||||
ARMV7_PERFCTR_L2_NEON_HIT = 0x4F,
|
|
||||||
ARMV7_PERFCTR_L1_INST = 0x50,
|
|
||||||
ARMV7_PERFCTR_PC_RETURN_MIS_PRED = 0x51,
|
|
||||||
ARMV7_PERFCTR_PC_BRANCH_FAILED = 0x52,
|
|
||||||
ARMV7_PERFCTR_PC_BRANCH_TAKEN = 0x53,
|
|
||||||
ARMV7_PERFCTR_PC_BRANCH_EXECUTED = 0x54,
|
|
||||||
ARMV7_PERFCTR_OP_EXECUTED = 0x55,
|
|
||||||
ARMV7_PERFCTR_CYCLES_INST_STALL = 0x56,
|
|
||||||
ARMV7_PERFCTR_CYCLES_INST = 0x57,
|
|
||||||
ARMV7_PERFCTR_CYCLES_NEON_DATA_STALL = 0x58,
|
|
||||||
ARMV7_PERFCTR_CYCLES_NEON_INST_STALL = 0x59,
|
|
||||||
ARMV7_PERFCTR_NEON_CYCLES = 0x5A,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_PMU0_EVENTS = 0x70,
|
|
||||||
ARMV7_PERFCTR_PMU1_EVENTS = 0x71,
|
|
||||||
ARMV7_PERFCTR_PMU_EVENTS = 0x72,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ARMv7 Cortex-A9 specific event types */
|
/* ARMv7 Cortex-A9 specific event types */
|
||||||
enum armv7_a9_perf_types {
|
enum armv7_a9_perf_types {
|
||||||
ARMV7_PERFCTR_JAVA_HW_BYTECODE_EXEC = 0x40,
|
ARMV7_A9_PERFCTR_INSTR_CORE_RENAME = 0x68,
|
||||||
ARMV7_PERFCTR_JAVA_SW_BYTECODE_EXEC = 0x41,
|
ARMV7_A9_PERFCTR_STALL_ICACHE = 0x60,
|
||||||
ARMV7_PERFCTR_JAZELLE_BRANCH_EXEC = 0x42,
|
ARMV7_A9_PERFCTR_STALL_DISPATCH = 0x66,
|
||||||
|
|
||||||
ARMV7_PERFCTR_COHERENT_LINE_MISS = 0x50,
|
|
||||||
ARMV7_PERFCTR_COHERENT_LINE_HIT = 0x51,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_ICACHE_DEP_STALL_CYCLES = 0x60,
|
|
||||||
ARMV7_PERFCTR_DCACHE_DEP_STALL_CYCLES = 0x61,
|
|
||||||
ARMV7_PERFCTR_TLB_MISS_DEP_STALL_CYCLES = 0x62,
|
|
||||||
ARMV7_PERFCTR_STREX_EXECUTED_PASSED = 0x63,
|
|
||||||
ARMV7_PERFCTR_STREX_EXECUTED_FAILED = 0x64,
|
|
||||||
ARMV7_PERFCTR_DATA_EVICTION = 0x65,
|
|
||||||
ARMV7_PERFCTR_ISSUE_STAGE_NO_INST = 0x66,
|
|
||||||
ARMV7_PERFCTR_ISSUE_STAGE_EMPTY = 0x67,
|
|
||||||
ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE = 0x68,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_PREDICTABLE_FUNCT_RETURNS = 0x6E,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_MAIN_UNIT_EXECUTED_INST = 0x70,
|
|
||||||
ARMV7_PERFCTR_SECOND_UNIT_EXECUTED_INST = 0x71,
|
|
||||||
ARMV7_PERFCTR_LD_ST_UNIT_EXECUTED_INST = 0x72,
|
|
||||||
ARMV7_PERFCTR_FP_EXECUTED_INST = 0x73,
|
|
||||||
ARMV7_PERFCTR_NEON_EXECUTED_INST = 0x74,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_PLD_FULL_DEP_STALL_CYCLES = 0x80,
|
|
||||||
ARMV7_PERFCTR_DATA_WR_DEP_STALL_CYCLES = 0x81,
|
|
||||||
ARMV7_PERFCTR_ITLB_MISS_DEP_STALL_CYCLES = 0x82,
|
|
||||||
ARMV7_PERFCTR_DTLB_MISS_DEP_STALL_CYCLES = 0x83,
|
|
||||||
ARMV7_PERFCTR_MICRO_ITLB_MISS_DEP_STALL_CYCLES = 0x84,
|
|
||||||
ARMV7_PERFCTR_MICRO_DTLB_MISS_DEP_STALL_CYCLES = 0x85,
|
|
||||||
ARMV7_PERFCTR_DMB_DEP_STALL_CYCLES = 0x86,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_INTGR_CLK_ENABLED_CYCLES = 0x8A,
|
|
||||||
ARMV7_PERFCTR_DATA_ENGINE_CLK_EN_CYCLES = 0x8B,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_ISB_INST = 0x90,
|
|
||||||
ARMV7_PERFCTR_DSB_INST = 0x91,
|
|
||||||
ARMV7_PERFCTR_DMB_INST = 0x92,
|
|
||||||
ARMV7_PERFCTR_EXT_INTERRUPTS = 0x93,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_COMPLETED = 0xA0,
|
|
||||||
ARMV7_PERFCTR_PLE_CACHE_LINE_RQST_SKIPPED = 0xA1,
|
|
||||||
ARMV7_PERFCTR_PLE_FIFO_FLUSH = 0xA2,
|
|
||||||
ARMV7_PERFCTR_PLE_RQST_COMPLETED = 0xA3,
|
|
||||||
ARMV7_PERFCTR_PLE_FIFO_OVERFLOW = 0xA4,
|
|
||||||
ARMV7_PERFCTR_PLE_RQST_PROG = 0xA5
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ARMv7 Cortex-A5 specific event types */
|
/* ARMv7 Cortex-A5 specific event types */
|
||||||
enum armv7_a5_perf_types {
|
enum armv7_a5_perf_types {
|
||||||
ARMV7_PERFCTR_IRQ_TAKEN = 0x86,
|
ARMV7_A5_PERFCTR_PREFETCH_LINEFILL = 0xc2,
|
||||||
ARMV7_PERFCTR_FIQ_TAKEN = 0x87,
|
ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3,
|
||||||
|
|
||||||
ARMV7_PERFCTR_EXT_MEM_RQST = 0xc0,
|
|
||||||
ARMV7_PERFCTR_NC_EXT_MEM_RQST = 0xc1,
|
|
||||||
ARMV7_PERFCTR_PREFETCH_LINEFILL = 0xc2,
|
|
||||||
ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP = 0xc3,
|
|
||||||
ARMV7_PERFCTR_ENTER_READ_ALLOC = 0xc4,
|
|
||||||
ARMV7_PERFCTR_READ_ALLOC = 0xc5,
|
|
||||||
|
|
||||||
ARMV7_PERFCTR_STALL_SB_FULL = 0xc9,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ARMv7 Cortex-A15 specific event types */
|
/* ARMv7 Cortex-A15 specific event types */
|
||||||
enum armv7_a15_perf_types {
|
enum armv7_a15_perf_types {
|
||||||
ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS = 0x40,
|
ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ = 0x40,
|
||||||
ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS = 0x41,
|
ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE = 0x41,
|
||||||
ARMV7_PERFCTR_L1_DCACHE_READ_REFILL = 0x42,
|
ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ = 0x42,
|
||||||
ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL = 0x43,
|
ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE = 0x43,
|
||||||
|
|
||||||
ARMV7_PERFCTR_L1_DTLB_READ_REFILL = 0x4C,
|
ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ = 0x4C,
|
||||||
ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL = 0x4D,
|
ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE = 0x4D,
|
||||||
|
|
||||||
ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS = 0x50,
|
ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ = 0x50,
|
||||||
ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS = 0x51,
|
ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE = 0x51,
|
||||||
ARMV7_PERFCTR_L2_DCACHE_READ_REFILL = 0x52,
|
ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ = 0x52,
|
||||||
ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL = 0x53,
|
ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE = 0x53,
|
||||||
|
|
||||||
ARMV7_PERFCTR_SPEC_PC_WRITE = 0x76,
|
ARMV7_A15_PERFCTR_PC_WRITE_SPEC = 0x76,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -197,13 +119,15 @@ enum armv7_a15_perf_types {
|
|||||||
* accesses/misses in hardware.
|
* accesses/misses in hardware.
|
||||||
*/
|
*/
|
||||||
static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED,
|
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES,
|
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A8_PERFCTR_STALL_ISIDE,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
@ -217,12 +141,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
* combined.
|
* combined.
|
||||||
*/
|
*/
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -231,12 +155,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
},
|
},
|
||||||
[C(L1I)] = {
|
[C(L1I)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST,
|
[C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_INST,
|
[C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_INST_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -245,12 +169,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
},
|
},
|
||||||
[C(LL)] = {
|
[C(LL)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS,
|
[C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L2_CACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACH_MISS,
|
[C(RESULT_MISS)] = ARMV7_A8_PERFCTR_L2_CACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -274,11 +198,11 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(ITLB)] = {
|
[C(ITLB)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -287,14 +211,12 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
},
|
},
|
||||||
[C(BPU)] = {
|
[C(BPU)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -321,14 +243,15 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
* Cortex-A9 HW events mapping
|
* Cortex-A9 HW events mapping
|
||||||
*/
|
*/
|
||||||
static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned armv7_a9_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] =
|
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_A9_PERFCTR_INSTR_CORE_RENAME,
|
||||||
ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS,
|
[PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
|
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES,
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = ARMV7_A9_PERFCTR_STALL_ICACHE,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = ARMV7_A9_PERFCTR_STALL_DISPATCH,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
@ -342,12 +265,12 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
* combined.
|
* combined.
|
||||||
*/
|
*/
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_DCACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_DCACHE_REFILL,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -357,11 +280,11 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(L1I)] = {
|
[C(L1I)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -399,11 +322,11 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(ITLB)] = {
|
[C(ITLB)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -412,14 +335,12 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
},
|
},
|
||||||
[C(BPU)] = {
|
[C(BPU)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_WRITE,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -446,13 +367,15 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
* Cortex-A5 HW events mapping
|
* Cortex-A5 HW events mapping
|
||||||
*/
|
*/
|
||||||
static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned armv7_a5_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED,
|
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
@ -460,42 +383,34 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[PERF_COUNT_HW_CACHE_RESULT_MAX] = {
|
[PERF_COUNT_HW_CACHE_RESULT_MAX] = {
|
||||||
[C(L1D)] = {
|
[C(L1D)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
= ARMV7_PERFCTR_DCACHE_ACCESS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_DCACHE_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
= ARMV7_PERFCTR_DCACHE_ACCESS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_DCACHE_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL,
|
||||||
= ARMV7_PERFCTR_PREFETCH_LINEFILL,
|
[C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[C(L1I)] = {
|
[C(L1I)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* The prefetch counters don't differentiate between the I
|
* The prefetch counters don't differentiate between the I
|
||||||
* side and the D side.
|
* side and the D side.
|
||||||
*/
|
*/
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL,
|
||||||
= ARMV7_PERFCTR_PREFETCH_LINEFILL,
|
[C(RESULT_MISS)] = ARMV7_A5_PERFCTR_PREFETCH_LINEFILL_DROP,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_PREFETCH_LINEFILL_DROP,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[C(LL)] = {
|
[C(LL)] = {
|
||||||
@ -529,11 +444,11 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(ITLB)] = {
|
[C(ITLB)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -543,13 +458,11 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(BPU)] = {
|
[C(BPU)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -562,13 +475,15 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
* Cortex-A15 HW events mapping
|
* Cortex-A15 HW events mapping
|
||||||
*/
|
*/
|
||||||
static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
[PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED,
|
[PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_SPEC_PC_WRITE,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_A15_PERFCTR_PC_WRITE_SPEC,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
[PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES,
|
[PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
@ -576,16 +491,12 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[PERF_COUNT_HW_CACHE_RESULT_MAX] = {
|
[PERF_COUNT_HW_CACHE_RESULT_MAX] = {
|
||||||
[C(L1D)] = {
|
[C(L1D)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ,
|
||||||
= ARMV7_PERFCTR_L1_DCACHE_READ_ACCESS,
|
[C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_L1_DCACHE_READ_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE,
|
||||||
= ARMV7_PERFCTR_L1_DCACHE_WRITE_ACCESS,
|
[C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_WRITE,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_L1_DCACHE_WRITE_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -601,11 +512,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
*/
|
*/
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_IFETCH_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -614,16 +525,12 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
},
|
},
|
||||||
[C(LL)] = {
|
[C(LL)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_READ,
|
||||||
= ARMV7_PERFCTR_L2_DCACHE_READ_ACCESS,
|
[C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_READ,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_L2_DCACHE_READ_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)]
|
[C(RESULT_ACCESS)] = ARMV7_A15_PERFCTR_L2_CACHE_ACCESS_WRITE,
|
||||||
= ARMV7_PERFCTR_L2_DCACHE_WRITE_ACCESS,
|
[C(RESULT_MISS)] = ARMV7_A15_PERFCTR_L2_CACHE_REFILL_WRITE,
|
||||||
[C(RESULT_MISS)]
|
|
||||||
= ARMV7_PERFCTR_L2_DCACHE_WRITE_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -633,13 +540,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(DTLB)] = {
|
[C(DTLB)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_READ,
|
||||||
= ARMV7_PERFCTR_L1_DTLB_READ_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_A15_PERFCTR_DTLB_REFILL_L1_WRITE,
|
||||||
= ARMV7_PERFCTR_L1_DTLB_WRITE_REFILL,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -649,11 +554,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(ITLB)] = {
|
[C(ITLB)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_MISS,
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL,
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
@ -663,13 +568,11 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
|||||||
[C(BPU)] = {
|
[C(BPU)] = {
|
||||||
[C(OP_READ)] = {
|
[C(OP_READ)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_WRITE)] = {
|
[C(OP_WRITE)] = {
|
||||||
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
[C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED,
|
||||||
[C(RESULT_MISS)]
|
[C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
||||||
= ARMV7_PERFCTR_PC_BRANCH_MIS_PRED,
|
|
||||||
},
|
},
|
||||||
[C(OP_PREFETCH)] = {
|
[C(OP_PREFETCH)] = {
|
||||||
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
|
||||||
|
@ -48,13 +48,15 @@ enum xscale_counters {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned xscale_perf_map[PERF_COUNT_HW_MAX] = {
|
static const unsigned xscale_perf_map[PERF_COUNT_HW_MAX] = {
|
||||||
[PERF_COUNT_HW_CPU_CYCLES] = XSCALE_PERFCTR_CCNT,
|
[PERF_COUNT_HW_CPU_CYCLES] = XSCALE_PERFCTR_CCNT,
|
||||||
[PERF_COUNT_HW_INSTRUCTIONS] = XSCALE_PERFCTR_INSTRUCTION,
|
[PERF_COUNT_HW_INSTRUCTIONS] = XSCALE_PERFCTR_INSTRUCTION,
|
||||||
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_CACHE_MISSES] = HW_OP_UNSUPPORTED,
|
||||||
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = XSCALE_PERFCTR_BRANCH,
|
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = XSCALE_PERFCTR_BRANCH,
|
||||||
[PERF_COUNT_HW_BRANCH_MISSES] = XSCALE_PERFCTR_BRANCH_MISS,
|
[PERF_COUNT_HW_BRANCH_MISSES] = XSCALE_PERFCTR_BRANCH_MISS,
|
||||||
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
[PERF_COUNT_HW_BUS_CYCLES] = HW_OP_UNSUPPORTED,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = XSCALE_PERFCTR_ICACHE_NO_DELIVER,
|
||||||
|
[PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
|
||||||
|
@ -57,7 +57,7 @@ static const char *isa_modes[] = {
|
|||||||
"ARM" , "Thumb" , "Jazelle", "ThumbEE"
|
"ARM" , "Thumb" , "Jazelle", "ThumbEE"
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void setup_mm_for_reboot(char mode);
|
extern void setup_mm_for_reboot(void);
|
||||||
|
|
||||||
static volatile int hlt_counter;
|
static volatile int hlt_counter;
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ static int __init hlt_setup(char *__unused)
|
|||||||
__setup("nohlt", nohlt_setup);
|
__setup("nohlt", nohlt_setup);
|
||||||
__setup("hlt", hlt_setup);
|
__setup("hlt", hlt_setup);
|
||||||
|
|
||||||
void arm_machine_restart(char mode, const char *cmd)
|
void soft_restart(unsigned long addr)
|
||||||
{
|
{
|
||||||
/* Disable interrupts first */
|
/* Disable interrupts first */
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
@ -103,7 +103,7 @@ void arm_machine_restart(char mode, const char *cmd)
|
|||||||
* we may need it to insert some 1:1 mappings so that
|
* we may need it to insert some 1:1 mappings so that
|
||||||
* soft boot works.
|
* soft boot works.
|
||||||
*/
|
*/
|
||||||
setup_mm_for_reboot(mode);
|
setup_mm_for_reboot();
|
||||||
|
|
||||||
/* Clean and invalidate caches */
|
/* Clean and invalidate caches */
|
||||||
flush_cache_all();
|
flush_cache_all();
|
||||||
@ -114,18 +114,17 @@ void arm_machine_restart(char mode, const char *cmd)
|
|||||||
/* Push out any further dirty data, and ensure cache is empty */
|
/* Push out any further dirty data, and ensure cache is empty */
|
||||||
flush_cache_all();
|
flush_cache_all();
|
||||||
|
|
||||||
/*
|
cpu_reset(addr);
|
||||||
* Now call the architecture specific reboot code.
|
}
|
||||||
*/
|
|
||||||
arch_reset(mode, cmd);
|
|
||||||
|
|
||||||
/*
|
void arm_machine_restart(char mode, const char *cmd)
|
||||||
* Whoops - the architecture was unable to reboot.
|
{
|
||||||
* Tell the user!
|
/* Disable interrupts first */
|
||||||
*/
|
local_irq_disable();
|
||||||
mdelay(1000);
|
local_fiq_disable();
|
||||||
printk("Reboot failed -- System halted\n");
|
|
||||||
while (1);
|
/* Call the architecture specific reboot code. */
|
||||||
|
arch_reset(mode, cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -253,7 +252,15 @@ void machine_power_off(void)
|
|||||||
void machine_restart(char *cmd)
|
void machine_restart(char *cmd)
|
||||||
{
|
{
|
||||||
machine_shutdown();
|
machine_shutdown();
|
||||||
|
|
||||||
arm_pm_restart(reboot_mode, cmd);
|
arm_pm_restart(reboot_mode, cmd);
|
||||||
|
|
||||||
|
/* Give a grace period for failure to restart of 1s */
|
||||||
|
mdelay(1000);
|
||||||
|
|
||||||
|
/* Whoops - the platform was unable to reboot. Tell the user! */
|
||||||
|
printk("Reboot failed -- System halted\n");
|
||||||
|
while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __show_regs(struct pt_regs *regs)
|
void __show_regs(struct pt_regs *regs)
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
|
#include <linux/sort.h>
|
||||||
|
|
||||||
#include <asm/unified.h>
|
#include <asm/unified.h>
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
@ -890,6 +891,12 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr)
|
|||||||
return mdesc;
|
return mdesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __init meminfo_cmp(const void *_a, const void *_b)
|
||||||
|
{
|
||||||
|
const struct membank *a = _a, *b = _b;
|
||||||
|
long cmp = bank_pfn_start(a) - bank_pfn_start(b);
|
||||||
|
return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
void __init setup_arch(char **cmdline_p)
|
void __init setup_arch(char **cmdline_p)
|
||||||
{
|
{
|
||||||
@ -904,8 +911,8 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
machine_desc = mdesc;
|
machine_desc = mdesc;
|
||||||
machine_name = mdesc->name;
|
machine_name = mdesc->name;
|
||||||
|
|
||||||
if (mdesc->soft_reboot)
|
if (mdesc->restart_mode)
|
||||||
reboot_setup("s");
|
reboot_setup(&mdesc->restart_mode);
|
||||||
|
|
||||||
init_mm.start_code = (unsigned long) _text;
|
init_mm.start_code = (unsigned long) _text;
|
||||||
init_mm.end_code = (unsigned long) _etext;
|
init_mm.end_code = (unsigned long) _etext;
|
||||||
@ -918,12 +925,16 @@ void __init setup_arch(char **cmdline_p)
|
|||||||
|
|
||||||
parse_early_param();
|
parse_early_param();
|
||||||
|
|
||||||
|
sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
|
||||||
sanity_check_meminfo();
|
sanity_check_meminfo();
|
||||||
arm_memblock_init(&meminfo, mdesc);
|
arm_memblock_init(&meminfo, mdesc);
|
||||||
|
|
||||||
paging_init(mdesc);
|
paging_init(mdesc);
|
||||||
request_standard_resources(mdesc);
|
request_standard_resources(mdesc);
|
||||||
|
|
||||||
|
if (mdesc->restart)
|
||||||
|
arm_pm_restart = mdesc->restart;
|
||||||
|
|
||||||
unflatten_device_tree();
|
unflatten_device_tree();
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
@ -30,14 +30,6 @@
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_AT91X40
|
|
||||||
#define __arch_ioremap at91_ioremap
|
|
||||||
#define __arch_iounmap at91_iounmap
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void __iomem *at91_ioremap(unsigned long phys, size_t size, unsigned int type);
|
|
||||||
void at91_iounmap(volatile void __iomem *addr);
|
|
||||||
|
|
||||||
static inline unsigned int at91_sys_read(unsigned int reg_offset)
|
static inline unsigned int at91_sys_read(unsigned int reg_offset)
|
||||||
{
|
{
|
||||||
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
|
void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-at91/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2003 SAN People
|
|
||||||
*
|
|
||||||
* This program 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 program 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ASM_ARCH_VMALLOC_H
|
|
||||||
#define __ASM_ARCH_VMALLOC_H
|
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
|
||||||
|
|
||||||
#define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK)
|
|
||||||
|
|
||||||
#endif
|
|
@ -73,24 +73,6 @@ static struct map_desc at91_io_desc __initdata = {
|
|||||||
.type = MT_DEVICE,
|
.type = MT_DEVICE,
|
||||||
};
|
};
|
||||||
|
|
||||||
void __iomem *at91_ioremap(unsigned long p, size_t size, unsigned int type)
|
|
||||||
{
|
|
||||||
if (p >= AT91_BASE_SYS && p <= (AT91_BASE_SYS + SZ_16K - 1))
|
|
||||||
return (void __iomem *)AT91_IO_P2V(p);
|
|
||||||
|
|
||||||
return __arm_ioremap_caller(p, size, type, __builtin_return_address(0));
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(at91_ioremap);
|
|
||||||
|
|
||||||
void at91_iounmap(volatile void __iomem *addr)
|
|
||||||
{
|
|
||||||
unsigned long virt = (unsigned long)addr;
|
|
||||||
|
|
||||||
if (virt >= VMALLOC_START && virt < VMALLOC_END)
|
|
||||||
__iounmap(addr);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(at91_iounmap);
|
|
||||||
|
|
||||||
#define AT91_DBGU0 0xfffff200
|
#define AT91_DBGU0 0xfffff200
|
||||||
#define AT91_DBGU1 0xffffee00
|
#define AT91_DBGU1 0xffffee00
|
||||||
|
|
||||||
|
@ -1615,7 +1615,7 @@ DMA_MemType_t dma_mem_type(void *addr)
|
|||||||
{
|
{
|
||||||
unsigned long addrVal = (unsigned long)addr;
|
unsigned long addrVal = (unsigned long)addr;
|
||||||
|
|
||||||
if (addrVal >= VMALLOC_END) {
|
if (addrVal >= CONSISTENT_BASE) {
|
||||||
/* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */
|
/* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */
|
||||||
|
|
||||||
/* dma_alloc_xxx pages are physically and virtually contiguous */
|
/* dma_alloc_xxx pages are physically and virtually contiguous */
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (C) 2000 Russell King.
|
|
||||||
*
|
|
||||||
* This program 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 program 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Move VMALLOC_END to 0xf0000000 so that the vm space can range from
|
|
||||||
* 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
|
|
||||||
* larger physical memory designs better.
|
|
||||||
*/
|
|
||||||
#define VMALLOC_END 0xf0000000UL
|
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Object file lists.
|
# Object file lists.
|
||||||
|
|
||||||
obj-y := irq.o mm.o time.o
|
obj-y := common.o
|
||||||
obj-m :=
|
obj-m :=
|
||||||
obj-n :=
|
obj-n :=
|
||||||
obj- :=
|
obj- :=
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* linux/arch/arm/mach-clps711x/irq.c
|
* linux/arch/arm/mach-clps711x/core.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Core support for the CLPS711x-based machines.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2001,2011 Deep Blue Solutions Ltd
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,16 +19,42 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/list.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/timex.h>
|
||||||
|
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/sizes.h>
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
#include <asm/leds.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
#include <asm/mach/map.h>
|
||||||
|
#include <asm/mach/time.h>
|
||||||
#include <asm/hardware/clps7111.h>
|
#include <asm/hardware/clps7111.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This maps the generic CLPS711x registers
|
||||||
|
*/
|
||||||
|
static struct map_desc clps711x_io_desc[] __initdata = {
|
||||||
|
{
|
||||||
|
.virtual = CLPS7111_VIRT_BASE,
|
||||||
|
.pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
|
||||||
|
.length = SZ_1M,
|
||||||
|
.type = MT_DEVICE
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void __init clps711x_map_io(void)
|
||||||
|
{
|
||||||
|
iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
|
||||||
|
}
|
||||||
|
|
||||||
static void int1_mask(struct irq_data *d)
|
static void int1_mask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
u32 intmr1;
|
u32 intmr1;
|
||||||
@ -112,15 +140,15 @@ void __init clps711x_init_irq(void)
|
|||||||
|
|
||||||
for (i = 0; i < NR_IRQS; i++) {
|
for (i = 0; i < NR_IRQS; i++) {
|
||||||
if (INT1_IRQS & (1 << i)) {
|
if (INT1_IRQS & (1 << i)) {
|
||||||
irq_set_chip_and_handler(i, &int1_chip,
|
irq_set_chip_and_handler(i, &int1_chip,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
||||||
}
|
}
|
||||||
if (INT2_IRQS & (1 << i)) {
|
if (INT2_IRQS & (1 << i)) {
|
||||||
irq_set_chip_and_handler(i, &int2_chip,
|
irq_set_chip_and_handler(i, &int2_chip,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -141,3 +169,54 @@ void __init clps711x_init_irq(void)
|
|||||||
clps_writel(0, SYNCIO);
|
clps_writel(0, SYNCIO);
|
||||||
clps_writel(0, KBDEOI);
|
clps_writel(0, KBDEOI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* gettimeoffset() returns time since last timer tick, in usecs.
|
||||||
|
*
|
||||||
|
* 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
|
||||||
|
* 'tick' is usecs per jiffy.
|
||||||
|
*/
|
||||||
|
static unsigned long clps711x_gettimeoffset(void)
|
||||||
|
{
|
||||||
|
unsigned long hwticks;
|
||||||
|
hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
|
||||||
|
return (hwticks * (tick_nsec / 1000)) / LATCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IRQ handler for the timer
|
||||||
|
*/
|
||||||
|
static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id)
|
||||||
|
{
|
||||||
|
timer_tick();
|
||||||
|
return IRQ_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct irqaction clps711x_timer_irq = {
|
||||||
|
.name = "CLPS711x Timer Tick",
|
||||||
|
.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
|
||||||
|
.handler = p720t_timer_interrupt,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init clps711x_timer_init(void)
|
||||||
|
{
|
||||||
|
struct timespec tv;
|
||||||
|
unsigned int syscon;
|
||||||
|
|
||||||
|
syscon = clps_readl(SYSCON1);
|
||||||
|
syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
|
||||||
|
clps_writel(syscon, SYSCON1);
|
||||||
|
|
||||||
|
clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
|
||||||
|
|
||||||
|
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
|
||||||
|
|
||||||
|
tv.tv_nsec = 0;
|
||||||
|
tv.tv_sec = clps_readl(RTCDR);
|
||||||
|
do_settimeofday(&tv);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct sys_timer clps711x_timer = {
|
||||||
|
.init = clps711x_timer_init,
|
||||||
|
.offset = clps711x_gettimeoffset,
|
||||||
|
};
|
@ -34,7 +34,7 @@ static inline void arch_idle(void)
|
|||||||
|
|
||||||
static inline void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
cpu_reset(0);
|
soft_restart(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-clps711x/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
|
||||||
*
|
|
||||||
* This program 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 program 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#define VMALLOC_END 0xd0000000UL
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/arm/mach-clps711x/mm.c
|
|
||||||
*
|
|
||||||
* Generic MM setup for the CLPS711x-based machines.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2001 Deep Blue Solutions Ltd
|
|
||||||
*
|
|
||||||
* This program 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 program 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
|
|
||||||
#include <asm/sizes.h>
|
|
||||||
#include <mach/hardware.h>
|
|
||||||
#include <asm/pgtable.h>
|
|
||||||
#include <asm/page.h>
|
|
||||||
#include <asm/mach/map.h>
|
|
||||||
#include <asm/hardware/clps7111.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This maps the generic CLPS711x registers
|
|
||||||
*/
|
|
||||||
static struct map_desc clps711x_io_desc[] __initdata = {
|
|
||||||
{
|
|
||||||
.virtual = CLPS7111_VIRT_BASE,
|
|
||||||
.pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
|
|
||||||
.length = SZ_1M,
|
|
||||||
.type = MT_DEVICE
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init clps711x_map_io(void)
|
|
||||||
{
|
|
||||||
iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/arm/mach-clps711x/time.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2001 Deep Blue Solutions Ltd.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#include <linux/timex.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <linux/irq.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/io.h>
|
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/leds.h>
|
|
||||||
#include <asm/hardware/clps7111.h>
|
|
||||||
|
|
||||||
#include <asm/mach/time.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* gettimeoffset() returns time since last timer tick, in usecs.
|
|
||||||
*
|
|
||||||
* 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
|
|
||||||
* 'tick' is usecs per jiffy.
|
|
||||||
*/
|
|
||||||
static unsigned long clps711x_gettimeoffset(void)
|
|
||||||
{
|
|
||||||
unsigned long hwticks;
|
|
||||||
hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
|
|
||||||
return (hwticks * (tick_nsec / 1000)) / LATCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IRQ handler for the timer
|
|
||||||
*/
|
|
||||||
static irqreturn_t
|
|
||||||
p720t_timer_interrupt(int irq, void *dev_id)
|
|
||||||
{
|
|
||||||
timer_tick();
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct irqaction clps711x_timer_irq = {
|
|
||||||
.name = "CLPS711x Timer Tick",
|
|
||||||
.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
|
|
||||||
.handler = p720t_timer_interrupt,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void __init clps711x_timer_init(void)
|
|
||||||
{
|
|
||||||
struct timespec tv;
|
|
||||||
unsigned int syscon;
|
|
||||||
|
|
||||||
syscon = clps_readl(SYSCON1);
|
|
||||||
syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
|
|
||||||
clps_writel(syscon, SYSCON1);
|
|
||||||
|
|
||||||
clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
|
|
||||||
|
|
||||||
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
|
|
||||||
|
|
||||||
tv.tv_nsec = 0;
|
|
||||||
tv.tv_sec = clps_readl(RTCDR);
|
|
||||||
do_settimeofday(&tv);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct sys_timer clps711x_timer = {
|
|
||||||
.init = clps711x_timer_init,
|
|
||||||
.offset = clps711x_gettimeoffset,
|
|
||||||
};
|
|
@ -26,6 +26,7 @@
|
|||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
#include <asm/mach/time.h>
|
#include <asm/mach/time.h>
|
||||||
@ -201,5 +202,6 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
|
|||||||
.map_io = cns3420_map_io,
|
.map_io = cns3420_map_io,
|
||||||
.init_irq = cns3xxx_init_irq,
|
.init_irq = cns3xxx_init_irq,
|
||||||
.timer = &cns3xxx_timer,
|
.timer = &cns3xxx_timer,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = cns3420_init,
|
.init_machine = cns3420_init,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/hardware/entry-macro-gic.S>
|
|
||||||
|
|
||||||
.macro disable_fiq
|
.macro disable_fiq
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2000 Russell King.
|
|
||||||
* Copyright 2003 ARM Limited
|
|
||||||
* Copyright 2008 Cavium Networks
|
|
||||||
*
|
|
||||||
* This file is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License, Version 2, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xd8000000UL
|
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Common objects
|
# Common objects
|
||||||
obj-y := time.o clock.o serial.o io.o psc.o \
|
obj-y := time.o clock.o serial.o psc.o \
|
||||||
dma.o usb.o common.o sram.o aemif.o
|
dma.o usb.o common.o sram.o aemif.o
|
||||||
|
|
||||||
obj-$(CONFIG_DAVINCI_MUX) += mux.o
|
obj-$(CONFIG_DAVINCI_MUX) += mux.o
|
||||||
|
@ -21,12 +21,4 @@
|
|||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
#define __mem_isa(a) (a)
|
#define __mem_isa(a) (a)
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
|
||||||
#define __arch_ioremap davinci_ioremap
|
|
||||||
#define __arch_iounmap davinci_iounmap
|
|
||||||
|
|
||||||
void __iomem *davinci_ioremap(unsigned long phys, size_t size,
|
|
||||||
unsigned int type);
|
|
||||||
void davinci_iounmap(volatile void __iomem *addr);
|
|
||||||
#endif
|
|
||||||
#endif /* __ASM_ARCH_IO_H */
|
#endif /* __ASM_ARCH_IO_H */
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* DaVinci vmalloc definitions
|
|
||||||
*
|
|
||||||
* Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
|
|
||||||
*
|
|
||||||
* 2007 (c) MontaVista Software, Inc. This file is licensed under
|
|
||||||
* the terms of the GNU General Public License version 2. This program
|
|
||||||
* is licensed "as is" without any warranty of any kind, whether express
|
|
||||||
* or implied.
|
|
||||||
*/
|
|
||||||
#include <mach/hardware.h>
|
|
||||||
|
|
||||||
/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */
|
|
||||||
#define VMALLOC_END (IO_VIRT - (2<<20))
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* DaVinci I/O mapping code
|
|
||||||
*
|
|
||||||
* Copyright (C) 2005-2006 Texas Instruments
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/io.h>
|
|
||||||
|
|
||||||
#include <asm/tlb.h>
|
|
||||||
#include <asm/mach/map.h>
|
|
||||||
|
|
||||||
#include <mach/common.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Intercept ioremap() requests for addresses in our fixed mapping regions.
|
|
||||||
*/
|
|
||||||
void __iomem *davinci_ioremap(unsigned long p, size_t size, unsigned int type)
|
|
||||||
{
|
|
||||||
struct map_desc *desc = davinci_soc_info.io_desc;
|
|
||||||
int desc_num = davinci_soc_info.io_desc_num;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < desc_num; i++, desc++) {
|
|
||||||
unsigned long iophys = __pfn_to_phys(desc->pfn);
|
|
||||||
unsigned long iosize = desc->length;
|
|
||||||
|
|
||||||
if (p >= iophys && (p + size) <= (iophys + iosize))
|
|
||||||
return __io(desc->virtual + p - iophys);
|
|
||||||
}
|
|
||||||
|
|
||||||
return __arm_ioremap_caller(p, size, type,
|
|
||||||
__builtin_return_address(0));
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(davinci_ioremap);
|
|
||||||
|
|
||||||
void davinci_iounmap(volatile void __iomem *addr)
|
|
||||||
{
|
|
||||||
unsigned long virt = (unsigned long)addr;
|
|
||||||
|
|
||||||
if (virt >= VMALLOC_START && virt < VMALLOC_END)
|
|
||||||
__iounmap(addr);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(davinci_iounmap);
|
|
@ -11,8 +11,6 @@
|
|||||||
#ifndef __ASM_ARCH_DOVE_H
|
#ifndef __ASM_ARCH_DOVE_H
|
||||||
#define __ASM_ARCH_DOVE_H
|
#define __ASM_ARCH_DOVE_H
|
||||||
|
|
||||||
#include <mach/vmalloc.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Marvell Dove address maps.
|
* Marvell Dove address maps.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-dove/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xfd800000UL
|
|
@ -283,7 +283,7 @@ MACHINE_START(EBSA110, "EBSA110")
|
|||||||
.atag_offset = 0x400,
|
.atag_offset = 0x400,
|
||||||
.reserve_lp0 = 1,
|
.reserve_lp0 = 1,
|
||||||
.reserve_lp2 = 1,
|
.reserve_lp2 = 1,
|
||||||
.soft_reboot = 1,
|
.restart_mode = 's',
|
||||||
.map_io = ebsa110_map_io,
|
.map_io = ebsa110_map_io,
|
||||||
.init_irq = ebsa110_init_irq,
|
.init_irq = ebsa110_init_irq,
|
||||||
.timer = &ebsa110_timer,
|
.timer = &ebsa110_timer,
|
||||||
|
@ -34,6 +34,6 @@ static inline void arch_idle(void)
|
|||||||
asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
|
asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define arch_reset(mode, cmd) cpu_reset(0x80000000)
|
#define arch_reset(mode, cmd) soft_restart(0x80000000)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-ebsa110/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 1998 Russell King
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
|
||||||
#define VMALLOC_END 0xdf000000UL
|
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = adssphere_init_machine,
|
.init_machine = adssphere_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <mach/ep93xx_spi.h>
|
#include <mach/ep93xx_spi.h>
|
||||||
#include <mach/gpio-ep93xx.h>
|
#include <mach/gpio-ep93xx.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
@ -250,6 +251,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -261,6 +263,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -272,6 +275,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -283,6 +287,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -294,6 +299,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -305,6 +311,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -316,6 +323,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -327,6 +335,7 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = edb93xx_init_machine,
|
.init_machine = edb93xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = gesbc9312_init_machine,
|
.init_machine = gesbc9312_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -9,51 +9,9 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or (at
|
* the Free Software Foundation; either version 2 of the License, or (at
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*/
|
*/
|
||||||
#include <mach/ep93xx-regs.h>
|
|
||||||
|
|
||||||
.macro disable_fiq
|
.macro disable_fiq
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_irqnr_preamble, base, tmp
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro arch_ret_to_user, tmp1, tmp2
|
.macro arch_ret_to_user, tmp1, tmp2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
||||||
ldr \base, =(EP93XX_AHB_VIRT_BASE)
|
|
||||||
orr \base, \base, #0x000b0000
|
|
||||||
mov \irqnr, #0
|
|
||||||
ldr \irqstat, [\base] @ lower 32 interrupts
|
|
||||||
cmp \irqstat, #0
|
|
||||||
bne 1001f
|
|
||||||
|
|
||||||
eor \base, \base, #0x00070000
|
|
||||||
ldr \irqstat, [\base] @ upper 32 interrupts
|
|
||||||
cmp \irqstat, #0
|
|
||||||
beq 1002f
|
|
||||||
mov \irqnr, #0x20
|
|
||||||
|
|
||||||
1001:
|
|
||||||
movs \tmp, \irqstat, lsl #16
|
|
||||||
movne \irqstat, \tmp
|
|
||||||
addeq \irqnr, \irqnr, #16
|
|
||||||
|
|
||||||
movs \tmp, \irqstat, lsl #8
|
|
||||||
movne \irqstat, \tmp
|
|
||||||
addeq \irqnr, \irqnr, #8
|
|
||||||
|
|
||||||
movs \tmp, \irqstat, lsl #4
|
|
||||||
movne \irqstat, \tmp
|
|
||||||
addeq \irqnr, \irqnr, #4
|
|
||||||
|
|
||||||
movs \tmp, \irqstat, lsl #2
|
|
||||||
movne \irqstat, \tmp
|
|
||||||
addeq \irqnr, \irqnr, #2
|
|
||||||
|
|
||||||
movs \tmp, \irqstat, lsl #1
|
|
||||||
addeq \irqnr, \irqnr, #1
|
|
||||||
orrs \base, \base, #1
|
|
||||||
|
|
||||||
1002:
|
|
||||||
.endm
|
|
||||||
|
@ -11,8 +11,6 @@ static inline void arch_idle(void)
|
|||||||
|
|
||||||
static inline void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
local_irq_disable();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set then clear the SWRST bit to initiate a software reset
|
* Set then clear the SWRST bit to initiate a software reset
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-ep93xx/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xfe800000UL
|
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
@ -80,6 +81,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -91,6 +93,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -102,6 +105,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -113,6 +117,7 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = micro9_init_machine,
|
.init_machine = micro9_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <mach/fb.h>
|
#include <mach/fb.h>
|
||||||
#include <mach/gpio-ep93xx.h>
|
#include <mach/gpio-ep93xx.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
@ -80,6 +81,7 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = simone_init_machine,
|
.init_machine = simone_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <mach/fb.h>
|
#include <mach/fb.h>
|
||||||
#include <mach/gpio-ep93xx.h>
|
#include <mach/gpio-ep93xx.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
@ -177,6 +178,7 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ep93xx_map_io,
|
.map_io = ep93xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = snappercl15_init_machine,
|
.init_machine = snappercl15_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/ts72xx.h>
|
#include <mach/ts72xx.h>
|
||||||
|
|
||||||
|
#include <asm/hardware/vic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
@ -247,6 +248,7 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.map_io = ts72xx_map_io,
|
.map_io = ts72xx_map_io,
|
||||||
.init_irq = ep93xx_init_irq,
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.handle_irq = vic_handle_irq,
|
||||||
.timer = &ep93xx_timer,
|
.timer = &ep93xx_timer,
|
||||||
.init_machine = ts72xx_init_machine,
|
.init_machine = ts72xx_init_machine,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
|
#include <asm/exception.h>
|
||||||
#include <asm/hardware/cache-l2x0.h>
|
#include <asm/hardware/cache-l2x0.h>
|
||||||
#include <asm/hardware/gic.h>
|
#include <asm/hardware/gic.h>
|
||||||
|
|
||||||
@ -33,8 +34,6 @@
|
|||||||
#include <mach/regs-irq.h>
|
#include <mach/regs-irq.h>
|
||||||
#include <mach/regs-pmu.h>
|
#include <mach/regs-pmu.h>
|
||||||
|
|
||||||
unsigned int gic_bank_offset __read_mostly;
|
|
||||||
|
|
||||||
extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
|
extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
|
||||||
unsigned int irq_start);
|
unsigned int irq_start);
|
||||||
extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
|
extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
|
||||||
@ -207,27 +206,14 @@ void __init exynos4_init_clocks(int xtal)
|
|||||||
exynos4_setup_clocks();
|
exynos4_setup_clocks();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exynos4_gic_irq_fix_base(struct irq_data *d)
|
|
||||||
{
|
|
||||||
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
|
|
||||||
|
|
||||||
gic_data->cpu_base = S5P_VA_GIC_CPU +
|
|
||||||
(gic_bank_offset * smp_processor_id());
|
|
||||||
|
|
||||||
gic_data->dist_base = S5P_VA_GIC_DIST +
|
|
||||||
(gic_bank_offset * smp_processor_id());
|
|
||||||
}
|
|
||||||
|
|
||||||
void __init exynos4_init_irq(void)
|
void __init exynos4_init_irq(void)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
|
unsigned int gic_bank_offset;
|
||||||
|
|
||||||
gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
|
gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
|
||||||
|
|
||||||
gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU);
|
gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset);
|
||||||
gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base;
|
|
||||||
gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base;
|
|
||||||
gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base;
|
|
||||||
|
|
||||||
for (irq = 0; irq < MAX_COMBINER_NR; irq++) {
|
for (irq = 0; irq < MAX_COMBINER_NR; irq++) {
|
||||||
|
|
||||||
|
@ -9,83 +9,8 @@
|
|||||||
* warranty of any kind, whether express or implied.
|
* warranty of any kind, whether express or implied.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
|
||||||
#include <mach/map.h>
|
|
||||||
#include <asm/hardware/gic.h>
|
|
||||||
|
|
||||||
.macro disable_fiq
|
.macro disable_fiq
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_irqnr_preamble, base, tmp
|
|
||||||
mov \tmp, #0
|
|
||||||
|
|
||||||
mrc p15, 0, \base, c0, c0, 5
|
|
||||||
and \base, \base, #3
|
|
||||||
cmp \base, #0
|
|
||||||
beq 1f
|
|
||||||
|
|
||||||
ldr \tmp, =gic_bank_offset
|
|
||||||
ldr \tmp, [\tmp]
|
|
||||||
cmp \base, #1
|
|
||||||
beq 1f
|
|
||||||
|
|
||||||
cmp \base, #2
|
|
||||||
addeq \tmp, \tmp, \tmp
|
|
||||||
addne \tmp, \tmp, \tmp, LSL #1
|
|
||||||
|
|
||||||
1: ldr \base, =gic_cpu_base_addr
|
|
||||||
ldr \base, [\base]
|
|
||||||
add \base, \base, \tmp
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro arch_ret_to_user, tmp1, tmp2
|
.macro arch_ret_to_user, tmp1, tmp2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*
|
|
||||||
* The interrupt numbering scheme is defined in the
|
|
||||||
* interrupt controller spec. To wit:
|
|
||||||
*
|
|
||||||
* Interrupts 0-15 are IPI
|
|
||||||
* 16-28 are reserved
|
|
||||||
* 29-31 are local. We allow 30 to be used for the watchdog.
|
|
||||||
* 32-1020 are global
|
|
||||||
* 1021-1022 are reserved
|
|
||||||
* 1023 is "spurious" (no interrupt)
|
|
||||||
*
|
|
||||||
* For now, we ignore all local interrupts so only return an interrupt if it's
|
|
||||||
* between 30 and 1020. The test_for_ipi routine below will pick up on IPIs.
|
|
||||||
*
|
|
||||||
* A simple read from the controller will tell us the number of the highest
|
|
||||||
* priority enabled interrupt. We then just need to check whether it is in the
|
|
||||||
* valid range for an IRQ (30-1020 inclusive).
|
|
||||||
*/
|
|
||||||
|
|
||||||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
||||||
|
|
||||||
ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */
|
|
||||||
|
|
||||||
ldr \tmp, =1021
|
|
||||||
|
|
||||||
bic \irqnr, \irqstat, #0x1c00
|
|
||||||
|
|
||||||
cmp \irqnr, #15
|
|
||||||
cmpcc \irqnr, \irqnr
|
|
||||||
cmpne \irqnr, \tmp
|
|
||||||
cmpcs \irqnr, \irqnr
|
|
||||||
addne \irqnr, \irqnr, #32
|
|
||||||
|
|
||||||
.endm
|
|
||||||
|
|
||||||
/* We assume that irqstat (the raw value of the IRQ acknowledge
|
|
||||||
* register) is preserved from the macro above.
|
|
||||||
* If there is an IPI, we immediately signal end of interrupt on the
|
|
||||||
* controller, since this requires the original irqstat value which
|
|
||||||
* we won't easily be able to recreate later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.macro test_for_ipi, irqnr, irqstat, base, tmp
|
|
||||||
bic \irqnr, \irqstat, #0x1c00
|
|
||||||
cmp \irqnr, #16
|
|
||||||
strcc \irqstat, [\base, #GIC_CPU_EOI]
|
|
||||||
cmpcs \irqnr, \irqnr
|
|
||||||
.endm
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
/* linux/arch/arm/mach-exynos4/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
|
||||||
* http://www.samsung.com
|
|
||||||
*
|
|
||||||
* Copyright 2010 Ben Dooks <ben-linux@fluff.org>
|
|
||||||
*
|
|
||||||
* Based on arch/arm/mach-s5p6440/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* EXYNOS4 vmalloc definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ASM_ARCH_VMALLOC_H
|
|
||||||
#define __ASM_ARCH_VMALLOC_H __FILE__
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xF6000000UL
|
|
||||||
|
|
||||||
#endif /* __ASM_ARCH_VMALLOC_H */
|
|
@ -16,6 +16,7 @@
|
|||||||
#include <linux/smsc911x.h>
|
#include <linux/smsc911x.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <plat/cpu.h>
|
#include <plat/cpu.h>
|
||||||
@ -210,6 +211,7 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = armlex4210_map_io,
|
.map_io = armlex4210_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = armlex4210_machine_init,
|
.init_machine = armlex4210_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <media/v4l2-mediabus.h>
|
#include <media/v4l2-mediabus.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <plat/adc.h>
|
#include <plat/adc.h>
|
||||||
@ -1333,6 +1334,7 @@ MACHINE_START(NURI, "NURI")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = nuri_map_io,
|
.map_io = nuri_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = nuri_machine_init,
|
.init_machine = nuri_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
.reserve = &nuri_reserve,
|
.reserve = &nuri_reserve,
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <linux/lcd.h>
|
#include <linux/lcd.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <video/platform_lcd.h>
|
#include <video/platform_lcd.h>
|
||||||
@ -694,6 +695,7 @@ MACHINE_START(ORIGEN, "ORIGEN")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = origen_map_io,
|
.map_io = origen_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = origen_machine_init,
|
.init_machine = origen_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
.reserve = &origen_reserve,
|
.reserve = &origen_reserve,
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <linux/serial_core.h>
|
#include <linux/serial_core.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <plat/backlight.h>
|
#include <plat/backlight.h>
|
||||||
@ -287,6 +288,7 @@ MACHINE_START(SMDK4212, "SMDK4212")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = smdk4x12_map_io,
|
.map_io = smdk4x12_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = smdk4x12_machine_init,
|
.init_machine = smdk4x12_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -297,6 +299,7 @@ MACHINE_START(SMDK4412, "SMDK4412")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = smdk4x12_map_io,
|
.map_io = smdk4x12_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = smdk4x12_machine_init,
|
.init_machine = smdk4x12_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <linux/pwm_backlight.h>
|
#include <linux/pwm_backlight.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <video/platform_lcd.h>
|
#include <video/platform_lcd.h>
|
||||||
@ -375,6 +376,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = smdkv310_map_io,
|
.map_io = smdkv310_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = smdkv310_machine_init,
|
.init_machine = smdkv310_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
.reserve = &smdkv310_reserve,
|
.reserve = &smdkv310_reserve,
|
||||||
@ -385,6 +387,7 @@ MACHINE_START(SMDKC210, "SMDKC210")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = smdkv310_map_io,
|
.map_io = smdkv310_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = smdkv310_machine_init,
|
.init_machine = smdkv310_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <linux/i2c/atmel_mxt_ts.h>
|
#include <linux/i2c/atmel_mxt_ts.h>
|
||||||
|
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <plat/regs-serial.h>
|
#include <plat/regs-serial.h>
|
||||||
@ -1058,6 +1059,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
|
|||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.init_irq = exynos4_init_irq,
|
.init_irq = exynos4_init_irq,
|
||||||
.map_io = universal_map_io,
|
.map_io = universal_map_io,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = universal_machine_init,
|
.init_machine = universal_machine_init,
|
||||||
.timer = &exynos4_timer,
|
.timer = &exynos4_timer,
|
||||||
.reserve = &universal_reserve,
|
.reserve = &universal_reserve,
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include <plat/cpu.h>
|
#include <plat/cpu.h>
|
||||||
|
|
||||||
extern unsigned int gic_bank_offset;
|
|
||||||
extern void exynos4_secondary_startup(void);
|
extern void exynos4_secondary_startup(void);
|
||||||
|
|
||||||
#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
|
#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
|
||||||
@ -65,31 +64,6 @@ static void __iomem *scu_base_addr(void)
|
|||||||
|
|
||||||
static DEFINE_SPINLOCK(boot_lock);
|
static DEFINE_SPINLOCK(boot_lock);
|
||||||
|
|
||||||
static void __cpuinit exynos4_gic_secondary_init(void)
|
|
||||||
{
|
|
||||||
void __iomem *dist_base = S5P_VA_GIC_DIST +
|
|
||||||
(gic_bank_offset * smp_processor_id());
|
|
||||||
void __iomem *cpu_base = S5P_VA_GIC_CPU +
|
|
||||||
(gic_bank_offset * smp_processor_id());
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Deal with the banked PPI and SGI interrupts - disable all
|
|
||||||
* PPI interrupts, ensure all SGI interrupts are enabled.
|
|
||||||
*/
|
|
||||||
__raw_writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR);
|
|
||||||
__raw_writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set priority on PPI and SGI interrupts
|
|
||||||
*/
|
|
||||||
for (i = 0; i < 32; i += 4)
|
|
||||||
__raw_writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4);
|
|
||||||
|
|
||||||
__raw_writel(0xf0, cpu_base + GIC_CPU_PRIMASK);
|
|
||||||
__raw_writel(1, cpu_base + GIC_CPU_CTRL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void __cpuinit platform_secondary_init(unsigned int cpu)
|
void __cpuinit platform_secondary_init(unsigned int cpu)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -97,7 +71,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
|
|||||||
* core (e.g. timer irq), then they will not have been enabled
|
* core (e.g. timer irq), then they will not have been enabled
|
||||||
* for us: do so
|
* for us: do so
|
||||||
*/
|
*/
|
||||||
exynos4_gic_secondary_init();
|
gic_secondary_init(0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* let the primary processor know we're out of the
|
* let the primary processor know we're out of the
|
||||||
|
@ -86,7 +86,7 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
|
|||||||
MACHINE_START(CATS, "Chalice-CATS")
|
MACHINE_START(CATS, "Chalice-CATS")
|
||||||
/* Maintainer: Philip Blundell */
|
/* Maintainer: Philip Blundell */
|
||||||
.atag_offset = 0x100,
|
.atag_offset = 0x100,
|
||||||
.soft_reboot = 1,
|
.restart_mode = 's',
|
||||||
.fixup = fixup_cats,
|
.fixup = fixup_cats,
|
||||||
.map_io = footbridge_map_io,
|
.map_io = footbridge_map_io,
|
||||||
.init_irq = footbridge_init_irq,
|
.init_irq = footbridge_init_irq,
|
||||||
|
@ -24,7 +24,7 @@ static inline void arch_reset(char mode, const char *cmd)
|
|||||||
/*
|
/*
|
||||||
* Jump into the ROM
|
* Jump into the ROM
|
||||||
*/
|
*/
|
||||||
cpu_reset(0x41000000);
|
soft_restart(0x41000000);
|
||||||
} else {
|
} else {
|
||||||
if (machine_is_netwinder()) {
|
if (machine_is_netwinder()) {
|
||||||
/* open up the SuperIO chip
|
/* open up the SuperIO chip
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-footbridge/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xf0000000UL
|
|
@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
|
|
||||||
*
|
|
||||||
* This program 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xf0000000UL
|
|
@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-h720x/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ARCH_ARM_VMALLOC_H
|
|
||||||
#define __ARCH_ARM_VMALLOC_H
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xd0000000UL
|
|
||||||
|
|
||||||
#endif
|
|
@ -144,6 +144,7 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
|
|||||||
.map_io = highbank_map_io,
|
.map_io = highbank_map_io,
|
||||||
.init_irq = highbank_init_irq,
|
.init_irq = highbank_init_irq,
|
||||||
.timer = &highbank_timer,
|
.timer = &highbank_timer,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = highbank_init,
|
.init_machine = highbank_init,
|
||||||
.dt_compat = highbank_match,
|
.dt_compat = highbank_match,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#include <asm/hardware/entry-macro-gic.S>
|
|
||||||
|
|
||||||
.macro disable_fiq
|
.macro disable_fiq
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
#define VMALLOC_END 0xFEE00000UL
|
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-integrator/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2000 Russell King.
|
|
||||||
*
|
|
||||||
* This program 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 program 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#define VMALLOC_END 0xd0000000UL
|
|
@ -1,4 +0,0 @@
|
|||||||
#ifndef _VMALLOC_H_
|
|
||||||
#define _VMALLOC_H_
|
|
||||||
#define VMALLOC_END 0xfa000000UL
|
|
||||||
#endif
|
|
@ -13,15 +13,8 @@
|
|||||||
|
|
||||||
#include <asm/hardware/iop3xx.h>
|
#include <asm/hardware/iop3xx.h>
|
||||||
|
|
||||||
extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
|
|
||||||
unsigned int mtype);
|
|
||||||
extern void __iop3xx_iounmap(void __iomem *addr);
|
|
||||||
|
|
||||||
#define IO_SPACE_LIMIT 0xffffffff
|
#define IO_SPACE_LIMIT 0xffffffff
|
||||||
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
|
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
|
||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
|
|
||||||
#define __arch_ioremap __iop3xx_ioremap
|
|
||||||
#define __arch_iounmap __iop3xx_iounmap
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,8 +18,6 @@ static inline void arch_idle(void)
|
|||||||
|
|
||||||
static inline void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
local_irq_disable();
|
|
||||||
|
|
||||||
if (machine_is_n2100()) {
|
if (machine_is_n2100()) {
|
||||||
gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
|
gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
|
||||||
gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
|
gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
|
||||||
@ -30,5 +28,5 @@ static inline void arch_reset(char mode, const char *cmd)
|
|||||||
*IOP3XX_PCSR = 0x30;
|
*IOP3XX_PCSR = 0x30;
|
||||||
|
|
||||||
/* Jump into ROM at address 0 */
|
/* Jump into ROM at address 0 */
|
||||||
cpu_reset(0);
|
soft_restart(0);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-iop32x/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xfe000000UL
|
|
@ -13,15 +13,8 @@
|
|||||||
|
|
||||||
#include <asm/hardware/iop3xx.h>
|
#include <asm/hardware/iop3xx.h>
|
||||||
|
|
||||||
extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
|
|
||||||
unsigned int mtype);
|
|
||||||
extern void __iop3xx_iounmap(void __iomem *addr);
|
|
||||||
|
|
||||||
#define IO_SPACE_LIMIT 0xffffffff
|
#define IO_SPACE_LIMIT 0xffffffff
|
||||||
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
|
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
|
||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
|
|
||||||
#define __arch_ioremap __iop3xx_ioremap
|
|
||||||
#define __arch_iounmap __iop3xx_iounmap
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,5 +19,5 @@ static inline void arch_reset(char mode, const char *cmd)
|
|||||||
*IOP3XX_PCSR = 0x30;
|
*IOP3XX_PCSR = 0x30;
|
||||||
|
|
||||||
/* Jump into ROM at address 0 */
|
/* Jump into ROM at address 0 */
|
||||||
cpu_reset(0);
|
soft_restart(0);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-iop33x/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xfe000000UL
|
|
@ -19,8 +19,6 @@ static inline void arch_idle(void)
|
|||||||
|
|
||||||
static inline void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
local_irq_disable();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset flash banking register so that we are pointing at
|
* Reset flash banking register so that we are pointing at
|
||||||
* RedBoot bank.
|
* RedBoot bank.
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-ixp2000/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Author: Naeem Afzal <naeem.m.afzal@intel.com>
|
|
||||||
*
|
|
||||||
* Copyright 2002 Intel Corp.
|
|
||||||
*
|
|
||||||
* This program 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.
|
|
||||||
*
|
|
||||||
* Just any arbitrary offset to the start of the vmalloc VM area: the
|
|
||||||
* current 8MB value just means that there will be a 8MB "hole" after the
|
|
||||||
* physical memory until the kernel virtual memory starts. That means that
|
|
||||||
* any out-of-bounds memory accesses will hopefully be caught.
|
|
||||||
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
|
|
||||||
* area for the same reason. ;)
|
|
||||||
*/
|
|
||||||
#define VMALLOC_END 0xfb000000UL
|
|
@ -20,33 +20,4 @@
|
|||||||
#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
|
#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
|
||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
|
|
||||||
static inline void __iomem *
|
|
||||||
ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype)
|
|
||||||
{
|
|
||||||
if (addr >= IXP23XX_PCI_MEM_START &&
|
|
||||||
addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) {
|
|
||||||
if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return (void __iomem *)
|
|
||||||
((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return __arm_ioremap(addr, size, mtype);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
ixp23xx_iounmap(void __iomem *addr)
|
|
||||||
{
|
|
||||||
if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) &&
|
|
||||||
(((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE))
|
|
||||||
return;
|
|
||||||
|
|
||||||
__iounmap(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define __arch_ioremap ixp23xx_ioremap
|
|
||||||
#define __arch_iounmap ixp23xx_iounmap
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-ixp23xx/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (c) 2005 MontaVista Software, Inc.
|
|
||||||
*
|
|
||||||
* NPU mappings end at 0xf0000000 and we allocate 64MB for board
|
|
||||||
* specific static I/O.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END (0xec000000UL)
|
|
@ -26,7 +26,7 @@ static inline void arch_reset(char mode, const char *cmd)
|
|||||||
{
|
{
|
||||||
if ( 1 && mode == 's') {
|
if ( 1 && mode == 's') {
|
||||||
/* Jump into ROM at address 0 */
|
/* Jump into ROM at address 0 */
|
||||||
cpu_reset(0);
|
soft_restart(0);
|
||||||
} else {
|
} else {
|
||||||
/* Use on-chip reset capability */
|
/* Use on-chip reset capability */
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-ixp4xx/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
#define VMALLOC_END (0xff000000UL)
|
|
||||||
|
|
@ -19,31 +19,6 @@ static inline void __iomem *__io(unsigned long addr)
|
|||||||
+ KIRKWOOD_PCIE_IO_VIRT_BASE);
|
+ KIRKWOOD_PCIE_IO_VIRT_BASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __iomem *
|
|
||||||
__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
|
|
||||||
{
|
|
||||||
void __iomem *retval;
|
|
||||||
unsigned long offs = paddr - KIRKWOOD_REGS_PHYS_BASE;
|
|
||||||
if (mtype == MT_DEVICE && size && offs < KIRKWOOD_REGS_SIZE &&
|
|
||||||
size <= KIRKWOOD_REGS_SIZE && offs + size <= KIRKWOOD_REGS_SIZE) {
|
|
||||||
retval = (void __iomem *)KIRKWOOD_REGS_VIRT_BASE + offs;
|
|
||||||
} else {
|
|
||||||
retval = __arm_ioremap(paddr, size, mtype);
|
|
||||||
}
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
__arch_iounmap(void __iomem *addr)
|
|
||||||
{
|
|
||||||
if (addr < (void __iomem *)KIRKWOOD_REGS_VIRT_BASE ||
|
|
||||||
addr >= (void __iomem *)(KIRKWOOD_REGS_VIRT_BASE + KIRKWOOD_REGS_SIZE))
|
|
||||||
__iounmap(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define __arch_ioremap __arch_ioremap
|
|
||||||
#define __arch_iounmap __arch_iounmap
|
|
||||||
#define __io(a) __io(a)
|
#define __io(a) __io(a)
|
||||||
#define __mem_pci(a) (a)
|
#define __mem_pci(a) (a)
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-kirkwood/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xfe800000UL
|
|
@ -32,7 +32,7 @@ static void arch_reset(char mode, const char *cmd)
|
|||||||
unsigned int reg;
|
unsigned int reg;
|
||||||
|
|
||||||
if (mode == 's')
|
if (mode == 's')
|
||||||
cpu_reset(0);
|
soft_restart(0);
|
||||||
|
|
||||||
/* disable timer0 */
|
/* disable timer0 */
|
||||||
reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
|
reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-ks8695/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Ben Dooks
|
|
||||||
* Copyright (C) 2006 Simtec Electronics <linux@simtec.co.uk>
|
|
||||||
*
|
|
||||||
* KS8695 vmalloc definition
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ASM_ARCH_VMALLOC_H
|
|
||||||
#define __ASM_ARCH_VMALLOC_H
|
|
||||||
|
|
||||||
#define VMALLOC_END (KS8695_IO_VA & PGDIR_MASK)
|
|
||||||
|
|
||||||
#endif
|
|
@ -33,9 +33,6 @@ static inline void arch_reset(char mode, const char *cmd)
|
|||||||
case 'h':
|
case 'h':
|
||||||
printk(KERN_CRIT "RESET: Rebooting system\n");
|
printk(KERN_CRIT "RESET: Rebooting system\n");
|
||||||
|
|
||||||
/* Disable interrupts */
|
|
||||||
local_irq_disable();
|
|
||||||
|
|
||||||
lpc32xx_watchdog_reset();
|
lpc32xx_watchdog_reset();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* arch/arm/mach-lpc32xx/include/mach/vmalloc.h
|
|
||||||
*
|
|
||||||
* Author: Kevin Wells <kevin.wells@nxp.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2010 NXP Semiconductors
|
|
||||||
*
|
|
||||||
* This program 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 program 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ASM_ARCH_VMALLOC_H
|
|
||||||
#define __ASM_ARCH_VMALLOC_H
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xF0000000UL
|
|
||||||
|
|
||||||
#endif
|
|
@ -19,8 +19,8 @@ static inline void arch_idle(void)
|
|||||||
static inline void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
if (cpu_is_pxa168())
|
if (cpu_is_pxa168())
|
||||||
cpu_reset(0xffff0000);
|
soft_restart(0xffff0000);
|
||||||
else
|
else
|
||||||
cpu_reset(0);
|
soft_restart(0);
|
||||||
}
|
}
|
||||||
#endif /* __ASM_MACH_SYSTEM_H */
|
#endif /* __ASM_MACH_SYSTEM_H */
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/arm/mach-mmp/include/mach/vmalloc.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define VMALLOC_END 0xfe000000UL
|
|
@ -99,6 +99,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
|
|||||||
.map_io = msm8960_map_io,
|
.map_io = msm8960_map_io,
|
||||||
.init_irq = msm8960_init_irq,
|
.init_irq = msm8960_init_irq,
|
||||||
.timer = &msm_timer,
|
.timer = &msm_timer,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = msm8960_sim_init,
|
.init_machine = msm8960_sim_init,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
|
|||||||
.map_io = msm8960_map_io,
|
.map_io = msm8960_map_io,
|
||||||
.init_irq = msm8960_init_irq,
|
.init_irq = msm8960_init_irq,
|
||||||
.timer = &msm_timer,
|
.timer = &msm_timer,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = msm8960_rumi3_init,
|
.init_machine = msm8960_rumi3_init,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
|
|||||||
.reserve = msm8x60_reserve,
|
.reserve = msm8x60_reserve,
|
||||||
.map_io = msm8x60_map_io,
|
.map_io = msm8x60_map_io,
|
||||||
.init_irq = msm8x60_init_irq,
|
.init_irq = msm8x60_init_irq,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = msm8x60_init,
|
.init_machine = msm8x60_init,
|
||||||
.timer = &msm_timer,
|
.timer = &msm_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -117,6 +118,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
|
|||||||
.reserve = msm8x60_reserve,
|
.reserve = msm8x60_reserve,
|
||||||
.map_io = msm8x60_map_io,
|
.map_io = msm8x60_map_io,
|
||||||
.init_irq = msm8x60_init_irq,
|
.init_irq = msm8x60_init_irq,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = msm8x60_init,
|
.init_machine = msm8x60_init,
|
||||||
.timer = &msm_timer,
|
.timer = &msm_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -126,6 +128,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
|
|||||||
.reserve = msm8x60_reserve,
|
.reserve = msm8x60_reserve,
|
||||||
.map_io = msm8x60_map_io,
|
.map_io = msm8x60_map_io,
|
||||||
.init_irq = msm8x60_init_irq,
|
.init_irq = msm8x60_init_irq,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = msm8x60_init,
|
.init_machine = msm8x60_init,
|
||||||
.timer = &msm_timer,
|
.timer = &msm_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
@ -135,6 +138,7 @@ MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
|
|||||||
.reserve = msm8x60_reserve,
|
.reserve = msm8x60_reserve,
|
||||||
.map_io = msm8x60_map_io,
|
.map_io = msm8x60_map_io,
|
||||||
.init_irq = msm8x60_init_irq,
|
.init_irq = msm8x60_init_irq,
|
||||||
|
.handle_irq = gic_handle_irq,
|
||||||
.init_machine = msm8x60_init,
|
.init_machine = msm8x60_init,
|
||||||
.timer = &msm_timer,
|
.timer = &msm_timer,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Low-level IRQ helper macros
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
|
|
||||||
*
|
|
||||||
* This file is licensed under the terms of the GNU General Public
|
|
||||||
* License version 2. This program is licensed "as is" without any
|
|
||||||
* warranty of any kind, whether express or implied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm/hardware/entry-macro-gic.S>
|
|
||||||
|
|
||||||
.macro disable_fiq
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro arch_ret_to_user, tmp1, tmp2
|
|
||||||
.endm
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user