~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/dma.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        [CCDN]                  = 0xd8,
88
88
};
89
89
 
90
 
static struct omap_device_pm_latency omap2_dma_latency[] = {
91
 
        {
92
 
                .deactivate_func = omap_device_idle_hwmods,
93
 
                .activate_func   = omap_device_enable_hwmods,
94
 
                .flags           = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
95
 
        },
96
 
};
97
 
 
98
90
static void __iomem *dma_base;
99
91
static inline void dma_write(u32 val, int reg, int lch)
100
92
{
228
220
/* One time initializations */
229
221
static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
230
222
{
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";
258
250
 
259
251
        p->errata               = configure_dma_errata();
260
252
 
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);
263
254
        kfree(p);
264
 
        if (IS_ERR(od)) {
 
255
        if (IS_ERR(pdev)) {
265
256
                pr_err("%s: Can't build omap_device for %s:%s.\n",
266
257
                        __func__, name, oh->name);
267
 
                return PTR_ERR(od);
 
258
                return PTR_ERR(pdev);
268
259
        }
269
260
 
270
 
        mem = platform_get_resource(&od->pdev, IORESOURCE_MEM, 0);
 
261
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
271
262
        if (!mem) {
272
 
                dev_err(&od->pdev.dev, "%s: no mem resource\n", __func__);
 
263
                dev_err(&pdev->dev, "%s: no mem resource\n", __func__);
273
264
                return -EINVAL;
274
265
        }
275
266
        dma_base = ioremap(mem->start, resource_size(mem));
276
267
        if (!dma_base) {
277
 
                dev_err(&od->pdev.dev, "%s: ioremap fail\n", __func__);
 
268
                dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
278
269
                return -ENOMEM;
279
270
        }
280
271
 
283
274
                                        (d->lch_count), GFP_KERNEL);
284
275
 
285
276
        if (!d->chan) {
286
 
                dev_err(&od->pdev.dev, "%s: kzalloc fail\n", __func__);
 
277
                dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__);
287
278
                return -ENOMEM;
288
279
        }
289
280
        return 0;