Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
sa1111.h File Reference
#include <mach/bitfield.h>

Go to the source code of this file.

Data Structures

struct  sa1111_dev
 
struct  sa1111_driver
 
struct  sa1111_platform_data
 

Macros

#define SA1111_VBASE   0xf4000000
 
#define SA1111_p2v(x)   ((x) - SA1111_BASE + SA1111_VBASE)
 
#define SA1111_v2p(x)   ((x) - SA1111_VBASE + SA1111_BASE)
 
#define _SA1111(x)   ((x) + sa1111->resource.start)
 
#define sa1111_writel(val, addr)   __raw_writel(val, addr)
 
#define sa1111_readl(addr)   __raw_readl(addr)
 
#define SA1111_ADDR_WIDTH   (26)
 
#define SA1111_ADDR_MASK   ((1<<SA1111_ADDR_WIDTH)-1)
 
#define SA1111_DMA_ADDR(x)   ((x)&SA1111_ADDR_MASK)
 
#define SA1111_SAC_DMA_MIN_XFER   (0x800)
 
#define SA1111_SKCR   0x0000
 
#define SA1111_SMCR   0x0004
 
#define SA1111_SKID   0x0008
 
#define SKCR_PLL_BYPASS   (1<<0)
 
#define SKCR_RCLKEN   (1<<1)
 
#define SKCR_SLEEP   (1<<2)
 
#define SKCR_DOZE   (1<<3)
 
#define SKCR_VCO_OFF   (1<<4)
 
#define SKCR_SCANTSTEN   (1<<5)
 
#define SKCR_CLKTSTEN   (1<<6)
 
#define SKCR_RDYEN   (1<<7)
 
#define SKCR_SELAC   (1<<8)
 
#define SKCR_OPPC   (1<<9)
 
#define SKCR_PLLTSTEN   (1<<10)
 
#define SKCR_USBIOTSTEN   (1<<11)
 
#define SKCR_OE_EN   (1<<13)
 
#define SMCR_DTIM   (1<<0)
 
#define SMCR_MBGE   (1<<1)
 
#define SMCR_DRAC_0   (1<<2)
 
#define SMCR_DRAC_1   (1<<3)
 
#define SMCR_DRAC_2   (1<<4)
 
#define SMCR_DRAC   Fld(3, 2)
 
#define SMCR_CLAT   (1<<5)
 
#define SKID_SIREV_MASK   (0x000000f0)
 
#define SKID_MTREV_MASK   (0x0000000f)
 
#define SKID_ID_MASK   (0xffffff00)
 
#define SKID_SA1111_ID   (0x690cc200)
 
#define SA1111_SKPCR   0x0200
 
#define SA1111_SKCDR   0x0204
 
#define SA1111_SKAUD   0x0208
 
#define SA1111_SKPMC   0x020c
 
#define SA1111_SKPTC   0x0210
 
#define SA1111_SKPEN0   0x0214
 
#define SA1111_SKPWM0   0x0218
 
#define SA1111_SKPEN1   0x021c
 
#define SA1111_SKPWM1   0x0220
 
#define SKPCR_UCLKEN   (1<<0)
 
#define SKPCR_ACCLKEN   (1<<1)
 
#define SKPCR_I2SCLKEN   (1<<2)
 
#define SKPCR_L3CLKEN   (1<<3)
 
#define SKPCR_SCLKEN   (1<<4)
 
#define SKPCR_PMCLKEN   (1<<5)
 
#define SKPCR_PTCLKEN   (1<<6)
 
#define SKPCR_DCLKEN   (1<<7)
 
#define SKPCR_PWMCLKEN   (1<<8)
 
#define SA1111_USB   0x0400
 
#define SA1111_SERAUDIO   0x0600
 
#define SA1111_SACR0   0x00
 
#define SA1111_SACR1   0x04
 
#define SA1111_SACR2   0x08
 
#define SA1111_SASR0   0x0c
 
#define SA1111_SASR1   0x10
 
#define SA1111_SASCR   0x18
 
#define SA1111_L3_CAR   0x1c
 
#define SA1111_L3_CDR   0x20
 
#define SA1111_ACCAR   0x24
 
#define SA1111_ACCDR   0x28
 
#define SA1111_ACSAR   0x2c
 
#define SA1111_ACSDR   0x30
 
#define SA1111_SADTCS   0x34
 
#define SA1111_SADTSA   0x38
 
#define SA1111_SADTCA   0x3c
 
#define SA1111_SADTSB   0x40
 
#define SA1111_SADTCB   0x44
 
#define SA1111_SADRCS   0x48
 
#define SA1111_SADRSA   0x4c
 
#define SA1111_SADRCA   0x50
 
#define SA1111_SADRSB   0x54
 
#define SA1111_SADRCB   0x58
 
#define SA1111_SAITR   0x5c
 
#define SA1111_SADR   0x80
 
#define SACR0_ENB   (1<<0)
 
