U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Dureghello <angelo@kernel-space.org>
To: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Bin Meng <bmeng.cn@gmail.com>,
	Francis Laniel <francis.laniel@amarulasolutions.com>,
	Huan Wang <alison.wang@nxp.com>, Lukasz Majewski <lukma@denx.de>,
	Mario Six <mario.six@gdsys.cc>, Sean Anderson <seanga2@gmail.com>
Subject: Acked
Date: Mon, 29 Jul 2024 09:57:34 +0200	[thread overview]
Message-ID: <9b88aef5-be01-43e4-973b-5742256a4ef4@kernel-space.org> (raw)
In-Reply-To: <20240724150922.2343249-2-sjg@chromium.org>

Acked-by: Angelo Dureghello <angelo@kernel-space.org>

On 24/07/24 5:08 PM, Simon Glass wrote:
> Only m68k and powerpc use this field, so move it to the arch-specific
> info, to reduce the size for other archs.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>   arch/m68k/cpu/mcf5445x/cpu.c           | 2 +-
>   arch/m68k/include/asm/global_data.h    | 2 ++
>   arch/m68k/lib/bdinfo.c                 | 2 +-
>   arch/powerpc/cpu/mpc83xx/pci.c         | 4 ++--
>   arch/powerpc/cpu/mpc83xx/speed.c       | 2 +-
>   arch/powerpc/include/asm/global_data.h | 2 ++
>   drivers/clk/mpc83xx_clk.c              | 2 +-
>   include/asm-generic/global_data.h      | 5 -----
>   8 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
> index b811ac355e4..3fbd6a58c7d 100644
> --- a/arch/m68k/cpu/mcf5445x/cpu.c
> +++ b/arch/m68k/cpu/mcf5445x/cpu.c
> @@ -92,7 +92,7 @@ int print_cpuinfo(void)
>   		       strmhz(buf3, gd->arch.flb_clk));
>   #ifdef CONFIG_PCI
>   		printf("       PCI CLK %s MHz INP CLK %s MHz VCO CLK %s MHz\n",
> -		       strmhz(buf1, gd->pci_clk),
> +		       strmhz(buf1, gd->arch.pci_clk),
>   		       strmhz(buf2, gd->arch.inp_clk),
>   		       strmhz(buf3, gd->arch.vco_clk));
>   #else
> diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h
> index 93efc722ba8..4ac886933c6 100644
> --- a/arch/m68k/include/asm/global_data.h
> +++ b/arch/m68k/include/asm/global_data.h
> @@ -26,6 +26,8 @@ struct arch_global_data {
>   #if defined(CONFIG_FSL_ESDHC)
>   	unsigned long sdhc_per_clk;
>   #endif
> +	/** @pci_clk: PCI clock rate in Hz */
> +	unsigned long pci_clk;
>   };
>   
>   #include <asm-generic/global_data.h>
> diff --git a/arch/m68k/lib/bdinfo.c b/arch/m68k/lib/bdinfo.c
> index cf6ae5adddf..891e94bbd3f 100644
> --- a/arch/m68k/lib/bdinfo.c
> +++ b/arch/m68k/lib/bdinfo.c
> @@ -22,7 +22,7 @@ int arch_setup_bdinfo(void)
>   	bd->bi_busfreq = gd->bus_clk;	/* Bus Freq,      in Hz */
>   
>   	if (IS_ENABLED(CONFIG_PCI))
> -		bd->bi_pcifreq = gd->pci_clk;
> +		bd->bi_pcifreq = gd->arch.pci_clk;
>   
>   #if defined(CONFIG_EXTRA_CLOCK)
>   	bd->bi_inpfreq = gd->arch.inp_clk;	/* input Freq in Hz */
> diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
> index 6f378c4e221..aef1123a2b7 100644
> --- a/arch/powerpc/cpu/mpc83xx/pci.c
> +++ b/arch/powerpc/cpu/mpc83xx/pci.c
> @@ -45,7 +45,7 @@ void ft_pci_setup(void *blob, struct bd_info *bd)
>   			do_fixup_by_path(blob, path, "bus-range",
>   				&tmp, sizeof(tmp), 1);
>   
> -			tmp[0] = cpu_to_be32(gd->pci_clk);
> +			tmp[0] = cpu_to_be32(gd->arch.pci_clk);
>   			do_fixup_by_path(blob, path, "clock-frequency",
>   				&tmp, sizeof(tmp[0]), 1);
>   		}
> @@ -60,7 +60,7 @@ void ft_pci_setup(void *blob, struct bd_info *bd)
>   			do_fixup_by_path(blob, path, "bus-range",
>   				&tmp, sizeof(tmp), 1);
>   
> -			tmp[0] = cpu_to_be32(gd->pci_clk);
> +			tmp[0] = cpu_to_be32(gd->arch.pci_clk);
>   			do_fixup_by_path(blob, path, "clock-frequency",
>   				&tmp, sizeof(tmp[0]), 1);
>   		}
> diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
> index 72464962613..0185ab50ad9 100644
> --- a/arch/powerpc/cpu/mpc83xx/speed.c
> +++ b/arch/powerpc/cpu/mpc83xx/speed.c
> @@ -456,7 +456,7 @@ int get_clocks(void)
>   #if defined(CONFIG_ARCH_MPC837X)
>   	gd->arch.sata_clk = sata_clk;
>   #endif
> -	gd->pci_clk = pci_sync_in;
> +	gd->arch.pci_clk = pci_sync_in;
>   	gd->cpu_clk = gd->arch.core_clk;
>   	gd->bus_clk = gd->arch.csb_clk;
>   	return 0;
> diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
> index a9efbbdd3d4..cc2ce617350 100644
> --- a/arch/powerpc/include/asm/global_data.h
> +++ b/arch/powerpc/include/asm/global_data.h
> @@ -87,6 +87,8 @@ struct arch_global_data {
>   #if defined(CONFIG_LWMON5)
>   	unsigned long kbd_status;
>   #endif
> +	/** @pci_clk: PCI clock rate in Hz */
> +	unsigned long pci_clk;
>   };
>   
>   #include <asm-generic/global_data.h>
> diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
> index a29ad0d7a68..a43fff2e7ed 100644
> --- a/drivers/clk/mpc83xx_clk.c
> +++ b/drivers/clk/mpc83xx_clk.c
> @@ -358,7 +358,7 @@ static int mpc83xx_clk_probe(struct udevice *dev)
>   	gd->mem_clk = priv->speed[MPC83XX_CLK_MEM];
>   
>   	if (mpc83xx_has_pci(type))
> -		gd->pci_clk = priv->speed[MPC83XX_CLK_PCI];
> +		gd->arch.pci_clk = priv->speed[MPC83XX_CLK_PCI];
>   
>   	gd->cpu_clk = priv->speed[MPC83XX_CLK_CORE];
>   	gd->bus_clk = priv->speed[MPC83XX_CLK_CSB];
> diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
> index aa336d63e3a..970053892e1 100644
> --- a/include/asm-generic/global_data.h
> +++ b/include/asm-generic/global_data.h
> @@ -59,11 +59,6 @@ struct global_data {
>   	 * @bus_clk: platform clock rate in Hz
>   	 */
>   	unsigned long bus_clk;
> -	/**
> -	 * @pci_clk: PCI clock rate in Hz
> -	 */
> -	/* We cannot bracket this with CONFIG_PCI due to mpc5xxx */
> -	unsigned long pci_clk;
>   	/**
>   	 * @mem_clk: memory clock rate in Hz
>   	 */

  reply	other threads:[~2024-07-29  7:58 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 15:08 [PATCH 00/35] global_data: Reduce size of struct global_data Simon Glass
2024-07-24 15:08 ` [PATCH 01/35] global_data: Move pci_clk to m68k and powerpc Simon Glass
2024-07-29  7:57   ` Angelo Dureghello [this message]
2024-07-24 15:08 ` [PATCH 02/35] x86: Drop use of global_data fb_base Simon Glass
2024-07-24 15:08 ` [PATCH 03/35] video: Add a function to obtain the framebuffer address Simon Glass
2024-07-24 15:08 ` [PATCH 04/35] video: mxc: Avoid setting global_data fb_base Simon Glass
2024-07-24 15:08 ` [PATCH 05/35] video: mxs: " Simon Glass
2024-07-24 15:08 ` [PATCH 06/35] arm: friendlyarm: Avoid accessing " Simon Glass
2024-07-29 17:57   ` Stefan Bosch
2024-07-24 15:08 ` [PATCH 07/35] arm: ronetix: " Simon Glass
2024-07-24 15:08 ` [PATCH 08/35] zynqmp: Avoid setting the framebuffer address Simon Glass
2024-07-24 15:08 ` [PATCH 09/35] video: Avoid setting global_data fb_base from SPL handoff Simon Glass
2024-07-24 15:08 ` [PATCH 10/35] video: Avoid setting global_data fb_base in video setup Simon Glass
2024-07-24 15:08 ` [PATCH 11/35] global_data: Drop fb_base Simon Glass
2024-07-24 15:08 ` [PATCH 12/35] global_data: Convert have_console into a flag Simon Glass
2024-08-16 13:08   ` Sverdlin, Alexander
2024-08-29 14:05     ` Simon Glass
2024-08-29 14:28       ` Tom Rini
2024-08-29 15:01         ` Simon Glass
2024-07-24 15:09 ` [PATCH 13/35] global_data: Remove pci_ram_top Simon Glass
2024-07-24 15:09 ` [PATCH 14/35] global_data: Drop global_data hose Simon Glass
2024-07-24 15:09 ` [PATCH 15/35] global_data: Drop pci_bootdelay Simon Glass
2024-07-24 15:09 ` [PATCH 16/35] global_data: Use less space for environment fields Simon Glass
2024-07-24 15:09 ` [PATCH 17/35] board_f: Add a new struct to hold pre-relocation info Simon Glass
2024-07-24 15:09 ` [PATCH 18/35] board_f: Move fdt_size to board Simon Glass
2024-07-24 15:09 ` [PATCH 19/35] board_f: Move new_bootstage to boardf Simon Glass
2024-07-24 15:09 ` [PATCH 20/35] board_f: Move new_bloblist " Simon Glass
2024-07-24 15:09 ` [PATCH 21/35] global_data: Drop spl_handoff Simon Glass
2024-07-24 15:09 ` [PATCH 22/35] global_data: Collect common fields at the top Simon Glass
2024-07-24 15:09 ` [PATCH 23/35] global_data: Reduce the size of bus_clk and mem_clk Simon Glass
2024-07-24 15:09 ` [PATCH 24/35] global_data: Reduce the size of mon_len Simon Glass
2024-07-24 15:09 ` [PATCH 25/35] global_data: log: Reorder and shrink fields Simon Glass
2024-07-24 15:09 ` [PATCH 26/35] global_data: Reduce size of early-malloc vars Simon Glass
2024-07-24 15:09 ` [PATCH 27/35] global_data: Move baud_rate field lower Simon Glass
2024-07-24 15:09 ` [PATCH 28/35] global_data: Move env_addr field higher Simon Glass
2024-07-24 15:09 ` [PATCH 29/35] global_data: Put phys_addr fields near the top Simon Glass
2024-07-24 15:09 ` [PATCH 30/35] global_data: Move ulong fields together Simon Glass
2024-07-24 15:09 ` [PATCH 31/35] global_data: Move pointer members together Simon Glass
2024-07-24 15:09 ` [PATCH 32/35] global_data: Remove jump table in SPL Simon Glass
2024-07-24 15:09 ` [PATCH 33/35] global_data: Remove environment members if not used Simon Glass
2024-07-24 15:09 ` [PATCH 34/35] doc: Move generic-board documentation into rst Simon Glass
2024-07-24 15:09 ` [PATCH 35/35] doc: Add some guidelines about global data Simon Glass
2024-07-24 23:07 ` [PATCH 00/35] global_data: Reduce size of struct global_data Tom Rini
2024-08-21  0:48 ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2024-09-26 20:44 [PATCH 00/27] led: Remove old status-LED code Simon Glass
2024-09-26 20:44 ` [PATCH 15/27] m68k: Drop unused status_led.h header file Simon Glass
2024-10-01  7:21   ` Acked Angelo Dureghello
2024-06-19 21:27 [PATCH 1/7] m68k: Implement a default flush_dcache_all Tom Rini
2024-06-24  7:37 ` Acked Angelo Dureghello
2024-05-28 11:13 [PATCH 0/7] watchdog_reset cleanup Rasmus Villemoes
2024-05-29  7:35 ` Acked Angelo Dureghello

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=9b88aef5-be01-43e4-973b-5742256a4ef4@kernel-space.org \
    --to=angelo@kernel-space.org \
    --cc=alison.wang@nxp.com \
    --cc=bmeng.cn@gmail.com \
    --cc=francis.laniel@amarulasolutions.com \
    --cc=lukma@denx.de \
    --cc=mario.six@gdsys.cc \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.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