This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CPTS Driver code for Vayu EVM

Other Parts Discussed in Thread: TLC59108, DS90UH928Q, DS90UH925Q, TVP5158

Hi,

I am using Vayu evm board,

 I am trying to do synchronization and syntonization of the cpts clock.Based on the timestamp of the cpts.

I face the following issue:

I have a negative offset to be adjusted with the cpts clock and I use the clock_adjtime system call but I find the call failing for all the negative value.

If I have a negative offset that is passed to the kernel the conversion of signed integer to unsigned integer gives me a problem

File : drivers/ptp/ptp_clock.c

static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx)
{
        struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
        struct ptp_clock_info *ops;
        int err = -EOPNOTSUPP;

        ops = ptp->info;

        if (tx->modes & ADJ_SETOFFSET) {
                struct timespec ts;
                ktime_t kt;
                s64 delta;

                ts.tv_sec  = tx->time.tv_sec;
                ts.tv_nsec = tx->time.tv_usec;

                if (!(tx->modes & ADJ_NANO))
                        ts.tv_nsec *= 1000;

             if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC)
                        return -EINVAL;

                kt = timespec_to_ktime(ts);
               delta = ktime_to_ns(kt);
                err = ops->adjtime(ops, delta);
        } else if (tx->modes & ADJ_FREQUENCY) {
                err = ops->adjfreq(ops, scaled_ppm_to_ppb(tx->freq));
                ptp->dialed_frequency = tx->freq;
        } else if (tx->modes == 0) {
                tx->freq = ptp->dialed_frequency;
                err = 0;
        }

        return err;
}

Then When the condition is omitted there is another issue in timespec_to_ktime function.

ktime has a structure,

union ktime {
        s64     tv64;
#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
        struct {
# ifdef __BIG_ENDIAN
        s32     sec, nsec;
# else  
        s32     nsec, sec;
# endif
        } tv;
#endif
};      

CONFIG_KTIME_SCALAR is 1 . This causes the ktime to have only tv64 and the function call doesn't have any meaning.

There is no other way to adjust the clock, Please suggest me of any solution that would help.

Thanks and Regards,

