Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sdio: add SDIO_FBR_BASE(f) macro

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>

authored by

David Vrabel and committed by
Pierre Ossman
7616ee95 e6f918bf

+5 -3
+2 -2
drivers/mmc/core/sdio.c
··· 30 30 unsigned char data; 31 31 32 32 ret = mmc_io_rw_direct(func->card, 0, 0, 33 - func->num * 0x100 + SDIO_FBR_STD_IF, 0, &data); 33 + SDIO_FBR_BASE(func->num) + SDIO_FBR_STD_IF, 0, &data); 34 34 if (ret) 35 35 goto out; 36 36 ··· 38 38 39 39 if (data == 0x0f) { 40 40 ret = mmc_io_rw_direct(func->card, 0, 0, 41 - func->num * 0x100 + SDIO_FBR_STD_IF_EXT, 0, &data); 41 + SDIO_FBR_BASE(func->num) + SDIO_FBR_STD_IF_EXT, 0, &data); 42 42 if (ret) 43 43 goto out; 44 44 }
+1 -1
drivers/mmc/core/sdio_cis.c
··· 145 145 fn = 0; 146 146 147 147 ret = mmc_io_rw_direct(card, 0, 0, 148 - fn * 0x100 + SDIO_FBR_CIS + i, 0, &x); 148 + SDIO_FBR_BASE(fn) + SDIO_FBR_CIS + i, 0, &x); 149 149 if (ret) 150 150 return ret; 151 151 ptr |= x << (i * 8);
+2
include/linux/mmc/sdio.h
··· 132 132 * Function Basic Registers (FBR) 133 133 */ 134 134 135 + #define SDIO_FBR_BASE(f) ((f) * 0x100) /* base of function f's FBRs */ 136 + 135 137 #define SDIO_FBR_STD_IF 0x00 136 138 137 139 #define SDIO_FBR_SUPPORTS_CSA 0x40 /* supports Code Storage Area */