summaryrefslogtreecommitdiff
path: root/chip
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 /chip
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 'chip')
-rw-r--r--chip/g/config_chip.h3
-rw-r--r--chip/host/config_chip.h3
-rw-r--r--chip/it83xx/config_chip.h3
-rw-r--r--chip/lm4/config_chip.h3
-rw-r--r--chip/mec1322/config_chip.h3
-rw-r--r--chip/npcx/config_chip.h3
-rw-r--r--chip/nrf51/config_chip.h3
-rw-r--r--chip/stm32/config_chip.h3
8 files changed, 0 insertions, 24 deletions
diff --git a/chip/g/config_chip.h b/chip/g/config_chip.h
index 688ccb5582..938f3fdb1b 100644
--- a/chip/g/config_chip.h
+++ b/chip/g/config_chip.h
@@ -57,9 +57,6 @@
/* Larger task stack size, for hook task */
#define LARGER_TASK_STACK_SIZE 640
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/* Magic for gpio.inc */
#define GPIO_PIN(port, index) (port), (1 << (index))
#define GPIO_PIN_MASK(port, mask) (port), (mask)
diff --git a/chip/host/config_chip.h b/chip/host/config_chip.h
index 17bd46cf88..37ea9a9f44 100644
--- a/chip/host/config_chip.h
+++ b/chip/host/config_chip.h
@@ -32,9 +32,6 @@ extern char __host_flash[CONFIG_FLASH_SIZE];
/* Compute the rest of the flash params from these */
#include "config_std_internal_flash.h"
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/* Interval between HOOK_TICK notifications */
#define HOOK_TICK_INTERVAL_MS 250
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
diff --git a/chip/it83xx/config_chip.h b/chip/it83xx/config_chip.h
index e66ee01181..d0691ce98f 100644
--- a/chip/it83xx/config_chip.h
+++ b/chip/it83xx/config_chip.h
@@ -16,9 +16,6 @@
#define HOOK_TICK_INTERVAL_MS 500
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/* Default PLL frequency. */
#define PLL_CLOCK 48000000
diff --git a/chip/lm4/config_chip.h b/chip/lm4/config_chip.h
index 6157aa5ac6..0037fac515 100644
--- a/chip/lm4/config_chip.h
+++ b/chip/lm4/config_chip.h
@@ -23,9 +23,6 @@
#define HOOK_TICK_INTERVAL_MS 250
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/* Number of I2C ports */
#define I2C_PORT_COUNT 6
diff --git a/chip/mec1322/config_chip.h b/chip/mec1322/config_chip.h
index 6758c6cf3f..d06c1e78d3 100644
--- a/chip/mec1322/config_chip.h
+++ b/chip/mec1322/config_chip.h
@@ -20,9 +20,6 @@
#define HOOK_TICK_INTERVAL_MS 250
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/*
* Number of I2C controllers. Controller 0 has 2 ports, so the chip has one
* additional port.
diff --git a/chip/npcx/config_chip.h b/chip/npcx/config_chip.h
index f581aaf2bd..480b6c4e3b 100644
--- a/chip/npcx/config_chip.h
+++ b/chip/npcx/config_chip.h
@@ -26,9 +26,6 @@
#define HOOK_TICK_INTERVAL_MS 200
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/*
* Number of I2C controllers. Controller 0 has 2 ports, so the chip has one
* additional port.
diff --git a/chip/nrf51/config_chip.h b/chip/nrf51/config_chip.h
index 82ac548477..f14f292f77 100644
--- a/chip/nrf51/config_chip.h
+++ b/chip/nrf51/config_chip.h
@@ -24,9 +24,6 @@
#define HOOK_TICK_INTERVAL_MS 500
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/* Number of I2C ports */
#define I2C_PORT_COUNT 2
diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h
index 3246f5038e..f0d1fa85d1 100644
--- a/chip/stm32/config_chip.h
+++ b/chip/stm32/config_chip.h
@@ -78,9 +78,6 @@
#define HOOK_TICK_INTERVAL_MS 500
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
-/* Maximum number of deferrable functions */
-#define DEFERRABLE_MAX_COUNT 8
-
/* Number of I2C ports */
#define I2C_PORT_COUNT 2