diff options
Diffstat (limited to 'arch/mips/lasat/lasat_board.c')
-rw-r--r-- | arch/mips/lasat/lasat_board.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c index ec2f658c3709..577bb463a871 100644 --- a/arch/mips/lasat/lasat_board.c +++ b/arch/mips/lasat/lasat_board.c | |||
@@ -23,18 +23,18 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/ctype.h> | 25 | #include <linux/ctype.h> |
26 | #include <asm/bootinfo.h> | 26 | #include <linux/mutex.h> |
27 | #include <asm/addrspace.h> | 27 | #include <asm/addrspace.h> |
28 | #include "at93c.h" | 28 | #include "at93c.h" |
29 | /* New model description table */ | 29 | /* New model description table */ |
30 | #include "lasat_models.h" | 30 | #include "lasat_models.h" |
31 | 31 | ||
32 | static DEFINE_MUTEX(lasat_eeprom_mutex); | ||
33 | |||
32 | #define EEPROM_CRC(data, len) (~crc32(~0, data, len)) | 34 | #define EEPROM_CRC(data, len) (~crc32(~0, data, len)) |
33 | 35 | ||
34 | struct lasat_info lasat_board_info; | 36 | struct lasat_info lasat_board_info; |
35 | 37 | ||
36 | void update_bcastaddr(void); | ||
37 | |||
38 | int EEPROMRead(unsigned int pos, unsigned char *data, int len) | 38 | int EEPROMRead(unsigned int pos, unsigned char *data, int len) |
39 | { | 39 | { |
40 | int i; | 40 | int i; |
@@ -65,7 +65,7 @@ static void init_flash_sizes(void) | |||
65 | ls[LASAT_MTD_SERVICE] = 0xC0000; | 65 | ls[LASAT_MTD_SERVICE] = 0xC0000; |
66 | ls[LASAT_MTD_NORMAL] = 0x100000; | 66 | ls[LASAT_MTD_NORMAL] = 0x100000; |
67 | 67 | ||
68 | if (mips_machtype == MACH_LASAT_100) { | 68 | if (!IS_LASAT_200()) { |
69 | lasat_board_info.li_flash_base = 0x1e000000; | 69 | lasat_board_info.li_flash_base = 0x1e000000; |
70 | 70 | ||
71 | lb[LASAT_MTD_BOOTLOADER] = 0x1e400000; | 71 | lb[LASAT_MTD_BOOTLOADER] = 0x1e400000; |
@@ -258,10 +258,6 @@ int lasat_init_board_info(void) | |||
258 | sprintf(lasat_board_info.li_typestr, "%d", 10 * c); | 258 | sprintf(lasat_board_info.li_typestr, "%d", 10 * c); |
259 | } | 259 | } |
260 | 260 | ||
261 | #if defined(CONFIG_INET) && defined(CONFIG_SYSCTL) | ||
262 | update_bcastaddr(); | ||
263 | #endif | ||
264 | |||
265 | return 0; | 261 | return 0; |
266 | } | 262 | } |
267 | 263 | ||
@@ -269,6 +265,8 @@ void lasat_write_eeprom_info(void) | |||
269 | { | 265 | { |
270 | unsigned long crc; | 266 | unsigned long crc; |
271 | 267 | ||
268 | mutex_lock(&lasat_eeprom_mutex); | ||
269 | |||
272 | /* Generate the CRC */ | 270 | /* Generate the CRC */ |
273 | crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info), | 271 | crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info), |
274 | sizeof(struct lasat_eeprom_struct) - 4); | 272 | sizeof(struct lasat_eeprom_struct) - 4); |
@@ -277,4 +275,6 @@ void lasat_write_eeprom_info(void) | |||
277 | /* Write the EEPROM info */ | 275 | /* Write the EEPROM info */ |
278 | EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info, | 276 | EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info, |
279 | sizeof(struct lasat_eeprom_struct)); | 277 | sizeof(struct lasat_eeprom_struct)); |
278 | |||
279 | mutex_unlock(&lasat_eeprom_mutex); | ||
280 | } | 280 | } |