Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Blackfin arch: cleanup bfin_sport.h header and export it to userspace

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>

authored by

Alon Bar-Lev and committed by
Bryan Wu
fb7b75ab 7786ce82

+15 -31
+1
arch/blackfin/include/asm/Kbuild
··· 1 1 include include/asm-generic/Kbuild.asm 2 2 3 + unifdef-y += bfin_sport.h 3 4 unifdef-y += fixed_code.h
+14 -31
arch/blackfin/include/asm/bfin_sport.h
··· 1 1 /* 2 - * File: include/asm-blackfin/bfin_sport.h 3 - * Based on: 4 - * Author: Roy Huang (roy.huang@analog.com) 2 + * bfin_sport.h - userspace header for bfin sport driver 5 3 * 6 - * Created: Thu Aug. 24 2006 7 - * Description: 4 + * Copyright 2004-2008 Analog Devices Inc. 8 5 * 9 - * Modified: 10 - * Copyright 2004-2006 Analog Devices Inc. 11 - * 12 - * Bugs: Enter bugs at http://blackfin.uclinux.org/ 13 - * 14 - * This program is free software; you can redistribute it and/or modify 15 - * it under the terms of the GNU General Public License as published by 16 - * the Free Software Foundation; either version 2 of the License, or 17 - * (at your option) any later version. 18 - * 19 - * This program is distributed in the hope that it will be useful, 20 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 - * GNU General Public License for more details. 23 - * 24 - * You should have received a copy of the GNU General Public License 25 - * along with this program; if not, see the file COPYING, or write 26 - * to the Free Software Foundation, Inc., 27 - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 6 + * Licensed under the GPL-2 or later. 28 7 */ 29 8 30 9 #ifndef __BFIN_SPORT_H__ ··· 21 42 #define NORM_FORMAT 0x0 22 43 #define ALAW_FORMAT 0x2 23 44 #define ULAW_FORMAT 0x3 24 - struct sport_register; 25 45 26 46 /* Function driver which use sport must initialize the structure */ 27 47 struct sport_config { 28 - /*TDM (multichannels), I2S or other mode */ 48 + /* TDM (multichannels), I2S or other mode */ 29 49 unsigned int mode:3; 30 50 31 51 /* if TDM mode is selected, channels must be set */ ··· 50 72 int serial_clk; 51 73 int fsync_clk; 52 74 53 - unsigned int data_format:2; /*Normal, u-law or a-law */ 75 + unsigned int data_format:2; /* Normal, u-law or a-law */ 54 76 55 77 int word_len; /* How length of the word in bits, 3-32 bits */ 56 78 int dma_enabled; 57 79 }; 80 + 81 + /* Userspace interface */ 82 + #define SPORT_IOC_MAGIC 'P' 83 + #define SPORT_IOC_CONFIG _IOWR('P', 0x01, struct sport_config) 84 + 85 + #ifdef __KERNEL__ 58 86 59 87 struct sport_register { 60 88 unsigned short tcr1; ··· 101 117 unsigned long mrcs3; 102 118 }; 103 119 104 - #define SPORT_IOC_MAGIC 'P' 105 - #define SPORT_IOC_CONFIG _IOWR('P', 0x01, struct sport_config) 106 - 107 120 struct sport_dev { 108 121 struct cdev cdev; /* Char device structure */ 109 122 ··· 130 149 struct sport_config config; 131 150 }; 132 151 152 + #endif 153 + 133 154 #define SPORT_TCR1 0 134 155 #define SPORT_TCR2 1 135 156 #define SPORT_TCLKDIV 2 ··· 152 169 #define SPORT_MRCS2 22 153 170 #define SPORT_MRCS3 23 154 171 155 - #endif /*__BFIN_SPORT_H__*/ 172 + #endif