From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sam Ravnborg <sam@ravnborg.org>, barebox@lists.infradead.org
Subject: Re: [PATCH v2 02/11] ARM: at91: Make sdramc.h useable in multi image builds
Date: Wed, 29 Jun 2022 08:50:46 +0200 [thread overview]
Message-ID: <e7353786-07e5-206b-ec09-9dd982653687@pengutronix.de> (raw)
In-Reply-To: <20220628203849.2785611-3-sam@ravnborg.org>
On 28.06.22 22:38, Sam Ravnborg wrote:
> There is no need to ifdef out all the static inlines as the headers
> no longer conflicts. Drop the ifdefs so we can now use the header
> in multi image builds.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> .../mach-at91/include/mach/at91sam9_sdramc.h | 45 ++-----------------
> 1 file changed, 4 insertions(+), 41 deletions(-)
>
> diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
> index 80effe214..3cda10165 100644
> --- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
> +++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
> @@ -81,6 +81,10 @@
>
> #ifndef __ASSEMBLY__
> #include <io.h>
> +#include <mach/at91sam9260.h>
> +#include <mach/at91sam9261.h>
> +#include <mach/at91sam9263.h>
> +
> static inline u32 at91_get_sdram_size(void *base)
> {
> u32 val;
> @@ -107,14 +111,11 @@ static inline u32 at91_get_sdram_size(void *base)
> return size;
> }
>
> -
> static inline bool at91_is_low_power_sdram(void *base)
> {
> return readl(base + AT91_SDRAMC_MDR) & AT91_SDRAMC_MD_LOW_POWER_SDRAM;
> }
>
> -#ifdef CONFIG_SOC_AT91SAM9260
> -#include <mach/at91sam9260.h>
> static inline u32 at91sam9260_get_sdram_size(void)
> {
> return at91_get_sdram_size(IOMEM(AT91SAM9260_BASE_SDRAMC));
> @@ -124,20 +125,7 @@ static inline bool at91sam9260_is_low_power_sdram(void)
> {
> return at91_is_low_power_sdram(IOMEM(AT91SAM9260_BASE_SDRAMC));
> }
> -#else
> -static inline u32 at91sam9260_get_sdram_size(void)
> -{
> - return 0;
> -}
> -
> -static inline bool at91sam9260_is_low_power_sdram(void)
> -{
> - return false;
> -}
> -#endif
>
> -#ifdef CONFIG_SOC_AT91SAM9261
> -#include <mach/at91sam9261.h>
> static inline u32 at91sam9261_get_sdram_size(void)
> {
> return at91_get_sdram_size(IOMEM(AT91SAM9261_BASE_SDRAMC));
> @@ -147,20 +135,7 @@ static inline bool at91sam9261_is_low_power_sdram(void)
> {
> return at91_is_low_power_sdram(IOMEM(AT91SAM9261_BASE_SDRAMC));
> }
> -#else
> -static inline u32 at91sam9261_get_sdram_size(void)
> -{
> - return 0;
> -}
> -
> -static inline bool at91sam9261_is_low_power_sdram(void)
> -{
> - return false;
> -}
> -#endif
>
> -#ifdef CONFIG_SOC_AT91SAM9263
> -#include <mach/at91sam9263.h>
> static inline u32 at91sam9263_get_sdram_size(int bank)
> {
> switch (bank) {
> @@ -184,18 +159,6 @@ static inline bool at91sam9263_is_low_power_sdram(int bank)
> return false;
> }
> }
> -#else
> -static inline u32 at91sam9263_get_sdram_size(int bank)
> -{
> - return 0;
> -}
> -
> -static inline bool at91sam9263_is_low_power_sdram(void)
> -{
> - return false;
> -}
> -#endif
>
> #endif
> -
> #endif
--
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 |
next prev parent reply other threads:[~2022-06-29 6:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 20:38 [PATCH 0/11] ARM: at91: Add pbl support to skov-arm9cpu Sam Ravnborg
2022-06-28 20:38 ` [PATCH v2 01/11] pwm: atmel: Fix build and update Sam Ravnborg
2022-06-28 20:38 ` [PATCH v2 02/11] ARM: at91: Make sdramc.h useable in multi image builds Sam Ravnborg
2022-06-29 6:50 ` Ahmad Fatoum [this message]
2022-06-28 20:38 ` [PATCH v2 03/11] ARM: at91: Add initialize function to sdramc Sam Ravnborg
2022-06-29 6:50 ` Ahmad Fatoum
2022-06-28 20:38 ` [PATCH v2 04/11] ARM: at91: Provide at91_mux_pio_pin for use in lowlevel Sam Ravnborg
2022-06-29 6:50 ` Ahmad Fatoum
2022-06-28 20:38 ` [PATCH v2 05/11] mci: atmel_mci: Add PBL helper to configure highcapacity Sam Ravnborg
2022-06-29 6:50 ` Ahmad Fatoum
2022-06-28 20:38 ` [PATCH v2 06/11] ARM: at91: Add at91sam9 xload_mmc for PBL use Sam Ravnborg
2022-06-29 6:50 ` Ahmad Fatoum
2022-06-28 20:38 ` [PATCH v2 07/11] ARM: at91: Add extra register definitions Sam Ravnborg
2022-06-29 6:49 ` Ahmad Fatoum
2022-06-28 20:38 ` [PATCH v2 08/11] ARM: at91: Add lowlevel helpers for at91sam9263 Sam Ravnborg
2022-06-29 6:50 ` Ahmad Fatoum
2022-06-28 20:38 ` [WIP PATCH v2 09/11] atmel_lcdfb: add support for updated DT bindings Sam Ravnborg
2022-06-28 20:38 ` [PATCH v2 10/11] ARM: at91: Add xload support to skov-arm9cpu Sam Ravnborg
2022-06-28 20:47 ` Sam Ravnborg
2022-06-28 20:38 ` [WIP PATCH v2 11/11] ARM: at91: Update DTS for skov-arm9cpu Sam Ravnborg
2022-06-30 12:19 ` [PATCH 0/11] ARM: at91: Add pbl support to skov-arm9cpu Sascha Hauer
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=e7353786-07e5-206b-ec09-9dd982653687@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sam@ravnborg.org \
/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