setup.c (f48c8c958a2d39f13dace880d15a6e711aafe577) | setup.c (742cd5867b2ef7ce865d7ab67574c4e3aa1fb155) |
---|---|
1/* 2 * linux/arch/mips/txx9/generic/setup.c 3 * 4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 5 * and RBTX49xx patch from CELF patch archive. 6 * 7 * 2003-2005 (c) MontaVista Software, Inc. 8 * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 --- 862 unchanged lines hidden (view full) --- 871 ARRAY_SIZE(chan_res)) || 872#endif 873 platform_device_add_data(pdev, &cpdata, sizeof(cpdata)) || 874 platform_device_add(pdev)) 875 platform_device_put(pdev); 876 } 877#endif 878} | 1/* 2 * linux/arch/mips/txx9/generic/setup.c 3 * 4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 5 * and RBTX49xx patch from CELF patch archive. 6 * 7 * 2003-2005 (c) MontaVista Software, Inc. 8 * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 --- 862 unchanged lines hidden (view full) --- 871 ARRAY_SIZE(chan_res)) || 872#endif 873 platform_device_add_data(pdev, &cpdata, sizeof(cpdata)) || 874 platform_device_add(pdev)) 875 platform_device_put(pdev); 876 } 877#endif 878} |
879 880void __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} |
|