linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* I2C RTC causes boot delay...
@ 2003-04-08 10:28 Steven Scholz
  2003-04-08 10:52 ` Steven Scholz
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Scholz @ 2003-04-08 10:28 UTC (permalink / raw)
  To: Linuxppc-Embedded


Hi there,

I have an I2C RTC connected to my MPC855T to substitute the internal one.

I noticed that between

    Verifying Checksum ... OK
    Uncompressing Kernel Image ... OK

and the next lines printed while booting "nothing" happens for THREE
seconds.

I reckon that is has something to do with not having an external 32kHz
clock on the MPC. But I can't find the place in the sources!

Could someone please give me a hint where to look.

Can I just skipped this part then for my board. Or do I realy need an
external 32kHz for running linux?

Thanks,

Steven


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: I2C RTC causes boot delay...
  2003-04-08 10:28 I2C RTC causes boot delay Steven Scholz
@ 2003-04-08 10:52 ` Steven Scholz
  2003-04-08 12:01   ` Joakim Tjernlund
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Scholz @ 2003-04-08 10:52 UTC (permalink / raw)
  To: Linuxppc-Embedded


I wrote,

> I have an I2C RTC connected to my MPC855T to substitute the internal one.
>
> I noticed that between
>
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
>
> and the next lines printed while booting "nothing" happens for THREE
> seconds.
>
> I reckon that is has something to do with not having an external 32kHz
> clock on the MPC. But I can't find the place in the sources!

I migth have found it:

Is it ok and enough to set

         ppc_md.set_rtc_time             = NULL;
         ppc_md.get_rtc_time             = NULL;

in platform_init()? And then later - when I2C is initialized - set it
to the appropriate I2C RTC functions?

Thanks,

Steven


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: I2C RTC causes boot delay...
  2003-04-08 10:52 ` Steven Scholz
@ 2003-04-08 12:01   ` Joakim Tjernlund
  2003-04-08 12:20     ` Steven Scholz
  0 siblings, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2003-04-08 12:01 UTC (permalink / raw)
  To: Steven Scholz, Linuxppc-Embedded


> I wrote,
>
> > I have an I2C RTC connected to my MPC855T to substitute the internal one.
> >
> > I noticed that between
> >
> >    Verifying Checksum ... OK
> >    Uncompressing Kernel Image ... OK
> >
> > and the next lines printed while booting "nothing" happens for THREE
> > seconds.
> >
> > I reckon that is has something to do with not having an external 32kHz
> > clock on the MPC. But I can't find the place in the sources!
>
> I migth have found it:
>
> Is it ok and enough to set
>
>          ppc_md.set_rtc_time             = NULL;
>          ppc_md.get_rtc_time             = NULL;
>
> in platform_init()? And then later - when I2C is initialized - set it
> to the appropriate I2C RTC functions?

Yes, that's it. If your kernel ever hangs after printing out
"calibrating delay loop ...", try adding a set_tb(0,0) somewhere in m8xx_setup.c,
to see if it fixes it.

