summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_x1000/gpio-x1000.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-12-03 16:17:43 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-12-31 08:10:41 -0500
commit484a79fcc0bb762acc1c3a502b237a68588ab4ab (patch)
treeb27aac3480ee800bd9690c7637c53af03310961a /firmware/target/mips/ingenic_x1000/gpio-x1000.c
parenta980d5f86951dca03baa447fd5a58005ba47a098 (diff)
downloadrockbox-484a79fcc0.tar.gz
rockbox-484a79fcc0.zip
x1000: Add INIT_ATTR to various target specific functions
Add INIT_ATTR to some low-hanging fruit in the X1000 code: GPIO init, GPIO initial state tables, clock init, and DMA init. Change-Id: Ia02b20945da1bbed103e2e01eaf60553eb5f72d4
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/gpio-x1000.c')
-rw-r--r--firmware/target/mips/ingenic_x1000/gpio-x1000.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_x1000/gpio-x1000.c b/firmware/target/mips/ingenic_x1000/gpio-x1000.c
index 14195359df..0ebe424566 100644
--- a/firmware/target/mips/ingenic_x1000/gpio-x1000.c
+++ b/firmware/target/mips/ingenic_x1000/gpio-x1000.c
@@ -21,7 +21,7 @@
#include "gpio-x1000.h"
-const struct gpio_setting gpio_settings[PIN_COUNT] = {
+static const struct gpio_setting gpio_settings[PIN_COUNT] INITDATA_ATTR = {
#define DEFINE_GPIO(_name, _gpio, _func) \
{.gpio = _gpio, .func = _func},
#define DEFINE_PINGROUP(...)
@@ -30,7 +30,7 @@ const struct gpio_setting gpio_settings[PIN_COUNT] = {
#undef DEFINE_PINGROUP
};
-const struct pingroup_setting pingroup_settings[PINGROUP_COUNT] = {
+static const struct pingroup_setting pingroup_settings[PINGROUP_COUNT] INITDATA_ATTR = {
#define DEFINE_GPIO(...)
#define DEFINE_PINGROUP(_name, _port, _pins, _func) \
{.port = _port, .pins = _pins, .func = _func},
@@ -39,7 +39,8 @@ const struct pingroup_setting pingroup_settings[PINGROUP_COUNT] = {
#undef DEFINE_PINGROUP
};
-const char* const gpio_names[PIN_COUNT] = {
+#if 0 /* not needed for the time being */
+static const char* const gpio_names[PIN_COUNT] = {
#define DEFINE_GPIO(_name, ...) #_name,
#define DEFINE_PINGROUP(...)
#include "gpio-target.h"
@@ -47,13 +48,14 @@ const char* const gpio_names[PIN_COUNT] = {
#undef DEFINE_PINGROUP
};
-const char* const pingroup_names[PINGROUP_COUNT] = {
+static const char* const pingroup_names[PINGROUP_COUNT] = {
#define DEFINE_GPIO(...)
#define DEFINE_PINGROUP(_name, ...) #_name,
#include "gpio-target.h"
#undef DEFINE_GPIO
#undef DEFINE_PINGROUP
};
+#endif
void gpio_init(void)
{