summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin K Wong <kevin.k.wong@intel.com>2015-04-26 23:50:29 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-28 19:08:29 +0000
commit878c09d64bf69d31f72465bd1dece3822f04578d (patch)
tree6e529f5b491a08a47abd3332f24e016d451e4898
parent3d69e505fc5f61045c0db1c0334f1425458d9029 (diff)
downloadchrome-ec-878c09d64bf69d31f72465bd1dece3822f04578d.tar.gz
mec1322: Added KBD SERIRQ support
BUG=chrome-os-partner:24107 TEST=Keyboard keys are printed correctly on Kunimitsu. BRANCH=none Change-Id: Ia4ed6c1166fa20dc8623ea8d7147b6f587cbf993 Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/272504 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org> Commit-Queue: Vijay P Hiremath <vijay.p.hiremath@intel.com>
-rw-r--r--chip/mec1322/lpc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/chip/mec1322/lpc.c b/chip/mec1322/lpc.c
index 4486ef9f7a..673edfe62d 100644
--- a/chip/mec1322/lpc.c
+++ b/chip/mec1322/lpc.c
@@ -36,9 +36,9 @@ static int init_done;
static struct ec_lpc_host_args * const lpc_host_args =
(struct ec_lpc_host_args *)mem_mapped;
-#ifdef CONFIG_KEYBOARD_IRQ_GPIO
static void keyboard_irq_assert(void)
{
+#ifdef CONFIG_KEYBOARD_IRQ_GPIO
/*
* Enforce signal-high for long enough for the signal to be pulled high
* by the external pullup resistor. This ensures the host will see the
@@ -53,15 +53,12 @@ static void keyboard_irq_assert(void)
/* Set signal high, now that we've generated the edge */
gpio_set_level(CONFIG_KEYBOARD_IRQ_GPIO, 1);
-}
#else
-static void keyboard_irq_assert(void)
-{
/*
- * TODO(crosbug.com/p/24107): Implement SER_IRQ
+ * SERIRQ is automatically sent by KBC
*/
-}
#endif
+}
/**
* Generate SMI pulse to the host chipset via GPIO.
@@ -221,7 +218,11 @@ static void setup_lpc(void)
task_enable_irq(MEC1322_IRQ_8042EM_IBF);
task_enable_irq(MEC1322_IRQ_8042EM_OBF);
- /* TODO(crosbug.com/p/24107): Route KIRQ to SER_IRQ1 */
+#ifndef CONFIG_KEYBOARD_IRQ_GPIO
+ /* Set up SERIRQ for keyboard */
+ MEC1322_8042_KB_CTRL |= (1 << 5);
+ MEC1322_LPC_SIRQ(1) = 0x01;
+#endif
/* Set up EMI module for memory mapped region, base address 0x800 */
MEC1322_LPC_EMI_BAR = 0x0800800f;