mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
sh: dma: Make PVR2 DMA configurable.
With arch/sh/drivers/dma/ always being built, the Dreamcast DMA engines are being unconditionally built in, regardless of whether the DMA API is enabled or not. This is a regression from previous behaviour, but there is not much advantage in building them all in unconditionally regardless. Add a new config option to make it optional, and update the only user of it to reflect that. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
988f831df3
commit
da62e71d13
3 changed files with 23 additions and 9 deletions
|
@ -54,4 +54,17 @@ config SH_DMABRG
|
||||||
of the SH7760.
|
of the SH7760.
|
||||||
Say Y if you want to use Audio/USB DMA on your SH7760 board.
|
Say Y if you want to use Audio/USB DMA on your SH7760 board.
|
||||||
|
|
||||||
|
config PVR2_DMA
|
||||||
|
tristate "PowerVR 2 DMAC support"
|
||||||
|
depends on SH_DREAMCAST && SH_DMA
|
||||||
|
help
|
||||||
|
Selecting this will enable support for the PVR2 DMA controller.
|
||||||
|
As this chains off of the on-chip DMAC, that must also be
|
||||||
|
enabled by default.
|
||||||
|
|
||||||
|
This is primarily used by the pvr2fb framebuffer driver for
|
||||||
|
certain optimizations, but is not necessary for functionality.
|
||||||
|
|
||||||
|
If in doubt, say N.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
|
|
||||||
obj-$(CONFIG_SH_DMA_API) += dma-api.o dma-sysfs.o
|
obj-$(CONFIG_SH_DMA_API) += dma-api.o dma-sysfs.o
|
||||||
obj-$(CONFIG_SH_DMA) += dma-sh.o
|
obj-$(CONFIG_SH_DMA) += dma-sh.o
|
||||||
obj-$(CONFIG_SH_DREAMCAST) += dma-pvr2.o dma-g2.o
|
obj-$(CONFIG_SH_DREAMCAST) += dma-g2.o
|
||||||
|
obj-$(CONFIG_PVR2_DMA) += dma-pvr2.o
|
||||||
obj-$(CONFIG_SH_DMABRG) += dmabrg.o
|
obj-$(CONFIG_SH_DMABRG) += dmabrg.o
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
#include <mach-dreamcast/mach/sysasic.h>
|
#include <mach-dreamcast/mach/sysasic.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
#include <linux/pagemap.h>
|
#include <linux/pagemap.h>
|
||||||
#include <mach/dma.h>
|
#include <mach/dma.h>
|
||||||
#include <asm/dma.h>
|
#include <asm/dma.h>
|
||||||
|
@ -188,7 +188,7 @@ static unsigned int is_blanked = 0; /* Is the screen blanked? */
|
||||||
static unsigned long pvr2fb_map;
|
static unsigned long pvr2fb_map;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
static unsigned int shdma = PVR2_CASCADE_CHAN;
|
static unsigned int shdma = PVR2_CASCADE_CHAN;
|
||||||
static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS;
|
static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS;
|
||||||
#endif
|
#endif
|
||||||
|
@ -207,7 +207,7 @@ static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id);
|
||||||
static int pvr2_init_cable(void);
|
static int pvr2_init_cable(void);
|
||||||
static int pvr2_get_param(const struct pvr2_params *p, const char *s,
|
static int pvr2_get_param(const struct pvr2_params *p, const char *s,
|
||||||
int val, int size);
|
int val, int size);
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
|
static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
|
||||||
size_t count, loff_t *ppos);
|
size_t count, loff_t *ppos);
|
||||||
#endif
|
#endif
|
||||||
|
@ -218,7 +218,7 @@ static struct fb_ops pvr2fb_ops = {
|
||||||
.fb_blank = pvr2fb_blank,
|
.fb_blank = pvr2fb_blank,
|
||||||
.fb_check_var = pvr2fb_check_var,
|
.fb_check_var = pvr2fb_check_var,
|
||||||
.fb_set_par = pvr2fb_set_par,
|
.fb_set_par = pvr2fb_set_par,
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
.fb_write = pvr2fb_write,
|
.fb_write = pvr2fb_write,
|
||||||
#endif
|
#endif
|
||||||
.fb_fillrect = cfb_fillrect,
|
.fb_fillrect = cfb_fillrect,
|
||||||
|
@ -671,7 +671,7 @@ static int pvr2_init_cable(void)
|
||||||
return cable_type;
|
return cable_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
|
static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
|
@ -743,7 +743,7 @@ out_unmap:
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SH_DMA */
|
#endif /* CONFIG_PVR2_DMA */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pvr2fb_common_init
|
* pvr2fb_common_init
|
||||||
|
@ -893,7 +893,7 @@ static int __init pvr2fb_dc_init(void)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
if (request_dma(pvr2dma, "pvr2") != 0) {
|
if (request_dma(pvr2dma, "pvr2") != 0) {
|
||||||
free_irq(HW_EVENT_VSYNC, 0);
|
free_irq(HW_EVENT_VSYNC, 0);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
@ -915,7 +915,7 @@ static void __exit pvr2fb_dc_exit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
free_irq(HW_EVENT_VSYNC, 0);
|
free_irq(HW_EVENT_VSYNC, 0);
|
||||||
#ifdef CONFIG_SH_DMA
|
#ifdef CONFIG_PVR2_DMA
|
||||||
free_dma(pvr2dma);
|
free_dma(pvr2dma);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue