[PATCH] nand: Fix S3C NAND clock stop

Artem Bityutskiy dedekind1 at gmail.com
Tue Apr 12 23:36:24 EDT 2011


On Mon, 2011-04-11 at 16:48 +0200, Jiri Pinkava wrote:
> Current implementation of s3c2410_nand_select_chip call
> clk_disable every time when chip = -1 (de-select). This happend
> multiple times even if chip was already de-selected. This causes
> disabling clock even if they are already disabled and due to
> nature of clock subsytem implementation this causes nand clock
> to be disabled and newer enabled again.
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava at vscht.cz>
> ---
>  drivers/mtd/nand/s3c2410.c |   59 ++++++++++++++++++++++++++++++++------------
>  1 files changed, 43 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
> index 33d832d..cea775a 100644
> --- a/drivers/mtd/nand/s3c2410.c
> +++ b/drivers/mtd/nand/s3c2410.c
> @@ -55,7 +55,7 @@ static int hardware_ecc = 0;
>  #endif
>  
>  #ifdef CONFIG_MTD_NAND_S3C2410_CLKSTOP
> -static int clock_stop = 1;
> +static const int clock_stop = 1;
>  #else
>  static const int clock_stop = 0;
>  #endif

Please, kill clock_stop variable completely in a separate patch.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list