diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/imgtec/malta/malta.c | 14 | ||||
-rw-r--r-- | board/imgtec/malta/superio.c | 10 | ||||
-rw-r--r-- | board/imgtec/malta/superio.h | 2 | ||||
-rw-r--r-- | board/microchip/pic32mzda/Kconfig | 13 | ||||
-rw-r--r-- | board/microchip/pic32mzda/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/microchip/pic32mzda/Makefile | 7 | ||||
-rw-r--r-- | board/microchip/pic32mzda/README | 22 | ||||
-rw-r--r-- | board/microchip/pic32mzda/pic32mzda.c | 31 |
8 files changed, 91 insertions, 14 deletions
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c index cae4a21c3d..e31331aec1 100644 --- a/board/imgtec/malta/malta.c +++ b/board/imgtec/malta/malta.c @@ -130,24 +130,26 @@ void _machine_restart(void) 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; } @@ -179,8 +181,6 @@ void pci_init_board(void) 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, @@ -189,8 +189,6 @@ void pci_init_board(void) 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, diff --git a/board/imgtec/malta/superio.c b/board/imgtec/malta/superio.c index eaa14df39e..7865ae2b70 100644 --- a/board/imgtec/malta/superio.c +++ b/board/imgtec/malta/superio.c @@ -45,19 +45,19 @@ static struct { { SIOCONF_ACTIVATE, 0x01 }, }; -void malta_superio_init(void *io_base) +void malta_superio_init(void) { unsigned i; /* enter config state */ - writeb(SIOCONF_ENTER_SETUP, io_base + SIO_CONF_PORT); + outb(SIOCONF_ENTER_SETUP, SIO_CONF_PORT); /* configure peripherals */ for (i = 0; i < ARRAY_SIZE(sio_config); i++) { - writeb(sio_config[i].key, io_base + SIO_CONF_PORT); - writeb(sio_config[i].data, io_base + SIO_DATA_PORT); + outb(sio_config[i].key, SIO_CONF_PORT); + outb(sio_config[i].data, SIO_DATA_PORT); } /* exit config state */ - writeb(SIOCONF_EXIT_SETUP, io_base + SIO_CONF_PORT); + outb(SIOCONF_EXIT_SETUP, SIO_CONF_PORT); } diff --git a/board/imgtec/malta/superio.h b/board/imgtec/malta/superio.h index 1450da56dd..271c462eac 100644 --- a/board/imgtec/malta/superio.h +++ b/board/imgtec/malta/superio.h @@ -10,6 +10,6 @@ #ifndef __BOARD_MALTA_SUPERIO_H__ #define __BOARD_MALTA_SUPERIO_H__ -extern void malta_superio_init(void *io_base); +void malta_superio_init(void); #endif /* __BOARD_MALTA_SUPERIO_H__ */ diff --git a/board/microchip/pic32mzda/Kconfig b/board/microchip/pic32mzda/Kconfig new file mode 100644 index 0000000000..8acb393369 --- /dev/null +++ b/board/microchip/pic32mzda/Kconfig @@ -0,0 +1,13 @@ + +if TARGET_PIC32MZDASK + +config SYS_BOARD + default "pic32mzda" + +config SYS_VENDOR + default "microchip" + +config SYS_CONFIG_NAME + default "pic32mzdask" + +endif diff --git a/board/microchip/pic32mzda/MAINTAINERS b/board/microchip/pic32mzda/MAINTAINERS new file mode 100644 index 0000000000..c934f1a1f5 --- /dev/null +++ b/board/microchip/pic32mzda/MAINTAINERS @@ -0,0 +1,6 @@ +PIC32MZDASK BOARD +M: Purna Chandra Mandal <purna.mandal@microchip.com> +S: Maintained +F: board/microchip/pic32mzda/ +F: include/configs/pic32mzdask.h +F: configs/pic32mzdask_defconfig diff --git a/board/microchip/pic32mzda/Makefile b/board/microchip/pic32mzda/Makefile new file mode 100644 index 0000000000..36295302a1 --- /dev/null +++ b/board/microchip/pic32mzda/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2015 +# Purna Chandra Mandal, purna.mandal@microchip.com. +# +# SPDX-License-Identifier: GPL-2.0+ +# +obj-y := pic32mzda.o diff --git a/board/microchip/pic32mzda/README b/board/microchip/pic32mzda/README new file mode 100644 index 0000000000..91d16ab7dc --- /dev/null +++ b/board/microchip/pic32mzda/README @@ -0,0 +1,22 @@ +/* + * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com> + */ + +PIC32MZ[DA] Starter Kit +---------------------------------------- +PIC32MZ[DA] Starter Kit is based on PIC32MZ[DA] family of micro-controller. +This family is powered by MIPS M14KEC 32bit general purpose core and has +advanced microcontroller features and peripherals. + +This processor boots with proprietary stage1 bootloader running from internal +boot-flash. Stage1 bootloader inturns locates and jumps to U-Boot programmed +on internal program-flash. Finally U-Boot loads OS image (along with other +required files for booting) from either uSD card, or ethernet, or from USB +storage. + +To boot Linux following three files are mandatory - uEnv.txt (custom U-Boot +environment file), uImage, *.dtb (platform device-tree-blob file). + +U-Boot jumps to Linux using UHI specification. + +Visit http://microchip.com for details. diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c new file mode 100644 index 0000000000..afe2ab8b71 --- /dev/null +++ b/board/microchip/pic32mzda/pic32mzda.c @@ -0,0 +1,31 @@ +/* + * Microchip PIC32MZ[DA] Starter Kit board + * + * Copyright (C) 2015, Microchip Technology Inc. + * Purna Chandra Mandal <purna.mandal@microchip.com> + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +#include <common.h> +#include <dm.h> +#include <clk.h> +#include <mach/pic32.h> + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard(void) +{ + ulong rate = 0; + struct udevice *dev; + + printf("Core: %s\n", get_core_name()); + + if (!uclass_get_device(UCLASS_CLK, 0, &dev)) { + rate = clk_get_rate(dev); + printf("CPU Speed: %lu MHz\n", rate / 1000000); + } + + return 0; +} +#endif |