[PATCH 2/5] Add legacy devices to mpc8641_hpcn.dts

Wade Farnsworth wfarnsworth at mvista.com
Tue May 22 02:51:21 EST 2007


On Mon, 2007-05-21 at 11:10 -0500, Jon Loeliger wrote:
> On Mon, 2007-05-21 at 11:04, Wade Farnsworth wrote:
> 
> > I wonder if you're running into the locked RTC problem on the m1575.
> > The version of u-boot that I'm using (recent pull from
> > opensource.freescale.com)
> 
> Which repository?  I ask because it is highly likely that
> I placed it there...

http://opensource.freescale.com/pub/scm/u-boot-jdl.git

> 
> >  has a workaround for that.  Can you verify if
> > this is the problem?
> 
> Can you point to "the workaround" to which you refer?

commit a59a76edd7c475329c083d5c21f6bca8bb5b8476

Re-enable a PCIE hack access for RTC on 8641HPCN.

> 
> > For the benefit of those who aren't aware of the problem, the RTC on the
> > m1575 is locked on boot until PCI memory space is read.
> 
> Hmmm.  I'm pretty sure this is being done already.

If you're sure your u-boot is doing this, then maybe it is a
configuration problem after all.

> 
> > Maybe we should put the workaround in the kernel instead.  Any opinions?
> 
> How are you getting it to work now as it is, then?

In addition to the u-boot hack, I have the following config options
enabled:

CONFIG_PCI=y
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
CONFIG_RTC_DRV_CMOS=y

I believe this is all you should need to enable the RTC.  You should
then see a boot message indicating that the system clock has been set:

rtc_cmos rtc_cmos: setting the system clock to 2007-05-21 21:29:13
(1179782953)

In order to use hwclock to access the RTC you have to make a symlink
from /dev/rtc0 to /dev/rtc.

--Wade





More information about the Linuxppc-dev mailing list