net: add driver for OpenCores 10/100 Mbps ethernet MAC
Subsystems (2)
PATCH 1/2 net: add driver for OpenCores 10/100 Mbps ethernet MAC
This patch introduces a driver for the OpenCores 10/100 Mbps ethernet MAC core, ported from Linux kernel with small changes.
Signed-off-by Beniamino Galvani <[email protected]>
--- drivers/net/Kconfig | 6 + drivers/net/Makefile | 1 + drivers/net/ethoc.c | 515 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 522 insertions(+) create mode 100644 drivers/net/ethoc.c
drivers/net/Kconfig +6 -0
@@ -139,6 +139,12 @@ config DRIVER_NET_GIANFAR depends on ARCH_MPC85XX select PHYLIB +config DRIVER_NET_ETHOC + bool "OpenCores ethernet MAC driver" + help + This option enables support for the OpenCores 10/100 Mbps + Ethernet MAC core. + source "drivers/net/usb/Kconfig" config DRIVER_NET_MICREL
drivers/net/Makefile +1 -0
@@ -20,3 +20,4 @@ obj-$(CONFIG_DRIVER_NET_KS8851_MLL) += ks8851_mll.o obj-$(CONFIG_DRIVER_NET_DESIGNWARE) += designware.o obj-$(CONFIG_DRIVER_NET_GIANFAR) += gianfar.o obj-$(CONFIG_DRIVER_NET_MICREL) += ksz8864rmn.o +obj-$(CONFIG_DRIVER_NET_ETHOC) += ethoc.o
drivers/net/ethoc.c new file +515 -0
515 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 openrisc: enable OpenCores ethernet driver
The OpenCores 10/100 Mbps ethernet MAC is often available on OpenRISC-based SoCs and is supported by the OpenRISC architectural simulator (or1ksim) as well.
The patch enables the driver on the 'generic' openrisc board.
Signed-off-by Beniamino Galvani <[email protected]>
--- arch/openrisc/boards/generic/config.h | 2 ++ arch/openrisc/boards/generic/generic.c | 7 +++++++ arch/openrisc/configs/generic_defconfig | 6 ++++++ 3 files changed, 15 insertions(+)
arch/openrisc/boards/generic/config.h +2 -0
@@ -11,6 +11,8 @@#define OPENRISC_SOPC_UART_FREQ CONFIG_SYS_CLK_FREQ#define OPENRISC_SOPC_UART_BASE 0x90000000 +#define OPENRISC_SOPC_ETHOC_BASE 0x92000000 +/* We reserve 256K for barebox */ #define BAREBOX_RESERVED_SIZE 0x40000
arch/openrisc/boards/generic/generic.c +7 -0
@@ -16,6 +16,13 @@ static int openrisc_console_init(void)/* Register the serial port */ add_ns16550_device (DEVICE_ID_DYNAMIC ,OPENRISC_SOPC_UART_BASE ,1024 ,IORESOURCE_MEM_8BIT , &serial_plat); + +#ifdef CONFIG_DRIVER_NET_ETHOC +add_generic_device ("ethoc" ,DEVICE_ID_DYNAMIC ,NULL , +OPENRISC_SOPC_ETHOC_BASE ,0x1000 , +IORESOURCE_MEM ,NULL ); +#endif +return 0 ; }
arch/openrisc/configs/generic_defconfig +6 -0
@@ -18,3 +18,9 @@ CONFIG_CMD_GO=y CONFIG_CMD_TIMEOUT=y CONFIG_CMD_PARTITION=y CONFIG_DRIVER_SERIAL_NS16550=y +CONFIG_NET=y +CONFIG_NET_DHCP=y +CONFIG_NET_PING=y +CONFIG_CMD_TFTP=y +CONFIG_FS_TFTP=y +CONFIG_DRIVER_NET_ETHOC=y
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Beniamino,
Quoted 4 lines · Beniamino Galvani
This patch introduces a driver for the OpenCores 10/100 Mbps ethernet MAC core, ported from Linux kernel with small changes.
Signed-off-by Beniamino Galvani <[email protected]>
Both patches look good, so: Applied.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox