[PATCH v2] Add support for Baltos systems
Sascha Hauer
s.hauer at pengutronix.de
Wed Jun 1 00:08:27 PDT 2016
On Mon, May 30, 2016 at 04:43:50PM +0200, yegorslists at googlemail.com wrote:
> From: Yegor Yefremov <yegorslists at googlemail.com>
>
> OnRISC Baltos devices are based on a am335x SoC and can be booted
> either from MMC or NAND.
>
> Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
> ---
> Changes:
> v2: - remove typedef
> - rework invalid EEPROM content handling
> - add mmc0 as boot device for MMC boot source
>
> +static int baltos_mem_init(void)
> +{
> + uint32_t sdram_size;
> +
> + if (!of_machine_is_compatible("vscom,onrisc"))
> + return 0;
> +
> + sdram_size = SZ_256M;
> +
> + arm_add_mem_device("ram0", 0x80000000, sdram_size);
> +
> + return 0;
> +}
> +mem_initcall(baltos_mem_init);
This shouldn't be necessary. See arch/arm/mach-omap/am33xx_scrm.c, here
the correct amount of memory should be registered.
> +ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
> +{
> + uint32_t sdram_size;
> + void *fdt;
> +
> + sdram_size = SZ_256M;
> + fdt = __dtb_am335x_baltos_minimal_start;
> +
> + fdt -= get_runtime_offset();
> +
> + barebox_arm_entry(0x80000000, sdram_size, fdt);
am335x_barebox_entry() calculates the SDRAM size automatically for you.
Doing this has the advantage that you can configure your SDRAM as you
like without having to bother that all other locations where the SDRAM
size is needed are correct.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list