2 * linux/arch/arm/mach-omap2/board-rx51-flash.c
4 * Copyright (C) 2008 Nokia
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/partitions.h>
16 #include <asm/mach/flash.h>
18 #include <mach/onenand.h>
20 #include "mmc-twl4030.h"
22 #define RX51_FLASH_CS 0
24 extern struct mtd_partition n800_partitions[ONENAND_MAX_PARTITIONS];
25 extern int n800_onenand_setup(void __iomem *onenand_base, int freq);
26 extern void __init n800_flash_init(void);
28 static struct flash_platform_data rx51_flash_data = {
29 .map_name = "cfi_probe",
31 .parts = n800_partitions,
32 .nr_parts = ARRAY_SIZE(n800_partitions),
35 static struct resource rx51_flash_resource = {
36 .flags = IORESOURCE_MEM,
39 static struct platform_device rx51_flash_device = {
43 .platform_data = &rx51_flash_data,
46 .resource = &rx51_flash_resource,
49 static struct platform_device *rx51_flash_devices[] = {
53 static struct twl4030_hsmmc_info mmc[] __initdata = {
69 void __init rx51_flash_init(void)
71 platform_add_devices(rx51_flash_devices, ARRAY_SIZE(rx51_flash_devices));
73 twl4030_mmc_init(mmc);