summaryrefslogtreecommitdiff
path: root/common/gpio.c
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-02-04 17:22:57 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-05 22:08:27 +0000
commit776e3203cc7ccc9d756d0d8f076b6fc9195cc2b2 (patch)
treecd6c5beac786234193b6dc9a98673f86629208b6 /common/gpio.c
parent324c0920e374aace54949d3b88cb5d741023a0ab (diff)
downloadchrome-ec-776e3203cc7ccc9d756d0d8f076b6fc9195cc2b2.tar.gz
common: move some structures from .rodata to .data
Move the GPIO tables and the USB PRL states from .rodata to .data on boards that support CONFIG_CHIP_DATA_IN_INIT_ROM. This saves 1600 to 1900 bytes of flash space (and reduces RAM space by the similar amount). Boards affected: delbin_npcx796fc eldrid_npcx796fc halvor lindar lingcod magolor_legacy malefor metaknight_legacy terrador todor trondo voema volteer_apmodeentry volteer waddledoo BUG=none BRANCH=none TEST=make buildall TEST=boot Volteer, run gpioget Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1a9f421981fb8db4d7ddd62b21d609a401862491 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2677087 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/gpio.c')
-rw-r--r--common/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/gpio.c b/common/gpio.c
index f89be2700d..42a9d2a2e6 100644
--- a/common/gpio.c
+++ b/common/gpio.c
@@ -38,7 +38,7 @@ struct gpio_alt_func {
{GPIO_##pinmask, .func = (function), .module_id = (module), \
.flags = (flagz)},
-static const struct gpio_alt_func gpio_alt_funcs[] = {
+static __const_data const struct gpio_alt_func gpio_alt_funcs[] = {
#include "gpio.wrap"
};