aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorhuisung.kang <hs1218.kang@samsung.com>2010-08-25 16:31:47 +0900
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:43:37 -0800
commit71bc27d31b44505989f39e07ed794c610d6fc2c9 (patch)
tree7328c72def9cb45d6b63a0a6fff29d0b459df85b /arch/arm
parent978d7ccbfb1325b9f0ba98638851b4ad055310a9 (diff)
downloadkernel_samsung_crespo-71bc27d31b44505989f39e07ed794c610d6fc2c9.zip
kernel_samsung_crespo-71bc27d31b44505989f39e07ed794c610d6fc2c9.tar.gz
kernel_samsung_crespo-71bc27d31b44505989f39e07ed794c610d6fc2c9.tar.bz2
S5PC110: SDHCI: Cleanup codes related to sdhci
This patch cleanup codes in arch/arm/mach-s5pv210/setup-sdhci.c We observe linux coding standard rules using 'checkpatch.pl' Change-Id: Iaae5cf775d5de09c3e9b5b4635e0d106f44941c5
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s5pv210/setup-sdhci.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/arch/arm/mach-s5pv210/setup-sdhci.c b/arch/arm/mach-s5pv210/setup-sdhci.c
index eb03275..fd8d77a 100644
--- a/arch/arm/mach-s5pv210/setup-sdhci.c
+++ b/arch/arm/mach-s5pv210/setup-sdhci.c
@@ -39,9 +39,11 @@ char *s5pv210_hsmmc_clksrcs[4] = {
};
#define S3C_SDHCI_CTRL3_FCSELTX_INVERT (0)
-#define S3C_SDHCI_CTRL3_FCSELTX_BASIC (S3C_SDHCI_CTRL3_FCSEL3 | S3C_SDHCI_CTRL3_FCSEL2)
+#define S3C_SDHCI_CTRL3_FCSELTX_BASIC \
+ (S3C_SDHCI_CTRL3_FCSEL3 | S3C_SDHCI_CTRL3_FCSEL2)
#define S3C_SDHCI_CTRL3_FCSELRX_INVERT (0)
-#define S3C_SDHCI_CTRL3_FCSELRX_BASIC (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0)
+#define S3C_SDHCI_CTRL3_FCSELRX_BASIC \
+ (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0)
void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
void __iomem *r,
@@ -59,13 +61,15 @@ void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
S3C_SDHCI_CTRL2_ENCLKOUTHOLD);
if (ios->clock <= (400 * 1000)) {
- ctrl2 &= ~(S3C_SDHCI_CTRL2_ENFBCLKTX | S3C_SDHCI_CTRL2_ENFBCLKRX);
+ ctrl2 &= ~(S3C_SDHCI_CTRL2_ENFBCLKTX |
+ S3C_SDHCI_CTRL2_ENFBCLKRX);
ctrl3 = 0;
} else {
u32 range_start;
u32 range_end;
- ctrl2 |= S3C_SDHCI_CTRL2_ENFBCLKTX | S3C_SDHCI_CTRL2_ENFBCLKRX;
+ ctrl2 |= S3C_SDHCI_CTRL2_ENFBCLKTX |
+ S3C_SDHCI_CTRL2_ENFBCLKRX;
if (card->type == MMC_TYPE_MMC) /* MMC */
range_start = 20 * 1000 * 1000;
@@ -86,44 +90,41 @@ void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
writel(ctrl3, r + S3C_SDHCI_CONTROL3);
}
-void s5pv210_adjust_sdhci_cfg_card(struct s3c_sdhci_platdata *pdata, void __iomem *r, int rw)
+void s5pv210_adjust_sdhci_cfg_card(struct s3c_sdhci_platdata *pdata,
+ void __iomem *r, int rw)
{
u32 ctrl2, ctrl3;
ctrl2 = readl(r + S3C_SDHCI_CONTROL2);
ctrl3 = readl(r + S3C_SDHCI_CONTROL3);
- if(rw == 0) {
+ if (rw == 0) {
pdata->rx_cfg++;
- if(pdata->rx_cfg == 1) {
+ if (pdata->rx_cfg == 1) {
ctrl2 |= S3C_SDHCI_CTRL2_ENFBCLKRX;
ctrl3 |= S3C_SDHCI_CTRL3_FCSELRX_BASIC;
- }
- else if(pdata->rx_cfg == 2) {
+ } else if (pdata->rx_cfg == 2) {
ctrl2 |= S3C_SDHCI_CTRL2_ENFBCLKRX;
ctrl3 &= ~S3C_SDHCI_CTRL3_FCSELRX_BASIC;
- }
- else if(pdata->rx_cfg == 3) {
- ctrl2 &= ~(S3C_SDHCI_CTRL2_ENFBCLKTX | S3C_SDHCI_CTRL2_ENFBCLKRX);
+ } else if (pdata->rx_cfg == 3) {
+ ctrl2 &= ~(S3C_SDHCI_CTRL2_ENFBCLKTX |
+ S3C_SDHCI_CTRL2_ENFBCLKRX);
pdata->rx_cfg = 0;
}
- }
- else if(rw == 1) {
+ } else if (rw == 1) {
pdata->tx_cfg++;
- if(pdata->tx_cfg == 1) {
- if(ctrl2 & S3C_SDHCI_CTRL2_ENFBCLKRX) {
+ if (pdata->tx_cfg == 1) {
+ if (ctrl2 & S3C_SDHCI_CTRL2_ENFBCLKRX) {
ctrl2 |= S3C_SDHCI_CTRL2_ENFBCLKTX;
ctrl3 |= S3C_SDHCI_CTRL3_FCSELTX_BASIC;
- }
- else
+ } else {
ctrl2 &= ~S3C_SDHCI_CTRL2_ENFBCLKTX;
- }
- else if(pdata->tx_cfg == 2) {
+ }
+ } else if (pdata->tx_cfg == 2) {
ctrl2 &= ~S3C_SDHCI_CTRL2_ENFBCLKTX;
pdata->tx_cfg = 0;
}
- }
- else {
+ } else {
printk(KERN_ERR "%s, unknown value rw:%d\n", __func__, rw);
return;
}