forked from mirrors/linux
		
	remove the mg_disk driver
This drivers was added in 2008, but as far as a I can tell we never had a single platform that actually registered resources for the platform driver. It's also been unmaintained for a long time and apparently has a ATA mode that can be driven using the IDE/libata subsystem. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
		
							parent
							
								
									3f19cd23f3
								
							
						
					
					
						commit
						8425339492
					
				
					 5 changed files with 0 additions and 1257 deletions
				
			
		|  | @ -1,84 +0,0 @@ | |||
| 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. | ||||
| 
 | ||||
| Following 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); | ||||
|  | @ -434,23 +434,6 @@ config ATA_OVER_ETH | |||
| 	This driver provides Support for ATA over Ethernet block | ||||
| 	devices like the Coraid EtherDrive (R) Storage Blade. | ||||
| 
 | ||||
| config MG_DISK | ||||
| 	tristate "mGine mflash, gflash support" | ||||
| 	depends on ARM && GPIOLIB | ||||
| 	help | ||||
| 	  mGine mFlash(gFlash) block device driver | ||||
| 
 | ||||
| config MG_DISK_RES | ||||
| 	int "Size of reserved area before MBR" | ||||
| 	depends on MG_DISK | ||||
| 	default 0 | ||||
| 	help | ||||
| 	  Define size of reserved area that usually used for boot. Unit is KB. | ||||
| 	  All of the block device operation will be taken this value as start | ||||
| 	  offset | ||||
| 	  Examples: | ||||
| 			1024 => 1 MB | ||||
| 
 | ||||
| config SUNVDC | ||||
| 	tristate "Sun Virtual Disk Client support" | ||||
| 	depends on SUN_LDOMS | ||||
|  |  | |||
|  | @ -19,7 +19,6 @@ obj-$(CONFIG_BLK_CPQ_CISS_DA)  += cciss.o | |||
| obj-$(CONFIG_BLK_DEV_DAC960)	+= DAC960.o | ||||
| obj-$(CONFIG_XILINX_SYSACE)	+= xsysace.o | ||||
| obj-$(CONFIG_CDROM_PKTCDVD)	+= pktcdvd.o | ||||
| obj-$(CONFIG_MG_DISK)		+= mg_disk.o | ||||
| obj-$(CONFIG_SUNVDC)		+= sunvdc.o | ||||
| obj-$(CONFIG_BLK_DEV_SKD)	+= skd.o | ||||
| obj-$(CONFIG_BLK_DEV_OSD)	+= osdblk.o | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -1,45 +0,0 @@ | |||
| /*
 | ||||
|  *  include/linux/mg_disk.c | ||||
|  * | ||||
|  *  Private data for mflash platform driver | ||||
|  * | ||||
|  * (c) 2008 mGine Co.,LTD | ||||
|  * (c) 2008 unsik Kim <donari75@gmail.com> | ||||
|  * | ||||
|  *  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 | ||||
		Loading…
	
		Reference in a new issue
	
	 Christoph Hellwig
						Christoph Hellwig