* [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
@ 2016-05-22 3:59 ` Wills Wang
2016-05-22 11:05 ` Marek Vasut
2016-05-25 23:29 ` Daniel Schwierzeck
2016-05-22 3:59 ` [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset Wills Wang
` (4 subsequent siblings)
5 siblings, 2 replies; 19+ messages in thread
From: Wills Wang @ 2016-05-22 3:59 UTC (permalink / raw)
To: u-boot
We need reset the Ethernet Switch analog part before operation,
or the build-in Ethernet PHY don't work.
Signed-off-by: Wills Wang <wills.wang@live.com>
---
arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 1 +
arch/mips/mach-ath79/reset.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
index a8e51cb..dabcad0 100644
--- a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
+++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
@@ -660,6 +660,7 @@
#define AR933X_RESET_GE1_MDIO BIT(23)
#define AR933X_RESET_GE0_MDIO BIT(22)
+#define AR933X_RESET_ETH_SWITCH_ANALOG BIT(14)
#define AR933X_RESET_GE1_MAC BIT(13)
#define AR933X_RESET_WMAC BIT(11)
#define AR933X_RESET_GE0_MAC BIT(9)
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index 188eccb..a88bcbc 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -81,7 +81,8 @@ static int eth_init_ar933x(void)
MAP_NOCACHE);
const u32 mask = AR933X_RESET_GE0_MAC | AR933X_RESET_GE0_MDIO |
AR933X_RESET_GE1_MAC | AR933X_RESET_GE1_MDIO |
- AR933X_RESET_ETH_SWITCH;
+ AR933X_RESET_ETH_SWITCH |
+ AR933X_RESET_ETH_SWITCH_ANALOG;
/* Clear MDIO slave EN bit. */
clrbits_be32(rregs + AR933X_RESET_REG_BOOTSTRAP, BIT(17));
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
2016-05-22 3:59 ` [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch Wills Wang
@ 2016-05-22 3:59 ` Wills Wang
2016-05-22 11:08 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 4/7] mips: ath79: Rename get_bootstrap into ath79_get_bootstrap Wills Wang
` (3 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 3:59 UTC (permalink / raw)
To: u-boot
Collect all reset operation on platform and move them into a uniform header
Signed-off-by: Wills Wang <wills.wang@live.com>
---
arch/mips/mach-ath79/include/mach/ath79.h | 3 ---
arch/mips/mach-ath79/include/mach/reset.h | 2 ++
board/tplink/wdr4300/wdr4300.c | 1 +
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
index 17af082..18d1e26 100644
--- a/arch/mips/mach-ath79/include/mach/ath79.h
+++ b/arch/mips/mach-ath79/include/mach/ath79.h
@@ -140,9 +140,6 @@ static inline int soc_is_qca956x(void)
return soc_is_tp9343() || soc_is_qca9561();
}
-int ath79_eth_reset(void);
-int ath79_usb_reset(void);
-
void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
diff --git a/arch/mips/mach-ath79/include/mach/reset.h b/arch/mips/mach-ath79/include/mach/reset.h
index c383bfe..7721e1d 100644
--- a/arch/mips/mach-ath79/include/mach/reset.h
+++ b/arch/mips/mach-ath79/include/mach/reset.h
@@ -10,5 +10,7 @@
#include <linux/types.h>
u32 get_bootstrap(void);
+int ath79_eth_reset(void);
+int ath79_usb_reset(void);
#endif /* __ASM_MACH_RESET_H */
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 6e070fd..8382ce0 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -9,6 +9,7 @@
#include <asm/addrspace.h>
#include <asm/types.h>
#include <mach/ath79.h>
+#include <mach/reset.h>
#include <mach/ar71xx_regs.h>
#include <mach/ddr.h>
#include <debug_uart.h>
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/7] mips: ath79: Rename get_bootstrap into ath79_get_bootstrap
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
2016-05-22 3:59 ` [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch Wills Wang
2016-05-22 3:59 ` [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset Wills Wang
@ 2016-05-22 3:59 ` Wills Wang
2016-05-22 11:09 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x Wills Wang
` (2 subsequent siblings)
5 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 3:59 UTC (permalink / raw)
To: u-boot
Add a platform prefix for function name in order to make more readable
Signed-off-by: Wills Wang <wills.wang@live.com>
---
arch/mips/mach-ath79/ar933x/clk.c | 2 +-
arch/mips/mach-ath79/ar933x/ddr.c | 2 +-
arch/mips/mach-ath79/ar934x/clk.c | 4 ++--
arch/mips/mach-ath79/ar934x/ddr.c | 2 +-
arch/mips/mach-ath79/include/mach/reset.h | 2 +-
arch/mips/mach-ath79/qca953x/clk.c | 2 +-
arch/mips/mach-ath79/qca953x/ddr.c | 2 +-
arch/mips/mach-ath79/reset.c | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/mips/mach-ath79/ar933x/clk.c b/arch/mips/mach-ath79/ar933x/clk.c
index 9fcd496..2a07f09 100644
--- a/arch/mips/mach-ath79/ar933x/clk.c
+++ b/arch/mips/mach-ath79/ar933x/clk.c
@@ -17,7 +17,7 @@ static u32 ar933x_get_xtal(void)
{
u32 val;
- val = get_bootstrap();
+ val = ath79_get_bootstrap();
if (val & AR933X_BOOTSTRAP_REF_CLK_40)
return 40000000;
else
diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
index 7f20d34..84e1cfa 100644
--- a/arch/mips/mach-ath79/ar933x/ddr.c
+++ b/arch/mips/mach-ath79/ar933x/ddr.c
@@ -114,7 +114,7 @@ void ddr_init(void)
writel(DDR_CONF_REG_VAL, regs + AR71XX_DDR_REG_CONFIG);
writel(DDR_CONF2_REG_VAL, regs + AR71XX_DDR_REG_CONFIG2);
- val = get_bootstrap();
+ val = ath79_get_bootstrap();
if (val & AR933X_BOOTSTRAP_DDR2) {
/* AHB maximum timeout */
writel(0xfffff, regs + AR933X_DDR_REG_TIMEOUT_MAX);
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index 9c65184..fdbbc80 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -119,7 +119,7 @@ void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
writel(0x03000000, srif_regs + 0x188); /* Undocumented reg :-) */
/* Test for 40MHz XTAL */
- reg = get_bootstrap();
+ reg = ath79_get_bootstrap();
if (reg & AR934X_BOOTSTRAP_REF_CLK_40) {
xtal_40 = 1;
cpu_srif = 0x41c00000;
@@ -214,7 +214,7 @@ static u32 ar934x_get_xtal(void)
{
u32 val;
- val = get_bootstrap();
+ val = ath79_get_bootstrap();
if (val & AR934X_BOOTSTRAP_REF_CLK_40)
return 40000000;
else
diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 4621d58..2ebb89b 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -45,7 +45,7 @@ void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
ddr_regs = map_physmem(AR71XX_DDR_CTRL_BASE, AR71XX_DDR_CTRL_SIZE,
MAP_NOCACHE);
- reg = get_bootstrap();
+ reg = ath79_get_bootstrap();
if (reg & AR934X_BOOTSTRAP_SDRAM_DISABLED) { /* DDR */
if (reg & AR934X_BOOTSTRAP_DDR1) { /* DDR 1 */
memtype = AR934X_DDR1;
diff --git a/arch/mips/mach-ath79/include/mach/reset.h b/arch/mips/mach-ath79/include/mach/reset.h
index 7721e1d..693a59d 100644
--- a/arch/mips/mach-ath79/include/mach/reset.h
+++ b/arch/mips/mach-ath79/include/mach/reset.h
@@ -9,7 +9,7 @@
#include <linux/types.h>
-u32 get_bootstrap(void);
+u32 ath79_get_bootstrap(void);
int ath79_eth_reset(void);
int ath79_usb_reset(void);
diff --git a/arch/mips/mach-ath79/qca953x/clk.c b/arch/mips/mach-ath79/qca953x/clk.c
index ef0a28e..882f9c8 100644
--- a/arch/mips/mach-ath79/qca953x/clk.c
+++ b/arch/mips/mach-ath79/qca953x/clk.c
@@ -17,7 +17,7 @@ static u32 qca953x_get_xtal(void)
{
u32 val;
- val = get_bootstrap();
+ val = ath79_get_bootstrap();
if (val & QCA953X_BOOTSTRAP_REF_CLK_40)
return 40000000;
else
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index ac0130c..41ad113 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -226,7 +226,7 @@ void ddr_init(void)
regs = map_physmem(AR71XX_DDR_CTRL_BASE, AR71XX_DDR_CTRL_SIZE,
MAP_NOCACHE);
- val = get_bootstrap();
+ val = ath79_get_bootstrap();
if (val & QCA953X_BOOTSTRAP_DDR1) {
writel(DDR_CTL_CONFIG_VAL, regs + QCA953X_DDR_REG_CTL_CONF);
udelay(10);
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index a88bcbc..33bf979 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -45,7 +45,7 @@ void _machine_restart(void)
/* NOP */;
}
-u32 get_bootstrap(void)
+u32 ath79_get_bootstrap(void)
{
void __iomem *base;
u32 reg = 0;
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
` (2 preceding siblings ...)
2016-05-22 3:59 ` [U-Boot] [PATCH 4/7] mips: ath79: Rename get_bootstrap into ath79_get_bootstrap Wills Wang
@ 2016-05-22 3:59 ` Wills Wang
2016-05-22 11:13 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 6/7] mips: ath79: Unify PLL initialization entry Wills Wang
2016-05-22 3:59 ` [U-Boot] [PATCH 7/7] mips: ath79: ap121: Enable ethernet Wills Wang
5 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 3:59 UTC (permalink / raw)
To: u-boot
Use function "ddr_init" for ath79 platform DDR initialization,
and put it into mach/ddr.h
Signed-off-by: Wills Wang <wills.wang@live.com>
---
arch/mips/mach-ath79/ar933x/ddr.c | 2 +-
arch/mips/mach-ath79/ar934x/ddr.c | 2 +-
arch/mips/mach-ath79/include/mach/ath79.h | 1 -
arch/mips/mach-ath79/include/mach/ddr.h | 2 +-
arch/mips/mach-ath79/qca953x/ddr.c | 2 +-
board/qca/ap121/ap121.c | 2 +-
board/qca/ap143/ap143.c | 2 +-
board/tplink/wdr4300/wdr4300.c | 2 +-
8 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
index 84e1cfa..b5940cb 100644
--- a/arch/mips/mach-ath79/ar933x/ddr.c
+++ b/arch/mips/mach-ath79/ar933x/ddr.c
@@ -103,7 +103,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define DDR_TAP_VAL0 0x08
#define DDR_TAP_VAL1 0x09
-void ddr_init(void)
+void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
{
void __iomem *regs;
u32 val;
diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 2ebb89b..c467fb2 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -35,7 +35,7 @@ static const struct ar934x_mem_config ar934x_mem_config[] = {
[AR934X_DDR2] = { 0xc7d48cd0, 0x9dd0e6a8, 0x33, 0, 0x10012 },
};
-void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
+void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
{
void __iomem *ddr_regs;
const struct ar934x_mem_config *memcfg;
diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
index 18d1e26..fdc1149 100644
--- a/arch/mips/mach-ath79/include/mach/ath79.h
+++ b/arch/mips/mach-ath79/include/mach/ath79.h
@@ -141,6 +141,5 @@ static inline int soc_is_qca956x(void)
}
void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
-void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
#endif /* __ASM_MACH_ATH79_H */
diff --git a/arch/mips/mach-ath79/include/mach/ddr.h b/arch/mips/mach-ath79/include/mach/ddr.h
index 181179a..b6f46ce 100644
--- a/arch/mips/mach-ath79/include/mach/ddr.h
+++ b/arch/mips/mach-ath79/include/mach/ddr.h
@@ -7,7 +7,7 @@
#ifndef __ASM_MACH_DDR_H
#define __ASM_MACH_DDR_H
-void ddr_init(void);
+void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz);
void ddr_tap_tuning(void);
#endif /* __ASM_MACH_DDR_H */
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index 41ad113..180e600 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -219,7 +219,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define DDR_TAP_MAGIC_VAL 0xaa55aa55
#define DDR_TAP_MAX_VAL 0x40
-void ddr_init(void)
+void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
{
void __iomem *regs;
u32 val;
diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
index d6c60fe..b0e1993 100644
--- a/board/qca/ap121/ap121.c
+++ b/board/qca/ap121/ap121.c
@@ -45,6 +45,6 @@ int board_early_init_f(void)
#ifdef CONFIG_DEBUG_UART
debug_uart_init();
#endif
- ddr_init();
+ ddr_init(400, 400, 200);
return 0;
}
diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
index 1572472..406c988 100644
--- a/board/qca/ap143/ap143.c
+++ b/board/qca/ap143/ap143.c
@@ -61,6 +61,6 @@ int board_early_init_f(void)
#ifdef CONFIG_DEBUG_UART
debug_uart_init();
#endif
- ddr_init();
+ ddr_init(650, 400, 200);
return 0;
}
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 8382ce0..bff3938 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -64,7 +64,7 @@ int board_early_init_f(void)
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
ar934x_pll_init(560, 480, 240);
- ar934x_ddr_init(560, 480, 240);
+ ddr_init(560, 480, 240);
#endif
wdr4300_usb_start();
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 6/7] mips: ath79: Unify PLL initialization entry
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
` (3 preceding siblings ...)
2016-05-22 3:59 ` [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x Wills Wang
@ 2016-05-22 3:59 ` Wills Wang
2016-05-22 11:14 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 7/7] mips: ath79: ap121: Enable ethernet Wills Wang
5 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 3:59 UTC (permalink / raw)
To: u-boot
Use function "pll_init" for ath79 platform PLL initialization,
and put it into mach/clk.h
Signed-off-by: Wills Wang <wills.wang@live.com>
---
arch/mips/mach-ath79/ar934x/clk.c | 2 +-
arch/mips/mach-ath79/include/mach/ath79.h | 2 --
arch/mips/mach-ath79/include/mach/clk.h | 12 ++++++++++++
board/tplink/wdr4300/wdr4300.c | 6 +++---
4 files changed, 16 insertions(+), 6 deletions(-)
create mode 100644 arch/mips/mach-ath79/include/mach/clk.h
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index fdbbc80..97d0e09 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -101,7 +101,7 @@ static void ar934x_srif_pll_cfg(void __iomem *pll_reg_base, const u32 srif_val)
} while (reg >= 0x40000);
}
-void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
+void pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
{
void __iomem *srif_regs = map_physmem(AR934X_SRIF_BASE,
AR934X_SRIF_SIZE, MAP_NOCACHE);
diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
index fdc1149..90d80b8 100644
--- a/arch/mips/mach-ath79/include/mach/ath79.h
+++ b/arch/mips/mach-ath79/include/mach/ath79.h
@@ -140,6 +140,4 @@ static inline int soc_is_qca956x(void)
return soc_is_tp9343() || soc_is_qca9561();
}
-void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
-
#endif /* __ASM_MACH_ATH79_H */
diff --git a/arch/mips/mach-ath79/include/mach/clk.h b/arch/mips/mach-ath79/include/mach/clk.h
new file mode 100644
index 0000000..58be7ea
--- /dev/null
+++ b/arch/mips/mach-ath79/include/mach/clk.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __ASM_MACH_CLK_H
+#define __ASM_MACH_CLK_H
+
+void pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz);
+
+#endif /* __ASM_MACH_CLK_H */
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index bff3938..b6c2881 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -8,10 +8,10 @@
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
-#include <mach/ath79.h>
-#include <mach/reset.h>
#include <mach/ar71xx_regs.h>
#include <mach/ddr.h>
+#include <mach/clk.h>
+#include <mach/reset.h>
#include <debug_uart.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -63,7 +63,7 @@ int board_early_init_f(void)
#endif
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
- ar934x_pll_init(560, 480, 240);
+ pll_init(560, 480, 240);
ddr_init(560, 480, 240);
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 7/7] mips: ath79: ap121: Enable ethernet
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
` (4 preceding siblings ...)
2016-05-22 3:59 ` [U-Boot] [PATCH 6/7] mips: ath79: Unify PLL initialization entry Wills Wang
@ 2016-05-22 3:59 ` Wills Wang
2016-05-22 11:14 ` Marek Vasut
5 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 3:59 UTC (permalink / raw)
To: u-boot
This patch enable network function for ap121 board, it's based on
the coming ethernet driver ag7xxx.
Signed-off-by: Wills Wang <wills.wang@live.com>
---
arch/mips/dts/ap121.dts | 5 +++++
arch/mips/dts/ar933x.dtsi | 4 ++--
board/qca/ap121/ap121.c | 2 ++
configs/ap121_defconfig | 9 +++++++--
4 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/arch/mips/dts/ap121.dts b/arch/mips/dts/ap121.dts
index e31f601..a934a58 100644
--- a/arch/mips/dts/ap121.dts
+++ b/arch/mips/dts/ap121.dts
@@ -41,3 +41,8 @@
reg = <0>;
};
};
+
+&gmac0 {
+ phy-mode = "rmii";
+ status = "okay";
+};
diff --git a/arch/mips/dts/ar933x.dtsi b/arch/mips/dts/ar933x.dtsi
index 00896b2..971f13e 100644
--- a/arch/mips/dts/ar933x.dtsi
+++ b/arch/mips/dts/ar933x.dtsi
@@ -75,7 +75,7 @@
};
gmac0: eth at 0x19000000 {
- compatible = "qca,ag7240-mac";
+ compatible = "qca,ag933x-mac";
reg = <0x19000000 0x200>;
phy = <&phy0>;
phy-mode = "rmii";
@@ -92,7 +92,7 @@
};
gmac1: eth at 0x1a000000 {
- compatible = "qca,ag7240-mac";
+ compatible = "qca,ag933x-mac";
reg = <0x1a000000 0x200>;
phy = <&phy0>;
phy-mode = "rgmii";
diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
index b0e1993..7b5a4ac 100644
--- a/board/qca/ap121/ap121.c
+++ b/board/qca/ap121/ap121.c
@@ -45,6 +45,8 @@ int board_early_init_f(void)
#ifdef CONFIG_DEBUG_UART
debug_uart_init();
#endif
+
ddr_init(400, 400, 200);
+ ath79_eth_reset();
return 0;
}
diff --git a/configs/ap121_defconfig b/configs/ap121_defconfig
index 7604e2e..91fa734 100644
--- a/configs/ap121_defconfig
+++ b/configs/ap121_defconfig
@@ -19,8 +19,13 @@ CONFIG_SYS_PROMPT="ap121 # "
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
# CONFIG_CMD_FPGA is not set
-# CONFIG_CMD_NET is not set
-# CONFIG_CMD_NFS is not set
+CONFIG_CMD_NET=y
+CONFIG_CMD_NFS=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM_ETH=y
+CONFIG_AG7XXX=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_ATMEL=y
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch
2016-05-22 3:59 ` [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch Wills Wang
@ 2016-05-22 11:05 ` Marek Vasut
2016-05-22 11:20 ` Wills Wang
2016-05-25 23:29 ` Daniel Schwierzeck
1 sibling, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:05 UTC (permalink / raw)
To: u-boot
On 05/22/2016 05:59 AM, Wills Wang wrote:
> We need reset the Ethernet Switch analog part before operation,
> or the build-in Ethernet PHY don't work.
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
So what changed in V2 here ?
> arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 1 +
> arch/mips/mach-ath79/reset.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
> index a8e51cb..dabcad0 100644
> --- a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
> +++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
> @@ -660,6 +660,7 @@
>
> #define AR933X_RESET_GE1_MDIO BIT(23)
> #define AR933X_RESET_GE0_MDIO BIT(22)
> +#define AR933X_RESET_ETH_SWITCH_ANALOG BIT(14)
> #define AR933X_RESET_GE1_MAC BIT(13)
> #define AR933X_RESET_WMAC BIT(11)
> #define AR933X_RESET_GE0_MAC BIT(9)
> diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
> index 188eccb..a88bcbc 100644
> --- a/arch/mips/mach-ath79/reset.c
> +++ b/arch/mips/mach-ath79/reset.c
> @@ -81,7 +81,8 @@ static int eth_init_ar933x(void)
> MAP_NOCACHE);
> const u32 mask = AR933X_RESET_GE0_MAC | AR933X_RESET_GE0_MDIO |
> AR933X_RESET_GE1_MAC | AR933X_RESET_GE1_MDIO |
> - AR933X_RESET_ETH_SWITCH;
> + AR933X_RESET_ETH_SWITCH |
> + AR933X_RESET_ETH_SWITCH_ANALOG;
>
> /* Clear MDIO slave EN bit. */
> clrbits_be32(rregs + AR933X_RESET_REG_BOOTSTRAP, BIT(17));
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset
2016-05-22 3:59 ` [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset Wills Wang
@ 2016-05-22 11:08 ` Marek Vasut
2016-05-22 11:29 ` Wills Wang
0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:08 UTC (permalink / raw)
To: u-boot
On 05/22/2016 05:59 AM, Wills Wang wrote:
> Collect all reset operation on platform and move them into a uniform header
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
>
> arch/mips/mach-ath79/include/mach/ath79.h | 3 ---
> arch/mips/mach-ath79/include/mach/reset.h | 2 ++
> board/tplink/wdr4300/wdr4300.c | 1 +
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
> index 17af082..18d1e26 100644
> --- a/arch/mips/mach-ath79/include/mach/ath79.h
> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
> @@ -140,9 +140,6 @@ static inline int soc_is_qca956x(void)
> return soc_is_tp9343() || soc_is_qca9561();
> }
>
> -int ath79_eth_reset(void);
> -int ath79_usb_reset(void);
> -
> void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
> void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
>
> diff --git a/arch/mips/mach-ath79/include/mach/reset.h b/arch/mips/mach-ath79/include/mach/reset.h
> index c383bfe..7721e1d 100644
> --- a/arch/mips/mach-ath79/include/mach/reset.h
> +++ b/arch/mips/mach-ath79/include/mach/reset.h
> @@ -10,5 +10,7 @@
> #include <linux/types.h>
>
> u32 get_bootstrap(void);
> +int ath79_eth_reset(void);
> +int ath79_usb_reset(void);
By moving the prototype into reset.h :
- New functions are added to a file which can be almost removed
- You need to include two headers now
So drop this patch and instead focus on getting rid of reset.h
> #endif /* __ASM_MACH_RESET_H */
> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
> index 6e070fd..8382ce0 100644
> --- a/board/tplink/wdr4300/wdr4300.c
> +++ b/board/tplink/wdr4300/wdr4300.c
> @@ -9,6 +9,7 @@
> #include <asm/addrspace.h>
> #include <asm/types.h>
> #include <mach/ath79.h>
> +#include <mach/reset.h>
> #include <mach/ar71xx_regs.h>
> #include <mach/ddr.h>
> #include <debug_uart.h>
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 4/7] mips: ath79: Rename get_bootstrap into ath79_get_bootstrap
2016-05-22 3:59 ` [U-Boot] [PATCH 4/7] mips: ath79: Rename get_bootstrap into ath79_get_bootstrap Wills Wang
@ 2016-05-22 11:09 ` Marek Vasut
0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:09 UTC (permalink / raw)
To: u-boot
On 05/22/2016 05:59 AM, Wills Wang wrote:
> Add a platform prefix for function name in order to make more readable
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
>
> arch/mips/mach-ath79/ar933x/clk.c | 2 +-
> arch/mips/mach-ath79/ar933x/ddr.c | 2 +-
> arch/mips/mach-ath79/ar934x/clk.c | 4 ++--
> arch/mips/mach-ath79/ar934x/ddr.c | 2 +-
> arch/mips/mach-ath79/include/mach/reset.h | 2 +-
> arch/mips/mach-ath79/qca953x/clk.c | 2 +-
> arch/mips/mach-ath79/qca953x/ddr.c | 2 +-
> arch/mips/mach-ath79/reset.c | 2 +-
> 8 files changed, 9 insertions(+), 9 deletions(-)
Acked-by: Marek Vasut <marex@denx.de>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x
2016-05-22 3:59 ` [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x Wills Wang
@ 2016-05-22 11:13 ` Marek Vasut
2016-05-22 11:35 ` Wills Wang
0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:13 UTC (permalink / raw)
To: u-boot
On 05/22/2016 05:59 AM, Wills Wang wrote:
> Use function "ddr_init" for ath79 platform DDR initialization,
> and put it into mach/ddr.h
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
>
> arch/mips/mach-ath79/ar933x/ddr.c | 2 +-
> arch/mips/mach-ath79/ar934x/ddr.c | 2 +-
> arch/mips/mach-ath79/include/mach/ath79.h | 1 -
> arch/mips/mach-ath79/include/mach/ddr.h | 2 +-
> arch/mips/mach-ath79/qca953x/ddr.c | 2 +-
> board/qca/ap121/ap121.c | 2 +-
> board/qca/ap143/ap143.c | 2 +-
> board/tplink/wdr4300/wdr4300.c | 2 +-
> 8 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
> index 84e1cfa..b5940cb 100644
> --- a/arch/mips/mach-ath79/ar933x/ddr.c
> +++ b/arch/mips/mach-ath79/ar933x/ddr.c
> @@ -103,7 +103,7 @@ DECLARE_GLOBAL_DATA_PTR;
> #define DDR_TAP_VAL0 0x08
> #define DDR_TAP_VAL1 0x09
>
> -void ddr_init(void)
> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
Call it ar933x_ddr_init() here
> {
> void __iomem *regs;
> u32 val;
> diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
> index 2ebb89b..c467fb2 100644
> --- a/arch/mips/mach-ath79/ar934x/ddr.c
> +++ b/arch/mips/mach-ath79/ar934x/ddr.c
> @@ -35,7 +35,7 @@ static const struct ar934x_mem_config ar934x_mem_config[] = {
> [AR934X_DDR2] = { 0xc7d48cd0, 0x9dd0e6a8, 0x33, 0, 0x10012 },
> };
>
> -void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
Keep this one. If you want to have ddr_init() as a universal function,
that's fine. But consider the situation where you want to have a single
u-boot binary for multiple ar9xxx . In that case, you would need all of
those different ar9xxx_ddr_init() functions and you'd need some
universal function (ath79_ddr_init() ?) which would in turn call the
right ar9xxx_ddr_init() .
> {
> void __iomem *ddr_regs;
> const struct ar934x_mem_config *memcfg;
> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
> index 18d1e26..fdc1149 100644
> --- a/arch/mips/mach-ath79/include/mach/ath79.h
> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
> @@ -141,6 +141,5 @@ static inline int soc_is_qca956x(void)
> }
>
> void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
> -void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
>
> #endif /* __ASM_MACH_ATH79_H */
> diff --git a/arch/mips/mach-ath79/include/mach/ddr.h b/arch/mips/mach-ath79/include/mach/ddr.h
> index 181179a..b6f46ce 100644
> --- a/arch/mips/mach-ath79/include/mach/ddr.h
> +++ b/arch/mips/mach-ath79/include/mach/ddr.h
> @@ -7,7 +7,7 @@
> #ifndef __ASM_MACH_DDR_H
> #define __ASM_MACH_DDR_H
>
> -void ddr_init(void);
> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz);
> void ddr_tap_tuning(void);
>
> #endif /* __ASM_MACH_DDR_H */
> diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
> index 41ad113..180e600 100644
> --- a/arch/mips/mach-ath79/qca953x/ddr.c
> +++ b/arch/mips/mach-ath79/qca953x/ddr.c
> @@ -219,7 +219,7 @@ DECLARE_GLOBAL_DATA_PTR;
> #define DDR_TAP_MAGIC_VAL 0xaa55aa55
> #define DDR_TAP_MAX_VAL 0x40
>
> -void ddr_init(void)
> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
> {
> void __iomem *regs;
> u32 val;
> diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
> index d6c60fe..b0e1993 100644
> --- a/board/qca/ap121/ap121.c
> +++ b/board/qca/ap121/ap121.c
> @@ -45,6 +45,6 @@ int board_early_init_f(void)
> #ifdef CONFIG_DEBUG_UART
> debug_uart_init();
> #endif
> - ddr_init();
> + ddr_init(400, 400, 200);
> return 0;
> }
> diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
> index 1572472..406c988 100644
> --- a/board/qca/ap143/ap143.c
> +++ b/board/qca/ap143/ap143.c
> @@ -61,6 +61,6 @@ int board_early_init_f(void)
> #ifdef CONFIG_DEBUG_UART
> debug_uart_init();
> #endif
> - ddr_init();
> + ddr_init(650, 400, 200);
> return 0;
> }
> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
> index 8382ce0..bff3938 100644
> --- a/board/tplink/wdr4300/wdr4300.c
> +++ b/board/tplink/wdr4300/wdr4300.c
> @@ -64,7 +64,7 @@ int board_early_init_f(void)
>
> #ifndef CONFIG_SKIP_LOWLEVEL_INIT
> ar934x_pll_init(560, 480, 240);
> - ar934x_ddr_init(560, 480, 240);
> + ddr_init(560, 480, 240);
> #endif
>
> wdr4300_usb_start();
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 6/7] mips: ath79: Unify PLL initialization entry
2016-05-22 3:59 ` [U-Boot] [PATCH 6/7] mips: ath79: Unify PLL initialization entry Wills Wang
@ 2016-05-22 11:14 ` Marek Vasut
0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:14 UTC (permalink / raw)
To: u-boot
On 05/22/2016 05:59 AM, Wills Wang wrote:
> Use function "pll_init" for ath79 platform PLL initialization,
> and put it into mach/clk.h
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
>
> arch/mips/mach-ath79/ar934x/clk.c | 2 +-
> arch/mips/mach-ath79/include/mach/ath79.h | 2 --
> arch/mips/mach-ath79/include/mach/clk.h | 12 ++++++++++++
> board/tplink/wdr4300/wdr4300.c | 6 +++---
> 4 files changed, 16 insertions(+), 6 deletions(-)
> create mode 100644 arch/mips/mach-ath79/include/mach/clk.h
>
> diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
> index fdbbc80..97d0e09 100644
> --- a/arch/mips/mach-ath79/ar934x/clk.c
> +++ b/arch/mips/mach-ath79/ar934x/clk.c
> @@ -101,7 +101,7 @@ static void ar934x_srif_pll_cfg(void __iomem *pll_reg_base, const u32 srif_val)
> } while (reg >= 0x40000);
> }
>
> -void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
> +void pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
Same comment I had in 5/7 applies here
> {
> void __iomem *srif_regs = map_physmem(AR934X_SRIF_BASE,
> AR934X_SRIF_SIZE, MAP_NOCACHE);
> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
> index fdc1149..90d80b8 100644
> --- a/arch/mips/mach-ath79/include/mach/ath79.h
> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
> @@ -140,6 +140,4 @@ static inline int soc_is_qca956x(void)
> return soc_is_tp9343() || soc_is_qca9561();
> }
>
> -void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
> -
> #endif /* __ASM_MACH_ATH79_H */
> diff --git a/arch/mips/mach-ath79/include/mach/clk.h b/arch/mips/mach-ath79/include/mach/clk.h
> new file mode 100644
> index 0000000..58be7ea
> --- /dev/null
> +++ b/arch/mips/mach-ath79/include/mach/clk.h
> @@ -0,0 +1,12 @@
> +/*
> + * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#ifndef __ASM_MACH_CLK_H
> +#define __ASM_MACH_CLK_H
> +
> +void pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz);
Same comment I had in 3/7 applies here.
> +
> +#endif /* __ASM_MACH_CLK_H */
> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
> index bff3938..b6c2881 100644
> --- a/board/tplink/wdr4300/wdr4300.c
> +++ b/board/tplink/wdr4300/wdr4300.c
> @@ -8,10 +8,10 @@
> #include <asm/io.h>
> #include <asm/addrspace.h>
> #include <asm/types.h>
> -#include <mach/ath79.h>
> -#include <mach/reset.h>
> #include <mach/ar71xx_regs.h>
> #include <mach/ddr.h>
> +#include <mach/clk.h>
> +#include <mach/reset.h>
> #include <debug_uart.h>
>
> DECLARE_GLOBAL_DATA_PTR;
> @@ -63,7 +63,7 @@ int board_early_init_f(void)
> #endif
>
> #ifndef CONFIG_SKIP_LOWLEVEL_INIT
> - ar934x_pll_init(560, 480, 240);
> + pll_init(560, 480, 240);
> ddr_init(560, 480, 240);
> #endif
>
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 7/7] mips: ath79: ap121: Enable ethernet
2016-05-22 3:59 ` [U-Boot] [PATCH 7/7] mips: ath79: ap121: Enable ethernet Wills Wang
@ 2016-05-22 11:14 ` Marek Vasut
0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:14 UTC (permalink / raw)
To: u-boot
On 05/22/2016 05:59 AM, Wills Wang wrote:
> This patch enable network function for ap121 board, it's based on
> the coming ethernet driver ag7xxx.
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
Acked-by: Marek Vasut <marex@denx.de>
> arch/mips/dts/ap121.dts | 5 +++++
> arch/mips/dts/ar933x.dtsi | 4 ++--
> board/qca/ap121/ap121.c | 2 ++
> configs/ap121_defconfig | 9 +++++++--
> 4 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/arch/mips/dts/ap121.dts b/arch/mips/dts/ap121.dts
> index e31f601..a934a58 100644
> --- a/arch/mips/dts/ap121.dts
> +++ b/arch/mips/dts/ap121.dts
> @@ -41,3 +41,8 @@
> reg = <0>;
> };
> };
> +
> +&gmac0 {
> + phy-mode = "rmii";
> + status = "okay";
> +};
> diff --git a/arch/mips/dts/ar933x.dtsi b/arch/mips/dts/ar933x.dtsi
> index 00896b2..971f13e 100644
> --- a/arch/mips/dts/ar933x.dtsi
> +++ b/arch/mips/dts/ar933x.dtsi
> @@ -75,7 +75,7 @@
> };
>
> gmac0: eth at 0x19000000 {
> - compatible = "qca,ag7240-mac";
> + compatible = "qca,ag933x-mac";
> reg = <0x19000000 0x200>;
> phy = <&phy0>;
> phy-mode = "rmii";
> @@ -92,7 +92,7 @@
> };
>
> gmac1: eth at 0x1a000000 {
> - compatible = "qca,ag7240-mac";
> + compatible = "qca,ag933x-mac";
> reg = <0x1a000000 0x200>;
> phy = <&phy0>;
> phy-mode = "rgmii";
> diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
> index b0e1993..7b5a4ac 100644
> --- a/board/qca/ap121/ap121.c
> +++ b/board/qca/ap121/ap121.c
> @@ -45,6 +45,8 @@ int board_early_init_f(void)
> #ifdef CONFIG_DEBUG_UART
> debug_uart_init();
> #endif
> +
> ddr_init(400, 400, 200);
> + ath79_eth_reset();
> return 0;
> }
> diff --git a/configs/ap121_defconfig b/configs/ap121_defconfig
> index 7604e2e..91fa734 100644
> --- a/configs/ap121_defconfig
> +++ b/configs/ap121_defconfig
> @@ -19,8 +19,13 @@ CONFIG_SYS_PROMPT="ap121 # "
> CONFIG_CMD_SF=y
> CONFIG_CMD_SPI=y
> # CONFIG_CMD_FPGA is not set
> -# CONFIG_CMD_NET is not set
> -# CONFIG_CMD_NFS is not set
> +CONFIG_CMD_NET=y
> +CONFIG_CMD_NFS=y
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_PING=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_DM_ETH=y
> +CONFIG_AG7XXX=y
> CONFIG_SPI_FLASH=y
> CONFIG_SPI_FLASH_BAR=y
> CONFIG_SPI_FLASH_ATMEL=y
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch
2016-05-22 11:05 ` Marek Vasut
@ 2016-05-22 11:20 ` Wills Wang
0 siblings, 0 replies; 19+ messages in thread
From: Wills Wang @ 2016-05-22 11:20 UTC (permalink / raw)
To: u-boot
On 05/22/2016 07:05 PM, Marek Vasut wrote:
> On 05/22/2016 05:59 AM, Wills Wang wrote:
>> We need reset the Ethernet Switch analog part before operation,
>> or the build-in Ethernet PHY don't work.
>>
>> Signed-off-by: Wills Wang <wills.wang@live.com>
>> ---
> So what changed in V2 here ?
I change commit message according to daniel's email.
>> arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 1 +
>> arch/mips/mach-ath79/reset.c | 3 ++-
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
>> index a8e51cb..dabcad0 100644
>> --- a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
>> +++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
>> @@ -660,6 +660,7 @@
>>
>> #define AR933X_RESET_GE1_MDIO BIT(23)
>> #define AR933X_RESET_GE0_MDIO BIT(22)
>> +#define AR933X_RESET_ETH_SWITCH_ANALOG BIT(14)
>> #define AR933X_RESET_GE1_MAC BIT(13)
>> #define AR933X_RESET_WMAC BIT(11)
>> #define AR933X_RESET_GE0_MAC BIT(9)
>> diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
>> index 188eccb..a88bcbc 100644
>> --- a/arch/mips/mach-ath79/reset.c
>> +++ b/arch/mips/mach-ath79/reset.c
>> @@ -81,7 +81,8 @@ static int eth_init_ar933x(void)
>> MAP_NOCACHE);
>> const u32 mask = AR933X_RESET_GE0_MAC | AR933X_RESET_GE0_MDIO |
>> AR933X_RESET_GE1_MAC | AR933X_RESET_GE1_MDIO |
>> - AR933X_RESET_ETH_SWITCH;
>> + AR933X_RESET_ETH_SWITCH |
>> + AR933X_RESET_ETH_SWITCH_ANALOG;
>>
>> /* Clear MDIO slave EN bit. */
>> clrbits_be32(rregs + AR933X_RESET_REG_BOOTSTRAP, BIT(17));
>>
>
--
Best Regards
Wills
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset
2016-05-22 11:08 ` Marek Vasut
@ 2016-05-22 11:29 ` Wills Wang
2016-05-22 11:32 ` Marek Vasut
0 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 11:29 UTC (permalink / raw)
To: u-boot
On 05/22/2016 07:08 PM, Marek Vasut wrote:
> On 05/22/2016 05:59 AM, Wills Wang wrote:
>> Collect all reset operation on platform and move them into a uniform header
>>
>> Signed-off-by: Wills Wang <wills.wang@live.com>
>> ---
>>
>> arch/mips/mach-ath79/include/mach/ath79.h | 3 ---
>> arch/mips/mach-ath79/include/mach/reset.h | 2 ++
>> board/tplink/wdr4300/wdr4300.c | 1 +
>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
>> index 17af082..18d1e26 100644
>> --- a/arch/mips/mach-ath79/include/mach/ath79.h
>> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
>> @@ -140,9 +140,6 @@ static inline int soc_is_qca956x(void)
>> return soc_is_tp9343() || soc_is_qca9561();
>> }
>>
>> -int ath79_eth_reset(void);
>> -int ath79_usb_reset(void);
>> -
>> void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
>> void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
>>
>> diff --git a/arch/mips/mach-ath79/include/mach/reset.h b/arch/mips/mach-ath79/include/mach/reset.h
>> index c383bfe..7721e1d 100644
>> --- a/arch/mips/mach-ath79/include/mach/reset.h
>> +++ b/arch/mips/mach-ath79/include/mach/reset.h
>> @@ -10,5 +10,7 @@
>> #include <linux/types.h>
>>
>> u32 get_bootstrap(void);
>> +int ath79_eth_reset(void);
>> +int ath79_usb_reset(void);
> By moving the prototype into reset.h :
> - New functions are added to a file which can be almost removed
> - You need to include two headers now
>
> So drop this patch and instead focus on getting rid of reset.h
You mean we should use a header "ath79.h" for all?
>> #endif /* __ASM_MACH_RESET_H */
>> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
>> index 6e070fd..8382ce0 100644
>> --- a/board/tplink/wdr4300/wdr4300.c
>> +++ b/board/tplink/wdr4300/wdr4300.c
>> @@ -9,6 +9,7 @@
>> #include <asm/addrspace.h>
>> #include <asm/types.h>
>> #include <mach/ath79.h>
>> +#include <mach/reset.h>
>> #include <mach/ar71xx_regs.h>
>> #include <mach/ddr.h>
>> #include <debug_uart.h>
>>
>
--
Best Regards
Wills
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset
2016-05-22 11:29 ` Wills Wang
@ 2016-05-22 11:32 ` Marek Vasut
2016-05-30 10:10 ` Daniel Schwierzeck
0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 11:32 UTC (permalink / raw)
To: u-boot
On 05/22/2016 01:29 PM, Wills Wang wrote:
>
>
> On 05/22/2016 07:08 PM, Marek Vasut wrote:
>> On 05/22/2016 05:59 AM, Wills Wang wrote:
>>> Collect all reset operation on platform and move them into a uniform
>>> header
>>>
>>> Signed-off-by: Wills Wang <wills.wang@live.com>
>>> ---
>>>
>>> arch/mips/mach-ath79/include/mach/ath79.h | 3 ---
>>> arch/mips/mach-ath79/include/mach/reset.h | 2 ++
>>> board/tplink/wdr4300/wdr4300.c | 1 +
>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h
>>> b/arch/mips/mach-ath79/include/mach/ath79.h
>>> index 17af082..18d1e26 100644
>>> --- a/arch/mips/mach-ath79/include/mach/ath79.h
>>> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
>>> @@ -140,9 +140,6 @@ static inline int soc_is_qca956x(void)
>>> return soc_is_tp9343() || soc_is_qca9561();
>>> }
>>> -int ath79_eth_reset(void);
>>> -int ath79_usb_reset(void);
>>> -
>>> void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const
>>> u16 ahb_mhz);
>>> void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const
>>> u16 ahb_mhz);
>>> diff --git a/arch/mips/mach-ath79/include/mach/reset.h
>>> b/arch/mips/mach-ath79/include/mach/reset.h
>>> index c383bfe..7721e1d 100644
>>> --- a/arch/mips/mach-ath79/include/mach/reset.h
>>> +++ b/arch/mips/mach-ath79/include/mach/reset.h
>>> @@ -10,5 +10,7 @@
>>> #include <linux/types.h>
>>> u32 get_bootstrap(void);
>>> +int ath79_eth_reset(void);
>>> +int ath79_usb_reset(void);
>> By moving the prototype into reset.h :
>> - New functions are added to a file which can be almost removed
>> - You need to include two headers now
>>
>> So drop this patch and instead focus on getting rid of reset.h
> You mean we should use a header "ath79.h" for all?
Yes, having one header per function makes no sense and ath79.h already
has multiple function prototypes in it.
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x
2016-05-22 11:13 ` Marek Vasut
@ 2016-05-22 11:35 ` Wills Wang
2016-05-22 12:23 ` Marek Vasut
0 siblings, 1 reply; 19+ messages in thread
From: Wills Wang @ 2016-05-22 11:35 UTC (permalink / raw)
To: u-boot
On 05/22/2016 07:13 PM, Marek Vasut wrote:
> On 05/22/2016 05:59 AM, Wills Wang wrote:
>> Use function "ddr_init" for ath79 platform DDR initialization,
>> and put it into mach/ddr.h
>>
>> Signed-off-by: Wills Wang <wills.wang@live.com>
>> ---
>>
>> arch/mips/mach-ath79/ar933x/ddr.c | 2 +-
>> arch/mips/mach-ath79/ar934x/ddr.c | 2 +-
>> arch/mips/mach-ath79/include/mach/ath79.h | 1 -
>> arch/mips/mach-ath79/include/mach/ddr.h | 2 +-
>> arch/mips/mach-ath79/qca953x/ddr.c | 2 +-
>> board/qca/ap121/ap121.c | 2 +-
>> board/qca/ap143/ap143.c | 2 +-
>> board/tplink/wdr4300/wdr4300.c | 2 +-
>> 8 files changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
>> index 84e1cfa..b5940cb 100644
>> --- a/arch/mips/mach-ath79/ar933x/ddr.c
>> +++ b/arch/mips/mach-ath79/ar933x/ddr.c
>> @@ -103,7 +103,7 @@ DECLARE_GLOBAL_DATA_PTR;
>> #define DDR_TAP_VAL0 0x08
>> #define DDR_TAP_VAL1 0x09
>>
>> -void ddr_init(void)
>> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
> Call it ar933x_ddr_init() here
>
>> {
>> void __iomem *regs;
>> u32 val;
>> diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
>> index 2ebb89b..c467fb2 100644
>> --- a/arch/mips/mach-ath79/ar934x/ddr.c
>> +++ b/arch/mips/mach-ath79/ar934x/ddr.c
>> @@ -35,7 +35,7 @@ static const struct ar934x_mem_config ar934x_mem_config[] = {
>> [AR934X_DDR2] = { 0xc7d48cd0, 0x9dd0e6a8, 0x33, 0, 0x10012 },
>> };
>>
>> -void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
>> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
> Keep this one. If you want to have ddr_init() as a universal function,
> that's fine. But consider the situation where you want to have a single
> u-boot binary for multiple ar9xxx . In that case, you would need all of
> those different ar9xxx_ddr_init() functions and you'd need some
> universal function (ath79_ddr_init() ?) which would in turn call the
> right ar9xxx_ddr_init() .
You mean like this:
void ath79_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
{
if (soc_is_ar933x())
ar933x_ddr_init(cpu_mhz, ddr_mhz, bus_mhz);
else if (soc_is_ar934x())
ar934x_ddr_init(cpu_mhz, ddr_mhz, bus_mhz);
...
}
>> {
>> void __iomem *ddr_regs;
>> const struct ar934x_mem_config *memcfg;
>> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h
>> index 18d1e26..fdc1149 100644
>> --- a/arch/mips/mach-ath79/include/mach/ath79.h
>> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
>> @@ -141,6 +141,5 @@ static inline int soc_is_qca956x(void)
>> }
>>
>> void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
>> -void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz);
>>
>> #endif /* __ASM_MACH_ATH79_H */
>> diff --git a/arch/mips/mach-ath79/include/mach/ddr.h b/arch/mips/mach-ath79/include/mach/ddr.h
>> index 181179a..b6f46ce 100644
>> --- a/arch/mips/mach-ath79/include/mach/ddr.h
>> +++ b/arch/mips/mach-ath79/include/mach/ddr.h
>> @@ -7,7 +7,7 @@
>> #ifndef __ASM_MACH_DDR_H
>> #define __ASM_MACH_DDR_H
>>
>> -void ddr_init(void);
>> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz);
>> void ddr_tap_tuning(void);
>>
>> #endif /* __ASM_MACH_DDR_H */
>> diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
>> index 41ad113..180e600 100644
>> --- a/arch/mips/mach-ath79/qca953x/ddr.c
>> +++ b/arch/mips/mach-ath79/qca953x/ddr.c
>> @@ -219,7 +219,7 @@ DECLARE_GLOBAL_DATA_PTR;
>> #define DDR_TAP_MAGIC_VAL 0xaa55aa55
>> #define DDR_TAP_MAX_VAL 0x40
>>
>> -void ddr_init(void)
>> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
>> {
>> void __iomem *regs;
>> u32 val;
>> diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
>> index d6c60fe..b0e1993 100644
>> --- a/board/qca/ap121/ap121.c
>> +++ b/board/qca/ap121/ap121.c
>> @@ -45,6 +45,6 @@ int board_early_init_f(void)
>> #ifdef CONFIG_DEBUG_UART
>> debug_uart_init();
>> #endif
>> - ddr_init();
>> + ddr_init(400, 400, 200);
>> return 0;
>> }
>> diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
>> index 1572472..406c988 100644
>> --- a/board/qca/ap143/ap143.c
>> +++ b/board/qca/ap143/ap143.c
>> @@ -61,6 +61,6 @@ int board_early_init_f(void)
>> #ifdef CONFIG_DEBUG_UART
>> debug_uart_init();
>> #endif
>> - ddr_init();
>> + ddr_init(650, 400, 200);
>> return 0;
>> }
>> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
>> index 8382ce0..bff3938 100644
>> --- a/board/tplink/wdr4300/wdr4300.c
>> +++ b/board/tplink/wdr4300/wdr4300.c
>> @@ -64,7 +64,7 @@ int board_early_init_f(void)
>>
>> #ifndef CONFIG_SKIP_LOWLEVEL_INIT
>> ar934x_pll_init(560, 480, 240);
>> - ar934x_ddr_init(560, 480, 240);
>> + ddr_init(560, 480, 240);
>> #endif
>>
>> wdr4300_usb_start();
>>
>
--
Best Regards
Wills
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x
2016-05-22 11:35 ` Wills Wang
@ 2016-05-22 12:23 ` Marek Vasut
0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2016-05-22 12:23 UTC (permalink / raw)
To: u-boot
On 05/22/2016 01:35 PM, Wills Wang wrote:
>
>
> On 05/22/2016 07:13 PM, Marek Vasut wrote:
>> On 05/22/2016 05:59 AM, Wills Wang wrote:
>>> Use function "ddr_init" for ath79 platform DDR initialization,
>>> and put it into mach/ddr.h
>>>
>>> Signed-off-by: Wills Wang <wills.wang@live.com>
>>> ---
>>>
>>> arch/mips/mach-ath79/ar933x/ddr.c | 2 +-
>>> arch/mips/mach-ath79/ar934x/ddr.c | 2 +-
>>> arch/mips/mach-ath79/include/mach/ath79.h | 1 -
>>> arch/mips/mach-ath79/include/mach/ddr.h | 2 +-
>>> arch/mips/mach-ath79/qca953x/ddr.c | 2 +-
>>> board/qca/ap121/ap121.c | 2 +-
>>> board/qca/ap143/ap143.c | 2 +-
>>> board/tplink/wdr4300/wdr4300.c | 2 +-
>>> 8 files changed, 7 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/mips/mach-ath79/ar933x/ddr.c
>>> b/arch/mips/mach-ath79/ar933x/ddr.c
>>> index 84e1cfa..b5940cb 100644
>>> --- a/arch/mips/mach-ath79/ar933x/ddr.c
>>> +++ b/arch/mips/mach-ath79/ar933x/ddr.c
>>> @@ -103,7 +103,7 @@ DECLARE_GLOBAL_DATA_PTR;
>>> #define DDR_TAP_VAL0 0x08
>>> #define DDR_TAP_VAL1 0x09
>>> -void ddr_init(void)
>>> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
>> Call it ar933x_ddr_init() here
>>
>>> {
>>> void __iomem *regs;
>>> u32 val;
>>> diff --git a/arch/mips/mach-ath79/ar934x/ddr.c
>>> b/arch/mips/mach-ath79/ar934x/ddr.c
>>> index 2ebb89b..c467fb2 100644
>>> --- a/arch/mips/mach-ath79/ar934x/ddr.c
>>> +++ b/arch/mips/mach-ath79/ar934x/ddr.c
>>> @@ -35,7 +35,7 @@ static const struct ar934x_mem_config
>>> ar934x_mem_config[] = {
>>> [AR934X_DDR2] = { 0xc7d48cd0, 0x9dd0e6a8, 0x33, 0, 0x10012 },
>>> };
>>> -void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const
>>> u16 ahb_mhz)
>>> +void ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 bus_mhz)
>> Keep this one. If you want to have ddr_init() as a universal function,
>> that's fine. But consider the situation where you want to have a single
>> u-boot binary for multiple ar9xxx . In that case, you would need all of
>> those different ar9xxx_ddr_init() functions and you'd need some
>> universal function (ath79_ddr_init() ?) which would in turn call the
>> right ar9xxx_ddr_init() .
> You mean like this:
>
> void ath79_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16
> bus_mhz)
> {
>
> if (soc_is_ar933x())
> ar933x_ddr_init(cpu_mhz, ddr_mhz, bus_mhz);
> else if (soc_is_ar934x())
> ar934x_ddr_init(cpu_mhz, ddr_mhz, bus_mhz);
> ...
Yes, very much like that.
soc_is_foo() might need tweaking so the compiled would be able to
optimize out unavailable branches (in case support for that family is
not available).
[...]
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch
2016-05-22 3:59 ` [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch Wills Wang
2016-05-22 11:05 ` Marek Vasut
@ 2016-05-25 23:29 ` Daniel Schwierzeck
1 sibling, 0 replies; 19+ messages in thread
From: Daniel Schwierzeck @ 2016-05-25 23:29 UTC (permalink / raw)
To: u-boot
Am 22.05.2016 um 05:59 schrieb Wills Wang:
> We need reset the Ethernet Switch analog part before operation,
> or the build-in Ethernet PHY don't work.
>
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
>
> arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 1 +
> arch/mips/mach-ath79/reset.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
applied to u-boot-mips, thanks.
--
- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160526/d0e511f2/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset
2016-05-22 11:32 ` Marek Vasut
@ 2016-05-30 10:10 ` Daniel Schwierzeck
0 siblings, 0 replies; 19+ messages in thread
From: Daniel Schwierzeck @ 2016-05-30 10:10 UTC (permalink / raw)
To: u-boot
Am 22.05.2016 um 13:32 schrieb Marek Vasut:
> On 05/22/2016 01:29 PM, Wills Wang wrote:
>>
>>
>> On 05/22/2016 07:08 PM, Marek Vasut wrote:
>>> On 05/22/2016 05:59 AM, Wills Wang wrote:
>>>> Collect all reset operation on platform and move them into a uniform
>>>> header
>>>>
>>>> Signed-off-by: Wills Wang <wills.wang@live.com>
>>>> ---
>>>>
>>>> arch/mips/mach-ath79/include/mach/ath79.h | 3 ---
>>>> arch/mips/mach-ath79/include/mach/reset.h | 2 ++
>>>> board/tplink/wdr4300/wdr4300.c | 1 +
>>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/arch/mips/mach-ath79/include/mach/ath79.h
>>>> b/arch/mips/mach-ath79/include/mach/ath79.h
>>>> index 17af082..18d1e26 100644
>>>> --- a/arch/mips/mach-ath79/include/mach/ath79.h
>>>> +++ b/arch/mips/mach-ath79/include/mach/ath79.h
>>>> @@ -140,9 +140,6 @@ static inline int soc_is_qca956x(void)
>>>> return soc_is_tp9343() || soc_is_qca9561();
>>>> }
>>>> -int ath79_eth_reset(void);
>>>> -int ath79_usb_reset(void);
>>>> -
>>>> void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const
>>>> u16 ahb_mhz);
>>>> void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const
>>>> u16 ahb_mhz);
>>>> diff --git a/arch/mips/mach-ath79/include/mach/reset.h
>>>> b/arch/mips/mach-ath79/include/mach/reset.h
>>>> index c383bfe..7721e1d 100644
>>>> --- a/arch/mips/mach-ath79/include/mach/reset.h
>>>> +++ b/arch/mips/mach-ath79/include/mach/reset.h
>>>> @@ -10,5 +10,7 @@
>>>> #include <linux/types.h>
>>>> u32 get_bootstrap(void);
>>>> +int ath79_eth_reset(void);
>>>> +int ath79_usb_reset(void);
>>> By moving the prototype into reset.h :
>>> - New functions are added to a file which can be almost removed
>>> - You need to include two headers now
>>>
>>> So drop this patch and instead focus on getting rid of reset.h
>> You mean we should use a header "ath79.h" for all?
>
> Yes, having one header per function makes no sense and ath79.h already
> has multiple function prototypes in it.
>
@Wills, could you please send an updated series with patches 3/7 to 7/7
which addresses Marek's comments? The merge window closes on the 4th of
June. You can also send patch 7/7 alone to enable ethernet on AP121. Thanks.
--
- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160530/28654e62/attachment.sig>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2016-05-30 10:10 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1463889595-15333-1-git-send-email-wills.wang@live.com>
2016-05-22 3:59 ` [U-Boot] [PATCH V2 2/7] mips: ath79: ar933x: Fix ethernet PHY mismatch Wills Wang
2016-05-22 11:05 ` Marek Vasut
2016-05-22 11:20 ` Wills Wang
2016-05-25 23:29 ` Daniel Schwierzeck
2016-05-22 3:59 ` [U-Boot] [PATCH 3/7] mips: ath79: Use uniform header for reset Wills Wang
2016-05-22 11:08 ` Marek Vasut
2016-05-22 11:29 ` Wills Wang
2016-05-22 11:32 ` Marek Vasut
2016-05-30 10:10 ` Daniel Schwierzeck
2016-05-22 3:59 ` [U-Boot] [PATCH 4/7] mips: ath79: Rename get_bootstrap into ath79_get_bootstrap Wills Wang
2016-05-22 11:09 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 5/7] mips: ath79: Unify DDR initialization entry for ar934x Wills Wang
2016-05-22 11:13 ` Marek Vasut
2016-05-22 11:35 ` Wills Wang
2016-05-22 12:23 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 6/7] mips: ath79: Unify PLL initialization entry Wills Wang
2016-05-22 11:14 ` Marek Vasut
2016-05-22 3:59 ` [U-Boot] [PATCH 7/7] mips: ath79: ap121: Enable ethernet Wills Wang
2016-05-22 11:14 ` Marek Vasut
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.