Files
OpenCellular/chip/it83xx/intc.c
Dino Li 60e110acd1 it8380dev: add i2c control module
Add i2c control module for emulation board.
To rename CONFIG_ to CONFIG_IT83XX_ for IT83XX series configuration.

Signed-off-by: Dino Li <dino.li@ite.com.tw>

BRANCH=none
BUG=none
TEST=1. console command "i2cscan" found devices correctly.
     2. console command "i2cxfer".
         2-a. port2 + battery, i2cxfer r, r16, and rlen OK.
         2-b. port1 + slave evb, i2cxfer r, r16, rlen, w, and w16 OK.

Change-Id: I67165f7dcdef538ba6dd03b47f1621a73cc68379
Reviewed-on: https://chromium-review.googlesource.com/263678
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Dino Li <dino.li@ite.com.tw>
Tested-by: Dino Li <dino.li@ite.com.tw>
2015-06-30 12:22:02 +00:00

87 lines
1.6 KiB
C

/* Copyright 2015 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "common.h"
#include "registers.h"
#include "task.h"
#include "kmsc_chip.h"
#include "intc.h"
void intc_cpu_int_group_5(void)
{
/* Determine interrupt number. */
int intc_group_5 = IT83XX_INTC_IVCT5 - 16;
switch (intc_group_5) {
#ifdef CONFIG_LPC
case IT83XX_IRQ_KBC_OUT:
lpc_kbc_obe_interrupt();
break;
case IT83XX_IRQ_KBC_IN:
lpc_kbc_ibf_interrupt();
break;
#endif
#if defined(HAS_TASK_KEYSCAN) && !defined(CONFIG_IT83XX_KEYBOARD_KSI_WUC_INT)
case IT83XX_IRQ_KB_MATRIX:
keyboard_raw_interrupt();
break;
#endif
default:
break;
}
}
DECLARE_IRQ(CPU_INT_GROUP_5, intc_cpu_int_group_5, 2);
void intc_cpu_int_group_4(void)
{
/* Determine interrupt number. */
int intc_group_4 = IT83XX_INTC_IVCT4 - 16;
switch (intc_group_4) {
#ifdef CONFIG_LPC
case IT83XX_IRQ_PMC_IN:
pm1_ibf_interrupt();
break;
case IT83XX_IRQ_PMC2_IN:
pm2_ibf_interrupt();
break;
case IT83XX_IRQ_PMC3_IN:
pm3_ibf_interrupt();
break;
case IT83XX_IRQ_PMC4_IN:
pm4_ibf_interrupt();
break;
case IT83XX_IRQ_PMC5_IN:
pm5_ibf_interrupt();
break;
#endif
default:
break;
}
}
DECLARE_IRQ(CPU_INT_GROUP_4, intc_cpu_int_group_4, 2);
void intc_cpu_int_group_12(void)
{
/* Determine interrupt number. */
int intc_group_12 = IT83XX_INTC_IVCT12 - 16;
switch (intc_group_12) {
#ifdef CONFIG_PECI
case IT83XX_IRQ_PECI:
peci_interrupt();
break;
#endif
default:
break;
}
}
DECLARE_IRQ(CPU_INT_GROUP_12, intc_cpu_int_group_12, 2);