]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: block: Move files to core
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 8 Dec 2016 10:23:49 +0000 (11:23 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 12 Dec 2016 15:30:05 +0000 (16:30 +0100)
Once upon a time it made sense to keep the mmc block device driver and its
related code, in its own directory called card. Over time, more an more
functions/structures have become shared through generic mmc header files,
between the core and the card directory. In other words, the relationship
between them has become closer.

By sharing functions/structures via generic header files, it becomes easy
for outside users to abuse them. In a way to avoid that from happen, let's
move the files from card directory into the core directory, as it enables
us to move definitions of functions/structures into mmc core specific
header files.

Note, this is only the first step in providing a cleaner mmc interface for
outside users. Following changes will do the actual cleanup, as that is not
part of this change.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
12 files changed:
drivers/mmc/Kconfig
drivers/mmc/Makefile
drivers/mmc/card/Kconfig [deleted file]
drivers/mmc/card/Makefile [deleted file]
drivers/mmc/core/Kconfig
drivers/mmc/core/Makefile
drivers/mmc/core/block.c [moved from drivers/mmc/card/block.c with 100% similarity]
drivers/mmc/core/block.h [moved from drivers/mmc/card/block.h with 100% similarity]
drivers/mmc/core/mmc_test.c [moved from drivers/mmc/card/mmc_test.c with 99% similarity]
drivers/mmc/core/queue.c [moved from drivers/mmc/card/queue.c with 99% similarity]
drivers/mmc/core/queue.h [moved from drivers/mmc/card/queue.h with 100% similarity]
drivers/mmc/core/sdio_uart.c [moved from drivers/mmc/card/sdio_uart.c with 99% similarity]

index f2eeb38efa653387b42cb8bf9ccc0ba4e0f17969..7e803fc454d1f15ec114c1300a4b65000216e2c2 100644 (file)
@@ -23,8 +23,6 @@ if MMC
 
 source "drivers/mmc/core/Kconfig"
 
-source "drivers/mmc/card/Kconfig"
-
 source "drivers/mmc/host/Kconfig"
 
 endif # MMC
index 400756ec7c492dfd527dc5154b6601ae0ef1060d..416b6d1c9ec6bb024c86f349e2b2b9c3cfa675a4 100644 (file)
@@ -5,5 +5,4 @@
 subdir-ccflags-$(CONFIG_MMC_DEBUG) := -DDEBUG
 
 obj-$(CONFIG_MMC)              += core/
-obj-$(CONFIG_MMC)              += card/
 obj-$(subst m,y,$(CONFIG_MMC)) += host/
diff --git a/drivers/mmc/card/Kconfig b/drivers/mmc/card/Kconfig
deleted file mode 100644 (file)
index 5562308..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# MMC/SD card drivers
-#
-
-comment "MMC/SD/SDIO Card Drivers"
-
-config MMC_BLOCK
-       tristate "MMC block device driver"
-       depends on BLOCK
-       default y
-       help
-         Say Y here to enable the MMC block device driver support.
-         This provides a block device driver, which you can use to
-         mount the filesystem. Almost everyone wishing MMC support
-         should say Y or M here.
-
-config MMC_BLOCK_MINORS
-       int "Number of minors per block device"
-       depends on MMC_BLOCK
-       range 4 256
-       default 8
-       help
-         Number of minors per block device. One is needed for every
-         partition on the disk (plus one for the whole disk).
-
-         Number of total MMC minors available is 256, so your number
-         of supported block devices will be limited to 256 divided
-         by this number.
-
-         Default is 8 to be backwards compatible with previous
-         hardwired device numbering.
-
-         If unsure, say 8 here.
-
-config MMC_BLOCK_BOUNCE
-       bool "Use bounce buffer for simple hosts"
-       depends on MMC_BLOCK
-       default y
-       help
-         SD/MMC is a high latency protocol where it is crucial to
-         send large requests in order to get high performance. Many
-         controllers, however, are restricted to continuous memory
-         (i.e. they can't do scatter-gather), something the kernel
-         rarely can provide.
-
-         Say Y here to help these restricted hosts by bouncing
-         requests back and forth from a large buffer. You will get
-         a big performance gain at the cost of up to 64 KiB of
-         physical memory.
-
-         If unsure, say Y here.
-
-config SDIO_UART
-       tristate "SDIO UART/GPS class support"
-       depends on TTY
-       help
-         SDIO function driver for SDIO cards that implements the UART
-         class, as well as the GPS class which appears like a UART.
-
-config MMC_TEST
-       tristate "MMC host test driver"
-       help
-         Development driver that performs a series of reads and writes
-         to a memory card in order to expose certain well known bugs
-         in host controllers. The tests are executed by writing to the
-         "test" file in debugfs under each card. Note that whatever is
-         on your card will be overwritten by these tests.
-
-         This driver is only of interest to those developing or
-         testing a host driver. Most people should say N here.
diff --git a/drivers/mmc/card/Makefile b/drivers/mmc/card/Makefile
deleted file mode 100644 (file)
index c73b406..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for MMC/SD card drivers
-#
-
-obj-$(CONFIG_MMC_BLOCK)                += mmc_block.o
-mmc_block-objs                 := block.o queue.o
-obj-$(CONFIG_MMC_TEST)         += mmc_test.o
-
-obj-$(CONFIG_SDIO_UART)                += sdio_uart.o
-
index 250f223aaa8038de37238dd93d720628331adebf..cdfa8520a4b16be2a177294fc5b705755fc21e19 100644 (file)
@@ -22,3 +22,69 @@ config PWRSEQ_SIMPLE
 
          This driver can also be built as a module. If so, the module
          will be called pwrseq_simple.
+
+config MMC_BLOCK
+       tristate "MMC block device driver"
+       depends on BLOCK
+       default y
+       help
+         Say Y here to enable the MMC block device driver support.
+         This provides a block device driver, which you can use to
+         mount the filesystem. Almost everyone wishing MMC support
+         should say Y or M here.
+
+config MMC_BLOCK_MINORS
+       int "Number of minors per block device"
+       depends on MMC_BLOCK
+       range 4 256
+       default 8
+       help
+         Number of minors per block device. One is needed for every
+         partition on the disk (plus one for the whole disk).
+
+         Number of total MMC minors available is 256, so your number
+         of supported block devices will be limited to 256 divided
+         by this number.
+
+         Default is 8 to be backwards compatible with previous
+         hardwired device numbering.
+
+         If unsure, say 8 here.
+
+config MMC_BLOCK_BOUNCE
+       bool "Use bounce buffer for simple hosts"
+       depends on MMC_BLOCK
+       default y
+       help
+         SD/MMC is a high latency protocol where it is crucial to
+         send large requests in order to get high performance. Many
+         controllers, however, are restricted to continuous memory
+         (i.e. they can't do scatter-gather), something the kernel
+         rarely can provide.
+
+         Say Y here to help these restricted hosts by bouncing
+         requests back and forth from a large buffer. You will get
+         a big performance gain at the cost of up to 64 KiB of
+         physical memory.
+
+         If unsure, say Y here.
+
+config SDIO_UART
+       tristate "SDIO UART/GPS class support"
+       depends on TTY
+       help
+         SDIO function driver for SDIO cards that implements the UART
+         class, as well as the GPS class which appears like a UART.
+
+config MMC_TEST
+       tristate "MMC host test driver"
+       help
+         Development driver that performs a series of reads and writes
+         to a memory card in order to expose certain well known bugs
+         in host controllers. The tests are executed by writing to the
+         "test" file in debugfs under each card. Note that whatever is
+         on your card will be overwritten by these tests.
+
+         This driver is only of interest to those developing or
+         testing a host driver. Most people should say N here.
+
index f007151dfdc6a9c2d0f814d7863a8a411568a96a..b2a257dc644f4cec9822193271de24bf1ec41b42 100644 (file)
@@ -12,3 +12,7 @@ mmc_core-$(CONFIG_OF)         += pwrseq.o
 obj-$(CONFIG_PWRSEQ_SIMPLE)    += pwrseq_simple.o
 obj-$(CONFIG_PWRSEQ_EMMC)      += pwrseq_emmc.o
 mmc_core-$(CONFIG_DEBUG_FS)    += debugfs.o
+obj-$(CONFIG_MMC_BLOCK)                += mmc_block.o
+mmc_block-objs                 := block.o queue.o
+obj-$(CONFIG_MMC_TEST)         += mmc_test.o
+obj-$(CONFIG_SDIO_UART)                += sdio_uart.o
similarity index 99%
rename from drivers/mmc/card/mmc_test.c
rename to drivers/mmc/core/mmc_test.c
index ec1d1c46eb90069fe4f313e8bb4c877d973a7b7b..3ab6e52d106c6c20b2de00a97badd1a1f0f99b66 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/drivers/mmc/card/mmc_test.c
- *
  *  Copyright 2007-2008 Pierre Ossman
  *
  * This program is free software; you can redistribute it and/or modify
similarity index 99%
rename from drivers/mmc/card/queue.c
rename to drivers/mmc/core/queue.c
index cf29809f69e4e2cc462ff0e6e2f71d620a551913..f4e3d76792f330c144d94f6cc6939db642b58f1a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/drivers/mmc/card/queue.c
- *
  *  Copyright (C) 2003 Russell King, All Rights Reserved.
  *  Copyright 2006-2007 Pierre Ossman
  *
similarity index 99%
rename from drivers/mmc/card/sdio_uart.c
rename to drivers/mmc/core/sdio_uart.c
index 491c187744f58ab4b808dd8b780af3b3526834aa..d3c91f412b693d80666d6c8bf19ae7d27fe231f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/mmc/card/sdio_uart.c - SDIO UART/GPS driver
+ * SDIO UART/GPS driver
  *
  * Based on drivers/serial/8250.c and drivers/serial/serial_core.c
  * by Russell King.