diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.c | 6 | ||||
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c index f7b798be33..986abb5d81 100644 --- a/src/ec/lenovo/pmh7/pmh7.c +++ b/src/ec/lenovo/pmh7/pmh7.c @@ -103,13 +103,15 @@ void pmh7_register_clear_bit(int reg, int bit) char pmh7_register_read(int reg) { - outb(reg, EC_LENOVO_PMH7_ADDR); + outb(reg & 0xff, EC_LENOVO_PMH7_ADDR_L); + outb((reg & 0xff00) >> 8, EC_LENOVO_PMH7_ADDR_H); return inb(EC_LENOVO_PMH7_DATA); } void pmh7_register_write(int reg, int val) { - outb(reg, EC_LENOVO_PMH7_ADDR); + outb(reg & 0xff, EC_LENOVO_PMH7_ADDR_L); + outb((reg & 0xff00) >> 8, EC_LENOVO_PMH7_ADDR_H); outb(val, EC_LENOVO_PMH7_DATA); } diff --git a/src/ec/lenovo/pmh7/pmh7.h b/src/ec/lenovo/pmh7/pmh7.h index a641fce0fa..313a560937 100644 --- a/src/ec/lenovo/pmh7/pmh7.h +++ b/src/ec/lenovo/pmh7/pmh7.h @@ -19,7 +19,8 @@ #define EC_LENOVO_PMH7_INDEX 0x77 #define EC_LENOVO_PMH7_BASE 0x15e0 -#define EC_LENOVO_PMH7_ADDR (EC_LENOVO_PMH7_BASE + 0x0c) +#define EC_LENOVO_PMH7_ADDR_L (EC_LENOVO_PMH7_BASE + 0x0c) +#define EC_LENOVO_PMH7_ADDR_H (EC_LENOVO_PMH7_BASE + 0x0d) #define EC_LENOVO_PMH7_DATA (EC_LENOVO_PMH7_BASE + 0x0e) #define EC_LENOVO_PMH7_REG_ID 0xc2 |