Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/293292/?format=api
{ "id": 293292, "url": "http://patchwork.ozlabs.org/api/patches/293292/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1385086116-10972-4-git-send-email-alistair@popple.id.au/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1385086116-10972-4-git-send-email-alistair@popple.id.au>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1385086116-10972-4-git-send-email-alistair@popple.id.au/", "date": "2013-11-22T02:08:32", "name": "[4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "7f931f92e460875f28b08a6c1b3a298106c71f51", "submitter": { "id": 24781, "url": "http://patchwork.ozlabs.org/api/people/24781/?format=api", "name": "Alistair Popple", "email": "alistair@popple.id.au" }, "delegate": { "id": 14, "url": "http://patchwork.ozlabs.org/api/users/14/?format=api", "username": "benh", "first_name": "Benjamin", "last_name": "Herrenschmidt", "email": "benh@kernel.crashing.org" }, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1385086116-10972-4-git-send-email-alistair@popple.id.au/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/293292/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/293292/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from ozlabs.org (localhost [IPv6:::1])\n\tby ozlabs.org (Postfix) with ESMTP id B86712C083D\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Nov 2013 13:11:02 +1100 (EST)", "by ozlabs.org (Postfix)\n\tid A20592C03A3; Fri, 22 Nov 2013 13:08:48 +1100 (EST)", "from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net\n\t[IPv6:2001:44b8:8060:ff02:300:1:6:4])\n\tby ozlabs.org (Postfix) with ESMTP id 916B32C048A\n\tfor <linuxppc-dev@ozlabs.org>; Fri, 22 Nov 2013 13:08:48 +1100 (EST)", "from ibmaus65.lnk.telstra.net (HELO localhost) ([165.228.126.9])\n\tby ipmail04.adl6.internode.on.net with ESMTP;\n\t22 Nov 2013 12:38:48 +1030" ], "X-IronPort-Anti-Spam-Filtered": "true", "X-IronPort-Anti-Spam-Result": "AhkEANK7jlKl5H4JgWdsb2JhbABZwEmBOg4BARYmKIImAQUnUhAISVcZiAHBDRePAQcWhBwDmBKVTCg", "From": "Alistair Popple <alistair@popple.id.au>", "To": "benh@kernel.crashing.org", "Subject": "[PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for\n\tPPC476GTR", "Date": "Fri, 22 Nov 2013 13:08:32 +1100", "Message-Id": "<1385086116-10972-4-git-send-email-alistair@popple.id.au>", "X-Mailer": "git-send-email 1.7.10.4", "In-Reply-To": "<1385086057-10884-1-git-send-email-alistair@popple.id.au>", "References": "<1385086057-10884-1-git-send-email-alistair@popple.id.au>", "Cc": "linuxppc-dev@ozlabs.org, linux-usb@vger.kernel.org,\n\tAlistair Popple <alistair@popple.id.au>", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.16rc2", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "The IBM Akebono board uses the PPC476GTR SoC which has a OHCI\ncompliant USB host interface. This patch adds support for it to the\nOHCI platform driver.\n\nAs we use device tree to pass platform specific data instead of\nplatform data we remove the check for platform data and instead\nprovide reasonable defaults if no platform data is present. This is\nsimilar to what is currently done in ehci-platform.c.\n\nSigned-off-by: Alistair Popple <alistair@popple.id.au>\nAcked-by: Alan Stern <stern@rowland.harvard.edu>\nCc: linux-usb@vger.kernel.org\n---\n drivers/usb/host/ohci-platform.c | 22 +++++++++++++++++-----\n 1 file changed, 17 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c\nindex a4c6410..e1ae5d3 100644\n--- a/drivers/usb/host/ohci-platform.c\n+++ b/drivers/usb/host/ohci-platform.c\n@@ -23,6 +23,8 @@\n #include <linux/usb/ohci_pdriver.h>\n #include <linux/usb.h>\n #include <linux/usb/hcd.h>\n+#include <linux/slab.h>\n+#include <linux/of.h>\n \n #include \"ohci.h\"\n \n@@ -55,6 +57,8 @@ static const struct ohci_driver_overrides platform_overrides __initconst = {\n \t.reset =\tohci_platform_reset,\n };\n \n+static struct usb_ohci_pdata ohci_platform_defaults;\n+\n static int ohci_platform_probe(struct platform_device *dev)\n {\n \tstruct usb_hcd *hcd;\n@@ -63,14 +67,16 @@ static int ohci_platform_probe(struct platform_device *dev)\n \tint irq;\n \tint err = -ENOMEM;\n \n-\tif (!pdata) {\n-\t\tWARN_ON(1);\n-\t\treturn -ENODEV;\n-\t}\n-\n \tif (usb_disabled())\n \t\treturn -ENODEV;\n \n+\t/*\n+\t * Platforms using DT don't always provide platform data.\n+\t * This should provide reasonable defaults.\n+\t */\n+\tif (!pdata)\n+\t\tdev->dev.platform_data = pdata = &ohci_platform_defaults;\n+\n \tirq = platform_get_irq(dev, 0);\n \tif (irq < 0) {\n \t\tdev_err(&dev->dev, \"no irq provided\");\n@@ -171,6 +177,11 @@ static int ohci_platform_resume(struct device *dev)\n #define ohci_platform_resume\tNULL\n #endif /* CONFIG_PM */\n \n+static const struct of_device_id ohci_of_match[] = {\n+\t{ .compatible = \"usb-ohci\", },\n+\t{},\n+};\n+\n static const struct platform_device_id ohci_platform_table[] = {\n \t{ \"ohci-platform\", 0 },\n \t{ }\n@@ -191,6 +202,7 @@ static struct platform_driver ohci_platform_driver = {\n \t\t.owner\t= THIS_MODULE,\n \t\t.name\t= \"ohci-platform\",\n \t\t.pm\t= &ohci_platform_pm_ops,\n+\t\t.of_match_table = ohci_of_match,\n \t}\n };\n \n", "prefixes": [ "4/8" ] }