Some cleanups and fixes for the MXS MMC subsystem
cover Some cleanups and fixes for the MXS MMC subsystem
Lothar Wa??mann (5):
Fix grammatical error in comment
Some cleanups for the MMC driver
Add support for SSP/MMC ports 2 & 3
Check the return codes of clk_enable() and mxs_reset_block() Add an appropriate MODULE_ALIAS
arch/arm/mach-mxs/clock-mx28.c | 6 ++- arch/arm/mach-mxs/devices/platform-mxs-mmc.c | 2 + drivers/mmc/host/mxs-mmc.c | 84 +++++++++++++++---------- 3 files changed, 57 insertions(+), 35 deletions(-)
PATCH 1/5 Fix grammatical error in comment
--- arch/arm/mach-mxs/clock-mx28.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-mxs/clock-mx28.c +1 -1
@@ -554,7 +554,7 @@ static struct clk rtc_clk = { .parent = &ref_xtal_clk, }; -/* usb_clk gate is controlled in DIGCTRL other than CLKCTRL */ +/* usb_clk gate is controlled in DIGCTRL rather than CLKCTRL */ static struct clk usb0_clk = { .enable_reg =DIGCTRL_BASE_ADDR , .enable_shift =2 ,
Signature · 1 line
1.5.6.5
PATCH 2/5 Some cleanups for the MMC driver
- Remove bogus parens around numerical arguments in #define's
- When defining bit masks, use the #def for the shift count instead of repeating the numbers
- Remove bogus whitespace in indentation
- Remove 'break' at end of switch statement
--- drivers/mmc/host/mxs-mmc.c | 57 +++++++++++++++++++++---------------------- 1 files changed, 28 insertions(+), 29 deletions(-)
drivers/mmc/host/mxs-mmc.c +28 -29
@@ -47,7 +47,7 @@#define DRIVER_NAME "mxs-mmc"/* card detect polling timeout */ -#define MXS_MMC_DETECT_TIMEOUT (HZ/2) +#define MXS_MMC_DETECT_TIMEOUT (HZ / 2)#define SSP_VERSION_LATEST 4#define ssp_is_old () (host->version < SSP_VERSION_LATEST)
@@ -59,39 +59,39 @@#define BM_SSP_CTRL0_IGNORE_CRC (1 << 26)#define BM_SSP_CTRL0_READ (1 << 25)#define BM_SSP_CTRL0_DATA_XFER (1 << 24) -#define BP_SSP_CTRL0_BUS_WIDTH (22) -#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << 22) +#define BP_SSP_CTRL0_BUS_WIDTH 22 +#define BM_SSP_CTRL0_BUS_WIDTH (0x3 << BP_SSP_CTRL0_BUS_WIDTH)#define BM_SSP_CTRL0_WAIT_FOR_IRQ (1 << 21)#define BM_SSP_CTRL0_LONG_RESP (1 << 19)#define BM_SSP_CTRL0_GET_RESP (1 << 17)#define BM_SSP_CTRL0_ENABLE (1 << 16) -#define BP_SSP_CTRL0_XFER_COUNT (0) -#define BM_SSP_CTRL0_XFER_COUNT (0xffff) +#define BP_SSP_CTRL0_XFER_COUNT 0 +#define BM_SSP_CTRL0_XFER_COUNT 0xffff#define HW_SSP_CMD0 0x010#define BM_SSP_CMD0_DBL_DATA_RATE_EN (1 << 25)#define BM_SSP_CMD0_SLOW_CLKING_EN (1 << 22)#define BM_SSP_CMD0_CONT_CLKING_EN (1 << 21)#define BM_SSP_CMD0_APPEND_8CYC (1 << 20) -#define BP_SSP_CMD0_BLOCK_SIZE (16) -#define BM_SSP_CMD0_BLOCK_SIZE (0xf << 16) -#define BP_SSP_CMD0_BLOCK_COUNT (8) -#define BM_SSP_CMD0_BLOCK_COUNT (0xff << 8) -#define BP_SSP_CMD0_CMD (0) -#define BM_SSP_CMD0_CMD (0xff) +#define BP_SSP_CMD0_BLOCK_SIZE 16 +#define BM_SSP_CMD0_BLOCK_SIZE (0xf << BP_SSP_CMD0_BLOCK_SIZE) +#define BP_SSP_CMD0_BLOCK_COUNT 8 +#define BM_SSP_CMD0_BLOCK_COUNT (0xff << BP_SSP_CMD0_BLOCK_COUNT) +#define BP_SSP_CMD0_CMD 0 +#define BM_SSP_CMD0_CMD 0xff#define HW_SSP_CMD1 0x020#define HW_SSP_XFER_SIZE 0x030#define HW_SSP_BLOCK_SIZE 0x040 -#define BP_SSP_BLOCK_SIZE_BLOCK_COUNT (4) -#define BM_SSP_BLOCK_SIZE_BLOCK_COUNT (0xffffff << 4) -#define BP_SSP_BLOCK_SIZE_BLOCK_SIZE (0) -#define BM_SSP_BLOCK_SIZE_BLOCK_SIZE (0xf) +#define BP_SSP_BLOCK_SIZE_BLOCK_COUNT 4 +#define BM_SSP_BLOCK_SIZE_BLOCK_COUNT (0xffffff << BP_SSP_BLOCK_SIZE_BLOCK_COUNT) +#define BP_SSP_BLOCK_SIZE_BLOCK_SIZE 0 +#define BM_SSP_BLOCK_SIZE_BLOCK_SIZE 0xf#define HW_SSP_TIMING (ssp_is_old() ? 0x050 : 0x070) -#define BP_SSP_TIMING_TIMEOUT (16) -#define BM_SSP_TIMING_TIMEOUT (0xffff << 16) -#define BP_SSP_TIMING_CLOCK_DIVIDE (8) -#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << 8) -#define BP_SSP_TIMING_CLOCK_RATE (0) -#define BM_SSP_TIMING_CLOCK_RATE (0xff) +#define BP_SSP_TIMING_TIMEOUT 16 +#define BM_SSP_TIMING_TIMEOUT (0xffff << BP_SSP_TIMING_TIMEOUT) +#define BP_SSP_TIMING_CLOCK_DIVIDE 8 +#define BM_SSP_TIMING_CLOCK_DIVIDE (0xff << BP_SSP_TIMING_CLOCK_DIVIDE) +#define BP_SSP_TIMING_CLOCK_RATE 0 +#define BM_SSP_TIMING_CLOCK_RATE 0xff#define HW_SSP_CTRL1 (ssp_is_old() ? 0x060 : 0x080)#define BM_SSP_CTRL1_SDIO_IRQ (1 << 31)#define BM_SSP_CTRL1_SDIO_IRQ_EN (1 << 30)
@@ -111,10 +111,10 @@#define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN (1 << 14)#define BM_SSP_CTRL1_DMA_ENABLE (1 << 13)#define BM_SSP_CTRL1_POLARITY (1 << 9) -#define BP_SSP_CTRL1_WORD_LENGTH (4) -#define BM_SSP_CTRL1_WORD_LENGTH (0xf << 4) -#define BP_SSP_CTRL1_SSP_MODE (0) -#define BM_SSP_CTRL1_SSP_MODE (0xf) +#define BP_SSP_CTRL1_WORD_LENGTH 4 +#define BM_SSP_CTRL1_WORD_LENGTH (0xf << BP_SSP_CTRL1_WORD_LENGTH) +#define BP_SSP_CTRL1_SSP_MODE 0 +#define BM_SSP_CTRL1_SSP_MODE 0xf#define HW_SSP_SDRESP0 (ssp_is_old() ? 0x080 : 0x0a0)#define HW_SSP_SDRESP1 (ssp_is_old() ? 0x090 : 0x0b0)#define HW_SSP_SDRESP2 (ssp_is_old() ? 0x0a0 : 0x0c0)
@@ -123,7 +123,7 @@#define BM_SSP_STATUS_CARD_DETECT (1 << 28)#define BM_SSP_STATUS_SDIO_IRQ (1 << 17)#define HW_SSP_VERSION (cpu_is_mx23() ? 0x110 : 0x130) -#define BP_SSP_VERSION_MAJOR (24) +#define BP_SSP_VERSION_MAJOR 24#define BF_SSP (value, field) (((value) << BP_SSP_##field) & BM_SSP_##field)
@@ -151,7 +151,7 @@ struct mxs_mmc_host {struct clk *clk;unsigned int clk_rate; -struct dma_chan *dmach; +struct dma_chan *dmach;struct mxs_dma_data dma_data;unsigned int dma_dir;u32 ssp_pio_words[SSP_PIO_NUM ];
@@ -277,7 +277,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) stat =readl (host->base +HW_SSP_CTRL1 );writel (stat &MXS_MMC_IRQ_BITS , - host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR ); + host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR );if ((stat &BM_SSP_CTRL1_SDIO_IRQ ) && (stat &BM_SSP_CTRL1_SDIO_IRQ_EN ))mmc_signal_sdio_irq (host->mmc);
@@ -550,7 +550,6 @@ static void mxs_mmc_start_cmd(struct mxs_mmc_host *host,default :dev_warn (mmc_dev (host->mmc),"%s: unknown MMC command\n" , __func__); -break ; } }
Signature · 1 line
1.5.6.5
PATCH 3/5 Add support for SSP/MMC ports 2 & 3
i.MX28 has four SSP/MMC units, only two of which are currently usable.
--- arch/arm/mach-mxs/clock-mx28.c | 4 ++++ arch/arm/mach-mxs/devices/platform-mxs-mmc.c | 2 ++ 2 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-mxs/clock-mx28.c +4 -0
@@ -625,6 +625,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk) _REGISTER_CLOCK("mxs-mmc.0", NULL, ssp0_clk) _REGISTER_CLOCK("mxs-mmc.1", NULL, ssp1_clk) + _REGISTER_CLOCK("mxs-mmc.2", NULL, ssp2_clk) + _REGISTER_CLOCK("mxs-mmc.3", NULL, ssp3_clk) _REGISTER_CLOCK("flexcan.0", NULL, can0_clk) _REGISTER_CLOCK("flexcan.1", NULL, can1_clk)_REGISTER_CLOCK (NULL ,"usb0" , usb0_clk)
@@ -774,6 +776,8 @@ int __init mx28_clocks_init(void)*/ clk_set_parent (&ssp0_clk, &ref_io0_clk);clk_set_parent (&ssp1_clk, &ref_io0_clk); +clk_set_parent (&ssp2_clk, &ref_io1_clk); +clk_set_parent (&ssp3_clk, &ref_io1_clk);clk_enable (&cpu_clk);clk_enable (&hbus_clk);
arch/arm/mach-mxs/devices/platform-mxs-mmc.c +2 -0
@@ -41,6 +41,8 @@ const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst = {const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[]__initconst = {mxs_mxs_mmc_data_entry (MX28 ,0 ,0 ),mxs_mxs_mmc_data_entry (MX28 ,1 ,1 ), +mxs_mxs_mmc_data_entry (MX28 ,2 ,2 ), +mxs_mxs_mmc_data_entry (MX28 ,3 ,3 ), };#endif
Signature · 1 line
1.5.6.5
PATCH 4/5 Check the return codes of clk_enable() and mxs_reset_block()
Add an int return value to mxs_mmc_reset(), so that the return code of mxs_reset_block() can be promoted to the caller.
Also check the return code of clk_enable() in the probe function.
--- drivers/mmc/host/mxs-mmc.c | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-)
drivers/mmc/host/mxs-mmc.c +21 -5
@@ -185,11 +185,14 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc) BM_SSP_STATUS_CARD_DETECT); } -static void mxs_mmc_reset (struct mxs_mmc_host *host) +static int mxs_mmc_reset (struct mxs_mmc_host *host) { +int ret;u32 ctrl0, ctrl1; -mxs_reset_block (host->base); + ret =mxs_reset_block (host->base); +if (ret) +return ret; ctrl0 =BM_SSP_CTRL0_IGNORE_CRC ; ctrl1 = BF_SSP(0x3, CTRL1_SSP_MODE) |
@@ -214,6 +217,7 @@ static void mxs_mmc_reset(struct mxs_mmc_host *host)writel (ctrl0, host->base +HW_SSP_CTRL0 );writel (ctrl1, host->base +HW_SSP_CTRL1 ); +return 0 ; } static void mxs_mmc_start_cmd(struct mxs_mmc_host *host,
@@ -712,9 +716,19 @@ static int mxs_mmc_probe(struct platform_device *pdev) ret =PTR_ERR (host->clk); goto out_iounmap; } -clk_enable (host->clk); + ret =clk_enable (host->clk); +if (ret) { +dev_err (mmc_dev (host->mmc), +"%s: failed to enable clock: %d\n" , __func__, ret); + goto out_clk_put; + } -mxs_mmc_reset (host); + ret =mxs_mmc_reset (host); +if (ret) { +dev_err (mmc_dev (host->mmc), +"%s: failed to reset controller: %d\n" , __func__, ret); + goto out_clk_put; + }dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask);
@@ -829,7 +843,9 @@ static int mxs_mmc_resume(struct device *dev)struct mxs_mmc_host *host =mmc_priv (mmc);int ret =0 ; -clk_enable (host->clk); + ret =clk_enable (host->clk); +if (ret) +return ret; ret =mmc_resume_host (mmc);
Signature · 1 line
1.5.6.5
PATCH 5/5 Add an appropriate MODULE_ALIAS
--- drivers/mmc/host/mxs-mmc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mmc/host/mxs-mmc.c +1 -0
@@ -886,3 +886,4 @@ module_exit(mxs_mmc_exit);MODULE_DESCRIPTION ("FREESCALE MXS MMC peripheral" );MODULE_AUTHOR ("Freescale Semiconductor" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:mxs-mmc" );
Signature · 1 line
1.5.6.5
Re: [MXS MMC 5/5] Add an appropriate MODULE_ALIAS
Quoted 2 lines · Lothar Wa?mann
Signed-off-by Lothar Wa?mann <[email protected]>
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111206/fddccdcf/attachment.sig>
Re: [MXS MMC 5/5] Add an appropriate MODULE_ALIAS
In reply to Lothar WaßmannQuoted 11 lines · Lothar Waßmann
Signed-off-by Lothar Waßmann <[email protected]>--- drivers/mmc/host/mxs-mmc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/mmc/host/mxs-mmc.c +0
-0
drivers/mmc/host/mxs-mmc.c module_exit(mxs_mmc_exit); · line 889
Quoted 4 lines
drivers/mmc/host/mxs-mmc.c +1
-0@@ -886,3 +886,4 @@ module_exit(mxs_mmc_exit);MODULE_DESCRIPTION ("FREESCALE MXS MMC peripheral" );MODULE_AUTHOR ("Freescale Semiconductor" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:mxs-mmc" );
Signature · 2 lines
Regards, Shawn
Re: [MXS MMC 4/5] Check the return codes of clk_enable() and mxs_reset_block()
In reply to Lothar WaßmannQuoted 10 lines · Lothar Wa?mann
Add an int return value to
mxs_mmc_reset(), so that the return code ofmxs_reset_block()can be promoted to the caller.
Also check the return code ofclk_enable()in the probe function.Signed-off-by Lothar Wa?mann <[email protected]>drivers/mmc/host/mxs-mmc.c +4
-1-clk_enable (host->clk); + ret =clk_enable (host->clk); +if (ret) { +dev_err (mmc_dev (host->mmc), +"%s: failed to enable clock: %d\n" , __func__, ret);
drivers/mmc/host/mxs-mmc.c static int mxs_mmc_probe(struct platform_device *pdev) · line 731
Quoted 10 lines
drivers/mmc/host/mxs-mmc.c +8
-1+ goto out_clk_put; + } -mxs_mmc_reset (host); + ret =mxs_mmc_reset (host); +if (ret) { +dev_err (mmc_dev (host->mmc), +"%s: failed to reset controller: %d\n" , __func__, ret); + goto out_clk_put; + }
Why __func__ here? dev_err and the msg itself should be indication enough?
Otherwise
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111206/f88dc302/attachment.sig>
Re: [MXS MMC 4/5] Check the return codes of clk_enable() and mxs_reset_block()
In reply to Lothar WaßmannQuoted 5 lines · Lothar Waßmann
Add an int return value to
mxs_mmc_reset(), so that the return code ofmxs_reset_block()can be promoted to the caller.
Also check the return code ofclk_enable()in the probe function.Signed-off-by Lothar Waßmann <[email protected]>
Signature · 2 lines
Regards, Shawn
Re: [MXS MMC 3/5] Add support for SSP/MMC ports 2 & 3
In reply to Lothar WaßmannQuoted 4 lines · Lothar Wa?mann
i.MX28 has four SSP/MMC units, only two of which are currently usable.
Signed-off-by Lothar Wa?mann <[email protected]>
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111206/0b8fba37/attachment.sig>
Shawn Guo
AppliedRe: [MXS MMC 3/5] Add support for SSP/MMC ports 2 & 3
In reply to Lothar WaßmannQuoted 4 lines · Lothar Waßmann
i.MX28 has four SSP/MMC units, only two of which are currently usable.
Signed-off-by Lothar Waßmann <[email protected]>
Applied, thanks.
Please add prefix 'ARM: mxs:' or 'arm/mxs' to make the patch look like the below in the future submission.
[PATCH 3/5] ARM: mxs: Add support for SSP/MMC ports 2 & 3
I fixed it this time.
Signature · 2 lines
Regards, Shawn
Re: [MXS MMC 2/5] Some cleanups for the MMC driver
In reply to Lothar WaßmannI'm fine with this cosmetic patch with the comments below addressed.
Quoted 3 lines · Lothar Waßmann
- Remove bogus parens around numerical arguments in #define's
- When defining bit masks, use the #def for the shift count instead of repeating the numbers
This change brings a few 'line over 80 characters' checkpatch warnings.
Quoted 9 lines
- Remove bogus whitespace in indentation
- Remove 'break' at end of switch statementSigned-off-by Lothar Waßmann <[email protected]>--- drivers/mmc/host/mxs-mmc.c | 57 +++++++++++++++++++++---------------------- 1 files changed, 28 insertions(+), 29 deletions(-)drivers/mmc/host/mxs-mmc.c +0
-0
[...]
drivers/mmc/host/mxs-mmc.c static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) · line 280
Quoted 5 lines
drivers/mmc/host/mxs-mmc.c +0
-1@@ -277,7 +277,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) stat =readl (host->base +HW_SSP_CTRL1 ); writel(stat & MXS_MMC_IRQ_BITS, - host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR );
This is an intended indentation with 7 spaces.
Regards,
Shawn
Quoted 1 line
drivers/mmc/host/mxs-mmc.c +1
-0+ host->base + HW_SSP_CTRL1 + MXS_CLR_ADDR);
Re: [MXS MMC 2/5] Some cleanups for the MMC driver
Hi,
Quoted 9 lines · Shawn Guo
I'm fine with this cosmetic patch with the comments below addressed.
Quoted 3 lines · Lothar Wa?mann
- Remove bogus parens around numerical arguments in #define's
- When defining bit masks, use the #def for the shift count instead of repeating the numbersThis change brings a few 'line over 80 characters' checkpatch warnings.
will fix.
Quoted 10 lines
Quoted 9 lines
- Remove bogus whitespace in indentation
- Remove 'break' at end of switch statementSigned-off-by Lothar Wa?mann <[email protected]>--- drivers/mmc/host/mxs-mmc.c | 57 +++++++++++++++++++++---------------------- 1 files changed, 28 insertions(+), 29 deletions(-)drivers/mmc/host/mxs-mmc.c +0
-0[...]
Quoted 8 lines
drivers/mmc/host/mxs-mmc.c static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) · line 280
Quoted 5 lines
drivers/mmc/host/mxs-mmc.c +0
-1@@ -277,7 +277,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) stat =readl (host->base +HW_SSP_CTRL1 ); writel(stat & MXS_MMC_IRQ_BITS, - host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR );This is an intended indentation with 7 spaces.
According to Documentation/CodingStyle spaces are never used for indentation (except in documentation, Kconfig and comments).
Lothar Wa?mann
Signature · 9 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________
Re: [MXS MMC 2/5] Some cleanups for the MMC driver
Quoted 26 lines · Lothar Waßmann
Hi,
Quoted 9 lines · Shawn Guo
I'm fine with this cosmetic patch with the comments below addressed.
Quoted 3 lines · Lothar Waßmann
- Remove bogus parens around numerical arguments in #define's
- When defining bit masks, use the #def for the shift count instead of repeating the numbersThis change brings a few 'line over 80 characters' checkpatch warnings.
will fix.
Quoted 12 lines
Quoted 9 lines
- Remove bogus whitespace in indentation
- Remove 'break' at end of switch statementSigned-off-by Lothar Waßmann <[email protected]>--- drivers/mmc/host/mxs-mmc.c | 57 +++++++++++++++++++++---------------------- 1 files changed, 28 insertions(+), 29 deletions(-)drivers/mmc/host/mxs-mmc.c +0
-0[...]
Quoted 2 lines
drivers/mmc/host/mxs-mmc.c +0
-0@@ -277,7 +277,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
Quoted 9 lines
Quoted 6 lines
drivers/mmc/host/mxs-mmc.c static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) · line 280
Quoted 3 lines
drivers/mmc/host/mxs-mmc.c +0
-1stat =readl (host->base +HW_SSP_CTRL1 ); writel(stat & MXS_MMC_IRQ_BITS, - host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR );This is an intended indentation with 7 spaces.
According to
Documentation/CodingStylespaces are never used for indentation (except in documentation,Kconfigand comments).
Such nice indentation is all over this driver and even kernel tree. You may want to leave it as it is or fix them all over the driver.
Signature · 2 lines
Regards, Shawn
Re: [MXS MMC 2/5] Some cleanups for the MMC driver
In reply to Lothar WaßmannQuoted 26 lines · Lothar Wa?mann
Hi,
Quoted 9 lines · Shawn Guo
I'm fine with this cosmetic patch with the comments below addressed.
Quoted 3 lines · Lothar Wa?mann
- Remove bogus parens around numerical arguments in #define's
- When defining bit masks, use the #def for the shift count instead of repeating the numbersThis change brings a few 'line over 80 characters' checkpatch warnings.
will fix.
Quoted 12 lines
Quoted 9 lines
- Remove bogus whitespace in indentation
- Remove 'break' at end of switch statementSigned-off-by Lothar Wa?mann <[email protected]>--- drivers/mmc/host/mxs-mmc.c | 57 +++++++++++++++++++++---------------------- 1 files changed, 28 insertions(+), 29 deletions(-)drivers/mmc/host/mxs-mmc.c +0
-0[...]
Quoted 2 lines
drivers/mmc/host/mxs-mmc.c +0
-0@@ -277,7 +277,7 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
Quoted 8 lines
Quoted 6 lines
drivers/mmc/host/mxs-mmc.c static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) · line 280
Quoted 3 lines
drivers/mmc/host/mxs-mmc.c +0
-1stat =readl (host->base +HW_SSP_CTRL1 ); writel(stat & MXS_MMC_IRQ_BITS, - host->base +HW_SSP_CTRL1 +MXS_CLR_ADDR );This is an intended indentation with 7 spaces.
According to
Documentation/CodingStylespaces are never used for indentation (except in documentation,Kconfigand comments).
AFAIK "don't use spaces" only applies to the first line of a statement. When breaking long lines using spaces to align to the containing parenthesis is quite common (though I don't like it personally).
The rule for follow-up lines is only: Descendants are always substantially shorter than the parent and are placed substantially to the right.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [MXS MMC 1/5] Fix grammatical error in comment
In reply to Lothar WaßmannQuoted 2 lines · Lothar Wa?mann
Signed-off-by Lothar Wa?mann <[email protected]>
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111206/8eeada94/attachment-0001.sig>
Re: [MXS MMC 1/5] Fix grammatical error in comment
In reply to Lothar WaßmannQuoted 12 lines · Lothar Waßmann
Signed-off-by Lothar Waßmann <[email protected]>--- arch/arm/mach-mxs/clock-mx28.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-mxs/clock-mx28.c +0
-0
arch/arm/mach-mxs/clock-mx28.c static struct clk rtc_clk = { · line 560
Quoted 8 lines
arch/arm/mach-mxs/clock-mx28.c +1
-1@@ -554,7 +554,7 @@ static struct clk rtc_clk = { .parent = &ref_xtal_clk, }; -/* usb_clk gate is controlled in DIGCTRL other than CLKCTRL */ +/* usb_clk gate is controlled in DIGCTRL rather than CLKCTRL */ static struct clk usb0_clk = { .enable_reg =DIGCTRL_BASE_ADDR , .enable_shift =2 ,
Signature · 2 lines
Regards, Shawn