From 484a79fcc0bb762acc1c3a502b237a68588ab4ab Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 3 Dec 2022 16:17:43 +0000 Subject: 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 --- firmware/target/mips/ingenic_x1000/gpio-x1000.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'firmware/target/mips/ingenic_x1000/gpio-x1000.h') diff --git a/firmware/target/mips/ingenic_x1000/gpio-x1000.h b/firmware/target/mips/ingenic_x1000/gpio-x1000.h index eac5f8651f..310a457ab5 100644 --- a/firmware/target/mips/ingenic_x1000/gpio-x1000.h +++ b/firmware/target/mips/ingenic_x1000/gpio-x1000.h @@ -23,6 +23,7 @@ #define __GPIO_X1000_H__ #include "x1000/gpio.h" +#include "config.h" /* GPIO port numbers */ #define GPIO_A 0 @@ -103,16 +104,8 @@ enum { PINGROUP_COUNT, }; -/* arrays which define the target's GPIO settings */ -extern const struct gpio_setting gpio_settings[PIN_COUNT]; -extern const struct pingroup_setting pingroup_settings[PINGROUP_COUNT]; - -/* stringified names for use in debug menus */ -extern const char* const gpio_names[PIN_COUNT]; -extern const char* const pingroup_names[PINGROUP_COUNT]; - /* called at early init to set up GPIOs */ -extern void gpio_init(void); +extern void gpio_init(void) INIT_ATTR; /* Use GPIO Z to reconfigure several pins atomically */ extern void gpioz_configure(int port, uint32_t pins, int func); -- cgit v1.2.3