~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/qcom/lpass.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright (c) 2010-2011,2013-2015 The Linux Foundation. All rights reserved.
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU General Public License version 2 and
  6  * only version 2 as published by the Free Software Foundation.
  7  *
  8  * This program is distributed in the hope that it will be useful,
  9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 11  * GNU General Public License for more details.
 12  *
 13  * lpass.h - Definitions for the QTi LPASS
 14  */
 15 
 16 #ifndef __LPASS_H__
 17 #define __LPASS_H__
 18 
 19 #include <linux/clk.h>
 20 #include <linux/compiler.h>
 21 #include <linux/platform_device.h>
 22 #include <linux/regmap.h>
 23 
 24 #define LPASS_AHBIX_CLOCK_FREQUENCY             131072000
 25 #define LPASS_MAX_MI2S_PORTS                    (8)
 26 #define LPASS_MAX_DMA_CHANNELS                  (8)
 27 
 28 /* Both the CPU DAI and platform drivers will access this data */
 29 struct lpass_data {
 30 
 31         /* AHB-I/X bus clocks inside the low-power audio subsystem (LPASS) */
 32         struct clk *ahbix_clk;
 33 
 34         /* MI2S system clock */
 35         struct clk *mi2s_osr_clk[LPASS_MAX_MI2S_PORTS];
 36 
 37         /* MI2S bit clock (derived from system clock by a divider */
 38         struct clk *mi2s_bit_clk[LPASS_MAX_MI2S_PORTS];
 39 
 40         /* low-power audio interface (LPAIF) registers */
 41         void __iomem *lpaif;
 42 
 43         /* regmap backed by the low-power audio interface (LPAIF) registers */
 44         struct regmap *lpaif_map;
 45 
 46         /* interrupts from the low-power audio interface (LPAIF) */
 47         int lpaif_irq;
 48 
 49         /* SOC specific variations in the LPASS IP integration */
 50         struct lpass_variant *variant;
 51 
 52         /* bit map to keep track of static channel allocations */
 53         unsigned long rdma_ch_bit_map;
 54 
 55         /* used it for handling interrupt per dma channel */
 56         struct snd_pcm_substream *substream[LPASS_MAX_DMA_CHANNELS];
 57 
 58         /* 8016 specific */
 59         struct clk *pcnoc_mport_clk;
 60         struct clk *pcnoc_sway_clk;
 61 };
 62 
 63 /* Vairant data per each SOC */
 64 struct lpass_variant {
 65         u32     i2sctrl_reg_base;
 66         u32     i2sctrl_reg_stride;
 67         u32     i2s_ports;
 68         u32     irq_reg_base;
 69         u32     irq_reg_stride;
 70         u32     irq_ports;
 71         u32     rdma_reg_base;
 72         u32     rdma_reg_stride;
 73         u32     rdma_channels;
 74 
 75         /**
 76          * on SOCs like APQ8016 the channel control bits start
 77          * at different offset to ipq806x
 78          **/
 79         u32     rdmactl_audif_start;
 80         /* SOC specific intialization like clocks */
 81         int (*init)(struct platform_device *pdev);
 82         int (*exit)(struct platform_device *pdev);
 83         int (*alloc_dma_channel)(struct lpass_data *data);
 84         int (*free_dma_channel)(struct lpass_data *data, int ch);
 85 
 86         /* SOC specific dais */
 87         struct snd_soc_dai_driver *dai_driver;
 88         int num_dai;
 89 };
 90 
 91 /* register the platform driver from the CPU DAI driver */
 92 int asoc_qcom_lpass_platform_register(struct platform_device *);
 93 int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev);
 94 int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev);
 95 int asoc_qcom_lpass_cpu_dai_probe(struct snd_soc_dai *dai);
 96 extern const struct snd_soc_dai_ops asoc_qcom_lpass_cpu_dai_ops;
 97 
 98 #endif /* __LPASS_H__ */
 99 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp