Skip to content

Commit f397c8d

Browse files
committed
mmc: block: Move files to core
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>
1 parent ff6af28 commit f397c8d

File tree

12 files changed

+71
-88
lines changed

12 files changed

+71
-88
lines changed

drivers/mmc/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ if MMC
2323

2424
source "drivers/mmc/core/Kconfig"
2525

26-
source "drivers/mmc/card/Kconfig"
27-
2826
source "drivers/mmc/host/Kconfig"
2927

3028
endif # MMC

drivers/mmc/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
subdir-ccflags-$(CONFIG_MMC_DEBUG) := -DDEBUG
66

77
obj-$(CONFIG_MMC) += core/
8-
obj-$(CONFIG_MMC) += card/
98
obj-$(subst m,y,$(CONFIG_MMC)) += host/

drivers/mmc/card/Kconfig

Lines changed: 0 additions & 70 deletions
This file was deleted.

drivers/mmc/card/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

drivers/mmc/core/Kconfig

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,69 @@ config PWRSEQ_SIMPLE
2222

2323
This driver can also be built as a module. If so, the module
2424
will be called pwrseq_simple.
25+
26+
config MMC_BLOCK
27+
tristate "MMC block device driver"
28+
depends on BLOCK
29+
default y
30+
help
31+
Say Y here to enable the MMC block device driver support.
32+
This provides a block device driver, which you can use to
33+
mount the filesystem. Almost everyone wishing MMC support
34+
should say Y or M here.
35+
36+
config MMC_BLOCK_MINORS
37+
int "Number of minors per block device"
38+
depends on MMC_BLOCK
39+
range 4 256
40+
default 8
41+
help
42+
Number of minors per block device. One is needed for every
43+
partition on the disk (plus one for the whole disk).
44+
45+
Number of total MMC minors available is 256, so your number
46+
of supported block devices will be limited to 256 divided
47+
by this number.
48+
49+
Default is 8 to be backwards compatible with previous
50+
hardwired device numbering.
51+
52+
If unsure, say 8 here.
53+
54+
config MMC_BLOCK_BOUNCE
55+
bool "Use bounce buffer for simple hosts"
56+
depends on MMC_BLOCK
57+
default y
58+
help
59+
SD/MMC is a high latency protocol where it is crucial to
60+
send large requests in order to get high performance. Many
61+
controllers, however, are restricted to continuous memory
62+
(i.e. they can't do scatter-gather), something the kernel
63+
rarely can provide.
64+
65+
Say Y here to help these restricted hosts by bouncing
66+
requests back and forth from a large buffer. You will get
67+
a big performance gain at the cost of up to 64 KiB of
68+
physical memory.
69+
70+
If unsure, say Y here.
71+
72+
config SDIO_UART
73+
tristate "SDIO UART/GPS class support"
74+
depends on TTY
75+
help
76+
SDIO function driver for SDIO cards that implements the UART
77+
class, as well as the GPS class which appears like a UART.
78+
79+
config MMC_TEST
80+
tristate "MMC host test driver"
81+
help
82+
Development driver that performs a series of reads and writes
83+
to a memory card in order to expose certain well known bugs
84+
in host controllers. The tests are executed by writing to the
85+
"test" file in debugfs under each card. Note that whatever is
86+
on your card will be overwritten by these tests.
87+
88+
This driver is only of interest to those developing or
89+
testing a host driver. Most people should say N here.
90+

drivers/mmc/core/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ mmc_core-$(CONFIG_OF) += pwrseq.o
1212
obj-$(CONFIG_PWRSEQ_SIMPLE) += pwrseq_simple.o
1313
obj-$(CONFIG_PWRSEQ_EMMC) += pwrseq_emmc.o
1414
mmc_core-$(CONFIG_DEBUG_FS) += debugfs.o
15+
obj-$(CONFIG_MMC_BLOCK) += mmc_block.o
16+
mmc_block-objs := block.o queue.o
17+
obj-$(CONFIG_MMC_TEST) += mmc_test.o
18+
obj-$(CONFIG_SDIO_UART) += sdio_uart.o
File renamed without changes.
File renamed without changes.

drivers/mmc/card/mmc_test.c renamed to drivers/mmc/core/mmc_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* linux/drivers/mmc/card/mmc_test.c
3-
*
42
* Copyright 2007-2008 Pierre Ossman
53
*
64
* This program is free software; you can redistribute it and/or modify

drivers/mmc/card/queue.c renamed to drivers/mmc/core/queue.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* linux/drivers/mmc/card/queue.c
3-
*
42
* Copyright (C) 2003 Russell King, All Rights Reserved.
53
* Copyright 2006-2007 Pierre Ossman
64
*

0 commit comments

Comments
 (0)