Set ramsize depending on a value from eprom instead of using
hardcoded 128k for Yukon devices. 88E8001 only has 64k of on-chip RAM[1]. [1] http://www.marvell.com/products/pcconn/yukon/Yukon_88E8001_10_073103_final.pdf Tested by: amd64, current Approved by: rwatson (mentor) MFC after: 1 week
This commit is contained in:
parent
1ecf144493
commit
70502bea85
@ -1503,6 +1503,7 @@ skc_attach(dev)
|
||||
{
|
||||
struct sk_softc *sc;
|
||||
int unit, error = 0, rid, *port;
|
||||
uint8_t skrs;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
unit = device_get_unit(dev);
|
||||
@ -1563,9 +1564,10 @@ skc_attach(dev)
|
||||
/* Read and save vital product data from EEPROM. */
|
||||
sk_vpd_read(sc);
|
||||
|
||||
skrs = sk_win_read_1(sc, SK_EPROM0);
|
||||
if (sc->sk_type == SK_GENESIS) {
|
||||
/* Read and save RAM size and RAMbuffer offset */
|
||||
switch(sk_win_read_1(sc, SK_EPROM0)) {
|
||||
switch(skrs) {
|
||||
case SK_RAMSIZE_512K_64:
|
||||
sc->sk_ramsize = 0x80000;
|
||||
sc->sk_rboff = SK_RBOFF_0;
|
||||
@ -1588,8 +1590,12 @@ skc_attach(dev)
|
||||
error = ENXIO;
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
sc->sk_ramsize = 0x20000;
|
||||
} else { /* SK_YUKON */
|
||||
if (skrs == 0x00) {
|
||||
sc->sk_ramsize = 0x20000;
|
||||
} else {
|
||||
sc->sk_ramsize = skrs * (1<<12);
|
||||
}
|
||||
sc->sk_rboff = SK_RBOFF_0;
|
||||
}
|
||||
|
||||
|
@ -1503,6 +1503,7 @@ skc_attach(dev)
|
||||
{
|
||||
struct sk_softc *sc;
|
||||
int unit, error = 0, rid, *port;
|
||||
uint8_t skrs;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
unit = device_get_unit(dev);
|
||||
@ -1563,9 +1564,10 @@ skc_attach(dev)
|
||||
/* Read and save vital product data from EEPROM. */
|
||||
sk_vpd_read(sc);
|
||||
|
||||
skrs = sk_win_read_1(sc, SK_EPROM0);
|
||||
if (sc->sk_type == SK_GENESIS) {
|
||||
/* Read and save RAM size and RAMbuffer offset */
|
||||
switch(sk_win_read_1(sc, SK_EPROM0)) {
|
||||
switch(skrs) {
|
||||
case SK_RAMSIZE_512K_64:
|
||||
sc->sk_ramsize = 0x80000;
|
||||
sc->sk_rboff = SK_RBOFF_0;
|
||||
@ -1588,8 +1590,12 @@ skc_attach(dev)
|
||||
error = ENXIO;
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
sc->sk_ramsize = 0x20000;
|
||||
} else { /* SK_YUKON */
|
||||
if (skrs == 0x00) {
|
||||
sc->sk_ramsize = 0x20000;
|
||||
} else {
|
||||
sc->sk_ramsize = skrs * (1<<12);
|
||||
}
|
||||
sc->sk_rboff = SK_RBOFF_0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user