Changeset 3495c57 in rtems for c/src/libchip/flash


Ignore:
Timestamp:
Nov 30, 2009, 3:49:08 AM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
90a0b91
Parents:
b1274bd9
Message:

Whitespace removal.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/flash/am29lv160.c

    rb1274bd9 r3495c57  
    100100
    101101  seg_8 += offset;
    102  
     102
    103103  count = offset & (sizeof (uint32_t) - 1);
    104104  size -= count;
     
    113113      return EIO;
    114114    }
    115  
     115
    116116  seg_32 = (volatile uint32_t*) seg_8;
    117  
    118   count = size  / sizeof (uint32_t); 
     117
     118  count = size  / sizeof (uint32_t);
    119119  size -= count * sizeof (uint32_t);
    120  
     120
    121121  while (count--)
    122122    if (*seg_32++ != 0xffffffff)
     
    128128      return EIO;
    129129    }
    130  
     130
    131131  seg_8 = (volatile uint8_t*) seg_32;
    132132
     
    140140      return EIO;
    141141    }
    142  
     142
    143143  return 0;
    144144}
     
    154154  const rtems_am29lv160_config* ac = &rtems_am29lv160_configuration[device];
    155155  const uint8_t*                addr = ac->base;
    156  
     156
    157157  addr += (sd->offset + (segment - sd->segment) * sd->size) + offset;
    158158
     
    181181      if (((status1 ^ status2) & (1 << 6)) == 0)
    182182        return 0;
    183        
     183
    184184#if AM26LV160_ERROR_TRACE
    185185      printf ("AM26LV160: error bit detected: %p = 0x%04x\n",
     
    231231  volatile uint8_t*     seg = base + offset;
    232232  rtems_interrupt_level level;
    233  
     233
    234234  /*
    235235   * Issue a reset.
    236236   */
    237237  *base = 0xf0;
    238    
     238
    239239  while (size)
    240240  {
     
    243243    *(base + 0x555) = 0x55;
    244244    *(base + 0xaaa) = 0xa0;
    245     *seg = *data++; 
     245    *seg = *data++;
    246246    rtems_interrupt_enable (level);
    247247    if (rtems_am29lv160_toggle_wait_8 (seg++) != 0)
     
    268268
    269269  size /= 2;
    270      
     270
    271271  /*
    272272   * Issue a reset.
    273273   */
    274274  *base = 0xf0;
    275    
     275
    276276  while (size)
    277277  {
     
    290290   * Issue a reset.
    291291   */
    292   *base = 0xf0; 
     292  *base = 0xf0;
    293293
    294294  return 0;
     
    376376      volatile uint8_t* base = ac->base;
    377377      volatile uint8_t* seg  = base + offset;
    378      
     378
    379379      /*
    380380       * Issue a reset.
    381381       */
    382382      rtems_interrupt_disable (level);
    383       *base = 0xf0;   
     383      *base = 0xf0;
    384384      *(base + 0xaaa) = 0xaa;
    385385      *(base + 0x555) = 0x55;
     
    389389      *seg = 0x30;
    390390      rtems_interrupt_enable (level);
    391      
     391
    392392      ret = rtems_am29lv160_toggle_wait_8 (seg);
    393393
     
    414414      *seg = 0x30;
    415415      rtems_interrupt_enable (level);
    416      
     416
    417417      ret = rtems_am29lv160_toggle_wait_16 (seg);
    418418
     
    448448  {
    449449    uint32_t seg_segment;
    450    
     450
    451451    for (seg_segment = 0;
    452452         seg_segment < dd->segments[segment].count;
     
    460460    }
    461461  }
    462  
     462
    463463  return 0;
    464464}
Note: See TracChangeset for help on using the changeset viewer.