From d49dd5ba8bb08b8adc52c269b86b50765b2f0815 Mon Sep 17 00:00:00 2001 From: unsik Kim Date: Tue, 16 Jun 2009 08:40:20 +0200 Subject: [PATCH] --- yaml --- r: 151093 b: refs/heads/master c: 5ced504b1bd1979378de35c56aa5d3d79fb5033f h: refs/heads/master i: 151091: 954d5966baee8863a2340f789a11136d0cfa30e6 v: v3 --- [refs] | 2 +- trunk/drivers/block/mg_disk.c | 28 +--------------------- trunk/include/linux/mg_disk.h | 45 +++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 28 deletions(-) create mode 100644 trunk/include/linux/mg_disk.h diff --git a/[refs] b/[refs] index 27f58954648e..b40b85e92165 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e475bba2fdee9c3dbfe25f026f8fb8de69508ad2 +refs/heads/master: 5ced504b1bd1979378de35c56aa5d3d79fb5033f diff --git a/trunk/drivers/block/mg_disk.c b/trunk/drivers/block/mg_disk.c index 60de5a01e71e..f703f5478246 100644 --- a/trunk/drivers/block/mg_disk.c +++ b/trunk/drivers/block/mg_disk.c @@ -22,13 +22,12 @@ #include #include #include +#include #define MG_RES_SEC (CONFIG_MG_DISK_RES << 1) /* name for block device */ #define MG_DISK_NAME "mgd" -/* name for platform device */ -#define MG_DEV_NAME "mg_disk" #define MG_DISK_MAJ 0 #define MG_DISK_MAX_PART 16 @@ -103,33 +102,8 @@ #define MG_TMAX_SWRST_TO_RDY 500 #define MG_TMAX_RSTOUT 3000 -/* device attribution */ -/* use mflash as boot device */ -#define MG_BOOT_DEV (1 << 0) -/* use mflash as storage device */ -#define MG_STORAGE_DEV (1 << 1) -/* same as MG_STORAGE_DEV, but bootloader already done reset sequence */ -#define MG_STORAGE_DEV_SKIP_RST (1 << 2) - #define MG_DEV_MASK (MG_BOOT_DEV | MG_STORAGE_DEV | MG_STORAGE_DEV_SKIP_RST) -/* names of GPIO resource */ -#define MG_RST_PIN "mg_rst" -/* except MG_BOOT_DEV, reset-out pin should be assigned */ -#define MG_RSTOUT_PIN "mg_rstout" - -/* private driver data */ -struct mg_drv_data { - /* disk resource */ - u32 use_polling; - - /* device attribution */ - u32 dev_attr; - - /* internally used */ - struct mg_host *host; -}; - /* main structure for mflash driver */ struct mg_host { struct device *dev; diff --git a/trunk/include/linux/mg_disk.h b/trunk/include/linux/mg_disk.h new file mode 100644 index 000000000000..e11f4d9f1c2e --- /dev/null +++ b/trunk/include/linux/mg_disk.h @@ -0,0 +1,45 @@ +/* + * include/linux/mg_disk.c + * + * Private data for mflash platform driver + * + * (c) 2008 mGine Co.,LTD + * (c) 2008 unsik Kim + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __MG_DISK_H__ +#define __MG_DISK_H__ + +/* name for platform device */ +#define MG_DEV_NAME "mg_disk" + +/* names of GPIO resource */ +#define MG_RST_PIN "mg_rst" +/* except MG_BOOT_DEV, reset-out pin should be assigned */ +#define MG_RSTOUT_PIN "mg_rstout" + +/* device attribution */ +/* use mflash as boot device */ +#define MG_BOOT_DEV (1 << 0) +/* use mflash as storage device */ +#define MG_STORAGE_DEV (1 << 1) +/* same as MG_STORAGE_DEV, but bootloader already done reset sequence */ +#define MG_STORAGE_DEV_SKIP_RST (1 << 2) + +/* private driver data */ +struct mg_drv_data { + /* disk resource */ + u32 use_polling; + + /* device attribution */ + u32 dev_attr; + + /* internally used */ + void *host; +}; + +#endif