90
static struct omap_device_pm_latency omap2_dma_latency[] = {
92
.deactivate_func = omap_device_idle_hwmods,
93
.activate_func = omap_device_enable_hwmods,
94
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
98
90
static void __iomem *dma_base;
99
91
static inline void dma_write(u32 val, int reg, int lch)
228
220
/* One time initializations */
229
221
static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
231
struct omap_device *od;
223
struct platform_device *pdev;
232
224
struct omap_system_dma_plat_info *p;
233
225
struct resource *mem;
234
226
char *name = "omap_dma_system";
259
251
p->errata = configure_dma_errata();
261
od = omap_device_build(name, 0, oh, p, sizeof(*p),
262
omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0);
253
pdev = omap_device_build(name, 0, oh, p, sizeof(*p), NULL, 0, 0);
265
256
pr_err("%s: Can't build omap_device for %s:%s.\n",
266
257
__func__, name, oh->name);
258
return PTR_ERR(pdev);
270
mem = platform_get_resource(&od->pdev, IORESOURCE_MEM, 0);
261
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
272
dev_err(&od->pdev.dev, "%s: no mem resource\n", __func__);
263
dev_err(&pdev->dev, "%s: no mem resource\n", __func__);
275
266
dma_base = ioremap(mem->start, resource_size(mem));
277
dev_err(&od->pdev.dev, "%s: ioremap fail\n", __func__);
268
dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
283
274
(d->lch_count), GFP_KERNEL);
286
dev_err(&od->pdev.dev, "%s: kzalloc fail\n", __func__);
277
dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__);