diff options
author | Matt Jacob <mjacob@FreeBSD.org> | 2002-07-25 20:49:30 +0000 |
---|---|---|
committer | Matt Jacob <mjacob@FreeBSD.org> | 2002-07-25 20:49:30 +0000 |
commit | e27721859252d0457d674a9292a88096a0c90f42 (patch) | |
tree | bc0e62cc81acfc084d4b92ab0e61c40c05ca2f8e | |
parent | 43722a425a8eef82b1533244f4e11131763d2f1c (diff) | |
download | src-e27721859252d0457d674a9292a88096a0c90f42.tar.gz src-e27721859252d0457d674a9292a88096a0c90f42.zip |
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.
Notes
Notes:
svn path=/head/; revision=100690
-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 64d1e08d278e..1ed97306df1b 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; |