public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: dario.binacchi@amarulasolutions.com,
	michael@amarulasolutions.com, hs@denx.de,
	enrico.leto@siemens.com
Cc: trini@konsulko.com, praneeth@ti.com, nm@ti.com, vigneshr@ti.com,
	u-boot@lists.denx.de, Roger Quadros <rogerq@kernel.org>,
	Hong Guan <hguan@ti.com>
Subject: [PATCH v2 2/2] mtd: rawnand: omap_elm: Fix elm_init definition
Date: Mon, 11 Dec 2023 13:46:00 +0200	[thread overview]
Message-ID: <20231211114600.4414-3-rogerq@kernel.org> (raw)
In-Reply-To: <20231211114600.4414-1-rogerq@kernel.org>

The macro ELM_BASE is defined in mach/hardware.h and is
not visible at the omap_elm.h header file. Avoid using it
in omap_elm.h.

Reported-by: Hong Guan <hguan@ti.com>
Fixes: 7363cf0581a3 ("mtd: rawnand: omap_elm: u-boot driver model support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 drivers/mtd/nand/raw/omap_elm.c | 4 ++--
 drivers/mtd/nand/raw/omap_elm.h | 6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
index 56a2c39e4f..015ec9bc2d 100644
--- a/drivers/mtd/nand/raw/omap_elm.c
+++ b/drivers/mtd/nand/raw/omap_elm.c
@@ -185,7 +185,6 @@ void elm_reset(void)
 		;
 }
 
-#ifdef ELM_BASE
 /**
  * elm_init - Initialize ELM module
  *
@@ -194,10 +193,11 @@ void elm_reset(void)
  */
 void elm_init(void)
 {
+#ifdef ELM_BASE
 	elm_cfg = (struct elm *)ELM_BASE;
 	elm_reset();
-}
 #endif
+}
 
 #if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 
diff --git a/drivers/mtd/nand/raw/omap_elm.h b/drivers/mtd/nand/raw/omap_elm.h
index a7f7bacb15..f3db00d55d 100644
--- a/drivers/mtd/nand/raw/omap_elm.h
+++ b/drivers/mtd/nand/raw/omap_elm.h
@@ -74,12 +74,6 @@ int elm_check_error(u8 *syndrome, enum bch_level bch_type, u32 *error_count,
 		u32 *error_locations);
 int elm_config(enum bch_level level);
 void elm_reset(void);
-#ifdef ELM_BASE
 void elm_init(void);
-#else
-static inline void elm_init(void)
-{
-}
-#endif
 #endif /* __ASSEMBLY__ */
 #endif /* __ASM_ARCH_ELM_H */
-- 
2.34.1


  parent reply	other threads:[~2023-12-11 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 11:45 [PATCH v2 0/2] mtd: nand: omap_gpmc: Fix NAND for AM335x Roger Quadros
2023-12-11 11:45 ` [PATCH v2 1/2] mtd: nand: omap_gpmc: Fix NAND in SPL " Roger Quadros
2023-12-11 11:46 ` Roger Quadros [this message]
2024-01-11 13:06 ` [PATCH v2 0/2] mtd: nand: omap_gpmc: Fix NAND " Roger Quadros
2024-01-11 13:13   ` Michael Nazzareno Trimarchi
2024-01-15  9:43     ` Dario Binacchi

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=20231211114600.4414-3-rogerq@kernel.org \
    --to=rogerq@kernel.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=enrico.leto@siemens.com \
    --cc=hguan@ti.com \
    --cc=hs@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /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