* RTC , ds1307 I2C driver and NTP does not work.
@ 2006-11-17 16:38 Joakim Tjernlund
2006-11-17 16:57 ` Kumar Gala
0 siblings, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2006-11-17 16:38 UTC (permalink / raw)
To: linuxppc-dev
I get this when I activate NTP and ntp "sync" the time the I2C HW clock.
BUG: scheduling while atomic: swapper/0x00010000/0
Call Trace:^M
[C0245C80] [C000860C] show_stack+0x48/0x194 (unreliable)
[C0245CB0] [C01BEFF4] schedule+0x5d4/0x618
[C0245CF0] [C01BF9C8] schedule_timeout+0x70/0xd0
[C0245D30] [C014416C] i2c_wait+0x164/0x1d8
[C0245D80] [C0144490] mpc_xfer+0x2b0/0x3a8
[C0245DD0] [C01423E8] i2c_transfer+0x58/0x7c
[C0245DF0] [C0141124] ds1307_set_time+0x1bc/0x234
[C0245E00] [C013F82C] rtc_set_time+0xb0/0xb8^M
[C0245E20] [C000BFC4] set_rtc_class_time+0x34/0x58
[C0245E40] [C000C8D0] timer_interrupt+0x5a0/0x5fc
[C0245EE0] [C000F7B0] ret_from_except+0x0/0x14
--- Exception: 901 at cpu_idle+0xc8/0xf0
LR = cpu_idle+0xec/0xf0
[C0245FC0] [C000388C] rest_init+0x28/0x38
[C0245FD0] [C01F36E0] start_kernel+0x1d8/0x228
[C0245FF0] [00003438] 0x3438
I have activated RTC CLASS and have this in my board file:
#ifdef CONFIG_RTC_CLASS
late_initcall(rtc_class_hookup);
#endif
kernel 2.6.19-rc5
Jocke
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: RTC , ds1307 I2C driver and NTP does not work.
2006-11-17 16:38 RTC , ds1307 I2C driver and NTP does not work Joakim Tjernlund
@ 2006-11-17 16:57 ` Kumar Gala
2006-11-17 17:44 ` Scott Wood
2006-11-18 0:54 ` Luong Ngo
0 siblings, 2 replies; 4+ messages in thread
From: Kumar Gala @ 2006-11-17 16:57 UTC (permalink / raw)
To: joakim.tjernlund; +Cc: linuxppc-dev
On Nov 17, 2006, at 10:38 AM, Joakim Tjernlund wrote:
> I get this when I activathte NTP and ntp "sync" the time the I2C HW
> clock.
You may be better off posting this to lkml and copy the i2c list (and
rtc if one exists). Since its more a driver issue than anything
really ppc specific. Clearly we are doing schedules() in mpc_xfer()
and maybe we shouldn't be.
- kumar
> BUG: scheduling while atomic: swapper/0x00010000/0
> Call Trace:^M
> [C0245C80] [C000860C] show_stack+0x48/0x194 (unreliable)
> [C0245CB0] [C01BEFF4] schedule+0x5d4/0x618
> [C0245CF0] [C01BF9C8] schedule_timeout+0x70/0xd0
> [C0245D30] [C014416C] i2c_wait+0x164/0x1d8
> [C0245D80] [C0144490] mpc_xfer+0x2b0/0x3a8
> [C0245DD0] [C01423E8] i2c_transfer+0x58/0x7c
> [C0245DF0] [C0141124] ds1307_set_time+0x1bc/0x234
> [C0245E00] [C013F82C] rtc_set_time+0xb0/0xb8^M
> [C0245E20] [C000BFC4] set_rtc_class_time+0x34/0x58
> [C0245E40] [C000C8D0] timer_interrupt+0x5a0/0x5fc
> [C0245EE0] [C000F7B0] ret_from_except+0x0/0x14
> --- Exception: 901 at cpu_idle+0xc8/0xf0
> LR = cpu_idle+0xec/0xf0
> [C0245FC0] [C000388C] rest_init+0x28/0x38
> [C0245FD0] [C01F36E0] start_kernel+0x1d8/0x228
> [C0245FF0] [00003438] 0x3438
>
> I have activated RTC CLASS and have this in my board file:
> #ifdef CONFIG_RTC_CLASS
> late_initcall(rtc_class_hookup);
> #endif
>
> kernel 2.6.19-rc5
>
> Jocke
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RTC , ds1307 I2C driver and NTP does not work.
2006-11-17 16:57 ` Kumar Gala
@ 2006-11-17 17:44 ` Scott Wood
2006-11-18 0:54 ` Luong Ngo
1 sibling, 0 replies; 4+ messages in thread
From: Scott Wood @ 2006-11-17 17:44 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
Kumar Gala wrote:
> On Nov 17, 2006, at 10:38 AM, Joakim Tjernlund wrote:
>
>
>>I get this when I activathte NTP and ntp "sync" the time the I2C HW
>>clock.
>
>
> You may be better off posting this to lkml and copy the i2c list (and
> rtc if one exists). Since its more a driver issue than anything
> really ppc specific. Clearly we are doing schedules() in mpc_xfer()
> and maybe we shouldn't be.
It's interrupt unsafe before that; rtc_set_time calls
mutex_lock_interruptible. If the RTC must be set from an interrupt, it
should be via a workqueue.
-Scott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RTC , ds1307 I2C driver and NTP does not work.
2006-11-17 16:57 ` Kumar Gala
2006-11-17 17:44 ` Scott Wood
@ 2006-11-18 0:54 ` Luong Ngo
1 sibling, 0 replies; 4+ messages in thread
From: Luong Ngo @ 2006-11-18 0:54 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2346 bytes --]
Joakim,
We are having the exact same problem. And if I understand correctly, the
schedule call in i2c-mpc driver is because we are waiting for the interrupt
signaling a byte transfer complete. If the interrupt does not yet come, the
driver call schedule to wait, both for polling mode and interrupt mode. I
am not sure if it is some problem occurs making the interrupt not coming
quick enough. We still try to resolve. Please let us know if you find a
solution and we definitely will post our finding if we can resolve.
-Ngo
On 11/17/06, Kumar Gala <galak@kernel.crashing.org> wrote:
>
>
> On Nov 17, 2006, at 10:38 AM, Joakim Tjernlund wrote:
>
> > I get this when I activathte NTP and ntp "sync" the time the I2C HW
> > clock.
>
> You may be better off posting this to lkml and copy the i2c list (and
> rtc if one exists). Since its more a driver issue than anything
> really ppc specific. Clearly we are doing schedules() in mpc_xfer()
> and maybe we shouldn't be.
>
> - kumar
>
> > BUG: scheduling while atomic: swapper/0x00010000/0
> > Call Trace:^M
> > [C0245C80] [C000860C] show_stack+0x48/0x194 (unreliable)
> > [C0245CB0] [C01BEFF4] schedule+0x5d4/0x618
> > [C0245CF0] [C01BF9C8] schedule_timeout+0x70/0xd0
> > [C0245D30] [C014416C] i2c_wait+0x164/0x1d8
> > [C0245D80] [C0144490] mpc_xfer+0x2b0/0x3a8
> > [C0245DD0] [C01423E8] i2c_transfer+0x58/0x7c
> > [C0245DF0] [C0141124] ds1307_set_time+0x1bc/0x234
> > [C0245E00] [C013F82C] rtc_set_time+0xb0/0xb8^M
> > [C0245E20] [C000BFC4] set_rtc_class_time+0x34/0x58
> > [C0245E40] [C000C8D0] timer_interrupt+0x5a0/0x5fc
> > [C0245EE0] [C000F7B0] ret_from_except+0x0/0x14
> > --- Exception: 901 at cpu_idle+0xc8/0xf0
> > LR = cpu_idle+0xec/0xf0
> > [C0245FC0] [C000388C] rest_init+0x28/0x38
> > [C0245FD0] [C01F36E0] start_kernel+0x1d8/0x228
> > [C0245FF0] [00003438] 0x3438
> >
> > I have activated RTC CLASS and have this in my board file:
> > #ifdef CONFIG_RTC_CLASS
> > late_initcall(rtc_class_hookup);
> > #endif
> >
> > kernel 2.6.19-rc5
> >
> > Jocke
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
[-- Attachment #2: Type: text/html, Size: 3082 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-18 0:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 16:38 RTC , ds1307 I2C driver and NTP does not work Joakim Tjernlund
2006-11-17 16:57 ` Kumar Gala
2006-11-17 17:44 ` Scott Wood
2006-11-18 0:54 ` Luong Ngo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).