Date: Fri, 7 Aug 2015 16:13:26 GMT 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 Message-ID: <201508071613.t77GDQg8013002@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508071613.t77GDQg8013002>