diff options
-rw-r--r-- | arch/sh/drivers/dma/Kconfig | 13 | ||||
-rw-r--r-- | arch/sh/drivers/dma/Makefile | 3 | ||||
-rw-r--r-- | drivers/video/pvr2fb.c | 16 |
3 files changed, 23 insertions, 9 deletions
diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig index 32bb8fa605c2..ae26610837b2 100644 --- a/arch/sh/drivers/dma/Kconfig +++ b/arch/sh/drivers/dma/Kconfig | |||
@@ -54,4 +54,17 @@ config SH_DMABRG | |||
54 | of the SH7760. | 54 | of the SH7760. |
55 | Say Y if you want to use Audio/USB DMA on your SH7760 board. | 55 | Say Y if you want to use Audio/USB DMA on your SH7760 board. |
56 | 56 | ||
57 | config PVR2_DMA | ||
58 | tristate "PowerVR 2 DMAC support" | ||
59 | depends on SH_DREAMCAST && SH_DMA | ||
60 | help | ||
61 | Selecting this will enable support for the PVR2 DMA controller. | ||
62 | As this chains off of the on-chip DMAC, that must also be | ||
63 | enabled by default. | ||
64 | |||
65 | This is primarily used by the pvr2fb framebuffer driver for | ||
66 | certain optimizations, but is not necessary for functionality. | ||
67 | |||
68 | If in doubt, say N. | ||
69 | |||
57 | endmenu | 70 | endmenu |
diff --git a/arch/sh/drivers/dma/Makefile b/arch/sh/drivers/dma/Makefile index ab956adacb47..cff52cb6ac71 100644 --- a/arch/sh/drivers/dma/Makefile +++ b/arch/sh/drivers/dma/Makefile | |||
@@ -4,5 +4,6 @@ | |||
4 | 4 | ||
5 | obj-$(CONFIG_SH_DMA_API) += dma-api.o dma-sysfs.o | 5 | obj-$(CONFIG_SH_DMA_API) += dma-api.o dma-sysfs.o |
6 | obj-$(CONFIG_SH_DMA) += dma-sh.o | 6 | obj-$(CONFIG_SH_DMA) += dma-sh.o |
7 | obj-$(CONFIG_SH_DREAMCAST) += dma-pvr2.o dma-g2.o | 7 | obj-$(CONFIG_SH_DREAMCAST) += dma-g2.o |
8 | obj-$(CONFIG_PVR2_DMA) += dma-pvr2.o | ||
8 | obj-$(CONFIG_SH_DMABRG) += dmabrg.o | 9 | obj-$(CONFIG_SH_DMABRG) += dmabrg.o |
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index 0a0fd48a8566..53f8f1100e81 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c | |||
@@ -61,7 +61,7 @@ | |||
61 | #include <mach-dreamcast/mach/sysasic.h> | 61 | #include <mach-dreamcast/mach/sysasic.h> |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef CONFIG_SH_DMA | 64 | #ifdef CONFIG_PVR2_DMA |
65 | #include <linux/pagemap.h> | 65 | #include <linux/pagemap.h> |
66 | #include <mach/dma.h> | 66 | #include <mach/dma.h> |
67 | #include <asm/dma.h> | 67 | #include <asm/dma.h> |
@@ -188,7 +188,7 @@ static unsigned int is_blanked = 0; /* Is the screen blanked? */ | |||
188 | static unsigned long pvr2fb_map; | 188 | static unsigned long pvr2fb_map; |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | #ifdef CONFIG_SH_DMA | 191 | #ifdef CONFIG_PVR2_DMA |
192 | static unsigned int shdma = PVR2_CASCADE_CHAN; | 192 | static unsigned int shdma = PVR2_CASCADE_CHAN; |
193 | static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS; | 193 | static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS; |
194 | #endif | 194 | #endif |
@@ -207,7 +207,7 @@ static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id); | |||
207 | static int pvr2_init_cable(void); | 207 | static int pvr2_init_cable(void); |
208 | static int pvr2_get_param(const struct pvr2_params *p, const char *s, | 208 | static int pvr2_get_param(const struct pvr2_params *p, const char *s, |
209 | int val, int size); | 209 | int val, int size); |
210 | #ifdef CONFIG_SH_DMA | 210 | #ifdef CONFIG_PVR2_DMA |
211 | static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, | 211 | static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, |
212 | size_t count, loff_t *ppos); | 212 | size_t count, loff_t *ppos); |
213 | #endif | 213 | #endif |
@@ -218,7 +218,7 @@ static struct fb_ops pvr2fb_ops = { | |||
218 | .fb_blank = pvr2fb_blank, | 218 | .fb_blank = pvr2fb_blank, |
219 | .fb_check_var = pvr2fb_check_var, | 219 | .fb_check_var = pvr2fb_check_var, |
220 | .fb_set_par = pvr2fb_set_par, | 220 | .fb_set_par = pvr2fb_set_par, |
221 | #ifdef CONFIG_SH_DMA | 221 | #ifdef CONFIG_PVR2_DMA |
222 | .fb_write = pvr2fb_write, | 222 | .fb_write = pvr2fb_write, |
223 | #endif | 223 | #endif |
224 | .fb_fillrect = cfb_fillrect, | 224 | .fb_fillrect = cfb_fillrect, |
@@ -671,7 +671,7 @@ static int pvr2_init_cable(void) | |||
671 | return cable_type; | 671 | return cable_type; |
672 | } | 672 | } |
673 | 673 | ||
674 | #ifdef CONFIG_SH_DMA | 674 | #ifdef CONFIG_PVR2_DMA |
675 | static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, | 675 | static ssize_t pvr2fb_write(struct fb_info *info, const char *buf, |
676 | size_t count, loff_t *ppos) | 676 | size_t count, loff_t *ppos) |
677 | { | 677 | { |
@@ -743,7 +743,7 @@ out_unmap: | |||
743 | 743 | ||
744 | return ret; | 744 | return ret; |
745 | } | 745 | } |
746 | #endif /* CONFIG_SH_DMA */ | 746 | #endif /* CONFIG_PVR2_DMA */ |
747 | 747 | ||
748 | /** | 748 | /** |
749 | * pvr2fb_common_init | 749 | * pvr2fb_common_init |
@@ -893,7 +893,7 @@ static int __init pvr2fb_dc_init(void) | |||
893 | return -EBUSY; | 893 | return -EBUSY; |
894 | } | 894 | } |
895 | 895 | ||
896 | #ifdef CONFIG_SH_DMA | 896 | #ifdef CONFIG_PVR2_DMA |
897 | if (request_dma(pvr2dma, "pvr2") != 0) { | 897 | if (request_dma(pvr2dma, "pvr2") != 0) { |
898 | free_irq(HW_EVENT_VSYNC, 0); | 898 | free_irq(HW_EVENT_VSYNC, 0); |
899 | return -EBUSY; | 899 | return -EBUSY; |
@@ -915,7 +915,7 @@ static void __exit pvr2fb_dc_exit(void) | |||
915 | } | 915 | } |
916 | 916 | ||
917 | free_irq(HW_EVENT_VSYNC, 0); | 917 | free_irq(HW_EVENT_VSYNC, 0); |
918 | #ifdef CONFIG_SH_DMA | 918 | #ifdef CONFIG_PVR2_DMA |
919 | free_dma(pvr2dma); | 919 | free_dma(pvr2dma); |
920 | #endif | 920 | #endif |
921 | } | 921 | } |