Skip to content

Commit d2c6d51

Browse files
bala-gunasundarstorulf
authored andcommitted
mmc: atmel-mci: move atmel MCI header file
Move the contents of linux/atmel-mci.h into drivers/mmc/host/atmel-mci.c as it is only used in one file Signed-off-by: Balamanikandan Gunasundar <balamanikandan.gunasundar@microchip.com> Reviewed-by: Ludovic Desroches <ludovic.desroches@microchip.com> Link: https://lore.kernel.org/r/20230825095157.76073-3-balamanikandan.gunasundar@microchip.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent ce6e947 commit d2c6d51

File tree

2 files changed

+38
-47
lines changed

2 files changed

+38
-47
lines changed

drivers/mmc/host/atmel-mci.c

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/mmc/host.h>
3030
#include <linux/mmc/sdio.h>
3131

32-
#include <linux/atmel-mci.h>
3332
#include <linux/atmel_pdc.h>
3433
#include <linux/pm.h>
3534
#include <linux/pm_runtime.h>
@@ -39,6 +38,8 @@
3938
#include <asm/io.h>
4039
#include <asm/unaligned.h>
4140

41+
#define ATMCI_MAX_NR_SLOTS 2
42+
4243
/*
4344
* Superset of MCI IP registers integrated in Atmel AT91 Processor
4445
* Registers and bitfields marked with [2] are only available in MCI2
@@ -200,6 +201,42 @@ enum atmci_pdc_buf {
200201
PDC_SECOND_BUF,
201202
};
202203

204+
/**
205+
* struct mci_slot_pdata - board-specific per-slot configuration
206+
* @bus_width: Number of data lines wired up the slot
207+
* @detect_pin: GPIO pin wired to the card detect switch
208+
* @wp_pin: GPIO pin wired to the write protect sensor
209+
* @detect_is_active_high: The state of the detect pin when it is active
210+
* @non_removable: The slot is not removable, only detect once
211+
*
212+
* If a given slot is not present on the board, @bus_width should be
213+
* set to 0. The other fields are ignored in this case.
214+
*
215+
* Any pins that aren't available should be set to a negative value.
216+
*
217+
* Note that support for multiple slots is experimental -- some cards
218+
* might get upset if we don't get the clock management exactly right.
219+
* But in most cases, it should work just fine.
220+
*/
221+
struct mci_slot_pdata {
222+
unsigned int bus_width;
223+
struct gpio_desc *detect_pin;
224+
struct gpio_desc *wp_pin;
225+
bool detect_is_active_high;
226+
bool non_removable;
227+
};
228+
229+
/**
230+
* struct mci_platform_data - board-specific MMC/SDcard configuration
231+
* @dma_slave: DMA slave interface to use in data transfers.
232+
* @slot: Per-slot configuration data.
233+
*/
234+
struct mci_platform_data {
235+
void *dma_slave;
236+
dma_filter_fn dma_filter;
237+
struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS];
238+
};
239+
203240
struct atmel_mci_caps {
204241
bool has_dma_conf_reg;
205242
bool has_pdc;

include/linux/atmel-mci.h

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

0 commit comments

Comments
 (0)