aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 7d843cd3b33d..00c006686b0d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3329,6 +3329,33 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
3329} 3329}
3330 3330
3331/** 3331/**
3332 * omap_hwmod_fill_dma_resources - fill struct resource array with dma data
3333 * @oh: struct omap_hwmod *
3334 * @res: pointer to the array of struct resource to fill
3335 *
3336 * Fill the struct resource array @res with dma resource data from the
3337 * omap_hwmod @oh. Intended to be called by code that registers
3338 * omap_devices. See also omap_hwmod_count_resources(). Returns the
3339 * number of array elements filled.
3340 */
3341int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res)
3342{
3343 int i, sdma_reqs_cnt;
3344 int r = 0;
3345
3346 sdma_reqs_cnt = _count_sdma_reqs(oh);
3347 for (i = 0; i < sdma_reqs_cnt; i++) {
3348 (res + r)->name = (oh->sdma_reqs + i)->name;
3349 (res + r)->start = (oh->sdma_reqs + i)->dma_req;
3350 (res + r)->end = (oh->sdma_reqs + i)->dma_req;
3351 (res + r)->flags = IORESOURCE_DMA;
3352 r++;
3353 }
3354
3355 return r;
3356}
3357
3358/**
3332 * omap_hwmod_get_resource_byname - fetch IP block integration data by name 3359 * omap_hwmod_get_resource_byname - fetch IP block integration data by name
3333 * @oh: struct omap_hwmod * to operate on 3360 * @oh: struct omap_hwmod * to operate on
3334 * @type: one of the IORESOURCE_* constants from include/linux/ioport.h 3361 * @type: one of the IORESOURCE_* constants from include/linux/ioport.h