Skip to content

Commit

Permalink
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Browse files Browse the repository at this point in the history
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (65 commits)
  ARM: 6826/1: Merge v6 and v7 DEBUG_LL DCC support
  ARM: 6838/1: etm: fix section mismatch warning
  ARM: 6837/1: remove unused pci_fixup_prpmc1100
  ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC
  Fix the broken build for Marvell Dove platform.
  ARM: 6835/1: perf: ensure overflows aren't missed due to IRQ latency
  ARM: 6834/1: perf: reset counters on all CPUs during initialisation
  ARM: 6833/1: perf: add required isbs() to ARMv7 backend
  ARM: 6825/1: kernel/sleep.S: fix Thumb2 compilation issues
  ARM: 6807/1: realview: Fix secondary GIC initialisation for EB with MPCore tile
  arm: mach-mx3: pcm043: add write-protect and card-detect for SD1
  eukrea_mbimxsd51: add SD Card detect
  eukrea_mbimxsd25-baseboard: add SD card detect
  mx3/eukrea_mbimxsd-baseboard: add SD card detect support
  mx3/eukrea_mbimxsd-baseboard: fix gpio request
  ARM: mxs/mx28evk: add mmc device
  ARM: mxs/mx23evk: add mmc device
  ARM: mxs: dynamically allocate mmc device
  ARM: mx51_efika: update platform data for new mfd changes
  mx2/iomux: Set direction for CSPI2 pins
  ...
  • Loading branch information
torvalds committed Mar 30, 2011
2 parents e122996 + b43d151 commit 85eb151
Show file tree
Hide file tree
Showing 101 changed files with 1,196 additions and 689 deletions.
1 change: 1 addition & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ config ARCH_MXC
select GENERIC_CLOCKEVENTS
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
select HAVE_SCHED_CLOCK
help
Support for Freescale MXC/iMX-based family of processors

Expand Down
10 changes: 1 addition & 9 deletions arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@

#if defined(CONFIG_DEBUG_ICEDCC)

#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
.macro loadsp, rb, tmp
.endm
.macro writeb, ch, rb
mcr p14, 0, \ch, c0, c5, 0
.endm
#elif defined(CONFIG_CPU_V7)
.macro loadsp, rb, tmp
.endm
.macro writeb, ch, rb
wait: mrc p14, 0, pc, c0, c1, 0
bcs wait
mcr p14, 0, \ch, c0, c5, 0
.endm
#elif defined(CONFIG_CPU_XSCALE)
.macro loadsp, rb, tmp
.endm
Expand Down
12 changes: 1 addition & 11 deletions arch/arm/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern void error(char *x);

#ifdef CONFIG_DEBUG_ICEDCC

#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)

static void icedcc_putc(int ch)
{
Expand All @@ -52,16 +52,6 @@ static void icedcc_putc(int ch)
asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
}

#elif defined(CONFIG_CPU_V7)

static void icedcc_putc(int ch)
{
asm(
"wait: mrc p14, 0, pc, c0, c1, 0 \n\
bcs wait \n\
mcr p14, 0, %0, c0, c5, 0 "
: : "r" (ch));
}

#elif defined(CONFIG_CPU_XSCALE)

Expand Down
2 changes: 0 additions & 2 deletions arch/arm/include/asm/mach/udc_pxa2xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ struct pxa2xx_udc_mach_info {
* VBUS IRQ and omit the methods above. Store the GPIO number
* here. Note that sometimes the signals go through inverters...
*/
bool gpio_vbus_inverted;
int gpio_vbus; /* high == vbus present */
bool gpio_pullup_inverted;
int gpio_pullup; /* high == pullup activated */
};
Expand Down
19 changes: 1 addition & 18 deletions arch/arm/kernel/debug.S
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.macro addruart, rp, rv
.endm

#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)

