| 1 |
|
| 2 |
|
| 3 |
#include <types.h> |
| 4 |
#include <console/console.h> |
| 5 |
#include <device/device.h> |
| 6 |
#include <ec/compal/ene932/ec.h> |
| 7 |
#include "ec.h" |
| 8 |
|
| 9 |
void parrot_ec_init(void) |
| 10 |
{ |
| 11 |
printk(BIOS_DEBUG, "Parrot EC Init\n"); |
| 12 |
|
| 13 |
|
| 14 |
kbc_cleanup_buffers(); |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
ec_kbc_write_cmd(0x51); |
| 19 |
printk(BIOS_DEBUG, " EC version %x.%x.%x\n", |
| 20 |
ec_kbc_read_ob(), ec_kbc_read_ob(), ec_kbc_read_ob()); |
| 21 |
|
| 22 |
|
| 23 |
ec_kbc_write_cmd(0x52); |
| 24 |
ec_kbc_write_ib(0xA0); |
| 25 |
printk(BIOS_DEBUG, " EC Project: %c%c%c%c%c\n", |
| 26 |
ec_kbc_read_ob(), ec_kbc_read_ob(), ec_kbc_read_ob(), |
| 27 |
ec_kbc_read_ob(), ec_kbc_read_ob()); |
| 28 |
|
| 29 |
|
| 30 |
printk(BIOS_DEBUG, " Parrot Revision %x\n", parrot_rev()); |
| 31 |
|
| 32 |
|
| 33 |
ec_kbc_write_cmd(0x59); |
| 34 |
ec_kbc_write_ib(0xE5); |
| 35 |
|
| 36 |
|
| 37 |
ec_kbc_write_cmd(0x59); |
| 38 |
ec_kbc_write_ib(0xD1); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
ec_kbc_write_cmd(0x45); |
| 43 |
ec_kbc_write_ib(0xAD); |
| 44 |
|
| 45 |
|
| 46 |
ec_kbc_write_cmd(0x45); |
| 47 |
ec_kbc_write_ib(0xA8); |
| 48 |
|
| 49 |
|
| 50 |
ec_kbc_write_cmd(0x45); |
| 51 |
ec_kbc_write_ib(0xA2); |
| 52 |
} |
| 53 |
|
| 54 |
|
| 55 |
u8 parrot_rev(void) |
| 56 |
{ |
| 57 |
ec_kbc_write_cmd(0x45); |
| 58 |
ec_kbc_write_ib(0x40); |
| 59 |
return ec_kbc_read_ob(); |
| 60 |
} |