#size-cells = <0>;
rockchip,ion-heap@1 { /* CMA HEAP */
compatible = "rockchip,ion-reserve";
- reg = <1>;
- memory-reservation = <0x00000000 0x20000000>; /* 512MB */
+ rockchip,ion_heap = <1>;
+ reg = <0x00000000 0x20000000>; /* 512MB */
};
- rockchip,ion-heap@3 { /* SYSTEM HEAP */
- reg = <3>;
+ rockchip,ion-heap@3 { /* VMALLOC HEAP */
+ rockchip,ion_heap = <3>;
};
};
CONFIG_SW_SYNC_USER=y
CONFIG_ION=y
CONFIG_ION_ROCKCHIP=y
-CONFIG_ION_ROCKCHIP_SNAPSHOT=y
-CONFIG_ION_SNAPSHOT_BUF_SHIFT=15
CONFIG_COMMON_CLK_DEBUG=y
CONFIG_IIO=y
CONFIG_ROCKCHIP_ADC=y
int id;
};
-static void ion_iommu_force_unmap(struct ion_buffer *buffer);
extern char *rockchip_ion_snapshot_get(unsigned *size);
extern int rockchip_ion_snapshot_debugfs(struct dentry* root);
buffer->heap->ops->unmap_kernel(buffer->heap, buffer);
buffer->heap->ops->unmap_dma(buffer->heap, buffer);
#ifdef CONFIG_ROCKCHIP_IOMMU
+ static void ion_iommu_force_unmap(struct ion_buffer *buffer);
ion_iommu_force_unmap(buffer);
#endif
buffer->heap->ops->free(buffer);
buffer->heap->ops->phys(buffer->heap, buffer, &pa, &len);
seq_printf(s, "%16.16s: 0x%08lx 0x%08lx %8zuKB %4d %4d %4d\n",
- buffer->heap->name, buffer->vaddr, pa, len>>10, buffer->handle_count,
+ buffer->heap->name, (unsigned long)buffer->vaddr, pa, len>>10, buffer->handle_count,
atomic_read(&buffer->ref.refcount), atomic_read(&handle->ref.refcount));
#ifdef CONFIG_ROCKCHIP_IOMMU
ion_debug_client_show_buffer_map(s, buffer);
int ret = 0;
ret = of_property_read_u32_array(node,
- "memory-reservation", val, 2);
+ "reg", val, 2);
if (!ret) {
heap->base = val[0];
heap->size = val[1];
}
- printk("heap: %x@%x\n", heap->size, heap->base);
+ pr_debug("heap: %x@%lx\n", heap->size, heap->base);
return 0;
}
pdata->nr = num_heaps;
for_each_child_of_node(dt_node, node) {
- ret = of_property_read_u32(node, "reg", &val);
+ ret = of_property_read_u32(node, "rockchip,ion_heap", &val);
if (ret) {
pr_err("%s: Unable to find reg key", __func__);
goto free_heaps;
if (pdata_needs_to_be_freed)
kfree(pdata);
- pr_info("Rockchip ion module is successfully loaded\n");
+ pr_info("Rockchip ion module is successfully loaded (%s)\n", ROCKCHIP_ION_VERSION);
return 0;
err:
for (i = 0; i < num_heaps; i++) {
if (!of_flat_dt_is_compatible(node, "rockchip,ion-reserve"))
return 0;
- prop = of_get_flat_dt_prop(node, "memory-reservation", &len);
+ prop = of_get_flat_dt_prop(node, "reg", &len);
if (!prop || (len != 2 * sizeof(unsigned long)))
return 0;
base = be32_to_cpu(prop[0]);
size = be32_to_cpu(prop[1]);
- prop = of_get_flat_dt_prop(node, "reg", &len);
+ prop = of_get_flat_dt_prop(node, "rockchip,ion_heap", &len);
if (!prop || (len != sizeof(unsigned long)))
return 0;
#include <linux/ion.h>
#endif
+#define ROCKCHIP_ION_VERSION "v1.0"
+
enum ion_heap_ids {
INVALID_HEAP_ID = -1,
ION_CMA_HEAP_ID = 1,