diff options
author | Rob Herring <r.herring@freescale.com> | 2008-02-12 10:33:49 -0600 |
---|---|---|
committer | Daniel Schaeffer <daniel.schaeffer@timesys.com> | 2008-08-25 15:20:30 -0400 |
commit | 4d822426876cb94198cdea6d67fea3efd61317b4 (patch) | |
tree | be2af6f32ca4e6a64c09bfb732bb8f9a6f433474 /drivers | |
parent | 3f8ed3afb9cee6648f9650d5daf950bb9347cca6 (diff) |
ENGR00065563 Driver and MSL updates for 2.6.24
Diffstat (limited to 'drivers')
37 files changed, 127 insertions, 189 deletions
diff --git a/drivers/ide/arm/mxc_ide.c b/drivers/ide/arm/mxc_ide.c index 142702245a5f..b09708d6af2a 100644 --- a/drivers/ide/arm/mxc_ide.c +++ b/drivers/ide/arm/mxc_ide.c @@ -858,7 +858,8 @@ static void mxc_ide_dma_init(ide_hwif_t * hwif) hwif->dmatable_cpu = NULL; hwif->dmatable_dma = 0; - hwif->speedproc = mxc_ide_set_speed; + hwif->set_dma_mode = mxc_ide_set_speed; + hwif->set_pio_mode = mxc_ide_set_speed; hwif->resetproc = mxc_ide_resetproc; hwif->autodma = 0; diff --git a/drivers/input/keyboard/mxc_keyb.c b/drivers/input/keyboard/mxc_keyb.c index cbc7141e7e39..13d37608350f 100644 --- a/drivers/input/keyboard/mxc_keyb.c +++ b/drivers/input/keyboard/mxc_keyb.c @@ -783,9 +783,9 @@ static int mxc_kpp_probe(struct platform_device *pdev) keypad->irq = irq; retval = request_irq(irq, mxc_kpp_interrupt, 0, MOD_NAME, MOD_NAME); if (retval) { - pr_debug("KPP: request_irq(%d) returned error %d\n", INT_KPP, - retval); - return -1; + pr_debug("KPP: request_irq(%d) returned error %d\n", + MXC_INT_KPP, retval); + return retval; } /* Enable keypad clock */ @@ -835,16 +835,21 @@ static int mxc_kpp_probe(struct platform_device *pdev) if ((keypad->matrix == (void *)0) || (mxckpd_keycodes_size == 0)) { - free_irq(irq, MOD_NAME); - return -ENODEV; + retval = -ENODEV; + goto err1; } mxckbd_dev = input_allocate_device(); if (!mxckbd_dev) { printk(KERN_ERR "mxckbd_dev: not enough memory for input device\n"); - free_irq(irq, MOD_NAME); - return -ENOMEM; + retval = -ENOMEM; + goto err1; + } + + retval = input_register_device(mxckbd_dev); + if (retval < 0) { + goto err2; } mxckbd_dev->keycode = &mxckpd_keycodes; @@ -862,9 +867,8 @@ static int mxc_kpp_probe(struct platform_device *pdev) kmalloc(kpp_dev.kpp_rows * sizeof(release_scancode[0]), GFP_KERNEL); if (!press_scancode || !release_scancode) { - free_irq(irq, MOD_NAME); - mxc_kpp_free_allocated(); - return -1; + retval = -ENOMEM; + goto err3; } for (i = 0; i < kpp_dev.kpp_rows; i++) { @@ -876,9 +880,8 @@ static int mxc_kpp_probe(struct platform_device *pdev) GFP_KERNEL); if (!press_scancode[i] || !release_scancode[i]) { - free_irq(irq, MOD_NAME); - mxc_kpp_free_allocated(); - return -1; + retval = -ENOMEM; + goto err3; } } @@ -888,9 +891,8 @@ static int mxc_kpp_probe(struct platform_device *pdev) kmalloc(kpp_dev.kpp_rows * sizeof(prev_rcmap[0]), GFP_KERNEL); if (!cur_rcmap || !prev_rcmap) { - free_irq(irq, MOD_NAME); - mxc_kpp_free_allocated(); - return -1; + retval = -ENOMEM; + goto err3; } __set_bit(EV_KEY, mxckbd_dev->evbit); @@ -911,13 +913,21 @@ static int mxc_kpp_probe(struct platform_device *pdev) /* Initialize the polling timer */ init_timer(&kpp_dev.poll_timer); - input_register_device(mxckbd_dev); - /* By default, devices should wakeup if they can */ /* So keypad is set as "should wakeup" as it can */ device_init_wakeup(&pdev->dev, 1); return 0; + + err3: + mxc_kpp_free_allocated(); + err2: + input_free_device(mxckbd_dev); + err1: + free_irq(irq, MOD_NAME); + clk_disable(kpp_clk); + clk_put(kpp_clk); + return retval; } /*! diff --git a/drivers/input/keyboard/mxc_keyb.h b/drivers/input/keyboard/mxc_keyb.h index 853c0005e50e..d231eef50088 100644 --- a/drivers/input/keyboard/mxc_keyb.h +++ b/drivers/input/keyboard/mxc_keyb.h @@ -33,7 +33,7 @@ /*! * Keypad irq number */ -#define KPP_IRQ INT_KPP +#define KPP_IRQ MXC_INT_KPP /*! * XLATE mode selection diff --git a/drivers/input/touchscreen/mxc_ts.c b/drivers/input/touchscreen/mxc_ts.c index a2c2a3bb6e09..514f73082bfe 100644 --- a/drivers/input/touchscreen/mxc_ts.c +++ b/drivers/input/touchscreen/mxc_ts.c @@ -66,6 +66,8 @@ static int ts_thread(void *arg) static int __init mxc_ts_init(void) { + int retval; + mxc_inputdev = input_allocate_device(); if (!mxc_inputdev) { printk(KERN_ERR @@ -74,10 +76,15 @@ static int __init mxc_ts_init(void) } mxc_inputdev->name = MXC_TS_NAME; - mxc_inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); - mxc_inputdev->keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH); - mxc_inputdev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE); - input_register_device(mxc_inputdev); + mxc_inputdev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); + mxc_inputdev->keybit[BIT_WORD(BTN_TOUCH)] |= BIT_MASK(BTN_TOUCH); + mxc_inputdev->absbit[0] = + BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) | BIT_MASK(ABS_PRESSURE); + retval = input_register_device(mxc_inputdev); + if (retval < 0) { + input_free_device(mxc_inputdev); + return retval; + } input_ts_installed = 1; kernel_thread(ts_thread, NULL, CLONE_VM | CLONE_FS); diff --git a/drivers/media/video/mxc/capture/mx27_csi.c b/drivers/media/video/mxc/capture/mx27_csi.c index 0ff86510d83c..e0dc78d71d2c 100644 --- a/drivers/media/video/mxc/capture/mx27_csi.c +++ b/drivers/media/video/mxc/capture/mx27_csi.c @@ -303,7 +303,7 @@ int32_t __init csi_init_module(void) csihw_reset(); /* interrupt enable */ - ret = request_irq(INT_CSI, csi_irq_handler, 0, "csi", 0); + ret = request_irq(MXC_INT_CSI, csi_irq_handler, 0, "csi", 0); if (ret) pr_debug("CSI error: irq request fail\n"); @@ -313,7 +313,7 @@ int32_t __init csi_init_module(void) void __exit csi_cleanup_module(void) { /* free irq */ - free_irq(INT_CSI, 0); + free_irq(MXC_INT_CSI, 0); clk_disable(&csi_mclk); } diff --git a/drivers/media/video/mxc/capture/mx27_prpsw.c b/drivers/media/video/mxc/capture/mx27_prpsw.c index 1f93e32d36c1..ce7db16913ec 100644 --- a/drivers/media/video/mxc/capture/mx27_prpsw.c +++ b/drivers/media/video/mxc/capture/mx27_prpsw.c @@ -331,8 +331,8 @@ static irqreturn_t prp_isr(int irq, void *dev_id) */ int prp_init(void *dev_id) { - enable_irq(INT_EMMAPRP); - if (request_irq(INT_EMMAPRP, prp_isr, 0, prp_dev, dev_id)) + enable_irq(MXC_INT_EMMAPRP); + if (request_irq(MXC_INT_EMMAPRP, prp_isr, 0, prp_dev, dev_id)) return -1; prphw_init(); @@ -346,8 +346,8 @@ int prp_init(void *dev_id) void prp_exit(void *dev_id) { prphw_exit(); - disable_irq(INT_EMMAPRP); - free_irq(INT_EMMAPRP, dev_id); + disable_irq(MXC_INT_EMMAPRP); + free_irq(MXC_INT_EMMAPRP, dev_id); } /*! diff --git a/drivers/media/video/mxc/capture/mx27_v4l2_capture.c b/drivers/media/video/mxc/capture/mx27_v4l2_capture.c index e6045f609b50..e9bd1710ac1c 100644 --- a/drivers/media/video/mxc/capture/mx27_v4l2_capture.c +++ b/drivers/media/video/mxc/capture/mx27_v4l2_capture.c @@ -1746,7 +1746,6 @@ static struct video_device mxc_v4l_template = { .name = "Mxc Camera", .type = 0, .type2 = VID_TYPE_CAPTURE, - .hardware = 0, .fops = &mxc_v4l_fops, .release = video_device_release, }; diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c index 04c52e0a9bea..381b654056f2 100644 --- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c +++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c @@ -1545,7 +1545,6 @@ static struct video_device mxc_v4l_template = { .name = "Mxc Camera", .type = 0, .type2 = VID_TYPE_CAPTURE, - .hardware = 0, .fops = &mxc_v4l_fops, .release = video_device_release, }; diff --git a/drivers/media/video/mxc/output/mx27_pp.c b/drivers/media/video/mxc/output/mx27_pp.c index 7d2785a71faf..a82328015fe2 100644 --- a/drivers/media/video/mxc/output/mx27_pp.c +++ b/drivers/media/video/mxc/output/mx27_pp.c @@ -125,8 +125,8 @@ int pp_init(vout_data * vout) { pphw_init(); pphw_enable(0); - enable_irq(INT_EMMAPP); - return request_irq(INT_EMMAPP, pp_isr, 0, pp_dev, vout); + enable_irq(MXC_INT_EMMAPP); + return request_irq(MXC_INT_EMMAPP, pp_isr, 0, pp_dev, vout); } /*! @@ -135,8 +135,8 @@ int pp_init(vout_data * vout) */ void pp_exit(vout_data * vout) { - disable_irq(INT_EMMAPP); - free_irq(INT_EMMAPP, vout); + disable_irq(MXC_INT_EMMAPP); + free_irq(MXC_INT_EMMAPP, vout); pphw_enable(0); pphw_exit(); } diff --git a/drivers/media/video/mxc/output/mx27_v4l2_output.c b/drivers/media/video/mxc/output/mx27_v4l2_output.c index 144454a4faca..3eebafd297fa 100644 --- a/drivers/media/video/mxc/output/mx27_v4l2_output.c +++ b/drivers/media/video/mxc/output/mx27_v4l2_output.c @@ -1301,7 +1301,6 @@ static struct video_device mxc_v4l2out_template = { .name = "MXC Video Output", .type = 0, .type2 = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING, - .hardware = 39, .fops = &mxc_v4l2out_fops, .release = video_device_release, }; diff --git a/drivers/media/video/mxc/output/mxc_v4l2_output.c b/drivers/media/video/mxc/output/mxc_v4l2_output.c index 08b0be63b2d7..459a61283341 100644 --- a/drivers/media/video/mxc/output/mxc_v4l2_output.c +++ b/drivers/media/video/mxc/output/mxc_v4l2_output.c @@ -1554,7 +1554,6 @@ static struct video_device mxc_v4l2out_template = { .name = "MXC Video Output", .type = 0, .type2 = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING, - .hardware = 0, .fops = &mxc_v4l2out_fops, .release = video_device_release, }; diff --git a/drivers/mmc/host/mxc_mmc.c b/drivers/mmc/host/mxc_mmc.c index 29d23824c1a8..c49ec20ea361 100644 --- a/drivers/mmc/host/mxc_mmc.c +++ b/drivers/mmc/host/mxc_mmc.c @@ -579,11 +579,11 @@ static int mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) if (stat & STATUS_TIME_OUT_RESP) { __raw_writel(STATUS_TIME_OUT_RESP, host->base + MMC_STATUS); pr_debug("%s: CMD TIMEOUT\n", DRIVER_NAME); - cmd->error = MMC_ERR_TIMEOUT; + cmd->error = -ETIMEDOUT; } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) { __raw_writel(STATUS_RESP_CRC_ERR, host->base + MMC_STATUS); printk(KERN_ERR "%s: cmd crc error\n", DRIVER_NAME); - cmd->error = MMC_ERR_BADCRC; + cmd->error = -EILSEQ; } /* Read response from the card */ @@ -614,7 +614,7 @@ static int mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) pr_debug("%s: 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", DRIVER_NAME, cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]); - if (!host->data || cmd->error != MMC_ERR_NONE) { + if (!host->data || cmd->error) { /* complete the command */ mxcmci_finish_request(host, host->req); return 1; @@ -629,8 +629,7 @@ static int mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) } #endif /* Use PIO tranfer of data */ - buf = - (unsigned long *)(page_address(data->sg->page) + data->sg->offset); + buf = (unsigned long *)sg_virt(data->sg); buf8 = (u8 *) buf; /* calculate the number of bytes requested for transfer */ @@ -665,12 +664,12 @@ static int mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) status = __raw_readl(host->base + MMC_STATUS); if (status & STATUS_TIME_OUT_READ) { pr_debug("%s: Read time out occurred\n", DRIVER_NAME); - data->error = MMC_ERR_TIMEOUT; + data->error = -ETIMEDOUT; __raw_writel(STATUS_TIME_OUT_READ, host->base + MMC_STATUS); } else if (status & STATUS_READ_CRC_ERR) { pr_debug("%s: Read CRC error occurred\n", DRIVER_NAME); - data->error = MMC_ERR_BADCRC; + data->error = -EILSEQ; __raw_writel(STATUS_READ_CRC_ERR, host->base + MMC_STATUS); } @@ -700,7 +699,7 @@ static int mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) status = __raw_readl(host->base + MMC_STATUS); if (status & STATUS_WRITE_CRC_ERR) { pr_debug("%s: Write CRC error occurred\n", DRIVER_NAME); - data->error = MMC_ERR_BADCRC; + data->error = -EILSEQ; __raw_writel(STATUS_WRITE_CRC_ERR, host->base + MMC_STATUS); } @@ -747,7 +746,7 @@ static int mxcmci_data_done(struct mxcmci_host *host, unsigned int stat) host->data = NULL; data->bytes_xfered = host->dma_size; - if (host->req->stop && data->error == MMC_ERR_NONE) { + if (host->req->stop && !(data->error)) { mxcmci_start_cmd(host, host->req->stop, 0); } else { mxcmci_finish_request(host, host->req); @@ -1072,13 +1071,13 @@ static void mxcmci_dma_irq(void *devid, int error, unsigned int cnt) if (status & STATUS_TIME_OUT_READ) { pr_debug("%s: Read time out occurred\n", DRIVER_NAME); - data->error = MMC_ERR_TIMEOUT; + data->error = -ETIMEDOUT; __raw_writel(STATUS_TIME_OUT_READ, host->base + MMC_STATUS); } else if (status & STATUS_READ_CRC_ERR) { pr_debug("%s: Read CRC error occurred\n", DRIVER_NAME); - data->error = MMC_ERR_BADCRC; + data->error = -EILSEQ; __raw_writel(STATUS_READ_CRC_ERR, host->base + MMC_STATUS); } @@ -1091,7 +1090,7 @@ static void mxcmci_dma_irq(void *devid, int error, unsigned int cnt) if (status & STATUS_WRITE_CRC_ERR) { pr_debug("%s: Write CRC error occurred\n", DRIVER_NAME); - data->error = MMC_ERR_BADCRC; + data->error = -EILSEQ; __raw_writel(STATUS_WRITE_CRC_ERR, host->base + MMC_STATUS); } @@ -1099,7 +1098,7 @@ static void mxcmci_dma_irq(void *devid, int error, unsigned int cnt) host->base + MMC_STATUS); } } else { - data->error = MMC_ERR_FAILED; + data->error = -EIO; pr_debug("%s:%d: MXC MMC DMA transfer failed.\n", __FUNCTION__, __LINE__); } diff --git a/drivers/mtd/nand/mxc_nd.c b/drivers/mtd/nand/mxc_nd.c index f244436afd16..1e9d5564a8d6 100644 --- a/drivers/mtd/nand/mxc_nd.c +++ b/drivers/mtd/nand/mxc_nd.c @@ -209,10 +209,6 @@ static void send_prog_page(u8 buf_id, bool bSpareOnly) if (!is2k_Pagesize) { if (bSpareOnly) { NFC_CONFIG1 |= NFC_SP_EN; - /* Workaround ecc status register error for spare-only read */ - if (cpu_is_mxc91131_rev(CHIP_REV_2_0) >= 1) { - NFC_CONFIG1 &= ~(NFC_SP_EN); - } } else { NFC_CONFIG1 &= ~(NFC_SP_EN); } @@ -366,10 +362,6 @@ static void send_read_page(u8 buf_id, bool bSpareOnly) if (!is2k_Pagesize) { if (bSpareOnly) { NFC_CONFIG1 |= NFC_SP_EN; - /* Workaround ecc status register error for spare-only read */ - if (cpu_is_mxc91131_rev(CHIP_REV_2_0) >= 1) { - NFC_CONFIG1 &= ~(NFC_SP_EN); - } } else { NFC_CONFIG1 &= ~(NFC_SP_EN); } @@ -386,13 +378,7 @@ static void send_read_page(u8 buf_id, bool bSpareOnly) NFC for the second page. Correct single bit error in driver */ - /* Removed NFC workaround in MXC91231-P2.1 */ - if (cpu_is_mxc91231_rev(CHIP_REV_2_1) < 0) { - mxc_nd_correct_ecc(buf_id, bSpareOnly); - } else { - mxc_nd_correct_ecc(buf_id, bSpareOnly); - } - + mxc_nd_correct_ecc(buf_id, bSpareOnly); } /*! @@ -1162,7 +1148,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) NFC_CONFIG1 |= NFC_INT_MSK; init_waitqueue_head(&irq_waitq); - err = request_irq(INT_NANDFC, mxc_nfc_irq, 0, "mxc_nd", NULL); + err = request_irq(MXC_INT_NANDFC, mxc_nfc_irq, 0, "mxc_nd", NULL); if (err) { goto out_1; } @@ -1191,10 +1177,6 @@ static int __init mxcnd_probe(struct platform_device *pdev) NFC_UNLOCKSTART_BLKADDR = 0x0; NFC_UNLOCKEND_BLKADDR = 0x4000; - /* support for One Flash Clock cycle new in rev 2.0 */ - if (cpu_is_mxc91131_rev(CHIP_REV_2_0) >= 1) { - NFC_CONFIG1 |= (NFC_ONE_CYCLE); - } /* Unlock Block Command for given address range */ NFC_WRPROT = 0x4; @@ -1262,7 +1244,7 @@ static int __exit mxcnd_remove(struct platform_device *pdev) if (mxc_nand_data) { nand_release(mtd); - free_irq(INT_NANDFC, NULL); + free_irq(MXC_INT_NANDFC, NULL); kfree(mxc_nand_data); } diff --git a/drivers/mtd/nand/mxc_nd2.c b/drivers/mtd/nand/mxc_nd2.c index 1092248395f7..2a2f8a4d88aa 100644 --- a/drivers/mtd/nand/mxc_nd2.c +++ b/drivers/mtd/nand/mxc_nd2.c @@ -1137,7 +1137,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) raw_write((raw_read(REG_NFC_INTRRUPT) | NFC_INT_MSK), REG_NFC_INTRRUPT); init_waitqueue_head(&irq_waitq); - err = request_irq(INT_NANDFC, mxc_nfc_irq, 0, "mxc_nd", NULL); + err = request_irq(MXC_INT_NANDFC, mxc_nfc_irq, 0, "mxc_nd", NULL); if (err) { goto out_1; } @@ -1244,7 +1244,7 @@ static int __exit mxcnd_remove(struct platform_device *pdev) if (mxc_nand_data) { nand_release(mtd); - free_irq(INT_NANDFC, NULL); + free_irq(MXC_INT_NANDFC, NULL); kfree(mxc_nand_data); } diff --git a/drivers/mxc/hmp4e/mxc_hmp4e.c b/drivers/mxc/hmp4e/mxc_hmp4e.c index 459d2f34a3e0..b1dee1339ea8 100644 --- a/drivers/mxc/hmp4e/mxc_hmp4e.c +++ b/drivers/mxc/hmp4e/mxc_hmp4e.c @@ -84,7 +84,7 @@ static struct clk *hmp4e_clk; static bool irq_enable = false; ulong base_port = MPEG4_ENC_BASE_ADDR; -u32 irq = INT_MPEG4_ENC; +u32 irq = MXC_INT_MPEG4_ENC; module_param(base_port, long, 000); module_param(irq, int, 000); diff --git a/drivers/mxc/pm/dptc_mx27.c b/drivers/mxc/pm/dptc_mx27.c index 9e60294d63dd..ce54ae9ac98e 100644 --- a/drivers/mxc/pm/dptc_mx27.c +++ b/drivers/mxc/pm/dptc_mx27.c @@ -1348,7 +1348,7 @@ static int __init dptc_mx27_init(void) } /* request the DPTC interrupt */ - res = request_irq(INT_CCM, dptc_mx27_irq, 0, DEVICE_NAME, NULL); + res = request_irq(MXC_INT_CCM, dptc_mx27_irq, 0, DEVICE_NAME, NULL); /* * If res is not 0, then where was an error @@ -1398,7 +1398,7 @@ static void __exit dptc_mx27_cleanup(void) unregister_chrdev(major, DEVICE_NAME); /* release the DPTC interrupt */ - free_irq(INT_CCM, NULL); + free_irq(MXC_INT_CCM, NULL); /* Unregister low power modes functions */ platform_driver_unregister(&mxc_dptc_driver); diff --git a/drivers/mxc/security/mxc_scc.c b/drivers/mxc/security/mxc_scc.c index c3b41d49904f..3e0efcba6582 100644 --- a/drivers/mxc/security/mxc_scc.c +++ b/drivers/mxc/security/mxc_scc.c @@ -423,13 +423,13 @@ static int mxc_scc_remove(struct platform_device *pdev) /* Deregister SCM interrupt handler */ if (scm_irq_set) { - free_irq(INT_SCC_SCM, NULL); + free_irq(MXC_INT_SCC_SCM, NULL); } /* Deregister SMN interrupt handler */ if (smn_irq_set) { #ifdef USE_SMN_INTERRUPT - free_irq(INT_SCC_SMN, NULL); + free_irq(MXC_INT_SCC_SMN, NULL); #endif } pr_debug("SCC driver cleaned up.\n"); @@ -842,11 +842,11 @@ static irqreturn_t scc_irq(int irq, void *dev_id) uint32_t scm_status; int handled = 0; /* assume interrupt isn't from SMN */ #if defined(USE_SMN_INTERRUPT) - int smn_irq = INT_SCC_SMN; /* SMN interrupt is on a line by itself */ + int smn_irq = MXC_INT_SCC_SMN; /* SMN interrupt is on a line by itself */ #elif defined (NO_SMN_INTERRUPT) int smn_irq = -1; /* not wired to CPU at all */ #else - int smn_irq = INT_SCC_SCM; /* SMN interrupt shares a line with SCM */ + int smn_irq = MXC_INT_SCC_SCM; /* SMN interrupt shares a line with SCM */ #endif /* Update current state... This will perform callbacks... */ @@ -863,7 +863,7 @@ static irqreturn_t scc_irq(int irq, void *dev_id) scm_status = SCC_READ_REGISTER(SCM_STATUS); /* The driver masks interrupts, so this should never happen. */ - if (irq == INT_SCC_SCM && scm_status & SCM_STATUS_INTERRUPT_STATUS) { + if (irq == MXC_INT_SCC_SCM && scm_status & SCM_STATUS_INTERRUPT_STATUS) { /* but if it does, try to prevent it in the future */ SCC_WRITE_REGISTER(SCM_INTERRUPT_CTRL, SCM_INTERRUPT_CTRL_CLEAR_INTERRUPT @@ -1345,7 +1345,7 @@ static int setup_interrupt_handling(void) #ifdef USE_SMN_INTERRUPT /* Install interrupt service routine for SMN. */ - smn_error_code = request_irq(INT_SCC_SMN, scc_irq, 0, + smn_error_code = request_irq(MXC_INT_SCC_SMN, scc_irq, 0, SCC_DRIVER_NAME, NULL); if (smn_error_code != 0) { pr_debug @@ -1365,7 +1365,7 @@ static int setup_interrupt_handling(void) /* * Install interrupt service routine for SCM (or both together). */ - scm_error_code = request_irq(INT_SCC_SCM, scc_irq, 0, + scm_error_code = request_irq(MXC_INT_SCC_SCM, scc_irq, 0, SCC_DRIVER_NAME, NULL); if (scm_error_code != 0) { #ifndef MXC diff --git a/drivers/mxc/security/rng/rng_driver.c b/drivers/mxc/security/rng/rng_driver.c index 55fe33ea5165..633cea66f36d 100644 --- a/drivers/mxc/security/rng/rng_driver.c +++ b/drivers/mxc/security/rng/rng_driver.c @@ -375,7 +375,7 @@ static void rng_cleanup(void) if (rng_irq_set) { /* unmap the interrupts from the IRQ lines */ - os_deregister_interrupt(INT_RNG); + os_deregister_interrupt(MXC_INT_RNG); rng_irq_set = FALSE; } rng_availability = RNG_STATUS_FAILED; @@ -799,7 +799,7 @@ static os_error_code rng_map_RNG_memory(void) /* fn rng_setup_interrupt_handling() */ /*!***************************************************************************/ /*! - * Register #rng_irq() as the interrupt handler for #INT_RNG. + * Register #rng_irq() as the interrupt handler for #MXC_INT_RNG. * * @return OS_ERROR_OK_S on success, os_error_code on failure */ @@ -811,7 +811,7 @@ static os_error_code rng_setup_interrupt_handling(void) * Install interrupt service routine for the RNG. Ignore the * assigned IRQ number. */ - error_code = os_register_interrupt(RNG_DRIVER_NAME, INT_RNG, + error_code = os_register_interrupt(RNG_DRIVER_NAME, MXC_INT_RNG, OS_DEV_ISR_REF(rng_irq)); if (error_code != OS_ERROR_OK_S) { pr_debug("RNG Driver: Error installing Interrupt Handler\n"); diff --git a/drivers/mxc/security/sahara2/include/sah_kernel.h b/drivers/mxc/security/sahara2/include/sah_kernel.h index 1f2d072f27ac..994ff688a581 100644 --- a/drivers/mxc/security/sahara2/include/sah_kernel.h +++ b/drivers/mxc/security/sahara2/include/sah_kernel.h @@ -31,7 +31,7 @@ || defined(CONFIG_ARCH_MXC92323) #include <asm/arch/hardware.h> #define SAHA_BASE_ADDR SAHARA_BASE_ADDR -#define SAHARA_IRQ INT_SAHARA +#define SAHARA_IRQ MXC_INT_SAHARA #else #include <asm/arch/mx2.h> #endif diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c index be9e443f83a8..7b546a382060 100644 --- a/drivers/mxc/vpu/mxc_vpu.c +++ b/drivers/mxc/vpu/mxc_vpu.c @@ -417,7 +417,7 @@ static int vpu_dev_probe(struct platform_device *pdev) goto err_out_class; } - err = request_irq(INT_VPU, vpu_irq_handler, 0, "VPU_CODEC_IRQ", + err = request_irq(MXC_INT_VPU, vpu_irq_handler, 0, "VPU_CODEC_IRQ", (void *)(&vpu_data)); if (err) goto err_out_class; @@ -459,15 +459,11 @@ static int __init vpu_init(void) static void __exit vpu_exit(void) { - free_irq(INT_VPU, (void *)(&vpu_data)); + free_irq(MXC_INT_VPU, (void *)(&vpu_data)); if (vpu_major > 0) { class_device_destroy(vpu_class, MKDEV(vpu_major, 0)); class_destroy(vpu_class); - if (unregister_chrdev(vpu_major, "mxc_vpu") < 0) { - printk(KERN_ERR - "Failed to unregister vpu from devfs\n"); - return; - } + unregister_chrdev(vpu_major, "mxc_vpu"); vpu_major = 0; } diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 7defa63b9c74..664f6b2091c1 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h @@ -44,6 +44,7 @@ #define SMC_IRQ_SENSE IRQF_TRIGGER_LOW #endif + #define SMC_IRQ_SENSE IRQF_TRIGGER_LOW /* * Define the bus width specific IO macros diff --git a/drivers/otg/hardware/arc-dev.c b/drivers/otg/hardware/arc-dev.c index c6070e1783ed..cf5fc9038a03 100644 --- a/drivers/otg/hardware/arc-dev.c +++ b/drivers/otg/hardware/arc-dev.c @@ -64,11 +64,6 @@ static const char driver_name[] = MX31_USB_NAME; /* arc Proc FS */ -#define SHOW(s, r, c) seq_printf(s, "%20s [%8x] %08x %s\n", #r, &r, r, c) -#define BITS(s, c) seq_printf(s, "%24s: ", c); -#define BIT(s, r, m) seq_printf(s, "%s%s ", #m, (r & m) ? "" : "/"); -#define NL(s) seq_printf(s, "\n"); - /*! arc_dev_show - called to display information * @param s * @param unused @@ -83,7 +78,6 @@ static int arc_dev_show(struct seq_file *s, void *unused) seq_printf(s, "\nOTG Registers\n"); - //SHOW(s, UOG_ID, "Host ID"); seq_printf(s, "\n"); return 0; diff --git a/drivers/otg/hardware/arc-pcd.c b/drivers/otg/hardware/arc-pcd.c index 03e37695d7ee..63f912b2f7f3 100644 --- a/drivers/otg/hardware/arc-pcd.c +++ b/drivers/otg/hardware/arc-pcd.c @@ -64,7 +64,7 @@ static void arc_read_setup_buffer(struct pcd_instance *pcd, u8 * buffer_ptr) struct ep_queue_head *qh = &udc_controller->ep_qh[0 * 2 + ARC_DIR_OUT]; int timeout; - consistent_sync(qh, sizeof(struct ep_queue_head), DMA_FROM_DEVICE); + dma_cache_maint(qh, sizeof(struct ep_queue_head), DMA_FROM_DEVICE); /* C.f 39.16.3.2.1 Setup Phase - Setup Packet Handling (2.3 hardware and later) */ @@ -103,8 +103,8 @@ int arc_read_rcv_buffer (struct pcd_instance *pcd, struct usbd_endpoint_instance struct usbd_urb *rx_urb = endpoint->rcv_urb; /* sync qh and td structures, note that urb-buffer was invalidated in arc_add_buffer_to_dtd() */ - consistent_sync(qh, sizeof(struct ep_queue_head), DMA_FROM_DEVICE); - consistent_sync(curr_td, sizeof(struct ep_td_struct), DMA_FROM_DEVICE); + dma_cache_maint(qh, sizeof(struct ep_queue_head), DMA_FROM_DEVICE); + dma_cache_maint(curr_td, sizeof(struct ep_td_struct), DMA_FROM_DEVICE); if (rx_urb) { int length = rx_urb->buffer_length - @@ -309,11 +309,11 @@ static void arc_add_buffer_to_dtd (struct pcd_instance *pcd, struct usbd_endpoin /* flush cache for IN */ if ((dir == ARC_DIR_IN) && urb->actual_length) - consistent_sync(urb->buffer, urb->actual_length, DMA_TO_DEVICE); + dma_cache_maint(urb->buffer, urb->actual_length, DMA_TO_DEVICE); /* invalidate cache for OUT */ else if ((dir == ARC_DIR_OUT) && urb->buffer_length) - consistent_sync(urb->buffer, urb->alloc_length, DMA_FROM_DEVICE); + dma_cache_maint(urb->buffer, urb->alloc_length, DMA_FROM_DEVICE); } /* Set size and interrupt on each dtd, Clear reserved field, @@ -325,7 +325,7 @@ static void arc_add_buffer_to_dtd (struct pcd_instance *pcd, struct usbd_endpoin dtd->buff_ptr0 = cpu_to_le32(endpoint->active_urb ? (u32) (virt_to_phys (endpoint->active_urb->buffer + offset)) : 0); dtd->next_td_ptr = cpu_to_le32(DTD_NEXT_TERMINATE); dtd->next_td_virt = NULL; - consistent_sync(dtd, sizeof(struct ep_td_struct), DMA_TO_DEVICE); + dma_cache_maint(dtd, sizeof(struct ep_td_struct), DMA_TO_DEVICE); privdata->cur_dqh = dQH; /* Case 1 - Step 1 - Write dQH next pointer and dQH terminate bit to 0 as single DWord */ @@ -334,7 +334,7 @@ static void arc_add_buffer_to_dtd (struct pcd_instance *pcd, struct usbd_endpoin /* Case 1 - Step 2 - Clear active and halt bit */ dQH->size_ioc_int_sts &= le32_to_cpu(~(EP_QUEUE_HEAD_STATUS_ACTIVE | EP_QUEUE_HEAD_STATUS_HALT)); - consistent_sync(dQH, sizeof(struct ep_queue_head), DMA_TO_DEVICE); + dma_cache_maint(dQH, sizeof(struct ep_queue_head), DMA_TO_DEVICE); /* Case 1 - Step 3 - Prime endpoint by writing ENDPTPRIME */ mask = (dir == ARC_DIR_OUT) ? (1 << epnum) : (1 << (epnum + 16)); @@ -396,8 +396,8 @@ static void arc_add_buffer_to_dtd (struct pcd_instance *pcd, struct usbd_endpoin static void arc_dtd_releases (struct pcd_instance *pcd, struct usbd_endpoint_instance *endpoint, int dir) { struct arc_private_struct *privdata = endpoint->privdata; - consistent_sync(privdata->cur_dtd, sizeof(struct ep_td_struct), (dir == ARC_DIR_OUT) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); - consistent_sync(privdata->cur_dqh, sizeof(struct ep_queue_head), (dir == ARC_DIR_OUT) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + dma_cache_maint(privdata->cur_dtd, sizeof(struct ep_td_struct), (dir == ARC_DIR_OUT) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + dma_cache_maint(privdata->cur_dqh, sizeof(struct ep_queue_head), (dir == ARC_DIR_OUT) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); } @@ -502,7 +502,7 @@ void arc_pcd_setup_ep (struct pcd_instance *pcd, unsigned int ep, struct usbd_en } dQH->max_pkt_length = cpu_to_le32(tmp); - consistent_sync(dQH, sizeof(struct ep_queue_head), DMA_TO_DEVICE); + dma_cache_maint(dQH, sizeof(struct ep_queue_head), DMA_TO_DEVICE); /* Set the control register of endpoint */ tmp = dir ? @@ -525,7 +525,7 @@ void arc_pcd_setup_ep (struct pcd_instance *pcd, unsigned int ep, struct usbd_en dQH = &udc_controller->ep_qh[2 * epnum + dir]; tmp = (wMaxPacketSize << EP_QUEUE_HEAD_MAX_PKT_LEN_POS) | EP_QUEUE_HEAD_IOS; dQH->max_pkt_length = le32_to_cpu(tmp); - consistent_sync(dQH, sizeof(struct ep_queue_head), DMA_FROM_DEVICE); + dma_cache_maint(dQH, sizeof(struct ep_queue_head), DMA_FROM_DEVICE); tmp = USBOTG_REG32(0x1c0 + epnum*4); tmp |= EPCTRL_TX_ENABLE; tmp |= ((unsigned int)(type) << EPCTRL_TX_EP_TYPE_SHIFT); @@ -843,7 +843,7 @@ static irqreturn_t arc_epn_irq(struct pcd_instance *pcd) TRACE_MSG4(pcd->TAG, "[%2d:%2d] Current dtd is halted size_ioc_sts: %08x errors: %02x", bit, ep, le32_to_cpu(cur_dtd->size_ioc_sts), errors); cur_dtd->size_ioc_sts &= cpu_to_le32(errors); - consistent_sync(cur_dtd, sizeof(struct ep_td_struct), DMA_TO_DEVICE); + dma_cache_maint(cur_dtd, sizeof(struct ep_td_struct), DMA_TO_DEVICE); } if ((pcd_rcv_complete_irq(endpoint, remain_len, 0))) { diff --git a/drivers/otg/hardware/mxc-ocd.c b/drivers/otg/hardware/mxc-ocd.c index 16636c22eff2..437bf50eedb7 100644 --- a/drivers/otg/hardware/mxc-ocd.c +++ b/drivers/otg/hardware/mxc-ocd.c @@ -485,7 +485,7 @@ static irqreturn_t ocd_ctrl_int_hndlr (int irq, void *dev_id, struct pt_regs *re * @param dev_id * @param regs */ -irqreturn_t pcd_bwkup_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t pcd_bwkup_int_hndlr_isr (int irq, void *dev_id) { //pcd_instance->otg->interrupts++; //TRACE_MSG0(OCD, "--"); @@ -499,7 +499,7 @@ irqreturn_t pcd_bwkup_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs * @param dev_id * @param regs */ -irqreturn_t ocd_hnp_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t ocd_hnp_int_hndlr_isr (int irq, void *dev_id) { //pcd_instance->otg->interrupts++; //TRACE_MSG0(OCD, "--"); @@ -513,7 +513,7 @@ irqreturn_t ocd_hnp_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) * @param dev_id * @param regs */ -irqreturn_t pcd_func_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t pcd_func_int_hndlr_isr (int irq, void *dev_id) { //pcd_instance->otg->interrupts++; //TRACE_MSG0(OCD, "--"); @@ -529,7 +529,7 @@ irqreturn_t pcd_func_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) * @param dev_id * @param regs */ -irqreturn_t hcd_host_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t hcd_host_int_hndlr_isr (int irq, void *dev_id) { //pcd_instance->otg->interrupts++; //TRACE_MSG0(OCD, "--"); @@ -543,7 +543,7 @@ irqreturn_t hcd_host_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) * @param dev_id * @param regs */ -irqreturn_t ocd_ctrl_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t ocd_ctrl_int_hndlr_isr (int irq, void *dev_id) { //pcd_instance->otg->interrupts++; //TRACE_MSG0(OCD, "--"); @@ -557,7 +557,7 @@ irqreturn_t ocd_ctrl_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) * @param dev_id * @param regs */ -irqreturn_t ocd_dma_int_hndlr_isr (int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t ocd_dma_int_hndlr_isr (int irq, void *dev_id) { //pcd_instance->otg->interrupts++; //TRACE_MSG0(OCD, "--"); diff --git a/drivers/otg/otg/otg-linux.h b/drivers/otg/otg/otg-linux.h index 48c2a336bd39..70eb151bd828 100644 --- a/drivers/otg/otg/otg-linux.h +++ b/drivers/otg/otg/otg-linux.h @@ -1091,7 +1091,7 @@ static void inline otg_tasklet_exit(struct otg_tasklet *tasklet) #if defined(CONFIG_OTG_OLD_TX_CACHE) #define CACHE_SYNC_TX(buf, len) consistent_sync (NULL, buf, len, PCI_DMA_TODEVICE) #else -#define CACHE_SYNC_TX(buf, len) consistent_sync (buf, len, PCI_DMA_TODEVICE) +#define CACHE_SYNC_TX(buf, len) dma_cache_maint (buf, len, PCI_DMA_TODEVICE) #endif /*@}*/ diff --git a/drivers/pcmcia/mx31ads-pcmcia.c b/drivers/pcmcia/mx31ads-pcmcia.c index d8d305b5001c..7a3bf769ac40 100644 --- a/drivers/pcmcia/mx31ads-pcmcia.c +++ b/drivers/pcmcia/mx31ads-pcmcia.c @@ -61,7 +61,7 @@ #include "mx31ads-pcmcia.h" #include <linux/irq.h> -#define MX31ADS_PCMCIA_IRQ INT_PCMCIA +#define MX31ADS_PCMCIA_IRQ MXC_INT_PCMCIA /* * The mapping of window size to bank size value diff --git a/drivers/serial/mxc_uart_early.c b/drivers/serial/mxc_uart_early.c index 275f3a08b2ed..2e36a5153a2c 100644 --- a/drivers/serial/mxc_uart_early.c +++ b/drivers/serial/mxc_uart_early.c @@ -149,7 +149,7 @@ static int __init parse_options(struct mxc_early_uart_device *device, device->baud); } printk(KERN_INFO - "MXC_Early serial console at MMIO 0x%lx (options '%s')\n", + "MXC_Early serial console at MMIO 0x%x (options '%s')\n", port->mapbase, device->options); return 0; } diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 54ffc54c10f1..8f78d7743731 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -786,13 +786,13 @@ static int spi_bitbang_suspend(struct spi_bitbang *bitbang) while (!list_empty(&bitbang->queue) && limit--) { spin_unlock_irqrestore(&bitbang->lock, flags); - dev_dbg(bitbang->master->cdev.dev, "wait for queue\n"); + dev_dbg(&bitbang->master->dev, "wait for queue\n"); msleep(10); spin_lock_irqsave(&bitbang->lock, flags); } if (!list_empty(&bitbang->queue)) { - dev_err(bitbang->master->cdev.dev, "queue didn't empty\n"); + dev_err(&bitbang->master->dev, "queue didn't empty\n"); return -EBUSY; } spin_unlock_irqrestore(&bitbang->lock, flags); diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c index 9f365abdbae6..3fff7ce11eb8 100644 --- a/drivers/usb/gadget/arcotg_udc.c +++ b/drivers/usb/gadget/arcotg_udc.c @@ -42,11 +42,11 @@ #include <linux/proc_fs.h> #include <linux/mm.h> #include <linux/platform_device.h> -#include <linux/usb/ch9.h> -#include <linux/usb_gadget.h> #include <linux/dma-mapping.h> #include <linux/dmapool.h> #include <linux/fsl_devices.h> +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> #include <linux/usb/fsl_xcvr.h> #include <linux/usb/otg.h> @@ -824,49 +824,6 @@ static void arcotg_free_request(struct usb_ep *_ep, struct usb_request *_req) kfree(req); } -/*! - * Allocate an I/O buffer for the ep->req->buf. - * @param _ep endpoint pointer - * @param bytes length of the desired buffer - * @param dma pointer to the buffer's DMA address; must be valid - * when gadget layer calls this function, ma is &req->dma - * @param gfp_flags GFP_* flags to use - * @return Returns a new buffer, or null if one could not be allocated - */ -static void *arcotg_alloc_buffer(struct usb_ep *_ep, unsigned bytes, - dma_addr_t * dma, gfp_t gfp_flags) -{ - void *retval = NULL; - - if (!bytes) - return 0; - - retval = kmalloc(bytes, gfp_flags); - - if (retval) - *dma = virt_to_phys(retval); - - pr_debug("udc: ep=%s buffer=0x%p dma=0x%x len=%d\n", - _ep->name, retval, *dma, bytes); - - return retval; -} - -/*! - * Free an I/O buffer for the ep->req->buf - * @param _ep endpoint pointer - * @param buf data buf pointer - * @param dma for 834x, we will not touch dma field - * @param bytes buffer size - */ -static void arcotg_free_buffer(struct usb_ep *_ep, void *buf, - dma_addr_t dma, unsigned bytes) -{ - pr_debug("udc: buf=0x%p dma=0x%x\n", buf, dma); - if (buf) - kfree(buf); -} - /*-------------------------------------------------------------------------*/ /*! @@ -1332,9 +1289,6 @@ static const struct usb_ep_ops arcotg_ep_ops = { .alloc_request = arcotg_alloc_request, .free_request = arcotg_free_request, - .alloc_buffer = arcotg_alloc_buffer, - .free_buffer = arcotg_free_buffer, - .queue = arcotg_ep_queue, .dequeue = arcotg_ep_dequeue, diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c index 99d6772302de..524e3bf9f444 100644 --- a/drivers/usb/host/ehci-arc.c +++ b/drivers/usb/host/ehci-arc.c @@ -32,7 +32,6 @@ #include <linux/fsl_devices.h> #include <linux/usb/otg.h> #include <linux/usb/fsl_xcvr.h> -#include <asm/arch/fsl_usb.h> #include "ehci-fsl.h" @@ -87,10 +86,6 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, return -ENODEV; } - retval = fsl_platform_verify(pdev); - if (retval) - return retval; - /* * do platform specific init: check the clock, grab/config pins, etc. */ @@ -129,7 +124,11 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, * host port doesn't make it thru initializtion. * ehci_halt(), called by ehci_fsl_setup() returns -ETIMEDOUT */ - fsl_platform_set_host_mode(hcd); + if (pdata->xcvr_ops && pdata->xcvr_ops->set_host) + pdata->xcvr_ops->set_host(); + + /* set host mode */ + writel(readl(hcd->regs + 0x1a8) | USBMODE_CM_HC, hcd->regs + 0x1a8); retval = usb_add_hcd(hcd, irq, IRQF_SHARED); if (retval != 0) { @@ -206,7 +205,6 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd, /* called after powerup, by probe or system-pm "wakeup" */ static int ehci_fsl_reinit(struct ehci_hcd *ehci) { - fsl_platform_usb_setup(ehci_to_hcd(ehci)); ehci_port_power(ehci, 0); return 0; @@ -261,7 +259,7 @@ static const struct hc_driver ehci_arc_hc_driver = { * generic hardware linkage */ .irq = ehci_irq, - .flags = FSL_PLATFORM_HC_FLAGS, + .flags = HCD_USB2 | HCD_MEMORY, /* * basic lifecycle operations diff --git a/drivers/usb/usblan/usblan-compat.h b/drivers/usb/usblan/usblan-compat.h index b02eba4056d9..99619a8f19d1 100644 --- a/drivers/usb/usblan/usblan-compat.h +++ b/drivers/usb/usblan/usblan-compat.h @@ -277,7 +277,7 @@ static void inline SCHEDULE_TIMEOUT(int seconds){ * @{ */ #define CACHE_SYNC_RCV(buf, len) pci_map_single (NULL, (void *) buf, len, PCI_DMA_FROMDEVICE) -#define CACHE_SYNC_TX(buf, len) consistent_sync (buf, len, PCI_DMA_TODEVICE) +#define CACHE_SYNC_TX(buf, len) dma_cache_maint (buf, len, PCI_DMA_TODEVICE) /* @} */ diff --git a/drivers/video/backlight/mxc_ipu_bl.c b/drivers/video/backlight/mxc_ipu_bl.c index 1e911f4c7ff5..b300cf576192 100644 --- a/drivers/video/backlight/mxc_ipu_bl.c +++ b/drivers/video/backlight/mxc_ipu_bl.c @@ -49,7 +49,7 @@ static int fb_id; static int mxcbl_send_intensity(struct backlight_device *bd) { int intensity = bd->props.brightness; - struct mxcbl_dev_data *devdata = class_get_devdata(&bd->class_dev); + struct mxcbl_dev_data *devdata = dev_get_drvdata(&bd->dev); if (bd->props.power != FB_BLANK_UNBLANK) intensity = 0; @@ -64,7 +64,7 @@ static int mxcbl_send_intensity(struct backlight_device *bd) static int mxcbl_get_intensity(struct backlight_device *bd) { - struct mxcbl_dev_data *devdata = class_get_devdata(&bd->class_dev); + struct mxcbl_dev_data *devdata = dev_get_drvdata(&bd->dev); return devdata->intensity; } diff --git a/drivers/video/backlight/mxc_lcdc_bl.c b/drivers/video/backlight/mxc_lcdc_bl.c index 1e014ced715f..25076e07acbe 100644 --- a/drivers/video/backlight/mxc_lcdc_bl.c +++ b/drivers/video/backlight/mxc_lcdc_bl.c @@ -49,7 +49,7 @@ struct mxcbl_dev_data { static int mxcbl_send_intensity(struct backlight_device *bd) { int intensity = bd->props.brightness; - struct mxcbl_dev_data *devdata = class_get_devdata(&bd->class_dev); + struct mxcbl_dev_data *devdata = dev_get_drvdata(&bd->dev); if (bd->props.power != FB_BLANK_UNBLANK) intensity = 0; @@ -71,7 +71,7 @@ static int mxcbl_send_intensity(struct backlight_device *bd) static int mxcbl_get_intensity(struct backlight_device *bd) { - struct mxcbl_dev_data *devdata = class_get_devdata(&bd->class_dev); + struct mxcbl_dev_data *devdata = dev_get_drvdata(&bd->dev); return devdata->intensity; } diff --git a/drivers/video/backlight/mxc_pmic_bl.c b/drivers/video/backlight/mxc_pmic_bl.c index 9df4f133185b..82e32361bbed 100644 --- a/drivers/video/backlight/mxc_pmic_bl.c +++ b/drivers/video/backlight/mxc_pmic_bl.c @@ -54,7 +54,7 @@ static int sec_fb_id; static int mxcbl_send_intensity(struct backlight_device *bd) { int intensity = bd->props.brightness; - struct mxcbl_dev_data *devdata = class_get_devdata(&bd->class_dev); + struct mxcbl_dev_data *devdata = dev_get_drvdata(&bd->dev); if (bd->props.power != FB_BLANK_UNBLANK) intensity = 0; @@ -70,7 +70,7 @@ static int mxcbl_send_intensity(struct backlight_device *bd) static int mxcbl_get_intensity(struct backlight_device *bd) { - struct mxcbl_dev_data *devdata = class_get_devdata(&bd->class_dev); + struct mxcbl_dev_data *devdata = dev_get_drvdata(&bd->dev); return devdata->intensity; } diff --git a/drivers/video/mxc/mx2fb.c b/drivers/video/mxc/mx2fb.c index 1aac341d1c4c..48908dfe7b8b 100644 --- a/drivers/video/mxc/mx2fb.c +++ b/drivers/video/mxc/mx2fb.c @@ -1124,7 +1124,7 @@ static void _request_irq(void) /* Read to clear the status */ status = __raw_readl(LCDC_REG(LCDC_LISR)); - if (request_irq(INT_LCDC, mx2fb_isr, 0, "LCDC", 0)) + if (request_irq(MXC_INT_LCDC, mx2fb_isr, 0, "LCDC", 0)) pr_info("Request LCDC IRQ failed.\n"); else { spin_lock_irqsave(&mx2fb_notifier_list.lock, flags); @@ -1158,7 +1158,7 @@ static void _free_irq(void) /* Disable all LCDC interrupt */ __raw_writel(0x0, LCDC_REG(LCDC_LIER)); - free_irq(INT_LCDC, 0); + free_irq(MXC_INT_LCDC, 0); } /*! diff --git a/drivers/char/watchdog/mxc_wdt.c b/drivers/watchdog/mxc_wdt.c index 126b14357d5a..126b14357d5a 100644 --- a/drivers/char/watchdog/mxc_wdt.c +++ b/drivers/watchdog/mxc_wdt.c diff --git a/drivers/char/watchdog/mxc_wdt.h b/drivers/watchdog/mxc_wdt.h index cd09b9acf99f..cd09b9acf99f 100644 --- a/drivers/char/watchdog/mxc_wdt.h +++ b/drivers/watchdog/mxc_wdt.h |