U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Pratyush Yadav <p.yadav@ti.com>
Cc: u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>
Subject: Re: [v2 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig
Date: Mon, 11 Apr 2022 15:30:20 -0400	[thread overview]
Message-ID: <20220411193020.GM14282@bill-the-cat> (raw)
In-Reply-To: <20220411190542.y4mw5mm4ty3reyut@ti.com>

[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]

On Tue, Apr 12, 2022 at 12:35:42AM +0530, Pratyush Yadav wrote:
> On 08/04/22 10:47AM, Tom Rini wrote:
> > On Thu, Mar 31, 2022 at 03:35:26PM -0400, Tom Rini wrote:
> > 
> > > This is a little tricky since SoCFPGA has code to determine this as
> > > runtime.  Introduce a guard variable for platforms to select if they
> > > have a static value to use.  Then for ARCH_SOCFPGA, call
> > > cm_get_qspi_controller_clk_hz() and otherwise continue the previous
> > > behavior.
> > > 
> > > Cc: Jagan Teki <jagan@amarulasolutions.com>
> > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > 
> > OK, so there's a problem with using IS_ENABLED(..) which is that we get
> > a failure to build in the not-enabled case over CONFIG_CQSPI_REF_CLK
> > being unset.  And then we can't use if (CONFIG_VAL(..)) because we then
> > run in to needing it to exist for SPL as well.  I'm going to go back to
> > v1 of this particular patch.
> 
> Interesting! I remember trying the IS_ENABLED() thing a while back, and 
> I remember it working fine when the functions don't exist if the config 
> is not enabled. I figured that was because of the compiler eliminating 
> dead code. But I think here it is the preprocessor raising the error and 
> maybe it is not so smart. Dunno.
> 
> Anyway, I am fine with reverting this to v1 for now. I'll try to look at 
> it later if I ever get some time to spare.

Right, dead code elimination works fine since it's a reference to
function that's never called so we don't fail to link.  But if we don't
have a static value available, it fails to compile outright.  And there
wasn't a clean way I could see to use a default of 0 and have it work.
But the final part was that it was TI platforms, and I think just 2
others, that even set a static value here and you said TI ones should
just not set the value.  So I think the next reasonable clean-up might
be to just drop the static value case (and cc the board maintainers for
the other users), and only support the SoCFPGA one as being special.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-04-11 19:30 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 22:07 [PATCH 01/25] Convert CONFIG_BOARD_SIZE_LIMIT to Kconfig Tom Rini
2022-03-30 22:07 ` [PATCH 02/25] mvebu: Move BOOTROM_ERR_REG out of CONFIG namespace Tom Rini
2022-03-31  8:58   ` Stefan Roese
2022-04-08 18:02   ` Tom Rini
2022-03-30 22:07 ` [PATCH 03/25] tegra: Migrate CI_UDC_HAS_HOSTPC to Kconfig Tom Rini
2022-04-01 16:21   ` Peter Robinson
2022-04-08 18:02   ` Tom Rini
2022-03-30 22:07 ` [PATCH 04/25] Convert CONFIG_CMDLINE_PS_SUPPORT " Tom Rini
2022-04-08 18:02   ` Tom Rini
2022-03-30 22:07 ` [PATCH 05/25] arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h Tom Rini
2022-04-08 18:02   ` Tom Rini
2022-03-30 22:07 ` [PATCH 06/25] s5p_goni, smdkc100: Move some environment settings out of CONFIG Tom Rini
2022-04-04  4:19   ` Minkyu Kang
2022-04-08 18:02   ` Tom Rini
2022-04-22 12:04   ` Jaehoon Chung
2022-03-30 22:07 ` [PATCH 07/25] MPC837XERDB: Stop using CONFIG_RAMDISKFILE Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 08/25] corvus: Migrate CONFIG_*_LED out of CONFIG namespace Tom Rini
2022-03-31  4:19   ` Heiko Schocher
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 09/25] stm32f429-discovery: " Tom Rini
2022-03-31  7:20   ` Patrice CHOTARD
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 10/25] at91: Remove unused LED code Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 11/25] Convert CONFIG_CONS_SCIF0 et al to Kconfig Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 12/25] Convert CONFIG_SH_SCIF_CLK_FREQ " Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK " Tom Rini
2022-03-31 16:30   ` Pratyush Yadav
2022-03-31 17:41     ` Tom Rini
2022-03-31 18:54       ` Pratyush Yadav
2022-03-31 19:35   ` [v2 " Tom Rini
2022-03-31 19:43     ` Pratyush Yadav
2022-04-08 14:47     ` Tom Rini
2022-04-11 19:05       ` Pratyush Yadav
2022-04-11 19:30         ` Tom Rini [this message]
2022-04-08 18:05   ` [PATCH " Tom Rini
2022-03-30 22:07 ` [PATCH 14/25] controlcenterdc: Migrate CUSTOMER_BOARD_SUPPORT " Tom Rini
2022-03-31  9:00   ` Stefan Roese
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 15/25] tegra: Drop CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 16/25] microblaze: Migrate DCACHE/ICACHE to Kconfig Tom Rini
2022-03-31  5:42   ` Michal Simek
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 17/25] ls1021atwr: Use DEBUG and not CONFIG_DEBUG Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 18/25] nds32: Migrate CONFIG_DEBUG_LED to Kconfig Tom Rini
2022-04-08 18:03   ` Tom Rini
2022-03-30 22:07 ` [PATCH 19/25] powerpc: mpc83xx: Migrate DEFAULT_IMMR " Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-03-30 22:07 ` [PATCH 20/25] galileo: Remove CONFIG_DESIGNWARE_ETH reference Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-03-30 22:07 ` [PATCH 21/25] Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-03-30 22:07 ` [PATCH 22/25] Convert CONFIG_FSL_QIXIS et al " Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-03-30 22:07 ` [PATCH 23/25] m53menlo: Drop CONFIG_DISCOVER_PHY Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-03-30 22:07 ` [PATCH 24/25] siemens-am33x-common: Drop CONFIG_DMA_COHERENT* Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-03-30 22:07 ` [PATCH 25/25] arm: fsl-layerscape: Migrate more DP-DDR options to Kconfig Tom Rini
2022-04-08 18:04   ` Tom Rini
2022-04-08 18:02 ` [PATCH 01/25] Convert CONFIG_BOARD_SIZE_LIMIT " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220411193020.GM14282@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=jagan@amarulasolutions.com \
    --cc=p.yadav@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox