projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
irq
/
irqdomain.c
diff --git
a/kernel/irq/irqdomain.c
b/kernel/irq/irqdomain.c
index 22aa9612ef7ca98cd8796188a7021810cc86d05a..5c1b646a6e7dd99767172b7e535ceac07968e26b 100644
(file)
--- a/
kernel/irq/irqdomain.c
+++ b/
kernel/irq/irqdomain.c
@@
-70,7
+70,7
@@
void irq_domain_free_fwnode(struct fwnode_handle *fwnode)
{
struct irqchip_fwid *fwid;
{
struct irqchip_fwid *fwid;
- if (WARN_ON(
fwnode->type != FWNODE_IRQCHIP
))
+ if (WARN_ON(
!is_fwnode_irqchip(fwnode)
))
return;
fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
return;
fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
@@
-243,14
+243,15
@@
struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
/**
EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
/**
- * irq_find_matching_fw
node() - Locates a domain for a given fwnode
- * @fw
node: FW descriptor of the interrupt controller
+ * irq_find_matching_fw
spec() - Locates a domain for a given fwspec
+ * @fw
spec: FW specifier for an interrupt
* @bus_token: domain-specific data
*/
* @bus_token: domain-specific data
*/
-struct irq_domain *irq_find_matching_fw
node(struct fwnode_handle *fwnode
,
+struct irq_domain *irq_find_matching_fw
spec(struct irq_fwspec *fwspec
,
enum irq_domain_bus_token bus_token)
{
struct irq_domain *h, *found = NULL;
enum irq_domain_bus_token bus_token)
{
struct irq_domain *h, *found = NULL;
+ struct fwnode_handle *fwnode = fwspec->fwnode;
int rc;
/* We might want to match the legacy controller last since
int rc;
/* We might want to match the legacy controller last since
@@
-264,7
+265,9
@@
struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
*/
mutex_lock(&irq_domain_mutex);
list_for_each_entry(h, &irq_domain_list, link) {
*/
mutex_lock(&irq_domain_mutex);
list_for_each_entry(h, &irq_domain_list, link) {
- if (h->ops->match)
+ if (h->ops->select && fwspec->param_count)
+ rc = h->ops->select(h, fwspec, bus_token);
+ else if (h->ops->match)
rc = h->ops->match(h, to_of_node(fwnode), bus_token);
else
rc = ((fwnode != NULL) && (h->fwnode == fwnode) &&
rc = h->ops->match(h, to_of_node(fwnode), bus_token);
else
rc = ((fwnode != NULL) && (h->fwnode == fwnode) &&
@@
-279,7
+282,7
@@
struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
mutex_unlock(&irq_domain_mutex);
return found;
}
mutex_unlock(&irq_domain_mutex);
return found;
}
-EXPORT_SYMBOL_GPL(irq_find_matching_fw
node
);
+EXPORT_SYMBOL_GPL(irq_find_matching_fw
spec
);
/**
* irq_set_default_host() - Set a "default" irq domain
/**
* irq_set_default_host() - Set a "default" irq domain
@@
-573,10
+576,13
@@
unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec)
unsigned int type = IRQ_TYPE_NONE;
int virq;
unsigned int type = IRQ_TYPE_NONE;
int virq;
- if (fwspec->fwnode)
- domain = irq_find_matching_fwnode(fwspec->fwnode, DOMAIN_BUS_ANY);
- else
+ if (fwspec->fwnode) {
+ domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_WIRED);
+ if (!domain)
+ domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_ANY);
+ } else {
domain = irq_default_domain;
domain = irq_default_domain;
+ }
if (!domain) {
pr_warn("no irq domain found for %s !\n",
if (!domain) {
pr_warn("no irq domain found for %s !\n",