diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-04-19 12:42:35 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-04-19 13:08:58 -0700 |
commit | f4e772708bde3e4e1d184190a7f0be2417d2029a (patch) | |
tree | 4b668c02a9a6dca2704e6d0a8b3cb8e5c9e95b76 | |
parent | d5d2159c6d215b3a0feca42d961985cd37603ca8 (diff) | |
download | chrome-ec-f4e772708bde3e4e1d184190a7f0be2417d2029a.tar.gz |
Added HOOK_INIT for driver module inits
This covers modules which need to initialize before task_start(), but
don't particularly care in what order they're initialized.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=if it boots, it works
Change-Id: I69829aac8d1c3c14ee04916a794b84bbf03a09eb
-rw-r--r-- | chip/lm4/adc.c | 9 | ||||
-rw-r--r-- | chip/lm4/gpio.c | 4 | ||||
-rw-r--r-- | chip/lm4/i2c.c | 3 | ||||
-rw-r--r-- | chip/lm4/lpc.c | 4 | ||||
-rw-r--r-- | chip/lm4/onewire.c | 6 | ||||
-rw-r--r-- | chip/lm4/peci.c | 3 | ||||
-rw-r--r-- | chip/lm4/power_button.c | 4 | ||||
-rw-r--r-- | chip/lm4/pwm.c | 4 | ||||
-rw-r--r-- | chip/stm32l/gpio.c | 4 | ||||
-rw-r--r-- | chip/stm32l/i2c.c | 7 | ||||
-rw-r--r-- | chip/stm32l/spi.c | 13 | ||||
-rw-r--r-- | common/hooks.c | 6 | ||||
-rw-r--r-- | common/main.c | 54 | ||||
-rw-r--r-- | common/usb_charge.c | 13 | ||||
-rw-r--r-- | core/cortex-m/ec.lds.S | 4 | ||||
-rw-r--r-- | include/adc.h | 6 | ||||
-rw-r--r-- | include/gpio.h | 3 | ||||
-rw-r--r-- | include/hooks.h | 2 | ||||
-rw-r--r-- | include/i2c.h | 3 | ||||
-rw-r--r-- | include/lpc.h | 24 | ||||
-rw-r--r-- | include/onewire.h | 3 | ||||
-rw-r--r-- | include/peci.h | 3 | ||||
-rw-r--r-- | include/power_button.h | 5 | ||||
-rw-r--r-- | include/pwm.h | 6 | ||||
-rw-r--r-- | include/spi.h | 3 | ||||
-rw-r--r-- | include/usb_charge.h | 2 |
26 files changed, 79 insertions, 119 deletions
diff --git a/chip/lm4/adc.c b/chip/lm4/adc.c index eb09235351..18f8dbe3a7 100644 --- a/chip/lm4/adc.c +++ b/chip/lm4/adc.c @@ -8,6 +8,7 @@ #include "adc.h" #include "console.h" #include "gpio.h" +#include "hooks.h" #include "lm4_adc.h" #include "registers.h" #include "task.h" @@ -47,6 +48,7 @@ const uint32_t ain_port[24][2] = { {LM4_GPIO_N, (1<<0)}, }; + static void configure_gpio(void) { int i; @@ -66,6 +68,7 @@ static void configure_gpio(void) } } + int lm4_adc_flush_and_read(enum lm4_adc_sequencer seq) { /* TODO: right now we have only a single channel so this is @@ -107,6 +110,7 @@ int lm4_adc_flush_and_read(enum lm4_adc_sequencer seq) return LM4_ADC_SSFIFO(seq); } + int lm4_adc_configure(enum lm4_adc_sequencer seq, int ain_id, int ssctl) @@ -133,6 +137,7 @@ int lm4_adc_configure(enum lm4_adc_sequencer seq, return EC_SUCCESS; } + int adc_read_channel(enum adc_channel ch) { const struct adc_t *adc = adc_channels + ch; @@ -181,6 +186,7 @@ static int command_ectemp(int argc, char **argv) } DECLARE_CONSOLE_COMMAND(ectemp, command_ectemp); + static int command_adc(int argc, char **argv) { int i; @@ -197,7 +203,7 @@ DECLARE_CONSOLE_COMMAND(adc, command_adc); /*****************************************************************************/ /* Initialization */ -int adc_init(void) +static int adc_init(void) { int i; const struct adc_t *adc; @@ -231,3 +237,4 @@ int adc_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, adc_init, HOOK_PRIO_DEFAULT); diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c index a7c4f96163..114e1a37a1 100644 --- a/chip/lm4/gpio.c +++ b/chip/lm4/gpio.c @@ -7,6 +7,7 @@ #include "board.h" #include "gpio.h" +#include "hooks.h" #include "power_button.h" #include "registers.h" #include "task.h" @@ -116,7 +117,7 @@ int gpio_pre_init(void) } -int gpio_init(void) +static int gpio_init(void) { /* Enable IRQs now that pins are set up */ task_enable_irq(LM4_IRQ_GPIOA); @@ -141,6 +142,7 @@ int gpio_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); void gpio_set_alternate_function(int port, int mask, int func) diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c index c712adf641..8a5a93b3c8 100644 --- a/chip/lm4/i2c.c +++ b/chip/lm4/i2c.c @@ -437,7 +437,7 @@ static void configure_gpio(void) } -int i2c_init(void) +static int i2c_init(void) { volatile uint32_t scratch __attribute__((unused)); int i; @@ -474,3 +474,4 @@ int i2c_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, i2c_init, HOOK_PRIO_DEFAULT); diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 647ed67e7d..c8b45df798 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -7,6 +7,7 @@ #include "board.h" #include "gpio.h" +#include "hooks.h" #include "host_command.h" #include "i8042.h" #include "lpc.h" @@ -105,7 +106,7 @@ static void lpc_generate_sci(void) } -int lpc_init(void) +static int lpc_init(void) { volatile uint32_t scratch __attribute__((unused)); @@ -200,6 +201,7 @@ int lpc_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, lpc_init, HOOK_PRIO_DEFAULT); uint8_t *lpc_get_host_range(int slot) diff --git a/chip/lm4/onewire.c b/chip/lm4/onewire.c index 3cfb7c7401..d505ff5c08 100644 --- a/chip/lm4/onewire.c +++ b/chip/lm4/onewire.c @@ -7,8 +7,9 @@ #include "board.h" #include "gpio.h" -#include "timer.h" +#include "hooks.h" #include "registers.h" +#include "timer.h" #define ONEWIRE_PIN (1<<2) /* One-wire pin mask (on GPIO H) */ @@ -131,10 +132,11 @@ static void configure_gpio(void) } -int onewire_init(void) +static int onewire_init(void) { /* Configure GPIOs */ configure_gpio(); return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, onewire_init, HOOK_PRIO_DEFAULT); diff --git a/chip/lm4/peci.c b/chip/lm4/peci.c index 0e7540fa10..8accb1d1d5 100644 --- a/chip/lm4/peci.c +++ b/chip/lm4/peci.c @@ -114,7 +114,7 @@ DECLARE_CONSOLE_COMMAND(pecitemp, command_peci_temp); /*****************************************************************************/ /* Initialization */ -int peci_init(void) +static int peci_init(void) { volatile uint32_t scratch __attribute__((unused)); @@ -130,3 +130,4 @@ int peci_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, peci_init, HOOK_PRIO_DEFAULT); diff --git a/chip/lm4/power_button.c b/chip/lm4/power_button.c index d4752f8311..837c67c214 100644 --- a/chip/lm4/power_button.c +++ b/chip/lm4/power_button.c @@ -9,6 +9,7 @@ #include "console.h" #include "eoption.h" #include "gpio.h" +#include "hooks.h" #include "keyboard.h" #include "keyboard_scan.h" #include "lpc.h" @@ -287,7 +288,7 @@ void power_button_interrupt(enum gpio_signal signal) } -int power_button_init(void) +static int power_button_init(void) { /* Set up memory-mapped switch positions */ memmap_switches = lpc_get_memmap_range() + EC_LPC_MEMMAP_SWITCHES; @@ -331,6 +332,7 @@ int power_button_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, power_button_init, HOOK_PRIO_DEFAULT); void power_button_task(void) diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c index 7fc95f0124..0a37ffc5b8 100644 --- a/chip/lm4/pwm.c +++ b/chip/lm4/pwm.c @@ -8,6 +8,7 @@ #include "board.h" #include "console.h" #include "gpio.h" +#include "hooks.h" #include "pwm.h" #include "registers.h" #include "uart.h" @@ -272,7 +273,7 @@ DECLARE_CONSOLE_COMMAND(kblight, command_kblight); /*****************************************************************************/ /* Initialization */ -int pwm_init(void) +static int pwm_init(void) { volatile uint32_t scratch __attribute__((unused)); @@ -324,3 +325,4 @@ int pwm_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, pwm_init, HOOK_PRIO_DEFAULT); diff --git a/chip/stm32l/gpio.c b/chip/stm32l/gpio.c index bbde5ab741..0f3e7f44a5 100644 --- a/chip/stm32l/gpio.c +++ b/chip/stm32l/gpio.c @@ -7,6 +7,7 @@ #include "board.h" #include "gpio.h" +#include "hooks.h" #include "registers.h" #include "task.h" #include "uart.h" @@ -66,7 +67,7 @@ int gpio_pre_init(void) } -int gpio_init(void) +static int gpio_init(void) { /* Enable IRQs now that pins are set up */ task_enable_irq(STM32L_IRQ_EXTI0); @@ -79,6 +80,7 @@ int gpio_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); void gpio_set_alternate_function(int port, int mask, int func) diff --git a/chip/stm32l/i2c.c b/chip/stm32l/i2c.c index 98d15525fa..ccf7dba63e 100644 --- a/chip/stm32l/i2c.c +++ b/chip/stm32l/i2c.c @@ -7,8 +7,9 @@ #include "common.h" #include "console.h" #include "gpio.h" +#include "hooks.h" #include "i2c.h" -#include <message.h> +#include "message.h" #include "registers.h" #include "task.h" #include "uart.h" @@ -222,7 +223,8 @@ static int i2c_init2(void) return EC_SUCCESS; } -int i2c_init(void) + +static int i2c_init(void) { int rc = 0; @@ -230,3 +232,4 @@ int i2c_init(void) rc |= i2c_init2(); return rc; } +DECLARE_HOOK(HOOK_INIT, i2c_init, HOOK_PRIO_DEFAULT); diff --git a/chip/stm32l/spi.c b/chip/stm32l/spi.c index c3878b50d2..76d64eee94 100644 --- a/chip/stm32l/spi.c +++ b/chip/stm32l/spi.c @@ -1,16 +1,16 @@ -/* +/* Copyright (c) 2012 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. + * * SPI driver for Chrome EC. * * This uses DMA although not in an optimal way yet. - * - * Copyright (c) 2012 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 "console.h" #include "dma.h" #include "gpio.h" +#include "hooks.h" #include "message.h" #include "registers.h" #include "spi.h" @@ -154,7 +154,7 @@ static void spi1_interrupt(void) { spi_interrupt(STM32L_SPI1_PORT); }; DECLARE_IRQ(STM32L_IRQ_SPI1, spi1_interrupt, 2); -int spi_init(void) +static int spi_init(void) { int port; @@ -186,3 +186,4 @@ int spi_init(void) #endif return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, spi_init, HOOK_PRIO_DEFAULT); diff --git a/common/hooks.c b/common/hooks.c index 94bf2627fb..58ff10546a 100644 --- a/common/hooks.c +++ b/common/hooks.c @@ -10,6 +10,8 @@ #include "util.h" /* Hooks are described in special sections */ +extern const struct hook_data __hooks_init[]; +extern const struct hook_data __hooks_init_end[]; extern const struct hook_data __hooks_freq_change[]; extern const struct hook_data __hooks_freq_change_end[]; @@ -23,6 +25,10 @@ int hook_notify(enum hook_type type, int stop_on_error) /* Get the start and end pointers for the hook type */ switch (type) { + case HOOK_INIT: + start = __hooks_init; + end = __hooks_init_end; + break; case HOOK_FREQ_CHANGE: start = __hooks_freq_change; end = __hooks_freq_change_end; diff --git a/common/main.c b/common/main.c index 606a04d830..ce3d6fad68 100644 --- a/common/main.c +++ b/common/main.c @@ -5,36 +5,20 @@ * Main routine for Chrome EC */ -#include "adc.h" -#include "charger.h" -#include "chip_temp_sensor.h" #include "clock.h" #include "config.h" -#include "console.h" #include "eeprom.h" #include "eoption.h" #include "flash.h" #include "gpio.h" -#include "i2c.h" +#include "hooks.h" #include "jtag.h" #include "keyboard.h" #include "keyboard_scan.h" -#include "lpc.h" -#include "memory_commands.h" -#include "onewire.h" -#include "peci.h" -#include "port80.h" -#include "power_button.h" -#include "powerdemo.h" -#include "pwm.h" -#include "spi.h" #include "system.h" #include "task.h" -#include "temp_sensor.h" -#include "tmp006.h" #include "timer.h" #include "uart.h" -#include "usb_charge.h" #include "vboot.h" #include "watchdog.h" @@ -114,38 +98,12 @@ int main(void) * RO image and once in the RW image. */ vboot_init(); - /* Initialize driver modules. These can occur in any order. State - * machines are initialized in their task functions, not here. */ + /* TODO: reduce core clock now that vboot is done */ - gpio_init(); - -#ifdef CONFIG_LPC - lpc_init(); -#endif -#ifdef CONFIG_SPI - spi_init(); -#endif -#ifdef CONFIG_PWM - pwm_init(); -#endif -#ifdef CONFIG_I2C - i2c_init(); -#endif -#ifdef CONFIG_TASK_POWERBTN - power_button_init(); -#endif -#ifdef CONFIG_ADC - adc_init(); -#endif -#ifdef CONFIG_ONEWIRE - onewire_init(); -#endif -#ifdef CONFIG_PECI - peci_init(); -#endif -#ifdef CONFIG_USB_CHARGE - usb_charge_init(); -#endif + /* Initialize other driver modules. These can occur in any order. + * Non-driver modules with tasks do their inits from their task + * functions, not here. */ + hook_notify(HOOK_INIT, 0); /* Print the init time and reset cause. Init time isn't completely * accurate because it can't take into account the time for the first diff --git a/common/usb_charge.c b/common/usb_charge.c index 883bae5039..f14cfe393d 100644 --- a/common/usb_charge.c +++ b/common/usb_charge.c @@ -5,11 +5,12 @@ /* USB charging control module for Chrome EC */ -#include "usb_charge.h" #include "board.h" +#include "console.h" #include "gpio.h" +#include "hooks.h" #include "uart.h" -#include "console.h" +#include "usb_charge.h" #include "util.h" static void usb_charge_set_control_mode(int port_id, int mode) @@ -26,6 +27,7 @@ static void usb_charge_set_control_mode(int port_id, int mode) } } + static void usb_charge_set_enabled(int port_id, int en) { if (port_id == 0) @@ -34,6 +36,7 @@ static void usb_charge_set_enabled(int port_id, int en) gpio_set_level(GPIO_USB2_ENABLE, en); } + static void usb_charge_set_ilim(int port_id, int sel) { if (port_id == 0) @@ -42,6 +45,7 @@ static void usb_charge_set_ilim(int port_id, int sel) gpio_set_level(GPIO_USB2_ILIM_SEL, sel); } + int usb_charge_set_mode(int port_id, enum usb_charge_mode mode) { if (port_id >= USB_CHARGE_PORT_COUNT) @@ -77,7 +81,6 @@ int usb_charge_set_mode(int port_id, enum usb_charge_mode mode) return EC_SUCCESS; } - /*****************************************************************************/ /* Console commands */ @@ -114,11 +117,10 @@ static int command_set_mode(int argc, char **argv) } DECLARE_CONSOLE_COMMAND(usbchargemode, command_set_mode); - /*****************************************************************************/ /* Initialization */ -int usb_charge_init(void) +static int usb_charge_init(void) { int i; @@ -127,3 +129,4 @@ int usb_charge_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, usb_charge_init, HOOK_PRIO_DEFAULT); diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 21fddb3f5e..048b540c02 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -46,11 +46,13 @@ SECTIONS __hcmds_end = .; . = ALIGN(4); + __hooks_init = .; + *(.rodata.HOOK_INIT) + __hooks_init_end = .; __hooks_freq_change = .; *(.rodata.HOOK_FREQ_CHANGE) __hooks_freq_change_end = .; - . = ALIGN(4); *(.rodata*) . = ALIGN(4); diff --git a/include/adc.h b/include/adc.h index 5ce79d172e..661baca292 100644 --- a/include/adc.h +++ b/include/adc.h @@ -11,9 +11,6 @@ #include "common.h" #include "board.h" -/* forward declaration */ -enum adc_channel; - /* Data structure to define ADC channels. */ struct adc_t { @@ -26,9 +23,6 @@ struct adc_t int flag; }; -/* Initializes the module. */ -int adc_init(void); - /* Read ADC channel. */ int adc_read_channel(enum adc_channel ch); diff --git a/include/gpio.h b/include/gpio.h index 6eab4f1583..23cd1e9537 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -59,9 +59,6 @@ struct gpio_info { * set up. */ int gpio_pre_init(void); -/* Initializes the GPIO module. */ -int gpio_init(void); - /* Gets the current value of a signal (0=low, 1=hi). */ int gpio_get_level(enum gpio_signal signal); diff --git a/include/hooks.h b/include/hooks.h index 3d3a834e25..889cf553bc 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -16,7 +16,9 @@ enum hook_priority { HOOK_PRIO_LAST = 9999 /* Lowest priority */ }; + enum hook_type { + HOOK_INIT, /* System init */ HOOK_FREQ_CHANGE, /* System clock changed frequency */ }; diff --git a/include/i2c.h b/include/i2c.h index 7543d8cb25..5dfedaa7e2 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -13,9 +13,6 @@ /* Flags for slave address field, in addition to the 8-bit address */ #define I2C_FLAG_BIG_ENDIAN 0x100 /* 16 byte values are MSB-first */ -/* Initialize the module. */ -int i2c_init(void); - /* Read a 16-bit register from the slave at 8-bit slave address <slaveaddr>, at * the specified 8-bit <offset> in the slave's address space. */ int i2c_read16(int port, int slave_addr, int offset, int* data); diff --git a/include/lpc.h b/include/lpc.h index 17a78cc9cb..295522ad1f 100644 --- a/include/lpc.h +++ b/include/lpc.h @@ -10,26 +10,22 @@ #include "common.h" -/* Manually generates an IRQ to host. +/* Manually generate an IRQ to host. * Note that the irq_num == 0 would set the AH bit (Active High). */ void lpc_manual_irq(int irq_num); -/* Initializes the LPC module. */ -int lpc_init(void); - -/* Returns a pointer to the host command data buffer. This buffer - * must only be accessed between a notification to - * host_command_received() and a subsequent call to - * lpc_SendHostResponse(). <slot> is 0 for kernel-originated - * commands, 1 for usermode-originated commands. */ +/* Return a pointer to the host command data buffer. This buffer must + * only be accessed between a notification to host_command_received() + * and a subsequent call to lpc_SendHostResponse(). <slot> is 0 for + * kernel-originated commands, 1 for usermode-originated commands. */ uint8_t *lpc_get_host_range(int slot); -/* Returns a pointer to the memory-mapped buffer. This buffer is writable at +/* Return a pointer to the memory-mapped buffer. This buffer is writable at * any time, and the host can read it at any time. */ uint8_t *lpc_get_memmap_range(void); -/* Sends a result code to a host command. <slot> is 0 for kernel-originated +/* Send a result code to a host command. <slot> is 0 for kernel-originated * commands, 1 for usermode-originated commands. */ void lpc_send_host_response(int slot, int result); @@ -39,13 +35,13 @@ int lpc_keyboard_has_char(void); /* Send a byte to host via port 0x60 and asserts IRQ if specified. */ void lpc_keyboard_put_char(uint8_t chr, int send_irq); -/* Returns non-zero if the COMx interface has received a character. */ +/* Return non-zero if the COMx interface has received a character. */ int lpc_comx_has_char(void); -/* Returns the next character pending on the COMx interface. */ +/* Return the next character pending on the COMx interface. */ int lpc_comx_get_char(void); -/* Puts a character to the COMx LPC interface. */ +/* Put a character to the COMx LPC interface. */ void lpc_comx_put_char(int c); /* Types of host events */ diff --git a/include/onewire.h b/include/onewire.h index b7120dca90..f28abdd9b4 100644 --- a/include/onewire.h +++ b/include/onewire.h @@ -17,9 +17,6 @@ #include "common.h" -/* Initialize the module. */ -int onewire_init(void); - /* Reset the 1-wire bus. Returns error if presence detect fails. */ int onewire_reset(void); diff --git a/include/peci.h b/include/peci.h index 1ad0d92bad..e24a3d0c15 100644 --- a/include/peci.h +++ b/include/peci.h @@ -10,9 +10,6 @@ #include "common.h" -/* Initialize the module. */ -int peci_init(void); - /* Return the current CPU temperature in degrees K, or -1 if error. * * Note that the PECI interface is currently a little flaky; if you get an diff --git a/include/power_button.h b/include/power_button.h index c6cf4f4e24..b25b90661a 100644 --- a/include/power_button.h +++ b/include/power_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +/* Copyright (c) 2012 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. */ @@ -11,9 +11,6 @@ #include "common.h" #include "gpio.h" -/* Initializes the module. */ -int power_button_init(void); - /* Interrupt handler for the power button and lid switch. Passed the signal * which triggered the interrupt. */ void power_button_interrupt(enum gpio_signal signal); diff --git a/include/pwm.h b/include/pwm.h index 26e5fa4686..edea50e954 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -10,9 +10,6 @@ #include "common.h" -/* Initialize the module. */ -int pwm_init(void); - /* Enable/disable the fan. This should be called by whatever function * enables the power supply to the fan. */ int pwm_enable_fan(int enable); @@ -35,7 +32,4 @@ int pwm_get_keyboard_backlight(void); /* Set the keyboard backlight percentage (0=off, 100=max). */ int pwm_set_keyboard_backlight(int percent); -/* Set the power LED brightness to the specified percent (0=off, 100=max). */ -int pwm_set_power_led(int percent); - #endif /* __CROS_EC_PWM_H */ diff --git a/include/spi.h b/include/spi.h index 45ea75231f..00482db7e2 100644 --- a/include/spi.h +++ b/include/spi.h @@ -8,7 +8,4 @@ #ifndef __CROS_EC_SPI_H #define __CROS_EC_SPI_H -/* Initialize the SPI module ready for use */ -extern int spi_init(void); - #endif /* __CROS_EC_SPI_H */ diff --git a/include/usb_charge.h b/include/usb_charge.h index 0b3b7a497f..b73f57a684 100644 --- a/include/usb_charge.h +++ b/include/usb_charge.h @@ -29,6 +29,4 @@ enum usb_charge_mode { int usb_charge_set_mode(int usb_port_id, enum usb_charge_mode); -int usb_charge_init(void); - #endif /* __CROS_EC_USB_CHARGE_H */ |