2009-03-04 04:28:35 +01:00
|
|
|
/****************************************************************************
|
|
|
|
****************************************************************************
|
|
|
|
***
|
|
|
|
*** This header was automatically generated from a Linux kernel header
|
|
|
|
*** of the same name, to make information necessary for userspace to
|
|
|
|
*** call into the kernel available to libc. It contains only constants,
|
|
|
|
*** structures, and macros generated from the original header, and thus,
|
|
|
|
*** contains no copyrightable information.
|
|
|
|
***
|
2012-03-08 06:13:49 +01:00
|
|
|
*** To edit the content of this header, modify the corresponding
|
|
|
|
*** source file (e.g. under external/kernel-headers/original/) then
|
|
|
|
*** run bionic/libc/kernel/tools/update_all.py
|
|
|
|
***
|
|
|
|
*** Any manual change here will be lost the next time this script will
|
|
|
|
*** be run. You've been warned!
|
|
|
|
***
|
2009-03-04 04:28:35 +01:00
|
|
|
****************************************************************************
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef __ASM_ARCH_OMAP_MCBSP_H
|
|
|
|
#define __ASM_ARCH_OMAP_MCBSP_H
|
|
|
|
#include <asm/hardware.h>
|
|
|
|
#define OMAP730_MCBSP1_BASE 0xfffb1000
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define OMAP730_MCBSP2_BASE 0xfffb1800
|
|
|
|
#define OMAP1510_MCBSP1_BASE 0xe1011800
|
|
|
|
#define OMAP1510_MCBSP2_BASE 0xfffb1000
|
|
|
|
#define OMAP1510_MCBSP3_BASE 0xe1017000
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define OMAP1610_MCBSP1_BASE 0xe1011800
|
|
|
|
#define OMAP1610_MCBSP2_BASE 0xfffb1000
|
|
|
|
#define OMAP1610_MCBSP3_BASE 0xe1017000
|
|
|
|
#define OMAP24XX_MCBSP1_BASE 0x48074000
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define OMAP24XX_MCBSP2_BASE 0x48076000
|
|
|
|
#define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg)
|
|
|
|
#define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg)
|
|
|
|
#define RRST 0x0001
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define RRDY 0x0002
|
|
|
|
#define RFULL 0x0004
|
|
|
|
#define RSYNC_ERR 0x0008
|
2013-01-30 03:15:55 +01:00
|
|
|
#define RINTM(value) ((value)<<4)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define ABIS 0x0040
|
|
|
|
#define DXENA 0x0080
|
2013-01-30 03:15:55 +01:00
|
|
|
#define CLKSTP(value) ((value)<<11)
|
|
|
|
#define RJUST(value) ((value)<<13)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define DLB 0x8000
|
|
|
|
#define XRST 0x0001
|
|
|
|
#define XRDY 0x0002
|
|
|
|
#define XEMPTY 0x0004
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define XSYNC_ERR 0x0008
|
2013-01-30 03:15:55 +01:00
|
|
|
#define XINTM(value) ((value)<<4)
|
2009-03-04 04:28:35 +01:00
|
|
|
#define GRST 0x0040
|
|
|
|
#define FRST 0x0080
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define SOFT 0x0100
|
|
|
|
#define FREE 0x0200
|
|
|
|
#define CLKRP 0x0001
|
|
|
|
#define CLKXP 0x0002
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define FSRP 0x0004
|
|
|
|
#define FSXP 0x0008
|
|
|
|
#define DR_STAT 0x0010
|
|
|
|
#define DX_STAT 0x0020
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define CLKS_STAT 0x0040
|
|
|
|
#define SCLKME 0x0080
|
|
|
|
#define CLKRM 0x0100
|
|
|
|
#define CLKXM 0x0200
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define FSRM 0x0400
|
|
|
|
#define FSXM 0x0800
|
|
|
|
#define RIOEN 0x1000
|
|
|
|
#define XIOEN 0x2000
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define IDLE_EN 0x4000
|
2013-01-30 03:15:55 +01:00
|
|
|
#define RWDLEN1(value) ((value)<<5)
|
|
|
|
#define RFRLEN1(value) ((value)<<8)
|
|
|
|
#define XWDLEN1(value) ((value)<<5)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-01-30 03:15:55 +01:00
|
|
|
#define XFRLEN1(value) ((value)<<8)
|
|
|
|
#define RDATDLY(value) (value)
|
2009-03-04 04:28:35 +01:00
|
|
|
#define RFIG 0x0004
|
2013-01-30 03:15:55 +01:00
|
|
|
#define RCOMPAND(value) ((value)<<3)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2013-01-30 03:15:55 +01:00
|
|
|
#define RWDLEN2(value) ((value)<<5)
|
|
|
|
#define RFRLEN2(value) ((value)<<8)
|
2009-03-04 04:28:35 +01:00
|
|
|
#define RPHASE 0x8000
|
2013-01-30 03:15:55 +01:00
|
|
|
#define XDATDLY(value) (value)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define XFIG 0x0004
|
2013-01-30 03:15:55 +01:00
|
|
|
#define XCOMPAND(value) ((value)<<3)
|
|
|
|
#define XWDLEN2(value) ((value)<<5)
|
|
|
|
#define XFRLEN2(value) ((value)<<8)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define XPHASE 0x8000
|
2013-01-30 03:15:55 +01:00
|
|
|
#define CLKGDV(value) (value)
|
|
|
|
#define FWID(value) ((value)<<8)
|
|
|
|
#define FPER(value) (value)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define FSGM 0x1000
|
|
|
|
#define CLKSM 0x2000
|
|
|
|
#define CLKSP 0x4000
|
|
|
|
#define GSYNC 0x8000
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define RMCM 0x0001
|
2013-01-30 03:15:55 +01:00
|
|
|
#define RCBLK(value) ((value)<<2)
|
|
|
|
#define RPABLK(value) ((value)<<5)
|
|
|
|
#define RPBBLK(value) ((value)<<7)
|
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
|
|
#define XMCM(value) (value)
|
|
|
|
#define XCBLK(value) ((value)<<2)
|
|
|
|
#define XPABLK(value) ((value)<<5)
|
|
|
|
#define XPBBLK(value) ((value)<<7)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
struct omap_mcbsp_reg_cfg {
|
|
|
|
u16 spcr2;
|
|
|
|
u16 spcr1;
|
|
|
|
u16 rcr2;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
u16 rcr1;
|
|
|
|
u16 xcr2;
|
|
|
|
u16 xcr1;
|
|
|
|
u16 srgr2;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
u16 srgr1;
|
|
|
|
u16 mcr2;
|
|
|
|
u16 mcr1;
|
|
|
|
u16 pcr0;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
u16 rcerc;
|
|
|
|
u16 rcerd;
|
|
|
|
u16 xcerc;
|
|
|
|
u16 xcerd;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
u16 rcere;
|
|
|
|
u16 rcerf;
|
|
|
|
u16 xcere;
|
|
|
|
u16 xcerf;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
u16 rcerg;
|
|
|
|
u16 rcerh;
|
|
|
|
u16 xcerg;
|
|
|
|
u16 xcerh;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
};
|
|
|
|
typedef enum {
|
|
|
|
OMAP_MCBSP1 = 0,
|
|
|
|
OMAP_MCBSP2,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
OMAP_MCBSP3,
|
|
|
|
} omap_mcbsp_id;
|
|
|
|
typedef int __bitwise omap_mcbsp_io_type_t;
|
|
|
|
#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
|
|
|
|
typedef enum {
|
|
|
|
OMAP_MCBSP_WORD_8 = 0,
|
|
|
|
OMAP_MCBSP_WORD_12,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
OMAP_MCBSP_WORD_16,
|
|
|
|
OMAP_MCBSP_WORD_20,
|
|
|
|
OMAP_MCBSP_WORD_24,
|
|
|
|
OMAP_MCBSP_WORD_32,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
} omap_mcbsp_word_length;
|
|
|
|
typedef enum {
|
|
|
|
OMAP_MCBSP_CLK_RISING = 0,
|
|
|
|
OMAP_MCBSP_CLK_FALLING,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
} omap_mcbsp_clk_polarity;
|
|
|
|
typedef enum {
|
|
|
|
OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
|
|
|
|
OMAP_MCBSP_FS_ACTIVE_LOW,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
} omap_mcbsp_fs_polarity;
|
|
|
|
typedef enum {
|
|
|
|
OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
|
|
|
|
OMAP_MCBSP_CLK_STP_MODE_DELAY,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
} omap_mcbsp_clk_stp_mode;
|
|
|
|
typedef enum {
|
|
|
|
OMAP_MCBSP_SPI_MASTER = 0,
|
|
|
|
OMAP_MCBSP_SPI_SLAVE,
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
} omap_mcbsp_spi_mode;
|
|
|
|
struct omap_mcbsp_spi_cfg {
|
|
|
|
omap_mcbsp_spi_mode spi_mode;
|
|
|
|
omap_mcbsp_clk_polarity rx_clock_polarity;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
omap_mcbsp_clk_polarity tx_clock_polarity;
|
|
|
|
omap_mcbsp_fs_polarity fsx_polarity;
|
|
|
|
u8 clk_div;
|
|
|
|
omap_mcbsp_clk_stp_mode clk_stp_mode;
|
2012-03-08 06:13:49 +01:00
|
|
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
2009-03-04 04:28:35 +01:00
|
|
|
omap_mcbsp_word_length word_length;
|
|
|
|
};
|
|
|
|
#endif
|