.. | .. |
---|
32 | 32 | #include <linux/smc91x.h> |
---|
33 | 33 | #include <linux/usb/r8a66597.h> |
---|
34 | 34 | #include <linux/videodev2.h> |
---|
| 35 | +#include <linux/dma-map-ops.h> |
---|
35 | 36 | |
---|
36 | 37 | #include <mach-se/mach/se7724.h> |
---|
37 | 38 | #include <media/drv-intf/renesas-ceu.h> |
---|
.. | .. |
---|
937 | 938 | |
---|
938 | 939 | /* Initialize CEU platform devices separately to map memory first */ |
---|
939 | 940 | device_initialize(&ms7724se_ceu_devices[0]->dev); |
---|
940 | | - arch_setup_pdev_archdata(ms7724se_ceu_devices[0]); |
---|
941 | 941 | dma_declare_coherent_memory(&ms7724se_ceu_devices[0]->dev, |
---|
942 | 942 | ceu0_dma_membase, ceu0_dma_membase, |
---|
943 | | - ceu0_dma_membase + |
---|
944 | | - CEU_BUFFER_MEMORY_SIZE - 1, |
---|
945 | | - DMA_MEMORY_EXCLUSIVE); |
---|
| 943 | + CEU_BUFFER_MEMORY_SIZE); |
---|
946 | 944 | platform_device_add(ms7724se_ceu_devices[0]); |
---|
947 | 945 | |
---|
948 | 946 | device_initialize(&ms7724se_ceu_devices[1]->dev); |
---|
949 | | - arch_setup_pdev_archdata(ms7724se_ceu_devices[1]); |
---|
950 | 947 | dma_declare_coherent_memory(&ms7724se_ceu_devices[1]->dev, |
---|
951 | 948 | ceu1_dma_membase, ceu1_dma_membase, |
---|
952 | | - ceu1_dma_membase + |
---|
953 | | - CEU_BUFFER_MEMORY_SIZE - 1, |
---|
954 | | - DMA_MEMORY_EXCLUSIVE); |
---|
| 949 | + CEU_BUFFER_MEMORY_SIZE); |
---|
955 | 950 | platform_device_add(ms7724se_ceu_devices[1]); |
---|
956 | 951 | |
---|
957 | 952 | return platform_add_devices(ms7724se_devices, |
---|
.. | .. |
---|
965 | 960 | phys_addr_t phys; |
---|
966 | 961 | phys_addr_t size = CEU_BUFFER_MEMORY_SIZE; |
---|
967 | 962 | |
---|
968 | | - phys = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_ALLOC_ANYWHERE); |
---|
| 963 | + phys = memblock_phys_alloc(size, PAGE_SIZE); |
---|
| 964 | + if (!phys) |
---|
| 965 | + panic("Failed to allocate CEU0 memory\n"); |
---|
| 966 | + |
---|
969 | 967 | memblock_free(phys, size); |
---|
970 | 968 | memblock_remove(phys, size); |
---|
971 | 969 | ceu0_dma_membase = phys; |
---|
972 | 970 | |
---|
973 | | - phys = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_ALLOC_ANYWHERE); |
---|
| 971 | + phys = memblock_phys_alloc(size, PAGE_SIZE); |
---|
| 972 | + if (!phys) |
---|
| 973 | + panic("Failed to allocate CEU1 memory\n"); |
---|
| 974 | + |
---|
974 | 975 | memblock_free(phys, size); |
---|
975 | 976 | memblock_remove(phys, size); |
---|
976 | 977 | ceu1_dma_membase = phys; |
---|