Ignore:
Timestamp:
Apr 21, 2004, 10:43:04 AM (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f05b2ac
Parents:
48ea3df
Message:

Remove stray white spaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mbx8xx/ide/pcmcia_ide.c

    r48ea3df r6128a4a  
    3434/* #define DATAREG_16BIT */ /* 16 bit mode not yet working */
    3535/* #define DEBUG_OUT */
    36 /* 
    37  * support functions for PCMCIA IDE IF 
     36/*
     37 * support functions for PCMCIA IDE IF
    3838 */
    3939/*=========================================================================*\
     
    5656{
    5757  boolean ide_card_plugged = TRUE; /* assume: we have a card plugged in */
    58  
     58
    5959  /*
    6060   * check, that the CD# pins are low -> a PCMCIA card is plugged in
    6161   */
    62   if ((m8xx.pipr 
     62  if ((m8xx.pipr
    6363       & (M8xx_PCMCIA_PIPR_CACD1 | M8xx_PCMCIA_PIPR_CACD2)) != 0x00) {
    6464    ide_card_plugged = FALSE;
     
    8080    boolean fixed_disk_tuple_found = FALSE;
    8181    boolean ata_disk_tuple_found   = FALSE;
    82    
     82
    8383    while ((cis_pos < 256) &&
    8484           (CIS_BYTE(cis_pos) != 0xff) &&
     
    9696        ata_disk_tuple_found = TRUE;
    9797      }
    98       /* 
    99        * advance using the length field 
     98      /*
     99       * advance using the length field
    100100       */
    101       cis_pos += CIS_BYTE(cis_pos+1)+2; 
     101      cis_pos += CIS_BYTE(cis_pos+1)+2;
    102102    }
    103103    ide_card_plugged = fixed_disk_tuple_found && ata_disk_tuple_found;
     
    128128   */
    129129  /*
    130    * FIXME: set programming voltage as requested 
     130   * FIXME: set programming voltage as requested
    131131   */
    132132}
     
    156156  if (reg == IDE_REGISTER_DATA_WORD) {
    157157#ifdef DATAREG_16BIT
    158     *value = *(volatile uint16_t*)(port+reg);   
    159 #else
    160     *value = ((*(volatile uint8_t*)(port+reg) << 8) + 
    161               (*(volatile uint8_t*)(port+reg+1) ));   
     158    *value = *(volatile uint16_t*)(port+reg);
     159#else
     160    *value = ((*(volatile uint8_t*)(port+reg) << 8) +
     161              (*(volatile uint8_t*)(port+reg+1) ));
    162162#endif
    163163  }
    164164  else {
    165     *value = *(volatile uint8_t*)(port+reg);   
     165    *value = *(volatile uint8_t*)(port+reg);
    166166  }
    167167#ifdef DEBUG_OUT
     
    197197  if (reg == IDE_REGISTER_DATA_WORD) {
    198198#ifdef DATAREG_16BIT
    199     *(volatile uint16_t*)(port+reg) = value;   
    200 #else
    201     *(volatile uint8_t*)(port+reg) = value >> 8;   
    202     *(volatile uint8_t*)(port+reg+1) = value;   
     199    *(volatile uint16_t*)(port+reg) = value;
     200#else
     201    *(volatile uint8_t*)(port+reg) = value >> 8;
     202    *(volatile uint8_t*)(port+reg+1) = value;
    203203#endif
    204204  }
    205205  else {
    206     *(volatile uint8_t*)(port+reg)= value;   
     206    *(volatile uint8_t*)(port+reg)= value;
    207207  }
    208208}
     
    219219| Input Parameters:                                                         |
    220220\*-------------------------------------------------------------------------*/
    221  int minor, 
    222  uint16_t   block_size, 
    223  blkdev_sg_buffer *bufs, 
     221 int minor,
     222 uint16_t   block_size,
     223 blkdev_sg_buffer *bufs,
    224224 uint32_t   *cbuf,
    225225 uint32_t   *pos
     
    243243#endif
    244244  uint32_t    llength = bufs[(*cbuf)].length;
    245    
    246   while (((*(volatile uint8_t*)(port+IDE_REGISTER_STATUS)) 
    247           & IDE_REGISTER_STATUS_DRQ) && 
     245
     246  while (((*(volatile uint8_t*)(port+IDE_REGISTER_STATUS))
     247          & IDE_REGISTER_STATUS_DRQ) &&
    248248         (cnt < block_size)) {
    249249#ifdef DATAREG_16BIT
    250250    *lbuf++ = *(volatile uint16_t*)(port+8); /* 16 bit data port */
    251     cnt += 2; 
     251    cnt += 2;
    252252    (*pos) += 2;
    253253#else
    254254    *lbuf++ = *(volatile uint8_t*)(port+IDE_REGISTER_DATA);
    255     cnt += 1; 
     255    cnt += 1;
    256256    (*pos) += 1;
    257257#endif
     
    262262      llength = bufs[(*cbuf)].length;
    263263    }
    264   } 
     264  }
    265265}
    266266
     
    276276| Input Parameters:                                                         |
    277277\*-------------------------------------------------------------------------*/
    278  int minor, 
    279  uint16_t   block_size, 
    280  blkdev_sg_buffer *bufs, 
     278 int minor,
     279 uint16_t   block_size,
     280 blkdev_sg_buffer *bufs,
    281281 uint32_t   *cbuf,
    282282 uint32_t   *pos
     
    301301#endif
    302302  uint32_t    llength = bufs[(*cbuf)].length;
    303    
    304   while (((*(volatile uint8_t*)(port+IDE_REGISTER_STATUS)) 
    305           & IDE_REGISTER_STATUS_DRQ) && 
     303
     304  while (((*(volatile uint8_t*)(port+IDE_REGISTER_STATUS))
     305          & IDE_REGISTER_STATUS_DRQ) &&
    306306         (cnt < block_size)) {
    307307#ifdef DATAREG_16BIT
    308308    *(volatile uint16_t*)(port+8) = *lbuf++; /* 16 bit data port */
    309     cnt += 2; 
     309    cnt += 2;
    310310    (*pos) += 2;
    311311#else
    312312    *(volatile uint8_t*)(port+IDE_REGISTER_DATA) = *lbuf++;
    313     cnt += 1; 
     313    cnt += 1;
    314314    (*pos) += 1;
    315315#endif
     
    320320      llength = bufs[(*cbuf)].length;
    321321    }
    322   } 
     322  }
    323323}
    324324
     
    369369
    370370/*
    371  * The following table configures the functions used for IDE drivers 
     371 * The following table configures the functions used for IDE drivers
    372372 * in this BSP.
    373373 */
Note: See TracChangeset for help on using the changeset viewer.