2009-12-06 04:58:19     problem in setting hwclock from kernel/konsole

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2009-12-06 04:58:19     problem in setting hwclock from kernel/konsole

Nitin Goel (INDIA)

Message: 83121   

 

Hi,

 

We have done below settings for getting the current time from RTC

---------->Kernel settings

----------------->DeviceDrivers

--------------------------->RealTimeClock

 

Setting in the attachment.

 

now we want to update the RTC time, for this we are using following command

“hwclock –s“ from the console

 

But we are getting the following error in executing the command.

/***********************************************************************/

root:/> hwclock

hwclock: cannot access RTC: No such file or directory

root:/> hwclock -r

hwclock: cannot access RTC: No such file or directory

root:/> hwclock -s

hwclock: cannot access RTC: No such file or directory

root:/>

/***********************************************************************/

 

The startup logs that we are getting are:

*************************************************************************/

root:/> dmesg

Linux version 2.6.22.18-ADI-2008R1-svn (ngoel@delltap1.localdomain) (gcc version

4.1.2 (ADI svn)) #1038 Sun Dec 6 14:42:08 IST 2009

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Warning: limiting memory to 43MB due to hardware anomaly 05000263

Reset caused by Software reset

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Warning: Compiled for Rev 2, but running on Rev 3

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 400 MHz core clock and 100 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00100000-0x00217fa0

  data      = 0x00269000-0x0027a000

    stack   = 0x0026a000-0x0026c000

  init      = 0x0027a000-0x00298000

  bss       = 0x00298000-0x002ad798

  available = 0x002ad798-0x02b00000

  rootfs    = 0x02b00000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

On node 0 totalpages: 11008

  DMA zone: 86 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 10922 pages, LIFO batch:1

  Normal zone: 0 pages used for memmap

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 10922

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Kernel managed physical pages: 11008

Memory available: 40712k/65536k RAM, (120k init code, 1119k kernel code, 478k da

ta, 1024k dma, 22084k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (6 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (36 KB free)

Calibrating delay loop... 797.90 BogoMIPS (lpj=3989504)

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

PPP generic driver version 2.4.2

SMC_PROBE Flash address:20070000

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_

clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

uclinux[mtd]: RAM probe address=0x2b00000 size=0x1400000

Creating 1 MTD partitions on "RAM":

0x00000000-0x01400000 : "EXT2fs"

uclinux[mtd]: set EXT2fs:EXT2  to be root filesystem

BF5xx flash: probing 16-bit flash bus

BF5xx flash: Found 1 x16 devices at 0x0 in 16-bit bank

5xx write ofs=1000000

5xx write ofs=1000000

5xx write ofs=10000aa

5xx write ofs=2000000

5xx write ofs=2000000

5xx write ofs=20000aa

5xx write ofs=3000000

5xx write ofs=3000000

5xx write ofs=30000aa

Amd/Fujitsu Extended Query Table at 0x0040

BF5xx flash: CFI does not contain boot bank location. Assuming top.

number of CFI chips: 1

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

Using static partition definition

Creating 4 MTD partitions on "BF5xx flash":

0x00000000-0x00100000 : "Bootloader 1 MB"

0x00100000-0x00400000 : "Default Kernel 3 MB"

0x00400000-0x00c00000 : "VoIP Kernel 8 MB"

0x00c00000-0x01000000 : "JFFS2 4 MB"

ADI KeyPad Driver v1.10e

ADI Audio Driver v1.45e

Configuring Audio Ineterrupts...

Audio: IRQ 40 is installed successfully.

Audio: IRQ 12 is installed successfully.

Unbalanced enable for IRQ 40

Unbalanced enable for IRQ 12

Configuring Audio Ineterrupts completed

LcdDriver v1.10e

Core B Loader Module enabled

Aux Driver v 1.0e

Reset Button: IRQ 53 is installed successfully.

ResetDriver v1.0

test: dev (254:0)

rtc-test rtc-test.0: rtc core: registered test as rtc0

test: dev (254:1)

rtc-test rtc-test.1: rtc core: registered test as rtc1

rtc-bfin rtc-bfin: bfin_rtc_probe:400: here i am

rtc-bfin: dev (254:2)

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc2

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>

All bugs added by David S. Miller <davem@redhat.com>

Setting up Blackfin MMR debugfs

rtc-bfin rtc-bfin: bfin_rtc_read_time:307: here i am

rtc-bfin rtc-bfin: setting the system clock to 2009-12-09 00:35:45 (1260318945)

In ADI specific modified function: iput in file: fs/inode.c

************************************************************************/

 

RTC Settigns.bmp

QuoteReplyEditDelete

 

 

2009-12-06 05:44:44     Re: problem in setting hwclock from kernel/konsole

Nitin Goel (INDIA)

Message: 83123   

 

Hi All,

 

By making an entry of rtc2 with major/minor values as 254/0 in device_table.txt I am able to execute the command

 

"hwclock -w" but still when i reboot and check the date at bootloader it gives the same date as before setting. that means hwclock is not setting the date that I am setting from the konsole using "date -s" and then "hwclock -w"

 

please suggest where i am doing a blunder.

 

--Nitin

QuoteReplyEditDelete

 

 

2009-12-06 17:29:26     Re: problem in setting hwclock from kernel/konsole

Mike Frysinger (UNITED STATES)

Message: 83125   

 

please read the documentation:

  docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:dev-management

QuoteReplyEditDelete

 

 

2009-12-06 23:17:20     Re: problem in setting hwclock from kernel/konsole

Nitin Goel (INDIA)

Message: 83135   

 

Thanks Mike.

 

I have read the documentation, is that mean I need to make an entry in device_table-min.txt? I guess i should not as I am using 2008R1 release of Blackfin. and i have made an entry in device_table.txt already, but i am not sure about the correct major/minor numbers for /dev/rtc. i have tried with 254/0 and 10/234.

 

At startup I am able to retrieve the correct RTC time but not able to set using hwclock function that is for setting the current system time on the hardware RTC. please suggest.

 

--Nitin

QuoteReplyEditDelete

 

 

2009-12-07 01:03:52     Re: problem in setting hwclock from kernel/konsole

Mike Frysinger (UNITED STATES)

Message: 83138   

 

the troubleshooting section already tells you how to locate the correct major number for the device

 

hwclock by default operates on the *frist* rtc it finds.  you've enabled test rtc devices, so it's going to change the time in those, not the Blackfin rtc.

QuoteReplyEditDelete

 

 

2009-12-07 09:10:21     Re: problem in setting hwclock from kernel/konsole

Nitin Goel (INDIA)

Message: 83170   

 

Thanks Mike for your valuable suggesstions, the RTC is working fine now.

 

--Nitin

Attachments

Outcomes