From 847eb1880d54d347a49a8adc1fa62cdd31344042 Mon Sep 17 00:00:00 2001 From: Dirk Behme Date: Fri, 6 Oct 2006 15:48:09 +0300 Subject: [PATCH] [PATCH] ARM: OMAP: Make OMAP1 work again In mach-omap1/mailbox.c the mailbox name is .name = "DSP" while in plat-omap/dsp/dsp_core.c function dsp_mbox_init() asks for "dsp". This results in a strcmp() mismatch and then OMAP1 system crashes due to NULL pointer. OMAP2 is correct, there .name is "dsp". Correct OMAP1 name to "dsp" as well. Signed-off-by: Dirk Behme Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/mailbox.c | 2 +- arch/arm/oprofile/op_model_v6.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c index dfcca2e6cd1..e13382fa0ca 100644 --- a/arch/arm/mach-omap1/mailbox.c +++ b/arch/arm/mach-omap1/mailbox.c @@ -136,7 +136,7 @@ static struct omap_mbox1_priv omap1_mbox_dsp_priv = { }; struct omap_mbox mbox_dsp_info = { - .name = "DSP", + .name = "dsp", .ops = &omap1_mbox_ops, .priv = &omap1_mbox_dsp_priv, }; diff --git a/arch/arm/oprofile/op_model_v6.c b/arch/arm/oprofile/op_model_v6.c index 55279db7954..63f3818bd6e 100644 --- a/arch/arm/oprofile/op_model_v6.c +++ b/arch/arm/oprofile/op_model_v6.c @@ -96,9 +96,9 @@ static struct pmu_type pmu_parms[] = { .interrupt = -1, #endif .int_mask = { [PMN0] = 0x10, [PMN1] = 0x20, - [CCNT] = 0x40 }, + [CCNT] = 0x40 }, .cnt_ovf = { [CCNT] = 0x400, [PMN0] = 0x100, - [PMN1] = 0x200}, + [PMN1] = 0x200}, }, }; @@ -164,7 +164,8 @@ static int arm11_setup_ctrs(void) counter_config[i].event = EVT_UNUSED; } - pmnc = (counter_config[PMN1].event << 20) | (counter_config[PMN0].event << 12); + pmnc = (counter_config[PMN1].event << 20) + | (counter_config[PMN0].event << 12); pr_debug("arm11_setup_ctrs: pmnc: %#08x\n", pmnc); write_pmnc(pmnc); @@ -242,11 +243,11 @@ static int arm11_pmu_start(void) u32 pmnc = read_pmnc(); if (pmu->interrupt >= 0) { - ret = request_irq(pmu->interrupt, arm11_pmu_interrupt, IRQF_DISABLED, - "ARM11 PMU", (void *)results); + ret = request_irq(pmu->interrupt, arm11_pmu_interrupt, + IRQF_DISABLED, "ARM11 PMU", (void *)results); if (ret < 0) { - printk(KERN_ERR "oprofile: unable to request IRQ%d for ARM11 PMU\n", - pmu->interrupt); + printk(KERN_ERR "oprofile: unable to request IRQ%d " + "for ARM11 PMU\n", pmu->interrupt); return ret; } @@ -255,7 +256,8 @@ static int arm11_pmu_start(void) pmnc |= PMU_ENABLE; write_pmnc(pmnc); - pr_debug("arm11_pmu_start: pmnc: %#08x mask: %08x\n", pmnc, pmu->int_enable); + pr_debug("arm11_pmu_start: pmnc: %#08x mask: %08x\n", + pmnc, pmu->int_enable); return 0; } -- 2.41.1