From cf628f772ef2faa9d39563dd42bd2fadf2b194f9 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Tue, 11 Apr 2017 18:24:25 +0300 Subject: [PATCH 1/8] arc: arcv1: Disable master/slave check ARCompact cores are not supposed to be used in SMP designs (this doesn't stop people from creation of heterogeneous chips, for an example keep reading) so there's no point in checking ARCNUM and halting somebody if we build for ARC700. Moreover on AXS101 board we have ARC770 in the ASIC together with other ARC cores and ARC770 happens to be the last node in JTAG chain with ARCNUM = 4. And existing check halts the one and only core we want keep running. Signed-off-by: Alexey Brodkin --- arch/arc/lib/start.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S index b2ba7683097..95d64f9d437 100644 --- a/arch/arc/lib/start.S +++ b/arch/arc/lib/start.S @@ -10,6 +10,9 @@ #include ENTRY(_start) +; ARCompact devices are not supposed to be SMP so master/slave check +; makes no sense. +#ifdef CONFIG_ISA_ARCV2 ; Non-masters will be halted immediately, they might be kicked later ; by platform code right before passing control to the Linux kernel ; in bootm.c:boot_jump_linux(). @@ -25,6 +28,7 @@ ENTRY(_start) nop .Lmaster_proceed: +#endif /* Setup interrupt vector base that matches "__text_start" */ sr __ivt_start, [ARC_AUX_INTR_VEC_BASE] From 02d488b6c55737c5397785f2ee7c374745507412 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Tue, 18 Apr 2017 21:21:56 +0300 Subject: [PATCH 2/8] axs101: Enable data cache There's no reason to keep data cache disabled in axs101 board any longer, enabling it. Signed-off-by: Alexey Brodkin --- configs/axs101_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/axs101_defconfig b/configs/axs101_defconfig index 1af505d9ebc..b9ea1c6dea2 100644 --- a/configs/axs101_defconfig +++ b/configs/axs101_defconfig @@ -1,5 +1,4 @@ CONFIG_ARC=y -CONFIG_SYS_DCACHE_OFF=y CONFIG_TARGET_AXS101=y CONFIG_SYS_TEXT_BASE=0x81000000 CONFIG_SYS_CLK_FREQ=750000000 From f04796b4a9eba7e1c2a906ecbb6872f9927a407a Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Tue, 18 Apr 2017 21:24:14 +0300 Subject: [PATCH 3/8] axs10x: Add support of Ext2/4 FS Those could be easily used on USB flash drives or on SD/MMC cards. Signed-off-by: Alexey Brodkin --- configs/axs101_defconfig | 3 +++ configs/axs103_defconfig | 3 +++ 2 files changed, 6 insertions(+) diff --git a/configs/axs101_defconfig b/configs/axs101_defconfig index b9ea1c6dea2..9d7dc7f7c05 100644 --- a/configs/axs101_defconfig +++ b/configs/axs101_defconfig @@ -13,6 +13,9 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig index fb8e72ff6c9..bcd4754eef7 100644 --- a/configs/axs103_defconfig +++ b/configs/axs103_defconfig @@ -13,6 +13,9 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y From 06bd1d7f9543db71851d8bac026c321ee6cd3b86 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Fri, 21 Apr 2017 11:04:19 +0300 Subject: [PATCH 4/8] boards: axs10x, nsim, tb100: Enable cmdline history Enable shell commands history on ARC boards for more convenience of users. Signed-off-by: Alexey Brodkin --- include/configs/axs10x.h | 1 + include/configs/nsim.h | 1 + include/configs/tb100.h | 1 + 3 files changed, 3 insertions(+) diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h index 66e8cd5e9a4..e78a7a140a1 100644 --- a/include/configs/axs10x.h +++ b/include/configs/axs10x.h @@ -96,6 +96,7 @@ #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_MAXARGS 16 +#define CONFIG_CMDLINE_EDITING /* * Environment settings diff --git a/include/configs/nsim.h b/include/configs/nsim.h index d6d26c74b43..5bbf6108463 100644 --- a/include/configs/nsim.h +++ b/include/configs/nsim.h @@ -37,6 +37,7 @@ */ #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_MAXARGS 16 +#define CONFIG_CMDLINE_EDITING /* * Environment settings diff --git a/include/configs/tb100.h b/include/configs/tb100.h index 115b3b3c5be..fe8e6c4e3b3 100644 --- a/include/configs/tb100.h +++ b/include/configs/tb100.h @@ -60,6 +60,7 @@ #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_MAXARGS 16 +#define CONFIG_CMDLINE_EDITING /* * Environment settings From c2a7ee226d38e943a5643b244f4190458e67b064 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Thu, 1 Jun 2017 16:27:27 +0300 Subject: [PATCH 5/8] axs10x: Get rid of both I2C and EEPROM who used to use I2C With eb5ba3aefdf0 "i2c: Drop use of CONFIG_I2C_HARD" in place we cannot use I2C EEPROM any longer so we're dropping all references to both EEPROM and I2C which was only used for EEPROM. Signed-off-by: Alexey Brodkin Cc: Simon Glass --- configs/axs101_defconfig | 1 - configs/axs103_defconfig | 1 - include/configs/axs10x.h | 26 -------------------------- 3 files changed, 28 deletions(-) diff --git a/configs/axs101_defconfig b/configs/axs101_defconfig index 9d7dc7f7c05..0b156524934 100644 --- a/configs/axs101_defconfig +++ b/configs/axs101_defconfig @@ -21,7 +21,6 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y -CONFIG_SYS_I2C_DW=y CONFIG_MMC=y CONFIG_MMC_DW=y CONFIG_DM_ETH=y diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig index bcd4754eef7..add24cfe229 100644 --- a/configs/axs103_defconfig +++ b/configs/axs103_defconfig @@ -21,7 +21,6 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y -CONFIG_SYS_I2C_DW=y CONFIG_MMC=y CONFIG_MMC_DW=y CONFIG_DM_ETH=y diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h index e78a7a140a1..5ecdc764ace 100644 --- a/include/configs/axs10x.h +++ b/include/configs/axs10x.h @@ -51,32 +51,6 @@ #define CONFIG_SYS_NS16550_CLK 33333333 #define CONFIG_SYS_NS16550_MEM32 -/* - * I2C configuration - */ -#define CONFIG_SYS_I2C -#define CONFIG_I2C_ENV_EEPROM_BUS 2 -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SYS_I2C_SPEED1 100000 -#define CONFIG_SYS_I2C_SPEED2 100000 -#define CONFIG_SYS_I2C_SLAVE 0 -#define CONFIG_SYS_I2C_SLAVE1 0 -#define CONFIG_SYS_I2C_SLAVE2 0 -#define CONFIG_SYS_I2C_BASE 0xE001D000 -#define CONFIG_SYS_I2C_BASE1 0xE001E000 -#define CONFIG_SYS_I2C_BASE2 0xE001F000 -#define CONFIG_SYS_I2C_BUS_MAX 3 -#define IC_CLK 50 - -/* - * EEPROM configuration - */ -#define CONFIG_SYS_I2C_EEPROM_ADDR (0xA8 >> 1) -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 -#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 1 -#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 -#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 64 - /* * Ethernet PHY configuration */ From ef41e9d33e1ba524ef4bb0919959e2db92a2547c Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Thu, 1 Jun 2017 17:09:38 +0300 Subject: [PATCH 6/8] axs10x: Move environment from I2C EEPROM to SD-card With deprecation of I2C EEPROM we we left without a permamnent storage for U-Boot environment, but luckily we may simply use SD-card with FAT partition for that. Having environment on SD-card is much more convenient as it allows us to preserve all the settings when moving from one board to another. Moreover instead of 256 bytes of EEPROM we're now virtually unlimited in stuff being placed in environment like complicated scripts etc which are usually required in case of full-scale distros. Signed-off-by: Alexey Brodkin --- include/configs/axs10x.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h index 5ecdc764ace..908b0188009 100644 --- a/include/configs/axs10x.h +++ b/include/configs/axs10x.h @@ -75,9 +75,12 @@ /* * Environment settings */ -#define CONFIG_ENV_IS_NOWHERE -#define CONFIG_ENV_SIZE SZ_512 -#define CONFIG_ENV_OFFSET 0 +#define CONFIG_ENV_IS_IN_FAT +#define CONFIG_ENV_SIZE SZ_16K +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0:1" +#define FAT_ENV_FILE "uboot.env" +#define CONFIG_FAT_WRITE /* * Environment configuration From 97a63144a906827ad7e3c4ef18d641c2765b1ebc Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Mon, 26 Jun 2017 11:46:47 +0300 Subject: [PATCH 7/8] arcv2: Set IOC aperture so it covers available DDR We used to use the same memory layout and size for a couple of boards and thus we just hardcoding IOC aperture start and size. Now when we're getting more boards with more memory on board we need to have an ability to set IOC so it matches real DDR layout and size. Even though it is not really a must but for simplicity we assume IOC covers all the DDR we have, that gives us a chance to not bother where DMA buffers are allocated - any part of DDR is OK. Signed-off-by: Alexey Brodkin --- arch/arc/lib/cache.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c index f1436bf1999..cbae27e9fce 100644 --- a/arch/arc/lib/cache.c +++ b/arch/arc/lib/cache.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -215,17 +216,33 @@ void cache_init(void) read_decode_cache_bcr_arcv2(); if (ioc_exists) { + /* IOC Aperture start is equal to DDR start */ + unsigned int ap_base = CONFIG_SYS_SDRAM_BASE; + /* IOC Aperture size is equal to DDR size */ + long ap_size = CONFIG_SYS_SDRAM_SIZE; + flush_dcache_all(); invalidate_dcache_all(); - /* IO coherency base - 0x8z */ - write_aux_reg(ARC_AUX_IO_COH_AP0_BASE, 0x80000); - /* IO coherency aperture size - 512Mb: 0x8z-0xAz */ - write_aux_reg(ARC_AUX_IO_COH_AP0_SIZE, 0x11); - /* Enable partial writes */ + if (!is_power_of_2(ap_size) || ap_size < 4096) + panic("IOC Aperture size must be power of 2 and bigger 4Kib"); + + /* + * IOC Aperture size decoded as 2 ^ (SIZE + 2) KB, + * so setting 0x11 implies 512M, 0x12 implies 1G... + */ + write_aux_reg(ARC_AUX_IO_COH_AP0_SIZE, + order_base_2(ap_size/1024) - 2); + + + /* IOC Aperture start must be aligned to the size of the aperture */ + if (ap_base % ap_size != 0) + panic("IOC Aperture start must be aligned to the size of the aperture"); + + write_aux_reg(ARC_AUX_IO_COH_AP0_BASE, ap_base >> 12); write_aux_reg(ARC_AUX_IO_COH_PARTIAL, 1); - /* Enable IO coherency */ write_aux_reg(ARC_AUX_IO_COH_ENABLE, 1); + } #endif } From 67482f57e6127d7d3e216dae6860dac7b33132d5 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Fri, 25 Nov 2016 16:23:43 +0300 Subject: [PATCH 8/8] arc: Add support for HS Development Kit board ARC HS Development Kit board is a new low-cost development platform sporting ARC HS38 in real silicon with nice set of features such as: * Quad-core ARC HS38 with 512 kB L2 cache and running @1GHz * 4Gb of DDR (we use only lowest 1Gb out of it now) * Lots of DesigWare peripherals * Different connectivity modules: - Synopsys HAPS HT3 - Arduino-compatible connector - MikroBUS This initial commit supports the following peripherals: * UART (DW 8250) * Ethernet (DW GMAC) * SD/MMC (DW Mobile Storage) * USB 1.1 & 2.0 Signed-off-by: Alexey Brodkin --- arch/arc/Kconfig | 4 ++ arch/arc/dts/Makefile | 1 + arch/arc/dts/hsdk.dts | 50 ++++++++++++++++++ board/synopsys/hsdk/Kconfig | 12 +++++ board/synopsys/hsdk/MAINTAINERS | 5 ++ board/synopsys/hsdk/Makefile | 7 +++ board/synopsys/hsdk/hsdk.c | 74 ++++++++++++++++++++++++++ configs/hsdk_defconfig | 37 +++++++++++++ include/configs/hsdk.h | 93 +++++++++++++++++++++++++++++++++ 9 files changed, 283 insertions(+) create mode 100644 arch/arc/dts/hsdk.dts create mode 100644 board/synopsys/hsdk/Kconfig create mode 100644 board/synopsys/hsdk/MAINTAINERS create mode 100644 board/synopsys/hsdk/Makefile create mode 100644 board/synopsys/hsdk/hsdk.c create mode 100644 configs/hsdk_defconfig create mode 100644 include/configs/hsdk.h diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 6e4b1d0e229..e3f9db7b297 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -132,10 +132,14 @@ config TARGET_AXS101 config TARGET_AXS103 bool "Support Synopsys Designware SDP board AXS103" +config TARGET_HSDK + bool "Support Synpsys HS DevelopmentKit board" + endchoice source "board/abilis/tb100/Kconfig" source "board/synopsys/Kconfig" source "board/synopsys/axs10x/Kconfig" +source "board/synopsys/hsdk/Kconfig" endmenu diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile index 218a6475dd5..63a66947128 100644 --- a/arch/arc/dts/Makefile +++ b/arch/arc/dts/Makefile @@ -6,6 +6,7 @@ dtb-$(CONFIG_TARGET_AXS101) += axs101.dtb dtb-$(CONFIG_TARGET_AXS103) += axs103.dtb dtb-$(CONFIG_TARGET_NSIM) += nsim.dtb dtb-$(CONFIG_TARGET_TB100) += abilis_tb100.dtb +dtb-$(CONFIG_TARGET_HSDK) += hsdk.dtb targets += $(dtb-y) diff --git a/arch/arc/dts/hsdk.dts b/arch/arc/dts/hsdk.dts new file mode 100644 index 00000000000..a7b276c01eb --- /dev/null +++ b/arch/arc/dts/hsdk.dts @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2017 Synopsys, Inc. All rights reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; + +#include "skeleton.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + + aliases { + console = &uart0; + }; + + cpu_card { + core_clk: core_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <1000000000>; + u-boot,dm-pre-reloc; + }; + }; + + uart0: serial0@f0005000 { + compatible = "snps,dw-apb-uart"; + reg = <0xf0005000 0x1000>; + reg-shift = <2>; + reg-io-width = <4>; + }; + + ethernet@f0008000 { + #interrupt-cells = <1>; + compatible = "altr,socfpga-stmmac"; + reg = <0xf0008000 0x2000>; + phy-mode = "gmii"; + }; + + ehci@0xf0040000 { + compatible = "generic-ehci"; + reg = <0xf0040000 0x100>; + }; + + ohci@0xf0060000 { + compatible = "generic-ohci"; + reg = <0xf0060000 0x100>; + }; +}; diff --git a/board/synopsys/hsdk/Kconfig b/board/synopsys/hsdk/Kconfig new file mode 100644 index 00000000000..e8c00a6e7d0 --- /dev/null +++ b/board/synopsys/hsdk/Kconfig @@ -0,0 +1,12 @@ +if TARGET_HSDK + +config SYS_BOARD + default "hsdk" + +config SYS_VENDOR + default "synopsys" + +config SYS_CONFIG_NAME + default "hsdk" + +endif diff --git a/board/synopsys/hsdk/MAINTAINERS b/board/synopsys/hsdk/MAINTAINERS new file mode 100644 index 00000000000..d034bc479d0 --- /dev/null +++ b/board/synopsys/hsdk/MAINTAINERS @@ -0,0 +1,5 @@ +AXS10X BOARD +M: Alexey Brodkin +S: Maintained +F: board/synopsys/hsdk/ +F: configs/hsdk_defconfig diff --git a/board/synopsys/hsdk/Makefile b/board/synopsys/hsdk/Makefile new file mode 100644 index 00000000000..d84dd032652 --- /dev/null +++ b/board/synopsys/hsdk/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (C) 2017 Synopsys, Inc. All rights reserved. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += hsdk.o diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c new file mode 100644 index 00000000000..7b562556e6b --- /dev/null +++ b/board/synopsys/hsdk/hsdk.c @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2017 Synopsys, Inc. All rights reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#define CREG_BASE (ARC_PERIPHERAL_BASE + 0x1000) +#define CREG_PAE (CREG_BASE + 0x180) +#define CREG_PAE_UPDATE (CREG_BASE + 0x194) +#define CREG_CPU_START (CREG_BASE + 0x400) + +int board_early_init_f(void) +{ + /* In current chip PAE support for DMA is broken, disabling it. */ + writel(0, (void __iomem *) CREG_PAE); + + /* Really apply settings made above */ + writel(1, (void __iomem *) CREG_PAE_UPDATE); + + return 0; +} + +int board_mmc_init(bd_t *bis) +{ + struct dwmci_host *host = NULL; + + host = malloc(sizeof(struct dwmci_host)); + if (!host) { + printf("dwmci_host malloc fail!\n"); + return 1; + } + + memset(host, 0, sizeof(struct dwmci_host)); + host->name = "Synopsys Mobile storage"; + host->ioaddr = (void *)ARC_DWMMC_BASE; + host->buswidth = 4; + host->dev_index = 0; + host->bus_hz = 100000000; + + add_dwmci(host, host->bus_hz / 2, 400000); + + return 0; +} + +#define RESET_VECTOR_ADDR 0x0 + +void smp_set_core_boot_addr(unsigned long addr, int corenr) +{ + /* All cores have reset vector pointing to 0 */ + writel(addr, (void __iomem *)RESET_VECTOR_ADDR); + + /* Make sure other cores see written value in memory */ + flush_dcache_all(); +} + +void smp_kick_all_cpus(void) +{ +#define BITS_START_CORE1 1 +#define BITS_START_CORE2 2 +#define BITS_START_CORE3 3 + + int cmd = readl((void __iomem *)CREG_CPU_START); + + cmd |= (1 << BITS_START_CORE1) | + (1 << BITS_START_CORE2) | + (1 << BITS_START_CORE3); + writel(cmd, (void __iomem *)CREG_CPU_START); +} diff --git a/configs/hsdk_defconfig b/configs/hsdk_defconfig new file mode 100644 index 00000000000..0018c0482e0 --- /dev/null +++ b/configs/hsdk_defconfig @@ -0,0 +1,37 @@ +CONFIG_ARC=y +CONFIG_ISA_ARCV2=y +CONFIG_TARGET_HSDK=y +CONFIG_SYS_TEXT_BASE=0x81000000 +CONFIG_SYS_CLK_FREQ=1000000000 +CONFIG_DEFAULT_DEVICE_TREE="hsdk" +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_SYS_PROMPT="hsdk# " +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_PING=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_OF_EMBED=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM=y +CONFIG_MMC=y +CONFIG_MMC_DW=y +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_GENERIC=y +CONFIG_USB_STORAGE=y +CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h new file mode 100644 index 00000000000..28ac090c052 --- /dev/null +++ b/include/configs/hsdk.h @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2017 Synopsys, Inc. All rights reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _CONFIG_HSDK_H_ +#define _CONFIG_HSDK_H_ + +#include + +/* + * CPU configuration + */ +#define ARC_PERIPHERAL_BASE 0xF0000000 +#define ARC_DWMMC_BASE (ARC_PERIPHERAL_BASE + 0xA000) +#define ARC_DWGMAC_BASE (ARC_PERIPHERAL_BASE + 0x18000) + +/* + * Memory configuration + */ +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE + +#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000 +#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE +#define CONFIG_SYS_SDRAM_SIZE SZ_1G + +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) + +#define CONFIG_SYS_MALLOC_LEN SZ_2M +#define CONFIG_SYS_BOOTM_LEN SZ_32M +#define CONFIG_SYS_LOAD_ADDR 0x82000000 + +/* + * This board might be of different versions so handle it + */ +#define CONFIG_BOARD_TYPES + +/* + * UART configuration + */ +#define CONFIG_DW_SERIAL +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_CLK 33330000 +#define CONFIG_SYS_NS16550_MEM32 + +/* + * Ethernet PHY configuration + */ +#define CONFIG_MII + +/* + * USB 1.1 configuration + */ +#define CONFIG_USB_OHCI_NEW +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1 + +/* + * Environment settings + */ +#define CONFIG_ENV_SIZE SZ_16K +#define CONFIG_ENV_IS_IN_FAT +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0:1" +#define FAT_ENV_FILE "uboot.env" +#define CONFIG_FAT_WRITE + +/* + * Environment configuration + */ +#define CONFIG_BOOTFILE "uImage" +#define CONFIG_BOOTARGS "console=ttyS0,115200n8" +#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR + +/* + * Console configuration + */ +#define CONFIG_AUTO_COMPLETE +#define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_CBSIZE SZ_256 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) + +/* + * Misc utility configuration + */ +#define CONFIG_BOUNCE_BUFFER + +#endif /* _CONFIG_HSDK_H_ */