diff options
-rw-r--r-- | board/bds/board.h | 7 | ||||
-rw-r--r-- | board/bolt/board.h | 11 | ||||
-rw-r--r-- | board/daisy/board.h | 9 | ||||
-rw-r--r-- | board/discovery/board.h | 6 | ||||
-rw-r--r-- | board/falco/board.h | 10 | ||||
-rw-r--r-- | board/host/board.h | 6 | ||||
-rw-r--r-- | board/kirby/board.h | 11 | ||||
-rw-r--r-- | board/link/board.h | 11 | ||||
-rw-r--r-- | board/mccroskey/board.h | 7 | ||||
-rw-r--r-- | board/nyan/board.h | 10 | ||||
-rw-r--r-- | board/peppy/board.h | 10 | ||||
-rw-r--r-- | board/pit/board.h | 10 | ||||
-rw-r--r-- | board/puppy/board.h | 10 | ||||
-rw-r--r-- | board/rambi/board.h | 10 | ||||
-rw-r--r-- | board/samus/board.h | 11 | ||||
-rw-r--r-- | board/slippy/board.h | 10 | ||||
-rw-r--r-- | board/snow/board.h | 8 | ||||
-rw-r--r-- | board/spring/board.h | 8 | ||||
-rw-r--r-- | include/common.h | 3 | ||||
-rw-r--r-- | include/module_id.h | 52 |
20 files changed, 55 insertions, 165 deletions
diff --git a/board/bds/board.h b/board/bds/board.h index 4d83c3c203..97f48e38e4 100644 --- a/board/bds/board.h +++ b/board/bds/board.h @@ -27,13 +27,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_UART, -}; - enum adc_channel { ADC_CH_EC_TEMP = 0, /* EC internal die temperature in degrees K. */ ADC_CH_BDS_POT, /* BDS pot input. */ diff --git a/board/bolt/board.h b/board/bolt/board.h index ca4862f912..89e9d3ffe7 100644 --- a/board/bolt/board.h +++ b/board/bolt/board.h @@ -54,17 +54,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_PECI, - MODULE_PWM_FAN, - MODULE_PWM_KBLIGHT, - MODULE_UART, -}; - /* I2C ports */ #define I2C_PORT_BATTERY 0 #define I2C_PORT_CHARGER 0 diff --git a/board/daisy/board.h b/board/daisy/board.h index 0dee1cd121..319eeefc62 100644 --- a/board/daisy/board.h +++ b/board/daisy/board.h @@ -31,15 +31,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_POWER_LED, - MODULE_UART, - MODULE_CHIPSET, -}; - /* Keyboard output port list */ #define KB_OUT_PORT_LIST GPIO_B, GPIO_C diff --git a/board/discovery/board.h b/board/discovery/board.h index c884026975..0ef0ff18a7 100644 --- a/board/discovery/board.h +++ b/board/discovery/board.h @@ -20,12 +20,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -enum module_id { - MODULE_UART, - MODULE_CHIPSET, -}; - /* Timer selection */ #define TIM_CLOCK_MSB 3 #define TIM_CLOCK_LSB 4 diff --git a/board/falco/board.h b/board/falco/board.h index 6cf4973213..69868fbc75 100644 --- a/board/falco/board.h +++ b/board/falco/board.h @@ -42,16 +42,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_PECI, - MODULE_PWM_FAN, - MODULE_UART, -}; - /* I2C ports */ #define I2C_PORT_BATTERY 0 #define I2C_PORT_CHARGER 0 diff --git a/board/host/board.h b/board/host/board.h index 2529e15bc1..9d2a8f88fe 100644 --- a/board/host/board.h +++ b/board/host/board.h @@ -21,12 +21,6 @@ #define CONFIG_WP_ACTIVE_HIGH -/* Module IDs */ -enum module_id { - MODULE_I2C, - MODULE_UART, -}; - enum gpio_signal { GPIO_EC_INT, GPIO_LID_OPEN, diff --git a/board/kirby/board.h b/board/kirby/board.h index 17ec881f7c..893730121c 100644 --- a/board/kirby/board.h +++ b/board/kirby/board.h @@ -29,17 +29,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LED_KIRBY, - MODULE_SPI, - MODULE_UART, - MODULE_ADC, - MODULE_CHIPSET, -}; - /* Keyboard output port list */ #define KB_OUT_PORT_LIST GPIO_D diff --git a/board/link/board.h b/board/link/board.h index 0dbe6efb98..cbf600001a 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -46,17 +46,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_PECI, - MODULE_PWM_FAN, - MODULE_PWM_KBLIGHT, - MODULE_UART, -}; - enum adc_channel { /* EC internal die temperature in degrees K. */ ADC_CH_EC_TEMP = 0, diff --git a/board/mccroskey/board.h b/board/mccroskey/board.h index 376037147e..7d4eefba2a 100644 --- a/board/mccroskey/board.h +++ b/board/mccroskey/board.h @@ -31,13 +31,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_UART, -}; - /* Keyboard output ports */ #define KB_OUT_PORT_LIST GPIO_C diff --git a/board/nyan/board.h b/board/nyan/board.h index 47752d9c2f..d31eae6b48 100644 --- a/board/nyan/board.h +++ b/board/nyan/board.h @@ -22,16 +22,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_POWER_LED, - MODULE_SPI, - MODULE_UART, - MODULE_CHIPSET, -}; - /* Keyboard output port list */ #define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C diff --git a/board/peppy/board.h b/board/peppy/board.h index 08acc14ffb..ac2958a3cc 100644 --- a/board/peppy/board.h +++ b/board/peppy/board.h @@ -45,16 +45,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_PECI, - MODULE_PWM_FAN, - MODULE_UART, -}; - /* I2C ports */ #define I2C_PORT_BATTERY 0 #define I2C_PORT_CHARGER 0 diff --git a/board/pit/board.h b/board/pit/board.h index 2763979567..f4fc68b06d 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -27,16 +27,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_POWER_LED, - MODULE_SPI, - MODULE_UART, - MODULE_CHIPSET, -}; - /* Keyboard output port list */ #define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C diff --git a/board/puppy/board.h b/board/puppy/board.h index 66f0cc1ae5..5e0b18a3b6 100644 --- a/board/puppy/board.h +++ b/board/puppy/board.h @@ -25,16 +25,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_POWER_LED, - MODULE_SPI, - MODULE_UART, - MODULE_CHIPSET, -}; - /* Keyboard output port list */ #define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C diff --git a/board/rambi/board.h b/board/rambi/board.h index 4531bdfc8d..09161df3f6 100644 --- a/board/rambi/board.h +++ b/board/rambi/board.h @@ -43,16 +43,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_SPI, - MODULE_PWM_LED, - MODULE_UART, -}; - /* I2C ports */ #define I2C_PORT_BATTERY 0 #define I2C_PORT_CHARGER 0 diff --git a/board/samus/board.h b/board/samus/board.h index a05f22a70f..3bf2f4621a 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -52,17 +52,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_PECI, - MODULE_PWM_FAN, - MODULE_PWM_KBLIGHT, - MODULE_UART, -}; - /* I2C ports */ #define I2C_PORT_BACKLIGHT 0 #define I2C_PORT_BATTERY 0 diff --git a/board/slippy/board.h b/board/slippy/board.h index 93c3d9aa4e..01c0ed5731 100644 --- a/board/slippy/board.h +++ b/board/slippy/board.h @@ -43,16 +43,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_LPC, - MODULE_PECI, - MODULE_PWM_FAN, - MODULE_UART, -}; - /* I2C ports */ #define I2C_PORT_BATTERY 0 #define I2C_PORT_CHARGER 0 diff --git a/board/snow/board.h b/board/snow/board.h index f0e1ed7b24..476fc551c9 100644 --- a/board/snow/board.h +++ b/board/snow/board.h @@ -36,14 +36,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_POWER_LED, - MODULE_UART, -}; - /* Keyboard output ports */ #define KB_OUT_PORT_LIST GPIO_B, GPIO_C diff --git a/board/spring/board.h b/board/spring/board.h index ef8e14f328..99ead90b7d 100644 --- a/board/spring/board.h +++ b/board/spring/board.h @@ -37,14 +37,6 @@ #ifndef __ASSEMBLER__ -/* Module IDs */ -/* TODO(rspangler): use this in place of enum console_channel as well */ -enum module_id { - MODULE_I2C, - MODULE_UART, - MODULE_EXTPOWER_USB, -}; - /* Keyboard output port list */ #define KB_OUT_PORT_LIST GPIO_B, GPIO_C diff --git a/include/common.h b/include/common.h index 03fd7affee..06888191fe 100644 --- a/include/common.h +++ b/include/common.h @@ -53,6 +53,9 @@ /* Include top-level configuration file */ #include "config.h" +/* Canonical list of module IDs */ +#include "module_id.h" + /* List of common error codes that can be returned */ enum ec_error_list { /* Success - no error */ diff --git a/include/module_id.h b/include/module_id.h new file mode 100644 index 0000000000..3094ecea7c --- /dev/null +++ b/include/module_id.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2013 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. + */ + +/* Module IDs for Chrome EC */ + +#ifndef __CROS_EC_MODULE_ID_H +#define __CROS_EC_MODULE_ID_H + +#include "common.h" + +enum module_id { + MODULE_ADC, + MODULE_CHARGER, + MODULE_CHIPSET, + MODULE_CLOCK, + MODULE_COMMAND, + MODULE_DMA, + MODULE_EXTPOWER, + MODULE_GPIO, + MODULE_HOOK, + MODULE_HOST_COMMAND, + MODULE_HOST_EVENT, + MODULE_I2C, + MODULE_KEYBOARD, + MODULE_KEYBOARD_SCAN, + MODULE_LED_KIRBY, + MODULE_LIGHTBAR, + MODULE_LPC, + MODULE_PECI, + MODULE_PMU, + MODULE_PORT80, + MODULE_POWER_LED, + MODULE_PWM_FAN, + MODULE_PWM_KBLIGHT, + MODULE_PWM_LED, + MODULE_SPI, + MODULE_SWITCH, + MODULE_SYSTEM, + MODULE_TASK, + MODULE_THERMAL, + MODULE_UART, + MODULE_USB_PORT_POWER, + MODULE_USB_SWITCH, + MODULE_VBOOT, + + /* Module count; not an actual module */ + MODULE_COUNT +}; + +#endif |