Device tree and external RTC

Bruce_Leonard at selinc.com Bruce_Leonard at selinc.com
Fri Oct 5 04:17:00 EST 2007


Guennadi Liakhovetski <g.liakhovetski at gmx.de> wrote on 10/04/2007 02:29:06 
AM:

> > CONFIG_SENSORS_M41T00=y
> 
> It shall not hurt, but do you really have this one?

I turned this on because my clock is a SMT M41T00.  Not sure why it's 
called a sensor in the .config.
 
> First, this might be either a userspace or a kernel problem. Do you have 

> the correct device nodes? Are you using udev? Should be something like 

Ultimatly it was my own stupididty that did me in.  You are absolutly 
correct, I didn't have the right device nodes and because we're limited on 
space we don't want to use udev.  Once I created the rtc0 device and 
linked rtc to it, hwclock started working correctly.

> > When I dump out ppc_md, all the RTC functions (i.e., get_rtc_time, 
> > read_rtc_val, etc.) are all NULL.
> 
> Don't think you need those. Those are for powerpc platforms not using 
> the generic rtc driver. 

Right.

> you need suitable entries in arch/powerpc/sysdev/fsl_soc.c in the 
> i2c_devices array. I think, patch at 
> http://patchwork.ozlabs.org/linuxppc/patch?id=13624 is exactly what you 
> need. 

I'll give this a try.  I'd really prefer to be using the device tree for 
this, but I guess as long as I have it working using configuration options 
in the kernel it doesn't really matter.  Either way I don't have to write 
any special board support code for the kernel.

Thanks for all the information and pointers.  It's been a big help!

Bruce


More information about the Linuxppc-embedded mailing list