]> git.dujemihanovic.xyz Git - u-boot.git/commit
common/cmd_ethsw: Add generic commands for Ethernet Switches
authorCodrin Ciubotariu <codrin.ciubotariu@freescale.com>
Fri, 24 Jul 2015 13:55:27 +0000 (16:55 +0300)
committerYork Sun <yorksun@freescale.com>
Mon, 21 Sep 2015 15:29:47 +0000 (08:29 -0700)
commit4ea54e3f2394cfca9ffaa14c181d2ae8a11677a8
tree3724a951d66ebb94314b467a46ea5c64c6b459cc
parent9de059871f8364dd898faf0b6057b8fa69fa2728
common/cmd_ethsw: Add generic commands for Ethernet Switches

This patch creates a flexible parser for Ethernet Switch
configurations that should support complex commands.
The parser searches for predefined keywords in the command
and calls the proper function when a match is found.
Also, the parser allows for optional keywords, such as
"port", to apply the command on a port
or on all ports. For now, the defined commands are:
ethsw [port <port_no>] { enable | disable | show }

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
common/Makefile
common/cmd_ethsw.c [new file with mode: 0644]
include/ethsw.h [new file with mode: 0644]