5 #include <linux/types.h>
6 #include <linux/errno.h>
7 #include <linux/kernel.h>
9 #include <linux/fcntl.h>
14 #include <asm/uaccess.h>
15 #include <asm/sections.h>
21 #define ANSLCD_ADDR 0xf301c000
22 #define ANSLCD_CTRL_IX 0x00
23 #define ANSLCD_DATA_IX 0x10
25 static unsigned long anslcd_short_delay = 80;
26 static unsigned long anslcd_long_delay = 3280;
27 static volatile unsigned char __iomem *anslcd_ptr;
33 anslcd_write_byte_ctrl (
unsigned char c )
43 udelay(anslcd_long_delay);
break;
44 default:
udelay(anslcd_short_delay);
49 anslcd_write_byte_data (
unsigned char c )
52 udelay(anslcd_short_delay);
56 anslcd_write(
struct file *
file,
const char __user *
buf,
57 size_t count, loff_t *ppos )
70 for ( i = *ppos; count > 0; ++
i, ++
p, --
count )
74 anslcd_write_byte_data( c );
82 anslcd_ioctl(
struct file *file,
unsigned int cmd,
unsigned long arg)
96 anslcd_write_byte_ctrl ( 0x38 );
97 anslcd_write_byte_ctrl ( 0x0f );
98 anslcd_write_byte_ctrl ( 0x06 );
99 anslcd_write_byte_ctrl ( 0x01 );
100 anslcd_write_byte_ctrl ( 0x02 );
103 temp = (
char __user *) arg;
106 anslcd_write_byte_ctrl ( ch );
114 anslcd_short_delay=
arg;
120 anslcd_long_delay=
arg;
131 anslcd_open(
struct inode *
inode,
struct file * file )
137 .write = anslcd_write,
138 .unlocked_ioctl = anslcd_ioctl,
152 "********************";
182 anslcd_write_byte_ctrl ( 0x38 );
183 anslcd_write_byte_ctrl ( 0x0c );
184 anslcd_write_byte_ctrl ( 0x06 );
185 anslcd_write_byte_ctrl ( 0x01 );
186 anslcd_write_byte_ctrl ( 0x02 );
188 anslcd_write_byte_data(anslcd_logo[a]);