<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/intel/pinctrl-cherryview.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-03-26T10:13:17Z</updated>
<entry>
<title>pinctrl: cherryview: Do not mask all interrupts in probe</title>
<updated>2017-03-26T10:13:17Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2016-08-22T11:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3787a071d145055a89442cf614ceec39c315bc9f'/>
<id>urn:sha1:3787a071d145055a89442cf614ceec39c315bc9f</id>
<content type='text'>
commit bcb48cca23ec9852739e4a464307fa29515bbe48 upstream.

The Cherryview GPIO controller has 8 or 16 wires connected to the I/O-APIC
which can be used directly by the platform/BIOS or drivers. One such wire
is used as SCI (System Control Interrupt) which ACPI depends on to be able
to trigger GPEs (General Purpose Events).

The pinctrl driver itself uses another IRQ resource which is wire OR of all
the 8 (or 16) wires and follows what BIOS has programmed to the IntSel
register of each pin.

Currently the driver masks all interrupts at probe time and this prevents
these direct interrupts from working as expected. The reason for this is
that some early stage prototypes had some pins misconfigured causing lots
of spurious interrupts.

We fix this by leaving the interrupt mask untouched. This allows SCI and
other direct interrupts work properly. What comes to the possible spurious
interrupts we switch the default handler to be handle_bad_irq() instead of
handle_simple_irq() (which was not correct anyway).

Reported-by: Yu C Chen &lt;yu.c.chen@intel.com&gt;
Reported-by: Anisse Astier &lt;anisse@astier.eu&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: cherryview: Prevent possible interrupt storm on resume</title>
<updated>2016-11-18T09:48:34Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2016-10-31T14:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a98e483ca784a9b19b43246371f27707936887e6'/>
<id>urn:sha1:a98e483ca784a9b19b43246371f27707936887e6</id>
<content type='text'>
commit d2cdf5dc58f6970e9d9d26e47974c21fe87983f3 upstream.

When the system is suspended to S3 the BIOS might re-initialize certain
GPIO pins back to their original state or it may re-program interrupt mask
of others. For example Acer TravelMate B116-M had BIOS bug where certain
GPIO pin (MF_ISH_GPIO_5) was programmed to trigger on high level, and the
pin state was high once the BIOS gave control to the OS on resume.

This triggers lots of messages like:

 irq 117, desc: ffff88017a61e600, depth: 1, count: 0, unhandled: 0
 -&gt;handle_irq():  ffffffff8109b613, handle_bad_irq+0x0/0x1e0
 -&gt;irq_data.chip(): ffffffffa0020180, chv_pinctrl_exit+0x2d84/0x12 [pinctrl_cherryview]
 -&gt;action():           (null)
    IRQ_NOPROBE set

We reset the mask back to known state in chv_pinctrl_resume() but that is
called only after device interrupts have already been enabled.

Now, this particular issue was fixed by upgrading the BIOS to the latest
(v1.23) but not everybody upgrades their BIOSes so we fix it up in the
driver as well.

Prevent the possible interrupt storm by moving suspend and resume hooks to
be called at _noirq time instead. Since device interrupts are still
disabled we can restore the mask back to known state before interrupt storm
happens.

Reported-by: Christian Steiner &lt;christian.steiner@outlook.de&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: cherryview: Serialize register access in suspend/resume</title>
<updated>2016-11-18T09:48:34Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2016-10-31T14:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=126d0a2fe87884a28c17f2f0af9e0c51592ac47f'/>
<id>urn:sha1:126d0a2fe87884a28c17f2f0af9e0c51592ac47f</id>
<content type='text'>
commit 56211121c0825cd188caad05574fdc518d5cac6f upstream.

If async suspend is enabled, the driver may access registers concurrently
with another instance which may fail because of the bug in Cherryview GPIO
hardware. Prevent this by taking the shared lock while accessing the
hardware in suspend and resume hooks.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: cherryview: prevent concurrent access to GPIO controllers</title>
<updated>2016-08-20T16:09:17Z</updated>
<author>
<name>Dan O'Donovan</name>
</author>
<published>2016-06-10T12:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c3b381fadc08342a2f4b1182c9f710983ab299c'/>
<id>urn:sha1:4c3b381fadc08342a2f4b1182c9f710983ab299c</id>
<content type='text'>
commit 0bd50d719b004110e791800450ad204399100a86 upstream.

Due to a silicon issue on the Atom X5-Z8000 "Cherry Trail" processor
series, a common lock must be used to prevent concurrent accesses
across the 4 GPIO controllers managed by this driver.

