[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: LCD timing



Hi,

Open arch/cris/kernel/fasttimer.c and make sure that
schedule_usleep looks like this:

void schedule_usleep(unsigned long us)
{
  struct fast_timer t;
#ifdef DECLARE_WAITQUEUE
  wait_queue_head_t sleep_wait;
  init_waitqueue_head(&sleep_wait);
  {
  DECLARE_WAITQUEUE(wait, current);
#else
  struct wait_queue *sleep_wait = NULL;
  struct wait_queue wait = { current, NULL };
#endif

  D1(printk("schedule_usleep(%d)\n", us));
  add_wait_queue(&sleep_wait, &wait);
  set_current_state(TASK_INTERRUPTIBLE);
  start_one_shot_timer(&t, wake_up_func, (unsigned long)&sleep_wait, us,
                       "usleep");
  schedule();
  set_current_state(TASK_RUNNING);
  remove_wait_queue(&sleep_wait, &wait);
  D1(printk("done schedule_usleep(%d)\n", us));
#ifdef DECLARE_WAITQUEUE
  }
#endif  
}
/Mikael

-----Original Message-----
From: Szabo, Tamas [mailto:Tamas.Szabo@xxxxxxx.com]
Sent: Friday, November 22, 2002 12:45 PM
To: 'Mikael Starvik'
Cc: dev-etrax
Subject: RE: LCD timing


Hello Mikael,

Sorry I have no a lot of knowledge regarding the kernel. I tried the
schedule_usleep() but not seems to work.

I modify my code something like this:

#include <asm/fasttimer.h>
...

void write_data(__u8 data)
{
	...
	*R_PAR0_CRTL_DATA = PAR_OE | LCD_RS | data;
#ifdef CONFIG_ETRAX_FAST_TIMER
	schedule_usleep(10);
#else
	udelay(10);
#endif
	return;
}

but EXTRAX frozen.

Is it necessary to initialise timer first or something else?
(start_one_shot_timer(...), etc?)

Thx
Tamas



***********************************************************************************************
The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. 

This email and any response may be monitored by Sony United Kingdom Limited.
(6)
***********************************************************************************************