summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/usb.c
AgeCommit message (Collapse)Author
2019-02-19ARM: davinci: make irqs.h a local headerBartosz Golaszewski
The existence of irqs.h in mach-davinci/include/mach only makes sense without SPARSE_IRQ as it's then expected to define NR_IRQS and is included from asm/irq.h. As we now support SPARSE_IRQ, this header can be moved to mach-davinci and used as the source of HW interrupt numbers. While updating the includes in various files - also rearrange the headers by directory (linux/asm/mach). Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2019-02-19ARM: davinci: wrap HW interrupt numbers with a macroBartosz Golaszewski
Once we select SPARSE_IRQ, the interrupt numbers defined in mach/irqs.h will only signify the hardware interrupt offsets, not the interrupt numbers seen by linux. Introduce a wrapper macro that translates the hwirq number to virtual numbers. For now it's just a dummy. Use that macro when specifying the interrupts in resources for platform devices. Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-14ARM: davinci: da8xx: move usb code to new fileDavid Lechner
We will be adding more da8xx-specific code for phy and clocks, so it will be better to have this in a separate file. This way we don't have a bunch of #ifdefs for all of the da8xx stuff. While at it, fix some checkpatch warnings coming from existing code. Signed-off-by: David Lechner <david@lechnology.com> [nsekhar@ti.com: typo and checkpatch fixes] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2016-04-14ARM: DaVinci USB: removed deprecated properties from MUSB configPetr Kulhavy
The following properties of the musb_hdrc_config structure are deprecated and no longer required/used by the MUSB driver: .dyn_fifo .soft_con .dma .dma_channels .eps_bits Signed-off-by: Petr Kulhavy <petr@barix.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-04-17Merge tag 'davinci-for-v3.10/board-2-v2' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/boards From Sekhar Nori: v3.10 board updates for DaVinci This set of patches enables remoteproc support on DA850 EVM and fixes some sparse warnings for the same board. * tag 'davinci-for-v3.10/board-2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da850 evm: fix const qualifier placement ARM: davinci: da850 board: add remoteproc support ARM: davinci: ensure global variables are declared ARM: davinci: sram.c: fix incorrect type in assignment ARM: davinci: da8xx dt: make file local symbols static ARM: davinci: da8xx: add remoteproc support ARM: davinci: remove test for undefined Kconfig macro ARM: davinci: mmc: derive version information from device name ARM: davinci: da850: add ECAP & EHRPWM clock nodes ARM: davinci: clk framework support for enable/disable functionality
2013-04-17ARM: davinci: ensure global variables are declaredSekhar Nori
Fix the following sparse warnings by declaring relevant global variables. CHECK arch/arm/mach-davinci/usb.c arch/arm/mach-davinci/usb.c:134:12: warning: symbol 'da8xx_register_usb20' was not declared. Should it be static? arch/arm/mach-davinci/usb.c:169:12: warning: symbol 'da8xx_register_usb11' was not declared. Should it be static? CHECK arch/arm/mach-davinci/pm.c arch/arm/mach-davinci/pm.c:155:12: warning: symbol 'davinci_pm_init' was not declared. Should it be static? Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-04-02ARM: davinci: use is IS_ENABLED macroLad, Prabhakar
This patches replaces #if defined() by IS_ENABLED macro, which provides better readability. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2012-10-24ARM: davinci: usb: remove CONFIG_USB_MUSB_HOST etcConstantine Shulyupin
Remove usage of CONFIG_USB_MUSB_OTG, CONFIG_USB_MUSB_PERIPHERAL and CONFIG_USB_MUSB_HOST in arch/arm/mach-davinci/usb.c since these are not used anymore and set mode configuration by default to MUSB_OTG. Signed-off-by: Constantine Shulyupin <const@MakeLinux.com> [prakash.pm@ti.com: Tested on DM6446-EVM] Acked-by: Manjunathappa, Prakash <prakash.pm@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2012-09-14ARM: davinci: move platform_data definitionsArnd Bergmann
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the davinci include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@ti.com> Cc: "Ben Dooks" <ben-linux@fluff.org> Cc: "Wolfram Sang" <w.sang@pengutronix.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Liam Girdwood <lrg@ti.com> Cc: davinci-linux-open-source@linux.davincidsp.com
2010-12-11DA8xx: assign name to MUSB IRQ resourceSergei Shtylyov
Commit fcf173e4511193b1efeccb0f22a8c641b464353b (usb: musb: add names for IRQs in structure resource) forgot to assign name to the DA8xx MUSB IRQ resource. Because of that MUSB driver fails to load on DA8xx machines. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10usb: musb: split da8xx to its own platform_driverFelipe Balbi
Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10usb: musb: split davinci to its own platform_driverFelipe Balbi
Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10usb: musb: trivial search and replace patchFelipe Balbi
change all ocurrences of musb_hdrc to musb-hdrc. We will call glue layer drivers musb-<glue layer>, so in order to keep things somewhat standard, let's change the underscore into a dash. Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-01usb: musb: add names for IRQs in structure resourceHema Kalliguddi
Soon resource data will get automatically populated from a set of autogenerated data from TI's hardware database for the OMAP platform. Such database, might not have resources at the expected order by the current drivers. While we could hack in some exceptions to that tool to generate resources in a specific order, it seems less fragile to use the resource name instead. That way, no matter what order the resources are generated, the driver still work. Modified the OMAP, Blackfin and Davinci architecture files to add the name of the IRQs in the resource structures and musb driver to use the platform_get_irq_byname() api to get the device and dma irq numbers instead of using the index. Cc: Tony Lindgren <tony@atomide.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2009-11-25DA8xx: MUSB platform device registrationSergei Shtylyov
Add the function to register the MUSB platform device. Additional compile warning fixes by Sekhar Nori. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-11-25DaVinci: rename setup_usb() to davinci_setup_usb()Sergei Shtylyov
Rename setup_usb() into davinci_setup_usb(). While at it: - move its declaration from <mach/common.h> to more fitting <mach/usb.h>; - teach it to handle values of the 'mA' parameter greater than 510 and thus pass 1000 instead of 500 for the power switches capable of sourcing over 1 A; - teach it to handle odd values of the 'potpgt_ms' parameter... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-11-25DaVinci: remove unneeded #include'sSergei Shtylyov
There have accumulated quite a lot of them after the code reorganizations... In several cases I had to replace #include <linux/dma-mapping.h> which wasn't needed directly but happened to #include <linux/err.h> which was needed. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-11-25davinci: DA8xx: OHCI platform deviceSergei Shtylyov
Add the function to register the OHCI platform device, given the root hub related platform data passed from the board specific code. The platfrom data provide for overriding the OHCI port power and over-current bits at the board level. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-08-26davinci: DM646x: pass correct MUSB IRQsSergei Shtylyov
DM646x has MUSB connected to IRQs 13 and 14 (unlike IRQ12 on other platforms), so pass the correct IRQ resources with the platform device. Signed-off-by: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-04-23davinci: add arch_ioremap() which uses existing static mappingsKevin Hilman
Add arch-specific ioremap() which uses any existing static mappings in place of doing a new mapping. From now on, drivers should always use ioremap() instead of IO_ADDRESS(). In addition, remove the davinci_[read|write]* macros in favor of using ioremap. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-27usb: musb: make Davinci *work* in mainlineDavid Brownell
Now that the musb build fixes for DaVinci got merged (RC3?), kick in the other bits needed to get it finally *working* in mainline: - Use clk_enable()/clk_disable() ... the "always enable USB clocks" code this originally relied on has since been removed. - Initialize the USB device only after the relevant I2C GPIOs are available, so the host side can properly enable VBUS. - Tweak init sequencing to cope with mainline's relatively late init of the I2C system bus for power switches, transceivers, and so on. Sanity tested on DM6664 EVM for host and peripheral modes; that system won't boot with CONFIG_PM enabled, so OTG can't yet be tested. Also verified on OMAP3. (Unrelated: correct the MODULE_PARM_DESC spelling of musb_debug.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Felipe Balbi <me@felipebalbi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: musb_hdrc: another davinci buildfix (otg related)David Brownell
The DaVinci code had an implementation of the OTG transceiver glue too; make it use the new-standard one. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24[ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfixDavid Brownell
From: David Brownell <dbrownell@users.sourceforge.net> Subject: ARM/mach-davinci/usb.c buildfix CC arch/arm/mach-davinci/usb.o arch/arm/mach-davinci/usb.c:60: error: 'IRQ_USBINT' undeclared here (not in a function) make[1]: *** [arch/arm/mach-davinci/usb.o] Error 1 Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-17ARM: DaVinci: usb setupDavid Brownell
Declare the musb_hdrc platform device for DaVinci. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>