Real time clock

What feature would you like to see in JetDroid

Re: Real time clock

Postby Dopi » Thu Dec 09, 2010 10:53 am

makois wrote: For a machine to track time it should use an algorithm with some kind of "natural" frequency. So i guess it uses an internal clock maybe CPUs. So if this algorithm was built for an other cpu clock it should be fixed to aply to 800mhz.


Yes, this is my assumption, too. However, we did not yet find the right part inside the linux kernel to modify this behaviour.

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Advertisement

       

Re: Real time clock

Postby Qnoiz » Sat Jan 08, 2011 7:38 am

The S3C64XX timer is running at the wrong rate due to the
assumptions made in the timer initialisation about the way
the pwm dividers work. This means that time on the S3C64XX
runs twice as fast as it should.


Fix the problem by moving to using the clk framework to setup
the pwm timer clock muxes, as the pwm-clock code has all the
necessary knowledge of how the timer clock inputs are routed..
_____________________________________________________

Found it here http://kerneltrap.org/mailarchive/git-c ... 31/4553734
Does this help?

Cheers,
Qnoiz
User avatar
Qnoiz
Junior member
Junior member
 
Posts: 46
Joined: Thu Dec 23, 2010 1:08 am
Location: Greece Athens

Re: Real time clock

Postby Dopi » Wed Jan 12, 2011 9:46 am

Qnoiz wrote:The S3C64XX timer is running at the wrong rate due to the
assumptions made in the timer initialisation about the way
the pwm dividers work. This means that time on the S3C64XX
runs twice as fast as it should.


Fix the problem by moving to using the clk framework to setup
the pwm timer clock muxes, as the pwm-clock code has all the
necessary knowledge of how the timer clock inputs are routed..
_____________________________________________________

Found it here http://kerneltrap.org/mailarchive/git-c ... 31/4553734
Does this help?

Sounds like our problem. As this post is rather old (December 30, 2008) I would expect this patch to be in our kernel already. Can someone check this?

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: Real time clock

Postby Qnoiz » Wed Jan 12, 2011 11:31 am

Files are a bit different now in our kernel but,

arch/arm/mach-s3c2412/clock.c | 1 +
arch/arm/mach-s3c2443/clock.c | 2 +
arch/arm/plat-s3c/include/plat/clock.h | 5 ++
arch/arm/plat-s3c/pwm-clock.c | 28 +++++++------
arch/arm/plat-s3c/time.c | 66 +++++++++++++++++++++----------
arch/arm/plat-s3c24xx/s3c2410-clock.c | 1 +
arch/arm/plat-s3c64xx/clock.c | 2 +

I checked same files as s3c64xx and s3c6410 not as s3c24 etc.

There are only few insertions/deletions from above to all files.
Some of them dont have any insertions/deletions.
As i saw during kernel build we dont include arch/arm/plat-s3c/time.c (we use only arch/arm/kernel/time.c)

Also,we got some warnings in arch/arm/plat-s3c64xx/clock.c during kernel build.

If the problem is this then we need insertions/deletions in:

arch/arm/plat-s3c/include/plat/clock.h
arch/arm/plat-s3c/pwm-clock.c
arch/arm/plat-s3c/time.c + include this in kernel build
arch/arm/plat-s3c64xx/s3c6410-clock.c
arch/arm/plat-s3c64xx/clock.c

Cheers,
Qnoiz
User avatar
Qnoiz
Junior member
Junior member
 
Posts: 46
Joined: Thu Dec 23, 2010 1:08 am
Location: Greece Athens

Re: Real time clock

Postby Tranquill64 » Thu Jan 13, 2011 1:05 pm

Hello,

Maybe, this could be helpfull ?

[ARM] S3C: Update time initialisation to fix S3C64XX time problems

http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg03850.html

Or maybe not .....

Cheers,
Tranquill64
Tranquill64
Junior member
Junior member
 
Posts: 22
Joined: Fri Dec 24, 2010 11:55 am

Re: Real time clock

Postby Qnoiz » Thu Jan 20, 2011 3:47 pm

Spica use same cpu as Jet...
Spica got a working clock,aight?

Im gona replace every folder/file in JetKernel with Spica's Kernel folders/files and one by one some of the s3c-s3c64xx-s3c6410 files,then compile the kernel till we find where exactly the problem is...
At least this way we would know where to look for modifications...or not?


Cheers,
Qnoiz
User avatar
Qnoiz
Junior member
Junior member
 
Posts: 46
Joined: Thu Dec 23, 2010 1:08 am
Location: Greece Athens

Re: Real time clock

Postby Qnoiz » Thu Jan 20, 2011 4:11 pm

Tranquill64 wrote:Hello,

Maybe, this could be helpfull ?

[ARM] S3C: Update time initialisation to fix S3C64XX time problems

http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg03850.html

Or maybe not .....

Cheers,
Tranquill64



Tried that but it seems this is from newer kernels,so our clock.c file its kinda different :?
User avatar
Qnoiz
Junior member
Junior member
 
Posts: 46
Joined: Thu Dec 23, 2010 1:08 am
Location: Greece Athens

Re: Real time clock

Postby Qnoiz » Mon Jan 24, 2011 5:49 pm

Clock issue seems to be fixed using this zImage from MadRocker,

http://www.megaupload.com/?d=JCR5LUU0

Its a test kernel so there is no motion sensor support yet.


Cheers,
Qnoiz
User avatar
Qnoiz
Junior member
Junior member
 
Posts: 46
Joined: Thu Dec 23, 2010 1:08 am
Location: Greece Athens

Re: Real time clock

Postby MadRocker » Tue Jan 25, 2011 12:26 am

Yes sry I did not have time to post about it if you have not seen the RTC test kernel checkout the kernel part of the forum. This is purely a accident that the RTC is working, hope anyone can take that .config from there and improve on it.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Re: Real time clock

Postby Qnoiz » Tue Jan 25, 2011 11:09 am

Jetdroid's config

Code: Select all
#
# CPU Power Management
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_STAT is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_MIN_TICKS=10
CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER=1000
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y




MadRocker's config


Code: Select all
#
# CPU Power Management
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_STAT is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_MIN_TICKS=10
CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER=1000
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y


Changing only this in jet_android_defconfig,fix the clock issue...

Phone is set to performance only speed (minm/max 800mhz),thats why clock is working...
Does that mean we gonna have faster drain battery than now if we let it to performance only speed?
Or it's safe to keep it like that and got a working clock?


Cheers,
Qnoiz
User avatar
Qnoiz
Junior member
Junior member
 
Posts: 46
Joined: Thu Dec 23, 2010 1:08 am
Location: Greece Athens

PreviousNext

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement
cron