#define SACR0_BCKD   (1<<2)
 
#define SACR0_RST   (1<<3)
 
#define SACR1_AMSL   (1<<0)
 
#define SACR1_L3EN   (1<<1)
 
#define SACR1_L3MB   (1<<2)
 
#define SACR1_DREC   (1<<3)
 
#define SACR1_DRPL   (1<<4)
 
#define SACR1_ENLBF   (1<<5)
 
#define SACR2_TS3V   (1<<0)
 
#define SACR2_TS4V   (1<<1)
 
#define SACR2_WKUP   (1<<2)
 
#define SACR2_DREC   (1<<3)
 
#define SACR2_DRPL   (1<<4)
 
#define SACR2_ENLBF   (1<<5)
 
#define SACR2_RESET   (1<<6)
 
#define SASR0_TNF   (1<<0)
 
#define SASR0_RNE   (1<<1)
 
#define SASR0_BSY   (1<<2)
 
#define SASR0_TFS   (1<<3)
 
#define SASR0_RFS   (1<<4)
 
#define SASR0_TUR   (1<<5)
 
#define SASR0_ROR   (1<<6)
 
#define SASR0_L3WD   (1<<16)
 
#define SASR0_L3RD   (1<<17)
 
#define SASR1_TNF   (1<<0)
 
#define SASR1_RNE   (1<<1)
 
#define SASR1_BSY   (1<<2)
 
#define SASR1_TFS   (1<<3)
 
#define SASR1_RFS   (1<<4)
 
#define SASR1_TUR   (1<<5)
 
#define SASR1_ROR   (1<<6)
 
#define SASR1_CADT   (1<<16)
 
#define SASR1_SADR   (1<<17)
 
#define SASR1_RSTO   (1<<18)
 
#define SASR1_CLPM   (1<<19)
 
#define SASR1_CRDY   (1<<20)
 
#define SASR1_RS3V   (1<<21)
 
#define SASR1_RS4V   (1<<22)
 
#define SASCR_TUR   (1<<5)
 
#define SASCR_ROR   (1<<6)
 
#define SASCR_DTS   (1<<16)
 
#define SASCR_RDD   (1<<17)
 
#define SASCR_STO   (1<<18)
 
#define SADTCS_TDEN   (1<<0)
 
#define SADTCS_TDIE   (1<<1)
 
#define SADTCS_TDBDA   (1<<3)
 
#define SADTCS_TDSTA   (1<<4)
 
#define SADTCS_TDBDB   (1<<5)
 
#define SADTCS_TDSTB   (1<<6)
 
#define SADTCS_TBIU   (1<<7)
 
#define SADRCS_RDEN   (1<<0)
 
#define SADRCS_RDIE   (1<<1)
 
#define SADRCS_RDBDA   (1<<3)
 
#define SADRCS_RDSTA   (1<<4)
 
#define SADRCS_RDBDB   (1<<5)
 
#define SADRCS_RDSTB   (1<<6)
 
#define SADRCS_RBIU   (1<<7)
 
#define SAD_CS_DEN   (1<<0)
 
#define SAD_CS_DIE   (1<<1) /* Not functional on metal 1 */
 
#define SAD_CS_DBDA   (1<<3) /* Not functional on metal 1 */
 
#define SAD_CS_DSTA   (1<<4)
 
#define SAD_CS_DBDB   (1<<5) /* Not functional on metal 1 */
 
#define SAD_CS_DSTB   (1<<6)
 
#define SAD_CS_BIU   (1<<7) /* Not functional on metal 1 */
 
#define SAITR_TFS   (1<<0)
 
#define SAITR_RFS   (1<<1)
 
#define SAITR_TUR   (1<<2)
 
#define SAITR_ROR   (1<<3)
 
#define SAITR_CADT   (1<<4)
 
#define SAITR_SADR   (1<<5)
 
#define SAITR_RSTO   (1<<6)
 
#define SAITR_TDBDA   (1<<8)
 
#define SAITR_TDBDB   (1<<9)
 
#define SAITR_RDBDA   (1<<10)
 
#define SAITR_RDBDB   (1<<11)
 
#define SA1111_GPIO   0x1000
 
#define SA1111_GPIO_PADDR   (0x000)
 
#define SA1111_GPIO_PADRR   (0x004)
 
#define SA1111_GPIO_PADWR   (0x004)
 
#define SA1111_GPIO_PASDR   (0x008)
 
#define SA1111_GPIO_PASSR   (0x00c)
 
#define SA1111_GPIO_PBDDR   (0x010)
 
#define SA1111_GPIO_PBDRR   (0x014)
 
#define SA1111_GPIO_PBDWR   (0x014)
 
#define SA1111_GPIO_PBSDR   (0x018)
 
#define SA1111_GPIO_PBSSR   (0x01c)
 
#define SA1111_GPIO_PCDDR   (0x020)
 
#define SA1111_GPIO_PCDRR   (0x024)
 
