All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Trying to load old kernel with new u-boot
@ 2015-09-15 21:24 DaveKucharczyk
  2015-09-16 16:17 ` DaveKucharczyk
  0 siblings, 1 reply; 5+ messages in thread
From: DaveKucharczyk @ 2015-09-15 21:24 UTC (permalink / raw)
  To: u-boot

One of our mx51 based boards doesn't seem to like 2.6.35 kernel with 2014.07
u-boot.
We've ported our boards for the new kernel and new u-boot, but we need the
old kernel to also work with new u-boot.

So here's what happens...

U-Boot 2014.07-svn83200 (Sep 15 2015 - 15:57:02)

CPU:   Freescale i.MX51 rev3.0 at 800 MHz
I2C:   ready
DRAM:  512 MiB
Last reset reason:POR, (1)
Boot Device: MMC
MMC:   FSL_SDHC: 0
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

MMC read: dev # 0, block # 2048, count 6144 ... 6144 blocks read: OK
## Booting kernel from Legacy Image at 92000000 ...
   Image Name:   Linux-2.6.35.3-1129-g691c08a+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2873388 Bytes = 2.7 MiB
   Load Address: 90008000
   Entry Point:  90008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????
console [ttymxc1] enabled, bootconsole disabled
blah blah
boot continues as normal...

Looks like new u-boot passes something wrong to the kernel or doesn't pass
something we need. 

Seems like the first half of the kernel output timing is wrong. I tried
different bauds to no avail. 

On a working board we see early on...

entering mx51_clocks_init
turning off all clocks
external_low_reference = 00008000
external_high_reference = 01588800
ckih2_reference = 01770000
oscillator_reference = 016e3600
entering clk_tree_init
clk_tree_init for mx51
returned from clk_tree_init
setting uart_main_clk to pll3_sw_clk
MXC_CCM_CSCDR1 is 00c30458
MXC_Early serial console at MMIO 0x73fc0000 (options '115200')
bootconsole [ttymxc1] enabled

And then later...
console [ttymxc1] enabled, bootconsole disabled

Looks like the early console is not working. I'll have to debug this
tomorrow, but if anyone has suggestions that would be great. 



--
View this message in context: http://u-boot.10912.n7.nabble.com/Trying-to-load-old-kernel-with-new-u-boot-tp228429.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Trying to load old kernel with new u-boot
  2015-09-15 21:24 [U-Boot] Trying to load old kernel with new u-boot DaveKucharczyk
@ 2015-09-16 16:17 ` DaveKucharczyk
  2015-09-16 22:23   ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: DaveKucharczyk @ 2015-09-16 16:17 UTC (permalink / raw)
  To: u-boot

When I set putty to 38400 I get the first half of the kernel console output
fine and the second half is garbage. 

So that tells me early kernel is outputting at 38400. Even though we don't
set it to that. When I print gd->baudrate in board_late_init() I get 115200.

So what does 2014.07 u-boot do differently than 2009.08 that causes the
early kernel console to get messed up?

That's my trail at the moment. 





--
View this message in context: http://u-boot.10912.n7.nabble.com/Trying-to-load-old-kernel-with-new-u-boot-tp228429p228444.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Trying to load old kernel with new u-boot
  2015-09-16 16:17 ` DaveKucharczyk
@ 2015-09-16 22:23   ` Fabio Estevam
  2015-09-16 22:52     ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2015-09-16 22:23 UTC (permalink / raw)
  To: u-boot

On Wed, Sep 16, 2015 at 1:17 PM, DaveKucharczyk
<david.kucharczyk@gmail.com> wrote:
> When I set putty to 38400 I get the first half of the kernel console output
> fine and the second half is garbage.
>
> So that tells me early kernel is outputting at 38400. Even though we don't
> set it to that. When I print gd->baudrate in board_late_init() I get 115200.
>
> So what does 2014.07 u-boot do differently than 2009.08 that causes the
> early kernel console to get messed up?

If I recall correctly they have different parents or the uart clock.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Trying to load old kernel with new u-boot
  2015-09-16 22:23   ` Fabio Estevam
@ 2015-09-16 22:52     ` Fabio Estevam
  2015-09-17 13:15       ` DaveKucharczyk
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2015-09-16 22:52 UTC (permalink / raw)
  To: u-boot

On Wed, Sep 16, 2015 at 7:23 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Sep 16, 2015 at 1:17 PM, DaveKucharczyk
> <david.kucharczyk@gmail.com> wrote:
>> When I set putty to 38400 I get the first half of the kernel console output
>> fine and the second half is garbage.
>>
>> So that tells me early kernel is outputting at 38400. Even though we don't
>> set it to that. When I print gd->baudrate in board_late_init() I get 115200.
>>
>> So what does 2014.07 u-boot do differently than 2009.08 that causes the
>> early kernel console to get messed up?
>
> If I recall correctly they have different parents or the uart clock.

I meant "different parents for the uart clock"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Trying to load old kernel with new u-boot
  2015-09-16 22:52     ` Fabio Estevam
@ 2015-09-17 13:15       ` DaveKucharczyk
  0 siblings, 0 replies; 5+ messages in thread
From: DaveKucharczyk @ 2015-09-17 13:15 UTC (permalink / raw)
  To: u-boot

Fabio Estevam-2 wrote
> I meant "different parents for the uart clock"

Fabio, that would make sense why it doesn't work when setting 2014 u-boot
CSCDR1 to the value in 2009 u-boot. I can check all the combinations of
clock division I want and it's never going to work since the parent is
different. 

The patch for u-boot 2009.08 states...
------------------
Subject: [PATCH] ENGR00133727: uart outputs messy code when kernel starts on
mx51

uart outputs messy code when kernel starts on mx51.
Change uart clock to use pll2 as source clock.
------------------

Looks like we never implemented that patch in our 2009 u-boot. 
Looks like that patch made it to 2014 u-boot.

So I tried setting the uart clock parent to default in u-boot 2014 in
arch/arm/cpu/armv7/mx5/lowlevel_init.S, but still the same thing happens. 

Any suggestions?

Basically I want kernel 2.6.35 to boot cleanly on the console using u-boot
2014 on an mx51 board. 



--
View this message in context: http://u-boot.10912.n7.nabble.com/Trying-to-load-old-kernel-with-new-u-boot-tp228429p228518.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-17 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15 21:24 [U-Boot] Trying to load old kernel with new u-boot DaveKucharczyk
2015-09-16 16:17 ` DaveKucharczyk
2015-09-16 22:23   ` Fabio Estevam
2015-09-16 22:52     ` Fabio Estevam
2015-09-17 13:15       ` DaveKucharczyk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.