Date: Sun, 13 Aug 2017 22:07:42 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322476 - in head/sys: conf dev/iicbus mips/conf mips/rmi Message-ID: <201708132207.v7DM7ggO092324@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Sun Aug 13 22:07:42 2017 New Revision: 322476 URL: https://svnweb.freebsd.org/changeset/base/322476 Log: Remove the old ds1374 driver and use the ds13rtc driver instead. Adjust several mips config files accordingly. Deleted: head/sys/dev/iicbus/ds1374.c Modified: head/sys/conf/NOTES head/sys/conf/files head/sys/mips/conf/XLP.hints head/sys/mips/conf/XLR head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/conf/std.XLP head/sys/mips/rmi/xlr_i2c.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/conf/NOTES Sun Aug 13 22:07:42 2017 (r322476) @@ -2524,7 +2524,6 @@ device iicoc # OpenCores I2C controller support # I2C peripheral devices # device ds1307 # Dallas DS1307 RTC and compatible -device ds1374 # Dallas DS1374 RTC device ds13rtc # All Dallas/Maxim ds13xx chips device ds1672 # Dallas DS1672 RTC device ds3231 # Dallas DS3231 RTC + temperature Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/conf/files Sun Aug 13 22:07:42 2017 (r322476) @@ -1752,8 +1752,7 @@ dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ds1307.c optional ds1307 -dev/iicbus/ds1374.c optional ds1374 -dev/iicbus/ds13rtc.c optional ds13rtc | ds133x +dev/iicbus/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/ds1672.c optional ds1672 dev/iicbus/ds3231.c optional ds3231 dev/iicbus/icee.c optional icee Modified: head/sys/mips/conf/XLP.hints ============================================================================== --- head/sys/mips/conf/XLP.hints Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/mips/conf/XLP.hints Sun Aug 13 22:07:42 2017 (r322476) @@ -1,5 +1,6 @@ # $FreeBSD$ # RTC -hint.ds1374_rtc.0.at="iicbus1" -hint.ds1374_rtc.0.addr=0xd0 +hint.ds13rtc.0.at="iicbus1" +hint.ds13rtc.0.addr=0xd0 +hint.ds13rtc.0.compatible="dallas,ds1374" Modified: head/sys/mips/conf/XLR ============================================================================== --- head/sys/mips/conf/XLR Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/mips/conf/XLR Sun Aug 13 22:07:42 2017 (r322476) @@ -136,7 +136,7 @@ device ic device iic device iicbb device iicbus -device ds1374 # RTC on XLR boards +device ds13rtc # RTC on XLR boards device max6657 # Temparature sensor on XLR boards device at24co2n # EEPROM on XLR boards Modified: head/sys/mips/conf/XLR64 ============================================================================== --- head/sys/mips/conf/XLR64 Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/mips/conf/XLR64 Sun Aug 13 22:07:42 2017 (r322476) @@ -110,7 +110,7 @@ device ic device iic device iicbb device iicbus -device ds1374 # RTC on XLR boards +device ds13rtc # RTC on XLR boards device max6657 # Temparature sensor on XLR boards device at24co2n # EEPROM on XLR boards Modified: head/sys/mips/conf/XLRN32 ============================================================================== --- head/sys/mips/conf/XLRN32 Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/mips/conf/XLRN32 Sun Aug 13 22:07:42 2017 (r322476) @@ -114,7 +114,7 @@ device ic device iic device iicbb device iicbus -device ds1374 # RTC on XLR boards +device ds13rtc # RTC on XLR boards device max6657 # Temparature sensor on XLR boards device at24co2n # EEPROM on XLR boards Modified: head/sys/mips/conf/std.XLP ============================================================================== --- head/sys/mips/conf/std.XLP Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/mips/conf/std.XLP Sun Aug 13 22:07:42 2017 (r322476) @@ -95,7 +95,7 @@ device umass # Requires scbus and da device iic device iicbus device iicoc -device ds1374 # RTC on XLP boards +device ds13rtc # RTC on XLP boards # Crypto device crypto Modified: head/sys/mips/rmi/xlr_i2c.c ============================================================================== --- head/sys/mips/rmi/xlr_i2c.c Sun Aug 13 21:45:46 2017 (r322475) +++ head/sys/mips/rmi/xlr_i2c.c Sun Aug 13 22:07:42 2017 (r322476) @@ -187,7 +187,7 @@ xlr_i2c_attach(device_t dev) return -1; } if(xlr_board_info.xlr_i2c_device[I2C_RTC].enabled == 1) { - tmpd = device_add_child(sc->iicbus, "ds1374_rtc", 0); + tmpd = device_add_child(sc->iicbus, "ds13rtc", 0); device_set_ivars(tmpd, &xlr_board_info.xlr_i2c_device[I2C_RTC]); } if(xlr_board_info.xlr_i2c_device[I2C_THERMAL].enabled == 1) { @@ -198,6 +198,16 @@ xlr_i2c_attach(device_t dev) tmpd = device_add_child(sc->iicbus, "at24co2n", 0); device_set_ivars(tmpd, &xlr_board_info.xlr_i2c_device[I2C_EEPROM]); } + + /* + * The old ds1374 rtc driver only handled one chip type. The new + * ds13rtc driver handles all ds13xx chips, but must be told the chip + * type via hints. XLR historically hasn't had a standard hints file, + * so set up the hint now if it isn't already there. + */ +#define HINTNAME "hint.ds13rtc.0.compatible" + if (!testenv(HINTNAME)) + kern_setenv(HINTNAME, "dallas,ds1374"); bus_generic_attach(dev);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708132207.v7DM7ggO092324>