#define SA1111_GPIO_PCDWR   (0x024)
 
#define SA1111_GPIO_PCSDR   (0x028)
 
#define SA1111_GPIO_PCSSR   (0x02c)
 
#define GPIO_A0   (1 << 0)
 
#define GPIO_A1   (1 << 1)
 
#define GPIO_A2   (1 << 2)
 
#define GPIO_A3   (1 << 3)
 
#define GPIO_B0   (1 << 8)
 
#define GPIO_B1   (1 << 9)
 
#define GPIO_B2   (1 << 10)
 
#define GPIO_B3   (1 << 11)
 
#define GPIO_B4   (1 << 12)
 
#define GPIO_B5   (1 << 13)
 
#define GPIO_B6   (1 << 14)
 
#define GPIO_B7   (1 << 15)
 
#define GPIO_C0   (1 << 16)
 
#define GPIO_C1   (1 << 17)
 
#define GPIO_C2   (1 << 18)
 
#define GPIO_C3   (1 << 19)
 
#define GPIO_C4   (1 << 20)
 
#define GPIO_C5   (1 << 21)
 
#define GPIO_C6   (1 << 22)
 
#define GPIO_C7   (1 << 23)
 
#define SA1111_INTC   0x1600
 
#define SA1111_INTTEST0   0x0000
 
#define SA1111_INTTEST1   0x0004
 
#define SA1111_INTEN0   0x0008
 
#define SA1111_INTEN1   0x000c
 
#define SA1111_INTPOL0   0x0010
 
#define SA1111_INTPOL1   0x0014
 
#define SA1111_INTTSTSEL   0x0018
 
#define SA1111_INTSTATCLR0   0x001c
 
#define SA1111_INTSTATCLR1   0x0020
 
#define SA1111_INTSET0   0x0024
 
#define SA1111_INTSET1   0x0028
 
#define SA1111_WAKEEN0   0x002c
 
#define SA1111_WAKEEN1   0x0030
 
#define SA1111_WAKEPOL0   0x0034
 
#define SA1111_WAKEPOL1   0x0038
 
#define SA1111_KBD   0x0a00
 
#define SA1111_MSE   0x0c00
 
#define SA1111_PCMCIA   0x1600
 
#define SA1111_DEVID_SBI   (1 << 0)
 
#define SA1111_DEVID_SK   (1 << 1)
 
#define SA1111_DEVID_USB   (1 << 2)
 
#define SA1111_DEVID_SAC   (1 << 3)
 
#define SA1111_DEVID_SSP   (1 << 4)
 
#define SA1111_DEVID_PS2   (3 << 5)
 
#define SA1111_DEVID_PS2_KBD   (1 << 5)
 
#define SA1111_DEVID_PS2_MSE   (1 << 6)
 
#define SA1111_DEVID_GPIO   (1 << 7)
 
#define SA1111_DEVID_INT   (1 << 8)
 
#define SA1111_DEVID_PCMCIA   (1 << 9)
 
#define SA1111_DEV(_d)   container_of((_d), struct sa1111_dev, dev)
 
#define sa1111_get_drvdata(d)   dev_get_drvdata(&(d)->dev)
 
#define sa1111_set_drvdata(d, p)   dev_set_drvdata(&(d)->dev, p)
 
#define SA1111_DRV(_d)   container_of((_d), struct sa1111_driver, drv)
 
#define SA1111_DRIVER_NAME(_sadev)   ((_sadev)->dev.driver->name)
 
#define SA1111_AUDIO_ACLINK   0
 
#define SA1111_AUDIO_I2S   1
 

Functions

int sa1111_enable_device (struct sa1111_dev *)
 
void sa1111_disable_device (struct sa1111_dev *)
 
unsigned int sa1111_pll_clock (struct sa1111_dev *)
 
void sa1111_select_audio_mode (struct sa1111_dev *sadev, int mode)
 
int sa1111_set_audio_rate (struct sa1111_dev *sadev, int rate)
 
int sa1111_get_audio_rate (struct sa1111_dev *sadev)
 
int sa1111_check_dma_bug (dma_addr_t addr)
 
int sa1111_driver_register (struct sa1111_driver *)
 
void sa1111_driver_unregister (struct sa1111_driver *)
 
void sa1111_set_io_dir (struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir)
 
void sa1111_set_io (struct sa1111_dev *sadev, unsigned int bits, unsigned int v)
 
void sa1111_set_sleep_io (struct sa1111_dev *sadev, unsigned int bits, unsigned int v)
 

Variables

struct bus_type sa1111_bus_type
 

Macro Definition Documentation

#define _SA1111 (   x)    ((x) + sa1111->resource.start)

Definition at line 29 of file sa1111.h.

#define GPIO_A0   (1 << 0)

Definition at line 324 of file sa1111.h.

#define GPIO_A1   (1 << 1)

Definition at line 325 of file sa1111.h.

#define GPIO_A2   (1 << 2)

