/* Register the Flash platform device with the kernel.  */
void __init lpc178x_flash_init(void)
/* Register the Flash platform device with the kernel.  */
void __init lpc178x_flash_init(void)
{
	unsigned int size = 0;
	switch (lpc178x_platform_get()) {
	case PLATFORM_LPC178X_EA_LPC1788:
		size = 4*1024*1024;
		break;
	case PLATFORM_LPC178X_LNX_EVB:
		size = 16*1024*1024;
		break;
	default:
		printk(KERN_ERR "%s: Unknown platform %#x, exit\n", __func__,
			lpc178x_platform_get());
		goto xit;
	}
	flash_resources[0].end = flash_resources[0].start + size - 1;
	flash_partitions[2].size = size - FLASH_JFFS2_OFFSET;
	platform_device_register(&flash_dev);
xit:
	return;
}