Sarah Blessie Rajendran

  • Hi Sarah,

    Looks like the 1st problem is in  type casting.

    ts.tv_nsec  is long type. When it has negative value minus sign uses most significant bit of the number. After casting negative long number to unsigned long, it's value becomes very big about 2^31(while NSEC_PER_SEC is 1000000000L, i.e. ~2^28) and we fall into return -EINVAL; in the if condition.

    So, here you may use casting to signed type or eliminate the minus in a different manner.

    BR,

    Georgi

  • Hi Georgi,

                      Yes the first issue is the unsigned conversion!! I have removed it and have done the following changes in the kernel for the synchronization!!

         struct timespec ts;

                   ktime_t kt;

                   s64 delta;

                   ts.tv_sec  = tx->time.tv_sec;

                   ts.tv_nsec = tx->time.tv_usec;

                   if (!(tx->modes & ADJ_NANO))

                           ts.tv_nsec *= 1000;

                /*if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC)

                           return -EINVAL;*/

       /*            kt = timespec_to_ktime(ts);

                   delta = ktime_to_ns(kt);*/

                delta = (s64) ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;

                   err = ops->adjtime(ops, delta);

    Now my synchronization works fine !! need to know if it is correct !!

    Thanks,

     Sarah

  • Yes,

    looks like with

    delta = (s64) ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;

    you do the same as the commented code, excepting unsigned long casting.

    Georgi

  • Yes ! That is exactly the same thing i do.

    Can you tell me is it ok to do so?

    Regards,

    Sarah

  • There are some checks for maximum allowable values of time in timespec_to_ktime(), so the better idea is to keep these checks,

    as well (ts.tv_nsec >= NSEC_PER_SEC) check.

    For the delta value the origin expression from timespec_to_ktime() is

    (s64)secs * NSEC_PER_SEC + (s64)nsecs

    correct your expression accordingly.

    BR,

    Georgi

  • Thanks Georgi, I will do the correction accordingly
    1. I will add the check for the maximum allowavable nanoseconds.

    2. but If you see ,I have told you in the first post there is issue with
    timespec_to_ktime()
    ktime has a structure,

    union ktime {
    s64 tv64;
    #if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
    struct {
    # ifdef __BIG_ENDIAN
    s32 sec, nsec;
    # else
    s32 nsec, sec;
    # endif
    } tv;
    #endif
    };

    CONFIG_KTIME_SCALAR is 1 . This causes the ktime to have only tv64 , so the function becomes meeningless. can this function work or simply can I ommit it

    Regards,
    Sarah
  • Hi,

        I am using Vayu EVM revision G board booted with file system from GLSDK 6.04. This has the hwclock showing error. Please Explain.

    Following are the bootlogs attached

    [    0.504028] Switching to clocksource arch_sys_counter

    [    0.575592] NET: Registered protocol family 2

    [    0.576660] TCP established hash table entries: 8192 (order: 4, 65536 bytes)

    [    0.576934] TCP bind hash table entries: 8192 (order: 6, 294912 bytes)

    [    0.579589] TCP: Hash tables configured (established 8192 bind 8192)

    [    0.579681] TCP: reno registered

    [    0.579711] UDP hash table entries: 512 (order: 3, 40960 bytes)

    [    0.580047] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)

    [    0.580780] NET: Registered protocol family 1

    [    0.581542] RPC: Registered named UNIX socket transport module.

    [    0.581542] RPC: Registered udp transport module.

    [    0.581542] RPC: Registered tcp transport module.

    [    0.581542] RPC: Registered tcp NFSv4.1 backchannel transport module.

    [    0.582885] NetWinder Floating Point Emulator V0.97 (double precision)

    [    0.584381] platform omap-rproc.0: platform_device for rproc dsp1 created

    [    0.584686] platform omap-rproc.1: platform_device for rproc ipu2 created

    [    0.584991] platform omap-rproc.2: platform_device for rproc dsp2 created

    [    0.585296] platform omap-rproc.3: platform_device for rproc ipu1 created

    [    0.705139] bounce pool size: 64 pages

    [    0.705535] VFS: Disk quotas dquot_6.5.2

    [    0.705688] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

    [    0.707366] NFS: Registering the id_resolver key type

    [    0.707611] Key type id_resolver registered

    [    0.707611] Key type id_legacy registered

    [    0.707702] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.

    [    0.708099] msgmni has been set to 1374

    [    0.710052] io scheduler noop registered (default)

    [    0.710052] io scheduler deadline registered

    [    0.710144] io scheduler cfq registered

    [    0.714569] OMAP DSS rev 6.1

    [    0.721405] omapdss HDMI: init_sel_i2c_hdmi: CM_L4PER2_CLKSTCTRL 0xc0010002

    [    0.721771] ldo3: operation not allowed

    [    0.721771] omapdss HDMI error: can't set the voltage regulator

    [    0.722625] omapdss: hdmi_panel_probe x_res= 640 y_res = 480

    [    0.746643] tlc59108 0-0040: Successfully initialized tlc59108

    [    0.748443] dserlink 1-002c: probe error 0 for 'ds90uh928q'

    [    0.748779] serlink 1-001b: probe error 0 for 'ds90uh925q'

    [    0.749023] lg101 display3: lg101_probe probe

    [    0.749084] lg101 display3: child device populate

    [    0.749114] lg101 display3: Serial I2C ID 1b

    [    0.749145] lg101 display3: DeSerial I2C ID 2c

    [    0.749420] lg101 display3: Serializer Reset done...

    [    0.749450] serlink 1-001b: 1. client ptr eac85c00 i2c addr 1b

    [    0.749572] serlink 1-001b: config 0 : 0xab

    [    0.749725] serlink 1-001b: config 1 : 0x8a

    [    0.749877] serlink 1-001b: datacontol 1 : 0x40

    [    0.749877] lg101 display3: Serializer configuration done...

    [    0.750061] lg101 display3: PCLK detection done...

    [    0.750274] lg101 display3: Serializer i2c addr 1b ...

    [    0.750488] lg101 display3: link not preset ...

    [    0.750488] omapdss CORE error: driver probe failed: -22

    [    0.750518] lg101: probe of display3 failed with error -22

    [    0.750701] i2c /dev entries driver

    [    0.753784] ov1063x 1-0037: No deserializer node found

    [    0.753936] ov1063x 1-0037: No serializer node found

    [    0.754058] ov1063x 1-0037: Failed writing register 0x0103!

    [    0.754089] ov1063x: probe of 1-0037 failed with error -121

    [    0.754486] ov1063x 1-0030: No deserializer node found

    [    0.754791] ov1063x 1-0030: No serializer node found

    [    0.754913] ov1063x 1-0030: Failed writing register 0x0103!

    [    0.754974] ov1063x: probe of 1-0030 failed with error -121

    [    0.756958] tvp5158 1-0058: Camera not connected

    [    0.757324] fpdlink 1-0020: Camera sensor driver registered

    [    0.758361] vpe vpe.12: Device registered as /dev/video0

    [    0.758789] vpe vpe.12: loading firmware vpdma-1b8.fw

    [    0.759918] dra7xx-vip vip1-0: Waiting for I2C subdevice 37

    [    0.759948] dra7xx-vip vip1-0: Waiting for I2C subdevice 30dra7xx-vip vip1-0: Waiting for I2C subdevice 38

    [    0.760040] dra7xx-vip vip1-0: Waiting for I2C subdevice 58dra7xx-vip vip1-0: Waiting for I2C subdevice 20

    [    0.760803] dra7xx-vip vip1-0: dra7xx-vip Device registered as /dev/video1

    [    0.760833] dra7xx-vip vip1-0: Using sensor i2c addr 20 for capture

    [    0.760955] dra7xx-vip vip1-1: Waiting for I2C subdevice 39

    [    0.761322] dra7xx-vip vip3-0: Waiting for I2C subdevice 3b

    [    0.761383] dra7xx-vip vip3-1: Waiting for I2C subdevice 3d[    0.776428] brd: module loaded

    [    0.784698] loop: module loaded

    [    0.785217] (stk) :sysfs entries created

    [    0.785308] (stk) : debugfs entries created

    [    0.785583] (hci_tty): inside hci_tty_init

    [    0.786193] (hci_tty): allocated 250, 0

    [    0.786346] gccore gccore.0: opp_get_opp_count: device OPP not found (-19)

    [    0.805999] platform 4ae07ddc.regulator-abb-mpu: Driver ti_abb requests probe deferral

    [    0.806091] platform 4ae07e24.regulator-abb-ivahd: Driver ti_abb requests probe deferral

    [    0.806182] platform 4ae07e20.regulator-abb-dspeve: Driver ti_abb requests probe deferral

    [    0.806243] platform 4ae07de4.regulator-abb-gpu: Driver ti_abb requests probe deferral

    [    0.807678] 4a003b18.regulator-avs: 1090 <--> 1280 mV at 1090 mV

    [    0.808441] tiavs_class0 4a0025ec.regulator-avs: No match regulator V=1030000

    [    0.808624] tiavs_class0: probe of 4a0025ec.regulator-avs failed with error -22

    [    0.809600] 4a003b00.regulator-avs: 1090 <--> 1280 mV at 1090 mV

    [    0.810577] 4a0025d8.regulator-avs: 1055 <--> 1250 mV at 1055 mV

    [    0.811614] 4a0025c4.regulator-avs: 1055 <--> 1250 mV at 1055 mV

    [    0.812438] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

    [    0.815704] omap_uart 4806a000.serial: did not get pins for uart0 error: -19

    [    0.815917] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0

    [    1.224426] omapdss: in hpd work 1, state=0

    [    1.235839] hpd 0

    [    1.248046] omapdss: hdmi_hotplug_detect_worker state = 1

    [    1.248229] omapdss HDMI: hdmi_read_valid_edid: CM_DSS_CLKSTCTRL 62b02

    [    1.376800] omapdss HDMI: failed to read E-EDID: wrong header

    [    1.376831] omapdss: in hpd work 0, state=0

    [    1.376831] omapdss: hdmi_hotplug_detect_worker state = 0

    [    1.749511] console [ttyO0] enabled

    [    1.753936] omap_uart 4806c000.serial: did not get pins for uart1 error: -19

    [    1.761535] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1

    [    1.770111] omap_uart 48020000.serial: did not get pins for uart2 error: -19

    [    1.777740] 48020000.serial: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2

    [    1.786254] omap_uart 4806e000.serial: did not get pins for uart3 error: -19

    [    1.793975] 4806e000.serial: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3

    [    1.802490] omap_uart 48066000.serial: did not get pins for uart4 error: -19

    [    1.810180] 48066000.serial: ttyO4 at MMIO 0x48066000 (irq = 137) is a OMAP UART4

    [    1.818664] omap_uart 48068000.serial: did not get pins for uart5 error: -19

    [    1.826385] 48068000.serial: ttyO5 at MMIO 0x48068000 (irq = 138) is a OMAP UART5

    [    1.835968] [drm] Initialized drm 1.1.0 20060810

    [    1.842773] mtdoops: mtd device (mtddev=name/number) must be supplied

    [    1.850311] OneNAND driver initializing

    [    1.858032] m25p80 spi32766.0: s25fl256s1 (32768 Kbytes)

    [    1.867980] CAN device driver interface

    [    1.872497] c_can_platform 4ae3c000.d_can: flags recorded (0x5)

    [    1.887542] omap_hwmod: dcan1: _wait_target_disable failed

    [    1.893585] c_can_platform 4ae3c000.d_can: c_can_platform device registered (regs=fce3c000, irq=113)

    [    1.903442] c_can_platform 48480000.d_can: flags recorded (0x6)

    [    1.910919] c_can_platform 48480000.d_can: c_can_platform device registered (regs=f01bc000, irq=114)

    [    1.923217] usbcore: registered new interface driver asix

    [    1.929199] usbcore: registered new interface driver cdc_ether

    [    1.935668] usbcore: registered new interface driver smsc95xx

    [    1.942016] usbcore: registered new interface driver net1080

    [    1.948181] usbcore: registered new interface driver cdc_subset

    [    1.954711] usbcore: registered new interface driver zaurus

    [    1.960937] usbcore: registered new interface driver cdc_ncm

    [    1.967590] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

    [    1.974578] ehci-omap: OMAP-EHCI Host Controller driver

    [    1.981109] usbcore: registered new interface driver cdc_wdm

    [    1.987060] Initializing USB Mass Storage driver...

    [    1.992492] usbcore: registered new interface driver usb-storage

    [    1.998901] USB Mass Storage support registered.

    [    2.004028] usbcore: registered new interface driver usbtest

    [    2.011047] mousedev: PS/2 mouse device common for all mice

    [    2.018554] atmel_mxt_ts 0-004a: __mxt_read_reg: i2c transfer failed (-121)

    [    2.026000] atmel_mxt_ts: probe of 0-004a failed with error -121

    [    2.035736] Driver for 1-wire Dallas network protocol.

    [    2.043426] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec

    [    2.054718] (stc):  chnl_id list empty :4

    [    2.058898] (stk) : st_kim_start[    2.061218] omap-dma-engine 4a056000.dma-controller: allocating channel for 62

    [    2.061279] omap-dma-engine 4a056000.dma-controller: allocating channel for 61

    [    2.078430] omap_hsmmc 4809c000.mmc: pins are not configured from the driver

    [    2.129699] omap-dma-engine 4a056000.dma-controller: allocating channel for 48

    [    2.137390] omap-dma-engine 4a056000.dma-controller: allocating channel for 47

    [    2.148315] omap_hsmmc 480b4000.mmc: pins are not configured from the driver

    [    2.182891] (stk) :ldisc_install = 1[    2.199768] omap-dma-engine 4a056000.dma-controller: allocating channel for 58

    [    2.207458] omap-dma-engine 4a056000.dma-controller: allocating channel for 57

    [    2.215301] omap_hsmmc 480d1000.mmc: pins are not configured from the driver

    [    2.250366] mmc0: host does not support reading read-only switch. assuming write-enable.

    [    2.262451] mmc0: new high speed SD card at address e624

    [    2.269195] mmcblk0: mmc0:e624 SU02G 1.84 GiB

    [    2.277069]  mmcblk0: p1 p2

    [    2.333343] ledtrig-cpu: registered to indicate activity on CPUs

    [    2.338348] mmc1: BKOPS_EN bit is not set

    [    2.341796] mmc1: new high speed DDR MMC card at address 0001

    [    2.350097] mmcblk1: mmc1:0001 MMC08G 7.25 GiB

    [    2.350830] usbcore: registered new interface driver usbhid

    [    2.350830] usbhid: USB HID core driver

    [    2.351440] platform 4a0021e0.bandgap: Driver ti-soc-thermal requests probe deferral

    [    2.373229] mmcblk1boot0: mmc1:0001 MMC08G partition 1 8.00 MiB

    [    2.374389] omap_rproc_probe: ioremap_nocache(0x40800000, 0x40000)

    [    2.374420] omap_rproc_probe: ioremap_nocache(0x40e00000, 0x8000)

    [    2.374450] omap_rproc_probe: ioremap_nocache(0x40f00000, 0x8000)

    [    2.374511]  remoteproc0: dsp1 is available

    [    2.374511]  remoteproc0: Note: remoteproc is still under development and considered experimental.

    [    2.374511]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

    [    2.375213]  remoteproc1: ipu2 is available

    [    2.375213]  remoteproc1: Note: remoteproc is still under development and considered experimental.

    [    2.375244]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

    [    2.375457] omap_rproc_probe: ioremap_nocache(0x41000000, 0x40000)

    [    2.375488] omap_rproc_probe: ioremap_nocache(0x41600000, 0x8000)

    [    2.375488] omap_rproc_probe: ioremap_nocache(0x41700000, 0x8000)

    [    2.375549]  remoteproc2: dsp2 is available

    [    2.375549]  remoteproc2: Note: remoteproc is still under development and considered experimental.

    [    2.375549]  remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

    [    2.375762]  remoteproc3: ipu1 is available

    [    2.375793]  remoteproc3: Note: remoteproc is still under development and considered experimental.

    [    2.375793]  remoteproc3: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

    [    2.517303] davinci-mcasp 48468000.mcasp: data port resource not defined, cfg port will be used

    [    2.517517] mmcblk1boot1: mmc1:0001 MMC08G partition 2 8.00 MiB

    [    2.533966]  mmcblk1: unknown partition table

    [    2.540496]  mmcblk1boot1: unknown partition table

    [    2.547210]  mmcblk1boot0: unknown partition table

    [    2.574218] dra7-evm-sound sound.19:  tlv320aic3x-hifi <-> 48468000.mcasp mapping ok

    [    2.583770] dra7-evm-sound sound.19: 48474000.mcasp is shared with radio

    [    2.591766] dra7-evm-sound sound.19:  multicodec <-> 48474000.mcasp mapping ok

    [    2.601013] dra7-evm-sound sound.19:  snd-soc-dummy-dai <-> 48478000.mcasp mapping ok

    [    2.617706] omap-hdmi-audio-card sound_hdmi.20:  omap-hdmi-hifi <-> omap-hdmi-audio mapping ok

    [    2.629486] oprofile: no performance counters

    [    2.635070] oprofile: using timer interrupt.

    [    2.639984] TCP: cubic registered

    [    2.643463] Initializing XFRM netlink socket

    [    2.648040] NET: Registered protocol family 17

    [    2.652832] NET: Registered protocol family 15

    [    2.657501] can: controller area network core (rev 20120528 abi 9)

    [    2.664184] NET: Registered protocol family 29

    [    2.668914] can: raw protocol (rev 20120528)

    [    2.673461] can: broadcast manager protocol (rev 20120528 t)

    [    2.679656] Bluetooth: RFCOMM TTY layer initialized

    [    2.684875] Bluetooth: RFCOMM socket layer initialized

    [    2.690307] Bluetooth: RFCOMM ver 1.11

    [    2.694305] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

    [    2.699920] Bluetooth: BNEP socket layer initialized

    [    2.705169] Bluetooth: HIDP (Human Interface Emulation) ver 1.2

    [    2.711456] Bluetooth: HIDP socket layer initialized

    [    2.716888] 8021q: 802.1Q VLAN Support v1.8

    [    2.721435] Key type dns_resolver registered

    [    2.725982] NET: Registered protocol family 40

    [    2.731018] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0

    [    2.739685] cpufreq-cpu0 cpufreq-cpu0.0: cpu0 regulator not ready, retry

    [    2.746826] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral

    [    2.754730] Power Management for TI OMAP4PLUS devices.

    [    2.760345] ThumbEE CPU extension supported.

    [    2.768035] abb_mpu: 1090 <--> 1280 mV

    [    2.773864] abb_ivahd: 1055 <--> 1250 mV

    [    2.779632] abb_dspeve: 1055 <--> 1250 mV

    [    2.785522] abb_gpu: 1090 <--> 1280 mV

    [    2.790863] platform 4a0021e0.bandgap: Driver ti-soc-thermal requests probe deferral

    [    2.807128] dmm 4e000000.dmm: initialized all PAT entries

    [    2.816192] omapdrm omapdrm.0: fpdlink has no driver.. skipping it

    [    2.823638] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).

    [    2.830657] [drm] No driver support for vblank timestamp query.

    [    2.841857] [drm] Enabling DMM ywrap scrolling

    [    2.850280] Console: switching to colour frame buffer device 100x30

    [    2.858581] omapdrm omapdrm.0: fb0: omapdrm frame buffer device

    [    2.864837] omapdrm omapdrm.0: registered panic notifier

    [    2.870452] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0

    [    2.933868] davinci_mdio 48485000.mdio: davinci mdio revision 1.6

    [    2.940307] davinci_mdio 48485000.mdio: detected phy mask fffffff3

    [    2.948394] libphy: 48485000.mdio: probed

    [    2.952667] davinci_mdio 48485000.mdio: phy[2]: device 48485000.mdio:02, driver unknown

    [    2.961181] davinci_mdio 48485000.mdio: phy[3]: device 48485000.mdio:03, driver unknown

    [    2.969787] Missing dual_emac_res_vlan in DT.

    [    2.974456] Using 1 as Reserved VLAN for 0 slave

    [    2.979400] Missing dual_emac_res_vlan in DT.

    [    2.984039] Using 2 as Reserved VLAN for 1 slave

    [    2.988983] Detected MACID = 7c:66:9d:f1:b6:14

    [    2.995239] Failed to clk_get cpsw_cpts_rft_clk

    [    3.000274] cpsw: Detected MACID = 7c:66:9d:f1:b6:15

    [    3.006896] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

    [    3.013854] ALSA device list:

    [    3.016967]   #0: dra7evm

    [    3.019744]   #1: OMAP5HDMI

    [    3.025604] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)

    [    3.036590] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (244)

    [    3.183898] (stk) :ldisc installation timeout

    [    3.188323] (stk) :ldisc_install = 0[    3.268554] EXT4-fs (mmcblk0p2): recovery complete

    [    3.275451] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)

    [    3.284057] VFS: Mounted root (ext4 filesystem) on device 179:2.

    [    3.292083] devtmpfs: mounted

    [    3.295471] Freeing init memory: 380K

    INIT: version 2.88 booting

    Starting udev

    [    3.857391] udevd[1147]: starting version 182

    [    4.191833] (stk) : timed out waiting for ldisc to be un-installed

    [    4.305358] (stk) :ldisc_install = 1[    4.636871] dra7xx-vip 48970000.vip: loading firmware vpdma-1b8.fw

    [    5.223907]  remoteproc2: failed to load dra7-dsp2-fw.xe66

    [    5.257995]  remoteproc3: failed to load dra7-ipu1-fw.xem4

    [    5.308898] (stk) :ldisc installation timeout

    [    5.313354] (stk) :ldisc_install = 0 remoteproc0: powering up dsp1

    [    5.345367]  remoteproc0: Booting fw image dra7-dsp1-fw.xe66, size 930703

    [    5.395141] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

    [    5.401519] omap-iommu omap-iommu.0: mmu0_dsp1: version 3.0

    [    5.407531] omap-iommu omap-iommu.1: mmu1_dsp1: version 3.0

    [    5.557098] HDCP: failed to load keys

    [    5.557098]

    [    5.942779]  remoteproc1: powering up ipu2

    [    5.947113]  remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3357588

    [    5.965759] omap-iommu omap-iommu.5: mmu_ipu2: version 2.1

    [    6.034545] omap mailbox rev 0x400

    [    6.042907]  remoteproc0: remote processor dsp1 is now up

    [    6.070159] virtio_rpmsg_bus virtio0: rpmsg host is online

    [    6.076202]  remoteproc0: registered virtio0 (type 7)

    [    6.081695] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x36

    [    6.094604] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x37

    [    6.110443] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x3b

    [    6.119873] rpmsg_rpc rpmsg2: probing service rpmsg-dce-dsp with src 1024 dst 59

    [    6.133911] rpmsg_rpc rpmsg2: publised functions = 8

    [    6.174224] omap mailbox rev 0x400

    [    6.178253]  remoteproc1: remote processor ipu2 is now up

    [    6.184600] virtio_rpmsg_bus virtio1: rpmsg host is online

    [    6.190399]  remoteproc1: registered virtio1 (type 7)

    [    6.316741] (stk) : timed out waiting for ldisc to be un-installed

    [    6.430084] (stk) :ldisc_install = 1[    6.581573] virtio_rpmsg_bus virtio1: creating channel rpmsg-client-sample addr 0x32

    [    6.590423] virtio_rpmsg_bus virtio1: creating channel rpmsg-client-sample addr 0x33

    [    6.601409] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x3b

    [    6.614746] rpmsg_rpc rpmsg5: probing service rpmsg-dce with src 1024 dst 59

    [    6.624237] rpmsg_rpc rpmsg5: publised functions = 8

    UIM SYSFS Node Found at /sys/./devices/kim.22/install

    Starting uim-sysfs daemon.

    uim:@ main

    uim:install = /sys/./devices/kim.22/install

    uim:dev_name = /sys/./devices/kim.22/dev_name

    uim:baud_rate = /sys/./devices/kim.22/baud_rate

    uim:flow_cntrl = /sys/./devices/kim.22/flow_cntrl

    uim:install set previously...

    uim:@ st_uart_config

    uim: signal received, opening /dev/ttyO2

    uim:@ set_baud_rate

    uim:set_baud_rate() done

    uim:Setting speed to 3686400

    uim:@ read_command_complete

    uim: Command complete started

    uim:@ read_hci_event

    uim: read_hci_event

    Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory

    bootlogd.

    [    7.395324] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

    uim:Invalid response

    [    7.433898] (stk) :ldisc installation timeout

    [    7.438323] (stk) :ldisc_install = 0uim:begin polling...

    uim:poll broke due to event 10(PRI:2/ERR:8)

    uim:read 0 from install

    uim:@ st_uart_config

    uim:Un-Installed N_TI_WL Line displine

    uim:begin polling...

    ALSA: Restoring mixer settings...

    Configuring network interfaces... [    8.004333] net eth0: initializing cpsw version 1.15 (0)

    [    8.013519] net eth0: phy found : id is : 0x20005c7a

    [    8.023620] 8021q: adding VLAN 0 to HW filter on device eth0

    udhcpc (v1.20.2) started

    [    8.116577] omap_hwmod: dcan1: _wait_target_disable failed

    Sending discover...

    [    8.441711] (stk) : timed out waiting for ldisc to be un-installed

    [    8.555053] (stk) :ldisc_install = 1uim:poll broke due to event 10(PRI:2/ERR:8)

    uim:read 1 from install

    uim:@ st_uart_config

    uim: signal received, opening /dev/ttyO2

    uim:@ set_baud_rate

    uim:set_baud_rate() done

    uim:Setting speed to 3686400

    uim:@ read_command_complete

    uim: Command complete started

    uim:@ read_hci_event

    uim: read_hci_event

    uim:Invalid response

    (stk) :ldisc installation timeout

    [    9.561920] (stk) :ldisc_install = 0[   10.013214] libphy: 48485000.mdio:02 - Link is Up - 100/Full

    [   10.558898] (stk) : timed out waiting for ldisc to be un-installed

    [   10.672271] (stk) :ldisc_install = 1Sending discover...

    Sending select for 172.16.7.121...

    Lease of 172.16.7.121 obtained, lease time 14400

    [   11.415710] omap_hwmod: dcan1: _wait_target_disable failed

    /etc/udhcpc.d/50default: Adding DNS 172.16.4.100

    done.

    Starting rpcbind daemon...rpcbind: cannot create socket for udp6

    rpcbind: cannot create socket for tcp6

    done.

    [   11.593719] omap_hwmod: dcan1: _wait_target_disable failed

    hwclock: can't open '/dev/misc/rtc': No such file or directory

    Tue Apr 15 03:12:00 UTC 2014

    hwclock: can't open '/dev/misc/rtc': No such file or directory

    INIT: Entering runlevel: 5

    [   11.676086] (stk) :ldisc installation timeout

    [   11.680511] (stk) :ldisc_install = 0Starting system message bus: dbus.

    Starting OpenBSD Secure Shell server: sshd

    done.

    Starting telnet daemon.

    hwclock: can't open '/dev/misc/rtc': No such file or directory

    creating NFS state directory: done

    starting 8 nfsd kernel threads: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).

    Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem

    done

    starting mountd: [   12.140228] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.154998] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.168914] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.182830] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.201385] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.217590] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.231597] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.245544] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.259429] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.273345] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.287200] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.301147] omap_hwmod: dcan1: _wait_target_disable failed

    done

    starting statd: [   12.361053] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.375885] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.390686] omap_hwmod: dcan1: _wait_target_disable failed

    [   12.405487] omap_hwmod: dcan1: _wait_target_disable failed

    done

    Starting syslogd/klogd: done

    Starting thttpd.

    Stopping Bootlog daemon: bootlogd.

    [   12.683898] (stk) : timed out waiting for ldisc to be un-installed

    [   12.797271] (stk) :ldisc_install = 1

    _____                    _____           _         _  

    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_

    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|

    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  

                 |___|                    |___|            

    Arago Project dra7xx-evm ttyO0

    Arago 2013.10 dra7xx-evm ttyO0

    Thanks and Regards,

    Sarah Blessie

  • Hi Sarah,

    sorry for delay.
    Regarding to timespec_to_ktime() function meaningless: Can you please specify what kernel version do you use?

    Regarding to hwclock showing error, if it is not directly depend on previous issue, it is better to open another thread for this issue.

    BR,
    Georgi
  • Thanks Georgi, I have opened a new thread for the issue. I am using 3.8 Kernel version
  • Hi,

    the input parameter of timespec_to_ktime() function is  struct timespec ts

    and then it invokes ktime_set() function with the same input parameter type:

    static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
    
    {
    
    #if (BITS_PER_LONG == 64)
    
          if (unlikely(secs >= KTIME_SEC_MAX))
    
                   return (ktime_t){ .tv64 = KTIME_MAX };
    
    #endif
    
            return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
    
    }

    Why it is meaningless for you?

    BR,

    Georgi