Skip to content

Commit

Permalink
mfd: Move to the new db500 PRCMU API
Browse files Browse the repository at this point in the history
Now that we have a shared API between the DB8500 and DB5500
PRCMU's, switch to using this neutral API instead. We delete the
parts of db8500-prcmu.h that is now PRCMU-neutral, and calls will
be diverted to respective driver. Common registers are in
dbx500-prcmu-regs.h and common accessors and defines in
<linux/mfd/dbx500-prcmu.h> This way we get a a lot more
abstraction and code reuse.

Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Mattias Nilsson authored and Samuel Ortiz committed Oct 24, 2011
1 parent fea799e commit 73180f8
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 456 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-ux500/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void __init ux500_init_irq(void)
if (cpu_is_u5500())
db5500_prcmu_early_init();
if (cpu_is_u8500())
prcmu_early_init();
db8500_prcmu_early_init();
clk_init();
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/db8500-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <linux/cpufreq.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/mfd/db8500-prcmu.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <mach/id.h>

static struct cpufreq_frequency_table freq_table[] = {
Expand Down
115 changes: 0 additions & 115 deletions drivers/mfd/db5500-prcmu-regs.h

This file was deleted.

22 changes: 11 additions & 11 deletions drivers/mfd/db5500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <linux/jiffies.h>
#include <linux/bitops.h>
#include <linux/interrupt.h>
#include <linux/mfd/db5500-prcmu.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/db5500-regs.h>
#include "db5500-prcmu-regs.h"
#include "dbx500-prcmu-regs.h"

#define _PRCM_MB_HEADER (tcdm_base + 0xFE8)
#define PRCM_REQ_MB0_HEADER (_PRCM_MB_HEADER + 0x0)
Expand Down Expand Up @@ -315,31 +315,31 @@ static bool read_mailbox_0(void)
r = false;
break;
}
writel(MBOX_BIT(0), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(0), PRCM_ARM_IT1_CLR);
return r;
}

static bool read_mailbox_1(void)
{
writel(MBOX_BIT(1), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(1), PRCM_ARM_IT1_CLR);
return false;
}

static bool read_mailbox_2(void)
{
writel(MBOX_BIT(2), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(2), PRCM_ARM_IT1_CLR);
return false;
}

static bool read_mailbox_3(void)
{
writel(MBOX_BIT(3), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(3), PRCM_ARM_IT1_CLR);
return false;
}

static bool read_mailbox_4(void)
{
writel(MBOX_BIT(4), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(4), PRCM_ARM_IT1_CLR);
return false;
}

Expand All @@ -360,19 +360,19 @@ static bool read_mailbox_5(void)
print_unknown_header_warning(5, header);
break;
}
writel(MBOX_BIT(5), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(5), PRCM_ARM_IT1_CLR);
return false;
}

static bool read_mailbox_6(void)
{
writel(MBOX_BIT(6), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(6), PRCM_ARM_IT1_CLR);
return false;
}

static bool read_mailbox_7(void)
{
writel(MBOX_BIT(7), PRCM_ARM_IT1_CLEAR);
writel(MBOX_BIT(7), PRCM_ARM_IT1_CLR);
return false;
}

Expand Down Expand Up @@ -434,7 +434,7 @@ int __init db5500_prcmu_init(void)
return -ENODEV;

/* Clean up the mailbox interrupts after pre-kernel code. */
writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLEAR);
writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);

r = request_threaded_irq(IRQ_DB5500_PRCMU1, prcmu_irq_handler,
prcmu_irq_thread_fn, 0, "prcmu", NULL);
Expand Down
Loading

0 comments on commit 73180f8

Please sign in to comment.