Commit 3c62f635 authored by Felipe Balbi's avatar Felipe Balbi Committed by Kevin Hilman

mmc: host: davinci: checkpatch.pl is our friend

Fix most of checkpatch.pl ERRORS with davinci_mmc.c. Also
fix up a few comments in the beggining of the file.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent c1e16f60
/* /*
* linux/drivers/mmc/davinci.c * davinci_mmc.c - TI DaVinci MMC controller file
*
* TI DaVinci MMC controller file
* *
* Copyright (C) 2006 Texas Instruments. * Copyright (C) 2006 Texas Instruments.
* *
...@@ -17,14 +15,14 @@ ...@@ -17,14 +15,14 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
Modifications: * Modifications:
ver. 1.0: Oct 2005, Purushotam Kumar Initial version * ver. 1.0: Oct 2005, Purushotam Kumar Initial version
ver 1.1: Nov 2005, Purushotam Kumar Solved bugs * ver 1.1: Nov 2005, Purushotam Kumar Solved bugs
ver 1.2: Jan 2006, Purushotam Kumar Added card remove insert support * ver 1.2: Jan 2006, Purushotam Kumar Added card remove insert support
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -45,14 +43,9 @@ ...@@ -45,14 +43,9 @@
#include "davinci_mmc.h" #include "davinci_mmc.h"
extern void davinci_clean_channel(int ch_no);
/* MMCSD Init clock in Hz in opendain mode */ /* MMCSD Init clock in Hz in opendain mode */
#define MMCSD_INIT_CLOCK 200000 #define MMCSD_INIT_CLOCK 200000
#define DRIVER_NAME "davinci_mmc" #define DRIVER_NAME "davinci_mmc"
#define TCINTEN (0x1<<20)
/* This macro could not be defined to 0 (ZERO) or -ve value. /* This macro could not be defined to 0 (ZERO) or -ve value.
* This value is multiplied to "HZ" * This value is multiplied to "HZ"
...@@ -93,7 +86,7 @@ static void mmc_davinci_start_command(struct mmc_davinci_host *host, ...@@ -93,7 +86,7 @@ static void mmc_davinci_start_command(struct mmc_davinci_host *host,
default: default:
s = ""; s = "";
break; break;
}; s;})); }; s; }));
host->cmd = cmd; host->cmd = cmd;
/* Protocol layer does not provide response type, /* Protocol layer does not provide response type,
...@@ -225,7 +218,6 @@ static void mmc_davinci_dma_cb(int lch, u16 ch_status, void *data) ...@@ -225,7 +218,6 @@ static void mmc_davinci_dma_cb(int lch, u16 ch_status, void *data)
} }
} }
#define DAVINCI_MMCSD_READ_FIFO(pDst, pRegs, cnt) asm( \ #define DAVINCI_MMCSD_READ_FIFO(pDst, pRegs, cnt) asm( \
" cmp %3,#16\n" \ " cmp %3,#16\n" \
"1: ldrhs r0,[%1,%2]\n" \ "1: ldrhs r0,[%1,%2]\n" \
...@@ -452,7 +444,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host, ...@@ -452,7 +444,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
/* This should always be true due to an earlier check */ /* This should always be true due to an earlier check */
acnt = 4; acnt = 4;
bcnt = mmcsd_cfg.rw_threshold>>2; bcnt = mmcsd_cfg.rw_threshold>>2;
num_frames = count >> ((mmcsd_cfg.rw_threshold == 32)? 5 : 4); num_frames = count >> ((mmcsd_cfg.rw_threshold == 32) ? 5 : 4);
} else if (count < mmcsd_cfg.rw_threshold) { } else if (count < mmcsd_cfg.rw_threshold) {
if ((count&3) == 0) { if ((count&3) == 0) {
acnt = 4; acnt = 4;
...@@ -468,7 +460,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host, ...@@ -468,7 +460,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
} else { } else {
acnt = 4; acnt = 4;
bcnt = mmcsd_cfg.rw_threshold>>2; bcnt = mmcsd_cfg.rw_threshold>>2;
num_frames = count >> ((mmcsd_cfg.rw_threshold == 32)? 5 : 4); num_frames = count >> ((mmcsd_cfg.rw_threshold == 32) ? 5 : 4);
dev_warn(mmc_dev(host->mmc), dev_warn(mmc_dev(host->mmc),
"MMC: count of 0x%x unsupported, truncating transfer\n", "MMC: count of 0x%x unsupported, truncating transfer\n",
count); count);
...@@ -574,7 +566,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host, ...@@ -574,7 +566,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
if ((data->blocks == 1) && (count > data->blksz)) if ((data->blocks == 1) && (count > data->blksz))
count = frame; count = frame;
ccnt = count >> ((mmcsd_cfg.rw_threshold == 32)? 5 : 4); ccnt = count >> ((mmcsd_cfg.rw_threshold == 32) ? 5 : 4);
if (sync_dev == host->txdma) if (sync_dev == host->txdma)
temp.src = (unsigned int)sg_dma_address(sg); temp.src = (unsigned int)sg_dma_address(sg);
...@@ -603,7 +595,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host, ...@@ -603,7 +595,7 @@ static int mmc_davinci_send_dma_request(struct mmc_davinci_host *host,
static void static void
mmc_davinci_prepare_data(struct mmc_davinci_host *host, struct mmc_request *req) mmc_davinci_prepare_data(struct mmc_davinci_host *host, struct mmc_request *req)
{ {
int fifo_lev = (mmcsd_cfg.rw_threshold == 32)? MMCFIFOCTL_FIFOLEV : 0; int fifo_lev = (mmcsd_cfg.rw_threshold == 32) ? MMCFIFOCTL_FIFOLEV : 0;
int timeout, sg_len; int timeout, sg_len;
host->data = req->data; host->data = req->data;
...@@ -830,7 +822,7 @@ static void mmc_davinci_cmd_done(struct mmc_davinci_host *host, ...@@ -830,7 +822,7 @@ static void mmc_davinci_cmd_done(struct mmc_davinci_host *host,
if (!cmd) { if (!cmd) {
dev_warn(mmc_dev(host->mmc), dev_warn(mmc_dev(host->mmc),
"%s(): No cmd ptr\n", __FUNCTION__); "%s(): No cmd ptr\n", __func__);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment