1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 3 #include <gpio.h> 4 #include <soc/soc_chip.h> 5 6 /* 7 * Routine to perform below operations: 8 * 1. SoC routine to fill GPIO PM mask and value for GPIO_MISCCFG register 9 * 2. Program GPIO PM configuration based on PM mask and value 10 */ soc_gpio_pm_configuration(void)11void soc_gpio_pm_configuration(void) 12 { 13 uint8_t value[TOTAL_GPIO_COMM]; 14 const config_t *config = config_of_soc(); 15 16 if (config->gpio_override_pm) 17 memcpy(value, config->gpio_pm, sizeof(value)); 18 else 19 memset(value, MISCCFG_GPIO_PM_CONFIG_BITS, sizeof(value)); 20 21 gpio_pm_configure(value, TOTAL_GPIO_COMM); 22 } 23