From d79cabb0ad28edfecd9ec8f6ac4ded44d3f8cb16 Mon Sep 17 00:00:00 2001 From: Eli Hsu Date: Tue, 10 Nov 2015 16:50:56 +0800 Subject: [PATCH] it8380dev: Modify port 80 service routine Change the parameter name. Change the output length of console command - port80. Signed-off-by: Eli Hsu BRANCH=none BUG=none TEST=console command port80 Change-Id: I8da3f7ec30f16ceea17a8f4fec55162f73a4b28b Reviewed-on: https://chromium-review.googlesource.com/311960 Commit-Ready: Eli Hsu Tested-by: Eli Hsu Reviewed-by: Randall Spangler --- chip/it83xx/ec2i_chip.h | 2 +- chip/it83xx/lpc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chip/it83xx/ec2i_chip.h b/chip/it83xx/ec2i_chip.h index 7b9fe1cf4e..47417c050a 100644 --- a/chip/it83xx/ec2i_chip.h +++ b/chip/it83xx/ec2i_chip.h @@ -11,7 +11,7 @@ #define P80L_P80LB 0 #define P80L_P80LE 0x3F #define P80L_P80LC 0 -#define P80L_BRAM_BANK1_MAX_SIZE 0x3F +#define P80L_BRAM_BANK1_SIZE_MASK 0x3F /* Index list of the host interface registers of PNPCFG */ enum host_pnpcfg_index { diff --git a/chip/it83xx/lpc.c b/chip/it83xx/lpc.c index 1ffc82d117..3f7dc82a57 100644 --- a/chip/it83xx/lpc.c +++ b/chip/it83xx/lpc.c @@ -534,8 +534,8 @@ void pm3_ibf_interrupt(void) pm_clear_ibf(LPC_HOST_PORT_80H); /* read OK */ if ((ec2i_r & 0xff00) == EC2I_READ_SUCCESS) { - new_p80_idx = ec2i_r & P80L_BRAM_BANK1_MAX_SIZE; - for (i = 0; i < P80L_BRAM_BANK1_MAX_SIZE; i++) { + new_p80_idx = ec2i_r & P80L_BRAM_BANK1_SIZE_MASK; + for (i = 0; i < (P80L_P80LE - P80L_P80LB + 1); i++) { if (++p80l_index > P80L_P80LE) p80l_index = P80L_P80LB; port_80_write(IT83XX_BRAM_BANK1(p80l_index)); @@ -668,7 +668,7 @@ static void lpc_init(void) ec2i_r = ec2i_read(HOST_INDEX_DSLDC6); /* read OK */ if ((ec2i_r & 0xff00) == EC2I_READ_SUCCESS) - p80l_index = ec2i_r & P80L_BRAM_BANK1_MAX_SIZE; + p80l_index = ec2i_r & P80L_BRAM_BANK1_SIZE_MASK; } /*