RE: [PATCH RFT] mmc: host: renesas_sdhi: Fix the actual clock

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

 



Hi Geert,

Thanks for the feedback.

> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: 18 August 2025 12:00
> Subject: Re: [PATCH RFT] mmc: host: renesas_sdhi: Fix the actual clock
> 
> Hi Biju,
> 
> On Sun, 29 Jun 2025 at 22:39, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > Wrong actual clock reported, if the SD clock division ratio is other
> > than 1:1(bits DIV[7:0] in SD_CLK_CTRL are set to 11111111).
> >
> > On high speed mode, cat /sys/kernel/debug/mmc1/ios Without the patch:
> > clock:          50000000 Hz
> > actual clock:   200000000 Hz
> >
> > After the fix:
> > clock:          50000000 Hz
> > actual clock:   50000000 Hz
> >
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> 
> Thanks for your patch!
> 
> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > @@ -222,7 +222,11 @@ static void renesas_sdhi_set_clock(struct tmio_mmc_host *host,
> >                         clk &= ~0xff;
> >         }
> >
> > -       sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & CLK_CTL_DIV_MASK);
> > +       clock = clk & CLK_CTL_DIV_MASK;
> > +       if (clock != 0xff)
> 
> Perhaps CLK_CTL_DIV_MASK?

I will send a new patch for replacing magic number with the 
CLK_CTL_DIV_MASK macro as this patch is applied to mmc/next.

Cheers,
Biju






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux