mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
Cc: Peter Rosin <>, Ahmad Fatoum <>
Subject: [PATCH 4/5] ARM: at91: sam9_smc: register driver earlier
Date: Wed, 22 Sep 2021 08:50:00 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

The driver probe only depends on the device's resources, so there is no
need to delay registration to coredevice_platform_driver. The way the
AT91 code is structured is that:

  - board code adds SMC device (not probed from DT, so no deep probe)
  - SMC driver probe runs and stores regions
  - board code calls into SMC driver to apply config to regions
  - board code registers NAND

Failure to keep this order results either in non-functional NAND
or crash. Take the easy way out.

Signed-off-by: Ahmad Fatoum <>
 arch/arm/mach-at91/sam9_smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
index 66261a95ee01..77d62012dfb6 100644
--- a/arch/arm/mach-at91/sam9_smc.c
+++ b/arch/arm/mach-at91/sam9_smc.c
@@ -195,4 +195,4 @@ static struct driver_d at91sam9_smc_driver = {
 	.probe = at91sam9_smc_probe,

barebox mailing list

  parent reply	other threads:[~2021-09-22  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22  6:49 [PATCH 0/5] ARM: at91: sama5d3_xplained: migrate to DT Ahmad Fatoum
2021-09-22  6:49 ` [PATCH master 1/5] fs: fat: pbl: support >32M alignment for first partition Ahmad Fatoum
2021-09-22  6:49 ` [PATCH master 2/5] ARM: at91: at91sam9263ek: add device tree check for board code Ahmad Fatoum
2021-09-22  6:49 ` [PATCH 3/5] Documentation: boards: at91: remove done TODOs Ahmad Fatoum
2021-09-22 15:29   ` Sam Ravnborg
2021-09-22  6:50 ` Ahmad Fatoum [this message]
2021-09-22  6:50 ` [PATCH 5/5] ARM: AT91: migrate sama5d3-xplained to DT Ahmad Fatoum
2021-10-01 13:36 ` [PATCH 0/5] ARM: at91: sama5d3_xplained: migrate " 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:

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

  git send-email \ \ \ \ \

* 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