Commit Graph

1048 Commits

Author SHA1 Message Date
Gabor Juhos
464d384762 ip17xx: fix autonegotioation issues
SVN-Revision: 21727
2010-06-08 20:19:14 +00:00
Gabor Juhos
94c6afe09d generic: add aneg_done and update_link functions for the phy_device
SVN-Revision: 21726
2010-06-08 20:19:11 +00:00
Gabor Juhos
0cc840f158 ip17xx: Update the copyright message
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
2010-06-08 20:19:08 +00:00
Gabor Juhos
b650fecb7d ip17xx: Rename the driver to ip17xx.c
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
2010-06-08 20:19:05 +00:00
Gabor Juhos
0b84c5a1c1 ip17xx: The big rename
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
2010-06-08 20:18:58 +00:00
Gabor Juhos
2ccaef4f4a ip17xx: Keep all state locally
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
2010-06-08 20:18:55 +00:00
Gabor Juhos
4511da99b9 ip17xx: Add support for IP175D
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
2010-06-08 20:18:51 +00:00
Gabor Juhos
d48ba78aa4 ip17xx: Avoid auto-negotiation
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
2010-06-08 20:18:47 +00:00
Gabor Juhos
a7301c57a4 ip17xx: New chip detection
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
2010-06-08 20:18:42 +00:00
Gabor Juhos
d577cfa397 ip17xx: Add VLAN tag field
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
2010-06-08 20:18:38 +00:00
Gabor Juhos
d08093b8b3 ip17xx: Maintain state->remove_tag incrementally
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
2010-06-08 20:18:34 +00:00
Gabor Juhos
e04dd645f2 ip17xx: Initialize VLAN state upon reset
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
2010-06-08 20:18:30 +00:00
Gabor Juhos
3c213b14ed ip17xx: Introduce vlan array
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
2010-06-08 20:18:25 +00:00
Gabor Juhos
065bc60f37 ip17xx: Introduce indirection of low-level operations
This patch introduces seperation between low-level and high-level parts
of the driver. The low-level functions are now called via pointers stored
in struct ip175c_regs.

The only functional changes are:

  o  correct_vlan_state() is now called as a part of every update_state().

  o  The order of setting of MODE_REG and resetting switch ports
     has changed. (These are independent actions, so it should not matter.)

  o  ip175c_set_tagged() sets the tags via update_state() instead of writing
     directly to the registers.

  o  The same for ip175c_set_pvid().

The only gaps in this abstraction are operations on ports (get_port_speed
and friends), which access PHY registers directly.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21714
2010-06-08 20:18:20 +00:00
Gabor Juhos
09be47cf90 ip17xx: Fix use of MODE_VAL
The value written to MODE_REG in ip175c_reset() should be obviously MODE_VAL,
not RESET_VAL. Actually, this change is a NOP, because in the only case where
the MODE_REG is used, the two values are identical, but it makes the code
more readable.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21713
2010-06-08 20:18:15 +00:00
Gabor Juhos
f09e3fb65b ip17xx: Fix indentation in get_state() and update_state()
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21712
2010-06-08 20:18:10 +00:00
Gabor Juhos
7b5a77fa39 ip17xx: Fixed error handling in ip175c_set_val()
Upon error, ip175c_set_val() returned 0 instead of -EINVAL.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21711
2010-06-08 20:18:05 +00:00
Gabor Juhos
b3073617a5 ip17xx: Cosmetic cleanups
Trying to unify capitalization and formatting of comments. Writing of periods
at the end of comments is however still inconsistent.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21710
2010-06-08 20:18:00 +00:00
Gabor Juhos
f96f1cd16f ip17xx: Consolidate operations with PHY registers
Call mdiobus_{read,write} instead of duplicating their code.

Introduce ip_phy_write_masked(), which changes a part of a register. Will
be used later in this patch series. Please note that it does not hold any
lock between reading and writing, so it is up to the caller to serialize.

Also add DUMP_MII_IO, which enables logging of all MII accesses.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21709
2010-06-08 20:17:55 +00:00
Gabor Juhos
c0c0a60718 swconfig: Fix a bug in use of SWITCH_PORT_FLAG_TAGGED
SWITCH_PORT_FLAG_TAGGED is a bit index, not a bit mask.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>

SVN-Revision: 21708
2010-06-08 20:17:03 +00:00
Alexandros C. Couloumbis
ce6b70119c generic-2.6: fix mini_fo 2.6.35 kernel issue
SVN-Revision: 21706
2010-06-08 16:44:42 +00:00
Alexandros C. Couloumbis
7414d7d943 fix a typo on commit r21704
SVN-Revision: 21705
2010-06-08 16:19:34 +00:00
Alexandros C. Couloumbis
7e2b5d177b generic-2.6: generic: add missing config symbols for 2.6.35
SVN-Revision: 21704
2010-06-08 16:13:37 +00:00
Gabor Juhos
9f196d5223 generic: add missing config symbol for 2.6.34
SVN-Revision: 21699
2010-06-07 09:18:18 +00:00
Alexandros C. Couloumbis
4503e77b0d generic-2.6: add kernel 2.6.35 preliminary support (patches)
SVN-Revision: 21696
2010-06-07 05:56:49 +00:00
Alexandros C. Couloumbis
1428b8f9bc refresh kernel patches
SVN-Revision: 21694
2010-06-06 21:16:31 +00:00
Florian Fainelli
ac23dcfe11 do not override kmod-usb-storage-extras Kconfig symbols (#7285)
SVN-Revision: 21688
2010-06-06 19:02:30 +00:00
Gabor Juhos
b730849966 generic: update mips multimachine patch
SVN-Revision: 21681
2010-06-05 18:26:45 +00:00
Gabor Juhos
2dfcdb9465 generic: merge mips multi machine update to generic patches for 2.6.34
SVN-Revision: 21675
2010-06-04 19:09:52 +00:00
Gabor Juhos
35765bfcf8 generic: merge mips multi machine update to generic patches for 2.6.33
SVN-Revision: 21674
2010-06-04 19:09:49 +00:00
Gabor Juhos
383bd396fa generic: merge mips multi machine update to generic patches for 2.6.32
SVN-Revision: 21673
2010-06-04 19:09:46 +00:00
Hauke Mehrtens
6ef6b4e8b3 kernel: add missing config symbols.
Thank you Maddes for your patch

This closes #7375.

SVN-Revision: 21623
2010-05-29 14:32:58 +00:00
Hauke Mehrtens
d9461d438a kernel: add lzma support for arm cpu.
This patch appears to be lost beetween 2.6.32 and 2.6.33.

Thank you Maddes for the patch.

This helps making orion work with kernel 2.6.34.
closes  #7377.

SVN-Revision: 21622
2010-05-29 14:31:56 +00:00
Nicolas Thill
46e2eea1ef target/linux: refresh 2.6.32 patches
SVN-Revision: 21566
2010-05-24 20:35:46 +00:00
Hauke Mehrtens
4f1a51b7d9 kernel: add lzma support for arm cpu.
This patch appears to be lost beetween 2.6.32 and 2.6.33.

Thank you Maddes for the patch.

This helps making orion work with kernel 2.6.33.

SVN-Revision: 21552
2010-05-23 17:44:32 +00:00
Hauke Mehrtens
3e4f6af8a5 generic-2.6: refresh patches
SVN-Revision: 21542
2010-05-23 13:17:32 +00:00
Nicolas Thill
359f611957 target/generic-2.6: add missing bits for 2.6.30 ssb update
SVN-Revision: 21507
2010-05-19 17:07:40 +00:00
Lars-Peter Clausen
ba30e23bbc Add checksum for 2.6.34, refresh 2.6.34 patches and update targets from 2.6.34-rcX to 2.6.34
SVN-Revision: 21498
2010-05-17 22:05:07 +00:00
Florian Fainelli
bef594108f add missing ifxmips crypto config symbols, spotted by buildbot
SVN-Revision: 21483
2010-05-17 09:28:44 +00:00
Florian Fainelli
72e6e69855 do not export find_task_by_vpid twice on 2.6.30
SVN-Revision: 21456
2010-05-15 19:14:50 +00:00
Hauke Mehrtens
cfec944f42 ssb: activate CONFIG_SSB_BLOCKIO in the kernel and not in compat-wireless.
Before this patch CONFIG_SSB_BLOCKIO was set to y in compat-wireless
but the in kernel ssb system had it set to n, this causes an invalid pointer.
b43 now needs CONFIG_SSB_BLOCKIO=y

SVN-Revision: 21449
2010-05-15 11:04:53 +00:00
Lars-Peter Clausen
37a8f3522f Move CONFIG_LZMA_{DE,}COMPRESS to generic config
It is selected by CONFIG_JFFS2_LZMA which is set in the generic config.

SVN-Revision: 21437
2010-05-12 23:04:18 +00:00
Lars-Peter Clausen
48ec7efd65 gpio_buttons: include slab.h
Fixes build with 2.6.34

SVN-Revision: 21436
2010-05-12 22:50:26 +00:00
Hauke Mehrtens
51f6c2ccf4 kernel: add missing symbol
SVN-Revision: 21429
2010-05-12 20:15:51 +00:00
Lars-Peter Clausen
35a7db1e92 Add missing symbols to generic 2.6.34 config
SVN-Revision: 21428
2010-05-12 19:39:04 +00:00
Florian Fainelli
4eecca22d4 refresh 2.6.32 patches
SVN-Revision: 21411
2010-05-09 18:13:49 +00:00
Florian Fainelli
d3092630a8 make etrax samsung flash patch generic (#6552)
SVN-Revision: 21408
2010-05-09 09:25:41 +00:00
Florian Fainelli
4510d8838b fix build error on hifnHIPP spotted by buildbot
SVN-Revision: 21373
2010-05-05 09:03:59 +00:00
Jo-Philipp Wich
32e7340bf2 update OCF framework to version 20100325
SVN-Revision: 21356
2010-05-04 20:59:19 +00:00
Jo-Philipp Wich
d7048c2300 remove a bogus byteswap in the hifn_795x driver, should fix support for the VPN1411 crypto accelerator
SVN-Revision: 21344
2010-05-03 20:24:49 +00:00