Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228357
b: refs/heads/master
c: be38efe
h: refs/heads/master
i:
  228355: 3bd5715
v: v3
  • Loading branch information
Mark Allyn authored and Greg Kroah-Hartman committed Dec 10, 2010
1 parent 5e74188 commit 539c86f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f9346a091ac523afa73643aae69f74f0f8a6e80
refs/heads/master: be38efe11748684d54ff86810443979a59b96cfc
9 changes: 8 additions & 1 deletion trunk/drivers/staging/sep/sep_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <asm/cacheflush.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
#include <linux/rar_register.h>

#include "../memrar/memrar.h"
Expand Down Expand Up @@ -3244,6 +3245,9 @@ static int sep_reconfig_shared_area(struct sep_device *sep)
{
int ret_val;

/* use to limit waiting for SEP */
unsigned long end_time;

dev_dbg(&sep->pdev->dev, "reconfig shared area start\n");

/* Send the new SHARED MESSAGE AREA to the SEP */
Expand All @@ -3255,7 +3259,10 @@ static int sep_reconfig_shared_area(struct sep_device *sep)
/* Poll for SEP response */
ret_val = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR1_REG_ADDR);

while (ret_val != 0xffffffff && ret_val != sep->shared_bus)
end_time = jiffies + (WAIT_TIME * HZ);

while ((time_before(jiffies, end_time)) && (ret_val != 0xffffffff) &&
(ret_val != sep->shared_bus))
ret_val = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR1_REG_ADDR);

/* Check the return value (register) */
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/staging/sep/sep_driver_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,7 @@ held by the proccess (struct file) */
/* the token that defines the data pool pointers address */
#define SEP_EXT_CACHE_ADDR_VAL_TOKEN 0xBABABABA

/* Time limit for SEP to finish */
#define WAIT_TIME 10

#endif /* SEP DRIVER CONFIG */

0 comments on commit 539c86f

Please sign in to comment.