Definition at line 326 of file sa1111.h.

#define GPIO_A3   (1 << 3)

Definition at line 327 of file sa1111.h.

#define GPIO_B0   (1 << 8)

Definition at line 329 of file sa1111.h.

#define GPIO_B1   (1 << 9)

Definition at line 330 of file sa1111.h.

#define GPIO_B2   (1 << 10)

Definition at line 331 of file sa1111.h.

#define GPIO_B3   (1 << 11)

Definition at line 332 of file sa1111.h.

#define GPIO_B4   (1 << 12)

Definition at line 333 of file sa1111.h.

#define GPIO_B5   (1 << 13)

Definition at line 334 of file sa1111.h.

#define GPIO_B6   (1 << 14)

Definition at line 335 of file sa1111.h.

#define GPIO_B7   (1 << 15)

Definition at line 336 of file sa1111.h.

#define GPIO_C0   (1 << 16)

Definition at line 338 of file sa1111.h.

#define GPIO_C1   (1 << 17)

Definition at line 339 of file sa1111.h.

#define GPIO_C2   (1 << 18)

Definition at line 340 of file sa1111.h.

#define GPIO_C3   (1 << 19)

Definition at line 341 of file sa1111.h.

#define GPIO_C4   (1 << 20)

Definition at line 342 of file sa1111.h.

#define GPIO_C5   (1 << 21)

Definition at line 343 of file sa1111.h.

#define GPIO_C6   (1 << 22)

Definition at line 344 of file sa1111.h.

#define GPIO_C7   (1 << 23)

Definition at line 345 of file sa1111.h.

#define SA1111_ACCAR   0x24

Definition at line 181 of file sa1111.h.

#define SA1111_ACCDR   0x28

Definition at line 182 of file sa1111.h.

#define SA1111_ACSAR   0x2c

Definition at line 183 of file sa1111.h.

#define SA1111_ACSDR   0x30

Definition at line 184 of file sa1111.h.

#define SA1111_ADDR_MASK   ((1<<SA1111_ADDR_WIDTH)-1)

Definition at line 41 of file sa1111.h.

#define SA1111_ADDR_WIDTH   (26)

Definition at line 40 of file sa1111.h.

#define SA1111_AUDIO_ACLINK   0

Definition at line 451 of file sa1111.h.

#define SA1111_AUDIO_I2S   1

Definition at line 452 of file sa1111.h.

#define SA1111_DEV (   _d)    container_of((_d), struct sa1111_dev, dev)

Definition at line 423 of file sa1111.h.

#define SA1111_DEVID_GPIO   (1 << 7)

Definition at line 409 of file sa1111.h.

#define SA1111_DEVID_INT   (1 << 8)

Definition at line 410 of file sa1111.h.

#define SA1111_DEVID_PCMCIA   (1 << 9)

Definition at line 411 of file sa1111.h.

#define SA1111_DEVID_PS2   (3 << 5)

Definition at line 406 of file sa1111.h.

#define SA1111_DEVID_PS2_KBD   (1 << 5)

Definition at line 407 of file sa1111.h.

#define SA1111_DEVID_PS2_MSE   (1 << 6)

Definition at line 408 of file sa1111.h.

#define SA1111_DEVID_SAC   (1 << 3)

Definition at line 404 of file sa1111.h.

#define SA1111_DEVID_SBI   (1 << 0)

Definition at line 401 of file sa1111.h.

#define SA1111_DEVID_SK   (1 << 1)

Definition at line 402 of file sa1111.h.

#define SA1111_DEVID_SSP   (1 << 4)

Definition at line 405 of file sa1111.h.

#define SA1111_DEVID_USB   (1 << 2)

Definition at line 403 of file sa1111.h.

#define SA1111_DMA_ADDR (   x)    ((x)&SA1111_ADDR_MASK)

Definition at line 42 of file sa1111.h.

#define SA1111_DRIVER_NAME (   _sadev)    ((_sadev)->dev.driver->name)

Definition at line 440 of file sa1111.h.

#define SA1111_DRV (   _d)    container_of((_d), struct sa1111_driver, drv)

Definition at line 438 of file sa1111.h.

#define sa1111_get_drvdata (   d)    dev_get_drvdata(&(d)->dev)

Definition at line 425 of file sa1111.h.

#define SA1111_GPIO   0x1000

Definition at line 306 of file sa1111.h.

#define SA1111_GPIO_PADDR   (0x000)

Definition at line 308 of file sa1111.h.

#define SA1111_GPIO_PADRR   (0x004)

Definition at line 309 of file sa1111.h.

#define SA1111_GPIO_PADWR   (0x004)

Definition at line 310 of file sa1111.h.

#define SA1111_GPIO_PASDR   (0x008)

Definition at line 311 of file sa1111.h.

#define SA1111_GPIO_PASSR   (0x00c)

Definition at line 312 of file sa1111.h.

#define SA1111_GPIO_PBDDR   (0x010)

