PCMCIA and ATA initialization - VxWorks

This is a discussion on PCMCIA and ATA initialization - VxWorks ; We've been developing a proprietary MPC860 (PowerPC) board under VxWorks version 5.5.1. The board includes a PCMCIA slot in which we're using compact flash supported by the PCMCIA and ATA drivers, and DosFS2. As supplied, both target/config/all/usrConfig.c:usrRoot() and initGroup usrIosExtraInit ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: PCMCIA and ATA initialization

  1. PCMCIA and ATA initialization

    We've been developing a proprietary MPC860 (PowerPC) board under VxWorks
    version 5.5.1. The board includes a PCMCIA slot in which we're using
    compact flash supported by the PCMCIA and ATA drivers, and DosFS2.

    As supplied, both target/config/all/usrConfig.c:usrRoot() and initGroup
    usrIosExtraInit defined in target/config/comps/vxworks/00vxworks.cdf
    attempt to initialize the ATA driver before the PCMCIA driver. This
    fails because the ATA driver expects the PCMCIA driver to have been
    already initialized.

    We have worked around these problems by copying usrConfig.c to our BSP
    directory, moving the PCMCIA initialization to before the ATA, and adding
    "USERCONFIG = usrConfig.c" to the BSP Makefile; and by creating a new
    file target/config/comps/vxworks/02vxworks.cdf that contains only
    initGroup usrIoxExtraInit with INCLUDE_PCMCIA moved to before INCLUDE_ATA.

    These changes do work but seem less than ideal. It is documented that
    BSPs should use local copies of target/config/all files only during
    development and the additional CDF file seems subject to future problems
    when upgrading to later versions of VxWorks.

    Can anybody suggest better solutions?

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

  2. Re: PCMCIA and ATA initialization

    Hi,

    It seems to be an issue with the initialization order and I believe
    you are on the right path expect with the fact that my assumption is
    that you only need to touch cdf file that means creating a new
    file target/config/comps/vxworks/02vxworks.cdf that contains only
    initGroup usrIoxExtraInit with INCLUDE_PCMCIA moved to before
    INCLUDE_ATA should solve this issue. Is that not the case?

    There could be one more workaound to this but that would require
    change in bsp.cdf and you need another version of bsp.cdf in that case
    so better would be to have 02vxworks.cdf as you already did. I believe
    cdf files are the idle place to fix these kind of issues.

    Best Regards
    VKG | Ritsoft Technologies

  3. Re: PCMCIA and ATA initialization

    VKG Ritsoft Technologies wrote:

    >Hi,
    >
    >It seems to be an issue with the initialization order and I believe
    >you are on the right path expect with the fact that my assumption is
    >that you only need to touch cdf file that means creating a new
    >file target/config/comps/vxworks/02vxworks.cdf that contains only
    >initGroup usrIoxExtraInit with INCLUDE_PCMCIA moved to before
    >INCLUDE_ATA should solve this issue. Is that not the case?


    Altering initGroup usrIosExtraInit with a new CDF file fixed the problem
    for bootable vxWorks images as configured in Tornado but did nothing for
    boot ROMs built using the BSP Makefile. Because we want to be able to
    use the Compact Flash card as a bootable device we also had to change the
    initialization order in usrConfig.c:usrRoot().

    >There could be one more workaound to this but that would require
    >change in bsp.cdf and you need another version of bsp.cdf in that case
    >so better would be to have 02vxworks.cdf as you already did. I believe
    >cdf files are the idle place to fix these kind of issues.


    I agree that CDF files are the place to fix such problems, but I am
    concerned about creating latent problems. For example, we are also in
    the process of transitioning to Workbench 2.6.1/VxWorks 6.5. I have
    been tasked with porting this BSP to the new products and, as part of
    this effort, I had to remember to copy 02vxworks.cdf to the Workbench
    version of target/config/comps/vxworks. This would be very easy to miss
    months or years in the future which would likely result in somebody
    having to again debug the initialization order issue.

    This problem would be avoided if the new CDF file was created in the
    board's BSP directory and this was part of our original approach but
    this had the astonishing effect of eliminating DosFS2 components from
    Tornado's project configuration tool!

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

  4. Re: PCMCIA and ATA initialization

    Hi,

    In that case I think you can follow other workaround that I haven't
    written in my last mail.
    Please see the details below. May be this resolves your issue.

    in target\config\comps\vxWorks folder you will see 00bsp.cdf

    Open it and locate following

    Component INCLUDE_PCMCIA {
    NAME PCMCIA
    SYNOPSIS PCMCIA components
    CONFIGLETTES usrPcmcia.c
    INIT_RTN pcmciaInit ();
    HDR_FILES drv/pcmcia/pcmciaLib.h
    }

    Create a new bsp.cdf version and overwirte INCLUDE_PCMCIA component as
    follows.

    Component INCLUDE_PCMCIA {
    NAME PCMCIA
    SYNOPSIS PCMCIA components
    _INIT_ORDER usrIosExtraInit
    INIT_BEFORE INCLUDE_ATA
    CONFIGLETTES usrPcmcia.c
    INIT_RTN pcmciaInit ();
    HDR_FILES drv/pcmcia/pcmciaLib.h
    }

    Keep this new version in your bsp folder and see if this helps.

    Best Regards
    VKG | Ritsoft Technologies

  5. Re: PCMCIA and ATA initialization

    Forget to mention that you need to give correct number to bsp.cdf. For
    example 02bsp.cdf will take precedence over 01bsp.cdf. So first check
    the max bsp.cdf number already existing. And you just need to
    overwrite this component, no need to copy entier content of 00bsp.pdf.

    Best Regards
    VKG | Ritsoft Technologies

+ Reply to Thread