VxWorks - ATA and PCMCIA driver - VxWorks

This is a discussion on VxWorks - ATA and PCMCIA driver - VxWorks ; Hi, I would like to know, whether TFFS drivers can be used for the ATA devices also? I have sndisc compact flash device. In linux, we can write a IDE drivers, is there anything similar in vxworks? Is TFFS can ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: VxWorks - ATA and PCMCIA driver

  1. VxWorks - ATA and PCMCIA driver

    Hi,

    I would like to know, whether TFFS drivers can be used for the ATA
    devices also? I have sndisc compact flash device. In linux, we can
    write a IDE drivers, is there anything similar in vxworks?

    Is TFFS can be used for both PCMCI mode and IDE mode as well? If we
    cant, then what type device driver is for ATA or IDE devices?

    Thanks,
    MB.


  2. Re: VxWorks - ATA and PCMCIA driver

    I'm not sure TFFS is appropriate for a CF device. I use a CF device
    with vxWorks, and it works with the ATA driver with the DOSFS file
    system, formatted for fat or fat16.

    LC
    MB wrote:
    > Hi,
    >
    > I would like to know, whether TFFS drivers can be used for the ATA
    > devices also? I have sndisc compact flash device. In linux, we can
    > write a IDE drivers, is there anything similar in vxworks?
    >
    > Is TFFS can be used for both PCMCI mode and IDE mode as well? If we
    > cant, then what type device driver is for ATA or IDE devices?
    >
    > Thanks,
    > MB.



  3. Re: VxWorks - ATA and PCMCIA driver


    MB wrote:

    >> I would like to know, whether TFFS drivers can be used for the ATA
    >> devices also? I have sndisc compact flash device. In linux, we
    >> can write a IDE drivers, is there anything similar in vxworks?
    >>
    >> Is TFFS can be used for both PCMCI mode and IDE mode as well? If
    >> we cant, then what type device driver is for ATA or IDE devices?


    On 8 Aug 2006, larry@ciummo.com wrote:
    > I'm not sure TFFS is appropriate for a CF device. I use a CF device
    > with vxWorks, and it works with the ATA driver with the DOSFS file
    > system, formatted for fat or fat16.


    The major purpose of TFFS is wear leveling. The ATA driver is simply
    a regular vxWorks driver with read/write/ioctl. You have to have
    ioctls like seek, etc. There is no "ATA" or "IDE" type driver.
    However, DosFs comes with an ATA driver already (or it is bundled with
    vxWorks).

    "http://www.google.ca/search?q=ataDrv"

    It would be really redundant (and possibly error prone) to use TFFS on
    top of an ATA flash card. See Leonid (DosFs author) comments on ATA
    versus NOR flash and TFFS.

    "http://www.xs4all.nl/~borkhuis/vxworks/mcp750.html#mcp750.2-A"
    "http://www.xs4all.nl/~borkhuis/vxworks/vxw_pt3.html#3.1-F"
    and others...

    hth,
    Bill Pringlemeir.

    --
    Keep an open mind. But not so open your brains fall out. - Kallis' Law
    vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"

  4. Re: VxWorks - ATA and PCMCIA driver

    Just to clarify, if you want to use an ATA device, you should ataDrv,
    which is provided with most vxWorks distributions. ataDrv requires
    register level access to the ata device itself. If you are using
    something like a PCMCIA or CF type ATA device, you will be bridging
    between a CARDBUS type interface and an ATA device. Most CARDBUS
    devices have a mode that allows you to put the CARBUS into an ATA
    emulation mode. To get into this mode, I use sysAta.c, which is
    written for this purpose, but must be customized for the specific type
    of bridge chip you are using.

    After you get the ata driver to work, setting up the dos fs is somewhat
    straightforward and is documented in the manuals.

    TFFS requires a flash MTD interface to the flash part. While you could
    certainly write such a driver and integrate it with an ATA device, I'm
    not sure what the point would be.

    Good luck,
    lc


    Bill Pringlemeir wrote:
    > MB wrote:
    >
    > >> I would like to know, whether TFFS drivers can be used for the ATA
    > >> devices also? I have sndisc compact flash device. In linux, we
    > >> can write a IDE drivers, is there anything similar in vxworks?
    > >>
    > >> Is TFFS can be used for both PCMCI mode and IDE mode as well? If
    > >> we cant, then what type device driver is for ATA or IDE devices?

    >
    > On 8 Aug 2006, larry@ciummo.com wrote:
    > > I'm not sure TFFS is appropriate for a CF device. I use a CF device
    > > with vxWorks, and it works with the ATA driver with the DOSFS file
    > > system, formatted for fat or fat16.

    >
    > The major purpose of TFFS is wear leveling. The ATA driver is simply
    > a regular vxWorks driver with read/write/ioctl. You have to have
    > ioctls like seek, etc. There is no "ATA" or "IDE" type driver.
    > However, DosFs comes with an ATA driver already (or it is bundled with
    > vxWorks).
    >
    > "http://www.google.ca/search?q=ataDrv"
    >
    > It would be really redundant (and possibly error prone) to use TFFS on
    > top of an ATA flash card. See Leonid (DosFs author) comments on ATA
    > versus NOR flash and TFFS.
    >
    > "http://www.xs4all.nl/~borkhuis/vxworks/mcp750.html#mcp750.2-A"
    > "http://www.xs4all.nl/~borkhuis/vxworks/vxw_pt3.html#3.1-F"
    > and others...
    >
    > hth,
    > Bill Pringlemeir.
    >
    > --
    > Keep an open mind. But not so open your brains fall out. - Kallis' Law
    > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



  5. Re: VxWorks - ATA and PCMCIA driver


    Hi Bill Pringlemeir,

    Thanks for your reply, sure it is helpful. I need some more details on
    this.

    I searched relevent documents for the ATA drivers for the VxWorks,
    there are no relevent documents on this as compared to TFFS docs, which
    is given by the Windriver.

    If I build the BSP with INCLUDE_ATA, then ATA driver is already
    included by the vxworks and I can just mount the CF device and start
    using it? or do I need to implement a simple char driver with
    read/write/ioctl things?

    Will you explain me in deatil for writing/using this ATA driver?

    thanks,
    MB.

    Bill Pringlemeir wrote:
    > MB wrote:
    >
    > >> I would like to know, whether TFFS drivers can be used for the ATA
    > >> devices also? I have sndisc compact flash device. In linux, we
    > >> can write a IDE drivers, is there anything similar in vxworks?
    > >>
    > >> Is TFFS can be used for both PCMCI mode and IDE mode as well? If
    > >> we cant, then what type device driver is for ATA or IDE devices?

    >
    > On 8 Aug 2006, larry@ciummo.com wrote:
    > > I'm not sure TFFS is appropriate for a CF device. I use a CF device
    > > with vxWorks, and it works with the ATA driver with the DOSFS file
    > > system, formatted for fat or fat16.

    >
    > The major purpose of TFFS is wear leveling. The ATA driver is simply
    > a regular vxWorks driver with read/write/ioctl. You have to have
    > ioctls like seek, etc. There is no "ATA" or "IDE" type driver.
    > However, DosFs comes with an ATA driver already (or it is bundled with
    > vxWorks).
    >
    > "http://www.google.ca/search?q=ataDrv"
    >
    > It would be really redundant (and possibly error prone) to use TFFS on
    > top of an ATA flash card. See Leonid (DosFs author) comments on ATA
    > versus NOR flash and TFFS.
    >
    > "http://www.xs4all.nl/~borkhuis/vxworks/mcp750.html#mcp750.2-A"
    > "http://www.xs4all.nl/~borkhuis/vxworks/vxw_pt3.html#3.1-F"
    > and others...
    >
    > hth,
    > Bill Pringlemeir.
    >
    > --
    > Keep an open mind. But not so open your brains fall out. - Kallis' Law
    > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



  6. Re: VxWorks - ATA and PCMCIA driver

    Hey Larry,

    Do you have any document for writing this ATA driver? When I try to
    build the BSP with INCLUDE_ATA, I get lot of linker errors, it expects
    me to provide lot of functions.

    Do you have any documents from the windriver for writing this IDE / ATA
    driver? I have good document which explains writing TFFS driver. I
    refer to kernel programers guide, there thy have covered TFFS driver
    for the flash memories. Where can I get similar document for the IDE
    driver?

    Your help will be really appreciated.

    thanks,
    MB.

    LarryC wrote:
    > Just to clarify, if you want to use an ATA device, you should ataDrv,
    > which is provided with most vxWorks distributions. ataDrv requires
    > register level access to the ata device itself. If you are using
    > something like a PCMCIA or CF type ATA device, you will be bridging
    > between a CARDBUS type interface and an ATA device. Most CARDBUS
    > devices have a mode that allows you to put the CARBUS into an ATA
    > emulation mode. To get into this mode, I use sysAta.c, which is
    > written for this purpose, but must be customized for the specific type
    > of bridge chip you are using.
    >
    > After you get the ata driver to work, setting up the dos fs is somewhat
    > straightforward and is documented in the manuals.
    >
    > TFFS requires a flash MTD interface to the flash part. While you could
    > certainly write such a driver and integrate it with an ATA device, I'm
    > not sure what the point would be.
    >
    > Good luck,
    > lc
    >
    >
    > Bill Pringlemeir wrote:
    > > MB wrote:
    > >
    > > >> I would like to know, whether TFFS drivers can be used for the ATA
    > > >> devices also? I have sndisc compact flash device. In linux, we
    > > >> can write a IDE drivers, is there anything similar in vxworks?
    > > >>
    > > >> Is TFFS can be used for both PCMCI mode and IDE mode as well? If
    > > >> we cant, then what type device driver is for ATA or IDE devices?

    > >
    > > On 8 Aug 2006, larry@ciummo.com wrote:
    > > > I'm not sure TFFS is appropriate for a CF device. I use a CF device
    > > > with vxWorks, and it works with the ATA driver with the DOSFS file
    > > > system, formatted for fat or fat16.

    > >
    > > The major purpose of TFFS is wear leveling. The ATA driver is simply
    > > a regular vxWorks driver with read/write/ioctl. You have to have
    > > ioctls like seek, etc. There is no "ATA" or "IDE" type driver.
    > > However, DosFs comes with an ATA driver already (or it is bundled with
    > > vxWorks).
    > >
    > > "http://www.google.ca/search?q=ataDrv"
    > >
    > > It would be really redundant (and possibly error prone) to use TFFS on
    > > top of an ATA flash card. See Leonid (DosFs author) comments on ATA
    > > versus NOR flash and TFFS.
    > >
    > > "http://www.xs4all.nl/~borkhuis/vxworks/mcp750.html#mcp750.2-A"
    > > "http://www.xs4all.nl/~borkhuis/vxworks/vxw_pt3.html#3.1-F"
    > > and others...
    > >
    > > hth,
    > > Bill Pringlemeir.
    > >
    > > --
    > > Keep an open mind. But not so open your brains fall out. - Kallis' Law
    > > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



  7. Re: VxWorks - ATA and PCMCIA driver

    On 9 Aug 2006, madhu.b77@gmail.com wrote:

    > If I build the BSP with INCLUDE_ATA, then ATA driver is already
    > included by the vxworks and I can just mount the CF device and start
    > using it? or do I need to implement a simple char driver with
    > read/write/ioctl things?


    > Will you explain me in deatil for writing/using this ATA driver?


    This is the correct tact. You should use the ATA driver. LarryC made
    a good point that you also need the PCMCIA/CardBus support.
    Specifically, you need a CIS (card information services) to setup the
    memory map to the card. People keep changing the names of this
    PCMCIA/PCCard stuff... You can also write your own stub (sometimes
    called an enabler) if you only have a CF card and wont use the PCCard
    bus for anything else. Also, I have had custom hardware where the CF
    was just mapped as a memory device and there is no need for CIS [and
    no hot swap, capabilities].

    You have to figure out what else you need to include to get
    "INCLUDE_ATA" working.

    "http://www.fsref.com/pr/vxworks/ref/usrAta.html"
    "http://www.ee.ryerson.ca/~courses/ee8205/Data-Sheets/Tornado-VxWorks/Vx-Progr-Guide1.pdf" pg 203, etc.

    No I will not explain in detail, because the above document already
    does (as should many of the documents on your hard drive). Please
    take a look at the user guide PDFs and use the AcroReader's search
    function for ATA.

    hth,
    Bill Pringlemeir.

    --
    You know that look women get when they want sex? Me neither. - Drew
    Carey

    vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"

  8. Re: VxWorks - ATA and PCMCIA driver

    Hi Bill, Larry,

    There is a pcmciaLib.c under src/drv/pcmcia. Looks like it goes and
    read the CIS and allocates resources and manages the device. If I want
    to write ATA driver, do i need to make use of this pcmciaLib also?
    Since I am very new to this kind of drivers, I really need your help to
    understand this.

    When I build the BSP with INCLUDE_ATA and having ataDrv.c in the BSP,
    it is importing following variables.
    IMPORT ATA_TYPE ataTypes [ATA_MAX_CTRLS][ATA_MAX_DRIVES];
    IMPORT ATA_RESOURCE ataResources [ATA_MAX_CTRLS];

    How should I provide these variables? Do I need to add some more libs
    or i should create these variables in BSP and provide it?

    I really need your tips in writing this driver.

    thanks again,
    MB.



    Bill Pringlemeir wrote:
    > On 9 Aug 2006, madhu.b77@gmail.com wrote:
    >
    > > If I build the BSP with INCLUDE_ATA, then ATA driver is already
    > > included by the vxworks and I can just mount the CF device and start
    > > using it? or do I need to implement a simple char driver with
    > > read/write/ioctl things?

    >
    > > Will you explain me in deatil for writing/using this ATA driver?

    >
    > This is the correct tact. You should use the ATA driver. LarryC made
    > a good point that you also need the PCMCIA/CardBus support.
    > Specifically, you need a CIS (card information services) to setup the
    > memory map to the card. People keep changing the names of this
    > PCMCIA/PCCard stuff... You can also write your own stub (sometimes
    > called an enabler) if you only have a CF card and wont use the PCCard
    > bus for anything else. Also, I have had custom hardware where the CF
    > was just mapped as a memory device and there is no need for CIS [and
    > no hot swap, capabilities].
    >
    > You have to figure out what else you need to include to get
    > "INCLUDE_ATA" working.
    >
    > "http://www.fsref.com/pr/vxworks/ref/usrAta.html"
    > "http://www.ee.ryerson.ca/~courses/ee8205/Data-Sheets/Tornado-VxWorks/Vx-Progr-Guide1.pdf" pg 203, etc.
    >
    > No I will not explain in detail, because the above document already
    > does (as should many of the documents on your hard drive). Please
    > take a look at the user guide PDFs and use the AcroReader's search
    > function for ATA.
    >
    > hth,
    > Bill Pringlemeir.
    >
    > --
    > You know that look women get when they want sex? Me neither. - Drew
    > Carey
    >
    > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



  9. Re: VxWorks - ATA and PCMCIA driver

    I think the way to proceded is to use the ataDrv as written. It
    required that the ata device have the standard set of ATA registers.
    This is differenent than a PCMCIA device.

    I used the sysAta.c in my BSP that takes the CARDBUS controller and
    puts it into ATA emulation mode. Once that happened, the ataDrv
    started up and ran correctly.

    If your BSP doesn't have sysAta.c, I can send it. It may work - it
    just depends on the type of controller you have - it must have the ATA
    emulation mode to talk to be cable to talk to an ATA device like a CF
    flash disk.

    LC
    MB wrote:
    > Hi Bill, Larry,
    >
    > There is a pcmciaLib.c under src/drv/pcmcia. Looks like it goes and
    > read the CIS and allocates resources and manages the device. If I want
    > to write ATA driver, do i need to make use of this pcmciaLib also?
    > Since I am very new to this kind of drivers, I really need your help to
    > understand this.
    >
    > When I build the BSP with INCLUDE_ATA and having ataDrv.c in the BSP,
    > it is importing following variables.
    > IMPORT ATA_TYPE ataTypes [ATA_MAX_CTRLS][ATA_MAX_DRIVES];
    > IMPORT ATA_RESOURCE ataResources [ATA_MAX_CTRLS];
    >
    > How should I provide these variables? Do I need to add some more libs
    > or i should create these variables in BSP and provide it?
    >
    > I really need your tips in writing this driver.
    >
    > thanks again,
    > MB.
    >
    >
    >
    > Bill Pringlemeir wrote:
    > > On 9 Aug 2006, madhu.b77@gmail.com wrote:
    > >
    > > > If I build the BSP with INCLUDE_ATA, then ATA driver is already
    > > > included by the vxworks and I can just mount the CF device and start
    > > > using it? or do I need to implement a simple char driver with
    > > > read/write/ioctl things?

    > >
    > > > Will you explain me in deatil for writing/using this ATA driver?

    > >
    > > This is the correct tact. You should use the ATA driver. LarryC made
    > > a good point that you also need the PCMCIA/CardBus support.
    > > Specifically, you need a CIS (card information services) to setup the
    > > memory map to the card. People keep changing the names of this
    > > PCMCIA/PCCard stuff... You can also write your own stub (sometimes
    > > called an enabler) if you only have a CF card and wont use the PCCard
    > > bus for anything else. Also, I have had custom hardware where the CF
    > > was just mapped as a memory device and there is no need for CIS [and
    > > no hot swap, capabilities].
    > >
    > > You have to figure out what else you need to include to get
    > > "INCLUDE_ATA" working.
    > >
    > > "http://www.fsref.com/pr/vxworks/ref/usrAta.html"
    > > "http://www.ee.ryerson.ca/~courses/ee8205/Data-Sheets/Tornado-VxWorks/Vx-Progr-Guide1.pdf" pg 203, etc.
    > >
    > > No I will not explain in detail, because the above document already
    > > does (as should many of the documents on your hard drive). Please
    > > take a look at the user guide PDFs and use the AcroReader's search
    > > function for ATA.
    > >
    > > hth,
    > > Bill Pringlemeir.
    > >
    > > --
    > > You know that look women get when they want sex? Me neither. - Drew
    > > Carey
    > >
    > > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



  10. Re: VxWorks - ATA and PCMCIA driver

    Hi Larry,

    In my case, I have peripheral IO bus which connects the MIPS CPU core
    to PCMCIA device. I have sandisc CF card on this PCMCIA slot. I hope
    you had similar board. Pls send me your sysAta.c. Let me try to use
    that.

    Do you configure dosFs over the ATA device? What type of file system
    you used top of your driver?

    Refer to vxworks kernel programers guide, chapter 7, local file system,
    it syas, we have to make use of XBD (extended block device) fecility,
    which provides interface between dosFs and ATA devices. Do I need to
    include this XBD to make use of your ata driver to configure dosFs over
    that?

    Kindly send your source code to madhu.b77@gmail.com

    Looking for your reply.

    thanks,
    MB.

    LarryC wrote:
    > I think the way to proceded is to use the ataDrv as written. It
    > required that the ata device have the standard set of ATA registers.
    > This is differenent than a PCMCIA device.
    >
    > I used the sysAta.c in my BSP that takes the CARDBUS controller and
    > puts it into ATA emulation mode. Once that happened, the ataDrv
    > started up and ran correctly.
    >
    > If your BSP doesn't have sysAta.c, I can send it. It may work - it
    > just depends on the type of controller you have - it must have the ATA
    > emulation mode to talk to be cable to talk to an ATA device like a CF
    > flash disk.
    >
    > LC
    > MB wrote:
    > > Hi Bill, Larry,
    > >
    > > There is a pcmciaLib.c under src/drv/pcmcia. Looks like it goes and
    > > read the CIS and allocates resources and manages the device. If I want
    > > to write ATA driver, do i need to make use of this pcmciaLib also?
    > > Since I am very new to this kind of drivers, I really need your help to
    > > understand this.
    > >
    > > When I build the BSP with INCLUDE_ATA and having ataDrv.c in the BSP,
    > > it is importing following variables.
    > > IMPORT ATA_TYPE ataTypes [ATA_MAX_CTRLS][ATA_MAX_DRIVES];
    > > IMPORT ATA_RESOURCE ataResources [ATA_MAX_CTRLS];
    > >
    > > How should I provide these variables? Do I need to add some more libs
    > > or i should create these variables in BSP and provide it?
    > >
    > > I really need your tips in writing this driver.
    > >
    > > thanks again,
    > > MB.
    > >
    > >
    > >
    > > Bill Pringlemeir wrote:
    > > > On 9 Aug 2006, madhu.b77@gmail.com wrote:
    > > >
    > > > > If I build the BSP with INCLUDE_ATA, then ATA driver is already
    > > > > included by the vxworks and I can just mount the CF device and start
    > > > > using it? or do I need to implement a simple char driver with
    > > > > read/write/ioctl things?
    > > >
    > > > > Will you explain me in deatil for writing/using this ATA driver?
    > > >
    > > > This is the correct tact. You should use the ATA driver. LarryC made
    > > > a good point that you also need the PCMCIA/CardBus support.
    > > > Specifically, you need a CIS (card information services) to setup the
    > > > memory map to the card. People keep changing the names of this
    > > > PCMCIA/PCCard stuff... You can also write your own stub (sometimes
    > > > called an enabler) if you only have a CF card and wont use the PCCard
    > > > bus for anything else. Also, I have had custom hardware where the CF
    > > > was just mapped as a memory device and there is no need for CIS [and
    > > > no hot swap, capabilities].
    > > >
    > > > You have to figure out what else you need to include to get
    > > > "INCLUDE_ATA" working.
    > > >
    > > > "http://www.fsref.com/pr/vxworks/ref/usrAta.html"
    > > > "http://www.ee.ryerson.ca/~courses/ee8205/Data-Sheets/Tornado-VxWorks/Vx-Progr-Guide1.pdf" pg 203, etc.
    > > >
    > > > No I will not explain in detail, because the above document already
    > > > does (as should many of the documents on your hard drive). Please
    > > > take a look at the user guide PDFs and use the AcroReader's search
    > > > function for ATA.
    > > >
    > > > hth,
    > > > Bill Pringlemeir.
    > > >
    > > > --
    > > > You know that look women get when they want sex? Me neither. - Drew
    > > > Carey
    > > >
    > > > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



  11. Re: VxWorks - ATA and PCMCIA driver

    My HW setup is similar, except the slot I use is a CF slot - not a
    PCMCIA with a CF adapter.
    My HW is a Cirrus Logic PD-6833 cardbus to PCI bridge/controller.
    The key feature that this has ATA register emulation. If your
    controlled does not have this feature, you won't be able to use the
    sysAta/ataDrv combination directly.
    instead of the standard PC card interface.

    My doc on the controller says...
    The CL-PD6833 card interface can be dynamically configured to support a
    PC-CARD compatible disk interface (IDE


    Here's my formatting notes...

    # Format Compact Flash.
    pAta = ataDevCreate(0,0,0,0)
    pCbioCache = dcacheDevCreate(pAta,0,0,"ATA Hard Disk Cache")

    #1 partition - 100% of space
    usrFdiskPartCreate(pCbioCache,1,0,0,0)
    #2 partitions - 25% and 75% (75% to the last partition)
    pCbioParts = dpartDevCreate(pCbioCache,1,usrFdiskPartRead)
    # or with 2 partitons
    pCbioParts = dpartDevCreate(pCbioCache,2,usrFdiskPartRead)

    dosFsDevCreate( "/ata0a", dpartPartGet(pCbioParts,0),16,-1)
    #2nd part
    dosFsDevCreate( "/ata0b", dpartPartGet(pCbioParts,1),16,-1)
    # DOS_OPT_BLANK | DOS_OPT_QUIET | DOS_OPT_FAT32 = 0x16
    dosFsVolFormat( "/ata0a", 0x20, 0)
    dosFsVolFormat( "/ata0b", 0x20, 0)

    # Note - this next step may return -1. Ignore it.
    pCbioParts = dpartDevCreate(pCbioCache,2,usrFdiskPartRead)
    # DOS_OPT_BLANK | DOS_OPT_QUIET | DOS_OPT_FAT32 = 0x16
    dosFsVolFormat( "/ata0b", 0x20, 0)


    ===== This is a part table ===
    value = -1 = 0xffffffff
    xxxDY4[cpu0]->pAta = ataDevCreate(0,0,0,0)
    new symbol "pAta" added to symbol table.
    pAta = 0xf48ea70: value = 256436880 = 0xf48ea90 = pAta + 0x20
    xxxDY4[cpu0]->pCbioCache = dcacheDevCreate(pAta,0,0,"ATA Hard Disk
    Cache")
    new symbol "pCbioCache" added to symbol table.
    pCbioCache = 0xf48e850: value = 256802704 = 0xf4e7f90
    xxx DY4[cpu0]->usrFdiskPartShow pCbioCache

    Master Boot Record - Partition Table
    --------------------------------------
    Partition Entry number 00 Partition Entry offset 0x1be
    Status field = 0x80 Primary (bootable) Partition
    Type 0x06: MSDOS 16-bit FAT >=32M Partition
    Partition start LCHS: Cylinder 0000, Head 001, Sector 01
    Partition end LCHS: Cylinder 0252, Head 028, Sector 63
    Sectors offset from MBR partition 0x0000003f
    Number of sectors in partition 0x001f08e4
    Sectors offset from start of disk 0x0000003f

    Master Boot Record - Partition Table
    --------------------------------------
    Partition Entry number 01 Partition Entry offset 0x1ce
    Status field = 0x00 Non-bootable Partition
    Type 0x0c: Win95 FAT32 (LBA) Partition
    Partition start LCHS: Cylinder 0000, Head 029, Sector 01
    Partition end LCHS: Cylinder 0239, Head 063, Sector 63
    Sectors offset from MBR partition 0x001f0923
    Number of sectors in partition 0x005cef1d
    Sectors offset from start of disk 0x001f0923

    Master Boot Record - Partition Table
    --------------------------------------
    Partition Entry number 02 Partition Entry offset 0x1de
    Status field = 0x00 Non-bootable Partition
    Type 0x00: Empty (NULL) Partition


    Master Boot Record - Partition Table
    --------------------------------------
    Partition Entry number 03 Partition Entry offset 0x1ee
    Status field = 0x00 Non-bootable Partition
    Type 0x00: Empty (NULL) Partition

    value = 0 = 0x0



    MB wrote:
    > Hi Larry,
    >
    > In my case, I have peripheral IO bus which connects the MIPS CPU core
    > to PCMCIA device. I have sandisc CF card on this PCMCIA slot. I hope
    > you had similar board. Pls send me your sysAta.c. Let me try to use
    > that.
    >
    > Do you configure dosFs over the ATA device? What type of file system
    > you used top of your driver?
    >
    > Refer to vxworks kernel programers guide, chapter 7, local file system,
    > it syas, we have to make use of XBD (extended block device) fecility,
    > which provides interface between dosFs and ATA devices. Do I need to
    > include this XBD to make use of your ata driver to configure dosFs over
    > that?
    >
    > Kindly send your source code to madhu.b77@gmail.com
    >
    > Looking for your reply.
    >
    > thanks,
    > MB.
    >
    > LarryC wrote:
    > > I think the way to proceded is to use the ataDrv as written. It
    > > required that the ata device have the standard set of ATA registers.
    > > This is differenent than a PCMCIA device.
    > >
    > > I used the sysAta.c in my BSP that takes the CARDBUS controller and
    > > puts it into ATA emulation mode. Once that happened, the ataDrv
    > > started up and ran correctly.
    > >
    > > If your BSP doesn't have sysAta.c, I can send it. It may work - it
    > > just depends on the type of controller you have - it must have the ATA
    > > emulation mode to talk to be cable to talk to an ATA device like a CF
    > > flash disk.
    > >
    > > LC
    > > MB wrote:
    > > > Hi Bill, Larry,
    > > >
    > > > There is a pcmciaLib.c under src/drv/pcmcia. Looks like it goes and
    > > > read the CIS and allocates resources and manages the device. If I want
    > > > to write ATA driver, do i need to make use of this pcmciaLib also?
    > > > Since I am very new to this kind of drivers, I really need your help to
    > > > understand this.
    > > >
    > > > When I build the BSP with INCLUDE_ATA and having ataDrv.c in the BSP,
    > > > it is importing following variables.
    > > > IMPORT ATA_TYPE ataTypes [ATA_MAX_CTRLS][ATA_MAX_DRIVES];
    > > > IMPORT ATA_RESOURCE ataResources [ATA_MAX_CTRLS];
    > > >
    > > > How should I provide these variables? Do I need to add some more libs
    > > > or i should create these variables in BSP and provide it?
    > > >
    > > > I really need your tips in writing this driver.
    > > >
    > > > thanks again,
    > > > MB.
    > > >
    > > >
    > > >
    > > > Bill Pringlemeir wrote:
    > > > > On 9 Aug 2006, madhu.b77@gmail.com wrote:
    > > > >
    > > > > > If I build the BSP with INCLUDE_ATA, then ATA driver is already
    > > > > > included by the vxworks and I can just mount the CF device and start
    > > > > > using it? or do I need to implement a simple char driver with
    > > > > > read/write/ioctl things?
    > > > >
    > > > > > Will you explain me in deatil for writing/using this ATA driver?
    > > > >
    > > > > This is the correct tact. You should use the ATA driver. LarryC made
    > > > > a good point that you also need the PCMCIA/CardBus support.
    > > > > Specifically, you need a CIS (card information services) to setup the
    > > > > memory map to the card. People keep changing the names of this
    > > > > PCMCIA/PCCard stuff... You can also write your own stub (sometimes
    > > > > called an enabler) if you only have a CF card and wont use the PCCard
    > > > > bus for anything else. Also, I have had custom hardware where the CF
    > > > > was just mapped as a memory device and there is no need for CIS [and
    > > > > no hot swap, capabilities].
    > > > >
    > > > > You have to figure out what else you need to include to get
    > > > > "INCLUDE_ATA" working.
    > > > >
    > > > > "http://www.fsref.com/pr/vxworks/ref/usrAta.html"
    > > > > "http://www.ee.ryerson.ca/~courses/ee8205/Data-Sheets/Tornado-VxWorks/Vx-Progr-Guide1.pdf" pg 203, etc.
    > > > >
    > > > > No I will not explain in detail, because the above document already
    > > > > does (as should many of the documents on your hard drive). Please
    > > > > take a look at the user guide PDFs and use the AcroReader's search
    > > > > function for ATA.
    > > > >
    > > > > hth,
    > > > > Bill Pringlemeir.
    > > > >
    > > > > --
    > > > > You know that look women get when they want sex? Me neither. - Drew
    > > > > Carey
    > > > >
    > > > > vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"



+ Reply to Thread