elppc board: Coding style cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
82b24a8a50
commit
e2d45e6f4d
@ -32,7 +32,8 @@
|
||||
#include "srom.h"
|
||||
|
||||
extern int eepro100_write_eeprom (struct eth_device *dev,
|
||||
int location, int addr_len, unsigned short data);
|
||||
int location, int addr_len,
|
||||
unsigned short data);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
@ -41,8 +42,7 @@ unsigned short eepro100_srom_checksum (unsigned short *sromdata)
|
||||
unsigned short sum = 0;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < (EE_SIZE-1); i++)
|
||||
{
|
||||
for (i = 0; i < (EE_SIZE - 1); i++) {
|
||||
sum += sromdata[i];
|
||||
}
|
||||
return (EE_CHECKSUM - sum);
|
||||
@ -62,11 +62,12 @@ int eepro100_srom_store (unsigned short *source)
|
||||
|
||||
source[63] = eepro100_srom_checksum (source);
|
||||
|
||||
for (count=0; count < EE_SIZE; count++)
|
||||
{
|
||||
for (count = 0; count < EE_SIZE; count++) {
|
||||
if (eepro100_write_eeprom ((struct eth_device *) &onboard_dev,
|
||||
count, EE_ADDR_BITS, SROM_SHORT(source)) == -1 )
|
||||
count, EE_ADDR_BITS,
|
||||
SROM_SHORT (source)) == -1) {
|
||||
return -1;
|
||||
}
|
||||
source++;
|
||||
}
|
||||
return 0;
|
||||
@ -82,8 +83,10 @@ void eepro100_srom_load (unsigned short *destination)
|
||||
{
|
||||
int count;
|
||||
struct eth_device onboard_dev;
|
||||
|
||||
#ifdef DEBUG
|
||||
int lr = 0;
|
||||
|
||||
printf ("eepro100_srom_download:\n");
|
||||
#endif
|
||||
|
||||
@ -94,14 +97,12 @@ void eepro100_srom_load (unsigned short *destination)
|
||||
|
||||
memset (destination, 0x65, 128);
|
||||
|
||||
for (count=0; count < 0x40; count++)
|
||||
{
|
||||
for (count = 0; count < 0x40; count++) {
|
||||
*destination++ = read_eeprom ((struct eth_device *) &onboard_dev,
|
||||
count, EE_ADDR_BITS);
|
||||
#ifdef DEBUG
|
||||
printf ("%04x ", *(destination - 1));
|
||||
if (lr++ == 7)
|
||||
{
|
||||
if (lr++ == 7) {
|
||||
printf ("\n");
|
||||
lr = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user