* [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver
@ 2016-01-26 12:47 Ricardo Ribalda Delgado
2016-01-26 12:47 ` [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic Ricardo Ribalda Delgado
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-01-26 12:47 UTC (permalink / raw)
To: u-boot
If the xparameters file contains a LL_TEMAC definition compile its
driver and the net commands.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
v2: Add whitespaces after /* and before*/
Credit-to: Bin Meng <bmeng.cn@gmail.com>
.../xilinx/ppc440-generic/xilinx_ppc440_generic.c | 22 ++++++++++++++++++++++
board/xilinx/ppc440-generic/xparameters.h | 4 ++++
configs/xilinx-ppc440-generic_defconfig | 5 +++++
include/configs/xilinx-ppc440-generic.h | 22 ++++++++++++++++------
4 files changed, 47 insertions(+), 6 deletions(-)
diff --git a/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c b/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
index 0e3ab94e31ef..d8233529304d 100644
--- a/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
+++ b/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
+#include <netdev.h>
#include <asm/processor.h>
int checkboard(void)
@@ -34,3 +35,24 @@ void get_sys_info(sys_info_t *sys_info)
int get_serial_clock(void){
return XPAR_UARTNS550_0_CLOCK_FREQ_HZ;
}
+
+int board_eth_init(bd_t *bis)
+{
+ int ret = 0;
+
+ puts("Init xilinx temac\n");
+#ifdef XPAR_LLTEMAC_0_BASEADDR
+ ret |= xilinx_ll_temac_eth_init(bis, XPAR_LLTEMAC_0_BASEADDR,
+ XILINX_LL_TEMAC_M_SDMA_DCR | XILINX_LL_TEMAC_M_SDMA_PLB,
+ XPAR_LLTEMAC_0_LLINK_CONNECTED_BASEADDR);
+
+#endif
+
+#ifdef XPAR_LLTEMAC_1_BASEADDR
+ ret |= xilinx_ll_temac_eth_init(bis, XPAR_LLTEMAC_1_BASEADDR,
+ XILINX_LL_TEMAC_M_SDMA_DCR | XILINX_LL_TEMAC_M_SDMA_PLB,
+ XPAR_LLTEMAC_1_LLINK_CONNECTED_BASEADDR);
+#endif
+
+ return ret;
+}
diff --git a/board/xilinx/ppc440-generic/xparameters.h b/board/xilinx/ppc440-generic/xparameters.h
index 9685560673ab..b45a6a1d7668 100644
--- a/board/xilinx/ppc440-generic/xparameters.h
+++ b/board/xilinx/ppc440-generic/xparameters.h
@@ -18,5 +18,9 @@
#define XPAR_CORE_CLOCK_FREQ_HZ 400000000
#define XPAR_INTC_MAX_NUM_INTR_INPUTS 32
#define XPAR_UARTNS550_0_CLOCK_FREQ_HZ 100000000
+#define XPAR_LLTEMAC_0_LLINK_CONNECTED_BASEADDR 0x80
+#define XPAR_LLTEMAC_1_LLINK_CONNECTED_BASEADDR 0x98
+#define XPAR_LLTEMAC_0_BASEADDR 0x83000000
+#define XPAR_LLTEMAC_1_BASEADDR 0x83000040
#endif
diff --git a/configs/xilinx-ppc440-generic_defconfig b/configs/xilinx-ppc440-generic_defconfig
index c66357e08724..64b55ee1359e 100644
--- a/configs/xilinx-ppc440-generic_defconfig
+++ b/configs/xilinx-ppc440-generic_defconfig
@@ -11,3 +11,8 @@ CONFIG_OF_CONTROL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_DEFAULT_DEVICE_TREE="xilinx-ppc440-generic"
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_NETCONSOLE=y
+
diff --git a/include/configs/xilinx-ppc440-generic.h b/include/configs/xilinx-ppc440-generic.h
index 2af5f7fc1de5..f2505a6cd2b2 100644
--- a/include/configs/xilinx-ppc440-generic.h
+++ b/include/configs/xilinx-ppc440-generic.h
@@ -8,32 +8,42 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-/*CPU*/
+/* CPU */
#define CONFIG_440 1
#define CONFIG_XILINX_440 1
#define CONFIG_XILINX_PPC440_GENERIC 1
#include "../board/xilinx/ppc440-generic/xparameters.h"
-/*Mem Map*/
+/* Mem Map */
#define CONFIG_SYS_SDRAM_SIZE_MB 256
-/*Env*/
+/* Env */
#define CONFIG_ENV_IS_IN_FLASH 1
#define CONFIG_ENV_SIZE 0x20000
#define CONFIG_ENV_SECT_SIZE 0x20000
#define CONFIG_ENV_OFFSET 0x340000
#define CONFIG_ENV_ADDR (XPAR_FLASH_MEM0_BASEADDR+CONFIG_ENV_OFFSET)
-/*Misc*/
+/* Misc */
#define CONFIG_PREBOOT "echo U-Boot is up and running;"
-/*Flash*/
+/* Flash */
#define CONFIG_SYS_FLASH_SIZE (128*1024*1024)
#define CONFIG_SYS_MAX_FLASH_SECT 1024
#define MTDIDS_DEFAULT "nor0=flash"
#define MTDPARTS_DEFAULT "mtdparts=flash:-(user)"
-/*Generic Configs*/
+/* Net */
+#ifdef XPAR_LLTEMAC_0_BASEADDR
+#define CONFIG_XILINX_LL_TEMAC
+#define CONFIG_MII
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_MARVELL
+#define CONFIG_NET_RANDOM_ETHADDR
+#define CONFIG_LIB_RAND
+#endif
+
+/* Generic Configs */
#include <configs/xilinx-ppc.h>
#endif /* __CONFIG_H */
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic
2016-01-26 12:47 [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Ricardo Ribalda Delgado
@ 2016-01-26 12:47 ` Ricardo Ribalda Delgado
2016-01-26 13:13 ` Bin Meng
2016-01-26 14:44 ` Tom Rini
2016-01-26 13:13 ` [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Bin Meng
2016-01-26 15:23 ` Tom Rini
2 siblings, 2 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-01-26 12:47 UTC (permalink / raw)
To: u-boot
Add device tree example file for xilinx-ppc440-generic and
xilinx-ppc405-generic
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
arch/powerpc/dts/Makefile | 2 ++
arch/powerpc/dts/xilinx-ppc405-generic.dts | 15 +++++++++++++++
arch/powerpc/dts/xilinx-ppc440-generic.dts | 15 +++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 arch/powerpc/dts/xilinx-ppc405-generic.dts
create mode 100644 arch/powerpc/dts/xilinx-ppc440-generic.dts
v2: Add newlines after size-cells and aliases block
Credit-to: Bin Meng <bmeng.cn@gmail.com>
diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile
index 5d9f5c2822b2..80b4c0c4e374 100644
--- a/arch/powerpc/dts/Makefile
+++ b/arch/powerpc/dts/Makefile
@@ -3,6 +3,8 @@
#
dtb-$(CONFIG_TARGET_CANYONLANDS) += arches.dtb canyonlands.dtb glacier.dtb
+dtb-$(CONFIG_TARGET_XILINX_PPC440_GENERIC) += xilinx-ppc440-generic.dtb
+dtb-$(CONFIG_TARGET_XILINX_PPC405_GENERIC) += xilinx-ppc405-generic.dtb
targets += $(dtb-y)
diff --git a/arch/powerpc/dts/xilinx-ppc405-generic.dts b/arch/powerpc/dts/xilinx-ppc405-generic.dts
new file mode 100644
index 000000000000..64983216b57f
--- /dev/null
+++ b/arch/powerpc/dts/xilinx-ppc405-generic.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aliases {
+ console = &uart0;
+ };
+
+ uart0: serial at 84000000 {
+ compatible = "xlnx,xps-uartlite-1.00.a";
+ interrupts = <0 0>;
+ reg = <0x84000000 0x10000>;
+ };
+} ;
diff --git a/arch/powerpc/dts/xilinx-ppc440-generic.dts b/arch/powerpc/dts/xilinx-ppc440-generic.dts
new file mode 100644
index 000000000000..c83523a5a481
--- /dev/null
+++ b/arch/powerpc/dts/xilinx-ppc440-generic.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aliases {
+ console = &uart0;
+ };
+
+ uart0: serial at 8b000000 {
+ compatible = "xlnx,xps-uartlite-1.00.a";
+ interrupts = <0 0>;
+ reg = <0x8b000000 0x10000>;
+ };
+} ;
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic
2016-01-26 12:47 ` [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic Ricardo Ribalda Delgado
@ 2016-01-26 13:13 ` Bin Meng
2016-01-26 14:44 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Bin Meng @ 2016-01-26 13:13 UTC (permalink / raw)
To: u-boot
On Tue, Jan 26, 2016 at 8:47 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com> wrote:
> Add device tree example file for xilinx-ppc440-generic and
> xilinx-ppc405-generic
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
> arch/powerpc/dts/Makefile | 2 ++
> arch/powerpc/dts/xilinx-ppc405-generic.dts | 15 +++++++++++++++
> arch/powerpc/dts/xilinx-ppc440-generic.dts | 15 +++++++++++++++
> 3 files changed, 32 insertions(+)
> create mode 100644 arch/powerpc/dts/xilinx-ppc405-generic.dts
> create mode 100644 arch/powerpc/dts/xilinx-ppc440-generic.dts
>
> v2: Add newlines after size-cells and aliases block
> Credit-to: Bin Meng <bmeng.cn@gmail.com>
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver
2016-01-26 12:47 [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Ricardo Ribalda Delgado
2016-01-26 12:47 ` [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic Ricardo Ribalda Delgado
@ 2016-01-26 13:13 ` Bin Meng
2016-01-26 15:23 ` Tom Rini
2 siblings, 0 replies; 6+ messages in thread
From: Bin Meng @ 2016-01-26 13:13 UTC (permalink / raw)
To: u-boot
On Tue, Jan 26, 2016 at 8:47 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com> wrote:
> If the xparameters file contains a LL_TEMAC definition compile its
> driver and the net commands.
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>
> v2: Add whitespaces after /* and before*/
> Credit-to: Bin Meng <bmeng.cn@gmail.com>
>
> .../xilinx/ppc440-generic/xilinx_ppc440_generic.c | 22 ++++++++++++++++++++++
> board/xilinx/ppc440-generic/xparameters.h | 4 ++++
> configs/xilinx-ppc440-generic_defconfig | 5 +++++
> include/configs/xilinx-ppc440-generic.h | 22 ++++++++++++++++------
> 4 files changed, 47 insertions(+), 6 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic
2016-01-26 12:47 ` [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic Ricardo Ribalda Delgado
2016-01-26 13:13 ` Bin Meng
@ 2016-01-26 14:44 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-01-26 14:44 UTC (permalink / raw)
To: u-boot
On Tue, Jan 26, 2016 at 01:47:46PM +0100, Ricardo Ribalda Delgado wrote:
> Add device tree example file for xilinx-ppc440-generic and
> xilinx-ppc405-generic
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160126/50544136/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver
2016-01-26 12:47 [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Ricardo Ribalda Delgado
2016-01-26 12:47 ` [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic Ricardo Ribalda Delgado
2016-01-26 13:13 ` [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Bin Meng
@ 2016-01-26 15:23 ` Tom Rini
2 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-01-26 15:23 UTC (permalink / raw)
To: u-boot
On Tue, Jan 26, 2016 at 01:47:45PM +0100, Ricardo Ribalda Delgado wrote:
> If the xparameters file contains a LL_TEMAC definition compile its
> driver and the net commands.
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160126/f3c1bb6d/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-26 15:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 12:47 [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Ricardo Ribalda Delgado
2016-01-26 12:47 ` [U-Boot] [PATCH v2 13/22] ppc: dts: Add device tree for xilix-ppc4xx-generic Ricardo Ribalda Delgado
2016-01-26 13:13 ` Bin Meng
2016-01-26 14:44 ` Tom Rini
2016-01-26 13:13 ` [U-Boot] [PATCH v2 22/22] ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver Bin Meng
2016-01-26 15:23 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox