Implemented missing ALi M1543C behavior.
This commit is contained in:
@@ -254,6 +254,14 @@ ali1533_write(int func, int addr, uint8_t val, void *priv)
|
||||
dev->pci_conf[addr] = val & 0xcf;
|
||||
/* This actually enables/disables the USB *device* rather than the interface itself. */
|
||||
dev->usb_dev_enable = !(val & 0x40);
|
||||
if (dev->type == 1) {
|
||||
nvr_at_index_read_handler(0, 0x0070, dev->nvr);
|
||||
nvr_at_index_read_handler(0, 0x0072, dev->nvr);
|
||||
if (val & 0x20) {
|
||||
nvr_at_index_read_handler(1, 0x0070, dev->nvr);
|
||||
nvr_at_index_read_handler(1, 0x0072, dev->nvr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* Hardware setting status bits, read-only (register 0x54) */
|
||||
|
@@ -118,6 +118,7 @@ extern void nvr_time_set(struct tm *);
|
||||
extern void nvr_reg_write(uint16_t reg, uint8_t val, void *priv);
|
||||
extern void nvr_at_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_at_sec_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_at_index_read_handler(int set, uint16_t base, nvr_t *nvr);
|
||||
extern void nvr_read_addr_set(int set, nvr_t *nvr);
|
||||
extern void nvr_wp_set(int set, int h, nvr_t *nvr);
|
||||
extern void nvr_via_wp_set(int set, int reg, nvr_t *nvr);
|
||||
|
17
src/nvr_at.c
17
src/nvr_at.c
@@ -892,6 +892,23 @@ nvr_at_handler(int set, uint16_t base, nvr_t *nvr)
|
||||
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
|
||||
}
|
||||
|
||||
void
|
||||
nvr_at_index_read_handler(int set, uint16_t base, nvr_t *nvr)
|
||||
{
|
||||
io_handler(0, base, 1,
|
||||
nvr_read, NULL, NULL, NULL, NULL, NULL, nvr);
|
||||
nvr_at_handler(0, base, nvr);
|
||||
|
||||
if (set)
|
||||
nvr_at_handler(1, base, nvr);
|
||||
else {
|
||||
io_handler(set, base, 1,
|
||||
nvr_read, NULL, NULL, NULL, NULL, NULL, nvr);
|
||||
io_handler(set, base + 1, 1,
|
||||
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nvr_at_sec_handler(int set, uint16_t base, nvr_t *nvr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user