Update the copyright message to reflect my changes.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21725
Following the big internal rename, this is the external rename.
Rename the source file to ip17xx.c and adjust Makefile and Kconfig.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21724
Recognize that the driver supports many more devices than the ip175c.
The driver itself is now called ip17xx, all generic functions have been
renamed to ip17xx_*. The model-dependent functions have prefixes ip175c_
and ip175d_.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21723
Instead of reading the hardware state every time we want to inspect it or
to modify it, maintain it in struct ip175c_state.
This simplifies the code significantly.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21722
Add support for the IP175D chip. Since the register set is vastly different
from the previous models, we cannot not use the register number tables in struct
register_mappings (except for VLAN_DEFAULT_TAG_REG), so we supply a different
set of low-level functions.
Unlike with the previous models, we keep the VLAN setup in our state structure
instead of querying the hardware (it would be much harder in case of IP175D,
because the mapping between hardware and software state is not 1:1). Therefore,
get_flags() and get_state() are no-ops.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21721
Let ip175c_config_init() initialize the link state of the PHY and set the
PHY state machine directly to the PHY_RUNNING state in order to skip the
auto-negotiation phase.
Previously, auto-negotiation on PHY 0 (switch port 0) influenced the ethernet
driver connected to the CPU port, causing all sorts of weird effects.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21720
Clean up get_model() and make it recognize IP175D using yet another
chip ID register. Log the detected model.
Also fix a bug in the interface between the PHY layer and our probe function,
which caused IP175A devices to be ignored.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21719
Since IP175D uses tag-based VLANs, we need an ability to set VLAN tag
of every VLAN.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21718
So far, state->remove_tag was sometimes updated incrementally, sometimes
left to correct_vlan_state() to recalculate. Since I want to avoid use of
correct_vlan_state() for IP175D, this patch fixes the only two remaining
places which leave state->remove_tag inconsistent with state->add_tag
and it drops the recalculation.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21717
Let VLAN state variables be initialized not only when the enable VLAN bit
is toggled, but also upon reset.
At this point, this should be a no-op, since the driver reads the current
hardware state before doing any modifications anyway, but I plan to keep
some state locally in the subsequent patches.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21716
Replace vlan_ports array in struct ip175c_state by an array of structures.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21715