|
@@ -188,7 +188,7 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_IRQ_DOMAIN
|
|
#ifdef CONFIG_IRQ_DOMAIN
|
|
-struct irq_domain *__irq_domain_add(struct device_node *of_node, int size,
|
|
|
|
|
|
+struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
|
|
irq_hw_number_t hwirq_max, int direct_max,
|
|
irq_hw_number_t hwirq_max, int direct_max,
|
|
const struct irq_domain_ops *ops,
|
|
const struct irq_domain_ops *ops,
|
|
void *host_data);
|
|
void *host_data);
|
|
@@ -207,11 +207,15 @@ extern struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
|
|
enum irq_domain_bus_token bus_token);
|
|
enum irq_domain_bus_token bus_token);
|
|
extern void irq_set_default_host(struct irq_domain *host);
|
|
extern void irq_set_default_host(struct irq_domain *host);
|
|
|
|
|
|
|
|
+static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node)
|
|
|
|
+{
|
|
|
|
+ return node ? &node->fwnode : NULL;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline struct irq_domain *irq_find_matching_host(struct device_node *node,
|
|
static inline struct irq_domain *irq_find_matching_host(struct device_node *node,
|
|
enum irq_domain_bus_token bus_token)
|
|
enum irq_domain_bus_token bus_token)
|
|
{
|
|
{
|
|
- return irq_find_matching_fwnode(node ? &node->fwnode : NULL,
|
|
|
|
- bus_token);
|
|
|
|
|
|
+ return irq_find_matching_fwnode(of_node_to_fwnode(node), bus_token);
|
|
}
|
|
}
|
|
|
|
|
|
static inline struct irq_domain *irq_find_host(struct device_node *node)
|
|
static inline struct irq_domain *irq_find_host(struct device_node *node)
|
|
@@ -231,14 +235,14 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no
|
|
const struct irq_domain_ops *ops,
|
|
const struct irq_domain_ops *ops,
|
|
void *host_data)
|
|
void *host_data)
|
|
{
|
|
{
|
|
- return __irq_domain_add(of_node, size, size, 0, ops, host_data);
|
|
|
|
|
|
+ return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data);
|
|
}
|
|
}
|
|
static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
|
|
static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
|
|
unsigned int max_irq,
|
|
unsigned int max_irq,
|
|
const struct irq_domain_ops *ops,
|
|
const struct irq_domain_ops *ops,
|
|
void *host_data)
|
|
void *host_data)
|
|
{
|
|
{
|
|
- return __irq_domain_add(of_node, 0, max_irq, max_irq, ops, host_data);
|
|
|
|
|
|
+ return __irq_domain_add(of_node_to_fwnode(of_node), 0, max_irq, max_irq, ops, host_data);
|
|
}
|
|
}
|
|
static inline struct irq_domain *irq_domain_add_legacy_isa(
|
|
static inline struct irq_domain *irq_domain_add_legacy_isa(
|
|
struct device_node *of_node,
|
|
struct device_node *of_node,
|
|
@@ -252,7 +256,22 @@ static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node
|
|
const struct irq_domain_ops *ops,
|
|
const struct irq_domain_ops *ops,
|
|
void *host_data)
|
|
void *host_data)
|
|
{
|
|
{
|
|
- return __irq_domain_add(of_node, 0, ~0, 0, ops, host_data);
|
|
|
|
|
|
+ return __irq_domain_add(of_node_to_fwnode(of_node), 0, ~0, 0, ops, host_data);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static inline struct irq_domain *irq_domain_create_linear(struct fwnode_handle *fwnode,
|
|
|
|
+ unsigned int size,
|
|
|
|
+ const struct irq_domain_ops *ops,
|
|
|
|
+ void *host_data)
|
|
|
|
+{
|
|
|
|
+ return __irq_domain_add(fwnode, size, size, 0, ops, host_data);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static inline struct irq_domain *irq_domain_create_tree(struct fwnode_handle *fwnode,
|
|
|
|
+ const struct irq_domain_ops *ops,
|
|
|
|
+ void *host_data)
|
|
|
|
+{
|
|
|
|
+ return __irq_domain_add(fwnode, 0, ~0, 0, ops, host_data);
|
|
}
|
|
}
|
|
|
|
|
|
extern void irq_domain_remove(struct irq_domain *host);
|
|
extern void irq_domain_remove(struct irq_domain *host);
|