/* Returns the number of blocks in the entire device.  */
uint16_t nand_flash_model_get_device_size_in_blocks(const struct nand_flash_model *model)
/* Returns the number of blocks in the entire device.  */
uint16_t nand_flash_model_get_device_size_in_blocks(const struct nand_flash_model *model)
{
	return (1024 * model->device_size_in_megabytes) /
			model->block_size_in_kilobytes;
}