18d971691SSachin Kamat /* 2436d42c6SArnd Bergmann * Copyright (c) 2009 Samsung Electronics Co. Ltd 3436d42c6SArnd Bergmann * Author: Jaswinder Singh <[email protected]> 4436d42c6SArnd Bergmann * 5436d42c6SArnd Bergmann * This program is free software; you can redistribute it and/or modify 6436d42c6SArnd Bergmann * it under the terms of the GNU General Public License version 2 as 7436d42c6SArnd Bergmann * published by the Free Software Foundation. 8436d42c6SArnd Bergmann */ 9436d42c6SArnd Bergmann 10436d42c6SArnd Bergmann /* The machine init code calls s3c*_ac97_setup_gpio with 11436d42c6SArnd Bergmann * one of these defines in order to select appropriate bank 12436d42c6SArnd Bergmann * of GPIO for AC97 pins 13436d42c6SArnd Bergmann */ 14436d42c6SArnd Bergmann #define S3C64XX_AC97_GPD 0 15436d42c6SArnd Bergmann #define S3C64XX_AC97_GPE 1 16436d42c6SArnd Bergmann extern void s3c64xx_ac97_setup_gpio(int); 17436d42c6SArnd Bergmann 18436d42c6SArnd Bergmann struct samsung_i2s { 19436d42c6SArnd Bergmann /* If the Primary DAI has 5.1 Channels */ 20436d42c6SArnd Bergmann #define QUIRK_PRI_6CHAN (1 << 0) 21436d42c6SArnd Bergmann /* If the I2S block has a Stereo Overlay Channel */ 22436d42c6SArnd Bergmann #define QUIRK_SEC_DAI (1 << 1) 23436d42c6SArnd Bergmann /* 24436d42c6SArnd Bergmann * If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit) 25436d42c6SArnd Bergmann * The Machine driver must provide suitably set clock to the I2S block. 26436d42c6SArnd Bergmann */ 27436d42c6SArnd Bergmann #define QUIRK_NO_MUXPSR (1 << 2) 28436d42c6SArnd Bergmann #define QUIRK_NEED_RSTCLR (1 << 3) 294ca0c0d4SPadmavathi Venna #define QUIRK_SUPPORTS_TDM (1 << 4) 30*b0759736SPadmavathi Venna #define QUIRK_SUPPORTS_IDMA (1 << 5) 31436d42c6SArnd Bergmann /* Quirks of the I2S controller */ 32436d42c6SArnd Bergmann u32 quirks; 33436d42c6SArnd Bergmann dma_addr_t idma_addr; 34436d42c6SArnd Bergmann }; 35436d42c6SArnd Bergmann 36436d42c6SArnd Bergmann /** 37436d42c6SArnd Bergmann * struct s3c_audio_pdata - common platform data for audio device drivers 38436d42c6SArnd Bergmann * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode 39436d42c6SArnd Bergmann */ 40436d42c6SArnd Bergmann struct s3c_audio_pdata { 41436d42c6SArnd Bergmann int (*cfg_gpio)(struct platform_device *); 42436d42c6SArnd Bergmann union { 43436d42c6SArnd Bergmann struct samsung_i2s i2s; 44436d42c6SArnd Bergmann } type; 45436d42c6SArnd Bergmann }; 46