lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SEYPR06MB7072929C8CA435855ACC3A04957CA@SEYPR06MB7072.apcprd06.prod.outlook.com>
Date: Fri, 20 Jun 2025 08:18:19 +0000
From: Cool Lee <cool_lee@...eedtech.com>
To: Andrew Jeffery <andrew@...econstruct.com.au>, "adrian.hunter@...el.com"
	<adrian.hunter@...el.com>, "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
	"joel@....id.au" <joel@....id.au>, "p.zabel@...gutronix.de"
	<p.zabel@...gutronix.de>, "linux-aspeed@...ts.ozlabs.org"
	<linux-aspeed@...ts.ozlabs.org>, "openbmc@...ts.ozlabs.org"
	<openbmc@...ts.ozlabs.org>, "linux-mmc@...r.kernel.org"
	<linux-mmc@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, BMC-SW <BMC-SW@...eedtech.com>
Subject: RE: [PATCH 4/8] mmc: sdhci-of-aspeed: Get max clockk by using default
 api


> > Don't limit clock frequency by f_max.
> >
> > Signed-off-by: Cool Lee <cool_lee@...eedtech.com>
> > ---
> >  drivers/mmc/host/sdhci-of-aspeed.c | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-of-aspeed.c
> > b/drivers/mmc/host/sdhci-of-aspeed.c
> > index 10160a706334..2bdd93a3f91f 100644
> > --- a/drivers/mmc/host/sdhci-of-aspeed.c
> > +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> > @@ -288,14 +288,6 @@ static void aspeed_sdhci_set_clock(struct
> > sdhci_host *host, unsigned int clock)
> >         sdhci_enable_clk(host, clk);
> >  }
> >
> > -static unsigned int aspeed_sdhci_get_max_clock(struct sdhci_host
> > *host) -{
> > -       if (host->mmc->f_max)
> > -               return host->mmc->f_max;
> > -
> > -       return sdhci_pltfm_clk_get_max_clock(host);
> > -}
> > -
> >  static void aspeed_sdhci_set_bus_width(struct sdhci_host *host, int
> > width)
> >  {
> >         struct sdhci_pltfm_host *pltfm_priv; @@ -446,7 +438,7 @@
> > static int aspeed_sdhci_execute_tuning(struct sdhci_host *host, u32
> > opcode)
> >  static const struct sdhci_ops aspeed_sdhci_ops = {
> >         .read_l = aspeed_sdhci_readl,
> >         .set_clock = aspeed_sdhci_set_clock,
> > -       .get_max_clock = aspeed_sdhci_get_max_clock,
> > +       .get_max_clock = sdhci_pltfm_clk_get_max_clock,
> 
> This was used to limit the maximum bus speed via the devicetree. See:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=
> v6.16-rc2&id=0a0e8d7501cda79c9b20f6011814e2ec9b473ade
> 
> Why remove it? There's no discussion of the motivation in the commit
> message.
Yes, you're right. There is no need to change this. I will remove this.
My original thinking is changing to use default sdhci_set_clock and sdhci_get_max_clock that we can simplify the code.
But the aspeed_sdhci_set_clock handles different divider by legacy projects, so I keep that but just missed the get_max_clock.

> 
> Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