mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-20 03:33:20 +09:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
85 lines
1.9 KiB
C
85 lines
1.9 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* WORK Microwave work_92105 board support
|
|
*
|
|
* (C) Copyright 2014 DENX Software Engineering GmbH
|
|
* Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/sys_proto.h>
|
|
#include <asm/arch/cpu.h>
|
|
#include <asm/arch/emc.h>
|
|
#include <asm/gpio.h>
|
|
#include <spl.h>
|
|
#include "work_92105_display.h"
|
|
|
|
struct emc_dram_settings dram_64mb = {
|
|
.cmddelay = 0x0001C000,
|
|
.config0 = 0x00005682,
|
|
.rascas0 = 0x00000302,
|
|
.rdconfig = 0x00000011,
|
|
.trp = 52631578,
|
|
.tras = 20833333,
|
|
.tsrex = 12500000,
|
|
.twr = 66666666,
|
|
.trc = 13888888,
|
|
.trfc = 10256410,
|
|
.txsr = 12500000,
|
|
.trrd = 1,
|
|
.tmrd = 1,
|
|
.tcdlr = 0,
|
|
.refresh = 128000,
|
|
.mode = 0x00018000,
|
|
.emode = 0x02000000
|
|
};
|
|
|
|
const struct emc_dram_settings dram_128mb = {
|
|
.cmddelay = 0x0001C000,
|
|
.config0 = 0x00005882,
|
|
.rascas0 = 0x00000302,
|
|
.rdconfig = 0x00000011,
|
|
.trp = 52631578,
|
|
.tras = 22222222,
|
|
.tsrex = 8333333,
|
|
.twr = 66666666,
|
|
.trc = 14814814,
|
|
.trfc = 10256410,
|
|
.txsr = 8333333,
|
|
.trrd = 1,
|
|
.tmrd = 1,
|
|
.tcdlr = 0,
|
|
.refresh = 128000,
|
|
.mode = 0x00030000,
|
|
.emode = 0x02000000
|
|
};
|
|
|
|
void spl_board_init(void)
|
|
{
|
|
/* initialize serial port for console */
|
|
lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
|
|
/* initialize console */
|
|
preloader_console_init();
|
|
/* init DDR and NAND to chainload U-Boot */
|
|
ddr_init(&dram_128mb);
|
|
/*
|
|
* If this is actually a 64MB module, then the highest column
|
|
* bit in any address will be ignored, and thus address 0x80000000
|
|
* should be mirrored at address 0x80000800. Test this.
|
|
*/
|
|
writel(0x31415926, 0x80000000); /* write Pi at 0x80000000 */
|
|
writel(0x16180339, 0x80000800); /* write Phi at 0x80000800 */
|
|
if (readl(0x80000000) == 0x16180339) /* check 0x80000000 */ {
|
|
/* actually 64MB mirrored: reconfigure controller */
|
|
ddr_init(&dram_64mb);
|
|
}
|
|
/* initialize NAND controller to load U-Boot from NAND */
|
|
lpc32xx_mlc_nand_init();
|
|
}
|
|
|
|
u32 spl_boot_device(void)
|
|
{
|
|
return BOOT_DEVICE_NAND;
|
|
}
|