summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2016-03-29 11:27:53 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-04-19 12:23:52 -0700
commit95858f385c35fbe6a95f0bad72ade9290b2a2d41 (patch)
tree1b856056c3eca8180839383c863f6ea6b55f7b4c /board
parent69668a04436700071bc2a26400f5f52f0e499020 (diff)
downloadchrome-ec-95858f385c35fbe6a95f0bad72ade9290b2a2d41.tar.gz
Deferred: Remove hard coded number of deferreds
Previously the maximum number of deferred routines was specified by the the default maximum number of deferred routines you had to override this, and if you wanted fewer, you still payed the price of having the defer_until array statically allocated to be the maximum size. This change removes that define and instead creates the RAM state of the deferred routine (the time to wait until to call the deferred) when the deferred is declared. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j manually test on discovery-stm32f072 Change-Id: Id3db84ee1795226b7818c57f68c1f637567831dc Reviewed-on: https://chromium-review.googlesource.com/335597 Commit-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/amenia/board.h3
-rw-r--r--board/chell/board.h3
-rw-r--r--board/elm/board.h3
-rw-r--r--board/glados/board.h3
-rw-r--r--board/kevin/board.h3
-rw-r--r--board/kunimitsu/board.h3
-rw-r--r--board/lars/board.h3
-rw-r--r--board/oak/board.h3
-rw-r--r--board/plankton/board.h3
-rw-r--r--board/rambi/board.h3
-rw-r--r--board/ryu/board.h4
-rw-r--r--board/samus/board.h3
-rw-r--r--board/samus_pd/board.h4
-rw-r--r--board/strago/board.h3
-rw-r--r--board/wheatley/board.h3
15 files changed, 0 insertions, 47 deletions
diff --git a/board/amenia/board.h b/board/amenia/board.h
index a6c6c3cc5e..8df5715165 100644
--- a/board/amenia/board.h
+++ b/board/amenia/board.h
@@ -141,9 +141,6 @@
/* Modules we want to exclude */
#undef CONFIG_PECI
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 15
-
#ifndef __ASSEMBLER__
#include "gpio_signal.h"
diff --git a/board/chell/board.h b/board/chell/board.h
index 66e360555d..8f34a955d4 100644
--- a/board/chell/board.h
+++ b/board/chell/board.h
@@ -136,9 +136,6 @@
#undef CONFIG_CMD_TIMERINFO
#undef CONFIG_CONSOLE_CMDHELP
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 16
-
#ifndef __ASSEMBLER__
#include "gpio_signal.h"
diff --git a/board/elm/board.h b/board/elm/board.h
index c475da8224..29569d5d36 100644
--- a/board/elm/board.h
+++ b/board/elm/board.h
@@ -107,9 +107,6 @@
#define CONFIG_USB_SWITCH_PI3USB9281
#define CONFIG_USB_SWITCH_PI3USB9281_CHIP_COUNT 1
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 14
-
/* Optional features */
#define CONFIG_CMD_HOSTCMD
diff --git a/board/glados/board.h b/board/glados/board.h
index b10d6238ea..88efe47cdf 100644
--- a/board/glados/board.h
+++ b/board/glados/board.h
@@ -144,9 +144,6 @@
#undef CONFIG_CMD_TIMERINFO
#undef CONFIG_CONSOLE_CMDHELP
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 17
-
#ifndef __ASSEMBLER__
#include "gpio_signal.h"
diff --git a/board/kevin/board.h b/board/kevin/board.h
index f70617af77..1e955e3f99 100644
--- a/board/kevin/board.h
+++ b/board/kevin/board.h
@@ -86,9 +86,6 @@
#undef CONFIG_PSTORE
#undef CONFIG_LOW_POWER_IDLE /* Deep Sleep Support */
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 10
-
#define I2C_PORT_TCPC0 NPCX_I2C_PORT0_0
#define I2C_PORT_TCPC1 NPCX_I2C_PORT0_1
#define I2C_PORT_CHARGER NPCX_I2C_PORT2
diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h
index 8e7d7b2225..2d4b644888 100644
--- a/board/kunimitsu/board.h
+++ b/board/kunimitsu/board.h
@@ -134,9 +134,6 @@
#define I2C_PORT_PMIC MEC1322_I2C0_0
#define I2C_PORT_USB_CHARGER_2 MEC1322_I2C0_0
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 17
-
#define CONFIG_ALS
#define CONFIG_ALS_OPT3001
#define OPT3001_I2C_ADDR OPT3001_I2C_ADDR1
diff --git a/board/lars/board.h b/board/lars/board.h
index e79ef88f54..e286c72fd9 100644
--- a/board/lars/board.h
+++ b/board/lars/board.h
@@ -129,9 +129,6 @@
#define I2C_PORT_CHARGER MEC1322_I2C3
#define I2C_PORT_THERMAL MEC1322_I2C3
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 15
-
/* Modules we want to exclude */
#undef CONFIG_CMD_ACCEL_INFO
#undef CONFIG_CMD_ACCELS
diff --git a/board/oak/board.h b/board/oak/board.h
index 5905d3aa0d..6480c0e8c4 100644
--- a/board/oak/board.h
+++ b/board/oak/board.h
@@ -118,9 +118,6 @@
#undef CONFIG_UART_TX_DMA
#undef CONFIG_UART_RX_DMA
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 13
-
/*
* Allow dangerous commands.
* TODO: Remove this config before production.
diff --git a/board/plankton/board.h b/board/plankton/board.h
index 1fc193d35d..1c900d4851 100644
--- a/board/plankton/board.h
+++ b/board/plankton/board.h
@@ -52,9 +52,6 @@
*/
#define CONFIG_SYSTEM_UNLOCKED
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 9
-
#ifndef __ASSEMBLER__
/* Timer selection */
diff --git a/board/rambi/board.h b/board/rambi/board.h
index 76ba1691f2..6a7a4be26d 100644
--- a/board/rambi/board.h
+++ b/board/rambi/board.h
@@ -50,9 +50,6 @@
#define CONFIG_WIRELESS_SUSPEND \
(EC_WIRELESS_SWITCH_WLAN | EC_WIRELESS_SWITCH_WLAN_POWER)
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 8
-
#ifndef __ASSEMBLER__
/* I2C ports */
diff --git a/board/ryu/board.h b/board/ryu/board.h
index e4dc8401c8..3c5be953ba 100644
--- a/board/ryu/board.h
+++ b/board/ryu/board.h
@@ -194,10 +194,6 @@
/* Depends on how fast the AP boots and typical ODRs */
#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3)
-/* Maximum number of deferrable functions */
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 16
-
#ifndef __ASSEMBLER__
int board_get_version(void);
diff --git a/board/samus/board.h b/board/samus/board.h
index a9221f2de9..09d8987ca3 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -86,9 +86,6 @@
(EC_WIRELESS_SWITCH_WLAN | EC_WIRELESS_SWITCH_WLAN_POWER)
/* Do we want EC_WIRELESS_SWITCH_WWAN as well? */
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 9
-
#ifndef __ASSEMBLER__
/* I2C ports */
diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h
index e0a7b4e929..6d1859db50 100644
--- a/board/samus_pd/board.h
+++ b/board/samus_pd/board.h
@@ -88,10 +88,6 @@
#define CONFIG_HOSTCMD_I2C_SLAVE_ADDR CONFIG_USB_PD_I2C_SLAVE_ADDR
#endif
-/* Maximum number of deferrable functions */
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 10
-
#ifndef __ASSEMBLER__
/* Timer selection */
diff --git a/board/strago/board.h b/board/strago/board.h
index 2fd14e0ad6..aa3d6d57c8 100644
--- a/board/strago/board.h
+++ b/board/strago/board.h
@@ -94,9 +94,6 @@
/* Number of buttons */
#define CONFIG_BUTTON_COUNT 2
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 13
-
#define CONFIG_ADC
/* Modules we want to exclude */
diff --git a/board/wheatley/board.h b/board/wheatley/board.h
index 6b3c6462a7..62b4efa777 100644
--- a/board/wheatley/board.h
+++ b/board/wheatley/board.h
@@ -146,9 +146,6 @@
#undef CONFIG_CMD_TIMERINFO
#undef CONFIG_CONSOLE_CMDHELP
-#undef DEFERRABLE_MAX_COUNT
-#define DEFERRABLE_MAX_COUNT 15
-
#ifndef __ASSEMBLER__
#include "gpio_signal.h"