Date: Wed, 20 Jan 2016 14:21:06 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294435 - in head/sys/arm: conf mv Message-ID: <201601201421.u0KEL62j076007@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Wed Jan 20 14:21:06 2016 New Revision: 294435 URL: https://svnweb.freebsd.org/changeset/base/294435 Log: Add support for I2C on Armada38x Extend driver's compatible strings' table and enable I2C compilation in kernconf. Reviewed by: andrew, ian Obtained from: Semihalf Sponsored by: Stormshield Submitted by: Jan Dabros <jsd@semihalf.com> Differential revision: https://reviews.freebsd.org/D4422 Modified: head/sys/arm/conf/ARMADA38X head/sys/arm/mv/twsi.c Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Wed Jan 20 14:18:49 2016 (r294434) +++ head/sys/arm/conf/ARMADA38X Wed Jan 20 14:21:06 2016 (r294435) @@ -72,6 +72,10 @@ device scbus device pass device da +# I2C +device iic +device iicbus + #FDT options FDT options FDT_DTB_STATIC Modified: head/sys/arm/mv/twsi.c ============================================================================== --- head/sys/arm/mv/twsi.c Wed Jan 20 14:18:49 2016 (r294434) +++ head/sys/arm/mv/twsi.c Wed Jan 20 14:21:06 2016 (r294435) @@ -141,6 +141,12 @@ static struct resource_spec res_spec[] = { -1, 0 } }; +static struct ofw_compat_data compat_data[] = { + { "mrvl,twsi", true }, + { "marvell,mv64xxx-i2c", true }, + { NULL, false } +}; + static device_method_t mv_twsi_methods[] = { /* device interface */ DEVMETHOD(device_probe, mv_twsi_probe), @@ -308,7 +314,7 @@ mv_twsi_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "mrvl,twsi")) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); device_set_desc(dev, "Marvell Integrated I2C Bus Controller");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601201421.u0KEL62j076007>