* [PATCH] pinctrl: baytrail: Clear DIRECT_IRQ bit
@ 2014-09-17 12:30 Loic Poulain
2014-09-17 13:18 ` Mathias Nyman
0 siblings, 1 reply; 3+ messages in thread
From: Loic Poulain @ 2014-09-17 12:30 UTC (permalink / raw)
To: mathias.nyman, heikki.krogerus, mika.westerberg, samuel.ortiz
Cc: linux-kernel, Loic Poulain
Direct Irq En bit can be initialized to a bad value.
This bit has to be cleared for io access mode.
Signed-off-by: Loic Poulain <loic.poulain@intel.com>
---
drivers/pinctrl/pinctrl-baytrail.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 975572e..94902f7 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -44,6 +44,7 @@
/* BYT_CONF0_REG register bits */
#define BYT_IODEN BIT(31)
+#define BYT_DIRECT_IRQ BIT(27)
#define BYT_TRIG_NEG BIT(26)
#define BYT_TRIG_POS BIT(25)
#define BYT_TRIG_LVL BIT(24)
@@ -232,7 +233,7 @@ static int byt_irq_type(struct irq_data *d, unsigned type)
/* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits
* are used to indicate high and low level triggering
*/
- value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
+ value &= ~(BYT_DIRECT_IRQ | BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
switch (type) {
case IRQ_TYPE_LEVEL_HIGH:
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] pinctrl: baytrail: Clear DIRECT_IRQ bit
2014-09-17 12:30 [PATCH] pinctrl: baytrail: Clear DIRECT_IRQ bit Loic Poulain
@ 2014-09-17 13:18 ` Mathias Nyman
2014-09-17 13:53 ` Loic Poulain
0 siblings, 1 reply; 3+ messages in thread
From: Mathias Nyman @ 2014-09-17 13:18 UTC (permalink / raw)
To: Loic Poulain, heikki.krogerus, mika.westerberg, samuel.ortiz
Cc: linux-kernel, Linus Walleij
On 09/17/2014 03:30 PM, Loic Poulain wrote:
> Direct Irq En bit can be initialized to a bad value.
> This bit has to be cleared for io access mode.
>
> Signed-off-by: Loic Poulain <loic.poulain@intel.com>
> ---
> drivers/pinctrl/pinctrl-baytrail.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
> index 975572e..94902f7 100644
> --- a/drivers/pinctrl/pinctrl-baytrail.c
> +++ b/drivers/pinctrl/pinctrl-baytrail.c
> @@ -44,6 +44,7 @@
>
> /* BYT_CONF0_REG register bits */
> #define BYT_IODEN BIT(31)
> +#define BYT_DIRECT_IRQ BIT(27)
> #define BYT_TRIG_NEG BIT(26)
> #define BYT_TRIG_POS BIT(25)
> #define BYT_TRIG_LVL BIT(24)
> @@ -232,7 +233,7 @@ static int byt_irq_type(struct irq_data *d, unsigned type)
> /* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits
> * are used to indicate high and low level triggering
> */
> - value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
> + value &= ~(BYT_DIRECT_IRQ | BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
>
> switch (type) {
> case IRQ_TYPE_LEVEL_HIGH:
>
Just checked that there is a patch already upstream that warns if this bit is set.
It defines BYT_DIRECT_IRQ_EN already, but doesn't clear the bit.
commit ff998356b644ebe723127bd9eec6040b59a4a4f6
Author: Eric Ernst <eric.ernst@linux.intel.com>
Date: Thu Jun 12 11:06:20 2014 -0700
pinctrl: baytrail: Warn if direct IRQ GPIO set to output
Maybe adding a patch clearing the bit on top of that patch?
And send that patch to Linus Walleij as well (added to cc)
Thanks
-Mathias
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] pinctrl: baytrail: Clear DIRECT_IRQ bit
2014-09-17 13:18 ` Mathias Nyman
@ 2014-09-17 13:53 ` Loic Poulain
0 siblings, 0 replies; 3+ messages in thread
From: Loic Poulain @ 2014-09-17 13:53 UTC (permalink / raw)
To: Mathias Nyman, heikki.krogerus, mika.westerberg, samuel.ortiz
Cc: linux-kernel, Linus Walleij
Do you think a WARN necessary before clearing the bit?
Regards,
Loic
On 17/09/2014 15:18, Mathias Nyman wrote:
> On 09/17/2014 03:30 PM, Loic Poulain wrote:
>> Direct Irq En bit can be initialized to a bad value.
>> This bit has to be cleared for io access mode.
>>
>> Signed-off-by: Loic Poulain <loic.poulain@intel.com>
>> ---
>> drivers/pinctrl/pinctrl-baytrail.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
>> index 975572e..94902f7 100644
>> --- a/drivers/pinctrl/pinctrl-baytrail.c
>> +++ b/drivers/pinctrl/pinctrl-baytrail.c
>> @@ -44,6 +44,7 @@
>>
>> /* BYT_CONF0_REG register bits */
>> #define BYT_IODEN BIT(31)
>> +#define BYT_DIRECT_IRQ BIT(27)
>> #define BYT_TRIG_NEG BIT(26)
>> #define BYT_TRIG_POS BIT(25)
>> #define BYT_TRIG_LVL BIT(24)
>> @@ -232,7 +233,7 @@ static int byt_irq_type(struct irq_data *d, unsigned type)
>> /* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits
>> * are used to indicate high and low level triggering
>> */
>> - value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
>> + value &= ~(BYT_DIRECT_IRQ | BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
>>
>> switch (type) {
>> case IRQ_TYPE_LEVEL_HIGH:
>>
> Just checked that there is a patch already upstream that warns if this bit is set.
> It defines BYT_DIRECT_IRQ_EN already, but doesn't clear the bit.
>
> commit ff998356b644ebe723127bd9eec6040b59a4a4f6
> Author: Eric Ernst <eric.ernst@linux.intel.com>
> Date: Thu Jun 12 11:06:20 2014 -0700
>
> pinctrl: baytrail: Warn if direct IRQ GPIO set to output
>
>
> Maybe adding a patch clearing the bit on top of that patch?
>
> And send that patch to Linus Walleij as well (added to cc)
>
> Thanks
> -Mathias
--
Intel Open Source Technology Center
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-17 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 12:30 [PATCH] pinctrl: baytrail: Clear DIRECT_IRQ bit Loic Poulain
2014-09-17 13:18 ` Mathias Nyman
2014-09-17 13:53 ` Loic Poulain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox