diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/sh/include/cpu-sh3 | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sh/include/cpu-sh3')
-rw-r--r-- | arch/sh/include/cpu-sh3/cpu/dac.h | 12 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh3/cpu/dma-register.h | 41 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh3/cpu/dma.h | 23 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh3/cpu/ubc.h | 42 |
4 files changed, 47 insertions, 71 deletions
diff --git a/arch/sh/include/cpu-sh3/cpu/dac.h b/arch/sh/include/cpu-sh3/cpu/dac.h index 05fda8316ebc..98f1d15f0ab5 100644 --- a/arch/sh/include/cpu-sh3/cpu/dac.h +++ b/arch/sh/include/cpu-sh3/cpu/dac.h | |||
@@ -17,25 +17,25 @@ | |||
17 | static __inline__ void sh_dac_enable(int channel) | 17 | static __inline__ void sh_dac_enable(int channel) |
18 | { | 18 | { |
19 | unsigned char v; | 19 | unsigned char v; |
20 | v = ctrl_inb(DACR); | 20 | v = __raw_readb(DACR); |
21 | if(channel) v |= DACR_DAOE1; | 21 | if(channel) v |= DACR_DAOE1; |
22 | else v |= DACR_DAOE0; | 22 | else v |= DACR_DAOE0; |
23 | ctrl_outb(v,DACR); | 23 | __raw_writeb(v,DACR); |
24 | } | 24 | } |
25 | 25 | ||
26 | static __inline__ void sh_dac_disable(int channel) | 26 | static __inline__ void sh_dac_disable(int channel) |
27 | { | 27 | { |
28 | unsigned char v; | 28 | unsigned char v; |
29 | v = ctrl_inb(DACR); | 29 | v = __raw_readb(DACR); |
30 | if(channel) v &= ~DACR_DAOE1; | 30 | if(channel) v &= ~DACR_DAOE1; |
31 | else v &= ~DACR_DAOE0; | 31 | else v &= ~DACR_DAOE0; |
32 | ctrl_outb(v,DACR); | 32 | __raw_writeb(v,DACR); |
33 | } | 33 | } |
34 | 34 | ||
35 | static __inline__ void sh_dac_output(u8 value, int channel) | 35 | static __inline__ void sh_dac_output(u8 value, int channel) |
36 | { | 36 | { |
37 | if(channel) ctrl_outb(value,DADR1); | 37 | if(channel) __raw_writeb(value,DADR1); |
38 | else ctrl_outb(value,DADR0); | 38 | else __raw_writeb(value,DADR0); |
39 | } | 39 | } |
40 | 40 | ||
41 | #endif /* __ASM_CPU_SH3_DAC_H */ | 41 | #endif /* __ASM_CPU_SH3_DAC_H */ |
diff --git a/arch/sh/include/cpu-sh3/cpu/dma-register.h b/arch/sh/include/cpu-sh3/cpu/dma-register.h new file mode 100644 index 000000000000..2349e488c9a6 --- /dev/null +++ b/arch/sh/include/cpu-sh3/cpu/dma-register.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * SH3 CPU-specific DMA definitions, used by both DMA drivers | ||
3 | * | ||
4 | * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
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 | #ifndef CPU_DMA_REGISTER_H | ||
11 | #define CPU_DMA_REGISTER_H | ||
12 | |||
13 | #define CHCR_TS_LOW_MASK 0x18 | ||
14 | #define CHCR_TS_LOW_SHIFT 3 | ||
15 | #define CHCR_TS_HIGH_MASK 0 | ||
16 | #define CHCR_TS_HIGH_SHIFT 0 | ||
17 | |||
18 | #define DMAOR_INIT DMAOR_DME | ||
19 | |||
20 | /* | ||
21 | * The SuperH DMAC supports a number of transmit sizes, we list them here, | ||
22 | * with their respective values as they appear in the CHCR registers. | ||
23 | */ | ||
24 | enum { | ||
25 | XMIT_SZ_8BIT, | ||
26 | XMIT_SZ_16BIT, | ||
27 | XMIT_SZ_32BIT, | ||
28 | XMIT_SZ_128BIT, | ||
29 | }; | ||
30 | |||
31 | /* log2(size / 8) - used to calculate number of transfers */ | ||
32 | #define TS_SHIFT { \ | ||
33 | [XMIT_SZ_8BIT] = 0, \ | ||
34 | [XMIT_SZ_16BIT] = 1, \ | ||
35 | [XMIT_SZ_32BIT] = 2, \ | ||
36 | [XMIT_SZ_128BIT] = 4, \ | ||
37 | } | ||
38 | |||
39 | #define TS_INDEX2VAL(i) (((i) & 3) << CHCR_TS_LOW_SHIFT) | ||
40 | |||
41 | #endif | ||
diff --git a/arch/sh/include/cpu-sh3/cpu/dma.h b/arch/sh/include/cpu-sh3/cpu/dma.h index 0ea15f3f2363..24e28b91c9d5 100644 --- a/arch/sh/include/cpu-sh3/cpu/dma.h +++ b/arch/sh/include/cpu-sh3/cpu/dma.h | |||
@@ -20,27 +20,4 @@ | |||
20 | #define TS_32 0x00000010 | 20 | #define TS_32 0x00000010 |
21 | #define TS_128 0x00000018 | 21 | #define TS_128 0x00000018 |
22 | 22 | ||
23 | #define CHCR_TS_MASK 0x18 | ||
24 | #define CHCR_TS_SHIFT 3 | ||
25 | |||
26 | #define DMAOR_INIT DMAOR_DME | ||
27 | |||
28 | /* | ||
29 | * The SuperH DMAC supports a number of transmit sizes, we list them here, | ||
30 | * with their respective values as they appear in the CHCR registers. | ||
31 | */ | ||
32 | enum { | ||
33 | XMIT_SZ_8BIT, | ||
34 | XMIT_SZ_16BIT, | ||
35 | XMIT_SZ_32BIT, | ||
36 | XMIT_SZ_128BIT, | ||
37 | }; | ||
38 | |||
39 | static unsigned int ts_shift[] __maybe_unused = { | ||
40 | [XMIT_SZ_8BIT] = 0, | ||
41 | [XMIT_SZ_16BIT] = 1, | ||
42 | [XMIT_SZ_32BIT] = 2, | ||
43 | [XMIT_SZ_128BIT] = 4, | ||
44 | }; | ||
45 | |||
46 | #endif /* __ASM_CPU_SH3_DMA_H */ | 23 | #endif /* __ASM_CPU_SH3_DMA_H */ |
diff --git a/arch/sh/include/cpu-sh3/cpu/ubc.h b/arch/sh/include/cpu-sh3/cpu/ubc.h deleted file mode 100644 index 4e6381d5ff7a..000000000000 --- a/arch/sh/include/cpu-sh3/cpu/ubc.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/cpu-sh3/ubc.h | ||
3 | * | ||
4 | * Copyright (C) 1999 Niibe Yutaka | ||
5 | * Copyright (C) 2003 Paul Mundt | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file "COPYING" in the main directory of this archive | ||
9 | * for more details. | ||
10 | */ | ||
11 | #ifndef __ASM_CPU_SH3_UBC_H | ||
12 | #define __ASM_CPU_SH3_UBC_H | ||
13 | |||
14 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) || \ | ||
15 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | ||
16 | defined(CONFIG_CPU_SUBTYPE_SH7721) | ||
17 | #define UBC_BARA 0xa4ffffb0 | ||
18 | #define UBC_BAMRA 0xa4ffffb4 | ||
19 | #define UBC_BBRA 0xa4ffffb8 | ||
20 | #define UBC_BASRA 0xffffffe4 | ||
21 | #define UBC_BARB 0xa4ffffa0 | ||
22 | #define UBC_BAMRB 0xa4ffffa4 | ||
23 | #define UBC_BBRB 0xa4ffffa8 | ||
24 | #define UBC_BASRB 0xffffffe8 | ||
25 | #define UBC_BDRB 0xa4ffff90 | ||
26 | #define UBC_BDMRB 0xa4ffff94 | ||
27 | #define UBC_BRCR 0xa4ffff98 | ||
28 | #else | ||
29 | #define UBC_BARA 0xffffffb0 | ||
30 | #define UBC_BAMRA 0xffffffb4 | ||
31 | #define UBC_BBRA 0xffffffb8 | ||
32 | #define UBC_BASRA 0xffffffe4 | ||
33 | #define UBC_BARB 0xffffffa0 | ||
34 | #define UBC_BAMRB 0xffffffa4 | ||
35 | #define UBC_BBRB 0xffffffa8 | ||
36 | #define UBC_BASRB 0xffffffe8 | ||
37 | #define UBC_BDRB 0xffffff90 | ||
38 | #define UBC_BDMRB 0xffffff94 | ||
39 | #define UBC_BRCR 0xffffff98 | ||
40 | #endif | ||
41 | |||
42 | #endif /* __ASM_CPU_SH3_UBC_H */ | ||