diff options
Diffstat (limited to 'arch/arm/plat-mxs')
-rw-r--r-- | arch/arm/plat-mxs/device.c | 18 | ||||
-rw-r--r-- | arch/arm/plat-mxs/dma-apbx.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxs/dmaengine.c | 12 | ||||
-rw-r--r-- | arch/arm/plat-mxs/include/mach/device.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-mxs/include/mach/dmaengine.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxs/include/mach/timex.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-mxs/timer-nomatch.c | 9 | ||||
-rw-r--r-- | arch/arm/plat-mxs/usb_common.c | 21 | ||||
-rw-r--r-- | arch/arm/plat-mxs/utmixc.c | 2 |
9 files changed, 11 insertions, 63 deletions
diff --git a/arch/arm/plat-mxs/device.c b/arch/arm/plat-mxs/device.c index e3783d3fe87d..027408950382 100644 --- a/arch/arm/plat-mxs/device.c +++ b/arch/arm/plat-mxs/device.c @@ -485,16 +485,6 @@ static struct platform_device mxs_persistent = { }; #endif -#ifdef CONFIG_FSL_OTP -static struct platform_device otp_device = { - .name = "ocotp", - .id = 0, - .dev = { - .release = mxs_nop_release, - }, -}; -#endif - static inline void mxs_init_busfreq(void) { (void)platform_device_register(&busfreq_device); @@ -576,14 +566,6 @@ static struct mxs_dev_lookup dev_lookup[] = { }, #endif -#if defined(CONFIG_FSL_OTP) - { - .name = "ocotp", - .size = 1, - .pdev = &otp_device, - }, -#endif - #if defined(CONFIG_FB_MXS) || defined(CONFIG_FB_MXS_MODULE) { .name = "mxs-fb", diff --git a/arch/arm/plat-mxs/dma-apbx.c b/arch/arm/plat-mxs/dma-apbx.c index 6d77a6933d98..c27414f8c18d 100644 --- a/arch/arm/plat-mxs/dma-apbx.c +++ b/arch/arm/plat-mxs/dma-apbx.c @@ -99,9 +99,6 @@ static void mxs_dma_apbx_info(struct mxs_dma_device *pdev, reg = __raw_readl(pdev->base + HW_APBX_CTRL2); info->status = reg >> chan; info->buf_addr = __raw_readl(pdev->base + HW_APBX_CHn_BAR(chan)); - reg = __raw_readl(pdev->base + HW_APBX_CHn_CMD(chan)); - info->xfer_count = (reg & BM_APBX_CHn_CMD_XFER_COUNT) >> \ - BP_APBX_CHn_CMD_XFER_COUNT; } static int diff --git a/arch/arm/plat-mxs/dmaengine.c b/arch/arm/plat-mxs/dmaengine.c index 0c2485b18506..52330d3ea9e3 100644 --- a/arch/arm/plat-mxs/dmaengine.c +++ b/arch/arm/plat-mxs/dmaengine.c @@ -127,16 +127,14 @@ int mxs_dma_enable(int channel) if (!(pchan->flags & MXS_DMA_FLAGS_ALLOCATED)) return -EINVAL; - /* - * neednot mutex lock, this function will be called in irq context. - * The mutex may cause process schedule. - */ pdma = pchan->dma; + mutex_lock(&mxs_dma_mutex); spin_lock_irqsave(&pchan->lock, flags); if (pchan->pending_num && pdma->enable) ret = pdma->enable(pchan, channel - pdma->chan_base); pchan->flags |= MXS_DMA_FLAGS_BUSY; spin_unlock_irqrestore(&pchan->lock, flags); + mutex_unlock(&mxs_dma_mutex); return ret; } EXPORT_SYMBOL(mxs_dma_enable); @@ -153,11 +151,8 @@ void mxs_dma_disable(int channel) return; if (!(pchan->flags & MXS_DMA_FLAGS_BUSY)) return; - /* - * neednot mutex lock, this function will be called in irq context. - * The mutex may cause process schedule. - */ pdma = pchan->dma; + mutex_lock(&mxs_dma_mutex); spin_lock_irqsave(&pchan->lock, flags); if (pdma->disable) pdma->disable(pchan, channel - pdma->chan_base); @@ -166,6 +161,7 @@ void mxs_dma_disable(int channel) pchan->pending_num = 0; list_splice_init(&pchan->active, &pchan->done); spin_unlock_irqrestore(&pchan->lock, flags); + mutex_unlock(&mxs_dma_mutex); } EXPORT_SYMBOL(mxs_dma_disable); diff --git a/arch/arm/plat-mxs/include/mach/device.h b/arch/arm/plat-mxs/include/mach/device.h index 199ec1e62963..9598ccdaa718 100644 --- a/arch/arm/plat-mxs/include/mach/device.h +++ b/arch/arm/plat-mxs/include/mach/device.h @@ -54,12 +54,6 @@ struct mxs_dma_plat_data { unsigned int chan_num; }; -struct fsl_otp_data { - char **fuse_name; - char *regulator_name; - unsigned int fuse_num; -}; - struct mxs_i2c_plat_data { unsigned int pioqueue_mode:1; }; diff --git a/arch/arm/plat-mxs/include/mach/dmaengine.h b/arch/arm/plat-mxs/include/mach/dmaengine.h index cdf6b1e32a43..eecd260ac5b4 100644 --- a/arch/arm/plat-mxs/include/mach/dmaengine.h +++ b/arch/arm/plat-mxs/include/mach/dmaengine.h @@ -106,7 +106,6 @@ struct mxs_dma_info { #define MXS_DMA_INFO_ERR 0x00000001 #define MXS_DMA_INFO_ERR_STAT 0x00010000 unsigned int buf_addr; - unsigned int xfer_count; }; /** diff --git a/arch/arm/plat-mxs/include/mach/timex.h b/arch/arm/plat-mxs/include/mach/timex.h index d622dda141f2..9db3d688223a 100644 --- a/arch/arm/plat-mxs/include/mach/timex.h +++ b/arch/arm/plat-mxs/include/mach/timex.h @@ -20,4 +20,4 @@ /* * System time clock is sourced from the 32k clock */ -#define CLOCK_TICK_RATE 32000 +#define CLOCK_TICK_RATE 32768 diff --git a/arch/arm/plat-mxs/timer-nomatch.c b/arch/arm/plat-mxs/timer-nomatch.c index db8906192f16..66c488c99b42 100644 --- a/arch/arm/plat-mxs/timer-nomatch.c +++ b/arch/arm/plat-mxs/timer-nomatch.c @@ -21,7 +21,6 @@ #include <linux/clocksource.h> #include <linux/clockchips.h> #include <linux/io.h> -#include <linux/clk.h> #include <linux/irq.h> #include <linux/interrupt.h> @@ -120,9 +119,9 @@ void mxs_nomatch_timer_init(struct mxs_sys_timer *timer) online_timer = timer; - cksrc_mxs_nomatch.mult = clocksource_hz2mult(clk_get_rate(timer->clk), + cksrc_mxs_nomatch.mult = clocksource_hz2mult(CLOCK_TICK_RATE, cksrc_mxs_nomatch.shift); - ckevt_timrot.mult = div_sc(clk_get_rate(timer->clk), NSEC_PER_SEC, + ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt_timrot.shift); ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot); ckevt_timrot.max_delta_ns = clockevent_delta2ns(0xFFF, &ckevt_timrot); @@ -146,7 +145,7 @@ void mxs_nomatch_timer_init(struct mxs_sys_timer *timer) BM_TIMROT_TIMCTRLn_IRQ_EN, online_timer->base + HW_TIMROT_TIMCTRLn(1)); - __raw_writel(clk_get_rate(timer->clk) / HZ - 1, + __raw_writel(CLOCK_TICK_RATE / HZ - 1, online_timer->base + HW_TIMROT_TIMCOUNTn(0)); __raw_writel(0xFFFF, online_timer->base + HW_TIMROT_TIMCOUNTn(1)); @@ -182,7 +181,7 @@ void mxs_nomatch_resume_timer(void) BM_TIMROT_TIMCTRLn_UPDATE | BM_TIMROT_TIMCTRLn_IRQ_EN, online_timer->base + HW_TIMROT_TIMCTRLn(1)); - __raw_writel(clk_get_rate(online_timer->clk) / HZ - 1, + __raw_writel(CLOCK_TICK_RATE / HZ - 1, online_timer->base + HW_TIMROT_TIMCOUNTn(0)); __raw_writel(0xFFFF, online_timer->base + HW_TIMROT_TIMCOUNTn(1)); } diff --git a/arch/arm/plat-mxs/usb_common.c b/arch/arm/plat-mxs/usb_common.c index 23134489472e..5d8d0b6d9285 100644 --- a/arch/arm/plat-mxs/usb_common.c +++ b/arch/arm/plat-mxs/usb_common.c @@ -264,16 +264,13 @@ int usbotg_init(struct platform_device *pdev) pdata->xcvr_type = xops->xcvr_type; pdata->pdev = pdev; + otg_used = 0; if (!otg_used) { pr_debug("%s: grab pins\n", __func__); if (xops->init) xops->init(xops); usb_phy_enable(pdata); } - /* Enable internal Phy clock */ - tmp = __raw_readl(pdata->regs + UOG_PORTSC1); - tmp &= ~PORTSC_PHCD; - __raw_writel(tmp, pdata->regs + UOG_PORTSC1); if (pdata->operating_mode == FSL_USB2_DR_HOST) { /* enable FS/LS device */ @@ -291,22 +288,11 @@ EXPORT_SYMBOL(usbotg_init); void usbotg_uninit(struct fsl_usb2_platform_data *pdata) { - int tmp; - struct clk *usb_clk; pr_debug("%s\n", __func__); if (pdata->xcvr_ops && pdata->xcvr_ops->uninit) pdata->xcvr_ops->uninit(pdata->xcvr_ops); - /* Disable internal Phy clock */ - tmp = __raw_readl(pdata->regs + UOG_PORTSC1); - tmp |= PORTSC_PHCD; - __raw_writel(tmp, pdata->regs + UOG_PORTSC1); - - usb_clk = clk_get(NULL, "usb_clk0"); - clk_disable(usb_clk); - clk_put(usb_clk); - pdata->regs = NULL; otg_used--; } @@ -345,16 +331,11 @@ EXPORT_SYMBOL(fsl_usb_host_init); void fsl_usb_host_uninit(struct fsl_usb2_platform_data *pdata) { - struct clk *usb_clk; pr_debug("%s\n", __func__); if (pdata->xcvr_ops && pdata->xcvr_ops->uninit) pdata->xcvr_ops->uninit(pdata->xcvr_ops); - usb_clk = clk_get(NULL, "usb_clk1"); - clk_disable(usb_clk); - clk_put(usb_clk); - pdata->regs = NULL; } EXPORT_SYMBOL(fsl_usb_host_uninit); diff --git a/arch/arm/plat-mxs/utmixc.c b/arch/arm/plat-mxs/utmixc.c index 8e842840e87a..8ad6bd4f3654 100644 --- a/arch/arm/plat-mxs/utmixc.c +++ b/arch/arm/plat-mxs/utmixc.c @@ -80,7 +80,7 @@ static void __exit utmixc_exit(void) #ifdef CONFIG_MXS_VBUS_CURRENT_DRAW fs_initcall(utmixc_init); #else - subsys_initcall(utmixc_init); + module_init(utmixc_init); #endif module_exit(utmixc_exit); |