#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
#include <asm/txx9/rbtx4939.h>
struct rbtx4939_flash_info {
static int rbtx4939_flash_remove(struct platform_device *dev)
struct rbtx4939_flash_info *info;
info = platform_get_drvdata(dev);
mtd_device_unregister(info->mtd);
static const char * const rom_probe_types[] = {
"cfi_probe", "jedec_probe", NULL };
static int rbtx4939_flash_probe(struct platform_device *dev)
struct rbtx4939_flash_data *pdata;
struct rbtx4939_flash_info *info;
const char * const *probe_type;
pdata = dev_get_platdata(&dev->dev);
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
info = devm_kzalloc(&dev->dev, sizeof(struct rbtx4939_flash_info),