mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
configs: enable tiny config for ipq5332
Change-Id: I19394ce3852e26cc9cb2f25b220e2dbea044e863 Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
This commit is contained in:
parent
9907ad8d46
commit
c8f05e9e69
6 changed files with 63 additions and 46 deletions
|
|
@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_IPQ5018) += ipq5018-db-mp02.1.dtb \
|
||||||
ipq5018-db-mp03.1.dtb
|
ipq5018-db-mp03.1.dtb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_IPQ_TINY),y)
|
||||||
dtb-$(CONFIG_ARCH_IPQ5332) += ipq5332-emulation.dtb \
|
dtb-$(CONFIG_ARCH_IPQ5332) += ipq5332-emulation.dtb \
|
||||||
ipq5332-mi01.2.dtb \
|
ipq5332-mi01.2.dtb \
|
||||||
ipq5332-mi01.2-qcn9160-c1.dtb \
|
ipq5332-mi01.2-qcn9160-c1.dtb \
|
||||||
|
|
@ -103,6 +104,11 @@ dtb-$(CONFIG_ARCH_IPQ5332) += ipq5332-emulation.dtb \
|
||||||
ipq5332-db-mi01.1.dtb \
|
ipq5332-db-mi01.1.dtb \
|
||||||
ipq5332-db-mi02.1.dtb \
|
ipq5332-db-mi02.1.dtb \
|
||||||
ipq5332-db-mi03.1.dtb
|
ipq5332-db-mi03.1.dtb
|
||||||
|
else
|
||||||
|
dtb-$(CONFIG_ARCH_IPQ5332) += ipq5332-mi01.3.dtb \
|
||||||
|
ipq5332-mi04.1.dtb \
|
||||||
|
ipq5332-db-mi02.1.dtb
|
||||||
|
endif
|
||||||
|
|
||||||
dtb-$(CONFIG_ARCH_IPQ6018) += ipq6018-cp01-c1.dtb \
|
dtb-$(CONFIG_ARCH_IPQ6018) += ipq6018-cp01-c1.dtb \
|
||||||
ipq6018-cp02-c1.dtb \
|
ipq6018-cp02-c1.dtb \
|
||||||
|
|
|
||||||
|
|
@ -387,10 +387,10 @@ int board_fix_fdt(void *rw_fdt_blob)
|
||||||
#ifdef CONFIG_FLASH_PROTECT
|
#ifdef CONFIG_FLASH_PROTECT
|
||||||
void board_flash_protect(void)
|
void board_flash_protect(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_QCA_MMC
|
||||||
int num_part;
|
int num_part;
|
||||||
int i;
|
int i;
|
||||||
int ret;
|
int ret;
|
||||||
#ifdef CONFIG_QCA_MMC
|
|
||||||
block_dev_desc_t *mmc_dev;
|
block_dev_desc_t *mmc_dev;
|
||||||
disk_partition_t info;
|
disk_partition_t info;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,8 @@ void ipq_fdt_fixup_version(void *blob)
|
||||||
}
|
}
|
||||||
#endif /* RPM_VERSION */
|
#endif /* RPM_VERSION */
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_IPQ_TINY
|
|
||||||
|
#if defined (CONFIG_IPQ_TINY) && !defined(CONFIG_NAND_FLASH)
|
||||||
#define OFFSET_NOT_SPECIFIED (~0llu)
|
#define OFFSET_NOT_SPECIFIED (~0llu)
|
||||||
struct reg_cell {
|
struct reg_cell {
|
||||||
unsigned int r0;
|
unsigned int r0;
|
||||||
|
|
@ -1063,7 +1064,7 @@ int ft_board_setup(void *blob, bd_t *bd)
|
||||||
int len = sizeof(parts_str), ret;
|
int len = sizeof(parts_str), ret;
|
||||||
qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
|
qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
|
||||||
int activepart = 0;
|
int activepart = 0;
|
||||||
#ifdef CONFIG_IPQ_TINY
|
#if defined (CONFIG_IPQ_TINY) && !defined(CONFIG_NAND_FLASH)
|
||||||
struct flash_node_info nodes[] = {
|
struct flash_node_info nodes[] = {
|
||||||
{ "n25q128a11", MTD_DEV_TYPE_NAND,
|
{ "n25q128a11", MTD_DEV_TYPE_NAND,
|
||||||
CONFIG_IPQ_SPI_NOR_INFO_IDX }
|
CONFIG_IPQ_SPI_NOR_INFO_IDX }
|
||||||
|
|
@ -1134,7 +1135,7 @@ int ft_board_setup(void *blob, bd_t *bd)
|
||||||
|
|
||||||
set_mtdids();
|
set_mtdids();
|
||||||
debug("MTDIDS: %s\n", getenv("mtdids"));
|
debug("MTDIDS: %s\n", getenv("mtdids"));
|
||||||
#ifdef CONFIG_IPQ_TINY
|
#if defined (CONFIG_IPQ_TINY) && !defined(CONFIG_NAND_FLASH)
|
||||||
ipq_nor_fdt_fixup(blob, nodes);
|
ipq_nor_fdt_fixup(blob, nodes);
|
||||||
#else
|
#else
|
||||||
ipq_fdt_fixup_mtdparts(blob, nodes);
|
ipq_fdt_fixup_mtdparts(blob, nodes);
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,15 @@ CONFIG_IPQ_TINY=y
|
||||||
#
|
#
|
||||||
# Info commands
|
# Info commands
|
||||||
#
|
#
|
||||||
# CONFIG_CMD_BDI is not set
|
CONFIG_CMD_BDI=y
|
||||||
# CONFIG_CMD_CONSOLE is not set
|
CONFIG_CMD_CONSOLE=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Boot commands
|
# Boot commands
|
||||||
#
|
#
|
||||||
# CONFIG_CMD_BOOTD is not set
|
# CONFIG_CMD_BOOTD is not set
|
||||||
CONFIG_CMD_BOOTM=y
|
CONFIG_CMD_BOOTM=y
|
||||||
# CONFIG_CMD_GO is not set
|
CONFIG_CMD_GO=y
|
||||||
CONFIG_CMD_RUN=y
|
CONFIG_CMD_RUN=y
|
||||||
# CONFIG_CMD_IMI is not set
|
# CONFIG_CMD_IMI is not set
|
||||||
# CONFIG_CMD_IMLS is not set
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
|
@ -44,7 +44,7 @@ CONFIG_CMD_RUN=y
|
||||||
#
|
#
|
||||||
CONFIG_CMD_EXPORTENV=y
|
CONFIG_CMD_EXPORTENV=y
|
||||||
CONFIG_CMD_IMPORTENV=y
|
CONFIG_CMD_IMPORTENV=y
|
||||||
# CONFIG_CMD_EDITENV is not set
|
CONFIG_CMD_EDITENV=y
|
||||||
CONFIG_CMD_SAVEENV=y
|
CONFIG_CMD_SAVEENV=y
|
||||||
CONFIG_CMD_ENV_EXISTS=y
|
CONFIG_CMD_ENV_EXISTS=y
|
||||||
|
|
||||||
|
|
@ -62,29 +62,41 @@ CONFIG_CMD_CRC32=y
|
||||||
# Device access commands
|
# Device access commands
|
||||||
#
|
#
|
||||||
|
|
||||||
# CONFIG_CMD_DM is not set
|
CONFIG_CMD_DM=y
|
||||||
# CONFIG_CMD_DEMO is not set
|
# CONFIG_CMD_DEMO is not set
|
||||||
# CONFIG_CMD_LOADB is not set
|
CONFIG_CMD_LOADB=y
|
||||||
# CONFIG_CMD_LOADS is not set
|
CONFIG_CMD_LOADS=y
|
||||||
# CONFIG_CMD_FLASH is not set
|
CONFIG_CMD_FLASH=y
|
||||||
# CONFIG_CMD_NAND is not set
|
# CONFIG_CMD_NAND is not set
|
||||||
# CONFIG_CMD_SF is not set
|
# CONFIG_CMD_SF is not set
|
||||||
# CONFIG_CMD_SPI is not set
|
# CONFIG_CMD_SPI is not set
|
||||||
# CONFIG_CMD_I2C is not set
|
# CONFIG_CMD_I2C is not set
|
||||||
# CONFIG_CMD_USB is not set
|
# CONFIG_CMD_USB is not set
|
||||||
# CONFIG_CMD_FPGA is not set
|
CONFIG_CMD_FPGA=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Shell scripting commands
|
# Shell scripting commands
|
||||||
#
|
#
|
||||||
CONFIG_CMD_ECHO=y
|
CONFIG_CMD_ECHO=y
|
||||||
# CONFIG_CMD_ITEST is not set
|
CONFIG_CMD_ITEST=y
|
||||||
CONFIG_CMD_SOURCE=y
|
CONFIG_CMD_SOURCE=y
|
||||||
# CONFIG_CMD_SETEXPR is not set
|
CONFIG_CMD_SETEXPR=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Network commands
|
# Network commands
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Network PHY
|
||||||
|
#
|
||||||
|
# CONFIG_IPQ_QCA_AQUANTIA_PHY is not set
|
||||||
|
# CONFIG_QCA8033_PHY is not set
|
||||||
|
CONFIG_QCA8081_PHY=y
|
||||||
|
CONFIG_QCA8084_PHY=y
|
||||||
|
CONFIG_QCA8084_SWT_MODE=y
|
||||||
|
CONFIG_QCA8084_BYPASS_MODE=y
|
||||||
|
# CONFIG_ATHRS17C_SWITCH is not set
|
||||||
|
|
||||||
CONFIG_CMD_NET=y
|
CONFIG_CMD_NET=y
|
||||||
# CONFIG_CMD_TFTPPUT is not set
|
# CONFIG_CMD_TFTPPUT is not set
|
||||||
# CONFIG_CMD_TFTPSRV is not set
|
# CONFIG_CMD_TFTPSRV is not set
|
||||||
|
|
@ -106,7 +118,7 @@ CONFIG_CMD_MISC=y
|
||||||
# CONFIG_PARTITION_UUIDS is not set
|
# CONFIG_PARTITION_UUIDS is not set
|
||||||
# CONFIG_CMD_TIMER is not set
|
# CONFIG_CMD_TIMER is not set
|
||||||
# CONFIG_IPQ_TZT is not set
|
# CONFIG_IPQ_TZT is not set
|
||||||
# CONFIG_UBI_WRITE is not set
|
CONFIG_UBI_WRITE=y
|
||||||
#
|
#
|
||||||
# Boot timing
|
# Boot timing
|
||||||
#
|
#
|
||||||
|
|
@ -210,12 +222,12 @@ CONFIG_SIMPLE_BUS=y
|
||||||
#
|
#
|
||||||
# Generic NAND options
|
# Generic NAND options
|
||||||
#
|
#
|
||||||
# CONFIG_NAND_FLASH is not set
|
CONFIG_NAND_FLASH=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Serial NAND
|
# Serial NAND
|
||||||
#
|
#
|
||||||
# CONFIG_QPIC_SERIAL is not set
|
CONFIG_QPIC_SERIAL=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# SPI Flash Support
|
# SPI Flash Support
|
||||||
|
|
@ -226,7 +238,7 @@ CONFIG_SIMPLE_BUS=y
|
||||||
# CONFIG_PHYLIB is not set
|
# CONFIG_PHYLIB is not set
|
||||||
# CONFIG_NETDEVICES is not set
|
# CONFIG_NETDEVICES is not set
|
||||||
# CONFIG_IPQ_MTD_NOR is not set
|
# CONFIG_IPQ_MTD_NOR is not set
|
||||||
CONFIG_IPQ_TINY_SPI_NOR=y
|
# CONFIG_IPQ_TINY_SPI_NOR is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# PCI
|
# PCI
|
||||||
|
|
@ -296,15 +308,6 @@ CONFIG_REQUIRE_SERIAL_CONSOLE=y
|
||||||
# File systems
|
# File systems
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
|
||||||
# Ethernet PHY
|
|
||||||
#
|
|
||||||
# CONFIG_QCA8033_PHY is not set
|
|
||||||
# CONFIG_IPQ_QCA_AQUANTIA_PHY is not set
|
|
||||||
# CONFIG_QCA8081_PHY is not set
|
|
||||||
# CONFIG_QCA8084_PHY is not set
|
|
||||||
# CONFIG_ATHRS17C_SWITCH is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Library routines
|
# Library routines
|
||||||
|
|
||||||
|
|
@ -335,17 +338,9 @@ CONFIG_LZMA=y
|
||||||
# CONFIG_ERRNO_STR is not set
|
# CONFIG_ERRNO_STR is not set
|
||||||
# CONFIG_UNIT_TEST is not set
|
# CONFIG_UNIT_TEST is not set
|
||||||
|
|
||||||
#
|
|
||||||
# Thumb2 mode support
|
|
||||||
#
|
|
||||||
CONFIG_SYS_THUMB_BUILD=y
|
CONFIG_SYS_THUMB_BUILD=y
|
||||||
CONFIG_HAS_THUMB2=y
|
CONFIG_HAS_THUMB2=y
|
||||||
|
|
||||||
#
|
|
||||||
# ART uncompression support
|
|
||||||
#
|
|
||||||
CONFIG_ART_COMPRESSED=y
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# DPR support
|
# DPR support
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
#include <phy.h>
|
#include <phy.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <miiphy.h>
|
#include <miiphy.h>
|
||||||
|
#include <memalign.h>
|
||||||
#include <asm/arch-ipq5332/edma_regs.h>
|
#include <asm/arch-ipq5332/edma_regs.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
#include <fdtdec.h>
|
#include <fdtdec.h>
|
||||||
|
|
@ -45,6 +46,10 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
#define IPQ5332_EDMA_MAC_PORT_NO 3
|
#define IPQ5332_EDMA_MAC_PORT_NO 3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_SYS_NONCACHED_MEMORY
|
||||||
|
#define noncached_alloc(a, b) malloc_cache_aligned(a)
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct ipq5332_eth_dev *ipq5332_edma_dev[IPQ5332_EDMA_DEV];
|
static struct ipq5332_eth_dev *ipq5332_edma_dev[IPQ5332_EDMA_DEV];
|
||||||
typedef struct {
|
typedef struct {
|
||||||
phy_info_t *phy_info;
|
phy_info_t *phy_info;
|
||||||
|
|
@ -919,6 +924,10 @@ static int ipq5332_eth_init(struct eth_device *eth_dev, bd_t *this)
|
||||||
int sgmii_mode = EPORT_WRAPPER_SGMII0_RGMII4, sfp_mode = -1;
|
int sgmii_mode = EPORT_WRAPPER_SGMII0_RGMII4, sfp_mode = -1;
|
||||||
char *active_port = NULL;
|
char *active_port = NULL;
|
||||||
|
|
||||||
|
#ifndef CONFIG_SYS_NONCACHED_MEMORY
|
||||||
|
dcache_disable();
|
||||||
|
#endif
|
||||||
|
|
||||||
active_port = getenv("active_port");
|
active_port = getenv("active_port");
|
||||||
if (active_port != NULL) {
|
if (active_port != NULL) {
|
||||||
current_active_port = simple_strtol(active_port, NULL, 10);
|
current_active_port = simple_strtol(active_port, NULL, 10);
|
||||||
|
|
@ -1234,6 +1243,10 @@ static void ipq5332_eth_halt(struct eth_device *dev)
|
||||||
pr_debug("GMAC1 RXBADBYTE_L(0x3a00128c):%x\n", readl(0x3a00128c));
|
pr_debug("GMAC1 RXBADBYTE_L(0x3a00128c):%x\n", readl(0x3a00128c));
|
||||||
pr_debug("GMAC1 RXBADBYTE_H(0x3a001290):%x\n", readl(0x3a001290));
|
pr_debug("GMAC1 RXBADBYTE_H(0x3a001290):%x\n", readl(0x3a001290));
|
||||||
|
|
||||||
|
#ifndef CONFIG_SYS_NONCACHED_MEMORY
|
||||||
|
dcache_enable();
|
||||||
|
#endif
|
||||||
|
|
||||||
pr_info("%s: done\n", __func__);
|
pr_info("%s: done\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1850,7 +1863,9 @@ int ipq5332_edma_init(void *edma_board_cfg)
|
||||||
/*
|
/*
|
||||||
* Init non cache buffer
|
* Init non cache buffer
|
||||||
*/
|
*/
|
||||||
|
#ifdef CONFIG_SYS_NONCACHED_MEMORY
|
||||||
noncached_init();
|
noncached_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
node = fdt_path_offset(gd->fdt_blob, "/ess-switch");
|
node = fdt_path_offset(gd->fdt_blob, "/ess-switch");
|
||||||
#ifdef CONFIG_QCA8084_SWT_MODE
|
#ifdef CONFIG_QCA8084_SWT_MODE
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,9 @@
|
||||||
#define CONFIG_SYS_NO_FLASH
|
#define CONFIG_SYS_NO_FLASH
|
||||||
#define CONFIG_IPQ_NO_RELOC
|
#define CONFIG_IPQ_NO_RELOC
|
||||||
|
|
||||||
|
#ifndef CONFIG_IPQ_TINY
|
||||||
#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20)
|
#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20)
|
||||||
|
#endif /* CONFIG_IPQ_TINY */
|
||||||
|
|
||||||
#define CONFIG_SYS_VSNPRINTF
|
#define CONFIG_SYS_VSNPRINTF
|
||||||
|
|
||||||
|
|
@ -100,7 +102,11 @@
|
||||||
#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE + 0x4 + (x)*0x1000)
|
#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE + 0x4 + (x)*0x1000)
|
||||||
|
|
||||||
#define CONFIG_SYS_SDRAM_BASE 0x40000000
|
#define CONFIG_SYS_SDRAM_BASE 0x40000000
|
||||||
|
#ifdef CONFIG_IPQ_TINY
|
||||||
|
#define CONFIG_SYS_TEXT_BASE 0x4A450000
|
||||||
|
#else
|
||||||
#define CONFIG_SYS_TEXT_BASE 0x4A400000
|
#define CONFIG_SYS_TEXT_BASE 0x4A400000
|
||||||
|
#endif
|
||||||
#define CONFIG_SYS_SDRAM_SIZE 0x10000000
|
#define CONFIG_SYS_SDRAM_SIZE 0x10000000
|
||||||
#define CONFIG_MAX_RAM_BANK_SIZE CONFIG_SYS_SDRAM_SIZE
|
#define CONFIG_MAX_RAM_BANK_SIZE CONFIG_SYS_SDRAM_SIZE
|
||||||
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + (64 << 20))
|
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + (64 << 20))
|
||||||
|
|
@ -158,7 +164,11 @@ extern loff_t board_env_size;
|
||||||
#define CONFIG_ENV_OFFSET board_env_offset
|
#define CONFIG_ENV_OFFSET board_env_offset
|
||||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SIZE_MAX
|
#define CONFIG_ENV_SIZE CONFIG_ENV_SIZE_MAX
|
||||||
#define CONFIG_ENV_RANGE board_env_range
|
#define CONFIG_ENV_RANGE board_env_range
|
||||||
|
#ifdef CONFIG_IPQ_TINY
|
||||||
|
#define CONFIG_SYS_MALLOC_LEN (832 << 10)
|
||||||
|
#else
|
||||||
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE_MAX + (768 << 10))
|
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE_MAX + (768 << 10))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CONFIG_IPQ_NO_MACS 2
|
#define CONFIG_IPQ_NO_MACS 2
|
||||||
|
|
||||||
|
|
@ -206,14 +216,6 @@ extern loff_t board_env_size;
|
||||||
|
|
||||||
#define NUM_ALT_PARTITION 16
|
#define NUM_ALT_PARTITION 16
|
||||||
|
|
||||||
#ifdef CONFIG_IPQ_TINY
|
|
||||||
|
|
||||||
/* undef gzip lib */
|
|
||||||
#undef CONFIG_GZIP
|
|
||||||
#undef CONFIG_ZLIB
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define CONFIG_CMD_BOOTZ
|
#define CONFIG_CMD_BOOTZ
|
||||||
|
|
||||||
/* Mii command support */
|
/* Mii command support */
|
||||||
|
|
@ -223,8 +225,6 @@ extern loff_t board_env_size;
|
||||||
#define CONFIG_CMD_ZIP
|
#define CONFIG_CMD_ZIP
|
||||||
#define CONFIG_GZIP_COMPRESSED
|
#define CONFIG_GZIP_COMPRESSED
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ethernet Configs
|
* Ethernet Configs
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue