Re: [PATCH v2 06/14] mci: core: save the set clock as actual_clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14.03.24 19:47, Steffen Trumtrar wrote:
> Linux mmc_host saves the actual_clock set on the HC. Do the same to use
> it later.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>

Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>

> ---
>  drivers/mci/mci-core.c | 2 ++
>  include/mci.h          | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index 2b39985d5e..6c473d21bf 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -867,6 +867,8 @@ static void mci_set_ios(struct mci *mci)
>  	};
>  
>  	host->set_ios(host, &ios);
> +
> +	host->actual_clock = host->clock;
>  }
>  
>  /**
> diff --git a/include/mci.h b/include/mci.h
> index 91460b7ef6..fe0bd26888 100644
> --- a/include/mci.h
> +++ b/include/mci.h
> @@ -460,6 +460,7 @@ struct mci_host {
>  	unsigned f_min;		/**< host interface lower limit */
>  	unsigned f_max;		/**< host interface upper limit */
>  	unsigned clock;		/**< Current clock used to talk to the card */
> +	unsigned actual_clock;

/**< Clock used to talk to card, before ios set  */ would be a suitable comment,
but that can be squashed later as a fixup.

>  	enum mci_bus_width bus_width;	/**< used data bus width to the card */
>  	enum mci_timing timing;	/**< used timing specification to the card */
>  	unsigned max_req_size;
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux