On Mon, Oct 11, 2010 at 18:41, Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> wrote: > On 23:15 Sun 10 Oct   , Alexey Zaytsev wrote: >> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@xxxxxxxxx> >> --- >> >> Hi. >> >> It seems that barebox does not run on any ARM machines provided >> by QEMU. This patch adds basic Versatile/PB support. It is far from >> being complete and has not been tested on real hardware, but >> seems to work fine in QEMU. >> >> Please notice, that you need to set CONFIG_VERSATILE_SMC91C111 >> in order to have networking in QEMU, as it does not provide >> smc91x found on the real hardware. >> >> For a queck test, run: >> >>    qemu-system-arm -kernel barebox.bin -M versatilepb -cpu arm926 -nographic -m 64 -net nic,model=smc91c111 -net user > this must be in a doc > > please use defaultenv and enable more functionnability > > as we can use it as ref board for emulation >> >> >> Âarch/arm/Kconfig                Â|  Â4 >> Âarch/arm/Makefile                |  Â2 >> Âarch/arm/boards/versatile/Kconfig        |  21 + >> Âarch/arm/boards/versatile/Makefile       Â|  Â2 >> Âarch/arm/boards/versatile/config.h       Â|  Â5 >> Âarch/arm/boards/versatile/env/bin/init     Â|  Â1 >> Âarch/arm/boards/versatile/versatilepb.c     |  56 +++ >> Âarch/arm/configs/versatilepb_defconfig     Â|  12 + >> Âarch/arm/include/asm/arm_timer.h        Â|  33 ++ >> Âarch/arm/mach-versatile/Kconfig         |  16 + >> Âarch/arm/mach-versatile/Makefile        Â|  Â2 >> Âarch/arm/mach-versatile/core.c         Â| Â217 ++++++++++++ >> Âarch/arm/mach-versatile/include/mach/clkdev.h  |  Â7 >> Âarch/arm/mach-versatile/include/mach/debug_ll.h |  37 ++ >> Âarch/arm/mach-versatile/include/mach/init.h   |  Â9 >> Âarch/arm/mach-versatile/include/mach/platform.h | Â417 +++++++++++++++++++++++ >> Â16 files changed, 841 insertions(+), 0 deletions(-) >> Âcreate mode 100644 arch/arm/boards/versatile/Kconfig >> Âcreate mode 100644 arch/arm/boards/versatile/Makefile >> Âcreate mode 100644 arch/arm/boards/versatile/config.h >> Âcreate mode 100644 arch/arm/boards/versatile/env/bin/init >> Âcreate mode 100644 arch/arm/boards/versatile/versatilepb.c >> Âcreate mode 100644 arch/arm/configs/versatilepb_defconfig >> Âcreate mode 100644 arch/arm/include/asm/arm_timer.h >> Âcreate mode 100644 arch/arm/mach-versatile/Kconfig >> Âcreate mode 100644 arch/arm/mach-versatile/Makefile >> Âcreate mode 100644 arch/arm/mach-versatile/core.c >> Âcreate mode 100644 arch/arm/mach-versatile/include/mach/clkdev.h >> Âcreate mode 100644 arch/arm/mach-versatile/include/mach/debug_ll.h >> Âcreate mode 100644 arch/arm/mach-versatile/include/mach/init.h >> Âcreate mode 100644 arch/arm/mach-versatile/include/mach/platform.h >> >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index fa37036..d90246a 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -56,6 +56,9 @@ config ARCH_S3C24xx >>    bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" >>    select CPU_ARM920T >> >> +config ARCH_VERSATILE >> +   bool "ARM Versatile boards (ARM926EJ-S)" >> +   select CPU_ARM926T >> Âendchoice >> >> Âsource arch/arm/cpu/Kconfig >> @@ -66,6 +69,7 @@ source arch/arm/mach-netx/Kconfig >> Âsource arch/arm/mach-nomadik/Kconfig >> Âsource arch/arm/mach-omap/Kconfig >> Âsource arch/arm/mach-s3c24xx/Kconfig >> +source arch/arm/mach-versatile/Kconfig >> >> Âconfig AEABI >>    bool "Use the ARM EABI to compile barebox" >> diff --git a/arch/arm/Makefile b/arch/arm/Makefile >> index 77b6cf4..6ad14e7 100644 >> --- a/arch/arm/Makefile >> +++ b/arch/arm/Makefile >> @@ -45,6 +45,7 @@ machine-$(CONFIG_ARCH_NOMADIK)       Â:= nomadik >> Âmachine-$(CONFIG_ARCH_NETX)     Â:= netx >> Âmachine-$(CONFIG_ARCH_OMAP)     Â:= omap >> Âmachine-$(CONFIG_ARCH_S3C24xx)        := s3c24xx >> +machine-$(CONFIG_ARCH_VERSATILE)   := versatile >> >> Â# Board directory name. ÂThis list is sorted alphanumerically >> Â# by CONFIG_* macro name. >> @@ -80,6 +81,7 @@ board-$(CONFIG_MACH_PCM043)         := pcm043 >> Âboard-$(CONFIG_MACH_PM9263)         Â:= pm9263 >> Âboard-$(CONFIG_MACH_SCB9328)         := scb9328 >> Âboard-$(CONFIG_MACH_NESO)          Â:= guf-neso >> +board-$(CONFIG_MACH_VERSATILEPB)       := versatile >> >> Âmachdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) >> >> diff --git a/arch/arm/boards/versatile/Kconfig b/arch/arm/boards/versatile/Kconfig >> new file mode 100644 >> index 0000000..d5da87d >> --- /dev/null >> +++ b/arch/arm/boards/versatile/Kconfig >> @@ -0,0 +1,21 @@ >> + >> + >> +if MACH_VERSATILEPB >> + >> +config ARCH_TEXT_BASE >> +   hex >> +   default 0 >> + >> +config BOARDINFO >> +   default "ARM Versatile/PB (ARM926EJ-S)" >> +endif >> + >> +config VERSATILE_SMC91C111 >> +   bool "Use smc91c111 instead of smc91x (for QEMU)" >> +   default 0 > ?? Will remove. >> +   help >> +   ÂEnable this option to run barebox inside qemu. >> +   ÂReal versatile boards are equipped with smc911x, >> +   Âbut qemu only provides smc91111, which is a bit different. > it will be beter to modify the ressources depending on the drivers enabled > > and nake it exclusive Can't agree here, in my understanding, the board definition should not depend on the drivers enabled. It might be a good idea to enable the right driver depending on this option, but I'm not sure if this is doable without forcing the ethernet driver always on. >> + >> + >> diff --git a/arch/arm/boards/versatile/Makefile b/arch/arm/boards/versatile/Makefile >> new file mode 100644 >> index 0000000..a17aed3 >> --- /dev/null >> +++ b/arch/arm/boards/versatile/Makefile >> @@ -0,0 +1,2 @@ >> + >> +obj-$(CONFIG_MACH_VERSATILEPB) += versatilepb.o >> diff --git a/arch/arm/boards/versatile/config.h b/arch/arm/boards/versatile/config.h >> new file mode 100644 >> index 0000000..25bb18f >> --- /dev/null >> +++ b/arch/arm/boards/versatile/config.h >> @@ -0,0 +1,5 @@ >> + >> +#ifndef __CONFIG_H >> +#define __CONFIG_H >> + >> +#endif    /* __CONFIG_H */ >> diff --git a/arch/arm/boards/versatile/env/bin/init b/arch/arm/boards/versatile/env/bin/init >> new file mode 100644 >> index 0000000..224a6b4 >> --- /dev/null > Â+   Âsdram_dev.size = size; >> +   register_device(&sdram_dev); >> +   armlinux_add_dram(&sdram_dev); >> +} >> + >> +/* 4 uarts, yay! */ >> +static struct device_d uart0_serial_device = { >> +   .id = 1, > why not start at 0? Will fix. > > btw there is a lots of whitespace could you fix them > Will fix. _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox