2013-05-22 03:57:37 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Gabor Juhos <juhosg@openwrt.org>
|
|
|
|
*
|
2013-07-24 13:34:30 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0
|
2013-05-22 03:57:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2013-05-22 03:57:44 +00:00
|
|
|
#include <netdev.h>
|
2013-05-22 03:57:37 +00:00
|
|
|
|
2013-05-22 03:57:42 +00:00
|
|
|
#include <asm/addrspace.h>
|
2013-05-22 03:57:38 +00:00
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/malta.h>
|
2013-05-22 03:57:42 +00:00
|
|
|
#include <pci_gt64120.h>
|
2013-05-22 03:57:38 +00:00
|
|
|
|
2013-05-22 03:57:37 +00:00
|
|
|
phys_size_t initdram(int board_type)
|
|
|
|
{
|
|
|
|
return CONFIG_SYS_MEM_SIZE;
|
|
|
|
}
|
|
|
|
|
|
|
|
int checkboard(void)
|
|
|
|
{
|
|
|
|
puts("Board: MIPS Malta CoreLV (Qemu)\n");
|
|
|
|
return 0;
|
|
|
|
}
|
2013-05-22 03:57:38 +00:00
|
|
|
|
2013-05-22 03:57:44 +00:00
|
|
|
int board_eth_init(bd_t *bis)
|
|
|
|
{
|
|
|
|
return pci_eth_init(bis);
|
|
|
|
}
|
|
|
|
|
2013-05-22 03:57:38 +00:00
|
|
|
void _machine_restart(void)
|
|
|
|
{
|
|
|
|
void __iomem *reset_base;
|
|
|
|
|
|
|
|
reset_base = (void __iomem *)CKSEG1ADDR(MALTA_RESET_BASE);
|
|
|
|
__raw_writel(GORESET, reset_base);
|
|
|
|
}
|
2013-05-22 03:57:42 +00:00
|
|
|
|
|
|
|
void pci_init_board(void)
|
|
|
|
{
|
|
|
|
set_io_port_base(CKSEG1ADDR(MALTA_IO_PORT_BASE));
|
|
|
|
|
|
|
|
gt64120_pci_init((void *)CKSEG1ADDR(MALTA_GT_BASE),
|
|
|
|
0x00000000, 0x00000000, CONFIG_SYS_MEM_SIZE,
|
|
|
|
0x10000000, 0x10000000, 128 * 1024 * 1024,
|
|
|
|
0x00000000, 0x00000000, 0x20000);
|
|
|
|
}
|