diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-05-02 19:46:16 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2012-05-02 21:36:40 +0000 |
commit | 702674438870732bbe3ddec4308d8f39f8a40370 (patch) | |
tree | a80abd611f34c0bf8a561a9844e9c5f4e777744c | |
parent | 5ee635cf496dba60e67d0d68a8ee563d97df1b4a (diff) | |
download | chrome-ec-702674438870732bbe3ddec4308d8f39f8a40370.tar.gz |
remove deprecated stm32-based boards
We no longer support ADV EVT0 board and Discovery reference design.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=make BOARD=daisy && make BOARD=link
Change-Id: I7eb81e5271c070b17f018ac9c14491f1804c0e08
-rw-r--r-- | board/adv/board.c | 77 | ||||
-rw-r--r-- | board/adv/board.h | 68 | ||||
-rw-r--r-- | board/adv/build.mk | 11 | ||||
-rw-r--r-- | board/adv/ec.tasklist | 20 | ||||
-rw-r--r-- | board/discovery/board.c | 67 | ||||
-rw-r--r-- | board/discovery/board.h | 62 | ||||
-rw-r--r-- | board/discovery/build.mk | 11 | ||||
-rw-r--r-- | board/discovery/ec.tasklist | 19 | ||||
-rw-r--r-- | chip/stm32/config-stm32l15x.h | 4 | ||||
-rw-r--r-- | chip/stm32/keyboard_scan.c | 6 | ||||
-rw-r--r-- | chip/stm32/spi.c | 2 | ||||
-rw-r--r-- | chip/stm32/watchdog.c | 6 | ||||
-rw-r--r-- | common/vboot.c | 4 |
13 files changed, 5 insertions, 352 deletions
diff --git a/board/adv/board.c b/board/adv/board.c deleted file mode 100644 index 9e3a4ff392..0000000000 --- a/board/adv/board.c +++ /dev/null @@ -1,77 +0,0 @@ -/* 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. - */ -/* ADV board-specific configuration */ - -#include "board.h" -#include "common.h" -#include "gpio.h" -#include "registers.h" -#include "util.h" - -#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH) -#define GPIO_KB_OUTPUT (GPIO_OUTPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN) - -/* GPIO interrupt handlers prototypes */ -#ifndef CONFIG_TASK_GAIAPOWER -#define gaia_power_event NULL -#else -void gaia_power_event(enum gpio_signal signal); -#endif -#ifndef CONFIG_TASK_KEYSCAN -#define matrix_interrupt NULL -#endif - -/* GPIO signal list. Must match order from enum gpio_signal. */ -const struct gpio_info gpio_list[GPIO_COUNT] = { - /* Inputs with interrupt handlers are first for efficiency */ - {"KB_PWR_ON", GPIO_A, (1<<0), GPIO_INT_BOTH, gaia_power_event}, - {"PP1800_LDO2", GPIO_A, (1<<1), GPIO_INT_BOTH, gaia_power_event}, - {"XPSHOLD", GPIO_A, (1<<11), GPIO_INT_RISING, gaia_power_event}, - {"CHARGER_INT", GPIO_B, (1<<0), GPIO_INT_RISING, NULL}, - {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_BOTH, NULL}, - {"KB_IN00", GPIO_C, (1<<8), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN01", GPIO_C, (1<<9), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN02", GPIO_C, (1<<10), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN03", GPIO_C, (1<<11), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN04", GPIO_C, (1<<12), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN05", GPIO_C, (1<<14), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN06", GPIO_C, (1<<15), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN07", GPIO_D, (1<<2), GPIO_KB_INPUT, matrix_interrupt}, - /* Other inputs */ - /* Outputs */ - {"EN_PP1350", GPIO_A, (1<<9), GPIO_OUT_LOW, NULL}, - {"EN_PP5000", GPIO_A, (1<<10), GPIO_OUT_LOW, NULL}, - {"EN_PP3300", GPIO_A, (1<<8), GPIO_OUT_LOW, NULL}, - {"PMIC_PWRON", GPIO_A, (1<<12), GPIO_OUT_HIGH, NULL}, - {"ENTERING_RW", GPIO_B, (1<<1), GPIO_OUT_LOW, NULL}, - {"CHARGER_EN", GPIO_B, (1<<2), GPIO_OUT_LOW, NULL}, - {"EC_INT", GPIO_B, (1<<9), GPIO_OUT_LOW, NULL}, - {"KB_OUT00", GPIO_B, (1<<5), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT01", GPIO_B, (1<<8), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT02", GPIO_B, (1<<12), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT03", GPIO_B, (1<<14), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT04", GPIO_B, (1<<15), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT05", GPIO_C, (1<<0), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT06", GPIO_C, (1<<2), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT07", GPIO_C, (1<<4), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT08", GPIO_C, (1<<5), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT09", GPIO_C, (1<<6), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT10", GPIO_B, (1<<13), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT11", GPIO_C, (1<<1), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT12", GPIO_C, (1<<7), GPIO_KB_OUTPUT, NULL}, - -}; - -void configure_board(void) -{ - /* Enable all GPIOs clocks - * TODO: more fine-grained enabling for power saving - */ - STM32_RCC_AHBENR |= 0x3f; - STM32_RCC_APB2ENR |= 0x01; - - /* Select Alternate function for USART2 on pins PA2/PA3 */ - gpio_set_alternate_function(GPIO_A, (1<<2) | (1<<3), GPIO_ALT_USART); -} diff --git a/board/adv/board.h b/board/adv/board.h deleted file mode 100644 index 91c4509304..0000000000 --- a/board/adv/board.h +++ /dev/null @@ -1,68 +0,0 @@ -/* 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. - */ - -/* ADV board configuration */ - -#ifndef __BOARD_H -#define __BOARD_H - -/* 16 MHz SYSCLK clock frequency */ -#define CPU_CLOCK 16000000 - -/* Use USART2 as console serial port */ -#define CONFIG_CONSOLE_UART 2 - -#define USB_CHARGE_PORT_COUNT 0 - -/* GPIO signal list */ -enum gpio_signal { - /* Inputs with interrupt handlers are first for efficiency */ - GPIO_KB_PWR_ON = 0, /* Power button */ - GPIO_PP1800_LDO2, /* LDO2 is ON (end of PMIC sequence) */ - GPIO_SOC1V8_XPSHOLD, /* App Processor ON */ - GPIO_CHARGER_INT, - GPIO_LID_OPEN, /* LID switch detection */ - /* Keyboard inputs */ - GPIO_KB_IN00, - GPIO_KB_IN01, - GPIO_KB_IN02, - GPIO_KB_IN03, - GPIO_KB_IN04, - GPIO_KB_IN05, - GPIO_KB_IN06, - GPIO_KB_IN07, - /* Other inputs */ - /* Outputs */ - GPIO_EN_PP1350, /* DDR 1.35v rail enable */ - GPIO_EN_PP5000, /* 5.0v rail enable */ - GPIO_EN_PP3300, /* 3.3v rail enable */ - GPIO_PMIC_PWRON, /* 5v rail ready */ - GPIO_EC_ENTERING_RW, /* EC is R/W mode for the kbc mux */ - GPIO_CHARGER_EN, - GPIO_EC_INT, - /* Keyboard outputs */ - GPIO_KB_OUT00, - GPIO_KB_OUT01, - GPIO_KB_OUT02, - GPIO_KB_OUT03, - GPIO_KB_OUT04, - GPIO_KB_OUT05, - GPIO_KB_OUT06, - GPIO_KB_OUT07, - GPIO_KB_OUT08, - GPIO_KB_OUT09, - GPIO_KB_OUT10, - GPIO_KB_OUT11, - GPIO_KB_OUT12, - - /* Number of GPIOs; not an actual GPIO */ - GPIO_COUNT -}; - -void configure_board(void); - -void matrix_interrupt(enum gpio_signal signal); - -#endif /* __BOARD_H */ diff --git a/board/adv/build.mk b/board/adv/build.mk deleted file mode 100644 index b09b1c7f4b..0000000000 --- a/board/adv/build.mk +++ /dev/null @@ -1,11 +0,0 @@ -# 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. -# -# Board specific files build - -# the IC is STmicro STM32L151R8H6 -CHIP:=stm32 -CHIP_VARIANT:=stm32l15x - -board-y=board.o diff --git a/board/adv/ec.tasklist b/board/adv/ec.tasklist deleted file mode 100644 index daf1a32c47..0000000000 --- a/board/adv/ec.tasklist +++ /dev/null @@ -1,20 +0,0 @@ -/* 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. - */ - -/** - * List of enabled tasks in the priority order - * - * The first one has the lowest priority. - * - * For each task, use the macro TASK(n, r, d) where : - * 'n' in the name of the task - * 'r' in the main routine of the task - * 'd' in an opaque parameter passed to the routine at startup - */ -#define CONFIG_TASK_LIST \ - TASK(WATCHDOG, watchdog_task, NULL) \ - TASK(KEYSCAN, keyboard_scan_task, NULL) \ - TASK(GAIAPOWER, gaia_power_task, NULL) \ - TASK(CONSOLE, console_task, NULL) diff --git a/board/discovery/board.c b/board/discovery/board.c deleted file mode 100644 index c44af27739..0000000000 --- a/board/discovery/board.c +++ /dev/null @@ -1,67 +0,0 @@ -/* 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. - */ -/* STM32L Discovery board-specific configuration */ - -#include "board.h" -#include "gpio.h" -#include "registers.h" -#include "util.h" - -#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH) -#define GPIO_KB_OUTPUT (GPIO_OUTPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN) - -#ifndef CONFIG_TASK_KEYSCAN -#define matrix_interrupt NULL -#endif - -/* GPIO signal list. Must match order from enum gpio_signal. */ -const struct gpio_info gpio_list[GPIO_COUNT] = { - /* Inputs with interrupt handlers are first for efficiency */ - {"USER_BUTTON", GPIO_A, (1<<0), GPIO_INT_BOTH, NULL}, - {"KB_IN00", GPIO_C, (1<<8), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN01", GPIO_C, (1<<9), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN02", GPIO_C, (1<<10), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN03", GPIO_C, (1<<11), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN04", GPIO_C, (1<<12), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN05", GPIO_C, (1<<14), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN06", GPIO_C, (1<<15), GPIO_KB_INPUT, matrix_interrupt}, - {"KB_IN07", GPIO_D, (1<<2), GPIO_KB_INPUT, matrix_interrupt}, - /* Other inputs */ - /* Outputs */ - {"BLUE_LED", GPIO_B, (1<<6), GPIO_OUT_LOW, NULL}, - {"GREEN_LED", GPIO_B, (1<<7), GPIO_OUT_LOW, NULL}, - {"KB_OUT00", GPIO_B, (1<<5), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT01", GPIO_B, (1<<8), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT02", GPIO_B, (1<<12), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT03", GPIO_B, (1<<13), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT04", GPIO_B, (1<<14), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT05", GPIO_B, (1<<15), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT06", GPIO_C, (1<<0), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT07", GPIO_C, (1<<1), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT08", GPIO_C, (1<<2), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT09", GPIO_A, (1<<1), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT10", GPIO_A, (1<<2), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT11", GPIO_C, (1<<6), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT12", GPIO_C, (1<<7), GPIO_KB_OUTPUT, NULL}, -}; - -void configure_board(void) -{ - /* Enable all GPIOs clocks in normal run-mode, enable keyboard - * GPIO clocks in low-power (sleep) mode. - * TODO: more fine-grained enabling for power saving - */ - STM32_RCC_AHBENR |= 0x3f; - STM32_RCC_AHBLPENR |= 0x0e; - STM32_RCC_APB2ENR |= 0x01; - -#if CONFIG_CONSOLE_UART == 1 - /* Select Alternate function for USART1 on pins PA9/PA10 */ - gpio_set_alternate_function(GPIO_A, (1<<9) | (1<<10), GPIO_ALT_USART); -#elif CONFIG_CONSOLE_UART == 3 - /* Select Alternate function for USART3 on pins PB10/PB11 */ - gpio_set_alternate_function(GPIO_B, (1<<10) | (1<<11), GPIO_ALT_USART); -#endif -} diff --git a/board/discovery/board.h b/board/discovery/board.h deleted file mode 100644 index 5b63e80abc..0000000000 --- a/board/discovery/board.h +++ /dev/null @@ -1,62 +0,0 @@ -/* 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. - */ - -/* STM32L Discovery board configuration */ - -#ifndef __BOARD_H -#define __BOARD_H - -/* 16 MHz SYSCLK clock frequency */ -#define CPU_CLOCK 16000000 - -/* Use USART3 as console serial port */ -#define CONFIG_CONSOLE_UART 1 - -#define USB_CHARGE_PORT_COUNT 0 - -/* Host connects to keyboard controller module via I2C */ -#define HOST_KB_BUS_I2C - -/* GPIO signal list */ -enum gpio_signal { - /* Inputs with interrupt handlers are first for efficiency */ - GPIO_USER_BUTTON = 0, /* Blue user button */ - /* Keyboard inputs */ - GPIO_KB_IN00, - GPIO_KB_IN01, - GPIO_KB_IN02, - GPIO_KB_IN03, - GPIO_KB_IN04, - GPIO_KB_IN05, - GPIO_KB_IN06, - GPIO_KB_IN07, - /* Other inputs */ - /* Outputs */ - GPIO_BLUE_LED, /* Blue debug LED */ - GPIO_GREEN_LED, /* Green debug LED */ - /* Keyboard outputs */ - GPIO_KB_OUT00, - GPIO_KB_OUT01, - GPIO_KB_OUT02, - GPIO_KB_OUT03, - GPIO_KB_OUT04, - GPIO_KB_OUT05, - GPIO_KB_OUT06, - GPIO_KB_OUT07, - GPIO_KB_OUT08, - GPIO_KB_OUT09, - GPIO_KB_OUT10, - GPIO_KB_OUT11, - GPIO_KB_OUT12, - - /* Number of GPIOs; not an actual GPIO */ - GPIO_COUNT -}; - -void configure_board(void); - -void matrix_interrupt(enum gpio_signal signal); - -#endif /* __BOARD_H */ diff --git a/board/discovery/build.mk b/board/discovery/build.mk deleted file mode 100644 index b09b1c7f4b..0000000000 --- a/board/discovery/build.mk +++ /dev/null @@ -1,11 +0,0 @@ -# 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. -# -# Board specific files build - -# the IC is STmicro STM32L151R8H6 -CHIP:=stm32 -CHIP_VARIANT:=stm32l15x - -board-y=board.o diff --git a/board/discovery/ec.tasklist b/board/discovery/ec.tasklist deleted file mode 100644 index 98f6cb5bfd..0000000000 --- a/board/discovery/ec.tasklist +++ /dev/null @@ -1,19 +0,0 @@ -/* 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. - */ - -/** - * List of enabled tasks in the priority order - * - * The first one has the lowest priority. - * - * For each task, use the macro TASK(n, r, d) where : - * 'n' in the name of the task - * 'r' in the main routine of the task - * 'd' in an opaque parameter passed to the routine at startup - */ -#define CONFIG_TASK_LIST \ - TASK(WATCHDOG, watchdog_task, NULL) \ - TASK(KEYSCAN, keyboard_scan_task, NULL) \ - TASK(CONSOLE, console_task, NULL) diff --git a/chip/stm32/config-stm32l15x.h b/chip/stm32/config-stm32l15x.h index eafe078f1e..7185505e21 100644 --- a/chip/stm32/config-stm32l15x.h +++ b/chip/stm32/config-stm32l15x.h @@ -20,11 +20,7 @@ #define CONFIG_IRQ_COUNT 45 /* Debug UART parameters for panic message */ -#ifdef BOARD_adv -#define CONFIG_UART_ADDRESS 0x40004400 /* USART2 */ -#else #define CONFIG_UART_ADDRESS 0x40013800 /* USART1 */ -#endif #define CONFIG_UART_DR_OFFSET 0x04 #define CONFIG_UART_SR_OFFSET 0x00 #define CONFIG_UART_SR_TXEMPTY 0x80 diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index aea32eae8c..adca58356a 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -66,10 +66,8 @@ struct kbc_gpio { int pin; }; -#if defined(BOARD_daisy) || defined(BOARD_adv) +#if defined(BOARD_daisy) static const uint32_t ports[] = { GPIO_B, GPIO_C, GPIO_D }; -#elif defined(BOARD_discovery) -static const uint32_t ports[] = { GPIO_A, GPIO_B, GPIO_C, GPIO_D }; #else #error "Need to specify GPIO ports used by keyboard" #endif @@ -183,7 +181,7 @@ static int check_keys_changed(void) udelay(50); r = 0; -#if defined(BOARD_daisy) || defined(BOARD_discovery) || defined(BOARD_adv) +#if defined(BOARD_daisy) tmp = STM32_GPIO_IDR(C); /* KB_COL00:04 = PC8:12 */ if (tmp & (1 << 8)) diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c index fd65c2d415..f0c67aaebd 100644 --- a/chip/stm32/spi.c +++ b/chip/stm32/spi.c @@ -157,7 +157,7 @@ static int spi_init(void) { int port; -#if defined(BOARD_discovery) || defined(BOARD_daisy) +#if defined(BOARD_daisy) /** * SPI1 * PA7: SPI1_MOSI diff --git a/chip/stm32/watchdog.c b/chip/stm32/watchdog.c index 9a2d76a422..ae5442f471 100644 --- a/chip/stm32/watchdog.c +++ b/chip/stm32/watchdog.c @@ -59,14 +59,8 @@ int watchdog_init(int period_ms) void watchdog_task(void) { while (1) { -#ifdef BOARD_discovery - gpio_set_level(GPIO_GREEN_LED, 1); -#endif usleep(500000); watchdog_reload(); -#ifdef BOARD_discovery - gpio_set_level(GPIO_GREEN_LED, 0); -#endif usleep(500000); watchdog_reload(); } diff --git a/common/vboot.c b/common/vboot.c index fa6c2c27aa..0b0a9ef3dc 100644 --- a/common/vboot.c +++ b/common/vboot.c @@ -37,8 +37,8 @@ static void jump_to_other_image(void) if (system_jumped_to_this_image()) return; -#if !defined(BOARD_daisy) && !defined(BOARD_discovery) && !defined(BOARD_adv) - /* TODO: (crosbug.com/p/8572) Daisy and discovery don't define a GPIO +#if !defined(BOARD_daisy) + /* TODO: (crosbug.com/p/8572) Daisy doesn't define a GPIO * for the recovery signal from servo, so can't check it. */ if (gpio_get_level(GPIO_RECOVERYn) == 0) { CPUTS("[Vboot staying in RO due to recovery signal]\n"); |