[U-Boot-Users] Troubles on my custom keyboard driver in u-boot

Sam Song samsongshu at yahoo.com.cn
Wed Apr 7 13:21:43 CEST 2004


Hi,

I had a trouble on coding a custom keyboard driver on
my custom 8xx board in u-boot.According to README,only
RBC823 does have a custom keyboard so far.I looked up
kbd.c of this board but still some puzzles.In kbd.c,
RBC823 use SMC1 as serial port to get the input,while
I mean to implement the input by PCMCIA pins as GPIO.I
could make a Level 0 interrupt by PCMCIA status change
to create a character.But how about next step?

1. RBC823 use DPRAM as keyboard buffer and get
character "automatically" from SMC1. But could I leave
a RAM zone for keyboard buffer to keep keycode and
later convert these keycodes to characters and put
them into LCD console buffer?
2. How come RBC823 uses lcd_disable function and a
special U-BUS arbitration priority? I did the same on
my custom board but LCD turned off when booting or
worked with a half screen in a twinkling way.
3. Also,when I registered my custom board as RBC823
did.I found the I/O address of keyboard and LCD had
the same address.Normal or not?

===================================================

&lcddev is 0x3eecef0

device_register is : 0x0

The value of device_register (&kbd_dev) is : 0x0

kbd_dev.getc is : 0x3fa25c0

&kbd_dev is : 0x3eecef0

The value of device_register (&kbd_dev) is : 0x0 

==================================================

4. In following drv_keyboard_init of kbd.c[RBC823], if
"if (0)" is right,how could keyboard finish
registering?

int drv_keyboard_init(void)
{
        int error = 0;
        device_t kbd_dev;

        if (0) {
                /* register the keyboard */
                memset (&kbd_dev, 0,
sizeof(device_t));
                strcpy(kbd_dev.name, "kbd");
                kbd_dev.flags =  DEV_FLAGS_INPUT |
DEV_FLAGS_SYSTEM;
                kbd_dev.putc = NULL;
                kbd_dev.puts = NULL;
                kbd_dev.getc = smc1_getc;
                kbd_dev.tstc = smc1_tstc;
                error = device_register (&kbd_dev);
        } else {
                lcd_is_enabled = 0;
                lcd_disable();
        }
        return error;
}

5. Additionly,is it necessary for me to make it in
u-boot and then port it to LINUX? A mess in my mind?!

Any input are warmly welcome!!!

Sam


_________________________________________________________
Do You Yahoo!? 
惠普TT游戏剧,玩游戏,中大奖!
http://cn.rd.yahoo.com/mail_cn/tag/*http://hp.allyes.com/laserjet/gamestory/index.html?jumpid=ex_hphqapcn_MongooseLJ1010/201073CN407016/Yahoo




More information about the U-Boot mailing list