)]}'
{
  "commit": "8daeffb058f78deb0b0ef2cb67ef741c38788bf9",
  "tree": "d7725a9eb7d4d6127beccd1ff85e92614a74ec64",
  "parents": [
    "ad5d25fef8f9459a9f67ec5fbae94287fdea3247"
  ],
  "author": {
    "name": "Barry Song",
    "email": "Baohua.Song@csr.com",
    "time": "Sat Jan 11 16:48:42 2014 +0800"
  },
  "committer": {
    "name": "Linus Walleij",
    "email": "linus.walleij@linaro.org",
    "time": "Wed Jan 15 09:07:56 2014 +0100"
  },
  "message": "pinctrl: sirf: use only one irq_domain for the whole device node\n\nin sirfsoc gpio probe(), we create 5 irq_domains for 5 gpio banks. but\nin irq_create_of_mapping() of irqchip core level, irq_find_host() can\nonly return the 1st irq_domain attached the pinctrl dt device node as\nwe can see from the codes:\n\nunsigned int irq_create_of_mapping(struct device_node *controller,\n\t\t\t\t   const u32 *intspec, unsigned int intsize)\n{\n\tstruct irq_domain *domain;\n\t...\n\tdomain \u003d controller ? irq_find_host(controller) : irq_default_domain;\n}\n\nstruct irq_domain *irq_find_host(struct device_node *node)\n{\n\tstruct irq_domain *h, *found \u003d NULL;\n\tint rc;\n\n\t/* We might want to match the legacy controller last since\n\t * it might potentially be set to match all interrupts in\n\t * the absence of a device node. This isn\u0027t a problem so far\n\t * yet though...\n\t */\n\tmutex_lock(\u0026irq_domain_mutex);\n\tlist_for_each_entry(h, \u0026irq_domain_list, link) {\n\t\tif (h-\u003eops-\u003ematch)\n\t\t\trc \u003d h-\u003eops-\u003ematch(h, node);\n\t\telse\n\t\t\trc \u003d (h-\u003eof_node !\u003d NULL) \u0026\u0026 (h-\u003eof_node \u003d\u003d node);\n\n\t\tif (rc) {\n\t\t\tfound \u003d h;\n\t\t\tbreak;\n\t\t}\n\t}\n\tmutex_unlock(\u0026irq_domain_mutex);\n\treturn found;\n}\n\nfor sirfsoc, the 1st irq_domain attached to the device_node(controller) only\ncan do linear for the 1st 32 gpios. so for devices who use gpio hwirq above\n32 and put the information in dt like:\n                                tangoc-ts@5c{\n                                        compatible \u003d \"pixcir,tangoc-ts\";\n+                                       interrupt-parent \u003d \u003c\u0026gpio\u003e;\n+                                       interrupts \u003d \u003c34 0\u003e;\n                                };\n\nwe will fail to get the virq for these devices as hwirq will be bigger than\ndomain-\u003erevmap_data.linear.size in:\nunsigned int irq_linear_revmap(struct irq_domain *domain,\n\t\t\t       irq_hw_number_t hwirq)\n{\n\n\t/* Check revmap bounds; complain if exceeded */\n\tif (WARN_ON(hwirq \u003e\u003d domain-\u003erevmap_data.linear.size))\n\t\treturn 0;\n\n\treturn domain-\u003erevmap_data.linear.revmap[hwirq];\n}\n\nthis patch drops redundant irq_domain and keep only one to fix the problem.\n\nSigned-off-by: Barry Song \u003cBaohua.Song@csr.com\u003e\nSigned-off-by: Linus Walleij \u003clinus.walleij@linaro.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b81e388c50defc06f7f6d2b4f21e68fecee2c0ae",
      "old_mode": 33188,
      "old_path": "drivers/pinctrl/sirf/pinctrl-sirf.c",
      "new_id": "53a3bc5ac2dd885c1317f362b71a4376ccf4542e",
      "new_mode": 33188,
      "new_path": "drivers/pinctrl/sirf/pinctrl-sirf.c"
    }
  ]
}