See Intel Atom Z8000 Processor Series Specification Update
(Rev. 005), errata #CHT34, for further information.

Signed-off-by: Dan O'Donovan &lt;dan@emutex.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pinctrl: replace trivial implementations of gpio_chip request/free</title>
<updated>2015-10-16T20:20:21Z</updated>
<author>
<name>Jonas Gorski</name>
</author>
<published>2015-10-11T15:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98c85d583a5dee70d75faed3eb79851dd0a2e2fe'/>
<id>urn:sha1:98c85d583a5dee70d75faed3eb79851dd0a2e2fe</id>
<content type='text'>
Replace all trivial request/free callbacks that do nothing but call into
pinctrl code with the generic versions.

Signed-off-by: Jonas Gorski &lt;jogo@openwrt.org&gt;
Acked-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Acked-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Acked-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Acked-by: Lee Jones &lt;lee@kernel.org&gt;
Acked-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>genirq: Remove irq argument from irq flow handlers</title>
<updated>2015-09-16T13:47:51Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2015-09-14T08:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd0b9ac405e1794d72533c3d487aa65b6b955a0c'/>
<id>urn:sha1:bd0b9ac405e1794d72533c3d487aa65b6b955a0c</id>
<content type='text'>
Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.

Remove the argument.

Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Use raw_spinlock for locking</title>
<updated>2015-08-26T07:27:39Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2015-08-17T13:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=109fdf1572be86aaf681e69b30dc5ada90ce6f35'/>
<id>urn:sha1:109fdf1572be86aaf681e69b30dc5ada90ce6f35</id>
<content type='text'>
When running -rt kernel and an interrupt happens on a GPIO line controlled by
Intel Cherryview/Braswell pinctrl driver we get:

 BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
 in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
 Preemption disabled at:[&lt;ffffffff81092e9f&gt;] cpu_startup_entry+0x17f/0x480

 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.5-rt5 #16
  ...
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff816283c6&gt;] dump_stack+0x4a/0x61
  [&lt;ffffffff81077e17&gt;] ___might_sleep+0xe7/0x170
  [&lt;ffffffff8162d6cf&gt;] rt_spin_lock+0x1f/0x50
  [&lt;ffffffff812e52ed&gt;] chv_gpio_irq_ack+0x3d/0xa0
  [&lt;ffffffff810a72f5&gt;] handle_edge_irq+0x75/0x180
  [&lt;ffffffff810a3457&gt;] generic_handle_irq+0x27/0x40
  [&lt;ffffffff812e57de&gt;] chv_gpio_irq_handler+0x7e/0x110
  [&lt;ffffffff810050aa&gt;] handle_irq+0xaa/0x190
  ...

This is because desc-&gt;lock is raw_spinlock and is held when chv_gpio_irq_ack()
is called by the genirq core. chv_gpio_irq_ack() in turn takes pctrl-&gt;lock
which in -rt is an rt-mutex causing might_sleep() rightfully to complain about
sleeping function called from invalid context.

In order to keep -rt happy but at the same time make sure that register
accesses get serialized, convert the driver to use raw_spinlock instead.

Suggested-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Serialize all register access</title>
<updated>2015-08-13T11:20:02Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2015-08-03T09:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4585b000ace6438d0b142746baab658056b223d9'/>
<id>urn:sha1:4585b000ace6438d0b142746baab658056b223d9</id>
<content type='text'>
There is a hardware issue in Intel Braswell/Cherryview where concurrent
GPIO register access might results reads of 0xffffffff and writes might get
dropped.

Prevent this from happening by taking the serializing lock for all places
where it is possible that more than one thread might be accessing the
hardware concurrently.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc</title>
<updated>2015-07-17T19:56:20Z</updated>
<author>
<name>Jiang Liu</name>
</author>
<published>2015-06-04T04:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5663bb27dec1a2bfaf9d92e3685834b91a36a5a3'/>
<id>urn:sha1:5663bb27dec1a2bfaf9d92e3685834b91a36a5a3</id>
<content type='text'>
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>pinctrl/cherryview: Use irq_set_handler_locked()</title>
<updated>2015-07-17T19:56:17Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2015-06-23T13:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4e3f7830fb742039c2c24535af931df3d6d2124'/>
<id>urn:sha1:a4e3f7830fb742039c2c24535af931df3d6d2124</id>
<content type='text'>
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: linux-gpio@vger.kernel.org
</content>
</entry>
</feed>
