aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/lasat/lasat_board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lasat/lasat_board.c')
-rw-r--r--arch/mips/lasat/lasat_board.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c
index ec2f658c370..577bb463a87 100644
--- a/arch/mips/lasat/lasat_board.c
+++ b/arch/mips/lasat/lasat_board.c
@@ -23,18 +23,18 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/ctype.h>
-#include <asm/bootinfo.h>
+#include <linux/mutex.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;
@@ -65,7 +65,7 @@ static void init_flash_sizes(void)
ls[LASAT_MTD_SERVICE] = 0xC0000;
ls[LASAT_MTD_NORMAL] = 0x100000;
- if (mips_machtype == MACH_LASAT_100) {
+ if (!IS_LASAT_200()) {
lasat_board_info.li_flash_base = 0x1e000000;
lb[LASAT_MTD_BOOTLOADER] = 0x1e400000;
@@ -258,10 +258,6 @@ 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;
}
@@ -269,6 +265,8 @@ 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);
@@ -277,4 +275,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);
}