Date: Mon, 02 Jul 2012 16:24:18 +0000 From: aleek@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r238815 - in soc2012/aleek/beaglexm-armv6/sys/arm/ti: . am37x Message-ID: <20120702162418.C52FE106566B@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: aleek Date: Mon Jul 2 16:24:17 2012 New Revision: 238815 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238815 Log: adapting MMC driver to beagleboard Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_gptimer_tc.c soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_mmchs.c Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_gptimer_tc.c ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_gptimer_tc.c Mon Jul 2 16:10:03 2012 (r238814) +++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_gptimer_tc.c Mon Jul 2 16:24:17 2012 (r238815) @@ -835,7 +835,6 @@ struct omap3_gptimer_softc *sc = device_get_softc(dev); omap3_gptimer_attach_common(dev); - //device_printf( dev, "Timer specyfic attaching...\n" ); /* Set the clock source for the timer, this is just a one to one * mapping of the clock id to timer, i.e. n=0 => GPTIMER1_CLK. */ Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_mmchs.c ============================================================================== --- soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_mmchs.c Mon Jul 2 16:10:03 2012 (r238814) +++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_mmchs.c Mon Jul 2 16:24:17 2012 (r238815) @@ -253,7 +253,7 @@ *(bus_addr_t *)arg = segs[0].ds_addr; } -#ifndef SOC_TI_AM335X +#if !defined(SOC_TI_AM335X) /** * ti_mmchs_dma_intr - interrupt handler for DMA events triggered by the controller * @ch: the dma channel number @@ -968,7 +968,7 @@ uint32_t hctl_reg; uint32_t con_reg; uint32_t sysctl_reg; -#ifndef SOC_TI_AM335X +#if !defined(SOC_TI_AM335X) && !defined(SOC_TI_AM37X) uint16_t mv; #endif unsigned long timeout; @@ -1011,12 +1011,12 @@ hctl_reg &= ~(MMCHS_HCTL_SDVS_MASK | MMCHS_HCTL_SDBP); if ((ios->vdd == -1) || (ios->vdd >= vdd_240)) { -#ifndef SOC_TI_AM335X +#if !defined(SOC_TI_AM335X) && !defined(SOC_TI_AM37X) mv = 3000; #endif hctl_reg |= MMCHS_HCTL_SDVS_V30; } else { -#ifndef SOC_TI_AM335X +#if !defined(SOC_TI_AM335X) && !defined(SOC_TI_AM37X) mv = 1800; #endif hctl_reg |= MMCHS_HCTL_SDVS_V18; @@ -1024,7 +1024,7 @@ ti_mmchs_write_4(sc, MMCHS_HCTL, hctl_reg); -#ifdef SOC_TI_AM335X +#if defined(SOC_TI_AM335X) || defined(SOC_TI_AM37X) printf("%s: TWL unimplemented\n", __func__); #else /* Set the desired voltage on the regulator */ @@ -1045,7 +1045,7 @@ hctl_reg = ti_mmchs_read_4(sc, MMCHS_HCTL); ti_mmchs_write_4(sc, MMCHS_HCTL, (hctl_reg & ~MMCHS_HCTL_SDBP)); -#ifdef SOC_TI_AM335X +#if defined(SOC_TI_AM335X) || defined(SOC_TI_AM37X) printf("%s: TWL unimplemented\n", __func__); #else /* Turn the power off on the voltage regulator */ @@ -1729,13 +1729,16 @@ #endif /* Activate the device */ + device_printf( dev, "Activating the device..." ); err = ti_mmchs_activate(dev); if (err) goto out; + device_printf( dev, "Initializing the device..." ); /* Initialise the controller */ ti_mmchs_hw_init(dev); + device_printf( dev, "Setting up interrupt the device..." ); /* Activate the interrupt and attach a handler */ err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, NULL, ti_mmchs_intr, sc, &sc->sc_irq_h); @@ -1751,6 +1754,7 @@ device_add_child(dev, "mmc", 0); device_set_ivars(dev, &sc->host); + device_printf( dev, "Attaching to bus..." ); err = bus_generic_attach(dev); out:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120702162418.C52FE106566B>