diff options
author | Robert Marklund <robert.marklund@stericsson.com> | 2011-06-23 13:30:59 +0200 |
---|---|---|
committer | Robert Marklund <robert.marklund@stericsson.com> | 2011-10-05 12:16:44 +0200 |
commit | b821b55debb8c7b70395bf688e27068254d737a0 (patch) | |
tree | 9418ab5d07822a9967bf1b6b49ff57595a131014 | |
parent | 36772f934bbd5021fb41062bd2bde6178496957b (diff) |
mfd: prcmu: Update for api changes in 3.0
Change-Id: Ia29d92edad15763a6cf9576cb934b7b77c500382
Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
-rwxr-xr-x | drivers/mfd/ab5500-core.c | 16 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu.c | 13 | ||||
-rw-r--r-- | include/linux/mfd/db8500-prcmu.h | 3 |
3 files changed, 23 insertions, 9 deletions
diff --git a/drivers/mfd/ab5500-core.c b/drivers/mfd/ab5500-core.c index b50da3c5a76..75c773b232f 100755 --- a/drivers/mfd/ab5500-core.c +++ b/drivers/mfd/ab5500-core.c @@ -28,7 +28,7 @@ #include <linux/spinlock.h> #include <linux/mfd/core.h> #include <linux/version.h> -#include <mach/prcmu-db5500.h> +#include <linux/mfd/db5500-prcmu.h> #define AB5500_NAME_STRING "ab5500" #define AB5500_ID_FORMAT_STRING "AB5500 %s" @@ -1332,7 +1332,7 @@ static int ab5500_startup_irq_enabled(struct device *dev, unsigned int irq) struct ab5500 *ab; bool val; - ab = get_irq_chip_data(irq); + ab = irq_get_chip_data(irq); irq -= ab->irq_base; val = ((ab->startup_events[irq / 8] & BIT(irq % 8)) != 0); @@ -2303,10 +2303,10 @@ static int ab5500_irq_init(struct ab5500 *ab) for (i = 0; i < ab5500_plf_data->irq.count; i++) { irq = ab5500_plf_data->irq.base + i; - set_irq_chip_data(irq, ab); - set_irq_chip_and_handler(irq, &ab5500_irq_chip, + irq_set_chip_data(irq, ab); + irq_set_chip_and_handler(irq, &ab5500_irq_chip, handle_simple_irq); - set_irq_nested_thread(irq, 1); + irq_set_nested_thread(irq, 1); #ifdef CONFIG_ARM set_irq_flags(irq, IRQF_VALID); #else @@ -2328,8 +2328,8 @@ static void ab5500_irq_remove(struct ab5500 *ab) #ifdef CONFIG_ARM set_irq_flags(irq, 0); #endif - set_irq_chip_and_handler(irq, NULL, NULL); - set_irq_chip_data(irq, NULL); + irq_set_chip_and_handler(irq, NULL, NULL); + irq_set_chip_data(irq, NULL); } } @@ -2428,7 +2428,7 @@ static int __init ab5500_probe(struct platform_device *pdev) /* Set up and register the platform devices. */ for (i = 0; i < AB5500_NUM_DEVICES; i++) { - ab5500_devs[i].mfd_data = ab5500_plf_data->dev_data[i]; + ab5500_devs[i].platform_data = ab5500_plf_data->dev_data[i]; } err = mfd_add_devices(&pdev->dev, 0, ab5500_devs, diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 02a15d7cb3b..57939be17ed 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -1514,7 +1514,7 @@ bool prcmu_is_ac_wake_requested(void) /** * prcmu_system_reset - System reset * - * Saves the reset reason code and then sets the APE_SOFRST register which + * Saves the reset reason code and then sets the APE_SOFTRST register which * fires interrupt to fw */ void prcmu_system_reset(u16 reset_code) @@ -1524,6 +1524,17 @@ void prcmu_system_reset(u16 reset_code) } /** + * prcmu_get_reset_code - Retrieve SW reset reason code + * + * Retrieves the reset reason code stored by prcmu_system_reset() before + * last restart. + */ +u16 prcmu_get_reset_code(void) +{ + return readw(tcdm_base + PRCM_SW_RST_REASON); +} + +/** * prcmu_reset_modem - ask the PRCMU to reset modem */ void prcmu_modem_reset(void) diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h index 917dbcab701..f56d1171269 100644 --- a/include/linux/mfd/db8500-prcmu.h +++ b/include/linux/mfd/db8500-prcmu.h @@ -668,6 +668,9 @@ enum prcmu_clock { PRCMU_NUM_REG_CLOCKS, PRCMU_SYSCLK = PRCMU_NUM_REG_CLOCKS, PRCMU_TIMCLK, + PRCMU_PLLSOC0, + PRCMU_PLLSOC1, + PRCMU_PLLDDR, }; /* |