You may also want to add an "I2C reset sequence" in your firmware/kernel
if your I2C clock gets stuck and don't respond(can happen if reset/power down while
reading the RTC). Look in u-boot for details.

    Jocke


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: I2C RTC causes boot delay...
  2003-04-08 12:01   ` Joakim Tjernlund
@ 2003-04-08 12:20     ` Steven Scholz
  2003-04-08 12:36       ` Joakim Tjernlund
  2003-04-08 12:57       ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Steven Scholz @ 2003-04-08 12:20 UTC (permalink / raw)
  To: Linuxppc-Embedded


Joakim Tjernlund schrieb:
>>I wrote,
>>
>>
>>>I have an I2C RTC connected to my MPC855T to substitute the internal one.
>>>
>>>I noticed that between
>>>
>>>   Verifying Checksum ... OK
>>>   Uncompressing Kernel Image ... OK
>>>
>>>and the next lines printed while booting "nothing" happens for THREE
>>>seconds.
>>>
>>>I reckon that is has something to do with not having an external 32kHz
>>>clock on the MPC. But I can't find the place in the sources!
>>
>>I migth have found it:
>>
>>Is it ok and enough to set
>>
>>         ppc_md.set_rtc_time             = NULL;
>>         ppc_md.get_rtc_time             = NULL;
>>
>>in platform_init()? And then later - when I2C is initialized - set it
>>to the appropriate I2C RTC functions?
>
>
> Yes, that's it. If your kernel ever hangs after printing out
> "calibrating delay loop ...", try adding a set_tb(0,0) somewhere in m8xx_setup.c,
> to see if it fixes it.

Thanks Jocke!

> You may also want to add an "I2C reset sequence" in your firmware/kernel
> if your I2C clock gets stuck and don't respond(can happen if reset/power down while
> reading the RTC). Look in u-boot for details.

Yeah. I know. I should put into PPCBoot/U-Boot.
But in the docs it says it's only for SOFT_I2C aka bitbang!
So
a) can I toggle the pins using GPIO and still use HARD_I2C? or
b) can I use SOFT_I2C in PPCBoot and CPM I2C (8xx-algo) under linux?

Steven


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: I2C RTC causes boot delay...
  2003-04-08 12:20     ` Steven Scholz
@ 2003-04-08 12:36       ` Joakim Tjernlund
  2003-04-08 12:57       ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Joakim Tjernlund @ 2003-04-08 12:36 UTC (permalink / raw)
  To: Steven Scholz, Linuxppc-Embedded


> > You may also want to add an "I2C reset sequence" in your firmware/kernel
> > if your I2C clock gets stuck and don't respond(can happen if reset/power down while
> > reading the RTC). Look in u-boot for details.
>
> Yeah. I know. I should put into PPCBoot/U-Boot.
> But in the docs it says it's only for SOFT_I2C aka bitbang!
> So
> a) can I toggle the pins using GPIO and still use HARD_I2C? or
> b) can I use SOFT_I2C in PPCBoot and CPM I2C (8xx-algo) under linux?

You can do alt. b(I do, NP). Maybe it's possible to make HW I2C do
the same, but I havn't checked.

 Jocke


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: I2C RTC causes boot delay...
  2003-04-08 12:20     ` Steven Scholz
  2003-04-08 12:36       ` Joakim Tjernlund
@ 2003-04-08 12:57       ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2003-04-08 12:57 UTC (permalink / raw)
  To: Steven Scholz; +Cc: Linuxppc-Embedded


In message <3E92BE98.4090907@imc-berlin.de> you wrote:
>
> Yeah. I know. I should put into PPCBoot/U-Boot.

It's arelady there.

> But in the docs it says it's only for SOFT_I2C aka bitbang!

Right, because you cannot toogle the pins at  your  liking  with  the
CPM's I2C controller.

> a) can I toggle the pins using GPIO and still use HARD_I2C? or

Yes, you can. But this has not been implemented yet. And if  you  do,
you  will  find you have copied 90% of the soft_i2c driver so why not
use this from the beginning? Using HARD_I2C has _zero_ advantage  for
U-Boot.

> b) can I use SOFT_I2C in PPCBoot and CPM I2C (8xx-algo) under linux?

Yes, you can.

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
THIS IS A 100% MATTER  PRODUCT:  In  the  Unlikely  Event  That  This
Merchandise  Should  Contact  Antimatter  in Any Form, a Catastrophic
Explosion Will Result.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-04-08 12:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-08 10:28 I2C RTC causes boot delay Steven Scholz
2003-04-08 10:52 ` Steven Scholz
2003-04-08 12:01   ` Joakim Tjernlund
2003-04-08 12:20     ` Steven Scholz
2003-04-08 12:36       ` Joakim Tjernlund
2003-04-08 12:57       ` Wolfgang Denk

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).