Definition at line 313 of file sa1111.h.

#define SA1111_GPIO_PBDRR   (0x014)

Definition at line 314 of file sa1111.h.

#define SA1111_GPIO_PBDWR   (0x014)

Definition at line 315 of file sa1111.h.

#define SA1111_GPIO_PBSDR   (0x018)

Definition at line 316 of file sa1111.h.

#define SA1111_GPIO_PBSSR   (0x01c)

Definition at line 317 of file sa1111.h.

#define SA1111_GPIO_PCDDR   (0x020)

Definition at line 318 of file sa1111.h.

#define SA1111_GPIO_PCDRR   (0x024)

Definition at line 319 of file sa1111.h.

#define SA1111_GPIO_PCDWR   (0x024)

Definition at line 320 of file sa1111.h.

#define SA1111_GPIO_PCSDR   (0x028)

Definition at line 321 of file sa1111.h.

#define SA1111_GPIO_PCSSR   (0x02c)

Definition at line 322 of file sa1111.h.

#define SA1111_INTC   0x1600

Definition at line 367 of file sa1111.h.

#define SA1111_INTEN0   0x0008

Definition at line 374 of file sa1111.h.

#define SA1111_INTEN1   0x000c

Definition at line 375 of file sa1111.h.

#define SA1111_INTPOL0   0x0010

Definition at line 376 of file sa1111.h.

#define SA1111_INTPOL1   0x0014

Definition at line 377 of file sa1111.h.

#define SA1111_INTSET0   0x0024

Definition at line 381 of file sa1111.h.

#define SA1111_INTSET1   0x0028

Definition at line 382 of file sa1111.h.

#define SA1111_INTSTATCLR0   0x001c

Definition at line 379 of file sa1111.h.

#define SA1111_INTSTATCLR1   0x0020

Definition at line 380 of file sa1111.h.

#define SA1111_INTTEST0   0x0000

Definition at line 372 of file sa1111.h.

#define SA1111_INTTEST1   0x0004

Definition at line 373 of file sa1111.h.

#define SA1111_INTTSTSEL   0x0018

Definition at line 378 of file sa1111.h.

#define SA1111_KBD   0x0a00

Definition at line 389 of file sa1111.h.

#define SA1111_L3_CAR   0x1c

Definition at line 179 of file sa1111.h.

#define SA1111_L3_CDR   0x20

Definition at line 180 of file sa1111.h.

#define SA1111_MSE   0x0c00

Definition at line 390 of file sa1111.h.

#define SA1111_p2v (   x)    ((x) - SA1111_BASE + SA1111_VBASE)

Definition at line 25 of file sa1111.h.

#define SA1111_PCMCIA   0x1600

Definition at line 393 of file sa1111.h.

#define sa1111_readl (   addr)    __raw_readl(addr)

Definition at line 33 of file sa1111.h.

#define SA1111_SAC_DMA_MIN_XFER   (0x800)

Definition at line 48 of file sa1111.h.

#define SA1111_SACR0   0x00

Definition at line 173 of file sa1111.h.

#define SA1111_SACR1   0x04

Definition at line 174 of file sa1111.h.

#define SA1111_SACR2   0x08

Definition at line 175 of file sa1111.h.

#define SA1111_SADR   0x80

Definition at line 196 of file sa1111.h.

#define SA1111_SADRCA   0x50

Definition at line 192 of file sa1111.h.

#define SA1111_SADRCB   0x58

Definition at line 194 of file sa1111.h.

#define SA1111_SADRCS   0x48

Definition at line 190 of file sa1111.h.

#define SA1111_SADRSA   0x4c

Definition at line 191 of file sa1111.h.

#define SA1111_SADRSB   0x54

Definition at line 193 of file sa1111.h.

#define SA1111_SADTCA   0x3c

Definition at line 187 of file sa1111.h.

#define SA1111_SADTCB   0x44

Definition at line 189 of file sa1111.h.

#define SA1111_SADTCS   0x34

Definition at line 185 of file sa1111.h.

#define SA1111_SADTSA   0x38

Definition at line 186 of file sa1111.h.

#define SA1111_SADTSB   0x40

Definition at line 188 of file sa1111.h.

#define SA1111_SAITR   0x5c

Definition at line 195 of file sa1111.h.

#define SA1111_SASCR   0x18

Definition at line 178 of file sa1111.h.

#define SA1111_SASR0   0x0c

Definition at line 176 of file sa1111.h.

#define SA1111_SASR1   0x10

Definition at line 177 of file sa1111.h.

#define SA1111_SERAUDIO   0x0600

Definition at line 168 of file sa1111.h.

#define sa1111_set_drvdata (   d,
  p 
)    dev_set_drvdata(&(d)->dev, p)

Definition at line 426 of file sa1111.h.

#define SA1111_SKAUD   0x0208

Definition at line 117 of file sa1111.h.

#define SA1111_SKCDR   0x0204

Definition at line 116 of file sa1111.h.

