diff options
author | unsik Kim <donari75@gmail.com> | 2009-04-02 12:50:58 -0700 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-07 08:12:38 +0200 |
commit | 3fbed4c61abd8458896e38633d10110cb5a589d4 (patch) | |
tree | 6024567b36cc26c4d6fddef59fab222651310dec /Documentation/blockdev/mflash.txt | |
parent | e143858104e318263689c551543dfc3f186cea12 (diff) | |
download | linux-exynos-3fbed4c61abd8458896e38633d10110cb5a589d4.tar.gz linux-exynos-3fbed4c61abd8458896e38633d10110cb5a589d4.tar.bz2 linux-exynos-3fbed4c61abd8458896e38633d10110cb5a589d4.zip |
mflash: initial support
This driver supports mflash IO mode for linux.
Mflash is embedded flash drive and mainly targeted mobile and consumer
electronic devices.
Internally, mflash has nand flash and other hardware logics and supports 2
different operation (ATA, IO) modes. ATA mode doesn't need any new driver
and currently works well under standard IDE subsystem. Actually it's one
chip SSD. IO mode is ATA-like custom mode for the host that doesn't have
IDE interface.
Followings are brief descriptions about IO mode.
A. IO mode based on ATA protocol and uses some custom command. (read confirm,
write confirm)
B. IO mode uses SRAM bus interface.
C. IO mode supports 4kB boot area, so host can boot from mflash.
This driver is quitely similar to a standard ATA driver, but because of
following reasons it is currently seperated with ATA layer.
1. ATA layer deals standard ATA protocol. ATA layer have many low-
level device specific interface, but data transfer keeps ATA rule.
But, mflash IO mode doesn't.
2. Even though currently not used in mflash driver code, mflash has
some custom command and modes. (nand fusing, firmware patch, etc) If
this feature supported in linux kernel, ATA layer more altered.
3. Currently PATA platform device driver doesn't support interrupt.
(I'm not sure) But, mflash uses interrupt (polling mode is just for
debug).
4. mflash is somewhat under-develop product. Even though some company
already using mflash their own product, I think more time is needed for
standardization of custom command and mode. That time (maybe October)
I will talk to with ATA people. If they accept integration, I will
integrate.
Signed-off-by: unsik Kim <donari75@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'Documentation/blockdev/mflash.txt')
-rw-r--r-- | Documentation/blockdev/mflash.txt | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/Documentation/blockdev/mflash.txt b/Documentation/blockdev/mflash.txt new file mode 100644 index 000000000000..1f610ecf698a --- /dev/null +++ b/Documentation/blockdev/mflash.txt @@ -0,0 +1,84 @@ +This document describes m[g]flash support in linux. + +Contents + 1. Overview + 2. Reserved area configuration + 3. Example of mflash platform driver registration + +1. Overview + +Mflash and gflash are embedded flash drive. The only difference is mflash is +MCP(Multi Chip Package) device. These two device operate exactly same way. +So the rest mflash repersents mflash and gflash altogether. + +Internally, mflash has nand flash and other hardware logics and supports +2 different operation (ATA, IO) modes. ATA mode doesn't need any new +driver and currently works well under standard IDE subsystem. Actually it's +one chip SSD. IO mode is ATA-like custom mode for the host that doesn't have +IDE interface. + +Followings are brief descriptions about IO mode. +A. IO mode based on ATA protocol and uses some custom command. (read confirm, +write confirm) +B. IO mode uses SRAM bus interface. +C. IO mode supports 4kB boot area, so host can boot from mflash. + +2. Reserved area configuration +If host boot from mflash, usually needs raw area for boot loader image. All of +the mflash's block device operation will be taken this value as start offset. +Note that boot loader's size of reserved area and kernel configuration value +must be same. + +3. Example of mflash platform driver registration +Working mflash is very straight forward. Adding platform device stuff to board +configuration file is all. Here is some pseudo example. + +static struct mg_drv_data mflash_drv_data = { + /* If you want to polling driver set to 1 */ + .use_polling = 0, + /* device attribution */ + .dev_attr = MG_BOOT_DEV +}; + +static struct resource mg_mflash_rsc[] = { + /* Base address of mflash */ + [0] = { + .start = 0x08000000, + .end = 0x08000000 + SZ_64K - 1, + .flags = IORESOURCE_MEM + }, + /* mflash interrupt pin */ + [1] = { + .start = IRQ_GPIO(84), + .end = IRQ_GPIO(84), + .flags = IORESOURCE_IRQ + }, + /* mflash reset pin */ + [2] = { + .start = 43, + .end = 43, + .name = MG_RST_PIN, + .flags = IORESOURCE_IO + }, + /* mflash reset-out pin + * If you use mflash as storage device (i.e. other than MG_BOOT_DEV), + * should assign this */ + [3] = { + .start = 51, + .end = 51, + .name = MG_RSTOUT_PIN, + .flags = IORESOURCE_IO + } +}; + +static struct platform_device mflash_dev = { + .name = MG_DEV_NAME, + .id = -1, + .dev = { + .platform_data = &mflash_drv_data, + }, + .num_resources = ARRAY_SIZE(mg_mflash_rsc), + .resource = mg_mflash_rsc +}; + +platform_device_register(&mflash_dev); |