--- /dev/null
+From f1485d3adfc271d721fce227422fbeb965e2008d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 31 Mar 2020 14:36:23 +0200
+Subject: ACPI: video: Use native backlight on Acer Aspire 5783z
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 1c8fbc1f9bfb804ef2f0d4ee9397ab800e33f23a ]
+
+The Acer Aspire 5783z shipped with Windows 7 and as such does not trigger
+our "win8 ready" heuristic for prefering the native backlight interface.
+
+Still ACPI backlight control doesn't work on this model, where as the
+native (intel_video) backlight interface does work. Add a quirk to
+force using native backlight control on this model.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/acpi/video_detect.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
+index e63fd7bfd3a53..8daeeb5e3eb67 100644
+--- a/drivers/acpi/video_detect.c
++++ b/drivers/acpi/video_detect.c
+@@ -336,6 +336,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
+ },
+ },
++ {
++ .callback = video_detect_force_native,
++ .ident = "Acer Aspire 5738z",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
++ DMI_MATCH(DMI_BOARD_NAME, "JV50"),
++ },
++ },
+
+ /*
+ * Desktops which falsely report a backlight and which our heuristics
+--
+2.25.1
+
--- /dev/null
+From 0bceb5f4e789c5761370833582e9896f4edfd7f5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 22 May 2020 14:22:28 +0200
+Subject: ACPI: video: Use native backlight on Acer TravelMate 5735Z
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Paul Menzel <pmenzel@molgen.mpg.de>
+
+[ Upstream commit c41c36e900a337b4132b12ccabc97f5578248b44 ]
+
+Currently, changing the brightness of the internal display of the Acer
+TravelMate 5735Z does not work. Pressing the function keys or changing the
+slider, GNOME Shell 3.36.2 displays the OSD (five steps), but the
+brightness does not change.
+
+The Acer TravelMate 5735Z shipped with Windows 7 and as such does not
+trigger our "win8 ready" heuristic for preferring the native backlight
+interface.
+
+Still ACPI backlight control doesn't work on this model, where as the
+native (intel_video) backlight interface does work by adding
+`acpi_backlight=native` or `acpi_backlight=none` to Linux’ command line.
+
+So, add a quirk to force using native backlight control on this model.
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=207835
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/acpi/video_detect.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
+index 8daeeb5e3eb67..5bcb4c01ec5f0 100644
+--- a/drivers/acpi/video_detect.c
++++ b/drivers/acpi/video_detect.c
+@@ -345,6 +345,16 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
+ DMI_MATCH(DMI_BOARD_NAME, "JV50"),
+ },
+ },
++ {
++ /* https://bugzilla.kernel.org/show_bug.cgi?id=207835 */
++ .callback = video_detect_force_native,
++ .ident = "Acer TravelMate 5735Z",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5735Z"),
++ DMI_MATCH(DMI_BOARD_NAME, "BA51_MV"),
++ },
++ },
+
+ /*
+ * Desktops which falsely report a backlight and which our heuristics
+--
+2.25.1
+
--- /dev/null
+From 281c2a4217d24b464508e4161500c2f47df18588 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 20 Apr 2020 23:40:30 +0200
+Subject: ALSA: usb-audio: Add quirk for Focusrite Scarlett 2i2
+
+From: Gregor Pintar <grpintar@gmail.com>
+
+[ Upstream commit 6f4ea2074ddf689ac6f892afa58515032dabf2e4 ]
+
+Force it to use asynchronous playback.
+
+Same quirk has already been added for Focusrite Scarlett Solo (2nd gen)
+with a commit 46f5710f0b88 ("ALSA: usb-audio: Add quirk for Focusrite
+Scarlett Solo").
+
+This also seems to prevent regular clicks when playing at 44100Hz
+on Scarlett 2i2 (2nd gen). I did not notice any side effects.
+
+Moved both quirks to snd_usb_audioformat_attributes_quirk() as suggested.
+
+Signed-off-by: Gregor Pintar <grpintar@gmail.com>
+Reviewed-by: Alexander Tsoy <alexander@tsoy.me>
+Link: https://lore.kernel.org/r/20200420214030.2361-1-grpintar@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/usb/quirks-table.h | 84 ----------------------------------------
+ sound/usb/quirks.c | 13 +++++++
+ 2 files changed, 13 insertions(+), 84 deletions(-)
+
+diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
+index 5089f2de2f02d..562179492a338 100644
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -2776,90 +2776,6 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+ .type = QUIRK_MIDI_NOVATION
+ }
+ },
+-{
+- /*
+- * Focusrite Scarlett Solo 2nd generation
+- * Reports that playback should use Synch: Synchronous
+- * while still providing a feedback endpoint. Synchronous causes
+- * snapping on some sample rates.
+- * Force it to use Synch: Asynchronous.
+- */
+- USB_DEVICE(0x1235, 0x8205),
+- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+- .ifnum = QUIRK_ANY_INTERFACE,
+- .type = QUIRK_COMPOSITE,
+- .data = (const struct snd_usb_audio_quirk[]) {
+- {
+- .ifnum = 1,
+- .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+- .data = & (const struct audioformat) {
+- .formats = SNDRV_PCM_FMTBIT_S32_LE,
+- .channels = 2,
+- .iface = 1,
+- .altsetting = 1,
+- .altset_idx = 1,
+- .attributes = 0,
+- .endpoint = 0x01,
+- .ep_attr = USB_ENDPOINT_XFER_ISOC |
+- USB_ENDPOINT_SYNC_ASYNC,
+- .protocol = UAC_VERSION_2,
+- .rates = SNDRV_PCM_RATE_44100 |
+- SNDRV_PCM_RATE_48000 |
+- SNDRV_PCM_RATE_88200 |
+- SNDRV_PCM_RATE_96000 |
+- SNDRV_PCM_RATE_176400 |
+- SNDRV_PCM_RATE_192000,
+- .rate_min = 44100,
+- .rate_max = 192000,
+- .nr_rates = 6,
+- .rate_table = (unsigned int[]) {
+- 44100, 48000, 88200,
+- 96000, 176400, 192000
+- },
+- .clock = 41
+- }
+- },
+- {
+- .ifnum = 2,
+- .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+- .data = & (const struct audioformat) {
+- .formats = SNDRV_PCM_FMTBIT_S32_LE,
+- .channels = 2,
+- .iface = 2,
+- .altsetting = 1,
+- .altset_idx = 1,
+- .attributes = 0,
+- .endpoint = 0x82,
+- .ep_attr = USB_ENDPOINT_XFER_ISOC |
+- USB_ENDPOINT_SYNC_ASYNC |
+- USB_ENDPOINT_USAGE_IMPLICIT_FB,
+- .protocol = UAC_VERSION_2,
+- .rates = SNDRV_PCM_RATE_44100 |
+- SNDRV_PCM_RATE_48000 |
+- SNDRV_PCM_RATE_88200 |
+- SNDRV_PCM_RATE_96000 |
+- SNDRV_PCM_RATE_176400 |
+- SNDRV_PCM_RATE_192000,
+- .rate_min = 44100,
+- .rate_max = 192000,
+- .nr_rates = 6,
+- .rate_table = (unsigned int[]) {
+- 44100, 48000, 88200,
+- 96000, 176400, 192000
+- },
+- .clock = 41
+- }
+- },
+- {
+- .ifnum = 3,
+- .type = QUIRK_IGNORE_INTERFACE
+- },
+- {
+- .ifnum = -1
+- }
+- }
+- }
+-},
+
+ /* Access Music devices */
+ {
+diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
+index 5341d045e6a48..e2b0de0473103 100644
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1780,6 +1780,19 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
+ */
+ fp->attributes &= ~UAC_EP_CS_ATTR_FILL_MAX;
+ break;
++ case USB_ID(0x1235, 0x8202): /* Focusrite Scarlett 2i2 2nd gen */
++ case USB_ID(0x1235, 0x8205): /* Focusrite Scarlett Solo 2nd gen */
++ /*
++ * Reports that playback should use Synch: Synchronous
++ * while still providing a feedback endpoint.
++ * Synchronous causes snapping on some sample rates.
++ * Force it to use Synch: Asynchronous.
++ */
++ if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
++ fp->ep_attr &= ~USB_ENDPOINT_SYNCTYPE;
++ fp->ep_attr |= USB_ENDPOINT_SYNC_ASYNC;
++ }
++ break;
+ }
+ }
+
+--
+2.25.1
+
--- /dev/null
+From 24edac6a1467b7a873f04665b8b80e690b173a35 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 4 Apr 2020 17:38:43 +0200
+Subject: ALSA: usb-audio: Add registration quirk for Kingston HyperX Cloud
+ Alpha S
+
+From: Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
+
+[ Upstream commit fd60e0683e8e9107e09cd2e4798f3e27e85d2705 ]
+
+Similar to the Kingston HyperX AMP, the Kingston HyperX Cloud
+Alpha S (0951:16d8) uses two interfaces, but only the second
+interface contains the capture stream. This patch delays the
+registration until the second interface appears.
+
+Signed-off-by: Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
+Link: https://lore.kernel.org/r/20200404153843.9288-1-emmanuelpescosta099@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/usb/quirks.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
+index ad557ab65e043..5341d045e6a48 100644
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1801,6 +1801,7 @@ struct registration_quirk {
+
+ static const struct registration_quirk registration_quirks[] = {
+ REG_QUIRK_ENTRY(0x0951, 0x16d8, 2), /* Kingston HyperX AMP */
++ REG_QUIRK_ENTRY(0x0951, 0x16ed, 2), /* Kingston HyperX Cloud Alpha S */
+ { 0 } /* terminator */
+ };
+
+--
+2.25.1
+
--- /dev/null
+From 6ed12318e6a5c90d59f6687abcd3020225fafac1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 19 Jun 2020 13:48:22 +0200
+Subject: ALSA: usb-audio: Add registration quirk for Kingston HyperX Cloud
+ Flight S
+
+From: Christoffer Nielsen <cn@obviux.dk>
+
+[ Upstream commit 73094608b8e214952444fb104651704c98a37aeb ]
+
+Similar to the Kingston HyperX AMP, the Kingston HyperX Cloud
+Alpha S (0951:0x16ea) uses two interfaces, but only the second
+interface contains the capture stream. This patch delays the
+registration until the second interface appears.
+
+Signed-off-by: Christoffer Nielsen <cn@obviux.dk>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/CAOtG2YHOM3zy+ed9KS-J4HkZo_QGzcUG9MigSp4e4_-13r6B=Q@mail.gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/usb/quirks.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
+index e2b0de0473103..a8bb953cc4681 100644
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1815,6 +1815,7 @@ struct registration_quirk {
+ static const struct registration_quirk registration_quirks[] = {
+ REG_QUIRK_ENTRY(0x0951, 0x16d8, 2), /* Kingston HyperX AMP */
+ REG_QUIRK_ENTRY(0x0951, 0x16ed, 2), /* Kingston HyperX Cloud Alpha S */
++ REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */
+ { 0 } /* terminator */
+ };
+
+--
+2.25.1
+
--- /dev/null
+From 2bf1d37cdb4ad6bf0ea5332577320cfdf52727ee Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 29 Feb 2020 18:18:15 +0300
+Subject: ALSA: usb-audio: Add support for MOTU MicroBook IIc
+
+From: Alexander Tsoy <alexander@tsoy.me>
+
+[ Upstream commit 2edb84e3047b93da2f2b234219cdc304df042d9e ]
+
+MicroBook IIc operates in UAC2 mode by default. This patch addresses
+several issues with it:
+
+- MicroBook II and IIc shares the same USB ID. We can distinguish them
+ by interface class.
+- MaxPacketsOnly attribute is erroneously set in endpoint descriptors.
+ As a result this card produces noise with all sample rates other than
+ 96 KHz. This also causes issues like IOMMU page faults and other
+ problems with host controller.
+- Sample rate changes takes more than 2 seconds for this device. Clock
+ validity request returns false during that period, so the clock validity
+ quirk is required.
+
+Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
+Link: https://lore.kernel.org/r/20200229151815.14199-1-alexander@tsoy.me
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/usb/clock.c | 59 ++++++++++++++++++++++++++++++++--------
+ sound/usb/pcm.c | 7 ++++-
+ sound/usb/quirks-table.h | 2 +-
+ sound/usb/quirks.c | 18 +++++++++++-
+ 4 files changed, 72 insertions(+), 14 deletions(-)
+
+diff --git a/sound/usb/clock.c b/sound/usb/clock.c
+index a48313dfa967a..b118cf97607f3 100644
+--- a/sound/usb/clock.c
++++ b/sound/usb/clock.c
+@@ -151,16 +151,15 @@ static int uac_clock_selector_set_val(struct snd_usb_audio *chip, int selector_i
+ return ret;
+ }
+
+-/*
+- * Assume the clock is valid if clock source supports only one single sample
+- * rate, the terminal is connected directly to it (there is no clock selector)
+- * and clock type is internal. This is to deal with some Denon DJ controllers
+- * that always reports that clock is invalid.
+- */
+ static bool uac_clock_source_is_valid_quirk(struct snd_usb_audio *chip,
+ struct audioformat *fmt,
+ int source_id)
+ {
++ bool ret = false;
++ int count;
++ unsigned char data;
++ struct usb_device *dev = chip->dev;
++
+ if (fmt->protocol == UAC_VERSION_2) {
+ struct uac_clock_source_descriptor *cs_desc =
+ snd_usb_find_clock_source(chip->ctrl_intf, source_id);
+@@ -168,13 +167,51 @@ static bool uac_clock_source_is_valid_quirk(struct snd_usb_audio *chip,
+ if (!cs_desc)
+ return false;
+
+- return (fmt->nr_rates == 1 &&
+- (fmt->clock & 0xff) == cs_desc->bClockID &&
+- (cs_desc->bmAttributes & 0x3) !=
+- UAC_CLOCK_SOURCE_TYPE_EXT);
++ /*
++ * Assume the clock is valid if clock source supports only one
++ * single sample rate, the terminal is connected directly to it
++ * (there is no clock selector) and clock type is internal.
++ * This is to deal with some Denon DJ controllers that always
++ * reports that clock is invalid.
++ */
++ if (fmt->nr_rates == 1 &&
++ (fmt->clock & 0xff) == cs_desc->bClockID &&
++ (cs_desc->bmAttributes & 0x3) !=
++ UAC_CLOCK_SOURCE_TYPE_EXT)
++ return true;
++ }
++
++ /*
++ * MOTU MicroBook IIc
++ * Sample rate changes takes more than 2 seconds for this device. Clock
++ * validity request returns false during that period.
++ */
++ if (chip->usb_id == USB_ID(0x07fd, 0x0004)) {
++ count = 0;
++
++ while ((!ret) && (count < 50)) {
++ int err;
++
++ msleep(100);
++
++ err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
++ USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
++ UAC2_CS_CONTROL_CLOCK_VALID << 8,
++ snd_usb_ctrl_intf(chip) | (source_id << 8),
++ &data, sizeof(data));
++ if (err < 0) {
++ dev_warn(&dev->dev,
++ "%s(): cannot get clock validity for id %d\n",
++ __func__, source_id);
++ return false;
++ }
++
++ ret = !!data;
++ count++;
++ }
+ }
+
+- return false;
++ return ret;
+ }
+
+ static bool uac_clock_source_is_valid(struct snd_usb_audio *chip,
+diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
+index d5706b8b68a1c..086244c707433 100644
+--- a/sound/usb/pcm.c
++++ b/sound/usb/pcm.c
+@@ -344,7 +344,12 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
+ ep = 0x81;
+ ifnum = 1;
+ goto add_sync_ep_from_ifnum;
+- case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook II */
++ case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook II/IIc */
++ /* MicroBook IIc */
++ if (altsd->bInterfaceClass == USB_CLASS_AUDIO)
++ return 0;
++
++ /* MicroBook II */
+ ep = 0x84;
+ ifnum = 0;
+ goto add_sync_ep_from_ifnum;
+diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
+index 8d1805d9e5a78..5089f2de2f02d 100644
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -3492,7 +3492,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
+ },
+ /* MOTU Microbook II */
+ {
+- USB_DEVICE(0x07fd, 0x0004),
++ USB_DEVICE_VENDOR_SPEC(0x07fd, 0x0004),
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+ .vendor_name = "MOTU",
+ .product_name = "MicroBookII",
+diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
+index bf5083a20b6d5..9d11ff742e5f5 100644
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1316,7 +1316,15 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
+ case USB_ID(0x2466, 0x8010): /* Fractal Audio Axe-Fx 3 */
+ return snd_usb_axefx3_boot_quirk(dev);
+ case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook II */
+- return snd_usb_motu_microbookii_boot_quirk(dev);
++ /*
++ * For some reason interface 3 with vendor-spec class is
++ * detected on MicroBook IIc.
++ */
++ if (get_iface_desc(intf->altsetting)->bInterfaceClass ==
++ USB_CLASS_VENDOR_SPEC &&
++ get_iface_desc(intf->altsetting)->bInterfaceNumber < 3)
++ return snd_usb_motu_microbookii_boot_quirk(dev);
++ break;
+ }
+
+ return 0;
+@@ -1764,5 +1772,13 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
+ else
+ fp->ep_attr |= USB_ENDPOINT_SYNC_SYNC;
+ break;
++ case USB_ID(0x07fd, 0x0004): /* MOTU MicroBook IIc */
++ /*
++ * MaxPacketsOnly attribute is erroneously set in endpoint
++ * descriptors. As a result this card produces noise with
++ * all sample rates other than 96 KHz.
++ */
++ fp->attributes &= ~UAC_EP_CS_ATTR_FILL_MAX;
++ break;
+ }
+ }
+--
+2.25.1
+
--- /dev/null
+From 36e5b69636e26f8c16d593f622a6caf3a6d3d5cd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 14 Mar 2020 12:54:49 -0400
+Subject: ALSA: usb-audio: Create a registration quirk for Kingston HyperX Amp
+ (0951:16d8)
+
+From: Chris Wulff <crwulff@gmail.com>
+
+[ Upstream commit 55f7326170d9e83e2d828591938e1101982a679c ]
+
+Create a quirk that allows special processing and/or
+skipping the call to snd_card_register.
+
+For HyperX AMP, which uses two interfaces, but only has
+a capture stream in the second, this allows the capture
+stream to merge with the first PCM.
+
+Signed-off-by: Chris Wulff <crwulff@gmail.com>
+Link: https://lore.kernel.org/r/20200314165449.4086-3-crwulff@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/usb/card.c | 12 ++++++++----
+ sound/usb/quirks.c | 14 ++++++++++++++
+ sound/usb/quirks.h | 3 +++
+ 3 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/sound/usb/card.c b/sound/usb/card.c
+index f9a64e9526f54..2284377cbb98d 100644
+--- a/sound/usb/card.c
++++ b/sound/usb/card.c
+@@ -659,10 +659,14 @@ static int usb_audio_probe(struct usb_interface *intf,
+ goto __error;
+ }
+
+- /* we are allowed to call snd_card_register() many times */
+- err = snd_card_register(chip->card);
+- if (err < 0)
+- goto __error;
++ /* we are allowed to call snd_card_register() many times, but first
++ * check to see if a device needs to skip it or do anything special
++ */
++ if (snd_usb_registration_quirk(chip, ifnum) == 0) {
++ err = snd_card_register(chip->card);
++ if (err < 0)
++ goto __error;
++ }
+
+ if (quirk && quirk->shares_media_device) {
+ /* don't want to fail when snd_media_device_create() fails */
+diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
+index 9d11ff742e5f5..f3e26e65c3257 100644
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1782,3 +1782,17 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
+ break;
+ }
+ }
++
++int snd_usb_registration_quirk(struct snd_usb_audio *chip,
++ int iface)
++{
++ switch (chip->usb_id) {
++ case USB_ID(0x0951, 0x16d8): /* Kingston HyperX AMP */
++ /* Register only when we reach interface 2 so that streams can
++ * merge correctly into PCMs from interface 0
++ */
++ return (iface != 2);
++ }
++ /* Register as normal */
++ return 0;
++}
+diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h
+index df0355843a4c1..3afc01eabc7e2 100644
+--- a/sound/usb/quirks.h
++++ b/sound/usb/quirks.h
+@@ -51,4 +51,7 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
+ struct audioformat *fp,
+ int stream);
+
++int snd_usb_registration_quirk(struct snd_usb_audio *chip,
++ int iface);
++
+ #endif /* __USBAUDIO_QUIRKS_H */
+--
+2.25.1
+
--- /dev/null
+From 2db1c9047864b4aa33eb25a169b9fff635c746e2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 25 Mar 2020 11:33:19 +0100
+Subject: ALSA: usb-audio: Rewrite registration quirk handling
+
+From: Takashi Iwai <tiwai@suse.de>
+
+[ Upstream commit d8695bc5b1fe88305396b1f788d3b5f218e28a30 ]
+
+A slight refactoring of the registration quirk code. Now it uses the
+table lookup for easy additions in future. Also the return type was
+changed to bool, and got a few more comments.
+
+Link: https://lore.kernel.org/r/20200325103322.2508-2-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/usb/card.c | 2 +-
+ sound/usb/quirks.c | 40 ++++++++++++++++++++++++++++++----------
+ sound/usb/quirks.h | 3 +--
+ 3 files changed, 32 insertions(+), 13 deletions(-)
+
+diff --git a/sound/usb/card.c b/sound/usb/card.c
+index 2284377cbb98d..230d862cfa3a8 100644
+--- a/sound/usb/card.c
++++ b/sound/usb/card.c
+@@ -662,7 +662,7 @@ static int usb_audio_probe(struct usb_interface *intf,
+ /* we are allowed to call snd_card_register() many times, but first
+ * check to see if a device needs to skip it or do anything special
+ */
+- if (snd_usb_registration_quirk(chip, ifnum) == 0) {
++ if (!snd_usb_registration_quirk(chip, ifnum)) {
+ err = snd_card_register(chip->card);
+ if (err < 0)
+ goto __error;
+diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
+index f3e26e65c3257..ad557ab65e043 100644
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1783,16 +1783,36 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
+ }
+ }
+
+-int snd_usb_registration_quirk(struct snd_usb_audio *chip,
+- int iface)
++/*
++ * registration quirk:
++ * the registration is skipped if a device matches with the given ID,
++ * unless the interface reaches to the defined one. This is for delaying
++ * the registration until the last known interface, so that the card and
++ * devices appear at the same time.
++ */
++
++struct registration_quirk {
++ unsigned int usb_id; /* composed via USB_ID() */
++ unsigned int interface; /* the interface to trigger register */
++};
++
++#define REG_QUIRK_ENTRY(vendor, product, iface) \
++ { .usb_id = USB_ID(vendor, product), .interface = (iface) }
++
++static const struct registration_quirk registration_quirks[] = {
++ REG_QUIRK_ENTRY(0x0951, 0x16d8, 2), /* Kingston HyperX AMP */
++ { 0 } /* terminator */
++};
++
++/* return true if skipping registration */
++bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface)
+ {
+- switch (chip->usb_id) {
+- case USB_ID(0x0951, 0x16d8): /* Kingston HyperX AMP */
+- /* Register only when we reach interface 2 so that streams can
+- * merge correctly into PCMs from interface 0
+- */
+- return (iface != 2);
+- }
++ const struct registration_quirk *q;
++
++ for (q = registration_quirks; q->usb_id; q++)
++ if (chip->usb_id == q->usb_id)
++ return iface != q->interface;
++
+ /* Register as normal */
+- return 0;
++ return false;
+ }
+diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h
+index 3afc01eabc7e2..c76cf24a640a6 100644
+--- a/sound/usb/quirks.h
++++ b/sound/usb/quirks.h
+@@ -51,7 +51,6 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
+ struct audioformat *fp,
+ int stream);
+
+-int snd_usb_registration_quirk(struct snd_usb_audio *chip,
+- int iface);
++bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface);
+
+ #endif /* __USBAUDIO_QUIRKS_H */
+--
+2.25.1
+
--- /dev/null
+From 7d2422e27a15816f3703380862648898b9cabe9e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 20 Jan 2020 14:10:08 +0200
+Subject: ARM: at91: pm: add quirk for sam9x60's ulp1
+
+From: Claudiu Beznea <claudiu.beznea@microchip.com>
+
+[ Upstream commit bb1a0e87e1c54cd884e9b92b1cec06b186edc7a0 ]
+
+On SAM9X60 2 nop operations has to be introduced after setting
+WAITMODE bit in CKGR_MOR.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Link: https://lore.kernel.org/r/1579522208-19523-9-git-send-email-claudiu.beznea@microchip.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/mach-at91/pm_suspend.S | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S
+index ed57c879d4e17..2591cba61937b 100644
+--- a/arch/arm/mach-at91/pm_suspend.S
++++ b/arch/arm/mach-at91/pm_suspend.S
+@@ -268,6 +268,10 @@ ENDPROC(at91_backup_mode)
+ orr tmp1, tmp1, #AT91_PMC_KEY
+ str tmp1, [pmc, #AT91_CKGR_MOR]
+
++ /* Quirk for SAM9X60's PMC */
++ nop
++ nop
++
+ wait_mckrdy
+
+ /* Enable the crystal oscillator */
+--
+2.25.1
+
--- /dev/null
+From 6bf47e9bea74d35fa57fde3f2312041d98b8e4d6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 12 Dec 2019 15:05:39 +0200
+Subject: ARM: OMAP2+: Add workaround for DRA7 DSP MStandby errata i879
+
+From: Suman Anna <s-anna@ti.com>
+
+[ Upstream commit 2f14101a1d760db72393910d481fbf7768c44530 ]
+
+Errata Title:
+i879: DSP MStandby requires CD_EMU in SW_WKUP
+
+Description:
+The DSP requires the internal emulation clock to be actively toggling
+in order to successfully enter a low power mode via execution of the
+IDLE instruction and PRCM MStandby/Idle handshake. This assumes that
+other prerequisites and software sequence are followed.
+
+Workaround:
+The emulation clock to the DSP is free-running anytime CCS is connected
+via JTAG debugger to the DSP subsystem or when the CD_EMU clock domain
+is set in SW_WKUP mode. The CD_EMU domain can be set in SW_WKUP mode
+via the CM_EMU_CLKSTCTRL [1:0]CLKTRCTRL field.
+
+Implementation:
+This patch implements this workaround by denying the HW_AUTO mode
+for the EMU clockdomain during the power-up of any DSP processor
+and re-enabling the HW_AUTO mode during the shutdown of the last
+DSP processor (actually done during the enabling and disabling of
+the respective DSP MDMA MMUs). Reference counting has to be used to
+manage the independent sequencing between the multiple DSP processors.
+
+This switching is done at runtime rather than a static clockdomain
+flags value to meet the target power domain state for the EMU power
+domain during suspend.
+
+Note that the DSP MStandby behavior is not consistent across all
+boards prior to this fix. Please see commit 45f871eec6c0 ("ARM:
+OMAP2+: Extend DRA7 IPU1 MMU pdata quirks to DSP MDMA MMUs") for
+details.
+
+Signed-off-by: Suman Anna <s-anna@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/mach-omap2/omap-iommu.c | 43 +++++++++++++++++++++++++++++---
+ 1 file changed, 40 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
+index f1a6ece8108e4..78247e6f4a720 100644
+--- a/arch/arm/mach-omap2/omap-iommu.c
++++ b/arch/arm/mach-omap2/omap-iommu.c
+@@ -11,14 +11,43 @@
+
+ #include "omap_hwmod.h"
+ #include "omap_device.h"
++#include "clockdomain.h"
+ #include "powerdomain.h"
+
++static void omap_iommu_dra7_emu_swsup_config(struct platform_device *pdev,
++ bool enable)
++{
++ static struct clockdomain *emu_clkdm;
++ static DEFINE_SPINLOCK(emu_lock);
++ static atomic_t count;
++ struct device_node *np = pdev->dev.of_node;
++
++ if (!of_device_is_compatible(np, "ti,dra7-dsp-iommu"))
++ return;
++
++ if (!emu_clkdm) {
++ emu_clkdm = clkdm_lookup("emu_clkdm");
++ if (WARN_ON_ONCE(!emu_clkdm))
++ return;
++ }
++
++ spin_lock(&emu_lock);
++
++ if (enable && (atomic_inc_return(&count) == 1))
++ clkdm_deny_idle(emu_clkdm);
++ else if (!enable && (atomic_dec_return(&count) == 0))
++ clkdm_allow_idle(emu_clkdm);
++
++ spin_unlock(&emu_lock);
++}
++
+ int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
+ u8 *pwrst)
+ {
+ struct powerdomain *pwrdm;
+ struct omap_device *od;
+ u8 next_pwrst;
++ int ret = 0;
+
+ od = to_omap_device(pdev);
+ if (!od)
+@@ -31,13 +60,21 @@ int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
+ if (!pwrdm)
+ return -EINVAL;
+
+- if (request)
++ if (request) {
+ *pwrst = pwrdm_read_next_pwrst(pwrdm);
++ omap_iommu_dra7_emu_swsup_config(pdev, true);
++ }
+
+ if (*pwrst > PWRDM_POWER_RET)
+- return 0;
++ goto out;
+
+ next_pwrst = request ? PWRDM_POWER_ON : *pwrst;
+
+- return pwrdm_set_next_pwrst(pwrdm, next_pwrst);
++ ret = pwrdm_set_next_pwrst(pwrdm, next_pwrst);
++
++out:
++ if (!request)
++ omap_iommu_dra7_emu_swsup_config(pdev, false);
++
++ return ret;
+ }
+--
+2.25.1
+
--- /dev/null
+From fafa06b8f0bdff37d97774ba3a299ea247fc1344 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 12 Dec 2019 15:05:41 +0200
+Subject: ARM: OMAP2+: use separate IOMMU pdata to fix DRA7 IPU1 boot
+
+From: Suman Anna <s-anna@ti.com>
+
+[ Upstream commit 4601832f40501efc3c2fd264a5a69bd1ac17d520 ]
+
+The IPU1 MMU has been using common IOMMU pdata quirks defined and
+used by all IPU IOMMU devices on OMAP4 and beyond. Separate out the
+pdata for IPU1 MMU with the additional .set_pwrdm_constraint ops
+plugged in, so that the IPU1 power domain can be restricted to ON
+state during the boot and active period of the IPU1 remote processor.
+This eliminates the pre-conditions for the IPU1 boot issue as
+described in commit afe518400bdb ("iommu/omap: fix boot issue on
+remoteprocs with AMMU/Unicache").
+
+NOTE:
+1. RET is not a valid target power domain state on DRA7 platforms,
+ and IPU power domain is normally programmed for OFF. The IPU1
+ still fails to boot though, and an unclearable l3_noc error is
+ thrown currently on 4.14 kernel without this fix. This behavior
+ is slightly different from previous 4.9 LTS kernel.
+2. The fix is currently applied only to IPU1 on DRA7xx SoC, as the
+ other affected processors on OMAP4/OMAP5/DRA7 are in domains
+ that are not entering RET. IPU2 on DRA7 is in CORE power domain
+ which is only programmed for ON power state. The fix can be easily
+ scaled if these domains do hit RET in the future.
+3. The issue was not seen on current DRA7 platforms if any of the
+ DSP remote processors were booted and using one of the GPTimers
+ 5, 6, 7 or 8 on previous 4.9 LTS kernel. This was due to the
+ errata fix for i874 implemented in commit 1cbabcb9807e ("ARM:
+ DRA7: clockdomain: Implement timer workaround for errata i874")
+ which keeps the IPU1 power domain from entering RET when the
+ timers are active. But the timer workaround did not make any
+ difference on 4.14 kernel, and an l3_noc error was seen still
+ without this fix.
+
+Signed-off-by: Suman Anna <s-anna@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/mach-omap2/pdata-quirks.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
+index 5acd29cb8d749..ca07e310d9ed5 100644
+--- a/arch/arm/mach-omap2/pdata-quirks.c
++++ b/arch/arm/mach-omap2/pdata-quirks.c
+@@ -44,6 +44,17 @@ struct pdata_init {
+ static struct of_dev_auxdata omap_auxdata_lookup[];
+ static struct twl4030_gpio_platform_data twl_gpio_auxdata;
+
++#if IS_ENABLED(CONFIG_OMAP_IOMMU)
++int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
++ u8 *pwrst);
++#else
++static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev,
++ bool request, u8 *pwrst)
++{
++ return 0;
++}
++#endif
++
+ #ifdef CONFIG_MACH_NOKIA_N8X0
+ static void __init omap2420_n8x0_legacy_init(void)
+ {
+@@ -326,6 +337,10 @@ static void __init omap5_uevm_legacy_init(void)
+ #endif
+
+ #ifdef CONFIG_SOC_DRA7XX
++static struct iommu_platform_data dra7_ipu1_dsp_iommu_pdata = {
++ .set_pwrdm_constraint = omap_iommu_set_pwrdm_constraint,
++};
++
+ static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1;
+ static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2;
+ static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3;
+@@ -547,6 +562,12 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
+ &dra7_hsmmc_data_mmc2),
+ OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc",
+ &dra7_hsmmc_data_mmc3),
++ OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d01000, "40d01000.mmu",
++ &dra7_ipu1_dsp_iommu_pdata),
++ OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41501000, "41501000.mmu",
++ &dra7_ipu1_dsp_iommu_pdata),
++ OF_DEV_AUXDATA("ti,dra7-iommu", 0x58882000, "58882000.mmu",
++ &dra7_ipu1_dsp_iommu_pdata),
+ #endif
+ /* Common auxdata */
+ OF_DEV_AUXDATA("ti,sysc", 0, NULL, &ti_sysc_pdata),
+--
+2.25.1
+
--- /dev/null
+From d1ed8e3ee017572408af414c3667b0e0a99f8a8d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 12 Dec 2019 15:05:38 +0200
+Subject: ARM: OMAP4+: remove pdata quirks for omap4+ iommus
+
+From: Tero Kristo <t-kristo@ti.com>
+
+[ Upstream commit e4c4b540e1e6c21ff8b987e92b2bd170ee006a94 ]
+
+IOMMU driver will be using ti-sysc bus driver for power management control
+going forward, and the pdata quirks are not needed for anything anymore.
+
+Signed-off-by: Tero Kristo <t-kristo@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/mach-omap2/pdata-quirks.c | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
+index 247e3f8acffe6..5acd29cb8d749 100644
+--- a/arch/arm/mach-omap2/pdata-quirks.c
++++ b/arch/arm/mach-omap2/pdata-quirks.c
+@@ -311,16 +311,6 @@ static void __init omap3_pandora_legacy_init(void)
+ }
+ #endif /* CONFIG_ARCH_OMAP3 */
+
+-#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
+-static struct iommu_platform_data omap4_iommu_pdata = {
+- .reset_name = "mmu_cache",
+- .assert_reset = omap_device_assert_hardreset,
+- .deassert_reset = omap_device_deassert_hardreset,
+- .device_enable = omap_device_enable,
+- .device_idle = omap_device_idle,
+-};
+-#endif
+-
+ #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
+ static struct wkup_m3_platform_data wkup_m3_data = {
+ .reset_name = "wkup_m3",
+@@ -543,10 +533,6 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
+ &wkup_m3_data),
+ #endif
+ #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
+- OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
+- &omap4_iommu_pdata),
+- OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
+- &omap4_iommu_pdata),
+ OF_DEV_AUXDATA("ti,omap4-smartreflex-iva", 0x4a0db000,
+ "4a0db000.smartreflex", &omap_sr_pdata[OMAP_SR_IVA]),
+ OF_DEV_AUXDATA("ti,omap4-smartreflex-core", 0x4a0dd000,
+--
+2.25.1
+
--- /dev/null
+From 5c92819703716688ff89ebeaaeebf32a5f50e2e1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 21 Feb 2020 10:15:32 +0100
+Subject: arm64: dts: g12-common: add parkmode_disable_ss_quirk on DWC3
+ controller
+
+From: Neil Armstrong <narmstrong@baylibre.com>
+
+[ Upstream commit a81bcfb6ac20cdd2e8dec3da14c8bbe1d18f6321 ]
+
+When high load on the DWC3 SuperSpeed port, the controller crashes with:
+[ 221.141621] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
+[ 221.157631] xhci-hcd xhci-hcd.0.auto: Host halt failed, -110
+[ 221.157635] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead
+[ 221.159901] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
+[ 221.159961] hub 2-1.1:1.0: hub_ext_port_status failed (err = -22)
+[ 221.160076] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
+[ 221.165946] usb 2-1.1-port1: cannot reset (err = -22)
+
+Setting the parkmode_disable_ss_quirk quirk fixes the issue.
+
+Reported-by: Tim <elatllat@gmail.com>
+Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
+Signed-off-by: Kevin Hilman <khilman@baylibre.com>
+Cc: Jianxin Pan <jianxin.pan@amlogic.com>
+CC: Dongjin Kim <tobetter@gmail.com>
+Link: https://lore.kernel.org/r/20200221091532.8142-4-narmstrong@baylibre.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+index 2199a54c720cb..1234bc7974294 100644
+--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
++++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+@@ -2381,6 +2381,7 @@
+ dr_mode = "host";
+ snps,dis_u2_susphy_quirk;
+ snps,quirk-frame-length-adjustment;
++ snps,parkmode-disable-ss-quirk;
+ };
+ };
+
+--
+2.25.1
+
--- /dev/null
+From 080ba2346d0f8031a936f8d21a9bf6701946c7ca Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 24 Feb 2020 12:58:03 -0800
+Subject: bus: ti-sysc: Consider non-existing registers too when matching
+ quirks
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit 590e15c76f1231329d1543570a54058dba2e4ff6 ]
+
+We are currently setting -1 for non-existing sysconfig related registers
+for quirks, but setting -ENODEV elsewhere. And for matching the quirks,
+we're now just ignoring the non-existing registers. This will cause issues
+with misdetecting DSS registers as the hardware revision numbers can have
+duplicates.
+
+To avoid this, let's standardize on using -ENODEV also for the quirks
+instead of -1. That way we can always just test for a match without adding
+any more complicated logic.
+
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bus/ti-sysc.c | 120 ++++++++++++++++++++----------------------
+ 1 file changed, 57 insertions(+), 63 deletions(-)
+
+diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
+index c7f408d758396..588dde5a252b6 100644
+--- a/drivers/bus/ti-sysc.c
++++ b/drivers/bus/ti-sysc.c
+@@ -1231,16 +1231,16 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK_LEGACY_IDLE),
+ SYSC_QUIRK("sham", 0, 0x100, 0x110, 0x114, 0x40000c03, 0xffffffff,
+ SYSC_QUIRK_LEGACY_IDLE),
+- SYSC_QUIRK("smartreflex", 0, -1, 0x24, -1, 0x00000000, 0xffffffff,
++ SYSC_QUIRK("smartreflex", 0, -ENODEV, 0x24, -ENODEV, 0x00000000, 0xffffffff,
+ SYSC_QUIRK_LEGACY_IDLE),
+- SYSC_QUIRK("smartreflex", 0, -1, 0x38, -1, 0x00000000, 0xffffffff,
++ SYSC_QUIRK("smartreflex", 0, -ENODEV, 0x38, -ENODEV, 0x00000000, 0xffffffff,
+ SYSC_QUIRK_LEGACY_IDLE),
+ SYSC_QUIRK("timer", 0, 0, 0x10, 0x14, 0x00000015, 0xffffffff,
+ 0),
+ /* Some timers on omap4 and later */
+- SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x50002100, 0xffffffff,
++ SYSC_QUIRK("timer", 0, 0, 0x10, -ENODEV, 0x50002100, 0xffffffff,
+ 0),
+- SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x4fff1301, 0xffff00ff,
++ SYSC_QUIRK("timer", 0, 0, 0x10, -ENODEV, 0x4fff1301, 0xffff00ff,
+ 0),
+ SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000046, 0xffffffff,
+ SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
+@@ -1253,18 +1253,18 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
+
+ /* Quirks that need to be set based on the module address */
+- SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -1, 0x50000800, 0xffffffff,
++ SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
+ SYSC_QUIRK_EXT_OPT_CLOCK | SYSC_QUIRK_NO_RESET_ON_INIT |
+ SYSC_QUIRK_SWSUP_SIDLE),
+
+ /* Quirks that need to be set based on detected module */
+- SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff,
++ SYSC_QUIRK("aess", 0, 0, 0x10, -ENODEV, 0x40000000, 0xffffffff,
+ SYSC_MODULE_QUIRK_AESS),
+- SYSC_QUIRK("dcan", 0x48480000, 0x20, -1, -1, 0xa3170504, 0xffffffff,
++ SYSC_QUIRK("dcan", 0x48480000, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff,
+ SYSC_QUIRK_CLKDM_NOAUTO),
+- SYSC_QUIRK("dwc3", 0x48880000, 0, 0x10, -1, 0x500a0200, 0xffffffff,
++ SYSC_QUIRK("dwc3", 0x48880000, 0, 0x10, -ENODEV, 0x500a0200, 0xffffffff,
+ SYSC_QUIRK_CLKDM_NOAUTO),
+- SYSC_QUIRK("dwc3", 0x488c0000, 0, 0x10, -1, 0x500a0200, 0xffffffff,
++ SYSC_QUIRK("dwc3", 0x488c0000, 0, 0x10, -ENODEV, 0x500a0200, 0xffffffff,
+ SYSC_QUIRK_CLKDM_NOAUTO),
+ SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
+ SYSC_MODULE_QUIRK_HDQ1W),
+@@ -1278,12 +1278,12 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_MODULE_QUIRK_I2C),
+ SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
+ SYSC_MODULE_QUIRK_I2C),
+- SYSC_QUIRK("gpu", 0x50000000, 0x14, -1, -1, 0x00010201, 0xffffffff, 0),
+- SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -1, 0x40000000 , 0xffffffff,
++ SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
++ SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
+ SYSC_MODULE_QUIRK_SGX),
+ SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
+ 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
+- SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -1, 0x4ea2080d, 0xffffffff,
++ SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -ENODEV, 0x4ea2080d, 0xffffffff,
+ SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
+ SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
+ SYSC_MODULE_QUIRK_WDT),
+@@ -1292,57 +1292,57 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_MODULE_QUIRK_WDT | SYSC_QUIRK_SWSUP_SIDLE),
+
+ #ifdef DEBUG
+- SYSC_QUIRK("adc", 0, 0, 0x10, -1, 0x47300001, 0xffffffff, 0),
+- SYSC_QUIRK("atl", 0, 0, -1, -1, 0x0a070100, 0xffffffff, 0),
+- SYSC_QUIRK("cm", 0, 0, -1, -1, 0x40000301, 0xffffffff, 0),
+- SYSC_QUIRK("control", 0, 0, 0x10, -1, 0x40000900, 0xffffffff, 0),
++ SYSC_QUIRK("adc", 0, 0, 0x10, -ENODEV, 0x47300001, 0xffffffff, 0),
++ SYSC_QUIRK("atl", 0, 0, -ENODEV, -ENODEV, 0x0a070100, 0xffffffff, 0),
++ SYSC_QUIRK("cm", 0, 0, -ENODEV, -ENODEV, 0x40000301, 0xffffffff, 0),
++ SYSC_QUIRK("control", 0, 0, 0x10, -ENODEV, 0x40000900, 0xffffffff, 0),
+ SYSC_QUIRK("cpgmac", 0, 0x1200, 0x1208, 0x1204, 0x4edb1902,
+ 0xffff00f0, 0),
+- SYSC_QUIRK("dcan", 0, 0x20, -1, -1, 0xa3170504, 0xffffffff, 0),
+- SYSC_QUIRK("dcan", 0, 0x20, -1, -1, 0x4edb1902, 0xffffffff, 0),
+- SYSC_QUIRK("dmic", 0, 0, 0x10, -1, 0x50010000, 0xffffffff, 0),
+- SYSC_QUIRK("dwc3", 0, 0, 0x10, -1, 0x500a0200, 0xffffffff, 0),
++ SYSC_QUIRK("dcan", 0, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff, 0),
++ SYSC_QUIRK("dcan", 0, 0x20, -ENODEV, -ENODEV, 0x4edb1902, 0xffffffff, 0),
++ SYSC_QUIRK("dmic", 0, 0, 0x10, -ENODEV, 0x50010000, 0xffffffff, 0),
++ SYSC_QUIRK("dwc3", 0, 0, 0x10, -ENODEV, 0x500a0200, 0xffffffff, 0),
+ SYSC_QUIRK("d2d", 0x4a0b6000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
+ SYSC_QUIRK("d2d", 0x4a0cd000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
+- SYSC_QUIRK("epwmss", 0, 0, 0x4, -1, 0x47400001, 0xffffffff, 0),
+- SYSC_QUIRK("gpu", 0, 0x1fc00, 0x1fc10, -1, 0, 0, 0),
+- SYSC_QUIRK("gpu", 0, 0xfe00, 0xfe10, -1, 0x40000000 , 0xffffffff, 0),
++ SYSC_QUIRK("epwmss", 0, 0, 0x4, -ENODEV, 0x47400001, 0xffffffff, 0),
++ SYSC_QUIRK("gpu", 0, 0x1fc00, 0x1fc10, -ENODEV, 0, 0, 0),
++ SYSC_QUIRK("gpu", 0, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff, 0),
+ SYSC_QUIRK("hsi", 0, 0, 0x10, 0x14, 0x50043101, 0xffffffff, 0),
+- SYSC_QUIRK("iss", 0, 0, 0x10, -1, 0x40000101, 0xffffffff, 0),
+- SYSC_QUIRK("lcdc", 0, 0, 0x54, -1, 0x4f201000, 0xffffffff, 0),
+- SYSC_QUIRK("mcasp", 0, 0, 0x4, -1, 0x44306302, 0xffffffff, 0),
+- SYSC_QUIRK("mcasp", 0, 0, 0x4, -1, 0x44307b02, 0xffffffff, 0),
+- SYSC_QUIRK("mcbsp", 0, -1, 0x8c, -1, 0, 0, 0),
+- SYSC_QUIRK("mcspi", 0, 0, 0x10, -1, 0x40300a0b, 0xffff00ff, 0),
++ SYSC_QUIRK("iss", 0, 0, 0x10, -ENODEV, 0x40000101, 0xffffffff, 0),
++ SYSC_QUIRK("lcdc", 0, 0, 0x54, -ENODEV, 0x4f201000, 0xffffffff, 0),
++ SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44306302, 0xffffffff, 0),
++ SYSC_QUIRK("mcasp", 0, 0, 0x4, -ENODEV, 0x44307b02, 0xffffffff, 0),
++ SYSC_QUIRK("mcbsp", 0, -ENODEV, 0x8c, -ENODEV, 0, 0, 0),
++ SYSC_QUIRK("mcspi", 0, 0, 0x10, -ENODEV, 0x40300a0b, 0xffff00ff, 0),
+ SYSC_QUIRK("mcspi", 0, 0, 0x110, 0x114, 0x40300a0b, 0xffffffff, 0),
+- SYSC_QUIRK("mailbox", 0, 0, 0x10, -1, 0x00000400, 0xffffffff, 0),
+- SYSC_QUIRK("m3", 0, 0, -1, -1, 0x5f580105, 0x0fff0f00, 0),
++ SYSC_QUIRK("mailbox", 0, 0, 0x10, -ENODEV, 0x00000400, 0xffffffff, 0),
++ SYSC_QUIRK("m3", 0, 0, -ENODEV, -ENODEV, 0x5f580105, 0x0fff0f00, 0),
+ SYSC_QUIRK("ocp2scp", 0, 0, 0x10, 0x14, 0x50060005, 0xfffffff0, 0),
+- SYSC_QUIRK("ocp2scp", 0, 0, -1, -1, 0x50060007, 0xffffffff, 0),
+- SYSC_QUIRK("padconf", 0, 0, 0x10, -1, 0x4fff0800, 0xffffffff, 0),
+- SYSC_QUIRK("padconf", 0, 0, -1, -1, 0x40001100, 0xffffffff, 0),
+- SYSC_QUIRK("prcm", 0, 0, -1, -1, 0x40000100, 0xffffffff, 0),
+- SYSC_QUIRK("prcm", 0, 0, -1, -1, 0x00004102, 0xffffffff, 0),
+- SYSC_QUIRK("prcm", 0, 0, -1, -1, 0x40000400, 0xffffffff, 0),
+- SYSC_QUIRK("scm", 0, 0, 0x10, -1, 0x40000900, 0xffffffff, 0),
+- SYSC_QUIRK("scm", 0, 0, -1, -1, 0x4e8b0100, 0xffffffff, 0),
+- SYSC_QUIRK("scm", 0, 0, -1, -1, 0x4f000100, 0xffffffff, 0),
+- SYSC_QUIRK("scm", 0, 0, -1, -1, 0x40000900, 0xffffffff, 0),
+- SYSC_QUIRK("scrm", 0, 0, -1, -1, 0x00000010, 0xffffffff, 0),
+- SYSC_QUIRK("sdio", 0, 0, 0x10, -1, 0x40202301, 0xffff0ff0, 0),
++ SYSC_QUIRK("ocp2scp", 0, 0, -ENODEV, -ENODEV, 0x50060007, 0xffffffff, 0),
++ SYSC_QUIRK("padconf", 0, 0, 0x10, -ENODEV, 0x4fff0800, 0xffffffff, 0),
++ SYSC_QUIRK("padconf", 0, 0, -ENODEV, -ENODEV, 0x40001100, 0xffffffff, 0),
++ SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x40000100, 0xffffffff, 0),
++ SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x00004102, 0xffffffff, 0),
++ SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x40000400, 0xffffffff, 0),
++ SYSC_QUIRK("scm", 0, 0, 0x10, -ENODEV, 0x40000900, 0xffffffff, 0),
++ SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4e8b0100, 0xffffffff, 0),
++ SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4f000100, 0xffffffff, 0),
++ SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x40000900, 0xffffffff, 0),
++ SYSC_QUIRK("scrm", 0, 0, -ENODEV, -ENODEV, 0x00000010, 0xffffffff, 0),
++ SYSC_QUIRK("sdio", 0, 0, 0x10, -ENODEV, 0x40202301, 0xffff0ff0, 0),
+ SYSC_QUIRK("sdio", 0, 0x2fc, 0x110, 0x114, 0x31010000, 0xffffffff, 0),
+ SYSC_QUIRK("sdma", 0, 0, 0x2c, 0x28, 0x00010900, 0xffffffff, 0),
+- SYSC_QUIRK("slimbus", 0, 0, 0x10, -1, 0x40000902, 0xffffffff, 0),
+- SYSC_QUIRK("slimbus", 0, 0, 0x10, -1, 0x40002903, 0xffffffff, 0),
+- SYSC_QUIRK("spinlock", 0, 0, 0x10, -1, 0x50020000, 0xffffffff, 0),
+- SYSC_QUIRK("rng", 0, 0x1fe0, 0x1fe4, -1, 0x00000020, 0xffffffff, 0),
+- SYSC_QUIRK("rtc", 0, 0x74, 0x78, -1, 0x4eb01908, 0xffff00f0, 0),
+- SYSC_QUIRK("timer32k", 0, 0, 0x4, -1, 0x00000060, 0xffffffff, 0),
++ SYSC_QUIRK("slimbus", 0, 0, 0x10, -ENODEV, 0x40000902, 0xffffffff, 0),
++ SYSC_QUIRK("slimbus", 0, 0, 0x10, -ENODEV, 0x40002903, 0xffffffff, 0),
++ SYSC_QUIRK("spinlock", 0, 0, 0x10, -ENODEV, 0x50020000, 0xffffffff, 0),
++ SYSC_QUIRK("rng", 0, 0x1fe0, 0x1fe4, -ENODEV, 0x00000020, 0xffffffff, 0),
++ SYSC_QUIRK("rtc", 0, 0x74, 0x78, -ENODEV, 0x4eb01908, 0xffff00f0, 0),
++ SYSC_QUIRK("timer32k", 0, 0, 0x4, -ENODEV, 0x00000060, 0xffffffff, 0),
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000004, 0xffffffff, 0),
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0),
+ SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0),
+- SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -1, 0x50700101, 0xffffffff, 0),
+- SYSC_QUIRK("vfpe", 0, 0, 0x104, -1, 0x4d001200, 0xffffffff, 0),
++ SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -ENODEV, 0x50700101, 0xffffffff, 0),
++ SYSC_QUIRK("vfpe", 0, 0, 0x104, -ENODEV, 0x4d001200, 0xffffffff, 0),
+ #endif
+ };
+
+@@ -1364,16 +1364,13 @@ static void sysc_init_early_quirks(struct sysc *ddata)
+ if (q->base != ddata->module_pa)
+ continue;
+
+- if (q->rev_offset >= 0 &&
+- q->rev_offset != ddata->offsets[SYSC_REVISION])
++ if (q->rev_offset != ddata->offsets[SYSC_REVISION])
+ continue;
+
+- if (q->sysc_offset >= 0 &&
+- q->sysc_offset != ddata->offsets[SYSC_SYSCONFIG])
++ if (q->sysc_offset != ddata->offsets[SYSC_SYSCONFIG])
+ continue;
+
+- if (q->syss_offset >= 0 &&
+- q->syss_offset != ddata->offsets[SYSC_SYSSTATUS])
++ if (q->syss_offset != ddata->offsets[SYSC_SYSSTATUS])
+ continue;
+
+ ddata->name = q->name;
+@@ -1393,16 +1390,13 @@ static void sysc_init_revision_quirks(struct sysc *ddata)
+ if (q->base && q->base != ddata->module_pa)
+ continue;
+
+- if (q->rev_offset >= 0 &&
+- q->rev_offset != ddata->offsets[SYSC_REVISION])
++ if (q->rev_offset != ddata->offsets[SYSC_REVISION])
+ continue;
+
+- if (q->sysc_offset >= 0 &&
+- q->sysc_offset != ddata->offsets[SYSC_SYSCONFIG])
++ if (q->sysc_offset != ddata->offsets[SYSC_SYSCONFIG])
+ continue;
+
+- if (q->syss_offset >= 0 &&
+- q->syss_offset != ddata->offsets[SYSC_SYSSTATUS])
++ if (q->syss_offset != ddata->offsets[SYSC_SYSSTATUS])
+ continue;
+
+ if (q->revision == ddata->revision ||
+--
+2.25.1
+
--- /dev/null
+From d374f26c16c70f6ba73acdf857188f98fac98704 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 24 Feb 2020 12:58:03 -0800
+Subject: bus: ti-sysc: Detect display subsystem related devices
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit 77dfece2e6d8bedb6ecd4d61379ae3dc52f389bd ]
+
+In order to prepare probing display subsystem (DSS) with ti-sysc
+interconnect target module driver and device tree data, let's
+detect DSS related modules.
+
+We need to also add reset quirk handling for DSS, but until that's
+done, let's just enable the optional clock quirks for DSS and
+omap4 HDMI. The rest is just naming of modules if CONFIG_DEBUG
+is set.
+
+Cc: Jyri Sarha <jsarha@ti.com>
+Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bus/ti-sysc.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
+index 5c78b5afb85c7..1d31304fdd7c5 100644
+--- a/drivers/bus/ti-sysc.c
++++ b/drivers/bus/ti-sysc.c
+@@ -1282,10 +1282,18 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_MODULE_QUIRK_AESS),
+ SYSC_QUIRK("dcan", 0x48480000, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff,
+ SYSC_QUIRK_CLKDM_NOAUTO),
++ SYSC_QUIRK("dss", 0x4832a000, 0, 0x10, 0x14, 0x00000020, 0xffffffff,
++ SYSC_QUIRK_OPT_CLKS_IN_RESET),
++ SYSC_QUIRK("dss", 0x58000000, 0, -ENODEV, 0x14, 0x00000040, 0xffffffff,
++ SYSC_QUIRK_OPT_CLKS_IN_RESET),
++ SYSC_QUIRK("dss", 0x58000000, 0, -ENODEV, 0x14, 0x00000061, 0xffffffff,
++ SYSC_QUIRK_OPT_CLKS_IN_RESET),
+ SYSC_QUIRK("dwc3", 0x48880000, 0, 0x10, -ENODEV, 0x500a0200, 0xffffffff,
+ SYSC_QUIRK_CLKDM_NOAUTO),
+ SYSC_QUIRK("dwc3", 0x488c0000, 0, 0x10, -ENODEV, 0x500a0200, 0xffffffff,
+ SYSC_QUIRK_CLKDM_NOAUTO),
++ SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50030200, 0xffffffff,
++ SYSC_QUIRK_OPT_CLKS_NEEDED),
+ SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
+ SYSC_MODULE_QUIRK_HDQ1W),
+ SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
+@@ -1322,13 +1330,21 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ 0xffff00f0, 0),
+ SYSC_QUIRK("dcan", 0, 0x20, -ENODEV, -ENODEV, 0xa3170504, 0xffffffff, 0),
+ SYSC_QUIRK("dcan", 0, 0x20, -ENODEV, -ENODEV, 0x4edb1902, 0xffffffff, 0),
++ SYSC_QUIRK("dispc", 0x4832a400, 0, 0x10, 0x14, 0x00000030, 0xffffffff, 0),
++ SYSC_QUIRK("dispc", 0x58001000, 0, 0x10, 0x14, 0x00000040, 0xffffffff, 0),
++ SYSC_QUIRK("dispc", 0x58001000, 0, 0x10, 0x14, 0x00000051, 0xffffffff, 0),
+ SYSC_QUIRK("dmic", 0, 0, 0x10, -ENODEV, 0x50010000, 0xffffffff, 0),
++ SYSC_QUIRK("dsi", 0x58004000, 0, 0x10, 0x14, 0x00000030, 0xffffffff, 0),
++ SYSC_QUIRK("dsi", 0x58005000, 0, 0x10, 0x14, 0x00000030, 0xffffffff, 0),
++ SYSC_QUIRK("dsi", 0x58005000, 0, 0x10, 0x14, 0x00000040, 0xffffffff, 0),
++ SYSC_QUIRK("dsi", 0x58009000, 0, 0x10, 0x14, 0x00000040, 0xffffffff, 0),
+ SYSC_QUIRK("dwc3", 0, 0, 0x10, -ENODEV, 0x500a0200, 0xffffffff, 0),
+ SYSC_QUIRK("d2d", 0x4a0b6000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
+ SYSC_QUIRK("d2d", 0x4a0cd000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
+ SYSC_QUIRK("epwmss", 0, 0, 0x4, -ENODEV, 0x47400001, 0xffffffff, 0),
+ SYSC_QUIRK("gpu", 0, 0x1fc00, 0x1fc10, -ENODEV, 0, 0, 0),
+ SYSC_QUIRK("gpu", 0, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff, 0),
++ SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50031d00, 0xffffffff, 0),
+ SYSC_QUIRK("hsi", 0, 0, 0x10, 0x14, 0x50043101, 0xffffffff, 0),
+ SYSC_QUIRK("iss", 0, 0, 0x10, -ENODEV, 0x40000101, 0xffffffff, 0),
+ SYSC_QUIRK("lcdc", 0, 0, 0x54, -ENODEV, 0x4f201000, 0xffffffff, 0),
+@@ -1346,6 +1362,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x40000100, 0xffffffff, 0),
+ SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x00004102, 0xffffffff, 0),
+ SYSC_QUIRK("prcm", 0, 0, -ENODEV, -ENODEV, 0x40000400, 0xffffffff, 0),
++ SYSC_QUIRK("rfbi", 0x4832a800, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
++ SYSC_QUIRK("rfbi", 0x58002000, 0, 0x10, 0x14, 0x00000010, 0xffffffff, 0),
+ SYSC_QUIRK("scm", 0, 0, 0x10, -ENODEV, 0x40000900, 0xffffffff, 0),
+ SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4e8b0100, 0xffffffff, 0),
+ SYSC_QUIRK("scm", 0, 0, -ENODEV, -ENODEV, 0x4f000100, 0xffffffff, 0),
+@@ -1363,6 +1381,7 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0),
+ SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0),
+ SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -ENODEV, 0x50700101, 0xffffffff, 0),
++ SYSC_QUIRK("venc", 0x58003000, 0, -ENODEV, -ENODEV, 0x00000002, 0xffffffff, 0),
+ SYSC_QUIRK("vfpe", 0, 0, 0x104, -ENODEV, 0x4d001200, 0xffffffff, 0),
+ #endif
+ };
+--
+2.25.1
+
--- /dev/null
+From e9d940cfc5c96519f93774699d5801efd7d10683 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 3 Mar 2020 09:31:00 -0800
+Subject: bus: ti-sysc: Detect EDMA and set quirk flags for tptc
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit 25bfaaa73c7d26a6e897559c510d7daff5e9d22d ]
+
+In order to probe EDMA with ti-sysc interconnect target module and with
+device tree data, we need to properly detect EDMA and set the flags for
+SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY for tptc.
+
+We have these flags currently set for am4 and dra7, but not for am335x.
+Let's set them for all the SoCs as the tptc module should behave the
+same for all of them. It's likely that am335x was never tested to idle
+EDMA tptc.
+
+Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bus/ti-sysc.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
+index 1d31304fdd7c5..d0b75e7d5e50f 100644
+--- a/drivers/bus/ti-sysc.c
++++ b/drivers/bus/ti-sysc.c
+@@ -1311,6 +1311,10 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_MODULE_QUIRK_SGX),
+ SYSC_QUIRK("rtc", 0, 0x74, 0x78, -ENODEV, 0x4eb01908, 0xffff00f0,
+ SYSC_MODULE_QUIRK_RTC_UNLOCK),
++ SYSC_QUIRK("tptc", 0, 0, 0x10, -ENODEV, 0x40006c00, 0xffffefff,
++ SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
++ SYSC_QUIRK("tptc", 0, 0, -ENODEV, -ENODEV, 0x40007c00, 0xffffffff,
++ SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
+ SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
+ 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
+ SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -ENODEV, 0x4ea2080d, 0xffffffff,
+@@ -1377,6 +1381,7 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK("spinlock", 0, 0, 0x10, -ENODEV, 0x50020000, 0xffffffff, 0),
+ SYSC_QUIRK("rng", 0, 0x1fe0, 0x1fe4, -ENODEV, 0x00000020, 0xffffffff, 0),
+ SYSC_QUIRK("timer32k", 0, 0, 0x4, -ENODEV, 0x00000060, 0xffffffff, 0),
++ SYSC_QUIRK("tpcc", 0, 0, -ENODEV, -ENODEV, 0x40014c00, 0xffffffff, 0),
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000004, 0xffffffff, 0),
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0),
+ SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0),
+--
+2.25.1
+
--- /dev/null
+From cfb1c6a6b156b5f681444a9d6891c5ada31d2994 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 24 Feb 2020 12:58:03 -0800
+Subject: bus: ti-sysc: Handle module unlock quirk needed for some RTC
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit e8639e1c986a8a9d0f94549170f6db579376c3ae ]
+
+The RTC modules on am3 and am4 need quirk handling to unlock and lock
+them for reset so let's add the quirk handling based on what we already
+have for legacy platform data. In later patches we will simply drop the
+RTC related platform data and the old quirk handling.
+
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bus/ti-sysc.c | 74 ++++++++++++++++++++++++---
+ include/linux/platform_data/ti-sysc.h | 1 +
+ 2 files changed, 69 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
+index 588dde5a252b6..5c78b5afb85c7 100644
+--- a/drivers/bus/ti-sysc.c
++++ b/drivers/bus/ti-sysc.c
+@@ -75,6 +75,8 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
+ * @reset_done_quirk: module specific reset done quirk
+ * @module_enable_quirk: module specific enable quirk
+ * @module_disable_quirk: module specific disable quirk
++ * @module_unlock_quirk: module specific sysconfig unlock quirk
++ * @module_lock_quirk: module specific sysconfig lock quirk
+ */
+ struct sysc {
+ struct device *dev;
+@@ -102,6 +104,8 @@ struct sysc {
+ void (*reset_done_quirk)(struct sysc *sysc);
+ void (*module_enable_quirk)(struct sysc *sysc);
+ void (*module_disable_quirk)(struct sysc *sysc);
++ void (*module_unlock_quirk)(struct sysc *sysc);
++ void (*module_lock_quirk)(struct sysc *sysc);
+ };
+
+ static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
+@@ -863,6 +867,22 @@ static void sysc_show_registers(struct sysc *ddata)
+ buf);
+ }
+
++/**
++ * sysc_write_sysconfig - handle sysconfig quirks for register write
++ * @ddata: device driver data
++ * @value: register value
++ */
++static void sysc_write_sysconfig(struct sysc *ddata, u32 value)
++{
++ if (ddata->module_unlock_quirk)
++ ddata->module_unlock_quirk(ddata);
++
++ sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], value);
++
++ if (ddata->module_lock_quirk)
++ ddata->module_lock_quirk(ddata);
++}
++
+ #define SYSC_IDLE_MASK (SYSC_NR_IDLEMODES - 1)
+ #define SYSC_CLOCACT_ICK 2
+
+@@ -912,7 +932,7 @@ static int sysc_enable_module(struct device *dev)
+
+ reg &= ~(SYSC_IDLE_MASK << regbits->sidle_shift);
+ reg |= best_mode << regbits->sidle_shift;
+- sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
++ sysc_write_sysconfig(ddata, reg);
+
+ set_midle:
+ /* Set MIDLE mode */
+@@ -931,14 +951,14 @@ set_midle:
+
+ reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
+ reg |= best_mode << regbits->midle_shift;
+- sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
++ sysc_write_sysconfig(ddata, reg);
+
+ set_autoidle:
+ /* Autoidle bit must enabled separately if available */
+ if (regbits->autoidle_shift >= 0 &&
+ ddata->cfg.sysc_val & BIT(regbits->autoidle_shift)) {
+ reg |= 1 << regbits->autoidle_shift;
+- sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
++ sysc_write_sysconfig(ddata, reg);
+ }
+
+ /* Flush posted write */
+@@ -999,7 +1019,7 @@ static int sysc_disable_module(struct device *dev)
+
+ reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
+ reg |= best_mode << regbits->midle_shift;
+- sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
++ sysc_write_sysconfig(ddata, reg);
+
+ set_sidle:
+ /* Set SIDLE mode */
+@@ -1022,7 +1042,7 @@ set_sidle:
+ if (regbits->autoidle_shift >= 0 &&
+ ddata->cfg.sysc_val & BIT(regbits->autoidle_shift))
+ reg |= 1 << regbits->autoidle_shift;
+- sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
++ sysc_write_sysconfig(ddata, reg);
+
+ /* Flush posted write */
+ sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
+@@ -1281,6 +1301,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
+ SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
+ SYSC_MODULE_QUIRK_SGX),
++ SYSC_QUIRK("rtc", 0, 0x74, 0x78, -ENODEV, 0x4eb01908, 0xffff00f0,
++ SYSC_MODULE_QUIRK_RTC_UNLOCK),
+ SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
+ 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
+ SYSC_QUIRK("usb_otg_hs", 0, 0, 0x10, -ENODEV, 0x4ea2080d, 0xffffffff,
+@@ -1336,7 +1358,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
+ SYSC_QUIRK("slimbus", 0, 0, 0x10, -ENODEV, 0x40002903, 0xffffffff, 0),
+ SYSC_QUIRK("spinlock", 0, 0, 0x10, -ENODEV, 0x50020000, 0xffffffff, 0),
+ SYSC_QUIRK("rng", 0, 0x1fe0, 0x1fe4, -ENODEV, 0x00000020, 0xffffffff, 0),
+- SYSC_QUIRK("rtc", 0, 0x74, 0x78, -ENODEV, 0x4eb01908, 0xffff00f0, 0),
+ SYSC_QUIRK("timer32k", 0, 0, 0x4, -ENODEV, 0x00000060, 0xffffffff, 0),
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000004, 0xffffffff, 0),
+ SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0),
+@@ -1458,6 +1479,40 @@ static void sysc_post_reset_quirk_i2c(struct sysc *ddata)
+ sysc_clk_quirk_i2c(ddata, true);
+ }
+
++/* RTC on am3 and 4 needs to be unlocked and locked for sysconfig */
++static void sysc_quirk_rtc(struct sysc *ddata, bool lock)
++{
++ u32 val, kick0_val = 0, kick1_val = 0;
++ unsigned long flags;
++ int error;
++
++ if (!lock) {
++ kick0_val = 0x83e70b13;
++ kick1_val = 0x95a4f1e0;
++ }
++
++ local_irq_save(flags);
++ /* RTC_STATUS BUSY bit may stay active for 1/32768 seconds (~30 usec) */
++ error = readl_poll_timeout(ddata->module_va + 0x44, val,
++ !(val & BIT(0)), 100, 50);
++ if (error)
++ dev_warn(ddata->dev, "rtc busy timeout\n");
++ /* Now we have ~15 microseconds to read/write various registers */
++ sysc_write(ddata, 0x6c, kick0_val);
++ sysc_write(ddata, 0x70, kick1_val);
++ local_irq_restore(flags);
++}
++
++static void sysc_module_unlock_quirk_rtc(struct sysc *ddata)
++{
++ sysc_quirk_rtc(ddata, false);
++}
++
++static void sysc_module_lock_quirk_rtc(struct sysc *ddata)
++{
++ sysc_quirk_rtc(ddata, true);
++}
++
+ /* 36xx SGX needs a quirk for to bypass OCP IPG interrupt logic */
+ static void sysc_module_enable_quirk_sgx(struct sysc *ddata)
+ {
+@@ -1512,6 +1567,13 @@ static void sysc_init_module_quirks(struct sysc *ddata)
+ if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_AESS)
+ ddata->module_enable_quirk = sysc_module_enable_quirk_aess;
+
++ if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_RTC_UNLOCK) {
++ ddata->module_unlock_quirk = sysc_module_unlock_quirk_rtc;
++ ddata->module_lock_quirk = sysc_module_lock_quirk_rtc;
++
++ return;
++ }
++
+ if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_SGX)
+ ddata->module_enable_quirk = sysc_module_enable_quirk_sgx;
+
+diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
+index 2cbde6542849d..5fcc9bc9e7517 100644
+--- a/include/linux/platform_data/ti-sysc.h
++++ b/include/linux/platform_data/ti-sysc.h
+@@ -49,6 +49,7 @@ struct sysc_regbits {
+ s8 emufree_shift;
+ };
+
++#define SYSC_MODULE_QUIRK_RTC_UNLOCK BIT(22)
+ #define SYSC_QUIRK_CLKDM_NOAUTO BIT(21)
+ #define SYSC_QUIRK_FORCE_MSTANDBY BIT(20)
+ #define SYSC_MODULE_QUIRK_AESS BIT(19)
+--
+2.25.1
+
--- /dev/null
+From 20ec16f1eeb60a95a1398e5f8c7e7a4e341f5e8b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 24 Feb 2020 12:58:03 -0800
+Subject: bus: ti-sysc: Rename clk related quirks to pre_reset and post_reset
+ quirks
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit e64c021fd92467e34b9d970a651bcaa8f326f3f2 ]
+
+The clk_disable_quirk and clk_enable_quirk should really be called
+pre_reset_quirk and post_reset_quirk to avoid confusion like we had
+with hdq1w reset.
+
+Let's also rename the related functions so the code is easier to follow.
+Note that we also have reset_done_quirk that is needed in some cases
+after checking the separate register for reset done bit.
+
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bus/ti-sysc.c | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
+index 553c0e2796217..c7f408d758396 100644
+--- a/drivers/bus/ti-sysc.c
++++ b/drivers/bus/ti-sysc.c
+@@ -70,8 +70,8 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
+ * @child_needs_resume: runtime resume needed for child on resume from suspend
+ * @disable_on_idle: status flag used for disabling modules with resets
+ * @idle_work: work structure used to perform delayed idle on a module
+- * @clk_enable_quirk: module specific clock enable quirk
+- * @clk_disable_quirk: module specific clock disable quirk
++ * @pre_reset_quirk: module specific pre-reset quirk
++ * @post_reset_quirk: module specific post-reset quirk
+ * @reset_done_quirk: module specific reset done quirk
+ * @module_enable_quirk: module specific enable quirk
+ * @module_disable_quirk: module specific disable quirk
+@@ -97,8 +97,8 @@ struct sysc {
+ unsigned int needs_resume:1;
+ unsigned int child_needs_resume:1;
+ struct delayed_work idle_work;
+- void (*clk_enable_quirk)(struct sysc *sysc);
+- void (*clk_disable_quirk)(struct sysc *sysc);
++ void (*pre_reset_quirk)(struct sysc *sysc);
++ void (*post_reset_quirk)(struct sysc *sysc);
+ void (*reset_done_quirk)(struct sysc *sysc);
+ void (*module_enable_quirk)(struct sysc *sysc);
+ void (*module_disable_quirk)(struct sysc *sysc);
+@@ -1433,7 +1433,7 @@ static void sysc_module_enable_quirk_aess(struct sysc *ddata)
+ sysc_write(ddata, offset, 1);
+ }
+
+-/* I2C needs extra enable bit toggling for reset */
++/* I2C needs to be disabled for reset */
+ static void sysc_clk_quirk_i2c(struct sysc *ddata, bool enable)
+ {
+ int offset;
+@@ -1454,14 +1454,14 @@ static void sysc_clk_quirk_i2c(struct sysc *ddata, bool enable)
+ sysc_write(ddata, offset, val);
+ }
+
+-static void sysc_clk_enable_quirk_i2c(struct sysc *ddata)
++static void sysc_pre_reset_quirk_i2c(struct sysc *ddata)
+ {
+- sysc_clk_quirk_i2c(ddata, true);
++ sysc_clk_quirk_i2c(ddata, false);
+ }
+
+-static void sysc_clk_disable_quirk_i2c(struct sysc *ddata)
++static void sysc_post_reset_quirk_i2c(struct sysc *ddata)
+ {
+- sysc_clk_quirk_i2c(ddata, false);
++ sysc_clk_quirk_i2c(ddata, true);
+ }
+
+ /* 36xx SGX needs a quirk for to bypass OCP IPG interrupt logic */
+@@ -1503,14 +1503,14 @@ static void sysc_init_module_quirks(struct sysc *ddata)
+ return;
+
+ if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_HDQ1W) {
+- ddata->clk_disable_quirk = sysc_pre_reset_quirk_hdq1w;
++ ddata->pre_reset_quirk = sysc_pre_reset_quirk_hdq1w;
+
+ return;
+ }
+
+ if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_I2C) {
+- ddata->clk_enable_quirk = sysc_clk_enable_quirk_i2c;
+- ddata->clk_disable_quirk = sysc_clk_disable_quirk_i2c;
++ ddata->pre_reset_quirk = sysc_pre_reset_quirk_i2c;
++ ddata->post_reset_quirk = sysc_post_reset_quirk_i2c;
+
+ return;
+ }
+@@ -1629,8 +1629,8 @@ static int sysc_reset(struct sysc *ddata)
+ else
+ syss_done = ddata->cfg.syss_mask;
+
+- if (ddata->clk_disable_quirk)
+- ddata->clk_disable_quirk(ddata);
++ if (ddata->pre_reset_quirk)
++ ddata->pre_reset_quirk(ddata);
+
+ sysc_val = sysc_read_sysconfig(ddata);
+ sysc_val |= sysc_mask;
+@@ -1640,8 +1640,8 @@ static int sysc_reset(struct sysc *ddata)
+ usleep_range(ddata->cfg.srst_udelay,
+ ddata->cfg.srst_udelay * 2);
+
+- if (ddata->clk_enable_quirk)
+- ddata->clk_enable_quirk(ddata);
++ if (ddata->post_reset_quirk)
++ ddata->post_reset_quirk(ddata);
+
+ /* Poll on reset status */
+ if (syss_offset >= 0) {
+--
+2.25.1
+
--- /dev/null
+From 2d39b6a010e7d634ea6cd23934f54ddb64743b13 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 31 May 2020 12:37:54 -0700
+Subject: bus: ti-sysc: Use optional clocks on for enable and wait for
+ softreset bit
+
+From: Tony Lindgren <tony@atomide.com>
+
+[ Upstream commit d46f9fbec71997420e4fb83c04d9affdf423f879 ]
+
+Some modules reset automatically when idled, and when re-enabled, we must
+wait for the automatic OCP softreset to complete. And if optional clocks
+are configured, we need to keep the clocks on while waiting for the reset
+to complete.
+
+Let's fix the issue by moving the OCP softreset code to a separate
+function sysc_wait_softreset(), and call it also from sysc_enable_module()
+with the optional clocks enabled.
+
+This is based on what we're already doing for legacy platform data booting
+in _enable_sysc().
+
+Fixes: 7324a7a0d5e2 ("bus: ti-sysc: Implement display subsystem reset quirk")
+Reported-by: Faiz Abbas <faiz_abbas@ti.com>
+Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bus/ti-sysc.c | 80 ++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 60 insertions(+), 20 deletions(-)
+
+diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
+index d0b75e7d5e50f..bb3e3310865bd 100644
+--- a/drivers/bus/ti-sysc.c
++++ b/drivers/bus/ti-sysc.c
+@@ -186,6 +186,35 @@ static u32 sysc_read_sysstatus(struct sysc *ddata)
+ return sysc_read(ddata, offset);
+ }
+
++/* Poll on reset status */
++static int sysc_wait_softreset(struct sysc *ddata)
++{
++ u32 sysc_mask, syss_done, rstval;
++ int syss_offset, error = 0;
++
++ syss_offset = ddata->offsets[SYSC_SYSSTATUS];
++ sysc_mask = BIT(ddata->cap->regbits->srst_shift);
++
++ if (ddata->cfg.quirks & SYSS_QUIRK_RESETDONE_INVERTED)
++ syss_done = 0;
++ else
++ syss_done = ddata->cfg.syss_mask;
++
++ if (syss_offset >= 0) {
++ error = readx_poll_timeout(sysc_read_sysstatus, ddata, rstval,
++ (rstval & ddata->cfg.syss_mask) ==
++ syss_done,
++ 100, MAX_MODULE_SOFTRESET_WAIT);
++
++ } else if (ddata->cfg.quirks & SYSC_QUIRK_RESET_STATUS) {
++ error = readx_poll_timeout(sysc_read_sysconfig, ddata, rstval,
++ !(rstval & sysc_mask),
++ 100, MAX_MODULE_SOFTRESET_WAIT);
++ }
++
++ return error;
++}
++
+ static int sysc_add_named_clock_from_child(struct sysc *ddata,
+ const char *name,
+ const char *optfck_name)
+@@ -892,8 +921,34 @@ static int sysc_enable_module(struct device *dev)
+ struct sysc *ddata;
+ const struct sysc_regbits *regbits;
+ u32 reg, idlemodes, best_mode;
++ int error;
+
+ ddata = dev_get_drvdata(dev);
++
++ /*
++ * Some modules like DSS reset automatically on idle. Enable optional
++ * reset clocks and wait for OCP softreset to complete.
++ */
++ if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET) {
++ error = sysc_enable_opt_clocks(ddata);
++ if (error) {
++ dev_err(ddata->dev,
++ "Optional clocks failed for enable: %i\n",
++ error);
++ return error;
++ }
++ }
++ error = sysc_wait_softreset(ddata);
++ if (error)
++ dev_warn(ddata->dev, "OCP softreset timed out\n");
++ if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
++ sysc_disable_opt_clocks(ddata);
++
++ /*
++ * Some subsystem private interconnects, like DSS top level module,
++ * need only the automatic OCP softreset handling with no sysconfig
++ * register bits to configure.
++ */
+ if (ddata->offsets[SYSC_SYSCONFIG] == -ENODEV)
+ return 0;
+
+@@ -1691,11 +1746,10 @@ static int sysc_rstctrl_reset_deassert(struct sysc *ddata, bool reset)
+ */
+ static int sysc_reset(struct sysc *ddata)
+ {
+- int sysc_offset, syss_offset, sysc_val, rstval, error = 0;
+- u32 sysc_mask, syss_done;
++ int sysc_offset, sysc_val, error;
++ u32 sysc_mask;
+
+ sysc_offset = ddata->offsets[SYSC_SYSCONFIG];
+- syss_offset = ddata->offsets[SYSC_SYSSTATUS];
+
+ if (ddata->legacy_mode || sysc_offset < 0 ||
+ ddata->cap->regbits->srst_shift < 0 ||
+@@ -1704,11 +1758,6 @@ static int sysc_reset(struct sysc *ddata)
+
+ sysc_mask = BIT(ddata->cap->regbits->srst_shift);
+
+- if (ddata->cfg.quirks & SYSS_QUIRK_RESETDONE_INVERTED)
+- syss_done = 0;
+- else
+- syss_done = ddata->cfg.syss_mask;
+-
+ if (ddata->pre_reset_quirk)
+ ddata->pre_reset_quirk(ddata);
+
+@@ -1723,18 +1772,9 @@ static int sysc_reset(struct sysc *ddata)
+ if (ddata->post_reset_quirk)
+ ddata->post_reset_quirk(ddata);
+
+- /* Poll on reset status */
+- if (syss_offset >= 0) {
+- error = readx_poll_timeout(sysc_read_sysstatus, ddata, rstval,
+- (rstval & ddata->cfg.syss_mask) ==
+- syss_done,
+- 100, MAX_MODULE_SOFTRESET_WAIT);
+-
+- } else if (ddata->cfg.quirks & SYSC_QUIRK_RESET_STATUS) {
+- error = readx_poll_timeout(sysc_read_sysconfig, ddata, rstval,
+- !(rstval & sysc_mask),
+- 100, MAX_MODULE_SOFTRESET_WAIT);
+- }
++ error = sysc_wait_softreset(ddata);
++ if (error)
++ dev_warn(ddata->dev, "OCP softreset timed out\n");
+
+ if (ddata->reset_done_quirk)
+ ddata->reset_done_quirk(ddata);
+--
+2.25.1
+
--- /dev/null
+From ec964f1a9aa9697811f5a24e142025dde79a5cf5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 21 Feb 2020 10:15:30 +0100
+Subject: doc: dt: bindings: usb: dwc3: Update entries for disabling SS
+ instances in park mode
+
+From: Neil Armstrong <narmstrong@baylibre.com>
+
+[ Upstream commit 3d157c28d2289edf0439e8308e8de3a06acaaf0e ]
+
+This patch updates the documentation with the information related
+to the quirks that needs to be added for disabling all SuperSpeed XHCI
+instances in park mode.
+
+Cc: Dongjin Kim <tobetter@gmail.com>
+Cc: Jianxin Pan <jianxin.pan@amlogic.com>
+Cc: Thinh Nguyen <thinhn@synopsys.com>
+Cc: Jun Li <lijun.kernel@gmail.com>
+Reported-by: Tim <elatllat@gmail.com>
+Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Felipe Balbi <balbi@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
+index 66780a47ad859..c977a3ba2f35c 100644
+--- a/Documentation/devicetree/bindings/usb/dwc3.txt
++++ b/Documentation/devicetree/bindings/usb/dwc3.txt
+@@ -75,6 +75,8 @@ Optional properties:
+ from P0 to P1/P2/P3 without delay.
+ - snps,dis-tx-ipgap-linecheck-quirk: when set, disable u2mac linestate check
+ during HS transmit.
++ - snps,parkmode-disable-ss-quirk: when set, all SuperSpeed bus instances in
++ park mode are disabled.
+ - snps,dis_metastability_quirk: when set, disable metastability workaround.
+ CAUTION: use only if you are absolutely sure of it.
+ - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
+--
+2.25.1
+
--- /dev/null
+From c09aa42cf5af4f314a2918c85816011408443049 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 19 Feb 2020 20:08:55 +0200
+Subject: drm/sun4i: tcon: Separate quirks for tcon0 and tcon1 on A20
+
+From: Andrey Lebedev <andrey@lebedev.lt>
+
+[ Upstream commit cd0ecabdc953397ed0378022b3b90e0c0871c2eb ]
+
+Timing controllers on A20 are not equivalent: tcon0 on A20 supports
+LVDS output and tcon1 does not. Separate the capabilities by
+introducing independent set of quirks for each of the tcons.
+
+Signed-off-by: Andrey Lebedev <andrey@lebedev.lt>
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+Link: https://patchwork.freedesktop.org/patch/msgid/20200219180858.4806-3-andrey.lebedev@gmail.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
+index 27c80c9e2b83b..0f7eafedfe8f5 100644
+--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
++++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
+@@ -1504,6 +1504,8 @@ const struct of_device_id sun4i_tcon_of_table[] = {
+ { .compatible = "allwinner,sun6i-a31-tcon", .data = &sun6i_a31_quirks },
+ { .compatible = "allwinner,sun6i-a31s-tcon", .data = &sun6i_a31s_quirks },
+ { .compatible = "allwinner,sun7i-a20-tcon", .data = &sun7i_a20_quirks },
++ { .compatible = "allwinner,sun7i-a20-tcon0", .data = &sun7i_a20_quirks },
++ { .compatible = "allwinner,sun7i-a20-tcon1", .data = &sun7i_a20_quirks },
+ { .compatible = "allwinner,sun8i-a23-tcon", .data = &sun8i_a33_quirks },
+ { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks },
+ { .compatible = "allwinner,sun8i-a83t-tcon-lcd", .data = &sun8i_a83t_lcd_quirks },
+--
+2.25.1
+
--- /dev/null
+From 89d201e59b1ae9ae29787771817cd070ffed2e8a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 13 Jan 2020 18:22:40 +0100
+Subject: efi/arm: Defer probe of PCIe backed efifb on DT systems
+
+From: Ard Biesheuvel <ardb@kernel.org>
+
+[ Upstream commit 64c8a0cd0a535891d5905c3a1651150f0f141439 ]
+
+The new of_devlink support breaks PCIe probing on ARM platforms booting
+via UEFI if the firmware exposes a EFI framebuffer that is backed by a
+PCI device. The reason is that the probing order gets reversed,
+resulting in a resource conflict on the framebuffer memory window when
+the PCIe probes last, causing it to give up entirely.
+
+Given that we rely on PCI quirks to deal with EFI framebuffers that get
+moved around in memory, we cannot simply drop the memory reservation, so
+instead, let's use the device link infrastructure to register this
+dependency, and force the probing to occur in the expected order.
+
+Co-developed-by: Saravana Kannan <saravanak@google.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Saravana Kannan <saravanak@google.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Link: https://lore.kernel.org/r/20200113172245.27925-9-ardb@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/firmware/efi/arm-init.c | 107 ++++++++++++++++++++++++++++++--
+ 1 file changed, 103 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
+index 311cd349a8628..f136b77e13d98 100644
+--- a/drivers/firmware/efi/arm-init.c
++++ b/drivers/firmware/efi/arm-init.c
+@@ -10,10 +10,12 @@
+ #define pr_fmt(fmt) "efi: " fmt
+
+ #include <linux/efi.h>
++#include <linux/fwnode.h>
+ #include <linux/init.h>
+ #include <linux/memblock.h>
+ #include <linux/mm_types.h>
+ #include <linux/of.h>
++#include <linux/of_address.h>
+ #include <linux/of_fdt.h>
+ #include <linux/platform_device.h>
+ #include <linux/screen_info.h>
+@@ -267,15 +269,112 @@ void __init efi_init(void)
+ efi_memmap_unmap();
+ }
+
++static bool efifb_overlaps_pci_range(const struct of_pci_range *range)
++{
++ u64 fb_base = screen_info.lfb_base;
++
++ if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
++ fb_base |= (u64)(unsigned long)screen_info.ext_lfb_base << 32;
++
++ return fb_base >= range->cpu_addr &&
++ fb_base < (range->cpu_addr + range->size);
++}
++
++static struct device_node *find_pci_overlap_node(void)
++{
++ struct device_node *np;
++
++ for_each_node_by_type(np, "pci") {
++ struct of_pci_range_parser parser;
++ struct of_pci_range range;
++ int err;
++
++ err = of_pci_range_parser_init(&parser, np);
++ if (err) {
++ pr_warn("of_pci_range_parser_init() failed: %d\n", err);
++ continue;
++ }
++
++ for_each_of_pci_range(&parser, &range)
++ if (efifb_overlaps_pci_range(&range))
++ return np;
++ }
++ return NULL;
++}
++
++/*
++ * If the efifb framebuffer is backed by a PCI graphics controller, we have
++ * to ensure that this relation is expressed using a device link when
++ * running in DT mode, or the probe order may be reversed, resulting in a
++ * resource reservation conflict on the memory window that the efifb
++ * framebuffer steals from the PCIe host bridge.
++ */
++static int efifb_add_links(const struct fwnode_handle *fwnode,
++ struct device *dev)
++{
++ struct device_node *sup_np;
++ struct device *sup_dev;
++
++ sup_np = find_pci_overlap_node();
++
++ /*
++ * If there's no PCI graphics controller backing the efifb, we are
++ * done here.
++ */
++ if (!sup_np)
++ return 0;
++
++ sup_dev = get_dev_from_fwnode(&sup_np->fwnode);
++ of_node_put(sup_np);
++
++ /*
++ * Return -ENODEV if the PCI graphics controller device hasn't been
++ * registered yet. This ensures that efifb isn't allowed to probe
++ * and this function is retried again when new devices are
++ * registered.
++ */
++ if (!sup_dev)
++ return -ENODEV;
++
++ /*
++ * If this fails, retrying this function at a later point won't
++ * change anything. So, don't return an error after this.
++ */
++ if (!device_link_add(dev, sup_dev, 0))
++ dev_warn(dev, "device_link_add() failed\n");
++
++ put_device(sup_dev);
++
++ return 0;
++}
++
++static const struct fwnode_operations efifb_fwnode_ops = {
++ .add_links = efifb_add_links,
++};
++
++static struct fwnode_handle efifb_fwnode = {
++ .ops = &efifb_fwnode_ops,
++};
++
+ static int __init register_gop_device(void)
+ {
+- void *pd;
++ struct platform_device *pd;
++ int err;
+
+ if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
+ return 0;
+
+- pd = platform_device_register_data(NULL, "efi-framebuffer", 0,
+- &screen_info, sizeof(screen_info));
+- return PTR_ERR_OR_ZERO(pd);
++ pd = platform_device_alloc("efi-framebuffer", 0);
++ if (!pd)
++ return -ENOMEM;
++
++ if (IS_ENABLED(CONFIG_PCI))
++ pd->dev.fwnode = &efifb_fwnode;
++
++ err = platform_device_add_data(pd, &screen_info, sizeof(screen_info));
++ if (err)
++ return err;
++
++ return platform_device_add(pd);
+ }
+ subsys_initcall(register_gop_device);
+--
+2.25.1
+
--- /dev/null
+From f69bee8d70fa7a561d5f8096af71260c7d03da7c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 31 Jan 2020 13:46:25 +0100
+Subject: HID: quirks: Remove ITE 8595 entry from hid_have_special_driver
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 3045696d0ce663d67c95dcb8206d3de57f6841ec ]
+
+The ITE 8595 chip used in various 2-in-1 keyboard docks works fine with
+the hid-generic driver (minus the RF_KILL key) and also keeps working fine
+when swapping drivers, so there is no need to have it in the
+hid_have_special_driver list.
+
+Note the other 2 USB ids in hid-ite.c were never added to
+hid_have_special_driver.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-quirks.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
+index 168fdaa1999fe..70c72b33d35e2 100644
+--- a/drivers/hid/hid-quirks.c
++++ b/drivers/hid/hid-quirks.c
+@@ -400,9 +400,6 @@ static const struct hid_device_id hid_have_special_driver[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) },
+ #endif
+-#if IS_ENABLED(CONFIG_HID_ITE)
+- { HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) },
+-#endif
+ #if IS_ENABLED(CONFIG_HID_ICADE)
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
+ #endif
+--
+2.25.1
+
--- /dev/null
+From af2916cc4fbf41d0326150fb684e002c7eaeac41 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 5 Mar 2020 19:53:06 -0800
+Subject: Input: goodix - fix touch coordinates on Cube I15-TC
+
+From: Sergei A. Trusov <sergei.a.trusov@ya.ru>
+
+[ Upstream commit 1dd5ddc125b4625c3beb8e644ae872445d739bbc ]
+
+The touchscreen on the Cube I15-TC don't match the default display,
+with 0,0 touches being reported when touching at the top-right of
+the screen.
+
+Add a quirk to invert the x coordinate.
+
+Reported-and-tested-by: Arkadiy <arkan49@yandex.ru>
+Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
+Reviewed-by: Bastien Nocera <hadess@hadess.net>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/touchscreen/goodix.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
+index 0403102e807e1..37b35ab97beb2 100644
+--- a/drivers/input/touchscreen/goodix.c
++++ b/drivers/input/touchscreen/goodix.c
+@@ -168,6 +168,22 @@ static const struct dmi_system_id nine_bytes_report[] = {
+ {}
+ };
+
++/*
++ * Those tablets have their x coordinate inverted
++ */
++static const struct dmi_system_id inverted_x_screen[] = {
++#if defined(CONFIG_DMI) && defined(CONFIG_X86)
++ {
++ .ident = "Cube I15-TC",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Cube"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "I15-TC")
++ },
++ },
++#endif
++ {}
++};
++
+ /**
+ * goodix_i2c_read - read data from a register of the i2c slave device.
+ *
+@@ -780,6 +796,12 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
+ "Non-standard 9-bytes report format quirk\n");
+ }
+
++ if (dmi_check_system(inverted_x_screen)) {
++ ts->prop.invert_x = true;
++ dev_dbg(&ts->client->dev,
++ "Applying 'inverted x screen' quirk\n");
++ }
++
+ error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
+ INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
+ if (error) {
+--
+2.25.1
+
--- /dev/null
+From f0aac73c5db9604e255c780d718f5cbd14714201 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 25 Apr 2020 13:06:31 -0700
+Subject: Input: mms114 - add extra compatible for mms345l
+
+From: Stephan Gerhold <stephan@gerhold.net>
+
+[ Upstream commit 7842087b0196d674ed877d768de8f2a34d7fdc53 ]
+
+MMS345L is another first generation touch screen from Melfas,
+which uses mostly the same registers as MMS152.
+
+However, there is some garbage printed during initialization.
+Apparently MMS345L does not have the MMS152_COMPAT_GROUP register
+that is read+printed during initialization.
+
+ TSP FW Rev: bootloader 0x6 / core 0x26 / config 0x26, Compat group: \x06
+
+On earlier kernel versions the compat group was actually printed as
+an ASCII control character, seems like it gets escaped now.
+
+But we probably shouldn't print something from a random register.
+
+Add a separate "melfas,mms345l" compatible that avoids reading
+from the MMS152_COMPAT_GROUP register. This might also help in case
+there is some other device-specific quirk in the future.
+
+Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
+Reviewed-by: Andi Shyti <andi@etezian.org>
+Link: https://lore.kernel.org/r/20200423102431.2715-1-stephan@gerhold.net
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/touchscreen/mms114.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c
+index fca908ba4841f..fb28fd2d6f1c5 100644
+--- a/drivers/input/touchscreen/mms114.c
++++ b/drivers/input/touchscreen/mms114.c
+@@ -54,6 +54,7 @@
+ enum mms_type {
+ TYPE_MMS114 = 114,
+ TYPE_MMS152 = 152,
++ TYPE_MMS345L = 345,
+ };
+
+ struct mms114_data {
+@@ -250,6 +251,15 @@ static int mms114_get_version(struct mms114_data *data)
+ int error;
+
+ switch (data->type) {
++ case TYPE_MMS345L:
++ error = __mms114_read_reg(data, MMS152_FW_REV, 3, buf);
++ if (error)
++ return error;
++
++ dev_info(dev, "TSP FW Rev: bootloader 0x%x / core 0x%x / config 0x%x\n",
++ buf[0], buf[1], buf[2]);
++ break;
++
+ case TYPE_MMS152:
+ error = __mms114_read_reg(data, MMS152_FW_REV, 3, buf);
+ if (error)
+@@ -287,8 +297,8 @@ static int mms114_setup_regs(struct mms114_data *data)
+ if (error < 0)
+ return error;
+
+- /* MMS152 has no configuration or power on registers */
+- if (data->type == TYPE_MMS152)
++ /* Only MMS114 has configuration and power on registers */
++ if (data->type != TYPE_MMS114)
+ return 0;
+
+ error = mms114_set_active(data, true);
+@@ -598,6 +608,9 @@ static const struct of_device_id mms114_dt_match[] = {
+ }, {
+ .compatible = "melfas,mms152",
+ .data = (void *)TYPE_MMS152,
++ }, {
++ .compatible = "melfas,mms345l",
++ .data = (void *)TYPE_MMS345L,
+ },
+ { }
+ };
+--
+2.25.1
+
--- /dev/null
+From 25886788d6550b5b06d3c46a0caebaffeced93cc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 17 Dec 2019 15:39:52 +0100
+Subject: mmc: mmci: Support any block sizes for ux500v2 and qcom variant
+
+From: Linus Walleij <linus.walleij@linaro.org>
+
+[ Upstream commit 2253ed4b36dc876d1598c4dab5587e537ec68c34 ]
+
+For the ux500v2 variant of the PL18x block, any block sizes
+are supported. This is necessary to support some SDIO
+transfers. This also affects the QCOM MMCI variant and the
+ST micro variant.
+
+For Ux500 an additional quirk only allowing DMA on blocks
+that are a power of two is needed. This might be a bug in
+the DMA engine (DMA40) or the MMCI or in the interconnect,
+but the most likely is the MMCI, as transfers of these
+sizes work fine for other devices using the same DMA
+engine. DMA works fine also with SDIO as long as the
+blocksize is a power of 2.
+
+This patch has proven necessary for enabling SDIO for WLAN on
+PostmarketOS-based Ux500 platforms.
+
+What we managed to test in practice is Broadcom WiFi over
+SDIO on the Ux500 based Samsung GT-I8190 and GT-S7710.
+This WiFi chip, BCM4334 works fine after the patch.
+
+Before this patch:
+
+brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4334-sdio
+ for chip BCM4334/3
+mmci-pl18x 80118000.sdi1_per2: unsupported block size (60 bytes)
+brcmfmac: brcmf_sdiod_ramrw: membytes transfer failed
+brcmfmac: brcmf_sdio_download_code_file: error -22 on writing
+ 434236 membytes at 0x00000000
+brcmfmac: brcmf_sdio_download_firmware: dongle image file download
+ failed
+
+After this patch:
+
+brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4334/3 wl0:
+ Nov 21 2012 00:21:28 version 6.10.58.813 (B2) FWID 01-0
+
+Bringing up networks, discovering networks with "iw dev wlan0 scan"
+and connecting works fine from this point.
+
+This patch is inspired by Ulf Hansson's patch
+http://www.spinics.net/lists/linux-mmc/msg12160.html
+
+As the DMA engines on these platforms may now get block sizes
+they were not used to before, make sure to also respect if
+the DMA engine says "no" to a transfer.
+
+Make a drive-by fix for datactrl_blocksz, misspelled.
+
+Cc: Ludovic Barre <ludovic.barre@st.com>
+Cc: Brian Masney <masneyb@onstation.org>
+Cc: Stephan Gerhold <stephan@gerhold.net>
+Cc: Niklas Cassel <niklas.cassel@linaro.org>
+Cc: Russell King <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Tested-by: Stephan Gerhold <stephan@gerhold.net>
+Link: https://lore.kernel.org/r/20191217143952.2885-1-linus.walleij@linaro.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mmc/host/mmci.c | 34 ++++++++++++++++++++++++++++++----
+ drivers/mmc/host/mmci.h | 8 +++++++-
+ 2 files changed, 37 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
+index c37e70dbe250e..7e4bc9124efde 100644
+--- a/drivers/mmc/host/mmci.c
++++ b/drivers/mmc/host/mmci.c
+@@ -168,6 +168,8 @@ static struct variant_data variant_ux500 = {
+ .cmdreg_srsp = MCI_CPSM_RESPONSE,
+ .datalength_bits = 24,
+ .datactrl_blocksz = 11,
++ .datactrl_any_blocksz = true,
++ .dma_power_of_2 = true,
+ .datactrl_mask_sdio = MCI_DPSM_ST_SDIOEN,
+ .st_sdio = true,
+ .st_clkdiv = true,
+@@ -201,6 +203,8 @@ static struct variant_data variant_ux500v2 = {
+ .datactrl_mask_ddrmode = MCI_DPSM_ST_DDRMODE,
+ .datalength_bits = 24,
+ .datactrl_blocksz = 11,
++ .datactrl_any_blocksz = true,
++ .dma_power_of_2 = true,
+ .datactrl_mask_sdio = MCI_DPSM_ST_SDIOEN,
+ .st_sdio = true,
+ .st_clkdiv = true,
+@@ -260,6 +264,7 @@ static struct variant_data variant_stm32_sdmmc = {
+ .datacnt_useless = true,
+ .datalength_bits = 25,
+ .datactrl_blocksz = 14,
++ .datactrl_any_blocksz = true,
+ .stm32_idmabsize_mask = GENMASK(12, 5),
+ .init = sdmmc_variant_init,
+ };
+@@ -279,6 +284,7 @@ static struct variant_data variant_qcom = {
+ .data_cmd_enable = MCI_CPSM_QCOM_DATCMD,
+ .datalength_bits = 24,
+ .datactrl_blocksz = 11,
++ .datactrl_any_blocksz = true,
+ .pwrreg_powerup = MCI_PWR_UP,
+ .f_max = 208000000,
+ .explicit_mclk_control = true,
+@@ -447,10 +453,11 @@ void mmci_dma_setup(struct mmci_host *host)
+ static int mmci_validate_data(struct mmci_host *host,
+ struct mmc_data *data)
+ {
++ struct variant_data *variant = host->variant;
++
+ if (!data)
+ return 0;
+-
+- if (!is_power_of_2(data->blksz)) {
++ if (!is_power_of_2(data->blksz) && !variant->datactrl_any_blocksz) {
+ dev_err(mmc_dev(host->mmc),
+ "unsupported block size (%d bytes)\n", data->blksz);
+ return -EINVAL;
+@@ -515,7 +522,9 @@ int mmci_dma_start(struct mmci_host *host, unsigned int datactrl)
+ "Submit MMCI DMA job, sglen %d blksz %04x blks %04x flags %08x\n",
+ data->sg_len, data->blksz, data->blocks, data->flags);
+
+- host->ops->dma_start(host, &datactrl);
++ ret = host->ops->dma_start(host, &datactrl);
++ if (ret)
++ return ret;
+
+ /* Trigger the DMA transfer */
+ mmci_write_datactrlreg(host, datactrl);
+@@ -822,6 +831,18 @@ static int _mmci_dmae_prep_data(struct mmci_host *host, struct mmc_data *data,
+ if (data->blksz * data->blocks <= variant->fifosize)
+ return -EINVAL;
+
++ /*
++ * This is necessary to get SDIO working on the Ux500. We do not yet
++ * know if this is a bug in:
++ * - The Ux500 DMA controller (DMA40)
++ * - The MMCI DMA interface on the Ux500
++ * some power of two blocks (such as 64 bytes) are sent regularly
++ * during SDIO traffic and those work fine so for these we enable DMA
++ * transfers.
++ */
++ if (host->variant->dma_power_of_2 && !is_power_of_2(data->blksz))
++ return -EINVAL;
++
+ device = chan->device;
+ nr_sg = dma_map_sg(device->dev, data->sg, data->sg_len,
+ mmc_get_dma_dir(data));
+@@ -872,9 +893,14 @@ int mmci_dmae_prep_data(struct mmci_host *host,
+ int mmci_dmae_start(struct mmci_host *host, unsigned int *datactrl)
+ {
+ struct mmci_dmae_priv *dmae = host->dma_priv;
++ int ret;
+
+ host->dma_in_progress = true;
+- dmaengine_submit(dmae->desc_current);
++ ret = dma_submit_error(dmaengine_submit(dmae->desc_current));
++ if (ret < 0) {
++ host->dma_in_progress = false;
++ return ret;
++ }
+ dma_async_issue_pending(dmae->cur);
+
+ *datactrl |= MCI_DPSM_DMAENABLE;
+diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
+index 833236ecb31e6..89ab73343cf30 100644
+--- a/drivers/mmc/host/mmci.h
++++ b/drivers/mmc/host/mmci.h
+@@ -278,7 +278,11 @@ struct mmci_host;
+ * @stm32_clkdiv: true if using a STM32-specific clock divider algorithm
+ * @datactrl_mask_ddrmode: ddr mode mask in datactrl register.
+ * @datactrl_mask_sdio: SDIO enable mask in datactrl register
+- * @datactrl_blksz: block size in power of two
++ * @datactrl_blocksz: block size in power of two
++ * @datactrl_any_blocksz: true if block any block sizes are accepted by
++ * hardware, such as with some SDIO traffic that send
++ * odd packets.
++ * @dma_power_of_2: DMA only works with blocks that are a power of 2.
+ * @datactrl_first: true if data must be setup before send command
+ * @datacnt_useless: true if you could not use datacnt register to read
+ * remaining data
+@@ -323,6 +327,8 @@ struct variant_data {
+ unsigned int datactrl_mask_ddrmode;
+ unsigned int datactrl_mask_sdio;
+ unsigned int datactrl_blocksz;
++ u8 datactrl_any_blocksz:1;
++ u8 dma_power_of_2:1;
+ u8 datactrl_first:1;
+ u8 datacnt_useless:1;
+ u8 st_sdio:1;
+--
+2.25.1
+
--- /dev/null
+From cd920ffc0c5282c3c350eabde1dd07b50c86186e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 19 Feb 2020 16:22:40 +0800
+Subject: mmc: sdhci: do not enable card detect interrupt for gpio cd type
+
+From: Haibo Chen <haibo.chen@nxp.com>
+
+[ Upstream commit e65bb38824711559844ba932132f417bc5a355e2 ]
+
+Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE,
+we also do not need to handle controller native card detect interrupt
+for gpio cd type.
+If we wrong enabled the card detect interrupt for gpio case, it will
+cause a lot of unexpected card detect interrupts during data transfer
+which should not happen.
+
+Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
+Acked-by: Adrian Hunter <adrian.hunter@intel.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Link: https://lore.kernel.org/r/1582100563-20555-2-git-send-email-haibo.chen@nxp.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mmc/host/sdhci.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
+index 50514fedbc76f..136f9737713d8 100644
+--- a/drivers/mmc/host/sdhci.c
++++ b/drivers/mmc/host/sdhci.c
+@@ -152,7 +152,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
+ u32 present;
+
+ if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
+- !mmc_card_is_removable(host->mmc))
++ !mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc))
+ return;
+
+ if (enable) {
+--
+2.25.1
+
--- /dev/null
+From ddc4299ddc08cc4dea58a2003c9f02be88767fb5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 20 Nov 2019 11:42:47 +0000
+Subject: net: sfp: add some quirks for GPON modules
+
+From: Russell King <rmk+kernel@armlinux.org.uk>
+
+[ Upstream commit b0eae33b2583dceb36224619f9fd85e6140ae594 ]
+
+Marc Micalizzi reports that Huawei MA5671A and Alcatel/Lucent G-010S-P
+modules are capable of 2500base-X, but incorrectly report their
+capabilities in the EEPROM. It seems rather common that GPON modules
+mis-report.
+
+Let's fix these modules by adding some quirks.
+
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/phy/sfp-bus.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
+index 35caf2eb2c275..816e59fe68f57 100644
+--- a/drivers/net/phy/sfp-bus.c
++++ b/drivers/net/phy/sfp-bus.c
+@@ -37,7 +37,32 @@ struct sfp_bus {
+ bool started;
+ };
+
++static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
++ unsigned long *modes)
++{
++ phylink_set(modes, 2500baseX_Full);
++}
++
+ static const struct sfp_quirk sfp_quirks[] = {
++ {
++ // Alcatel Lucent G-010S-P can operate at 2500base-X, but
++ // incorrectly report 2500MBd NRZ in their EEPROM
++ .vendor = "ALCATELLUCENT",
++ .part = "G010SP",
++ .modes = sfp_quirk_2500basex,
++ }, {
++ // Alcatel Lucent G-010S-A can operate at 2500base-X, but
++ // report 3.2GBd NRZ in their EEPROM
++ .vendor = "ALCATELLUCENT",
++ .part = "3FE46541AA",
++ .modes = sfp_quirk_2500basex,
++ }, {
++ // Huawei MA5671A can operate at 2500base-X, but report 1.2GBd
++ // NRZ in their EEPROM
++ .vendor = "HUAWEI",
++ .part = "MA5671A",
++ .modes = sfp_quirk_2500basex,
++ },
+ };
+
+ static size_t sfp_strlen(const char *str, size_t maxlen)
+--
+2.25.1
+
--- /dev/null
+From 8e62238ee2fcde7538993852f44411dbd47d655d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 20 Nov 2019 11:42:42 +0000
+Subject: net: sfp: add support for module quirks
+
+From: Russell King <rmk+kernel@armlinux.org.uk>
+
+[ Upstream commit b34bb2cb5b62c7397c28fcc335e8047a687eada4 ]
+
+Add support for applying module quirks to the list of supported
+ethtool link modes.
+
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/phy/sfp-bus.c | 54 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 54 insertions(+)
+
+diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
+index b23fc41896ef5..35caf2eb2c275 100644
+--- a/drivers/net/phy/sfp-bus.c
++++ b/drivers/net/phy/sfp-bus.c
+@@ -9,6 +9,12 @@
+
+ #include "sfp.h"
+
++struct sfp_quirk {
++ const char *vendor;
++ const char *part;
++ void (*modes)(const struct sfp_eeprom_id *id, unsigned long *modes);
++};
++
+ /**
+ * struct sfp_bus - internal representation of a sfp bus
+ */
+@@ -21,6 +27,7 @@ struct sfp_bus {
+ const struct sfp_socket_ops *socket_ops;
+ struct device *sfp_dev;
+ struct sfp *sfp;
++ const struct sfp_quirk *sfp_quirk;
+
+ const struct sfp_upstream_ops *upstream_ops;
+ void *upstream;
+@@ -30,6 +37,46 @@ struct sfp_bus {
+ bool started;
+ };
+
++static const struct sfp_quirk sfp_quirks[] = {
++};
++
++static size_t sfp_strlen(const char *str, size_t maxlen)
++{
++ size_t size, i;
++
++ /* Trailing characters should be filled with space chars */
++ for (i = 0, size = 0; i < maxlen; i++)
++ if (str[i] != ' ')
++ size = i + 1;
++
++ return size;
++}
++
++static bool sfp_match(const char *qs, const char *str, size_t len)
++{
++ if (!qs)
++ return true;
++ if (strlen(qs) != len)
++ return false;
++ return !strncmp(qs, str, len);
++}
++
++static const struct sfp_quirk *sfp_lookup_quirk(const struct sfp_eeprom_id *id)
++{
++ const struct sfp_quirk *q;
++ unsigned int i;
++ size_t vs, ps;
++
++ vs = sfp_strlen(id->base.vendor_name, ARRAY_SIZE(id->base.vendor_name));
++ ps = sfp_strlen(id->base.vendor_pn, ARRAY_SIZE(id->base.vendor_pn));
++
++ for (i = 0, q = sfp_quirks; i < ARRAY_SIZE(sfp_quirks); i++, q++)
++ if (sfp_match(q->vendor, id->base.vendor_name, vs) &&
++ sfp_match(q->part, id->base.vendor_pn, ps))
++ return q;
++
++ return NULL;
++}
+ /**
+ * sfp_parse_port() - Parse the EEPROM base ID, setting the port type
+ * @bus: a pointer to the &struct sfp_bus structure for the sfp module
+@@ -233,6 +280,9 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
+ phylink_set(modes, 1000baseX_Full);
+ }
+
++ if (bus->sfp_quirk)
++ bus->sfp_quirk->modes(id, modes);
++
+ bitmap_or(support, support, modes, __ETHTOOL_LINK_MODE_MASK_NBITS);
+
+ phylink_set(support, Autoneg);
+@@ -553,6 +603,8 @@ int sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id)
+ const struct sfp_upstream_ops *ops = sfp_get_upstream_ops(bus);
+ int ret = 0;
+
++ bus->sfp_quirk = sfp_lookup_quirk(id);
++
+ if (ops && ops->module_insert)
+ ret = ops->module_insert(bus->upstream, id);
+
+@@ -566,6 +618,8 @@ void sfp_module_remove(struct sfp_bus *bus)
+
+ if (ops && ops->module_remove)
+ ops->module_remove(bus->upstream);
++
++ bus->sfp_quirk = NULL;
+ }
+ EXPORT_SYMBOL_GPL(sfp_module_remove);
+
+--
+2.25.1
+
--- /dev/null
+From e8c9855f17d202b542cabefc08393974714783fc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 23 Feb 2020 19:11:44 +0000
+Subject: scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Diego Elio Pettenò <flameeyes@flameeyes.com>
+
+[ Upstream commit 679b2ec8e060ca7a90441aff5e7d384720a41b76 ]
+
+This kernel configuration is basically enabling/disabling sr driver quirks
+detection. While these quirks are for fairly rare devices (very old CD
+burners, and a glucometer), the additional detection of these models is a
+very minimal amount of code.
+
+The logic behind the quirks is always built into the sr driver.
+
+This also removes the config from all the defconfig files that are enabling
+this already.
+
+Link: https://lore.kernel.org/r/20200223191144.726-1-flameeyes@flameeyes.com
+Reviewed-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/alpha/configs/defconfig | 1 -
+ arch/arm/configs/rpc_defconfig | 1 -
+ arch/arm/configs/s3c2410_defconfig | 1 -
+ arch/ia64/configs/zx1_defconfig | 1 -
+ arch/m68k/configs/amiga_defconfig | 1 -
+ arch/m68k/configs/apollo_defconfig | 1 -
+ arch/m68k/configs/atari_defconfig | 1 -
+ arch/m68k/configs/bvme6000_defconfig | 1 -
+ arch/m68k/configs/hp300_defconfig | 1 -
+ arch/m68k/configs/mac_defconfig | 1 -
+ arch/m68k/configs/multi_defconfig | 1 -
+ arch/m68k/configs/mvme147_defconfig | 1 -
+ arch/m68k/configs/mvme16x_defconfig | 1 -
+ arch/m68k/configs/q40_defconfig | 1 -
+ arch/m68k/configs/sun3_defconfig | 1 -
+ arch/m68k/configs/sun3x_defconfig | 1 -
+ arch/mips/configs/bigsur_defconfig | 1 -
+ arch/mips/configs/fuloong2e_defconfig | 1 -
+ arch/mips/configs/ip27_defconfig | 1 -
+ arch/mips/configs/ip32_defconfig | 1 -
+ arch/mips/configs/jazz_defconfig | 1 -
+ arch/mips/configs/malta_defconfig | 1 -
+ arch/mips/configs/malta_kvm_defconfig | 1 -
+ arch/mips/configs/malta_kvm_guest_defconfig | 1 -
+ arch/mips/configs/maltaup_xpa_defconfig | 1 -
+ arch/mips/configs/rm200_defconfig | 1 -
+ arch/powerpc/configs/85xx-hw.config | 1 -
+ arch/powerpc/configs/amigaone_defconfig | 1 -
+ arch/powerpc/configs/chrp32_defconfig | 1 -
+ arch/powerpc/configs/g5_defconfig | 1 -
+ arch/powerpc/configs/maple_defconfig | 1 -
+ arch/powerpc/configs/pasemi_defconfig | 1 -
+ arch/powerpc/configs/pmac32_defconfig | 1 -
+ arch/powerpc/configs/powernv_defconfig | 1 -
+ arch/powerpc/configs/ppc64_defconfig | 1 -
+ arch/powerpc/configs/ppc64e_defconfig | 1 -
+ arch/powerpc/configs/ppc6xx_defconfig | 1 -
+ arch/powerpc/configs/pseries_defconfig | 1 -
+ arch/powerpc/configs/skiroot_defconfig | 1 -
+ arch/sh/configs/sh03_defconfig | 1 -
+ arch/sparc/configs/sparc64_defconfig | 1 -
+ arch/x86/configs/i386_defconfig | 1 -
+ arch/x86/configs/x86_64_defconfig | 1 -
+ drivers/scsi/Kconfig | 9 ---------
+ drivers/scsi/sr_vendor.c | 8 --------
+ 45 files changed, 60 deletions(-)
+
+diff --git a/arch/alpha/configs/defconfig b/arch/alpha/configs/defconfig
+index f4ec420d7f2df..3a132c91d45bc 100644
+--- a/arch/alpha/configs/defconfig
++++ b/arch/alpha/configs/defconfig
+@@ -36,7 +36,6 @@ CONFIG_BLK_DEV_CY82C693=y
+ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_SCSI_AIC7XXX=m
+ CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
+ # CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig
+index 3b82b64950d96..c090643b1ecbc 100644
+--- a/arch/arm/configs/rpc_defconfig
++++ b/arch/arm/configs/rpc_defconfig
+@@ -32,7 +32,6 @@ CONFIG_BLK_DEV_RAM=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
+index 73ed73a8785a0..153009130dab3 100644
+--- a/arch/arm/configs/s3c2410_defconfig
++++ b/arch/arm/configs/s3c2410_defconfig
+@@ -202,7 +202,6 @@ CONFIG_EEPROM_AT24=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_CHR_DEV_SCH=m
+ CONFIG_SCSI_CONSTANTS=y
+diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
+index 8c92e095f8bb9..d42f79a33e912 100644
+--- a/arch/ia64/configs/zx1_defconfig
++++ b/arch/ia64/configs/zx1_defconfig
+@@ -35,7 +35,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_CHR_DEV_OSST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
+index 9a33c1c006a1f..cf8103fa2f347 100644
+--- a/arch/m68k/configs/amiga_defconfig
++++ b/arch/m68k/configs/amiga_defconfig
+@@ -334,7 +334,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig
+index 7fdbc797a05d4..5636288a4b457 100644
+--- a/arch/m68k/configs/apollo_defconfig
++++ b/arch/m68k/configs/apollo_defconfig
+@@ -319,7 +319,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig
+index f1763405a5396..015a7f401ffd5 100644
+--- a/arch/m68k/configs/atari_defconfig
++++ b/arch/m68k/configs/atari_defconfig
+@@ -334,7 +334,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig
+index 91154d6acb313..1209430e61e13 100644
+--- a/arch/m68k/configs/bvme6000_defconfig
++++ b/arch/m68k/configs/bvme6000_defconfig
+@@ -316,7 +316,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig
+index c398c4a94d95c..a41b16067f5c3 100644
+--- a/arch/m68k/configs/hp300_defconfig
++++ b/arch/m68k/configs/hp300_defconfig
+@@ -318,7 +318,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig
+index 350d004559be8..8af104a8c000a 100644
+--- a/arch/m68k/configs/mac_defconfig
++++ b/arch/m68k/configs/mac_defconfig
+@@ -325,7 +325,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig
+index b838dd820348e..354ff30e22c9c 100644
+--- a/arch/m68k/configs/multi_defconfig
++++ b/arch/m68k/configs/multi_defconfig
+@@ -358,7 +358,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig
+index 3f8dd61559cf0..eac7685cea427 100644
+--- a/arch/m68k/configs/mvme147_defconfig
++++ b/arch/m68k/configs/mvme147_defconfig
+@@ -315,7 +315,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig
+index ae3b2d4f636c7..0f38c4a3c87ae 100644
+--- a/arch/m68k/configs/mvme16x_defconfig
++++ b/arch/m68k/configs/mvme16x_defconfig
+@@ -316,7 +316,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig
+index cd61ef14b5828..6ede6869db1cd 100644
+--- a/arch/m68k/configs/q40_defconfig
++++ b/arch/m68k/configs/q40_defconfig
+@@ -324,7 +324,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig
+index 151f5371cd3d4..8644c47899382 100644
+--- a/arch/m68k/configs/sun3_defconfig
++++ b/arch/m68k/configs/sun3_defconfig
+@@ -313,7 +313,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig
+index 1dcb0ee1fe989..f2fd0da2346e5 100644
+--- a/arch/m68k/configs/sun3x_defconfig
++++ b/arch/m68k/configs/sun3x_defconfig
+@@ -313,7 +313,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SAS_ATTRS=m
+diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
+index f14ad0538f4e3..eea9b613bb740 100644
+--- a/arch/mips/configs/bigsur_defconfig
++++ b/arch/mips/configs/bigsur_defconfig
+@@ -112,7 +112,6 @@ CONFIG_BLK_DEV_TC86C001=m
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_CHR_DEV_SCH=m
+ CONFIG_ATA=y
+diff --git a/arch/mips/configs/fuloong2e_defconfig b/arch/mips/configs/fuloong2e_defconfig
+index 7a7af706e8981..c5f66b7f2b227 100644
+--- a/arch/mips/configs/fuloong2e_defconfig
++++ b/arch/mips/configs/fuloong2e_defconfig
+@@ -99,7 +99,6 @@ CONFIG_CDROM_PKTCDVD=m
+ CONFIG_ATA_OVER_ETH=m
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ # CONFIG_SCSI_LOWLEVEL is not set
+diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
+index 82d942a6026e5..638d7cf5ef01d 100644
+--- a/arch/mips/configs/ip27_defconfig
++++ b/arch/mips/configs/ip27_defconfig
+@@ -99,7 +99,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_CHR_DEV_SCH=m
+ CONFIG_SCSI_CONSTANTS=y
+diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
+index 370884018aad1..7b1fab5183170 100644
+--- a/arch/mips/configs/ip32_defconfig
++++ b/arch/mips/configs/ip32_defconfig
+@@ -50,7 +50,6 @@ CONFIG_RAID_ATTRS=y
+ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
+index 328d4dfeb4cbe..982b990469afd 100644
+--- a/arch/mips/configs/jazz_defconfig
++++ b/arch/mips/configs/jazz_defconfig
+@@ -191,7 +191,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SCAN_ASYNC=y
+ CONFIG_SCSI_FC_ATTRS=y
+diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
+index 59eedf55419da..211bd3d6e6cb3 100644
+--- a/arch/mips/configs/malta_defconfig
++++ b/arch/mips/configs/malta_defconfig
+@@ -239,7 +239,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_CHR_DEV_OSST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malta_kvm_defconfig
+index 8ef612552a196..62b1969b4f55b 100644
+--- a/arch/mips/configs/malta_kvm_defconfig
++++ b/arch/mips/configs/malta_kvm_defconfig
+@@ -247,7 +247,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_CHR_DEV_OSST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/mips/configs/malta_kvm_guest_defconfig b/arch/mips/configs/malta_kvm_guest_defconfig
+index d2a008c9907c6..9185e0a0aa455 100644
+--- a/arch/mips/configs/malta_kvm_guest_defconfig
++++ b/arch/mips/configs/malta_kvm_guest_defconfig
+@@ -245,7 +245,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_CHR_DEV_OSST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/mips/configs/maltaup_xpa_defconfig b/arch/mips/configs/maltaup_xpa_defconfig
+index 970df6d427283..636311d67a533 100644
+--- a/arch/mips/configs/maltaup_xpa_defconfig
++++ b/arch/mips/configs/maltaup_xpa_defconfig
+@@ -245,7 +245,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_CHR_DEV_OSST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_LOGGING=y
+diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
+index 2c7adea7638f5..30d7c3db884e4 100644
+--- a/arch/mips/configs/rm200_defconfig
++++ b/arch/mips/configs/rm200_defconfig
+@@ -203,7 +203,6 @@ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SCAN_ASYNC=y
+ CONFIG_SCSI_FC_ATTRS=y
+diff --git a/arch/powerpc/configs/85xx-hw.config b/arch/powerpc/configs/85xx-hw.config
+index 9575a38c9155b..b507df6ac69fa 100644
+--- a/arch/powerpc/configs/85xx-hw.config
++++ b/arch/powerpc/configs/85xx-hw.config
+@@ -2,7 +2,6 @@ CONFIG_AQUANTIA_PHY=y
+ CONFIG_AT803X_PHY=y
+ CONFIG_ATA=y
+ CONFIG_BLK_DEV_SD=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_BLK_DEV_SR=y
+ CONFIG_BROADCOM_PHY=y
+ CONFIG_C293_PCIE=y
+diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs/amigaone_defconfig
+index cf94d28d0e310..340140160c7b5 100644
+--- a/arch/powerpc/configs/amigaone_defconfig
++++ b/arch/powerpc/configs/amigaone_defconfig
+@@ -47,7 +47,6 @@ CONFIG_BLK_DEV_RAM=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SYM53C8XX_2=y
+diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
+index 9ff493dd8439b..6c5a4414e9ee4 100644
+--- a/arch/powerpc/configs/chrp32_defconfig
++++ b/arch/powerpc/configs/chrp32_defconfig
+@@ -45,7 +45,6 @@ CONFIG_BLK_DEV_RAM=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SYM53C8XX_2=y
+diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
+index fbfcc85e4dc01..a68c7f3af10ed 100644
+--- a/arch/powerpc/configs/g5_defconfig
++++ b/arch/powerpc/configs/g5_defconfig
+@@ -62,7 +62,6 @@ CONFIG_CDROM_PKTCDVD=m
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SPI_ATTRS=y
+diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
+index 2975e64629aa8..161351a18517b 100644
+--- a/arch/powerpc/configs/maple_defconfig
++++ b/arch/powerpc/configs/maple_defconfig
+@@ -41,7 +41,6 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
+ # CONFIG_SCSI_PROC_FS is not set
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_IPR=y
+ CONFIG_ATA=y
+diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
+index 4b6d31d4474e8..08b7f4cef2434 100644
+--- a/arch/powerpc/configs/pasemi_defconfig
++++ b/arch/powerpc/configs/pasemi_defconfig
+@@ -60,7 +60,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_CHR_DEV_OSST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_CHR_DEV_SCH=y
+ CONFIG_SCSI_CONSTANTS=y
+diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
+index 4e6e95f926460..5cad09f935621 100644
+--- a/arch/powerpc/configs/pmac32_defconfig
++++ b/arch/powerpc/configs/pmac32_defconfig
+@@ -119,7 +119,6 @@ CONFIG_BLK_DEV_RAM=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_FC_ATTRS=y
+diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
+index 6658cceb928c6..2a7c53cc2f83e 100644
+--- a/arch/powerpc/configs/powernv_defconfig
++++ b/arch/powerpc/configs/powernv_defconfig
+@@ -111,7 +111,6 @@ CONFIG_BLK_DEV_NVME=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SCAN_ASYNC=y
+diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
+index b250e6f5a7ca7..5569d36066dc7 100644
+--- a/arch/powerpc/configs/ppc64_defconfig
++++ b/arch/powerpc/configs/ppc64_defconfig
+@@ -110,7 +110,6 @@ CONFIG_VIRTIO_BLK=m
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_FC_ATTRS=y
+diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig
+index 0d746774c2bde..33a01a9e86be4 100644
+--- a/arch/powerpc/configs/ppc64e_defconfig
++++ b/arch/powerpc/configs/ppc64e_defconfig
+@@ -60,7 +60,6 @@ CONFIG_BLK_DEV_RAM_SIZE=65536
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_FC_ATTRS=y
+diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
+index 9dca4cffa623d..1372a1a7517ad 100644
+--- a/arch/powerpc/configs/ppc6xx_defconfig
++++ b/arch/powerpc/configs/ppc6xx_defconfig
+@@ -372,7 +372,6 @@ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_CHR_DEV_OSST=m
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_CHR_DEV_SCH=m
+ CONFIG_SCSI_ENCLOSURE=m
+diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
+index 26126b4d4de33..d58686a66388f 100644
+--- a/arch/powerpc/configs/pseries_defconfig
++++ b/arch/powerpc/configs/pseries_defconfig
+@@ -97,7 +97,6 @@ CONFIG_VIRTIO_BLK=m
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_CHR_DEV_ST=m
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_FC_ATTRS=y
+diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
+index 1253482a67c0d..2e25b264f70fb 100644
+--- a/arch/powerpc/configs/skiroot_defconfig
++++ b/arch/powerpc/configs/skiroot_defconfig
+@@ -83,7 +83,6 @@ CONFIG_EEPROM_AT24=m
+ # CONFIG_OCXL is not set
+ CONFIG_BLK_DEV_SD=m
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SCAN_ASYNC=y
+diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig
+index e5beb625ab888..87db9a84b5eca 100644
+--- a/arch/sh/configs/sh03_defconfig
++++ b/arch/sh/configs/sh03_defconfig
+@@ -46,7 +46,6 @@ CONFIG_BLK_DEV_IDETAPE=m
+ CONFIG_SCSI=m
+ CONFIG_BLK_DEV_SD=m
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_NETDEVICES=y
+ CONFIG_NET_ETHERNET=y
+diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
+index 6c325d53a20a0..bde4d21a8ac8e 100644
+--- a/arch/sparc/configs/sparc64_defconfig
++++ b/arch/sparc/configs/sparc64_defconfig
+@@ -73,7 +73,6 @@ CONFIG_RAID_ATTRS=m
+ CONFIG_SCSI=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=m
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=m
+ CONFIG_SCSI_MULTI_LUN=y
+ CONFIG_SCSI_CONSTANTS=y
+diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
+index 59ce9ed584306..18806b4fb26a9 100644
+--- a/arch/x86/configs/i386_defconfig
++++ b/arch/x86/configs/i386_defconfig
+@@ -137,7 +137,6 @@ CONFIG_CONNECTOR=y
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SPI_ATTRS=y
+diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
+index d0a5ffeae8dfd..3087c5e351e7e 100644
+--- a/arch/x86/configs/x86_64_defconfig
++++ b/arch/x86/configs/x86_64_defconfig
+@@ -136,7 +136,6 @@ CONFIG_CONNECTOR=y
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_BLK_DEV_SD=y
+ CONFIG_BLK_DEV_SR=y
+-CONFIG_BLK_DEV_SR_VENDOR=y
+ CONFIG_CHR_DEV_SG=y
+ CONFIG_SCSI_CONSTANTS=y
+ CONFIG_SCSI_SPI_ATTRS=y
+diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
+index 90cf4691b8c35..9ea30fcb44282 100644
+--- a/drivers/scsi/Kconfig
++++ b/drivers/scsi/Kconfig
+@@ -114,15 +114,6 @@ config BLK_DEV_SR
+ <file:Documentation/scsi/scsi.txt>.
+ The module will be called sr_mod.
+
+-config BLK_DEV_SR_VENDOR
+- bool "Enable vendor-specific extensions (for SCSI CDROM)"
+- depends on BLK_DEV_SR
+- help
+- This enables the usage of vendor specific SCSI commands. This is
+- required to support multisession CDs with old NEC/TOSHIBA cdrom
+- drives (and HP Writers). If you have such a drive and get the first
+- session only, try saying Y here; everybody else says N.
+-
+ config CHR_DEV_SG
+ tristate "SCSI generic support"
+ depends on SCSI
+diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c
+index e3b0ce25162ba..b9db2ec6d0361 100644
+--- a/drivers/scsi/sr_vendor.c
++++ b/drivers/scsi/sr_vendor.c
+@@ -66,9 +66,6 @@
+
+ void sr_vendor_init(Scsi_CD *cd)
+ {
+-#ifndef CONFIG_BLK_DEV_SR_VENDOR
+- cd->vendor = VENDOR_SCSI3;
+-#else
+ const char *vendor = cd->device->vendor;
+ const char *model = cd->device->model;
+
+@@ -100,7 +97,6 @@ void sr_vendor_init(Scsi_CD *cd)
+ cd->vendor = VENDOR_TOSHIBA;
+
+ }
+-#endif
+ }
+
+
+@@ -114,10 +110,8 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength)
+ struct ccs_modesel_head *modesel;
+ int rc, density = 0;
+
+-#ifdef CONFIG_BLK_DEV_SR_VENDOR
+ if (cd->vendor == VENDOR_TOSHIBA)
+ density = (blocklength > 2048) ? 0x81 : 0x83;
+-#endif
+
+ buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
+ if (!buffer)
+@@ -205,7 +199,6 @@ int sr_cd_check(struct cdrom_device_info *cdi)
+ }
+ break;
+
+-#ifdef CONFIG_BLK_DEV_SR_VENDOR
+ case VENDOR_NEC:{
+ unsigned long min, sec, frame;
+ cgc.cmd[0] = 0xde;
+@@ -298,7 +291,6 @@ int sr_cd_check(struct cdrom_device_info *cdi)
+ sector = buffer[11] + (buffer[10] << 8) +
+ (buffer[9] << 16) + (buffer[8] << 24);
+ break;
+-#endif /* CONFIG_BLK_DEV_SR_VENDOR */
+
+ default:
+ /* should not happen */
+--
+2.25.1
+
revert-usb-ohci-platform-fix-a-warning-when-hibernat.patch
revert-usb-ehci-platform-set-pm-runtime-as-active-on.patch
revert-usb-xhci-plat-set-pm-runtime-as-active-on-res.patch
+net-sfp-add-support-for-module-quirks.patch
+net-sfp-add-some-quirks-for-gpon-modules.patch
+arm-omap4-remove-pdata-quirks-for-omap4-iommus.patch
+arm-omap2-add-workaround-for-dra7-dsp-mstandby-errat.patch
+arm-omap2-use-separate-iommu-pdata-to-fix-dra7-ipu1-.patch
+mmc-mmci-support-any-block-sizes-for-ux500v2-and-qco.patch
+efi-arm-defer-probe-of-pcie-backed-efifb-on-dt-syste.patch
+hid-quirks-remove-ite-8595-entry-from-hid_have_speci.patch
+arm-at91-pm-add-quirk-for-sam9x60-s-ulp1.patch
+drm-sun4i-tcon-separate-quirks-for-tcon0-and-tcon1-o.patch
+scsi-sr-remove-references-to-blk_dev_sr_vendor-leave.patch
+bus-ti-sysc-rename-clk-related-quirks-to-pre_reset-a.patch
+bus-ti-sysc-consider-non-existing-registers-too-when.patch
+bus-ti-sysc-handle-module-unlock-quirk-needed-for-so.patch
+bus-ti-sysc-detect-display-subsystem-related-devices.patch
+arm64-dts-g12-common-add-parkmode_disable_ss_quirk-o.patch
+bus-ti-sysc-detect-edma-and-set-quirk-flags-for-tptc.patch
+alsa-usb-audio-add-support-for-motu-microbook-iic.patch
+input-goodix-fix-touch-coordinates-on-cube-i15-tc.patch
+alsa-usb-audio-create-a-registration-quirk-for-kings.patch
+doc-dt-bindings-usb-dwc3-update-entries-for-disablin.patch
+mmc-sdhci-do-not-enable-card-detect-interrupt-for-gp.patch
+alsa-usb-audio-rewrite-registration-quirk-handling.patch
+acpi-video-use-native-backlight-on-acer-aspire-5783z.patch
+alsa-usb-audio-add-registration-quirk-for-kingston-h.patch
+alsa-usb-audio-add-quirk-for-focusrite-scarlett-2i2.patch
+input-mms114-add-extra-compatible-for-mms345l.patch
+acpi-video-use-native-backlight-on-acer-travelmate-5.patch
+bus-ti-sysc-use-optional-clocks-on-for-enable-and-wa.patch
+alsa-usb-audio-add-registration-quirk-for-kingston-h.patch-6661