Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98155
b: refs/heads/master
c: 1f34f2e
h: refs/heads/master
i:
  98153: 8f602bc
  98151: eaa1106
v: v3
  • Loading branch information
Thomas Horsten authored and Ralf Baechle committed Jun 16, 2008
1 parent 75593d9 commit df147f3
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 154 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9c5023d83df5dc7d58830a63fd0e082120f00e3
refs/heads/master: 1f34f2e4262bae8a1aa6d8fd6306b07074d33718
13 changes: 7 additions & 6 deletions trunk/arch/mips/lasat/lasat_board.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/mutex.h>
#include <asm/bootinfo.h>
#include <asm/addrspace.h>
#include "at93c.h"
/* New model description table */
#include "lasat_models.h"

static DEFINE_MUTEX(lasat_eeprom_mutex);

#define EEPROM_CRC(data, len) (~crc32(~0, data, len))

struct lasat_info lasat_board_info;

void update_bcastaddr(void);

int EEPROMRead(unsigned int pos, unsigned char *data, int len)
{
int i;
Expand Down Expand Up @@ -258,17 +259,15 @@ int lasat_init_board_info(void)
sprintf(lasat_board_info.li_typestr, "%d", 10 * c);
}

#if defined(CONFIG_INET) && defined(CONFIG_SYSCTL)
update_bcastaddr();
#endif

return 0;
}

void lasat_write_eeprom_info(void)
{
unsigned long crc;

mutex_lock(&lasat_eeprom_mutex);

/* Generate the CRC */
crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info),
sizeof(struct lasat_eeprom_struct) - 4);
Expand All @@ -277,4 +276,6 @@ void lasat_write_eeprom_info(void)
/* Write the EEPROM info */
EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info,
sizeof(struct lasat_eeprom_struct));

mutex_unlock(&lasat_eeprom_mutex);
}
Loading

0 comments on commit df147f3

Please sign in to comment.