tc6393xb 122 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(nand->dev.parent); tc6393xb 125 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 129 drivers/mfd/tc6393xb.c tmio_iowrite8(0xff, tc6393xb->scr + SCR_GPI_BCR(1)); tc6393xb 131 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 220 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(dev->dev.parent); tc6393xb 225 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 227 drivers/mfd/tc6393xb.c ccr = tmio_ioread16(tc6393xb->scr + SCR_CCR); tc6393xb 229 drivers/mfd/tc6393xb.c tmio_iowrite16(ccr, tc6393xb->scr + SCR_CCR); tc6393xb 231 drivers/mfd/tc6393xb.c fer = tmio_ioread8(tc6393xb->scr + SCR_FER); tc6393xb 233 drivers/mfd/tc6393xb.c tmio_iowrite8(fer, tc6393xb->scr + SCR_FER); tc6393xb 235 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 242 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(dev->dev.parent); tc6393xb 247 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 249 drivers/mfd/tc6393xb.c fer = tmio_ioread8(tc6393xb->scr + SCR_FER); tc6393xb 251 drivers/mfd/tc6393xb.c tmio_iowrite8(fer, tc6393xb->scr + SCR_FER); tc6393xb 253 drivers/mfd/tc6393xb.c ccr = tmio_ioread16(tc6393xb->scr + SCR_CCR); tc6393xb 255 drivers/mfd/tc6393xb.c tmio_iowrite16(ccr, tc6393xb->scr + SCR_CCR); tc6393xb 257 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 275 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(dev->dev.parent); tc6393xb 279 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 281 drivers/mfd/tc6393xb.c ccr = tmio_ioread16(tc6393xb->scr + SCR_CCR); tc6393xb 284 drivers/mfd/tc6393xb.c tmio_iowrite16(ccr, tc6393xb->scr + SCR_CCR); tc6393xb 286 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 293 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(dev->dev.parent); tc6393xb 297 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 299 drivers/mfd/tc6393xb.c ccr = tmio_ioread16(tc6393xb->scr + SCR_CCR); tc6393xb 302 drivers/mfd/tc6393xb.c tmio_iowrite16(ccr, tc6393xb->scr + SCR_CCR); tc6393xb 304 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 311 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(fb->dev.parent); tc6393xb 315 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 317 drivers/mfd/tc6393xb.c fer = ioread8(tc6393xb->scr + SCR_FER); tc6393xb 322 drivers/mfd/tc6393xb.c iowrite8(fer, tc6393xb->scr + SCR_FER); tc6393xb 324 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 332 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(fb->dev.parent); tc6393xb 335 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 337 drivers/mfd/tc6393xb.c iowrite16(mode->pixclock, tc6393xb->scr + SCR_PLL1CR + 0); tc6393xb 338 drivers/mfd/tc6393xb.c iowrite16(mode->pixclock >> 16, tc6393xb->scr + SCR_PLL1CR + 2); tc6393xb 340 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 348 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(mmc->dev.parent); tc6393xb 350 drivers/mfd/tc6393xb.c tmio_core_mmc_enable(tc6393xb->scr + 0x200, 0, tc6393xb 358 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(mmc->dev.parent); tc6393xb 360 drivers/mfd/tc6393xb.c tmio_core_mmc_resume(tc6393xb->scr + 0x200, 0, tc6393xb 368 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(mmc->dev.parent); tc6393xb 370 drivers/mfd/tc6393xb.c tmio_core_mmc_pwr(tc6393xb->scr + 0x200, 0, state); tc6393xb 375 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = dev_get_drvdata(mmc->dev.parent); tc6393xb 377 drivers/mfd/tc6393xb.c tmio_core_mmc_clk_div(tc6393xb->scr + 0x200, 0, state); tc6393xb 427 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = gpiochip_get_data(chip); tc6393xb 430 drivers/mfd/tc6393xb.c return !!(tmio_ioread8(tc6393xb->scr + SCR_GPO_DSR(offset / 8)) tc6393xb 437 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = gpiochip_get_data(chip); tc6393xb 440 drivers/mfd/tc6393xb.c dsr = tmio_ioread8(tc6393xb->scr + SCR_GPO_DSR(offset / 8)); tc6393xb 446 drivers/mfd/tc6393xb.c tmio_iowrite8(dsr, tc6393xb->scr + SCR_GPO_DSR(offset / 8)); tc6393xb 452 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = gpiochip_get_data(chip); tc6393xb 455 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 459 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 465 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = gpiochip_get_data(chip); tc6393xb 469 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 471 drivers/mfd/tc6393xb.c doecr = tmio_ioread8(tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); tc6393xb 473 drivers/mfd/tc6393xb.c tmio_iowrite8(doecr, tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); tc6393xb 475 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 483 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = gpiochip_get_data(chip); tc6393xb 487 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 491 drivers/mfd/tc6393xb.c doecr = tmio_ioread8(tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); tc6393xb 493 drivers/mfd/tc6393xb.c tmio_iowrite8(doecr, tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); tc6393xb 495 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 500 drivers/mfd/tc6393xb.c static int tc6393xb_register_gpio(struct tc6393xb *tc6393xb, int gpio_base) tc6393xb 502 drivers/mfd/tc6393xb.c tc6393xb->gpio.label = "tc6393xb"; tc6393xb 503 drivers/mfd/tc6393xb.c tc6393xb->gpio.base = gpio_base; tc6393xb 504 drivers/mfd/tc6393xb.c tc6393xb->gpio.ngpio = 16; tc6393xb 505 drivers/mfd/tc6393xb.c tc6393xb->gpio.set = tc6393xb_gpio_set; tc6393xb 506 drivers/mfd/tc6393xb.c tc6393xb->gpio.get = tc6393xb_gpio_get; tc6393xb 507 drivers/mfd/tc6393xb.c tc6393xb->gpio.direction_input = tc6393xb_gpio_direction_input; tc6393xb 508 drivers/mfd/tc6393xb.c tc6393xb->gpio.direction_output = tc6393xb_gpio_direction_output; tc6393xb 510 drivers/mfd/tc6393xb.c return gpiochip_add_data(&tc6393xb->gpio, tc6393xb); tc6393xb 517 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc); tc6393xb 521 drivers/mfd/tc6393xb.c irq_base = tc6393xb->irq_base; tc6393xb 523 drivers/mfd/tc6393xb.c while ((isr = tmio_ioread8(tc6393xb->scr + SCR_ISR) & tc6393xb 524 drivers/mfd/tc6393xb.c ~tmio_ioread8(tc6393xb->scr + SCR_IMR))) tc6393xb 537 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = irq_data_get_irq_chip_data(data); tc6393xb 541 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 542 drivers/mfd/tc6393xb.c imr = tmio_ioread8(tc6393xb->scr + SCR_IMR); tc6393xb 543 drivers/mfd/tc6393xb.c imr |= 1 << (data->irq - tc6393xb->irq_base); tc6393xb 544 drivers/mfd/tc6393xb.c tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR); tc6393xb 545 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 550 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = irq_data_get_irq_chip_data(data); tc6393xb 554 drivers/mfd/tc6393xb.c raw_spin_lock_irqsave(&tc6393xb->lock, flags); tc6393xb 555 drivers/mfd/tc6393xb.c imr = tmio_ioread8(tc6393xb->scr + SCR_IMR); tc6393xb 556 drivers/mfd/tc6393xb.c imr &= ~(1 << (data->irq - tc6393xb->irq_base)); tc6393xb 557 drivers/mfd/tc6393xb.c tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR); tc6393xb 558 drivers/mfd/tc6393xb.c raw_spin_unlock_irqrestore(&tc6393xb->lock, flags); tc6393xb 570 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = platform_get_drvdata(dev); tc6393xb 573 drivers/mfd/tc6393xb.c irq_base = tc6393xb->irq_base; tc6393xb 577 drivers/mfd/tc6393xb.c irq_set_chip_data(irq, tc6393xb); tc6393xb 581 drivers/mfd/tc6393xb.c irq_set_irq_type(tc6393xb->irq, IRQ_TYPE_EDGE_FALLING); tc6393xb 582 drivers/mfd/tc6393xb.c irq_set_chained_handler_and_data(tc6393xb->irq, tc6393xb_irq, tc6393xb 583 drivers/mfd/tc6393xb.c tc6393xb); tc6393xb 588 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = platform_get_drvdata(dev); tc6393xb 591 drivers/mfd/tc6393xb.c irq_set_chained_handler_and_data(tc6393xb->irq, NULL, NULL); tc6393xb 593 drivers/mfd/tc6393xb.c irq_base = tc6393xb->irq_base; tc6393xb 607 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb; tc6393xb 615 drivers/mfd/tc6393xb.c tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL); tc6393xb 616 drivers/mfd/tc6393xb.c if (!tc6393xb) { tc6393xb 621 drivers/mfd/tc6393xb.c raw_spin_lock_init(&tc6393xb->lock); tc6393xb 623 drivers/mfd/tc6393xb.c platform_set_drvdata(dev, tc6393xb); tc6393xb 627 drivers/mfd/tc6393xb.c tc6393xb->irq = ret; tc6393xb 631 drivers/mfd/tc6393xb.c tc6393xb->iomem = iomem; tc6393xb 632 drivers/mfd/tc6393xb.c tc6393xb->irq_base = tcpd->irq_base; tc6393xb 634 drivers/mfd/tc6393xb.c tc6393xb->clk = clk_get(&dev->dev, "CLK_CK3P6MI"); tc6393xb 635 drivers/mfd/tc6393xb.c if (IS_ERR(tc6393xb->clk)) { tc6393xb 636 drivers/mfd/tc6393xb.c ret = PTR_ERR(tc6393xb->clk); tc6393xb 640 drivers/mfd/tc6393xb.c rscr = &tc6393xb->rscr; tc6393xb 650 drivers/mfd/tc6393xb.c tc6393xb->scr = ioremap(rscr->start, resource_size(rscr)); tc6393xb 651 drivers/mfd/tc6393xb.c if (!tc6393xb->scr) { tc6393xb 656 drivers/mfd/tc6393xb.c ret = clk_prepare_enable(tc6393xb->clk); tc6393xb 664 drivers/mfd/tc6393xb.c iowrite8(0, tc6393xb->scr + SCR_FER); tc6393xb 665 drivers/mfd/tc6393xb.c iowrite16(tcpd->scr_pll2cr, tc6393xb->scr + SCR_PLL2CR); tc6393xb 667 drivers/mfd/tc6393xb.c tc6393xb->scr + SCR_CCR); tc6393xb 670 drivers/mfd/tc6393xb.c BIT(15), tc6393xb->scr + SCR_MCR); tc6393xb 671 drivers/mfd/tc6393xb.c iowrite16(tcpd->scr_gper, tc6393xb->scr + SCR_GPER); tc6393xb 672 drivers/mfd/tc6393xb.c iowrite8(0, tc6393xb->scr + SCR_IRR); tc6393xb 673 drivers/mfd/tc6393xb.c iowrite8(0xbf, tc6393xb->scr + SCR_IMR); tc6393xb 676 drivers/mfd/tc6393xb.c tmio_ioread8(tc6393xb->scr + SCR_REVID), tc6393xb 677 drivers/mfd/tc6393xb.c (unsigned long) iomem->start, tc6393xb->irq); tc6393xb 679 drivers/mfd/tc6393xb.c tc6393xb->gpio.base = -1; tc6393xb 682 drivers/mfd/tc6393xb.c ret = tc6393xb_register_gpio(tc6393xb, tcpd->gpio_base); tc6393xb 715 drivers/mfd/tc6393xb.c if (tc6393xb->gpio.base != -1) tc6393xb 716 drivers/mfd/tc6393xb.c gpiochip_remove(&tc6393xb->gpio); tc6393xb 719 drivers/mfd/tc6393xb.c clk_disable_unprepare(tc6393xb->clk); tc6393xb 721 drivers/mfd/tc6393xb.c iounmap(tc6393xb->scr); tc6393xb 723 drivers/mfd/tc6393xb.c release_resource(&tc6393xb->rscr); tc6393xb 725 drivers/mfd/tc6393xb.c clk_put(tc6393xb->clk); tc6393xb 728 drivers/mfd/tc6393xb.c kfree(tc6393xb); tc6393xb 736 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = platform_get_drvdata(dev); tc6393xb 746 drivers/mfd/tc6393xb.c if (tc6393xb->gpio.base != -1) tc6393xb 747 drivers/mfd/tc6393xb.c gpiochip_remove(&tc6393xb->gpio); tc6393xb 750 drivers/mfd/tc6393xb.c clk_disable_unprepare(tc6393xb->clk); tc6393xb 751 drivers/mfd/tc6393xb.c iounmap(tc6393xb->scr); tc6393xb 752 drivers/mfd/tc6393xb.c release_resource(&tc6393xb->rscr); tc6393xb 753 drivers/mfd/tc6393xb.c clk_put(tc6393xb->clk); tc6393xb 754 drivers/mfd/tc6393xb.c kfree(tc6393xb); tc6393xb 763 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = platform_get_drvdata(dev); tc6393xb 766 drivers/mfd/tc6393xb.c tc6393xb->suspend_state.ccr = ioread16(tc6393xb->scr + SCR_CCR); tc6393xb 767 drivers/mfd/tc6393xb.c tc6393xb->suspend_state.fer = ioread8(tc6393xb->scr + SCR_FER); tc6393xb 770 drivers/mfd/tc6393xb.c tc6393xb->suspend_state.gpo_dsr[i] = tc6393xb 771 drivers/mfd/tc6393xb.c ioread8(tc6393xb->scr + SCR_GPO_DSR(i)); tc6393xb 772 drivers/mfd/tc6393xb.c tc6393xb->suspend_state.gpo_doecr[i] = tc6393xb 773 drivers/mfd/tc6393xb.c ioread8(tc6393xb->scr + SCR_GPO_DOECR(i)); tc6393xb 774 drivers/mfd/tc6393xb.c tc6393xb->suspend_state.gpi_bcr[i] = tc6393xb 775 drivers/mfd/tc6393xb.c ioread8(tc6393xb->scr + SCR_GPI_BCR(i)); tc6393xb 778 drivers/mfd/tc6393xb.c clk_disable_unprepare(tc6393xb->clk); tc6393xb 786 drivers/mfd/tc6393xb.c struct tc6393xb *tc6393xb = platform_get_drvdata(dev); tc6393xb 790 drivers/mfd/tc6393xb.c ret = clk_prepare_enable(tc6393xb->clk); tc6393xb 801 drivers/mfd/tc6393xb.c iowrite8(tc6393xb->suspend_state.fer, tc6393xb->scr + SCR_FER); tc6393xb 802 drivers/mfd/tc6393xb.c iowrite16(tcpd->scr_pll2cr, tc6393xb->scr + SCR_PLL2CR); tc6393xb 803 drivers/mfd/tc6393xb.c iowrite16(tc6393xb->suspend_state.ccr, tc6393xb->scr + SCR_CCR); tc6393xb 806 drivers/mfd/tc6393xb.c BIT(15), tc6393xb->scr + SCR_MCR); tc6393xb 807 drivers/mfd/tc6393xb.c iowrite16(tcpd->scr_gper, tc6393xb->scr + SCR_GPER); tc6393xb 808 drivers/mfd/tc6393xb.c iowrite8(0, tc6393xb->scr + SCR_IRR); tc6393xb 809 drivers/mfd/tc6393xb.c iowrite8(0xbf, tc6393xb->scr + SCR_IMR); tc6393xb 812 drivers/mfd/tc6393xb.c iowrite8(tc6393xb->suspend_state.gpo_dsr[i], tc6393xb 813 drivers/mfd/tc6393xb.c tc6393xb->scr + SCR_GPO_DSR(i)); tc6393xb 814 drivers/mfd/tc6393xb.c iowrite8(tc6393xb->suspend_state.gpo_doecr[i], tc6393xb 815 drivers/mfd/tc6393xb.c tc6393xb->scr + SCR_GPO_DOECR(i)); tc6393xb 816 drivers/mfd/tc6393xb.c iowrite8(tc6393xb->suspend_state.gpi_bcr[i], tc6393xb 817 drivers/mfd/tc6393xb.c tc6393xb->scr + SCR_GPI_BCR(i));