.macro senduart, rd, rx
mcr p14, 0, \rd, c0, c5, 0
Expand All @@ -49,23 +49,6 @@
1002:
.endm

#elif defined(CONFIG_CPU_V7)

.macro senduart, rd, rx
mcr p14, 0, \rd, c0, c5, 0
.endm

.macro busyuart, rd, rx
busy: mrc p14, 0, pc, c0, c1, 0
bcs busy
.endm

.macro waituart, rd, rx
wait: mrc p14, 0, pc, c0, c1, 0
bcs wait

.endm

#elif defined(CONFIG_CPU_XSCALE)

.macro senduart, rd, rx
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kernel/etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = {
.fops = &etb_fops,
};

static int __init etb_probe(struct amba_device *dev, const struct amba_id *id)
static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id)
{
struct tracectx *t = &tracer;
int ret = 0;
Expand Down Expand Up @@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj,
static struct kobj_attribute trace_mode_attr =
__ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store);

static int __init etm_probe(struct amba_device *dev, const struct amba_id *id)
static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id)
{
struct tracectx *t = &tracer;
int ret = 0;
Expand Down
10 changes: 6 additions & 4 deletions arch/arm/kernel/kprobes-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,8 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs)
long cpsr = regs->ARM_cpsr;

fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn);
regs->uregs[rn] = fnr.r0; /* Save Rn in case of writeback. */
if (rn != 15)
regs->uregs[rn] = fnr.r0; /* Save Rn in case of writeback. */
rdv = fnr.r1;

if (rd == 15) {
Expand Down Expand Up @@ -622,10 +623,11 @@ static void __kprobes emulate_str(struct kprobe *p, struct pt_regs *regs)
long rdv = (rd == 15) ? iaddr + str_pc_offset : regs->uregs[rd];
long rnv = (rn == 15) ? iaddr + 8 : regs->uregs[rn];
long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */
long rnv_wb;

/* Save Rn in case of writeback. */
regs->uregs[rn] =
insnslot_3arg_rflags(rnv, rdv, rmv, regs->ARM_cpsr, i_fn);
rnv_wb = insnslot_3arg_rflags(rnv, rdv, rmv, regs->ARM_cpsr, i_fn);
if (rn != 15)
regs->uregs[rn] = rnv_wb; /* Save Rn in case of writeback. */
}

static void __kprobes emulate_mrrc(struct kprobe *p, struct pt_regs *regs)
Expand Down
33 changes: 25 additions & 8 deletions arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct arm_pmu {
void (*write_counter)(int idx, u32 val);
void (*start)(void);
void (*stop)(void);
void (*reset)(void *);
const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX]
[PERF_COUNT_HW_CACHE_OP_MAX]
[PERF_COUNT_HW_CACHE_RESULT_MAX];
Expand Down Expand Up @@ -204,11 +205,9 @@ armpmu_event_set_period(struct perf_event *event,
static u64
armpmu_event_update(struct perf_event *event,
struct hw_perf_event *hwc,
int idx)
int idx, int overflow)
{
int shift = 64 - 32;
s64 prev_raw_count, new_raw_count;
u64 delta;
u64 delta, prev_raw_count, new_raw_count;

again:
prev_raw_count = local64_read(&hwc->prev_count);
Expand All @@ -218,8 +217,13 @@ armpmu_event_update(struct perf_event *event,
new_raw_count) != prev_raw_count)
goto again;

delta = (new_raw_count << shift) - (prev_raw_count << shift);
delta >>= shift;
new_raw_count &= armpmu->max_period;
prev_raw_count &= armpmu->max_period;

if (overflow)
delta = armpmu->max_period - prev_raw_count + new_raw_count;
else
delta = new_raw_count - prev_raw_count;

local64_add(delta, &event->count);
local64_sub(delta, &hwc->period_left);
Expand All @@ -236,7 +240,7 @@ armpmu_read(struct perf_event *event)
if (hwc->idx < 0)
return;

