diff options
author | Tony Lindgren <tony@atomide.com> | 2005-09-07 12:20:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-09-07 12:20:26 -0400 |
commit | 92105bb70634abacc08bbe12bf6f888fbd7dad38 (patch) | |
tree | 194e3032671ee3a90644c68cda8ddf471cb09d0e /arch/arm/plat-omap/dma.c | |
parent | 7efb833d645d10258e32664404354d26cf6070e3 (diff) |
[ARM] 2887/1: OMAP 2/4: Update files common to omap1 and omap2, take 2
Patch from Tony Lindgren
This patch syncs the mainline kernel with linux-omap tree.
The highlights of the patch are:
- Clock updates by Tuukka Tikkanen, Juha Yrjola,
Daniel Petrini and Tony Lindgren
- DMA fixes by Imre Deak, Juha Yrjola and Daniel Petrini
- Add support to dual-mode hardware timers by Lauri Leukkunen
- GPIO support for 24xx by Paul Mundt
- GPIO wake-up support by Tony Lindgren
- Better GPIO interrupt handler to not lose interrupts by
Ralph Walden and Ladislav Michl
- Power Management updates by Tuukka Tikkanen
- Make Power Management code use new SRAM functions by
Tony Lindgren
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c0a5c2fa42bd..da7b65145658 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -425,7 +425,7 @@ static int dma_handle_ch(int ch) | |||
425 | dma_chan[ch + 6].saved_csr = csr >> 7; | 425 | dma_chan[ch + 6].saved_csr = csr >> 7; |
426 | csr &= 0x7f; | 426 | csr &= 0x7f; |
427 | } | 427 | } |
428 | if (!csr) | 428 | if ((csr & 0x3f) == 0) |
429 | return 0; | 429 | return 0; |
430 | if (unlikely(dma_chan[ch].dev_id == -1)) { | 430 | if (unlikely(dma_chan[ch].dev_id == -1)) { |
431 | printk(KERN_WARNING "Spurious interrupt from DMA channel %d (CSR %04x)\n", | 431 | printk(KERN_WARNING "Spurious interrupt from DMA channel %d (CSR %04x)\n", |
@@ -890,11 +890,11 @@ void omap_enable_lcd_dma(void) | |||
890 | w |= 1 << 8; | 890 | w |= 1 << 8; |
891 | omap_writew(w, OMAP1610_DMA_LCD_CTRL); | 891 | omap_writew(w, OMAP1610_DMA_LCD_CTRL); |
892 | 892 | ||
893 | lcd_dma.active = 1; | ||
894 | |||
893 | w = omap_readw(OMAP1610_DMA_LCD_CCR); | 895 | w = omap_readw(OMAP1610_DMA_LCD_CCR); |
894 | w |= 1 << 7; | 896 | w |= 1 << 7; |
895 | omap_writew(w, OMAP1610_DMA_LCD_CCR); | 897 | omap_writew(w, OMAP1610_DMA_LCD_CCR); |
896 | |||
897 | lcd_dma.active = 1; | ||
898 | } | 898 | } |
899 | 899 | ||
900 | void omap_setup_lcd_dma(void) | 900 | void omap_setup_lcd_dma(void) |
@@ -965,8 +965,8 @@ void omap_clear_dma(int lch) | |||
965 | */ | 965 | */ |
966 | dma_addr_t omap_get_dma_src_pos(int lch) | 966 | dma_addr_t omap_get_dma_src_pos(int lch) |
967 | { | 967 | { |
968 | return (dma_addr_t) (OMAP_DMA_CSSA_L(lch) | | 968 | return (dma_addr_t) (omap_readw(OMAP_DMA_CSSA_L(lch)) | |
969 | (OMAP_DMA_CSSA_U(lch) << 16)); | 969 | (omap_readw(OMAP_DMA_CSSA_U(lch)) << 16)); |
970 | } | 970 | } |
971 | 971 | ||
972 | /* | 972 | /* |
@@ -979,8 +979,18 @@ dma_addr_t omap_get_dma_src_pos(int lch) | |||
979 | */ | 979 | */ |
980 | dma_addr_t omap_get_dma_dst_pos(int lch) | 980 | dma_addr_t omap_get_dma_dst_pos(int lch) |
981 | { | 981 | { |
982 | return (dma_addr_t) (OMAP_DMA_CDSA_L(lch) | | 982 | return (dma_addr_t) (omap_readw(OMAP_DMA_CDSA_L(lch)) | |
983 | (OMAP_DMA_CDSA_U(lch) << 16)); | 983 | (omap_readw(OMAP_DMA_CDSA_U(lch)) << 16)); |
984 | } | ||
985 | |||
986 | /* | ||
987 | * Returns current source transfer counting for the given DMA channel. | ||
988 | * Can be used to monitor the progress of a transfer inside a block. | ||
989 | * It must be called with disabled interrupts. | ||
990 | */ | ||
991 | int omap_get_dma_src_addr_counter(int lch) | ||
992 | { | ||
993 | return (dma_addr_t) omap_readw(OMAP_DMA_CSAC(lch)); | ||
984 | } | 994 | } |
985 | 995 | ||
986 | int omap_dma_running(void) | 996 | int omap_dma_running(void) |
@@ -1076,6 +1086,7 @@ arch_initcall(omap_init_dma); | |||
1076 | 1086 | ||
1077 | EXPORT_SYMBOL(omap_get_dma_src_pos); | 1087 | EXPORT_SYMBOL(omap_get_dma_src_pos); |
1078 | EXPORT_SYMBOL(omap_get_dma_dst_pos); | 1088 | EXPORT_SYMBOL(omap_get_dma_dst_pos); |
1089 | EXPORT_SYMBOL(omap_get_dma_src_addr_counter); | ||
1079 | EXPORT_SYMBOL(omap_clear_dma); | 1090 | EXPORT_SYMBOL(omap_clear_dma); |
1080 | EXPORT_SYMBOL(omap_set_dma_priority); | 1091 | EXPORT_SYMBOL(omap_set_dma_priority); |
1081 | EXPORT_SYMBOL(omap_request_dma); | 1092 | EXPORT_SYMBOL(omap_request_dma); |