| .. | .. |
|---|
| 13 | 13 | |
|---|
| 14 | 14 | #include <cpu/sh7723.h> |
|---|
| 15 | 15 | |
|---|
| 16 | +#include <linux/dma-map-ops.h> |
|---|
| 16 | 17 | #include <linux/clkdev.h> |
|---|
| 17 | 18 | #include <linux/delay.h> |
|---|
| 18 | 19 | #include <linux/device.h> |
|---|
| .. | .. |
|---|
| 527 | 528 | |
|---|
| 528 | 529 | /* Initialize CEU platform device separately to map memory first */ |
|---|
| 529 | 530 | device_initialize(&ap325rxa_ceu_device.dev); |
|---|
| 530 | | - arch_setup_pdev_archdata(&ap325rxa_ceu_device); |
|---|
| 531 | 531 | dma_declare_coherent_memory(&ap325rxa_ceu_device.dev, |
|---|
| 532 | | - ceu_dma_membase, ceu_dma_membase, |
|---|
| 533 | | - ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1, |
|---|
| 534 | | - DMA_MEMORY_EXCLUSIVE); |
|---|
| 532 | + ceu_dma_membase, ceu_dma_membase, |
|---|
| 533 | + ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1); |
|---|
| 535 | 534 | |
|---|
| 536 | 535 | platform_device_add(&ap325rxa_ceu_device); |
|---|
| 537 | 536 | |
|---|
| .. | .. |
|---|
| 557 | 556 | phys_addr_t phys; |
|---|
| 558 | 557 | phys_addr_t size = CEU_BUFFER_MEMORY_SIZE; |
|---|
| 559 | 558 | |
|---|
| 560 | | - phys = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_ALLOC_ANYWHERE); |
|---|
| 559 | + phys = memblock_phys_alloc(size, PAGE_SIZE); |
|---|
| 560 | + if (!phys) |
|---|
| 561 | + panic("Failed to allocate CEU memory\n"); |
|---|
| 562 | + |
|---|
| 561 | 563 | memblock_free(phys, size); |
|---|
| 562 | 564 | memblock_remove(phys, size); |
|---|
| 563 | 565 | |
|---|