/* Reads a 32 bit integer from the address space of a given SDIO function. If there is a problem reading the address, 0xffffffff is returned and @err_ret will contain the error code.  */
u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret)
/* Reads a 32 bit integer from the address space of a given SDIO function. If there is a problem reading the address, 0xffffffff is returned and @err_ret will contain the error code.  */
u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret)
{
	int ret;
	if (err_ret)
		*err_ret = 0;
	ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 4);
	if (ret) {
		if (err_ret)
			*err_ret = ret;
		return 0xFFFFFFFF;
	}
	return le32_to_cpup((__le32 *)func->tmpbuf);
}