diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-05-19 09:12:22 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-06-17 06:06:25 -0400 |
commit | 742cd5867b2ef7ce865d7ab67574c4e3aa1fb155 (patch) | |
tree | b167001ac5f1c165ff29b4cacd16db94f50c7b77 /arch/mips/txx9/generic/setup.c | |
parent | e8635b484f644c7873e6091f15330c49396f2cbc (diff) |
MIPS: TXx9: Add ACLC support
Add platform support for ACLC of TXx9 SoCs.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 369d8637217d..7f9101257615 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -876,3 +876,39 @@ void __init txx9_dmac_init(int id, unsigned long baseaddr, int irq, | |||
876 | } | 876 | } |
877 | #endif | 877 | #endif |
878 | } | 878 | } |
879 | |||
880 | void __init txx9_aclc_init(unsigned long baseaddr, int irq, | ||
881 | unsigned int dmac_id, | ||
882 | unsigned int dma_chan_out, | ||
883 | unsigned int dma_chan_in) | ||
884 | { | ||
885 | #if defined(CONFIG_SND_SOC_TXX9ACLC) || \ | ||
886 | defined(CONFIG_SND_SOC_TXX9ACLC_MODULE) | ||
887 | unsigned int dma_base = dmac_id * TXX9_DMA_MAX_NR_CHANNELS; | ||
888 | struct resource res[] = { | ||
889 | { | ||
890 | .start = baseaddr, | ||
891 | .end = baseaddr + 0x100 - 1, | ||
892 | .flags = IORESOURCE_MEM, | ||
893 | }, { | ||
894 | .start = irq, | ||
895 | .flags = IORESOURCE_IRQ, | ||
896 | }, { | ||
897 | .name = "txx9dmac-chan", | ||
898 | .start = dma_base + dma_chan_out, | ||
899 | .flags = IORESOURCE_DMA, | ||
900 | }, { | ||
901 | .name = "txx9dmac-chan", | ||
902 | .start = dma_base + dma_chan_in, | ||
903 | .flags = IORESOURCE_DMA, | ||
904 | } | ||
905 | }; | ||
906 | struct platform_device *pdev = | ||
907 | platform_device_alloc("txx9aclc-ac97", -1); | ||
908 | |||
909 | if (!pdev || | ||
910 | platform_device_add_resources(pdev, res, ARRAY_SIZE(res)) || | ||
911 | platform_device_add(pdev)) | ||
912 | platform_device_put(pdev); | ||
913 | #endif | ||
914 | } | ||