Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192174
b: refs/heads/master
c: 0aec66d
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Walker authored and Daniel Walker committed May 12, 2010
1 parent c7f72b1 commit 1bb85cb
Show file tree
Hide file tree
Showing 4 changed files with 25 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: b13525c2637957a757709945fbc9bc8b1065d071
refs/heads/master: 0aec66d493c1476daa88ec56b1076e51f1ceff0b
15 changes: 14 additions & 1 deletion trunk/arch/arm/mach-msm/proc_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,17 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
return ret;
}


/*
* We need to wait for the ARM9 to at least partially boot
* up before we can continue. Since the ARM9 does resource
* allocation, if we dont' wait we could end up crashing or in
* and unknown state. This function should be called early to
* wait on the ARM9.
*/
void __init proc_comm_boot_wait(void)
{
void __iomem *base = MSM_SHARED_RAM_BASE;

proc_comm_wait_for(base + MDM_STATUS, PCOM_READY);

}
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-msm/proc_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#ifndef _ARCH_ARM_MACH_MSM_PROC_COMM_H_
#define _ARCH_ARM_MACH_MSM_PROC_COMM_H_

#include <linux/init.h>

enum {
PCOM_CMD_IDLE = 0x0,
PCOM_CMD_DONE,
Expand Down Expand Up @@ -251,5 +253,6 @@ enum {
(((drvstr) & 0xF) << 17))

int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2);
void __init proc_comm_boot_wait(void);

#endif
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-msm/smd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,13 @@ static int __init msm_smd_probe(struct platform_device *pdev)
{
pr_info("smd_init()\n");

/*
* If we haven't waited for the ARM9 to boot up till now,
* then we need to wait here. Otherwise this should just
* return immediately.
*/
proc_comm_boot_wait();

INIT_WORK(&probe_work, smd_channel_probe_worker);

if (smd_core_init()) {
Expand Down

0 comments on commit 1bb85cb

Please sign in to comment.