upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
11 years ago
|
/*
|
||
10 years ago
|
* Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
|
||
11 years ago
|
*
|
||
|
* SPDX-License-Identifier: GPL-2.0+
|
||
|
*/
|
||
|
|
||
|
#include <common.h>
|
||
10 years ago
|
#include <linux/io.h>
|
||
9 years ago
|
|
||
|
#include "../init.h"
|
||
|
#include "../sg-regs.h"
|
||
|
#include "sbc-regs.h"
|
||
11 years ago
|
|
||
9 years ago
|
#define SBCTRL0_ADMULTIPLX_PERI_VALUE 0x33120000
|
||
|
#define SBCTRL1_ADMULTIPLX_PERI_VALUE 0x03005500
|
||
|
#define SBCTRL2_ADMULTIPLX_PERI_VALUE 0x14000020
|
||
|
|
||
|
#define SBCTRL0_ADMULTIPLX_MEM_VALUE 0x33120000
|
||
|
#define SBCTRL1_ADMULTIPLX_MEM_VALUE 0x03005500
|
||
|
#define SBCTRL2_ADMULTIPLX_MEM_VALUE 0x14000010
|
||
|
|
||
|
int sbc_admulti_init(const struct uniphier_board_data *bd)
|
||
11 years ago
|
{
|
||
|
/*
|
||
|
* Only CS1 is connected to support card.
|
||
|
* BKSZ[1:0] should be set to "01".
|
||
|
*/
|
||
9 years ago
|
writel(SBCTRL0_ADMULTIPLX_MEM_VALUE, SBCTRL10);
|
||
|
writel(SBCTRL1_ADMULTIPLX_MEM_VALUE, SBCTRL11);
|
||
|
writel(SBCTRL2_ADMULTIPLX_MEM_VALUE, SBCTRL12);
|
||
11 years ago
|
|
||
10 years ago
|
if (boot_is_swapped()) {
|
||
11 years ago
|
/*
|
||
|
* Boot Swap On: boot from external NOR/SRAM
|
||
10 years ago
|
* 0x42000000-0x43ffffff is a mirror of 0x40000000-0x41ffffff.
|
||
11 years ago
|
*
|
||
10 years ago
|
* 0x40000000-0x41efffff, 0x42000000-0x43efffff: memory bank
|
||
|
* 0x41f00000-0x41ffffff, 0x43f00000-0x43ffffff: peripherals
|
||
11 years ago
|
*/
|
||
|
writel(0x0000bc01, SBBASE0);
|
||
10 years ago
|
} else {
|
||
|
/*
|
||
|
* Boot Swap Off: boot from mask ROM
|
||
10 years ago
|
* 0x40000000-0x41ffffff: mask ROM
|
||
|
* 0x42000000-0x43efffff: memory bank (31MB)
|
||
|
* 0x43f00000-0x43ffffff: peripherals (1MB)
|
||
10 years ago
|
*/
|
||
|
writel(0x0000be01, SBBASE0); /* dummy */
|
||
|
writel(0x0200be01, SBBASE1);
|
||
11 years ago
|
}
|
||
10 years ago
|
|
||
|
return 0;
|
||
11 years ago
|
}
|