* [U-Boot] data abort in omap_gpio
@ 2014-04-09 15:16 Andreas Bießmann
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Bießmann @ 2014-04-09 15:16 UTC (permalink / raw)
To: u-boot
Hi all,
I've encountered a data abort in tricorder board when switching gpio's.
Here is the trace:
---8<---
gpio_direction_output (gpio=<value optimized out>, value=0) at
/home/abiessmann/src/u-boot/drivers/gpio/omap_gpio.c:197
197 _set_gpio_dataout(bank, get_gpio_index(gpio), value);
(gdb) s
_set_gpio_dataout (gpio=<value optimized out>, value=0) at
/home/abiessmann/src/u-boot/drivers/gpio/omap_gpio.c:102
102 void *reg = bank->base;
(gdb) s
105 switch (bank->method) {
(gdb) s
107 if (enable)
(gdb) list
102 void *reg = bank->base;
103 u32 l = 0;
104
105 switch (bank->method) {
106 case METHOD_GPIO_24XX:
107 if (enable)
108 reg += OMAP_GPIO_SETDATAOUT;
109 else
110 reg += OMAP_GPIO_CLEARDATAOUT;
111 l = 1 << gpio;
(gdb) s
111 l = 1 << gpio;
(gdb) s
108 reg += OMAP_GPIO_SETDATAOUT;
(gdb) s
110 reg += OMAP_GPIO_CLEARDATAOUT;
(gdb) s
111 l = 1 << gpio;
(gdb) s
118 __raw_writel(l, reg);
(gdb) print/x l
$18 = 0x800
(gdb) print/x reg
$19 = 0x49050090
(gdb) s
^C
Program received signal SIGSTOP, Stopped (signal).
_start ()@/home/abiessmann/src/u-boot/arch/arm/cpu/armv7/start.S:27
27 ldr pc, _data_abort
(gdb)
--->8---
Anyone aware of that?
I'll dive into that tomorrow. If anyone knows that problem a pointer
would be good.
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Data abort in omap_gpio
@ 2014-04-09 15:22 Andreas Bießmann
2014-04-09 15:37 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2014-04-09 15:22 UTC (permalink / raw)
To: u-boot
Hi all,
I've encountered a data abort in omap_gpio when using
gpio_direction_output(). Anyone aware of that?
Here is the trace:
---8<---
gpio_direction_output (gpio=<value optimized out>, value=0) at
/home/abiessmann/src/u-boot/drivers/gpio/omap_gpio.c:197
197 _set_gpio_dataout(bank, get_gpio_index(gpio), value);
(gdb) s
_set_gpio_dataout (gpio=<value optimized out>, value=0) at
/home/abiessmann/src/u-boot/drivers/gpio/omap_gpio.c:102
102 void *reg = bank->base;
(gdb) s
105 switch (bank->method) {
(gdb) s
107 if (enable)
(gdb) list
102 void *reg = bank->base;
103 u32 l = 0;
104
105 switch (bank->method) {
106 case METHOD_GPIO_24XX:
107 if (enable)
108 reg += OMAP_GPIO_SETDATAOUT;
109 else
110 reg += OMAP_GPIO_CLEARDATAOUT;
111 l = 1 << gpio;
(gdb) s
111 l = 1 << gpio;
(gdb) s
108 reg += OMAP_GPIO_SETDATAOUT;
(gdb) s
110 reg += OMAP_GPIO_CLEARDATAOUT;
(gdb) s
111 l = 1 << gpio;
(gdb) s
118 __raw_writel(l, reg);
(gdb) print/s l
$17 = 2048
(gdb) print/x l
$18 = 0x800
(gdb) print/x reg
$19 = 0x49050090
(gdb) s
^C
Program received signal SIGSTOP, Stopped (signal).
_start ()@/home/abiessmann/src/u-boot/arch/arm/cpu/armv7/start.S:27
27 ldr pc, _data_abort
(gdb)
--->8---
(Encounterd with tricorder board current ToT)
I'll dive into that tomorrow. If anyone has some pointeres, please speak
out loud ;)
Best Regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Data abort in omap_gpio
2014-04-09 15:22 [U-Boot] Data abort in omap_gpio Andreas Bießmann
@ 2014-04-09 15:37 ` Tom Rini
2014-04-10 7:22 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2014-04-09 15:37 UTC (permalink / raw)
To: u-boot
On Wed, Apr 09, 2014 at 05:22:57PM +0200, Andreas Bie?mann wrote:
> Hi all,
>
> I've encountered a data abort in omap_gpio when using
> gpio_direction_output(). Anyone aware of that?
>
> Here is the trace:
>
> ---8<---
> gpio_direction_output (gpio=<value optimized out>, value=0) at
> /home/abiessmann/src/u-boot/drivers/gpio/omap_gpio.c:197
> 197 _set_gpio_dataout(bank, get_gpio_index(gpio), value);
> (gdb) s
> _set_gpio_dataout (gpio=<value optimized out>, value=0) at
> /home/abiessmann/src/u-boot/drivers/gpio/omap_gpio.c:102
> 102 void *reg = bank->base;
> (gdb) s
> 105 switch (bank->method) {
> (gdb) s
> 107 if (enable)
> (gdb) list
> 102 void *reg = bank->base;
> 103 u32 l = 0;
> 104
> 105 switch (bank->method) {
> 106 case METHOD_GPIO_24XX:
> 107 if (enable)
> 108 reg += OMAP_GPIO_SETDATAOUT;
> 109 else
> 110 reg += OMAP_GPIO_CLEARDATAOUT;
> 111 l = 1 << gpio;
> (gdb) s
> 111 l = 1 << gpio;
> (gdb) s
> 108 reg += OMAP_GPIO_SETDATAOUT;
> (gdb) s
> 110 reg += OMAP_GPIO_CLEARDATAOUT;
> (gdb) s
> 111 l = 1 << gpio;
> (gdb) s
> 118 __raw_writel(l, reg);
> (gdb) print/s l
> $17 = 2048
> (gdb) print/x l
> $18 = 0x800
> (gdb) print/x reg
> $19 = 0x49050090
> (gdb) s
> ^C
> Program received signal SIGSTOP, Stopped (signal).
> _start () at /home/abiessmann/src/u-boot/arch/arm/cpu/armv7/start.S:27
> 27 ldr pc, _data_abort
> (gdb)
> --->8---
>
> (Encounterd with tricorder board current ToT)
>
> I'll dive into that tomorrow. If anyone has some pointeres, please speak
> out loud ;)
You need to add the relevant CONFIG_OMAP3_GPIO_n define to enable
clocks/etc for the gpios being used.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140409/0a263121/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Data abort in omap_gpio
2014-04-09 15:37 ` Tom Rini
@ 2014-04-10 7:22 ` Andreas Bießmann
2014-04-10 7:47 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2014-04-10 7:22 UTC (permalink / raw)
To: u-boot
Dear Tom Rini,
On 04/09/2014 05:37 PM, Tom Rini wrote:
> On Wed, Apr 09, 2014 at 05:22:57PM +0200, Andreas Bie?mann wrote:
>> (gdb) s
>> 118 __raw_writel(l, reg);
>> (gdb) print/s l
>> $17 = 2048
>> (gdb) print/x l
>> $18 = 0x800
>> (gdb) print/x reg
>> $19 = 0x49050090
>> (gdb) s
>> ^C
>> Program received signal SIGSTOP, Stopped (signal).
>> _start () at /home/abiessmann/src/u-boot/arch/arm/cpu/armv7/start.S:27
>> 27 ldr pc, _data_abort
>> (gdb)
>> --->8---
>>
>> (Encounterd with tricorder board current ToT)
>>
>> I'll dive into that tomorrow. If anyone has some pointeres, please speak
>> out loud ;)
>
> You need to add the relevant CONFIG_OMAP3_GPIO_n define to enable
> clocks/etc for the gpios being used.
>
Well, it is GPIO 42/43 which is located in bank 1. These clocks are not
enabled explicitly in 708cfb74b7c6df9c37d3c48988a154be79daefeb. I
haven't followed the dsicussen but wonder why we do not switch the
clocks on gpio_request().
So is it seems that 708cfb74b7c6df9c37d3c48988a154be79daefeb missed to
enable clocks for bank 1. I'll try that.
Best regards
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Data abort in omap_gpio
2014-04-10 7:22 ` Andreas Bießmann
@ 2014-04-10 7:47 ` Andreas Bießmann
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Bießmann @ 2014-04-10 7:47 UTC (permalink / raw)
To: u-boot
On 04/10/2014 09:22 AM, Andreas Bie?mann wrote:
> On 04/09/2014 05:37 PM, Tom Rini wrote:
>> On Wed, Apr 09, 2014 at 05:22:57PM +0200, Andreas Bie?mann wrote:
>
>>> (gdb) s
>>> 118 __raw_writel(l, reg);
>>> (gdb) print/s l
>>> $17 = 2048
>>> (gdb) print/x l
>>> $18 = 0x800
>>> (gdb) print/x reg
>>> $19 = 0x49050090
>>> (gdb) s
>>> ^C
>>> Program received signal SIGSTOP, Stopped (signal).
>>> _start () at /home/abiessmann/src/u-boot/arch/arm/cpu/armv7/start.S:27
>>> 27 ldr pc, _data_abort
>>> (gdb)
>>> --->8---
>>>
>>> (Encounterd with tricorder board current ToT)
>>>
>>> I'll dive into that tomorrow. If anyone has some pointeres, please speak
>>> out loud ;)
>>
>> You need to add the relevant CONFIG_OMAP3_GPIO_n define to enable
>> clocks/etc for the gpios being used.
>>
>
> Well, it is GPIO 42/43 which is located in bank 1. These clocks are not
> enabled explicitly in 708cfb74b7c6df9c37d3c48988a154be79daefeb. I
> haven't followed the dsicussen but wonder why we do not switch the
> clocks on gpio_request().
>
> So is it seems that 708cfb74b7c6df9c37d3c48988a154be79daefeb missed to
> enable clocks for bank 1. I'll try that.
Got it working. The numbering starts with '1' here (not '0'). Therefore
GPIO 42/43 is in bank 2. Enabling that bank with CONFIG_OMAP3_GPIO_2
stops data abort
Thanks for the hint! Fixup patch series for 2014.04 coming today.
Best Regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-10 7:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 15:22 [U-Boot] Data abort in omap_gpio Andreas Bießmann
2014-04-09 15:37 ` Tom Rini
2014-04-10 7:22 ` Andreas Bießmann
2014-04-10 7:47 ` Andreas Bießmann
-- strict thread matches above, loose matches on Subject: below --
2014-04-09 15:16 [U-Boot] data " Andreas Bießmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox