hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/sh/boards/mach-ap325rxa/setup.c
....@@ -13,6 +13,7 @@
1313
1414 #include <cpu/sh7723.h>
1515
16
+#include <linux/dma-map-ops.h>
1617 #include <linux/clkdev.h>
1718 #include <linux/delay.h>
1819 #include <linux/device.h>
....@@ -527,11 +528,9 @@
527528
528529 /* Initialize CEU platform device separately to map memory first */
529530 device_initialize(&ap325rxa_ceu_device.dev);
530
- arch_setup_pdev_archdata(&ap325rxa_ceu_device);
531531 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_BUFFER_MEMORY_SIZE);
535534
536535 platform_device_add(&ap325rxa_ceu_device);
537536
....@@ -557,7 +556,10 @@
557556 phys_addr_t phys;
558557 phys_addr_t size = CEU_BUFFER_MEMORY_SIZE;
559558
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
+
561563 memblock_free(phys, size);
562564 memblock_remove(phys, size);
563565