#define SA1111_SKCR   0x0000

Definition at line 58 of file sa1111.h.

#define SA1111_SKID   0x0008

Definition at line 60 of file sa1111.h.

#define SA1111_SKPCR   0x0200

Definition at line 115 of file sa1111.h.

#define SA1111_SKPEN0   0x0214

Definition at line 120 of file sa1111.h.

#define SA1111_SKPEN1   0x021c

Definition at line 122 of file sa1111.h.

#define SA1111_SKPMC   0x020c

Definition at line 118 of file sa1111.h.

#define SA1111_SKPTC   0x0210

Definition at line 119 of file sa1111.h.

#define SA1111_SKPWM0   0x0218

Definition at line 121 of file sa1111.h.

#define SA1111_SKPWM1   0x0220

Definition at line 123 of file sa1111.h.

#define SA1111_SMCR   0x0004

Definition at line 59 of file sa1111.h.

#define SA1111_USB   0x0400

Definition at line 136 of file sa1111.h.

#define SA1111_v2p (   x)    ((x) - SA1111_VBASE + SA1111_BASE)

Definition at line 26 of file sa1111.h.

#define SA1111_VBASE   0xf4000000

Definition at line 22 of file sa1111.h.

#define SA1111_WAKEEN0   0x002c

Definition at line 383 of file sa1111.h.

#define SA1111_WAKEEN1   0x0030

Definition at line 384 of file sa1111.h.

#define SA1111_WAKEPOL0   0x0034

Definition at line 385 of file sa1111.h.

#define SA1111_WAKEPOL1   0x0038

Definition at line 386 of file sa1111.h.

#define sa1111_writel (   val,
  addr 
)    __raw_writel(val, addr)

Definition at line 32 of file sa1111.h.

#define SACR0_BCKD   (1<<2)

Definition at line 201 of file sa1111.h.

#define SACR0_ENB   (1<<0)

Definition at line 200 of file sa1111.h.

#define SACR0_RST   (1<<3)

Definition at line 202 of file sa1111.h.

#define SACR1_AMSL   (1<<0)

Definition at line 204 of file sa1111.h.

#define SACR1_DREC   (1<<3)

Definition at line 207 of file sa1111.h.

#define SACR1_DRPL   (1<<4)

Definition at line 208 of file sa1111.h.

#define SACR1_ENLBF   (1<<5)

Definition at line 209 of file sa1111.h.

#define SACR1_L3EN   (1<<1)

Definition at line 205 of file sa1111.h.

#define SACR1_L3MB   (1<<2)

Definition at line 206 of file sa1111.h.

#define SACR2_DREC   (1<<3)

Definition at line 214 of file sa1111.h.

#define SACR2_DRPL   (1<<4)

Definition at line 215 of file sa1111.h.

#define SACR2_ENLBF   (1<<5)

Definition at line 216 of file sa1111.h.

#define SACR2_RESET   (1<<6)

Definition at line 217 of file sa1111.h.

#define SACR2_TS3V   (1<<0)

Definition at line 211 of file sa1111.h.

#define SACR2_TS4V   (1<<1)

Definition at line 212 of file sa1111.h.

#define SACR2_WKUP   (1<<2)

Definition at line 213 of file sa1111.h.

#define SAD_CS_BIU   (1<<7) /* Not functional on metal 1 */

Definition at line 272 of file sa1111.h.

#define SAD_CS_DBDA   (1<<3) /* Not functional on metal 1 */

Definition at line 268 of file sa1111.h.

#define SAD_CS_DBDB   (1<<5) /* Not functional on metal 1 */

Definition at line 270 of file sa1111.h.

#define SAD_CS_DEN   (1<<0)

Definition at line 266 of file sa1111.h.

#define SAD_CS_DIE   (1<<1) /* Not functional on metal 1 */

Definition at line 267 of file sa1111.h.

#define SAD_CS_DSTA   (1<<4)

Definition at line 269 of file sa1111.h.

#define SAD_CS_DSTB   (1<<6)

Definition at line 271 of file sa1111.h.

#define SADRCS_RBIU   (1<<7)

Definition at line 264 of file sa1111.h.

#define SADRCS_RDBDA   (1<<3)

Definition at line 260 of file sa1111.h.

#define SADRCS_RDBDB   (1<<5)

Definition at line 262 of file sa1111.h.

#define SADRCS_RDEN   (1<<0)

Definition at line 258 of file sa1111.h.

#define SADRCS_RDIE   (1<<1)

Definition at line 259 of file sa1111.h.

#define SADRCS_RDSTA   (1<<4)

Definition at line 261 of file sa1111.h.

#define SADRCS_RDSTB   (1<<6)

Definition at line 263 of file sa1111.h.

#define SADTCS_TBIU   (1<<7)

Definition at line 256 of file sa1111.h.

#define SADTCS_TDBDA   (1<<3)

Definition at line 252 of file sa1111.h.

