From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Marek Belisko <marek.belisko@open-nandra.com>
Subject: Re: [PATCH] mach-s3c24xx: Fix compilation problem when make a9m2410 or a9m2440 defconfig.
Date: Wed, 8 Sep 2010 12:58:06 +0200 [thread overview]
Message-ID: <201009081258.06169.jbe@pengutronix.de> (raw)
In-Reply-To: <201009081201.01622.jbe@pengutronix.de>
Juergen Beisert wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 20:52 Tue 07 Sep , Marek Belisko wrote:
> > > Following steps lead to compilation error (barebox v2010.09.0):
> > >
> > > 1. make a9m2440_defconfig (or a9m2410) ARCH=arm
> > > 2. make CROSS_COMPILE=arm-linux- ARCH=arm
> > >
> > > This patch should fix problems.
> > >
> > > Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
> > > ---
> > > arch/arm/mach-s3c24xx/Kconfig | 4 +++-
> > > 1 files changed, 3 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-s3c24xx/Kconfig
> > > b/arch/arm/mach-s3c24xx/Kconfig index 37ccf2f..297fdbb 100644
> > > --- a/arch/arm/mach-s3c24xx/Kconfig
> > > +++ b/arch/arm/mach-s3c24xx/Kconfig
> > > @@ -81,7 +81,9 @@ config S3C24XX_SDRAM_INIT
> > > config S3C24XX_NAND_BOOT
> > > bool
> > > prompt "Booting from NAND"
> > > - select NAND_S3C24X0
> > > + select MTD
> > > + select NAND
> > > + select NAND_S3C24X0
> >
> > you should be able to boot from nand only if you enable the NAND and not
> > the invert
>
> Hmm, you can enable NAND support, but you may do not want to boot from it.
> IMHO its correct in this way.
In this case it is not a matter of taste how these parts depends on each
other. This CPU module only contains NAND. There is no alternative to start
from.
But this discussion leads into the lack of a "select S3C24XX_NAND_BOOT" when
selecting one of these boards. So, the correct fix should better be like
this:
diff --git a/arch/arm/boards/a9m2410/a9m2410.c
b/arch/arm/boards/a9m2410/a9m2410.c
index f327f82..db0ddab 100644
--- a/arch/arm/boards/a9m2410/a9m2410.c
+++ b/arch/arm/boards/a9m2410/a9m2410.c
@@ -152,14 +152,12 @@ static int a9m2410_devices_init(void)
register_device(&sdram_dev);
register_device(&network_dev);
-#ifdef CONFIG_NAND
/* ----------- add some vital partitions -------- */
devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
-#endif
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
@@ -170,12 +168,10 @@ static int a9m2410_devices_init(void)
device_initcall(a9m2410_devices_init);
-#ifdef CONFIG_S3C24XX_NAND_BOOT
void __bare_init nand_boot(void)
{
s3c24x0_nand_load_image((void *)TEXT_BASE, 256 * 1024, 0, 512);
}
-#endif
static struct device_d a9m2410_serial_device = {
.name = "s3c24x0_serial",
diff --git a/arch/arm/boards/a9m2440/a9m2440.c
b/arch/arm/boards/a9m2440/a9m2440.c
index 2567f5e..bfa56ec 100644
--- a/arch/arm/boards/a9m2440/a9m2440.c
+++ b/arch/arm/boards/a9m2440/a9m2440.c
@@ -159,14 +159,13 @@ static int a9m2440_devices_init(void)
register_device(&sdram_dev);
register_device(&network_dev);
-#ifdef CONFIG_NAND
/* ----------- add some vital partitions -------- */
devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
-#endif
+
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
armlinux_set_architecture(MACH_TYPE_A9M2440);
@@ -176,12 +175,10 @@ static int a9m2440_devices_init(void)
device_initcall(a9m2440_devices_init);
-#ifdef CONFIG_S3C24XX_NAND_BOOT
void __bare_init nand_boot(void)
{
s3c24x0_nand_load_image((void *)TEXT_BASE, 256 * 1024, 0, 512);
}
-#endif
static struct device_d a9m2440_serial_device = {
.name = "s3c24x0_serial",
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 37ccf2f..2670837 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -24,6 +24,7 @@ config MACH_A9M2410
select MACH_HAS_LOWLEVEL_INIT
select S3C24XX_PLL_INIT
select S3C24XX_SDRAM_INIT
+ select S3C24XX_NAND_BOOT
help
Say Y here if you are using Digi's Connect Core 9M equipped
with a Samsung S3C2410 Processor
@@ -33,6 +34,7 @@ config MACH_A9M2440
select CPU_S3C2440
select MACH_HAS_LOWLEVEL_INIT
select S3C24XX_PLL_INIT
+ select S3C24XX_NAND_BOOT
help
Say Y here if you are using Digi's Connect Core 9M equipped
with a Samsung S3C2440 Processor
@@ -81,6 +83,8 @@ config S3C24XX_SDRAM_INIT
config S3C24XX_NAND_BOOT
bool
prompt "Booting from NAND"
+ select MTD
+ select NAND
select NAND_S3C24X0
help
Add generic support to boot from NAND flash. Image loading will be
@Marek: Can you check it on your hardware? My a9m2440 isn't working right now.
jbe
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-09-08 10:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 18:52 Marek Belisko
2010-09-08 8:49 ` Juergen Beisert
2010-09-08 9:47 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-08 9:56 ` Belisko Marek
2010-09-08 10:01 ` Juergen Beisert
2010-09-08 10:36 ` Peter Korsgaard
2010-09-08 10:58 ` Juergen Beisert [this message]
2010-09-23 6:12 ` Juergen Beisert
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=201009081258.06169.jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=marek.belisko@open-nandra.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