Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296864
b: refs/heads/master
c: 34fe6f1
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Lezcano authored and Samuel Ortiz committed Mar 6, 2012
1 parent d5fae3c commit 93d8774
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ab492e12d588af7b05892c3744e8bdc2eace6d0
refs/heads/master: 34fe6f107eab096ac2f70a51763e9978b4abbeb6
12 changes: 12 additions & 0 deletions trunk/drivers/mfd/db8500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,18 @@ bool db8500_prcmu_pending_irq(void)
return false;
}

/*
* This function checks if the specified cpu is in in WFI. It's usage
* makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple
* function. Of course passing smp_processor_id() to this function will
* always return false...
*/
bool db8500_prcmu_is_cpu_in_wfi(int cpu)
{
return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 :
PRCM_ARM_WFI_STANDBY_WFI0;
}

/*
* This function copies the gic SPI settings to the prcmu in order to
* monitor them and abort/finish the retention/off sequence or state.
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/mfd/dbx500-prcmu-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@

/* ARM WFI Standby signal register */
#define PRCM_ARM_WFI_STANDBY (_PRCMU_BASE + 0x130)
#define PRCM_ARM_WFI_STANDBY_WFI0 0x08
#define PRCM_ARM_WFI_STANDBY_WFI1 0x10
#define PRCM_IOCR (_PRCMU_BASE + 0x310)
#define PRCM_IOCR_IOFORCE 0x1

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/db8500-prcmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ int db8500_prcmu_gic_recouple(void);
int db8500_prcmu_copy_gic_settings(void);
bool db8500_prcmu_gic_pending_irq(void);
bool db8500_prcmu_pending_irq(void);
bool db8500_prcmu_is_cpu_in_wfi(int cpu);
void db8500_prcmu_enable_wakeups(u32 wakeups);
int db8500_prcmu_set_epod(u16 epod_id, u8 epod_state);
int db8500_prcmu_request_clock(u8 clock, bool enable);
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/linux/mfd/dbx500-prcmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ static inline bool prcmu_gic_pending_irq(void)
return db8500_prcmu_gic_pending_irq();
}

static inline bool prcmu_is_cpu_in_wfi(int cpu)
{
if (cpu_is_u5500())
return -EINVAL;
else
return db8500_prcmu_is_cpu_in_wfi(cpu);
}

static inline int prcmu_copy_gic_settings(void)
{
if (cpu_is_u5500())
Expand Down

0 comments on commit 93d8774

Please sign in to comment.