Permalink
Browse files

Fix for bug in mbox_read. Thanks lp0

  • Loading branch information...
1 parent d25ac7a commit 4c9c54713c4b26c920f0fd73f245d415fe8e7ca0 @popcornmix popcornmix committed May 16, 2012
Showing with 2 additions and 7 deletions.
  1. +0 −2 arch/arm/mach-bcm2708/power.c
  2. +1 −2 arch/arm/mach-bcm2708/vcio.c
  3. +1 −3 drivers/video/bcm2708_fb.c
@@ -97,8 +97,6 @@ int bcm_power_request(BCM_POWER_HANDLE_T handle, uint32_t request)
bcm_mailbox_write(MBOX_CHAN_POWER,
global_request << 4);
- /* Wait for a response during power-up */
- mdelay(10);
if (global_request & ~g_state.global_request) {
rc = bcm_mailbox_read(MBOX_CHAN_POWER,
&actual);
@@ -119,8 +119,7 @@ static int mbox_read(struct vc_mailbox *mbox, unsigned chan, uint32_t *data28)
if (mbox->magic != MBOX_MAGIC)
rc = -EINVAL;
else {
- if (mbox->msg[chan] ||
- (down_interruptible(&mbox->sema[chan]) == 0)) {
+ if (down_interruptible(&mbox->sema[chan]) == 0) {
*data28 = MBOX_DATA28(mbox->msg[chan]);
mbox->msg[chan] = 0;
rc = 0;
@@ -18,7 +18,6 @@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/slab.h>
-#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/fb.h>
#include <linux/init.h>
@@ -221,8 +220,7 @@ static int bcm2708_fb_set_par(struct fb_info *info)
/* inform vc about new framebuffer */
bcm_mailbox_write(MBOX_CHAN_FB, fb->dma);
- /* workaround occasional failure to read results. TODO: replace fb driver with vchiq version */
- msleep(10);
+ /* TODO: replace fb driver with vchiq version */
/* wait for response */
bcm_mailbox_read(MBOX_CHAN_FB, &val);

0 comments on commit 4c9c547

Please sign in to comment.