Changeset ee4f57d in rtems for c/src/libchip/ide/ata.c


Ignore:
Timestamp:
Mar 23, 2004, 9:59:52 AM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
e7ceef91
Parents:
83c5fc1
Message:

2004-03-23 Ralf Corsepius <ralf_corsepius@…>

  • libchip/ide/ata.c, libchip/ide/ata_internal.h, libchip/ide/ide_controller.c, libchip/ide/ide_ctrl_cfg.h, libchip/ide/ide_ctrl_io.h, libchip/network/cs8900.c, libchip/network/dec21140.c, libchip/network/elnk.c, libchip/network/if_fxp.c, libchip/network/open_eth.c, libchip/network/open_eth.h, libchip/network/sonic.c, libchip/network/sonic.h, libchip/rtc/icm7170.c, libchip/rtc/icm7170.h, libchip/rtc/icm7170_reg.c, libchip/rtc/icm7170_reg2.c, libchip/rtc/icm7170_reg4.c, libchip/rtc/icm7170_reg8.c, libchip/rtc/m48t08.c, libchip/rtc/m48t08.h, libchip/rtc/m48t08_reg.c, libchip/rtc/m48t08_reg2.c, libchip/rtc/m48t08_reg4.c, libchip/rtc/m48t08_reg8.c, libchip/rtc/rtc.h, libchip/serial/mc68681.c, libchip/serial/mc68681.h, libchip/serial/mc68681_reg.c, libchip/serial/mc68681_reg2.c, libchip/serial/mc68681_reg4.c, libchip/serial/mc68681_reg8.c, libchip/serial/ns16550.c, libchip/serial/ns16550_p.h, libchip/serial/serial.h, libchip/serial/z85c30.c, libchip/serial/z85c30.h, libchip/serial/z85c30_p.h, libchip/serial/z85c30_reg.c, libchip/shmdr/addlq.c, libchip/shmdr/cnvpkt.c, libchip/shmdr/dump.c, libchip/shmdr/fatal.c, libchip/shmdr/getlq.c, libchip/shmdr/init.c, libchip/shmdr/initlq.c, libchip/shmdr/intr.c, libchip/shmdr/poll.c, libchip/shmdr/send.c, libchip/shmdr/shm_driver.h: Convert to using c99 fixed-size types.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/ide/ata.c

    r83c5fc1 ree4f57d  
    135135                                           */
    136136    rtems_device_minor_number  ctrl_minor;
    137     unsigned8                  dev;
     137    uint8_t                    dev;
    138138   
    139139    rel_minor = (rtems_filesystem_dev_minor_t(device)) /
     
    218218    if (ATA_DEV_INFO(ctrl_minor, dev).lba_avaible)
    219219    {
    220         areq->regs.regs[IDE_REGISTER_LBA0] = (unsigned8)req->start;
    221         areq->regs.regs[IDE_REGISTER_LBA1] = (unsigned8)(req->start >> 8);
    222         areq->regs.regs[IDE_REGISTER_LBA2] = (unsigned8)(req->start >> 16);
    223         areq->regs.regs[IDE_REGISTER_LBA3] |= (unsigned8) (req->start >> 24);
     220        areq->regs.regs[IDE_REGISTER_LBA0] = (uint8_t  )req->start;
     221        areq->regs.regs[IDE_REGISTER_LBA1] = (uint8_t  )(req->start >> 8);
     222        areq->regs.regs[IDE_REGISTER_LBA2] = (uint8_t  )(req->start >> 16);
     223        areq->regs.regs[IDE_REGISTER_LBA3] |= (uint8_t  ) (req->start >> 24);
    224224        areq->regs.regs[IDE_REGISTER_LBA3] |= IDE_REGISTER_LBA3_L;
    225225    }
    226226    else
    227227    {
    228         unsigned32 count = req->start;
     228        uint32_t  count = req->start;
    229229
    230230        areq->regs.regs[IDE_REGISTER_SECTOR_NUMBER] =
     
    238238        /* now count = number of cylinders */
    239239        count %= ATA_DEV_INFO(ctrl_minor, dev).cylinders;
    240         areq->regs.regs[IDE_REGISTER_CYLINDER_LOW] = (unsigned8)count;
    241         areq->regs.regs[IDE_REGISTER_CYLINDER_HIGH] = (unsigned8)(count >> 8);
     240        areq->regs.regs[IDE_REGISTER_CYLINDER_LOW] = (uint8_t  )count;
     241        areq->regs.regs[IDE_REGISTER_CYLINDER_HIGH] = (uint8_t  )(count >> 8);
    242242        areq->regs.regs[IDE_REGISTER_DEVICE_HEAD] &=
    243243                                                ~IDE_REGISTER_DEVICE_HEAD_L;
     
    275275                                           */
    276276    rtems_device_minor_number  ctrl_minor;
    277     unsigned8                  dev;
     277    uint8_t                    dev;
    278278    ata_queue_msg_t            msg;   
    279279   
     
    313313            areq->regs.to_write |=
    314314                               ATA_REGISTERS_VALUE(IDE_REGISTER_SECTOR_COUNT);
    315             areq->regs.regs[IDE_REGISTER_SECTOR_COUNT] = *(unsigned8 *)argp;
     315            areq->regs.regs[IDE_REGISTER_SECTOR_COUNT] = *(uint8_t  *)argp;
    316316            break;
    317317       
     
    357357            case ATAIO_SET_MULTIPLE_MODE:
    358358                ATA_DEV_INFO(ctrl_minor, dev).current_multiple =
    359                                                            *(unsigned8 *)argp;
     359                                                           *(uint8_t  *)argp;
    360360                break;
    361361       
     
    392392{
    393393    ata_req_t       *areq;
    394     unsigned16       byte; /* emphasize that only 8 low bits is meaningful */
     394    uint16_t         byte; /* emphasize that only 8 low bits is meaningful */
    395395    ata_queue_msg_t  msg;
    396     unsigned8        i, dev;
    397     unsigned16       val;
    398     unsigned16       data_bs; /* the number of 512-bytes sectors in one
     396    uint8_t          i, dev;
     397    uint16_t         val;
     398    uint16_t         data_bs; /* the number of 512-bytes sectors in one
    399399                               * data block
    400400                               */
     
    430430    for (i=0; i< ATA_MAX_CMD_REG_OFFSET; i++)
    431431    {
    432         unsigned32 reg = (1 << i);
     432        uint32_t  reg = (1 << i);
    433433        if (areq->regs.to_write & reg)
    434434            ide_controller_write_register(ctrl_minor, i, areq->regs.regs[i]);
     
    555555    if (Chain_Has_only_one_node(&ata_ide_ctrls[ctrl_minor].reqs))
    556556    {
    557         unsigned16      val;
     557        uint16_t        val;
    558558        ata_queue_msg_t msg;
    559559
     
    590590    Chain_Node      *the_node = ((Chain_Control *)(&ata_int_vec[vec]))->first;
    591591    ata_queue_msg_t  msg;
    592     unsigned16       byte; /* emphasize that only 8 low bits is meaningful */
     592    uint16_t         byte; /* emphasize that only 8 low bits is meaningful */
    593593   
    594594    for ( ; !Chain_Is_tail(&ata_int_vec[vec], the_node) ; )
     
    622622ata_pio_in_protocol(rtems_device_minor_number ctrl_minor, ata_req_t *areq)
    623623{
    624     unsigned16      bs, val;
    625     unsigned8       dev;
    626     unsigned32      min_val;
     624    uint16_t        bs, val;
     625    uint8_t         dev;
     626    uint32_t        min_val;
    627627    ata_queue_msg_t msg;
    628628       
     
    665665ata_pio_out_protocol(rtems_device_minor_number ctrl_minor, ata_req_t *areq)
    666666{
    667     unsigned16      bs, val;
    668     unsigned8       dev;
    669     unsigned32      min_val;
     667    uint16_t        bs, val;
     668    uint8_t         dev;
     669    uint32_t        min_val;
    670670    ata_queue_msg_t msg;
    671671   
     
    716716{
    717717    ata_queue_msg_t            msg;
    718     rtems_unsigned32           size;
     718    uint32_t             size;
    719719    ata_req_t                 *areq;
    720720    rtems_device_minor_number  ctrl_minor;
    721     unsigned16                 val;
    722     unsigned16                 val1;
     721    uint16_t                   val;
     722    uint16_t                   val1;
    723723    rtems_status_code          rc;
    724724    ISR_Level                  level;
     
    898898               void *args)
    899899{
    900     unsigned32         ctrl_minor;
     900    uint32_t           ctrl_minor;
    901901    rtems_status_code  status;
    902902    ata_req_t          areq;
    903903    blkdev_request1    breq;     
    904     unsigned8          i, dev = 0;
    905     unsigned16        *buffer;
    906     unsigned16         ec;
     904    uint8_t            i, dev = 0;
     905    uint16_t          *buffer;
     906    uint16_t           ec;
    907907    char               name[ATA_MAX_NAME_LENGTH];
    908908    dev_t              device;
     
    963963    }   
    964964   
    965     buffer = (unsigned16 *)malloc(ATA_SECTOR_SIZE);
     965    buffer = (uint16_t  *)malloc(ATA_SECTOR_SIZE);
    966966    if (buffer == NULL)
    967967    {
     
    11481148                (CF_LE_W(buffer[ATA_IDENT_WORD_CAPABILITIES]) >> 9) & 0x1;
    11491149            ATA_DEV_INFO(ctrl_minor, dev).max_multiple =
    1150                 (unsigned8) (CF_LE_W(buffer[ATA_IDENT_WORD_RW_MULT]));
     1150                (uint8_t  ) (CF_LE_W(buffer[ATA_IDENT_WORD_RW_MULT]));
    11511151            ATA_DEV_INFO(ctrl_minor, dev).current_multiple =
    11521152                (CF_LE_W(buffer[ATA_IDENT_WORD_MULT_SECS]) & 0x100) ?
    1153                 (unsigned8)(CF_LE_W(buffer[ATA_IDENT_WORD_MULT_SECS])) :
     1153                (uint8_t  )(CF_LE_W(buffer[ATA_IDENT_WORD_MULT_SECS])) :
    11541154                 0;
    11551155
     
    12371237                                  ata_req_t                 *areq)
    12381238{
    1239     unsigned16         byte;/* emphasize that only 8 low bits is meaningful */
    1240     unsigned8          i, dev;
    1241     unsigned16         val, val1;
    1242     unsigned16         data_bs; /* the number of 512 bytes sectors into one
     1239    uint16_t           byte;/* emphasize that only 8 low bits is meaningful */
     1240    uint8_t            i, dev;
     1241    uint16_t           val, val1;
     1242    uint16_t           data_bs; /* the number of 512 bytes sectors into one
    12431243                                 * data block
    12441244                                 */
     
    12611261    for (i=0; i< ATA_MAX_CMD_REG_OFFSET; i++)
    12621262    {
    1263         unsigned32 reg = (1 << i);
     1263        uint32_t  reg = (1 << i);
    12641264        if (areq->regs.to_write & reg)
    12651265            ide_controller_write_register(ctrl_minor, i,
Note: See TracChangeset for help on using the changeset viewer.