+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2013 Imagination Technologies
- *
- * SPDX-License-Identifier: GPL-2.0
*/
#include <common.h>
#include <ide.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <pci.h>
#include <pci_gt64120.h>
#include <pci_msc01.h>
#include <rtc.h>
-#include <serial.h>
+#include <linux/delay.h>
#include <asm/addrspace.h>
#include <asm/io.h>
#include "superio.h"
+DECLARE_GLOBAL_DATA_PTR;
+
enum core_card {
CORE_UNKNOWN,
CORE_LV,
}
}
-phys_size_t initdram(int board_type)
+int dram_init(void)
{
- return CONFIG_SYS_MEM_SIZE;
+ gd->ram_size = CONFIG_SYS_MEM_SIZE;
+
+ return 0;
}
int checkboard(void)
{
enum core_card core;
- malta_lcd_puts("U-boot");
+ malta_lcd_puts("U-Boot");
puts("Board: MIPS Malta");
core = malta_core_card();
int board_early_init_f(void)
{
- void *io_base;
+ ulong io_base;
/* choose correct PCI I/O base */
switch (malta_sys_con()) {
case SYSCON_GT64120:
- io_base = (void *)CKSEG1ADDR(MALTA_GT_PCIIO_BASE);
+ io_base = CKSEG1ADDR(MALTA_GT_PCIIO_BASE);
break;
case SYSCON_MSC01:
- io_base = (void *)CKSEG1ADDR(MALTA_MSC01_PCIIO_BASE);
+ io_base = CKSEG1ADDR(MALTA_MSC01_PCIIO_BASE);
break;
default:
return -1;
}
+ set_io_port_base(io_base);
+
/* setup FDC37M817 super I/O controller */
- malta_superio_init(io_base);
+ malta_superio_init();
return 0;
}
return 0;
}
-struct serial_device *default_serial_console(void)
-{
- switch (malta_sys_con()) {
- case SYSCON_GT64120:
- return &eserial1_device;
-
- default:
- case SYSCON_MSC01:
- return &eserial2_device;
- }
-}
-
void pci_init_board(void)
{
pci_dev_t bdf;
switch (malta_sys_con()) {
case SYSCON_GT64120:
- set_io_port_base(CKSEG1ADDR(MALTA_GT_PCIIO_BASE));
-
gt64120_pci_init((void *)CKSEG1ADDR(MALTA_GT_BASE),
0x00000000, 0x00000000, CONFIG_SYS_MEM_SIZE,
0x10000000, 0x10000000, 128 * 1024 * 1024,
default:
case SYSCON_MSC01:
- set_io_port_base(CKSEG1ADDR(MALTA_MSC01_PCIIO_BASE));
-
msc01_pci_init((void *)CKSEG1ADDR(MALTA_MSC01_PCI_BASE),
0x00000000, 0x00000000, CONFIG_SYS_MEM_SIZE,
MALTA_MSC01_PCIMEM_MAP,