Lines Matching full:firewall

23 /* Corresponds to STM32_FIREWALL_MAX_EXTRA_ARGS + firewall ID */
29 /* Firewall device API */
31 int stm32_firewall_get_firewall(struct device_node *np, struct stm32_firewall *firewall, in stm32_firewall_get_firewall() argument
39 if (!firewall || !nb_firewall) in stm32_firewall_get_firewall()
57 pr_err("Too many firewall controllers"); in stm32_firewall_get_firewall()
65 /* Check if the parsed phandle corresponds to a registered firewall controller */ in stm32_firewall_get_firewall()
70 firewall[j].firewall_ctrl = ctrl; in stm32_firewall_get_firewall()
77 firewall[j].firewall_ctrl = NULL; in stm32_firewall_get_firewall()
78 pr_err("No firewall controller registered for %s\n", np->full_name); in stm32_firewall_get_firewall()
85 firewall[j].entry = fw_entry; in stm32_firewall_get_firewall()
93 firewall[j].extra_args_size = 0; in stm32_firewall_get_firewall()
94 firewall[j].firewall_id = U32_MAX; in stm32_firewall_get_firewall()
99 /* The firewall ID is always the first argument */ in stm32_firewall_get_firewall()
100 firewall[j].firewall_id = provider_args.args[0]; in stm32_firewall_get_firewall()
104 firewall[j].extra_args[i] = provider_args.args[i + 1]; in stm32_firewall_get_firewall()
106 /* Remove the firewall ID arg that is not an extra argument */ in stm32_firewall_get_firewall()
107 firewall[j].extra_args_size = provider_args.args_count - 1; in stm32_firewall_get_firewall()
116 int stm32_firewall_grant_access(struct stm32_firewall *firewall) in stm32_firewall_grant_access() argument
120 if (!firewall || firewall->firewall_id == U32_MAX) in stm32_firewall_grant_access()
123 firewall_controller = firewall->firewall_ctrl; in stm32_firewall_grant_access()
128 return firewall_controller->grant_access(firewall_controller, firewall->firewall_id); in stm32_firewall_grant_access()
132 int stm32_firewall_grant_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id) in stm32_firewall_grant_access_by_id() argument
136 if (!firewall || subsystem_id == U32_MAX || firewall->firewall_id == U32_MAX) in stm32_firewall_grant_access_by_id()
139 firewall_controller = firewall->firewall_ctrl; in stm32_firewall_grant_access_by_id()
148 void stm32_firewall_release_access(struct stm32_firewall *firewall) in stm32_firewall_release_access() argument
152 if (!firewall || firewall->firewall_id == U32_MAX) { in stm32_firewall_release_access()
153 pr_debug("Incorrect arguments when releasing a firewall access\n"); in stm32_firewall_release_access()
157 firewall_controller = firewall->firewall_ctrl; in stm32_firewall_release_access()
160 pr_debug("No firewall controller to release\n"); in stm32_firewall_release_access()
164 firewall_controller->release_access(firewall_controller, firewall->firewall_id); in stm32_firewall_release_access()
168 void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id) in stm32_firewall_release_access_by_id() argument
172 if (!firewall || subsystem_id == U32_MAX || firewall->firewall_id == U32_MAX) { in stm32_firewall_release_access_by_id()
173 pr_debug("Incorrect arguments when releasing a firewall access"); in stm32_firewall_release_access_by_id()
177 firewall_controller = firewall->firewall_ctrl; in stm32_firewall_release_access_by_id()
180 pr_debug("No firewall controller to release"); in stm32_firewall_release_access_by_id()
188 /* Firewall controller API */
197 pr_info("Registering %s firewall controller\n", firewall_controller->name); in stm32_firewall_controller_register()
202 pr_debug("%s firewall controller already registered\n", in stm32_firewall_controller_register()
221 pr_debug("Null reference while unregistering firewall controller\n"); in stm32_firewall_controller_unregister()
236 pr_debug("There was no firewall controller named %s to unregister\n", in stm32_firewall_controller_unregister()
255 /* The access-controllers property is mandatory for firewall bus devices */ in stm32_firewall_populate_bus()