/* * linux/driver/usb/host/ehci-w90x900.c * * Copyright (c) 2008 Nuvoton technology corporation. * * Wan ZongShun * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation;version 2 of the License. * */ #include #include #include #include #include #include #include #include #include "ehci.h" /* enable phy0 and phy1 for w90p910 */ #define ENPHY (0x01<<8) #define PHY0_CTR (0xA4) #define PHY1_CTR (0xA8) #define DRIVER_DESC "EHCI w90x900 driver" static const char hcd_name[] = "ehci-w90x900 "; static struct hc_driver __read_mostly ehci_w90x900_hc_driver; static int ehci_w90x900_probe(struct platform_device *pdev) { struct usb_hcd *hcd; struct ehci_hcd *ehci; struct resource *res; int retval = 0, irq; unsigned long val; hcd = usb_create_hcd(&ehci_w90x900_hc_driver, &pdev->dev, "w90x900 EHCI"); if (!hcd) { retval = -ENOMEM; goto err1; } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(hcd->regs)) { retval = PTR_ERR(hcd->regs); goto err2; } hcd->rsrc_start = res->start; hcd->rsrc_len = resource_size(res); ehci = hcd_to_ehci(hcd); ehci->caps = hcd->regs; ehci->regs = hcd->regs + HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); /* enable PHY 0,1,the regs only apply to w90p910 * 0xA4,0xA8 were offsets of PHY0 and PHY1 controller of * w90p910 IC relative to ehci->regs. */ val = __raw_readl(ehci->regs+PHY0_CTR); val |= ENPHY; __raw_writel(val, ehci->regs+PHY0_CTR); val = __raw_readl(ehci->regs+PHY1_CTR); val |= ENPHY; __raw_writel(val, ehci->regs+PHY1_CTR); irq = platform_get_irq(pdev, 0); if (irq < 0) { retval = irq; goto err2; } retval = usb_add_hcd(hcd, irq, IRQF_SHARED); if (retval != 0) goto err2; device_wakeup_enable(hcd->self.controller); return retval; err2: usb_put_hcd(hcd); err1: return retval; } static int ehci_w90x900_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); usb_remove_hcd(hcd); usb_put_hcd(hcd); return 0; } static struct platform_driver ehci_hcd_w90x900_driver = { .probe = ehci_w90x900_probe, .remove = ehci_w90x900_remove, .driver = { .name = "w90x900-ehci", }, }; static int __init ehci_w90X900_init(void) { if (usb_disabled()) return -ENODEV; pr_info("%s: " DRIVER_DESC "\n", hcd_name); ehci_init_driver(&ehci_w90x900_hc_driver, NULL); return platform_driver_register(&ehci_hcd_w90x900_driver); } module_init(ehci_w90X900_init); static void __exit ehci_w90X900_cleanup(void) { platform_driver_unregister(&ehci_hcd_w90x900_driver); } module_exit(ehci_w90X900_cleanup); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Wan ZongShun "); MODULE_ALIAS("platform:w90p910-ehci"); MODULE_LICENSE("GPL v2"); 307'>net/rds/Kconfig
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-01-10 14:01:05 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-01-16 13:20:05 +0100
commit4205e4786d0b9fc3b4fec7b1910cf645a0468307 (patch)
tree685ccb486409197b936c785eb9d173c3edff45a1 /net/rds/Kconfig
parent7e164ce4e8ecd7e9a58a83750bd3ee03125df154 (diff)
cpu/hotplug: Provide dynamic range for prepare stage
Mathieu reported that the LTTNG modules are broken as of 4.10-rc1 due to the removal of the cpu hotplug notifiers. Usually I don't care much about out of tree modules, but LTTNG is widely used in distros. There are two ways to solve that: 1) Reserve a hotplug state for LTTNG 2) Add a dynamic range for the prepare states. While #1 is the simplest solution, #2 is the proper one as we can convert in tree users, which do not care about ordering, to the dynamic range as well. Add a dynamic range which allows LTTNG to request states in the prepare stage. Reported-and-tested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Sewior <bigeasy@linutronix.de> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701101353010.3401@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net/rds/Kconfig')