{
struct sdio_func *func = dev_to_sdio_func(wilc->dev);
sdio_cmd52_t cmd;
+ int ret;
/**
* Review: BIG ENDIAN
cmd.raw = 0;
cmd.address = 0x10c;
cmd.data = (u8)adr;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x10c data...\n");
goto _fail_;
}
cmd.address = 0x10d;
cmd.data = (u8)(adr >> 8);
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x10d data...\n");
goto _fail_;
}
cmd.address = 0x10e;
cmd.data = (u8)(adr >> 16);
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x10e data...\n");
goto _fail_;
}
{
struct sdio_func *func = dev_to_sdio_func(wilc->dev);
sdio_cmd52_t cmd;
+ int ret;
cmd.read_write = 1;
cmd.function = 0;
cmd.raw = 0;
cmd.address = 0x10;
cmd.data = (u8)block_size;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x10 data...\n");
goto _fail_;
}
cmd.address = 0x11;
cmd.data = (u8)(block_size >> 8);
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x11 data...\n");
goto _fail_;
}
{
struct sdio_func *func = dev_to_sdio_func(wilc->dev);
sdio_cmd52_t cmd;
+ int ret;
cmd.read_write = 1;
cmd.function = 0;
cmd.raw = 0;
cmd.address = 0x110;
cmd.data = (u8)block_size;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x110 data...\n");
goto _fail_;
}
cmd.address = 0x111;
cmd.data = (u8)(block_size >> 8);
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Failed cmd52, set 0x111 data...\n");
goto _fail_;
}
cmd.raw = 0;
cmd.address = addr;
cmd.data = data;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev,
"Failed cmd 52, read reg (%08x) ...\n", addr);
goto _fail_;
cmd.function = 0;
cmd.raw = 0;
cmd.address = addr;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev,
"Failed cmd 52, read reg (%08x) ...\n", addr);
goto _fail_;
{
struct sdio_func *func = dev_to_sdio_func(wilc->dev);
sdio_cmd52_t cmd;
- int loop;
+ int loop, ret;
u32 chipid;
memset(&g_sdio, 0, sizeof(wilc_sdio_t));
cmd.raw = 1;
cmd.address = 0x100;
cmd.data = 0x80;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Fail cmd 52, enable csa...\n");
goto _fail_;
}
cmd.raw = 1;
cmd.address = 0x2;
cmd.data = 0x2;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev,
"Fail cmd 52, set IOE register...\n");
goto _fail_;
loop = 3;
do {
cmd.data = 0;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev,
"Fail cmd 52, get IOR register...\n");
goto _fail_;
cmd.raw = 1;
cmd.address = 0x4;
cmd.data = 0x3;
- if (!wilc_sdio_cmd52(wilc, &cmd)) {
+ ret = wilc_sdio_cmd52(wilc, &cmd);
+ if (ret) {
dev_err(&func->dev, "Fail cmd 52, set IEN register...\n");
goto _fail_;
}
static int sdio_read_size(struct wilc *wilc, u32 *size)
{
-
u32 tmp;
sdio_cmd52_t cmd;
cmd.data = reg;
ret = wilc_sdio_cmd52(wilc, &cmd);
- if (!ret) {
+ if (ret) {
dev_err(&func->dev,
"Failed cmd52, set 0xf8 data (%d) ...\n",
__LINE__);
cmd.data = BIT(i);
ret = wilc_sdio_cmd52(wilc, &cmd);
- if (!ret) {
+ if (ret) {
dev_err(&func->dev,
"Failed cmd52, set 0xf8 data (%d) ...\n",
__LINE__);
cmd.address = 0xf6;
cmd.data = vmm_ctl;
ret = wilc_sdio_cmd52(wilc, &cmd);
- if (!ret) {
+ if (ret) {
dev_err(&func->dev,
"Failed cmd52, set 0xf6 data (%d) ...\n",
__LINE__);