History log of /linux-master/drivers/usb/host/isp1362.h
Revision Date Author Comments
# 7347f4b9 16-Feb-2021 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: host: isp1362: remove dentry pointer for debugfs

There is no need to keep the dentry pointer around for the created
debugfs file, as it is only needed when removing it from the system.
When it is to be removed, ask debugfs itself for the pointer, to save on
storage and make things a bit simpler.

Cc: linux-usb@vger.kernel.org
Link: https://lore.kernel.org/r/20210216144645.3813043-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ecbb4dac 27-Oct-2020 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: host: isp1362: delete isp1362_show_regs()

No one is calling this function, so it's pointless to keep around as it
is triggering automated scanning tools to try to fix up the problems
with it using in_interrupt().

So delete the thing.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reported-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20201028113107.2007742-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 048715c0 02-Jul-2020 Lee Jones <lee.jones@linaro.org>

usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused

It would seem a shame to strip out all of the unused register entries,
since they can act as a fair source of documentation. Instead, mark
them all as __maybe_unused to show the build system that this behaviour
is known and intentional.

Fixes the following kernel build warning(s):

In file included from drivers/usb/host/isp1362-hcd.c:96:
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGALTTMR’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:199:1: note: in expansion of macro ‘ISP1362_REG’
199 | ISP1362_REG(OTGALTTMR, 0x6C, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGTIMER’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:198:1: note: in expansion of macro ‘ISP1362_REG’
198 | ISP1362_REG(OTGTIMER, 0x6A, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINTENB’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:197:1: note: in expansion of macro ‘ISP1362_REG’
197 | ISP1362_REG(OTGINTENB, 0x69, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINT’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:196:1: note: in expansion of macro ‘ISP1362_REG’
196 | ISP1362_REG(OTGINT, 0x68, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGSTATUS’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:195:1: note: in expansion of macro ‘ISP1362_REG’
195 | ISP1362_REG(OTGSTATUS, 0x67, REG_WIDTH_16, REG_ACCESS_R);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGCONTROL’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:194:1: note: in expansion of macro ‘ISP1362_REG’
194 | ISP1362_REG(OTGCONTROL, 0x62, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCATLPORT’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:183:1: note: in expansion of macro ‘ISP1362_REG’
183 | ISP1362_REG(HCATLPORT, 0x44, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTLPORT’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:175:1: note: in expansion of macro ‘ISP1362_REG’
175 | ISP1362_REG(HCINTLPORT, 0x43, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL1PORT’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:171:1: note: in expansion of macro ‘ISP1362_REG’
171 | ISP1362_REG(HCISTL1PORT, 0x42, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL0PORT’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:170:1: note: in expansion of macro ‘ISP1362_REG’
170 | ISP1362_REG(HCISTL0PORT, 0x40, REG_WIDTH_16, REG_ACCESS_RW);
| ^~~~~~~~~~~
drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTDIS’ defined but not used [-Wunused-const-variable=]
59 | static isp1362_reg_t ISP1362_REG_##name = addr
| ^~~~~~~~~~~~
drivers/usb/host/isp1362.h:77:1: note: in expansion of macro ‘ISP1362_REG’
77 | ISP1362_REG(HCINTDIS, 0x05, REG_WIDTH_32, REG_ACCESS_RW);
| ^~~~~~~~~~~

Cc: "by L. Wassmann" <LW@KARO-electronics.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200702144625.2533530-20-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b6409906 17-Jun-2019 Geert Uytterhoeven <geert+renesas@glider.be>

usb: isp1362: Spelling s/eclusive/exclusive/

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# da2827a2 09-Mar-2018 Arnd Bergmann <arnd@arndb.de>

usb: isp1362: remove blackfin arch glue

The blackfin architecture is getting removed, and this is the last
remaining architecture specific setting, so the various hacks
can be removed now.

From all I can tell, there are no remaining in-tree users of the
driver, but it could be used by out-of-tree platform ports.
I've marked the driver as 'depends on COMPILE_TEST', short of
removing it outright.

It was originally written for some ARM PXA machines using the same
chip, but that platform never really worked and the code has been
removed a long time ago.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Aaron Wu <aaron.wu@analog.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# b2441318 01-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

License cleanup: add SPDX GPL-2.0 license identifier to files with no license

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>


# a6363463 02-Jul-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: isp1362: move debug files from proc to debugfs

Drivers should not be putting debug files in /proc/ that is what debugfs
is for, so move the isp1362 driver's debug file to debugfs.

Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 641c86cd 28-Jun-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: isp1362: remove CONFIG_USB_DEBUG dependency

Now that the debugging macros are cleaned up, just rely on the dynamic
debug code in the kernel to do the debug messages for the driver.

This lets debugging be enabled without having to rebuild the driver, an
important thing for users that can not do it.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 374f4bfd 28-Jun-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: isp1362: remove _DBG() usage

If you want a debug call, just make it, so move to using the
already-there DBG() call. No need to make things more complex than they
really need to be.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2809508d 28-Jun-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: isp1362: remove unused _WARN_ON() calls

Like _BUG_ON(), _WARN_ON() wasn't ever being used, so just delete it, as
obviously things are working properly now (if not, we have bigger
problems...)

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 051a0689 28-Jun-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: isp1362: remove unused _BUG_ON() calls

We shouldn't ever panic in a driver, and these calls were never being
used, so just delete them, as obviously the driver is working properly
now (right?)

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 10d0ca02 20-Jul-2010 Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>

USB: host: Remove dead CONFIG_ARCH_KARO

CONFIG_ARCH_KARO doesn't exist in Kconfig and is never defined anywhere
else, therefore removing all references for it from the source code.

Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0c8a32df 21-May-2010 Mike Frysinger <vapier@gentoo.org>

USB: isp1362: fix inw warning on Blackfin systems

The Blackfin code is incorrectly casting the argument to inw() to a pointer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 22a627ba 18-Nov-2009 Roel Kluin <roel.kluin@gmail.com>

USB: FIX bitfield istl_flip:1, make it unsigned.

istl_flip is a signed bitfield of one bit so it can be -1 or 0.
However in drivers/usb/host/isp1362-hcd.c:1103:

finish_iso_transfers(isp1362_hcd,
&isp1362_hcd->istl_queue[isp1362_hcd->istl_flip]);

So if isp1362_hcd->istl_flip is set, the 2nd argument becomes
&isp1362_hcd->istl_queue[-1], which is invalid.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b0a9cf29 07-Oct-2009 Mike Frysinger <vapier@gentoo.org>

USB: isp1362: fix build warnings on 64-bit systems

A bunch of places assumed pointers were 32-bits in size (bit checking and
debug output), but none of these affected runtime functionality.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7949f4e1 06-Aug-2009 Ken MacLeod <ken@bitsko.slc.ut.us>

USB: isp1362: fix pulldown register defines and conf logic

HCHWCFG_PULLDOWN_DS2 and HCHWCFG_PULLDOWN_DS1 were swapped. Incorrect
operator precedence in isp1362_hc_start() hid part of the problem.
This fixes a problem where Port 1 in Host mode fails to see disconnects.

Signed-Off-By: Ken MacLeod <ken@bitsko.slc.ut.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a9d43091 16-Jul-2009 Lothar Wassmann <LW@KARO-electronics.de>

USB: NXP ISP1362 USB host driver

Signed-off-by: Lothar Wassmann <LW@KARO-electronics.de>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>