On 31/12/13 14:48, Hans de Goede wrote:
Hi,

On 12/31/2013 12:51 PM, Tim Fletcher wrote:
On 31/12/13 11:36, Hans de Goede wrote:
Hi,

On 12/31/2013 12:11 PM, Tim Fletcher wrote:
On 31/12/13 09:39, Hans de Goede wrote:
Hi,

On 12/30/2013 07:51 PM, Tim Fletcher wrote:
On 22/12/13 12:57, Hans de Goede wrote:
Hi,

On 12/22/2013 12:21 AM, Michal Suchanek wrote:
Actually sun7i smp conflicts badly with the sun6i smp .. so a
stab at
a merge:

https://github.com/hramrach/linux-sunxi/commits/sunxi-next

Compile tested.

Actually the plan for A20 going forward is to have u-boot implement
PSCI and use that, the problem of the parent post is likely that he
does
not
have CONFIG_ARM_PSCI=y in his kernels .config. The reason for
this is
that
this is necessary to properly enable HYP mode on the cpu-cores,
which we
want to be able to do hardware virtualization.

WRT I'm a bit surprised that Maxime does have SMP support for A31
in his
tree
to get merged upstream, as the A31 should be the same story, it has
Cortex
A7 cores which can do HYP mode too.

I've been testing this on my Cubietruck and your current devel tree
seems to be missing the dts changes from this commit.
https://github.com/hramrach/linux-sunxi/commit/8b5c1d5e7bbd71cf36535dc11578d9387af003b0




If I boot an rc5 kernel with a dtb from rc5 then I get usb but only 1
CPU (other fails to boot error -38), it I boot with a dtb from rc3 I
get both cpus but no USB.

If I apply the linked patch then I get both CPUs and USB.

Looking at you sunxi-next branch:
https://github.com/hramrach/linux-sunxi/commits/sunxi-next

You're not only adding "Add cpuconfig nodes in dts for smp configure."
but also
"Add smp support for Allwinner A20(sunxi 7i)."

This is the old way of doing smp on A20, we now have a u-boot with
PSCI, which is the preferred way of doing smp since it also give
us HYP mode, which many people want.

The proper way to get smp now is to use this u-boot:
https://github.com/jwrdegoede/u-boot-sunxi/commits/sunxi-next

Second try with coffee...

I am using your u-boot patched, with current sunxi-devel branch
kernel+dtb then only 1 CPU boots. If I apply just the changes I linked
to the dts file and rebuild it then both CPUs boot with the same
kernel binary.

I use your current u-boot and the rc5 kernel and just drop in the dtb
built from rc3 sunxi-next sources then both cpus boot but USB doesn't
work.

I have not applied any the kernel code changes, in fact all I did was
make dtbs, copy the new dtb file over and reboot.

Weird it works fine for me, and having that dtb change fix things makes
no sense since
if you did not apply the patch in question nothing in the kernel will be
responding
to that dtb blurb.

Are you sure you are booting the uImage you think you are booting?

I'll make doubly sure I'm booting the correct kernel, but I'm pretty
sure already, only think I will try is pulling the power from the
board altogether and trying again with the original rc5 dtb.

What commands are you using to boot the kernel ? I'm using this:

env set fdt_high ffffffff
ext2load mmc 0 0x46000000 uImage.new
ext2load mmc 0 0x49000000 dtb
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p3 ro rootwait
loglevel=5
bootm 0x46000000 - 0x49000000

I have the following in my /boot/uEnv.txt

ml_version=3.13.0-rc5+
ethaddr=9e:31:89:2c:0b:fd
dtb=sun7i-a20-cubietruck.dtb
root=/dev/sda1 rootwait ro rootfstype=ext4
rootfstype=ext4 rootflags=discard
ml_args=bootargs console=ttyS0,115200 ro rootwait root=/dev/sda1
rootfstype=ext4 ro zswap.enabled=1
boot_ml=setenv bootargs ${ml_args} ; ext2load mmc 0 0x46000000
uImage-${ml_version} ; ext2load mmc 0 0x4b000000 ${dtb}-${ml_version}
; env set fdt_high ffffffff ; bootm 0x46000000 - 0x4b000000
uenvcmd=run boot_ml

Weird, can you try moving the setting of fdt_high earlier. And also
changing the dtb load-address to 49000000 ?

Hit any key to stop autoboot:  0
sun7i# env set fdt_high ffffffff
sun7i# ext2load mmc 0 0x46000000 uImage-3.13.0-rc5+
5305792 bytes read in 316 ms (16 MiB/s)
sun7i# ext2load mmc 0 0x49000000 sun7i-a20-cubietruck.dtb-3.13.0-rc5+
16109 bytes read in 36 ms (436.5 KiB/s)
sun7i# setenv bootargs console=ttyS0,115200 root=/dev/sda1 ro rootwait
sun7i# bootm 0x46000000 - 0x49000000
## Booting kernel from Legacy Image at 46000000 ...
   Image Name:   Linux-3.13.0-rc5+
   Created:      2013-12-31  12:08:45 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5305728 Bytes = 5.1 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 49000000
   Booting using the fdt blob at 0x49000000
   Loading Kernel Image ... OK
   Using Device Tree in place at 49000000, end 49006eec

Gives the same problem, the second cpu fails to boot with error -38

Can you upload your kernel and dtb images and I'll try and boot them to cut out me doing something wrong compiling?

--
Tim Fletcher <[email protected]>

--
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to