* [U-Boot] support all dataflash for at91sam9g20ek_2mmc
@ 2013-02-14 15:20 John Stile
2013-02-14 18:16 ` John Stile
0 siblings, 1 reply; 2+ messages in thread
From: John Stile @ 2013-02-14 15:20 UTC (permalink / raw)
To: u-boot
I am using uboot-2013.01, with at91sam9g20ek_2mmc and I am trying to
build for dataflash, using at91bootstrap-1.16, and buildroot-2011.11
Initially I built for nand flash, with a patch to boards.cfg and
at91sam9260ek.c
This was fine if I used the reset button, but from a cold boot, startup
stopped after after at91bootstrap-1.16, and uboot never starts.
Now I am trying to build uboot for all dataflash, but I still see the
same behavior with uboot.
Uboot worked from dataflash when using uboot-1.3.6 (and patches from
atmel), but much has changed since then, so it is hard to figure out if
something from those patches is lost in the current uboot.
What can I try next.
Bellow are the patches I applied so far.
boards.cfg: add target name
at91sam9g20ek_2mmc_nandflash,at91sam9g20ek_2mmc_dataflash_cs0,at91sam9g20ek_2mmc_dataflash_cs1
signed-off-by John Stile <john@stilen.com>
diff -ruNp a/boards.cfg b/boards.cfg
--- a/boards.cfg 2013-02-14 07:08:12.000000000 -0800
+++ b/boards.cfg 2013-02-13 18:09:32.000000000 -0800
@@ -91,7 +91,10 @@ at91sam9263ek_norflash arm
at91sam9263ek_norflash_boot arm arm926ejs at91sam9263ek
atmel at91
at91sam9263ek:AT91SAM9263,SYS_USE_BOOT_NORFLASH
at91sam9g10ek_dataflash_cs0 arm arm926ejs at91sam9261ek
atmel at91
at91sam9261ek:AT91SAM9G10,SYS_USE_DATAFLASH_CS0
at91sam9g10ek_dataflash_cs3 arm arm926ejs at91sam9261ek
atmel at91
at91sam9261ek:AT91SAM9G10,SYS_USE_DATAFLASH_CS3
+at91sam9g20ek_2mmc_dataflash_cs0 arm arm926ejs at91sam9260ek
atmel at91
at91sam9260ek:AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_DATAFLASH_CS0
+at91sam9g20ek_2mmc_dataflash_cs1 arm arm926ejs at91sam9260ek
atmel at91
at91sam9260ek:AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_DATAFLASH_CS1
at91sam9g10ek_nandflash arm arm926ejs at91sam9261ek
atmel at91 at91sam9261ek:AT91SAM9G10,SYS_USE_NANDFLASH
+at91sam9g20ek_2mmc_nandflash arm arm926ejs at91sam9260ek
atmel at91
at91sam9260ek:AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_NANDFLASH
at91sam9g20ek_dataflash_cs0 arm arm926ejs at91sam9260ek
atmel at91
at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS0
at91sam9g20ek_dataflash_cs1 arm arm926ejs at91sam9260ek
atmel at91
at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS1
at91sam9g20ek_nandflash arm arm926ejs at91sam9260ek
atmel at91 at91sam9260ek:AT91SAM9G20,SYS_USE_NANDFLASH
board/atmel/at91sam9260ek/at91sam9260ek.c Added ability to make buildroot with correct board type, to match kernel
signed-off-by John Stile <john@stilen.com>
diff -ruNp a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c 2013-01-29 09:09:35.000000000 -0800
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c 2013-01-29 09:10:46.000000000 -0800
@@ -157,6 +157,10 @@
int board_init(void)
{
+#ifdef CONFIG_AT91SAM9G20EK_2MMC
+ /* arch number of AT91SAM9260EK-Board */
+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK_2MMC;
+#else
#ifdef CONFIG_AT91SAM9G20EK
/* arch number of AT91SAM9260EK-Board */
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
@@ -164,6 +168,7 @@
/* arch number of AT91SAM9260EK-Board */
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
#endif
+#endif
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
^ permalink raw reply [flat|nested] 2+ messages in thread* [U-Boot] support all dataflash for at91sam9g20ek_2mmc
2013-02-14 15:20 [U-Boot] support all dataflash for at91sam9g20ek_2mmc John Stile
@ 2013-02-14 18:16 ` John Stile
0 siblings, 0 replies; 2+ messages in thread
From: John Stile @ 2013-02-14 18:16 UTC (permalink / raw)
To: u-boot
On Thu, 2013-02-14 at 07:20 -0800, John Stile wrote:
> I am using uboot-2013.01, with at91sam9g20ek_2mmc and I am trying to
> build for dataflash, using at91bootstrap-1.16, and buildroot-2011.11
>
> Initially I built for nand flash, with a patch to boards.cfg and
> at91sam9260ek.c
>
> This was fine if I used the reset button, but from a cold boot, startup
> stopped after after at91bootstrap-1.16, and uboot never starts.
>
> Now I am trying to build uboot for all dataflash, but I still see the
> same behavior with uboot.
>
> Uboot worked from dataflash when using uboot-1.3.6 (and patches from
> atmel), but much has changed since then, so it is hard to figure out if
> something from those patches is lost in the current uboot.
>
> What can I try next.
>
I have gone over the patch list for uboot-1.3.6, and tracked down where
they are moved to in uboot-2013.01, and nothing is jumping out at me
yet, except these different:
uboot-1.3.6:
#define AT91_SLOW_CLOCK 32768 /* slow clock */
#define AT91_MAIN_CLOCK 198656000 /* from 18.432 MHz crystal */
#define AT91_MASTER_CLOCK 99328000 /* peripheral = main / 2 */
#define CFG_HZ 1000000 /* 1us resolution */
#define CONFIG_SYS_SPI_WRITE_TOUT (5*CONFIG_SYS_HZ)
uboot-2013.01:
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* main clock xtal */
#define CONFIG_SYS_HZ 1000
Though include/configs/cpuat91.h
#define AT91C_MASTER_CLOCK (AT91C_MAIN_CLOCK / 3)
#define CFG_SPI_WRITE_TOUT (5*CFG_HZ)
Q1: should I change Hz from 1000 to 1000000?
Q2: should I change MAIN_CLOCK from 18432000 to 198656000?
Q3: why is MASTER_CLOCK in old using divisor of 2, where new is using a
divisor of 3?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-14 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 15:20 [U-Boot] support all dataflash for at91sam9g20ek_2mmc John Stile
2013-02-14 18:16 ` John Stile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox