Module Name: src Committed By: riastradh Date: Sun Aug 16 03:48:59 UTC 2020
Modified Files: src/sys/arch/arm/ti: ti_iic.c Log Message: Initialize the i2c controller before using it. Fixes mutex uninitialized panic in LOCKDEBUG. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/ti/ti_iic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/ti/ti_iic.c diff -u src/sys/arch/arm/ti/ti_iic.c:1.6 src/sys/arch/arm/ti/ti_iic.c:1.7 --- src/sys/arch/arm/ti/ti_iic.c:1.6 Wed Jun 3 16:00:00 2020 +++ src/sys/arch/arm/ti/ti_iic.c Sun Aug 16 03:48:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_iic.c,v 1.6 2020/06/03 16:00:00 jmcneill Exp $ */ +/* $NetBSD: ti_iic.c,v 1.7 2020/08/16 03:48:59 riastradh Exp $ */ /* * Copyright (c) 2013 Manuel Bouyer. All rights reserved. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.6 2020/06/03 16:00:00 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.7 2020/08/16 03:48:59 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -265,6 +265,7 @@ ti_iic_attach(device_t parent, device_t mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE); mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_NET); cv_init(&sc->sc_cv, "tiiic"); + iic_tag_init(&sc->sc_ic); sc->sc_ic.ic_cookie = sc; sc->sc_ic.ic_acquire_bus = ti_iic_acquire_bus; sc->sc_ic.ic_release_bus = ti_iic_release_bus;