aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2008-06-28 06:52:45 -0400
committerPierre Ossman <drzeus@drzeus.cx>2008-07-15 08:14:44 -0400
commitad3868b2ec96ec14a1549c9e33f5f9a2a3c6ab15 (patch)
tree05ca55c5ab38b814bf8d71c0720e5dfaf1419e32 /include
parente2d2647702702ea08cb78cdc9eca8c24242aa9be (diff)
mmc,sdio: helper function for transfer padding
There are a lot of crappy controllers out there that cannot handle all the request sizes that the MMC/SD/SDIO specifications require. In case the card driver can pad the data to overcome the problems, this commit adds a helper that calculates how much that padding should be. A corresponding helper is also added for SDIO, but it can also deal with all the complexities of splitting up a large transfer efficiently. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmc/core.h1
-rw-r--r--include/linux/mmc/sdio_func.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index d0c3abed74c2..143cebf0586f 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -135,6 +135,7 @@ extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
135 struct mmc_command *, int); 135 struct mmc_command *, int);
136 136
137extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); 137extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *);
138extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
138 139
139extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); 140extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
140extern void mmc_release_host(struct mmc_host *host); 141extern void mmc_release_host(struct mmc_host *host);
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index b050f4d7b41f..f57f22b3be88 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * include/linux/mmc/sdio_func.h 2 * include/linux/mmc/sdio_func.h
3 * 3 *
4 * Copyright 2007 Pierre Ossman 4 * Copyright 2007-2008 Pierre Ossman
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -120,6 +120,8 @@ extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz);
120extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); 120extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler);
121extern int sdio_release_irq(struct sdio_func *func); 121extern int sdio_release_irq(struct sdio_func *func);
122 122
123extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
124
123extern unsigned char sdio_readb(struct sdio_func *func, 125extern unsigned char sdio_readb(struct sdio_func *func,
124 unsigned int addr, int *err_ret); 126 unsigned int addr, int *err_ret);
125extern unsigned short sdio_readw(struct sdio_func *func, 127extern unsigned short sdio_readw(struct sdio_func *func,