Skip to content

Commit

Permalink
DM9000: Remove EEPROM initialisation code.
Browse files Browse the repository at this point in the history
Remove the old hack to program an initial EEPROM setting
into the DM9000 as we now have ethtool support for reading
and writing the EEPROM.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Ben Dooks authored and Jeff Garzik committed Feb 11, 2008
1 parent e662ee0 commit 3927f1c
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ static void dm9000_write_eeprom(board_info_t *, int addr, u8 *dp);
static void dm9000_rx(struct net_device *);
static void dm9000_hash_table(struct net_device *);

//#define DM9000_PROGRAM_EEPROM
#ifdef DM9000_PROGRAM_EEPROM
static void program_eeprom(board_info_t * db);
#endif
/* DM9000 network board routine ---------------------------- */

static void
Expand Down Expand Up @@ -699,9 +695,6 @@ dm9000_probe(struct platform_device *pdev)
ndev->poll_controller = &dm9000_poll_controller;
#endif

#ifdef DM9000_PROGRAM_EEPROM
program_eeprom(db);
#endif
db->msg_enable = NETIF_MSG_LINK;
db->mii.phy_id_mask = 0x1f;
db->mii.reg_num_mask = 0x1f;
Expand Down Expand Up @@ -1112,28 +1105,6 @@ dm9000_write_eeprom(board_info_t *db, int offset, u8 *data)
mutex_unlock(&db->addr_lock);
}

#ifdef DM9000_PROGRAM_EEPROM
/*
* Only for development:
* Here we write static data to the eeprom in case
* we don't have valid content on a new board
*/
static void
program_eeprom(board_info_t * db)
{
u16 eeprom[] = { 0x0c00, 0x007f, 0x1300, /* MAC Address */
0x0000, /* Autoload: accept nothing */
0x0a46, 0x9000, /* Vendor / Product ID */
0x0000, /* pin control */
0x0000,
}; /* Wake-up mode control */
int i;
for (i = 0; i < 8; i++)
write_srom_word(db, i, eeprom[i]);
}
#endif


/*
* Calculate the CRC valude of the Rx packet
* flag = 1 : return the reverse CRC (for the received packet CRC)
Expand Down

0 comments on commit 3927f1c

Please sign in to comment.