#define SADTCS_TDBDB   (1<<5)

Definition at line 254 of file sa1111.h.

#define SADTCS_TDEN   (1<<0)

Definition at line 250 of file sa1111.h.

#define SADTCS_TDIE   (1<<1)

Definition at line 251 of file sa1111.h.

#define SADTCS_TDSTA   (1<<4)

Definition at line 253 of file sa1111.h.

#define SADTCS_TDSTB   (1<<6)

Definition at line 255 of file sa1111.h.

#define SAITR_CADT   (1<<4)

Definition at line 278 of file sa1111.h.

#define SAITR_RDBDA   (1<<10)

Definition at line 283 of file sa1111.h.

#define SAITR_RDBDB   (1<<11)

Definition at line 284 of file sa1111.h.

#define SAITR_RFS   (1<<1)

Definition at line 275 of file sa1111.h.

#define SAITR_ROR   (1<<3)

Definition at line 277 of file sa1111.h.

#define SAITR_RSTO   (1<<6)

Definition at line 280 of file sa1111.h.

#define SAITR_SADR   (1<<5)

Definition at line 279 of file sa1111.h.

#define SAITR_TDBDA   (1<<8)

Definition at line 281 of file sa1111.h.

#define SAITR_TDBDB   (1<<9)

Definition at line 282 of file sa1111.h.

#define SAITR_TFS   (1<<0)

Definition at line 274 of file sa1111.h.

#define SAITR_TUR   (1<<2)

Definition at line 276 of file sa1111.h.

#define SASCR_DTS   (1<<16)

Definition at line 246 of file sa1111.h.

#define SASCR_RDD   (1<<17)

Definition at line 247 of file sa1111.h.

#define SASCR_ROR   (1<<6)

Definition at line 245 of file sa1111.h.

#define SASCR_STO   (1<<18)

Definition at line 248 of file sa1111.h.

#define SASCR_TUR   (1<<5)

Definition at line 244 of file sa1111.h.

#define SASR0_BSY   (1<<2)

Definition at line 221 of file sa1111.h.

#define SASR0_L3RD   (1<<17)

Definition at line 227 of file sa1111.h.

#define SASR0_L3WD   (1<<16)

Definition at line 226 of file sa1111.h.

#define SASR0_RFS   (1<<4)

Definition at line 223 of file sa1111.h.

#define SASR0_RNE   (1<<1)

Definition at line 220 of file sa1111.h.

#define SASR0_ROR   (1<<6)

Definition at line 225 of file sa1111.h.

#define SASR0_TFS   (1<<3)

Definition at line 222 of file sa1111.h.

#define SASR0_TNF   (1<<0)

Definition at line 219 of file sa1111.h.

#define SASR0_TUR   (1<<5)

Definition at line 224 of file sa1111.h.

#define SASR1_BSY   (1<<2)

Definition at line 231 of file sa1111.h.

#define SASR1_CADT   (1<<16)

Definition at line 236 of file sa1111.h.

#define SASR1_CLPM   (1<<19)

Definition at line 239 of file sa1111.h.

#define SASR1_CRDY   (1<<20)

Definition at line 240 of file sa1111.h.

#define SASR1_RFS   (1<<4)

Definition at line 233 of file sa1111.h.

#define SASR1_RNE   (1<<1)

Definition at line 230 of file sa1111.h.

#define SASR1_ROR   (1<<6)

Definition at line 235 of file sa1111.h.

#define SASR1_RS3V   (1<<21)

Definition at line 241 of file sa1111.h.

#define SASR1_RS4V   (1<<22)

Definition at line 242 of file sa1111.h.

#define SASR1_RSTO   (1<<18)

Definition at line 238 of file sa1111.h.

#define SASR1_SADR   (1<<17)

Definition at line 237 of file sa1111.h.

#define SASR1_TFS   (1<<3)

Definition at line 232 of file sa1111.h.

#define SASR1_TNF   (1<<0)

Definition at line 229 of file sa1111.h.

#define SASR1_TUR   (1<<5)

Definition at line 234 of file sa1111.h.

#define SKCR_CLKTSTEN   (1<<6)

Definition at line 68 of file sa1111.h.

#define SKCR_DOZE   (1<<3)

Definition at line 65 of file sa1111.h.

#define SKCR_OE_EN   (1<<13)

Definition at line 86 of file sa1111.h.

#define SKCR_OPPC   (1<<9)

Definition at line 71 of file sa1111.h.

#define SKCR_PLL_BYPASS   (1<<0)

Definition at line 62 of file sa1111.h.

#define SKCR_PLLTSTEN   (1<<10)

Definition at line 72 of file sa1111.h.

#define SKCR_RCLKEN   (1<<1)

Definition at line 63 of file sa1111.h.

#define SKCR_RDYEN   (1<<7)

Definition at line 69 of file sa1111.h.

#define SKCR_SCANTSTEN   (1<<5)

Definition at line 67 of file sa1111.h.

