I just downloaded the most recent LinuxUtils (4.00.02.11) from TIs website. I opened up the src directory and started following the directions from the README within it. It says that I need to add a stub into the linux kernel tree. I added the .c files and added the obj-y += cmem/ to the kmake tree. I also added the includes file to include/linux. Then it says I need to add a reserve function to the MACHINE_START struct. I added that to the struct like so:
DT_MACHINE_START(KEYSTONE2, "KeyStone2")
KEYSTONE_MACHINE_DEFS
.smp = smp_ops(keystone_smp_ops),
.handle_irq = gic_handle_irq,
.dt_compat = keystone2_match,
.timer = &keystone2_timer,
.reserve = cmem_reserve_cma,
#ifdef CONFIG_ZONE_DMA
.dma_zone_size = SZ_2G,
#endif
MACHINE_END
As you can see I am using a Keystone II and am using the 3.8.4 src code from the git repo and compiling it with keystone2_defconfig configuration.
I assume I also needed to add the header file to the keystone.c file with the MACHINE_START struct. The problem is that the .h file does not define a function called cmem_reserve_cma, causing the kernel not to compile. Is this just poor documentation updating due to edits in the CMEM module, or am I just missing something?