/* REVISIT This supports CPU and DMA access to/from SRAM, but it doesn't (yet?) support some other notable uses of SRAM: as TCM for data and/or instructions; and holding code needed to enter and exit suspend states (while DRAM can't be used).  */
static int __init sram_init(void)
/* REVISIT This supports CPU and DMA access to/from SRAM, but it doesn't (yet?) support some other notable uses of SRAM: as TCM for data and/or instructions; and holding code needed to enter and exit suspend states (while DRAM can't be used).  */
static int __init sram_init(void)
{
	unsigned len = davinci_soc_info.sram_len;
	int status = 0;
	if (len) {
		len = min_t(unsigned, len, SRAM_SIZE);
		sram_pool = gen_pool_create(ilog2(SRAM_GRANULARITY), -1);
		if (!sram_pool)
			status = -ENOMEM;
	}
	if (sram_pool)
		status = gen_pool_add(sram_pool, SRAM_VIRT, len, -1);
	WARN_ON(status < 0);
	return status;
}