summaryrefslogtreecommitdiff
path: root/board/iomega
diff options
context:
space:
mode:
authorTony Dinh <mibodhi@gmail.com>2022-02-01 21:59:27 -0800
committerStefan Roese <sr@denx.de>2022-02-10 07:12:16 +0100
commitf99a169c19149fd005783c37c815518fb5ac9bdf (patch)
tree6272771d3052b202dd714c26307f850cb2064918 /board/iomega
parentfb9ed23c22d770a688092a082cfc459854749bd2 (diff)
downloadu-boot-f99a169c19149fd005783c37c815518fb5ac9bdf.tar.gz
arm: kirkwood: iConnect : Add Ethernet support
- Currently, CONFIG_RESET_PHY_R symbol is used in arch/arm/mach-kirkwood/include/mach/config.h for all Kirkwood boards with mv8831116 PHY, with each board defines the function reset_phy(). Undefine it for this board. - Add board_eth_init(), CONFIG_DM_ETH, and CONFIG_PHY_MARVELL to bring up Ethernet. - Miscellaneous changes: Move constants to .c file and remove header file board/iomega/iconnect/iconnect.h. Add CONFIG_HUSH_PARSER, use BIT macro, and cleanup comments. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/iomega')
-rw-r--r--board/iomega/iconnect/iconnect.c17
-rw-r--r--board/iomega/iconnect/iconnect.h24
2 files changed, 14 insertions, 27 deletions
diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
index 9e123aab00..0387160200 100644
--- a/board/iomega/iconnect/iconnect.c
+++ b/board/iomega/iconnect/iconnect.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
+ * Copyright (C) 2022 Tony Dinh <mibodhi@gmail.com>
* Copyright (C) 2009-2012
* Wojciech Dubowik <wojciech.dubowik@neratec.com>
* Luka Perkov <luka@openwrt.org>
@@ -7,15 +8,20 @@
#include <common.h>
#include <init.h>
-#include <miiphy.h>
+#include <netdev.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <asm/arch/mpp.h>
#include <asm/global_data.h>
-#include "iconnect.h"
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
+#define ICONNECT_OE_LOW (~BIT(7))
+#define ICONNECT_OE_HIGH (~BIT(10))
+#define ICONNECT_OE_VAL_LOW (0)
+#define ICONNECT_OE_VAL_HIGH BIT(10)
+
int board_early_init_f(void)
{
/*
@@ -85,9 +91,14 @@ int board_early_init_f(void)
return 0;
}
+int board_eth_init(struct bd_info *bis)
+{
+ return cpu_eth_init(bis);
+}
+
int board_init(void)
{
- /* adress of boot parameters */
+ /* address of boot parameters */
gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
return 0;
diff --git a/board/iomega/iconnect/iconnect.h b/board/iomega/iconnect/iconnect.h
deleted file mode 100644
index 4f0be71918..0000000000
--- a/board/iomega/iconnect/iconnect.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2009-2012
- * Wojciech Dubowik <wojciech.dubowik@neratec.com>
- * Luka Perkov <luka@openwrt.org>
- */
-
-#ifndef __ICONNECT_H
-#define __ICONNECT_H
-
-#define ICONNECT_OE_LOW (~(1 << 7))
-#define ICONNECT_OE_HIGH (~(1 << 10))
-#define ICONNECT_OE_VAL_LOW (0)
-#define ICONNECT_OE_VAL_HIGH (1 << 10)
-
-/* PHY related */
-#define MV88E1116_LED_FCTRL_REG 10
-#define MV88E1116_CPRSP_CR3_REG 21
-#define MV88E1116_MAC_CTRL_REG 21
-#define MV88E1116_PGADR_REG 22
-#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
-#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
-
-#endif /* __ICONNECT_H */