/* * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _MXS_SAIF_H #define _MXS_SAIF_H #define SAIF_CTRL 0x0 #define SAIF_STAT 0x10 #define SAIF_DATA 0x20 #define SAIF_VERSION 0X30 /* SAIF_CTRL */ #define BM_SAIF_CTRL_SFTRST 0x80000000 #define BM_SAIF_CTRL_CLKGATE 0x40000000 #define BP_SAIF_CTRL_BITCLK_MULT_RATE 27 #define BM_SAIF_CTRL_BITCLK_MULT_RATE 0x38000000 #define BF_SAIF_CTRL_BITCLK_MULT_RATE(v) \ (((v) << 27) & BM_SAIF_CTRL_BITCLK_MULT_RATE) #define BM_SAIF_CTRL_BITCLK_BASE_RATE 0x04000000 #define BM_SAIF_CTRL_FIFO_ERROR_IRQ_EN 0x02000000 #define BM_SAIF_CTRL_FIFO_SERVICE_IRQ_EN 0x01000000 #define BP_SAIF_CTRL_RSRVD2 21 #define BM_SAIF_CTRL_RSRVD2 0x00E00000 #define BP_SAIF_CTRL_DMAWAIT_COUNT 16 #define BM_SAIF_CTRL_DMAWAIT_COUNT 0x001F0000 #define BF_SAIF_CTRL_DMAWAIT_COUNT(v) \ (((v) << 16) & BM_SAIF_CTRL_DMAWAIT_COUNT) #define BP_SAIF_CTRL_CHANNEL_NUM_SELECT 14 #define BM_SAIF_CTRL_CHANNEL_NUM_SELECT 0x0000C000 #define BF_SAIF_CTRL_CHANNEL_NUM_SELECT(v) \ (((v) << 14) & BM_SAIF_CTRL_CHANNEL_NUM_SELECT) #define BM_SAIF_CTRL_LRCLK_PULSE 0x00002000 #define BM_SAIF_CTRL_BIT_ORDER 0x00001000 #define BM_SAIF_CTRL_DELAY 0x00000800 #define BM_SAIF_CTRL_JUSTIFY 0x00000400 #define BM_SAIF_CTRL_LRCLK_POLARITY 0x00000200 #define BM_SAIF_CTRL_BITCLK_EDGE 0x00000100 #define BP_SAIF_CTRL_WORD_LENGTH 4 #define BM_SAIF_CTRL_WORD_LENGTH 0x000000F0 #define BF_SAIF_CTRL_WORD_LENGTH(v) \ (((v) << 4) & BM_SAIF_CTRL_WORD_LENGTH) #define BM_SAIF_CTRL_BITCLK_48XFS_ENABLE 0x00000008 #define BM_SAIF_CTRL_SLAVE_MODE 0x00000004 #define BM_SAIF_CTRL_READ_MODE 0x00000002 #define BM_SAIF_CTRL_RUN 0x00000001 /* SAIF_STAT */ #define BM_SAIF_STAT_PRESENT 0x80000000 #define BP_SAIF_STAT_RSRVD2 17 #define BM_SAIF_STAT_RSRVD2 0x7FFE0000 #define BF_SAIF_STAT_RSRVD2(v) \ (((v) << 17) & BM_SAIF_STAT_RSRVD2) #define BM_SAIF_STAT_DMA_PREQ 0x00010000 #define BP_SAIF_STAT_RSRVD1 7 #define BM_SAIF_STAT_RSRVD1 0x0000FF80 #define BF_SAIF_STAT_RSRVD1(v) \ (((v) << 7) & BM_SAIF_STAT_RSRVD1) #define BM_SAIF_STAT_FIFO_UNDERFLOW_IRQ 0x00000040 #define BM_SAIF_STAT_FIFO_OVERFLOW_IRQ 0x00000020 #define BM_SAIF_STAT_FIFO_SERVICE_IRQ 0x00000010 #define BP_SAIF_STAT_RSRVD0 1 #define BM_SAIF_STAT_RSRVD0 0x0000000E #define BF_SAIF_STAT_RSRVD0(v) \ (((v) << 1) & BM_SAIF_STAT_RSRVD0) #define BM_SAIF_STAT_BUSY 0x00000001 /* SAFI_DATA */ #define BP_SAIF_DATA_PCM_RIGHT 16 #define BM_SAIF_DATA_PCM_RIGHT 0xFFFF0000 #define BF_SAIF_DATA_PCM_RIGHT(v) \ (((v) << 16) & BM_SAIF_DATA_PCM_RIGHT) #define BP_SAIF_DATA_PCM_LEFT 0 #define BM_SAIF_DATA_PCM_LEFT 0x0000FFFF #define BF_SAIF_DATA_PCM_LEFT(v) \ (((v) << 0) & BM_SAIF_DATA_PCM_LEFT) /* SAIF_VERSION */ #define BP_SAIF_VERSION_MAJOR 24 #define BM_SAIF_VERSION_MAJOR 0xFF000000 #define BF_SAIF_VERSION_MAJOR(v) \ (((v) << 24) & BM_SAIF_VERSION_MAJOR) #define BP_SAIF_VERSION_MINOR 16 #define BM_SAIF_VERSION_MINOR 0x00FF0000 #define BF_SAIF_VERSION_MINOR(v) \ (((v) << 16) & BM_SAIF_VERSION_MINOR) #define BP_SAIF_VERSION_STEP 0 #define BM_SAIF_VERSION_STEP 0x0000FFFF #define BF_SAIF_VERSION_STEP(v) \ (((v) << 0) & BM_SAIF_VERSION_STEP) #define MXS_SAIF_MCLK 0 #include "mxs-pcm.h" struct mxs_saif { struct device *dev; struct clk *clk; unsigned int mclk; unsigned int mclk_in_use; void __iomem *base; unsigned int id; unsigned int master_id; unsigned int cur_rate; unsigned int ongoing; u32 fifo_underrun; u32 fifo_overrun; enum { MXS_SAIF_STATE_STOPPED, MXS_SAIF_STATE_RUNNING, } state; }; extern int mxs_saif_put_mclk(unsigned int saif_id); extern int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk, unsigned int rate); #endif amp;id=635b8c8ecdd27142d7fdab0df334b2e9201481cf'>plain -rw-r--r--drmP.h25776logplain -rw-r--r--drm_agpsupport.h3867logplain -rw-r--r--drm_atomic.h14443logplain -rw-r--r--drm_atomic_helper.h10607logplain -rw-r--r--drm_auth.h2260logplain -rw-r--r--drm_blend.h2700logplain -rw-r--r--drm_bridge.h7977logplain -rw-r--r--drm_cache.h1763logplain -rw-r--r--drm_color_mgmt.h2166logplain -rw-r--r--drm_connector.h28975logplain -rw-r--r--drm_crtc.h28999logplain -rw-r--r--drm_crtc_helper.h3301logplain -rw-r--r--drm_debugfs_crc.h2670logplain -rw-r--r--drm_displayid.h2850logplain -rw-r--r--drm_dp_dual_mode_helper.h4532logplain -rw-r--r--drm_dp_helper.h30638logplain -rw-r--r--drm_dp_mst_helper.h16260logplain -rw-r--r--drm_drv.h14861logplain -rw-r--r--drm_edid.h14335logplain -rw-r--r--drm_encoder.h8160logplain -rw-r--r--drm_encoder_slave.h6583logplain -rw-r--r--drm_fb_cma_helper.h1929logplain -rw-r--r--drm_fb_helper.h15125logplain -rw-r--r--drm_fixed.h4825logplain -rw-r--r--drm_flip_work.h3071logplain -rw-r--r--drm_fourcc.h2748logplain -rw-r--r--drm_framebuffer.h9623logplain -rw-r--r--drm_gem.h8052logplain -rw-r--r--drm_gem_cma_helper.h2286logplain -rw-r--r--drm_global.h2011logplain -rw-r--r--drm_hashtab.h3139logplain -rw-r--r--drm_irq.h6323logplain -rw-r--r--drm_legacy.h6933logplain -rw-r--r--drm_mem_util.h2468logplain -rw-r--r--drm_mipi_dsi.h10327logplain -rw-r--r--drm_mm.h11462logplain -rw-r--r--drm_mode_config.h23728logplain -rw-r--r--drm_mode_object.h4911logplain -rw-r--r--drm_modes.h17078logplain -rw-r--r--drm_modeset_helper.h1576logplain -rw-r--r--drm_modeset_helper_vtables.h41180logplain -rw-r--r--drm_modeset_lock.h4241logplain -rw-r--r--drm_of.h2034logplain -rw-r--r--drm_os_linux.h2230logplain -rw-r--r--drm_panel.h7079logplain -rw-r--r--drm_pciids.h68035logplain -rw-r--r--drm_plane.h19435logplain -rw-r--r--drm_plane_helper.h3186logplain -rw-r--r--drm_print.h3232logplain -rw-r--r--drm_property.h11460logplain -rw-r--r--drm_rect.h5103logplain -rw-r--r--drm_simple_kms_helper.h4090logplain -rw-r--r--drm_sysfs.h300logplain -rw-r--r--drm_vma_manager.h7840logplain -rw-r--r--gma_drm.h1033logplain d---------i2c109logplain