aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r--arch/arm/plat-s3c/include/plat/audio.h45
-rw-r--r--arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h75
-rw-r--r--arch/arm/plat-s3c/include/plat/usb-control.h41
3 files changed, 161 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/audio.h b/arch/arm/plat-s3c/include/plat/audio.h
new file mode 100644
index 000000000000..de0e8da48bc3
--- /dev/null
+++ b/arch/arm/plat-s3c/include/plat/audio.h
@@ -0,0 +1,45 @@
1/* arch/arm/mach-s3c2410/include/mach/audio.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - Audio platfrom_device info
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_AUDIO_H
15#define __ASM_ARCH_AUDIO_H __FILE__
16
17/* struct s3c24xx_iis_ops
18 *
19 * called from the s3c24xx audio core to deal with the architecture
20 * or the codec's setup and control.
21 *
22 * the pointer to itself is passed through in case the caller wants to
23 * embed this in an larger structure for easy reference to it's context.
24*/
25
26struct s3c24xx_iis_ops {
27 struct module *owner;
28
29 int (*startup)(struct s3c24xx_iis_ops *me);
30 void (*shutdown)(struct s3c24xx_iis_ops *me);
31 int (*suspend)(struct s3c24xx_iis_ops *me);
32 int (*resume)(struct s3c24xx_iis_ops *me);
33
34 int (*open)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
35 int (*close)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
36 int (*prepare)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm, struct snd_pcm_runtime *rt);
37};
38
39struct s3c24xx_platdata_iis {
40 const char *codec_clk;
41 struct s3c24xx_iis_ops *ops;
42 int (*match_dev)(struct device *dev);
43};
44
45#endif /* __ASM_ARCH_AUDIO_H */
diff --git a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
new file mode 100644
index 000000000000..0fad7571030e
--- /dev/null
+++ b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
@@ -0,0 +1,75 @@
1/* linux/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h
2 *
3 * Copyright 2007 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2412 IIS register definition
11*/
12
13#ifndef __ASM_ARCH_REGS_S3C2412_IIS_H
14#define __ASM_ARCH_REGS_S3C2412_IIS_H
15
16#define S3C2412_IISCON (0x00)
17#define S3C2412_IISMOD (0x04)
18#define S3C2412_IISFIC (0x08)
19#define S3C2412_IISPSR (0x0C)
20#define S3C2412_IISTXD (0x10)
21#define S3C2412_IISRXD (0x14)
22
23#define S3C2412_IISCON_LRINDEX (1 << 11)
24#define S3C2412_IISCON_TXFIFO_EMPTY (1 << 10)
25#define S3C2412_IISCON_RXFIFO_EMPTY (1 << 9)
26#define S3C2412_IISCON_TXFIFO_FULL (1 << 8)
27#define S3C2412_IISCON_RXFIFO_FULL (1 << 7)
28#define S3C2412_IISCON_TXDMA_PAUSE (1 << 6)
29#define S3C2412_IISCON_RXDMA_PAUSE (1 << 5)
30#define S3C2412_IISCON_TXCH_PAUSE (1 << 4)
31#define S3C2412_IISCON_RXCH_PAUSE (1 << 3)
32#define S3C2412_IISCON_TXDMA_ACTIVE (1 << 2)
33#define S3C2412_IISCON_RXDMA_ACTIVE (1 << 1)
34#define S3C2412_IISCON_IIS_ACTIVE (1 << 0)
35
36#define S3C64XX_IISMOD_IMS_PCLK (0 << 10)
37#define S3C64XX_IISMOD_IMS_SYSMUX (1 << 10)
38
39#define S3C2412_IISMOD_MASTER_INTERNAL (0 << 10)
40#define S3C2412_IISMOD_MASTER_EXTERNAL (1 << 10)
41#define S3C2412_IISMOD_SLAVE (2 << 10)
42#define S3C2412_IISMOD_MASTER_MASK (3 << 10)
43#define S3C2412_IISMOD_MODE_TXONLY (0 << 8)
44#define S3C2412_IISMOD_MODE_RXONLY (1 << 8)
45#define S3C2412_IISMOD_MODE_TXRX (2 << 8)
46#define S3C2412_IISMOD_MODE_MASK (3 << 8)
47#define S3C2412_IISMOD_LR_LLOW (0 << 7)
48#define S3C2412_IISMOD_LR_RLOW (1 << 7)
49#define S3C2412_IISMOD_SDF_IIS (0 << 5)
50#define S3C2412_IISMOD_SDF_MSB (1 << 5)
51#define S3C2412_IISMOD_SDF_LSB (2 << 5)
52#define S3C2412_IISMOD_SDF_MASK (3 << 5)
53#define S3C2412_IISMOD_RCLK_256FS (0 << 3)
54#define S3C2412_IISMOD_RCLK_512FS (1 << 3)
55#define S3C2412_IISMOD_RCLK_384FS (2 << 3)
56#define S3C2412_IISMOD_RCLK_768FS (3 << 3)
57#define S3C2412_IISMOD_RCLK_MASK (3 << 3)
58#define S3C2412_IISMOD_BCLK_32FS (0 << 1)
59#define S3C2412_IISMOD_BCLK_48FS (1 << 1)
60#define S3C2412_IISMOD_BCLK_16FS (2 << 1)
61#define S3C2412_IISMOD_BCLK_24FS (3 << 1)
62#define S3C2412_IISMOD_BCLK_MASK (3 << 1)
63#define S3C2412_IISMOD_8BIT (1 << 0)
64
65#define S3C2412_IISPSR_PSREN (1 << 15)
66
67#define S3C2412_IISFIC_TXFLUSH (1 << 15)
68#define S3C2412_IISFIC_RXFLUSH (1 << 7)
69#define S3C2412_IISFIC_TXCOUNT(x) (((x) >> 8) & 0xf)
70#define S3C2412_IISFIC_RXCOUNT(x) (((x) >> 0) & 0xf)
71
72
73
74#endif /* __ASM_ARCH_REGS_S3C2412_IIS_H */
75
diff --git a/arch/arm/plat-s3c/include/plat/usb-control.h b/arch/arm/plat-s3c/include/plat/usb-control.h
new file mode 100644
index 000000000000..822c87fe948e
--- /dev/null
+++ b/arch/arm/plat-s3c/include/plat/usb-control.h
@@ -0,0 +1,41 @@
1/* arch/arm/plat-s3c/include/plat/usb-control.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C - USB host port information
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_USBCONTROL_H
14#define __ASM_ARCH_USBCONTROL_H
15
16#define S3C_HCDFLG_USED (1)
17
18struct s3c2410_hcd_port {
19 unsigned char flags;
20 unsigned char power;
21 unsigned char oc_status;
22 unsigned char oc_changed;
23};
24
25struct s3c2410_hcd_info {
26 struct usb_hcd *hcd;
27 struct s3c2410_hcd_port port[2];
28
29 void (*power_control)(int port, int to);
30 void (*enable_oc)(struct s3c2410_hcd_info *, int on);
31 void (*report_oc)(struct s3c2410_hcd_info *, int ports);
32};
33
34static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
35{
36 if (info->report_oc != NULL) {
37 (info->report_oc)(info, ports);
38 }
39}
40
41#endif /*__ASM_ARCH_USBCONTROL_H */