/* * linux/include/asm-arm/hardware/SA-1111.h * * Copyright (C) 2000 John G Dorsey * * This file contains definitions for the SA-1111 Companion Chip. * (Structure and naming borrowed from SA-1101.h, by Peter Danielsson.) * * Macro that calculates real address for registers in the SA-1111 */ #ifndef _ASM_ARCH_SA1111 #define _ASM_ARCH_SA1111 #include /* * The SA1111 is always located at virtual 0xf4000000, and is always * "native" endian. */ #define SA1111_VBASE 0xf4000000 /* Don't use these! */ #define SA1111_p2v( x ) ((x) - SA1111_BASE + SA1111_VBASE) #define SA1111_v2p( x ) ((x) - SA1111_VBASE + SA1111_BASE) #ifndef __ASSEMBLY__ #define _SA1111(x) ((x) + sa1111->resource.start) #endif /* * 26 bits of the SA-1110 address bus are available to the SA-1111. * Use these when feeding target addresses to the DMA engines. */ #define SA1111_ADDR_WIDTH (26) #define SA1111_ADDR_MASK ((1<dev) #define sa1111_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, p) struct sa1111_driver { struct device_driver drv; unsigned int devid; int (*probe)(struct sa1111_dev *); int (*remove)(struct sa1111_dev *); int (*suspend)(struct sa1111_dev *, pm_message_t); int (*resume)(struct sa1111_dev *); }; #define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv) #define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name) /* * These frob the SKPCR register. */ void sa1111_enable_device(struct sa1111_dev *); void sa1111_disable_device(struct sa1111_dev *); unsigned int sa1111_pll_clock(struct sa1111_dev *); #define SA1111_AUDIO_ACLINK 0 #define SA1111_AUDIO_I2S 1 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); #endif /* _ASM_ARCH_SA1111 */