From owner-svn-soc-all@freebsd.org Fri Aug 7 16:13:27 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9780E9B421F for ; Fri, 7 Aug 2015 16:13:27 +0000 (UTC) (envelope-from pratiksinghal@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 663657DA for ; Fri, 7 Aug 2015 16:13:27 +0000 (UTC) (envelope-from pratiksinghal@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id t77GDRU8013018 for ; Fri, 7 Aug 2015 16:13:27 GMT (envelope-from pratiksinghal@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id t77GDQg8013002 for svn-soc-all@FreeBSD.org; Fri, 7 Aug 2015 16:13:26 GMT (envelope-from pratiksinghal@FreeBSD.org) Date: Fri, 7 Aug 2015 16:13:26 GMT Message-Id: <201508071613.t77GDQg8013002@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to pratiksinghal@FreeBSD.org using -f From: pratiksinghal@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r289344 - in soc2015/pratiksinghal/cubie-head/sys: arm/allwinner boot/fdt/dts/arm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2015 16:13:27 -0000 Author: pratiksinghal Date: Fri Aug 7 16:13:25 2015 New Revision: 289344 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=289344 Log: Device now being recognized and getting resetted properly. Modified: soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_ac97.c soc2015/pratiksinghal/cubie-head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi Modified: soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_ac97.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_ac97.c Fri Aug 7 14:38:26 2015 (r289343) +++ soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_ac97.c Fri Aug 7 16:13:25 2015 (r289344) @@ -72,12 +72,9 @@ static int ac97_probe(device_t dev) { - if (!ofw_bus_status_okay(dev)) - return (ENXIO); if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-ac97")) return (ENXIO); device_set_desc(dev, "Allwinner AC97 Controller"); - return (BUS_PROBE_DEFAULT); } @@ -118,8 +115,6 @@ mtx_init(&sc->ac97_mtx, device_get_nameunit(dev), "a10_ac97", MTX_DEF); - device_printf(dev,"Before resetting device"); - uint32_t val,total; AC97_WRITE(sc, AC_CTL, AC_WARM_RST); total = 0; @@ -136,7 +131,8 @@ if (total > 40) device_printf(dev, "Device timedout\n"); else - device_printf(dev, "Device reset succesfully after %d seconds\n",total); + device_printf(dev, "Device reset succesfully\n"); + sc->ienab = AC_CODEC_READY_INT_EN; AC97_WRITE(sc, AC_INT, 0); AC97_WRITE(sc, AC_INT, sc->ienab); @@ -176,4 +172,4 @@ sizeof(struct a10_ac97_info) }; -DRIVER_MODULE(a10_ac97, pci, a10_ac97_driver, a10_ac97_devclass, 0, 0); +DRIVER_MODULE(a10_ac97, simplebus, a10_ac97_driver, a10_ac97_devclass, 0, 0); Modified: soc2015/pratiksinghal/cubie-head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi ============================================================================== --- soc2015/pratiksinghal/cubie-head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi Fri Aug 7 14:38:26 2015 (r289343) +++ soc2015/pratiksinghal/cubie-head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi Fri Aug 7 16:13:25 2015 (r289344) @@ -129,8 +129,8 @@ ac97@01c21400 { compatible = "allwinner,sun4i-a10-ac97"; - reg = <0x01C214000 0x1000>; - interrupts = <46>; + reg = <0x01c21400 0x1000>; + interrupts = <14>; interrupt-parent = <&AINTC>; status = "disabled"; };