diff options
author | Mattias Nilsson <mattias.i.nilsson@stericsson.com> | 2011-08-12 04:28:10 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-24 08:09:18 -0400 |
commit | 73180f85f4ffbb66843f8248811b2ade29b22df2 (patch) | |
tree | 26b48bd3369e2f38d741bae92ceef25e8da35948 /drivers/mfd/db5500-prcmu.c | |
parent | fea799e3d3ab84ac675de7e48a13a79fb76b6e63 (diff) |
mfd: Move to the new db500 PRCMU API
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>
Diffstat (limited to 'drivers/mfd/db5500-prcmu.c')
-rw-r--r-- | drivers/mfd/db5500-prcmu.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mfd/db5500-prcmu.c b/drivers/mfd/db5500-prcmu.c index 9dbb3cab4a6f..dc215878835a 100644 --- a/drivers/mfd/db5500-prcmu.c +++ b/drivers/mfd/db5500-prcmu.c | |||
@@ -20,11 +20,11 @@ | |||
20 | #include <linux/jiffies.h> | 20 | #include <linux/jiffies.h> |
21 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/mfd/db5500-prcmu.h> | 23 | #include <linux/mfd/dbx500-prcmu.h> |
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/irqs.h> | 25 | #include <mach/irqs.h> |
26 | #include <mach/db5500-regs.h> | 26 | #include <mach/db5500-regs.h> |
27 | #include "db5500-prcmu-regs.h" | 27 | #include "dbx500-prcmu-regs.h" |
28 | 28 | ||
29 | #define _PRCM_MB_HEADER (tcdm_base + 0xFE8) | 29 | #define _PRCM_MB_HEADER (tcdm_base + 0xFE8) |
30 | #define PRCM_REQ_MB0_HEADER (_PRCM_MB_HEADER + 0x0) | 30 | #define PRCM_REQ_MB0_HEADER (_PRCM_MB_HEADER + 0x0) |
@@ -315,31 +315,31 @@ static bool read_mailbox_0(void) | |||
315 | r = false; | 315 | r = false; |
316 | break; | 316 | break; |
317 | } | 317 | } |
318 | writel(MBOX_BIT(0), PRCM_ARM_IT1_CLEAR); | 318 | writel(MBOX_BIT(0), PRCM_ARM_IT1_CLR); |
319 | return r; | 319 | return r; |
320 | } | 320 | } |
321 | 321 | ||
322 | static bool read_mailbox_1(void) | 322 | static bool read_mailbox_1(void) |
323 | { | 323 | { |
324 | writel(MBOX_BIT(1), PRCM_ARM_IT1_CLEAR); | 324 | writel(MBOX_BIT(1), PRCM_ARM_IT1_CLR); |
325 | return false; | 325 | return false; |
326 | } | 326 | } |
327 | 327 | ||
328 | static bool read_mailbox_2(void) | 328 | static bool read_mailbox_2(void) |
329 | { | 329 | { |
330 | writel(MBOX_BIT(2), PRCM_ARM_IT1_CLEAR); | 330 | writel(MBOX_BIT(2), PRCM_ARM_IT1_CLR); |
331 | return false; | 331 | return false; |
332 | } | 332 | } |
333 | 333 | ||
334 | static bool read_mailbox_3(void) | 334 | static bool read_mailbox_3(void) |
335 | { | 335 | { |
336 | writel(MBOX_BIT(3), PRCM_ARM_IT1_CLEAR); | 336 | writel(MBOX_BIT(3), PRCM_ARM_IT1_CLR); |
337 | return false; | 337 | return false; |
338 | } | 338 | } |
339 | 339 | ||
340 | static bool read_mailbox_4(void) | 340 | static bool read_mailbox_4(void) |
341 | { | 341 | { |
342 | writel(MBOX_BIT(4), PRCM_ARM_IT1_CLEAR); | 342 | writel(MBOX_BIT(4), PRCM_ARM_IT1_CLR); |
343 | return false; | 343 | return false; |
344 | } | 344 | } |
345 | 345 | ||
@@ -360,19 +360,19 @@ static bool read_mailbox_5(void) | |||
360 | print_unknown_header_warning(5, header); | 360 | print_unknown_header_warning(5, header); |
361 | break; | 361 | break; |
362 | } | 362 | } |
363 | writel(MBOX_BIT(5), PRCM_ARM_IT1_CLEAR); | 363 | writel(MBOX_BIT(5), PRCM_ARM_IT1_CLR); |
364 | return false; | 364 | return false; |
365 | } | 365 | } |
366 | 366 | ||
367 | static bool read_mailbox_6(void) | 367 | static bool read_mailbox_6(void) |
368 | { | 368 | { |
369 | writel(MBOX_BIT(6), PRCM_ARM_IT1_CLEAR); | 369 | writel(MBOX_BIT(6), PRCM_ARM_IT1_CLR); |
370 | return false; | 370 | return false; |
371 | } | 371 | } |
372 | 372 | ||
373 | static bool read_mailbox_7(void) | 373 | static bool read_mailbox_7(void) |
374 | { | 374 | { |
375 | writel(MBOX_BIT(7), PRCM_ARM_IT1_CLEAR); | 375 | writel(MBOX_BIT(7), PRCM_ARM_IT1_CLR); |
376 | return false; | 376 | return false; |
377 | } | 377 | } |
378 | 378 | ||
@@ -434,7 +434,7 @@ int __init db5500_prcmu_init(void) | |||
434 | return -ENODEV; | 434 | return -ENODEV; |
435 | 435 | ||
436 | /* Clean up the mailbox interrupts after pre-kernel code. */ | 436 | /* Clean up the mailbox interrupts after pre-kernel code. */ |
437 | writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLEAR); | 437 | writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR); |
438 | 438 | ||
439 | r = request_threaded_irq(IRQ_DB5500_PRCMU1, prcmu_irq_handler, | 439 | r = request_threaded_irq(IRQ_DB5500_PRCMU1, prcmu_irq_handler, |
440 | prcmu_irq_thread_fn, 0, "prcmu", NULL); | 440 | prcmu_irq_thread_fn, 0, "prcmu", NULL); |