armpmu_event_update(event, hwc, hwc->idx);
armpmu_event_update(event, hwc, hwc->idx, 0);
}

static void
Expand All @@ -254,7 +258,7 @@ armpmu_stop(struct perf_event *event, int flags)
if (!(hwc->state & PERF_HES_STOPPED)) {
armpmu->disable(hwc, hwc->idx);
barrier(); /* why? */
armpmu_event_update(event, hwc, hwc->idx);
armpmu_event_update(event, hwc, hwc->idx, 0);
hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
}
}
Expand Down Expand Up @@ -624,6 +628,19 @@ static struct pmu pmu = {
#include "perf_event_v6.c"
#include "perf_event_v7.c"

/*
* Ensure the PMU has sane values out of reset.
* This requires SMP to be available, so exists as a separate initcall.
*/
static int __init
armpmu_reset(void)
{
if (armpmu && armpmu->reset)
return on_each_cpu(armpmu->reset, NULL, 1);
return 0;
}
arch_initcall(armpmu_reset);

static int __init
init_hw_perf_events(void)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/perf_event_v6.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ armv6pmu_handle_irq(int irq_num,
continue;

hwc = &event->hw;
armpmu_event_update(event, hwc, idx);
armpmu_event_update(event, hwc, idx, 1);
data.period = event->hw.last_period;
if (!armpmu_event_set_period(event, hwc, idx))
continue;
Expand Down
26 changes: 19 additions & 7 deletions arch/arm/kernel/perf_event_v7.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ static inline unsigned long armv7_pmnc_read(void)
static inline void armv7_pmnc_write(unsigned long val)
{
val &= ARMV7_PMNC_MASK;
isb();
asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(val));
}

Expand Down Expand Up @@ -502,6 +503,7 @@ static inline int armv7_pmnc_select_counter(unsigned int idx)

val = (idx - ARMV7_EVENT_CNT_TO_CNTx) & ARMV7_SELECT_MASK;
asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val));
isb();

return idx;
}
Expand Down Expand Up @@ -780,7 +782,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
continue;

hwc = &event->hw;
armpmu_event_update(event, hwc, idx);
armpmu_event_update(event, hwc, idx, 1);
data.period = event->hw.last_period;
if (!armpmu_event_set_period(event, hwc, idx))
continue;
Expand Down Expand Up @@ -847,6 +849,18 @@ static int armv7pmu_get_event_idx(struct cpu_hw_events *cpuc,
}
}

static void armv7pmu_reset(void *info)
{
u32 idx, nb_cnt = armpmu->num_events;

/* The counter and interrupt enable registers are unknown at reset. */
for (idx = 1; idx < nb_cnt; ++idx)
armv7pmu_disable_event(NULL, idx);

/* Initialize & Reset PMNC: C and P bits */
armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C);
}

static struct arm_pmu armv7pmu = {
.handle_irq = armv7pmu_handle_irq,
.enable = armv7pmu_enable_event,
Expand All @@ -856,17 +870,15 @@ static struct arm_pmu armv7pmu = {
.get_event_idx = armv7pmu_get_event_idx,
.start = armv7pmu_start,
.stop = armv7pmu_stop,
.reset = armv7pmu_reset,
.raw_event_mask = 0xFF,
.max_period = (1LLU << 32) - 1,
};

static u32 __init armv7_reset_read_pmnc(void)
static u32 __init armv7_read_num_pmnc_events(void)
{
u32 nb_cnt;

/* Initialize & Reset PMNC: C and P bits */
armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C);

/* Read the nb of CNTx counters supported from PMNC */
nb_cnt = (armv7_pmnc_read() >> ARMV7_PMNC_N_SHIFT) & ARMV7_PMNC_N_MASK;

Expand All @@ -880,7 +892,7 @@ static const struct arm_pmu *__init armv7_a8_pmu_init(void)
armv7pmu.name = "ARMv7 Cortex-A8";
armv7pmu.cache_map = &armv7_a8_perf_cache_map;
armv7pmu.event_map = &armv7_a8_perf_map;
armv7pmu.num_events = armv7_reset_read_pmnc();
armv7pmu.num_events = armv7_read_num_pmnc_events();
return &armv7pmu;
}

