diff options
author | mjacob <mjacob@FreeBSD.org> | 2002-07-25 20:49:30 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2002-07-25 20:49:30 +0000 |
commit | deae793eceef2c2e5403957470affa62b5ee1f82 (patch) | |
tree | bc0e62cc81acfc084d4b92ab0e61c40c05ca2f8e | |
parent | d1f385cb3f7c055677718847828af75f71180718 (diff) | |
download | FreeBSD-src-deae793eceef2c2e5403957470affa62b5ee1f82.zip FreeBSD-src-deae793eceef2c2e5403957470affa62b5ee1f82.tar.gz |
Frequency default should be '25' for 25MHz, not 25000000.
Through the PITA of endiannness, clock has to be MHz freq << 8.
Don't trust NVRAM on SBus cards.
Set a default initiator ID sensibly.
SBus/ISP now working, what with the change to sbus.c earlier today.
-rw-r--r-- | sys/dev/isp/isp_sbus.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c index 64d1e08..1ed9730 100644 --- a/sys/dev/isp/isp_sbus.c +++ b/sys/dev/isp/isp_sbus.c @@ -206,9 +206,9 @@ isp_sbus_attach(device_t dev) */ freq = (freq + 500000)/1000000; } else { - freq = 25000000; + freq = 25; } - sbs->sbus_mdvec.dv_clock = freq; + sbs->sbus_mdvec.dv_clock = freq << 8; /* * Now figure out what the proper burst sizes, etc., to use. @@ -240,8 +240,15 @@ isp_sbus_attach(device_t dev) */ if (strcmp("PTI,ptisp", sbus_get_name(dev)) == 0 || strcmp("ptisp", sbus_get_name(dev)) == 0) { - sbs->sbus_mdvec.dv_ispfw = NULL; + isp->isp_confopts |= ISP_CFG_NORELOAD; } + + /* + * We don't trust NVRAM on SBus cards + */ + isp->isp_confopts |= ISP_CFG_NONVRAM; + + /* * Try and find firmware for this device. */ @@ -263,10 +270,19 @@ isp_sbus_attach(device_t dev) "fwload_disable", &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_NORELOAD; } - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), - "ignore_nvram", &tval) == 0 && tval != 0) { - isp->isp_confopts |= ISP_CFG_NONVRAM; + + isp->isp_osinfo.default_id = -1; + if (resource_int_value(device_get_name(dev), device_get_unit(dev), + "iid", &tval) == 0) { + isp->isp_osinfo.default_id = tval; + isp->isp_confopts |= ISP_CFG_OWNLOOPID; + } + if (isp->isp_osinfo.default_id == -1) { + /* + * XXX: should be a way to get properties w/o having + * XXX: to call OF_xxx functions + */ + isp->isp_osinfo.default_id = 7; } isp_debug = 0; |