#define SKCR_SELAC   (1<<8)

Definition at line 70 of file sa1111.h.

#define SKCR_SLEEP   (1<<2)

Definition at line 64 of file sa1111.h.

#define SKCR_USBIOTSTEN   (1<<11)

Definition at line 73 of file sa1111.h.

#define SKCR_VCO_OFF   (1<<4)

Definition at line 66 of file sa1111.h.

#define SKID_ID_MASK   (0xffffff00)

Definition at line 98 of file sa1111.h.

#define SKID_MTREV_MASK   (0x0000000f)

Definition at line 97 of file sa1111.h.

#define SKID_SA1111_ID   (0x690cc200)

Definition at line 99 of file sa1111.h.

#define SKID_SIREV_MASK   (0x000000f0)

Definition at line 96 of file sa1111.h.

#define SKPCR_ACCLKEN   (1<<1)

Definition at line 126 of file sa1111.h.

#define SKPCR_DCLKEN   (1<<7)

Definition at line 132 of file sa1111.h.

#define SKPCR_I2SCLKEN   (1<<2)

Definition at line 127 of file sa1111.h.

#define SKPCR_L3CLKEN   (1<<3)

Definition at line 128 of file sa1111.h.

#define SKPCR_PMCLKEN   (1<<5)

Definition at line 130 of file sa1111.h.

#define SKPCR_PTCLKEN   (1<<6)

Definition at line 131 of file sa1111.h.

#define SKPCR_PWMCLKEN   (1<<8)

Definition at line 133 of file sa1111.h.

#define SKPCR_SCLKEN   (1<<4)

Definition at line 129 of file sa1111.h.

#define SKPCR_UCLKEN   (1<<0)

Definition at line 125 of file sa1111.h.

#define SMCR_CLAT   (1<<5)

Definition at line 94 of file sa1111.h.

#define SMCR_DRAC   Fld(3, 2)

Definition at line 93 of file sa1111.h.

#define SMCR_DRAC_0   (1<<2)

Definition at line 90 of file sa1111.h.

#define SMCR_DRAC_1   (1<<3)

Definition at line 91 of file sa1111.h.

#define SMCR_DRAC_2   (1<<4)

Definition at line 92 of file sa1111.h.

#define SMCR_DTIM   (1<<0)

Definition at line 88 of file sa1111.h.

#define SMCR_MBGE   (1<<1)

Definition at line 89 of file sa1111.h.

Function Documentation

int sa1111_check_dma_bug ( dma_addr_t  addr)
void sa1111_disable_device ( struct sa1111_dev sadev)

sa1111_disable_device - disable an on-chip SA1111 function block : SA1111 function block device to disable

Definition at line 1271 of file sa1111.c.

int sa1111_driver_register ( struct sa1111_driver )

Definition at line 1364 of file sa1111.c.

void sa1111_driver_unregister ( struct sa1111_driver )

Definition at line 1371 of file sa1111.c.

int sa1111_enable_device ( struct sa1111_dev sadev)

sa1111_enable_device - enable an on-chip SA1111 function block : SA1111 function block device to enable

Definition at line 1247 of file sa1111.c.

int sa1111_get_audio_rate ( struct sa1111_dev sadev)

sa1111_get_audio_rate - get the audio sample rate : SA1111 SAC function block device

Definition at line 1166 of file sa1111.c.

unsigned int sa1111_pll_clock ( struct sa1111_dev sadev)

sa1111_pll_clock - return the current PLL clock frequency. : SA1111 function block

BUG: we should look at SKCR. We also blindly believe that the chip is being fed with the 3.6864MHz clock.

Returns the PLL clock in Hz.

Definition at line 1101 of file sa1111.c.

void sa1111_select_audio_mode ( struct sa1111_dev sadev,
int  mode 
)

sa1111_select_audio_mode - select I2S or AC link mode : SA1111 function block : One of SA1111_AUDIO_ACLINK or SA1111_AUDIO_I2S

Frob the SKCR to select AC Link mode or I2S mode for the audio block.

Definition at line 1117 of file sa1111.c.

int sa1111_set_audio_rate ( struct sa1111_dev sadev,
int  rate 
)

sa1111_set_audio_rate - set the audio sample rate : SA1111 SAC function block : sample rate to select

Definition at line 1142 of file sa1111.c.

void sa1111_set_io ( struct sa1111_dev sadev,
unsigned int  bits,
unsigned int  v 
)

Definition at line 1209 of file sa1111.c.

void sa1111_set_io_dir ( struct sa1111_dev sadev,
unsigned int  bits,
unsigned int  dir,
unsigned int  sleep_dir 
)

Definition at line 1180 of file sa1111.c.

void sa1111_set_sleep_io ( struct sa1111_dev sadev,
unsigned int  bits,
unsigned int  v 
)

Definition at line 1224 of file sa1111.c.

Variable Documentation

struct bus_type sa1111_bus_type

Definition at line 1353 of file sa1111.c.