Expand All @@ -890,7 +902,7 @@ static const struct arm_pmu *__init armv7_a9_pmu_init(void)
armv7pmu.name = "ARMv7 Cortex-A9";
armv7pmu.cache_map = &armv7_a9_perf_cache_map;
armv7pmu.event_map = &armv7_a9_perf_map;
armv7pmu.num_events = armv7_reset_read_pmnc();
armv7pmu.num_events = armv7_read_num_pmnc_events();
return &armv7pmu;
}
#else
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kernel/perf_event_xscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ xscale1pmu_handle_irq(int irq_num, void *dev)
continue;

hwc = &event->hw;
armpmu_event_update(event, hwc, idx);
armpmu_event_update(event, hwc, idx, 1);
data.period = event->hw.last_period;
if (!armpmu_event_set_period(event, hwc, idx))
continue;
Expand Down Expand Up @@ -578,7 +578,7 @@ xscale2pmu_handle_irq(int irq_num, void *dev)
continue;

hwc = &event->hw;
armpmu_event_update(event, hwc, idx);
armpmu_event_update(event, hwc, idx, 1);
data.period = event->hw.last_period;
if (!armpmu_event_set_period(event, hwc, idx))
continue;
Expand Down
14 changes: 11 additions & 3 deletions arch/arm/kernel/sleep.S
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,19 @@ ENTRY(cpu_resume)
#else
ldr r0, sleep_save_sp @ stack phys addr
#endif
msr cpsr_c, #PSR_I_BIT | PSR_F_BIT | SVC_MODE @ set SVC, irqs off
setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off
#ifdef MULTI_CPU
ldmia r0!, {r1, sp, lr, pc} @ load v:p, stack, return fn, resume fn
@ load v:p, stack, return fn, resume fn
ARM( ldmia r0!, {r1, sp, lr, pc} )
THUMB( ldmia r0!, {r1, r2, r3, r4} )
THUMB( mov sp, r2 )
THUMB( mov lr, r3 )
THUMB( bx r4 )
#else
ldmia r0!, {r1, sp, lr} @ load v:p, stack, return fn
@ load v:p, stack, return fn
ARM( ldmia r0!, {r1, sp, lr} )
THUMB( ldmia r0!, {r1, r2, lr} )
THUMB( mov sp, r2 )
b cpu_do_resume
#endif
ENDPROC(cpu_resume)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-imx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ config MACH_IMX27_VISSTRIM_M10
bool "Vista Silicon i.MX27 Visstrim_m10"
select SOC_IMX27
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_MXC_EHCI
Expand Down
8 changes: 7 additions & 1 deletion arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <mach/mx25.h>
#include <mach/imx-uart.h>
#include <mach/audmux.h>
#include <mach/esdhc.h>

#include "devices-imx25.h"

Expand Down Expand Up @@ -242,6 +243,11 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = {
.flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE,
};

static struct esdhc_platform_data sd1_pdata = {
.cd_gpio = GPIO_SD1CD,
.wp_gpio = -EINVAL,
};

/*
* system init for baseboard usage. Will be called by cpuimx25 init.
*
Expand Down Expand Up @@ -275,7 +281,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

imx25_add_flexcan1(NULL);
imx25_add_sdhci_esdhc_imx(0, NULL);
imx25_add_sdhci_esdhc_imx(0, &sd1_pdata);

gpio_request(GPIO_LED1, "LED1");
gpio_direction_output(GPIO_LED1, 1);
Expand Down
Loading

0 comments on commit 85eb151

Please sign in to comment.