aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2011-01-25 17:01:00 -0500
committerBenoit Cousson <b-cousson@ti.com>2011-02-17 12:25:34 -0500
commit8ca476da04e452a01d984dd5b5333b3a562207a7 (patch)
tree1f7f676a7fe46c104f44d22c9c1c12a09dcd9296
parentec5df927a8f3d3eca9514c9a9ad6db830ae20acc (diff)
OMAP4: hwmod data: Add DMIC
Add HWMOD entries for the OMAP DMIC. The HWMOD entires define the system resource requirements for the driver such as DMA addresses, channels, and IRQ's. Placing this information in the HWMOD database allows for more generic drivers to be written and having the specific implementation details defined in HWMOD. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: David Lambert <dlambert@ti.com> [b-cousson@ti.com: Change the wrong hwmod name, add missing flag and re-order structures]
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c94
1 files changed, 93 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index efdf26655b40..1488438e4b03 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -516,7 +516,6 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
516 * ctrl_module_pad_wkup 516 * ctrl_module_pad_wkup
517 * ctrl_module_wkup 517 * ctrl_module_wkup
518 * debugss 518 * debugss
519 * dmic
520 * efuse_ctrl_cust 519 * efuse_ctrl_cust
521 * efuse_ctrl_std 520 * efuse_ctrl_std
522 * elm 521 * elm
@@ -648,6 +647,96 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = {
648}; 647};
649 648
650/* 649/*
650 * 'dmic' class
651 * digital microphone controller
652 */
653
654static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
655 .rev_offs = 0x0000,
656 .sysc_offs = 0x0010,
657 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
658 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
659 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
660 SIDLE_SMART_WKUP),
661 .sysc_fields = &omap_hwmod_sysc_type2,
662};
663
664static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
665 .name = "dmic",
666 .sysc = &omap44xx_dmic_sysc,
667};
668
669/* dmic */
670static struct omap_hwmod omap44xx_dmic_hwmod;
671static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
672 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
673};
674
675static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
676 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
677};
678
679static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
680 {
681 .pa_start = 0x4012e000,
682 .pa_end = 0x4012e07f,
683 .flags = ADDR_TYPE_RT
684 },
685};
686
687/* l4_abe -> dmic */
688static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
689 .master = &omap44xx_l4_abe_hwmod,
690 .slave = &omap44xx_dmic_hwmod,
691 .clk = "ocp_abe_iclk",
692 .addr = omap44xx_dmic_addrs,
693 .addr_cnt = ARRAY_SIZE(omap44xx_dmic_addrs),
694 .user = OCP_USER_MPU,
695};
696
697static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
698 {
699 .pa_start = 0x4902e000,
700 .pa_end = 0x4902e07f,
701 .flags = ADDR_TYPE_RT
702 },
703};
704
705/* l4_abe -> dmic (dma) */
706static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
707 .master = &omap44xx_l4_abe_hwmod,
708 .slave = &omap44xx_dmic_hwmod,
709 .clk = "ocp_abe_iclk",
710 .addr = omap44xx_dmic_dma_addrs,
711 .addr_cnt = ARRAY_SIZE(omap44xx_dmic_dma_addrs),
712 .user = OCP_USER_SDMA,
713};
714
715/* dmic slave ports */
716static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
717 &omap44xx_l4_abe__dmic,
718 &omap44xx_l4_abe__dmic_dma,
719};
720
721static struct omap_hwmod omap44xx_dmic_hwmod = {
722 .name = "dmic",
723 .class = &omap44xx_dmic_hwmod_class,
724 .mpu_irqs = omap44xx_dmic_irqs,
725 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmic_irqs),
726 .sdma_reqs = omap44xx_dmic_sdma_reqs,
727 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dmic_sdma_reqs),
728 .main_clk = "dmic_fck",
729 .prcm = {
730 .omap4 = {
731 .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
732 },
733 },
734 .slaves = omap44xx_dmic_slaves,
735 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
736 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
737};
738
739/*
651 * 'dsp' class 740 * 'dsp' class
652 * dsp sub-system 741 * dsp sub-system
653 */ 742 */
@@ -3570,6 +3659,9 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
3570 /* dma class */ 3659 /* dma class */
3571 &omap44xx_dma_system_hwmod, 3660 &omap44xx_dma_system_hwmod,
3572 3661
3662 /* dmic class */
3663 &omap44xx_dmic_hwmod,
3664
3573 /* dsp class */ 3665 /* dsp class */
3574 &omap44xx_dsp_hwmod, 3666 &omap44xx_dsp_hwmod,
3575 &omap44xx_dsp_c0_hwmod, 3667 &omap44xx_dsp_c0_hwmod,