Commit Graph

6468 Commits (6ae9f46b7fd6c19699e169eba0b3969e8c6723c0)

Author SHA1 Message Date
Gabor Juhos 6ae9f46b7f 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21720 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:47 +00:00
Gabor Juhos 50dc4ef20a 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21719 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:42 +00:00
Gabor Juhos 5dd433ee41 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21718 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:38 +00:00
Gabor Juhos 7b4b5ffe70 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21717 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:34 +00:00
Gabor Juhos b4a61f51bb 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21716 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:30 +00:00
Gabor Juhos 21c047cd0b 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21715 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:25 +00:00
Gabor Juhos 83ae20132e 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21714 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:20 +00:00
Gabor Juhos ce244e155a 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21713 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:15 +00:00
Gabor Juhos a8c13fe54f 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21712 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:10 +00:00
Gabor Juhos 0bff315185 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21711 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:05 +00:00
Gabor Juhos b9eb7def42 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21710 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:18:00 +00:00
Gabor Juhos 9d0a3a6f6b 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21709 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:17:55 +00:00
Gabor Juhos 966a9bdb93 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>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21708 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 20:17:03 +00:00
Alexandros C. Couloumbis 436ce23dd9 brcm47xx: add kernel 2.6.35 preliminary support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21707 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 16:58:06 +00:00
Alexandros C. Couloumbis 7bc4ea6c95 generic-2.6: fix mini_fo 2.6.35 kernel issue
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21706 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 16:44:42 +00:00
Alexandros C. Couloumbis 321c2089bd fix a typo on commit r21704
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21705 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 16:19:34 +00:00
Alexandros C. Couloumbis 3b03d777c7 generic-2.6: generic: add missing config symbols for 2.6.35
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21704 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 16:13:37 +00:00
Alexandros C. Couloumbis ba30477904 atheros: add kernel 2.6.35 preliminary support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21703 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-08 15:01:35 +00:00
Gabor Juhos ea4d51d1b3 generic: add missing config symbol for 2.6.34
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21699 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-07 09:18:18 +00:00
Gabor Juhos e61a8b2e88 ar71xx: fix 2.6.34 build errors
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21698 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-07 09:18:13 +00:00
Gabor Juhos 650572a2c8 ar71xx: add missing 2.6.34 config symbol
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21697 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-07 09:17:34 +00:00
Alexandros C. Couloumbis 80d01892f1 generic-2.6: add kernel 2.6.35 preliminary support (patches)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21696 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-07 05:56:49 +00:00
Alexandros C. Couloumbis 6c0c19ae77 refresh kernel patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21694 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 21:16:31 +00:00
Florian Fainelli 5bf6ca1e2c [ar7] generate NA and non-NA images for Titan platforms
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21692 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 19:17:01 +00:00
Florian Fainelli 7023050cc8 [ar7] add Titan MTD partitionning support (#6632)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21691 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 19:16:55 +00:00
Florian Fainelli ce097a54e0 [ar7] titan board also have CYWL as a product id
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21690 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 19:16:49 +00:00
Florian Fainelli 56102b8a7b [kernel] do not override kmod-usb-storage-extras Kconfig symbols (#7285)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21688 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 19:02:30 +00:00
Gabor Juhos 8c9776b550 ar71xx: build firmware images if Minimal profile is selected
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21684 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 17:41:39 +00:00
Gabor Juhos 3859e97282 ar71xx: rename Minimal profile
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21683 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 17:41:34 +00:00
Hauke Mehrtens 9d9eb999e1 orion: Update Orion in trunk to kernel 2.6.34.
Was flashed on WRT350Nv2, booted and is running for several days.
Closes #7405

Thank you maddes for your patch.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21682 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-06 10:51:52 +00:00
Gabor Juhos e69562eb28 generic: update mips multimachine patch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21681 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-05 18:26:45 +00:00
Gabor Juhos bfa2da2042 adm5120: convert to use the new mips multimachine stuff
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21680 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-05 18:26:40 +00:00
Felix Fietkau 891dbee64e ar71xx: clarify the nand subtarget a bit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21679 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-05 11:55:49 +00:00
Gabor Juhos d501f36856 generic: merge mips multi machine update to generic patches for 2.6.34
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21675 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-04 19:09:52 +00:00
Gabor Juhos 110d363959 generic: merge mips multi machine update to generic patches for 2.6.33
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21674 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-04 19:09:49 +00:00
Gabor Juhos c60cbd2e61 generic: merge mips multi machine update to generic patches for 2.6.32
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21673 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-04 19:09:46 +00:00
Gabor Juhos 2670b70915 adm5120: don't use linux/autoconf.h
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21672 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-04 19:09:43 +00:00
Gabor Juhos 3e30c92940 adm5120: fix build error on 2.6.34
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21671 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-04 19:09:39 +00:00
Claudio Mignanti ebfb87169d [etrax] Force usb features, fix depends
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21664 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-03 09:52:34 +00:00
Felix Fietkau 050d5201af orion: fix lan and wan mac address for wrt530n v2 (patch by maddes from #7113)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21647 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-01 14:41:37 +00:00
Alexandros C. Couloumbis 6210bf767f ar71xx: fix rootfs mount issue (closes #7319)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21645 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-01 08:49:57 +00:00
John Crispin c463512391 Fix ramips build when CONFIG_RALINK_DEV_GPIO_BUTTONS is not set.
Signed-off-by: Helmut Schaa



git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21643 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-31 11:57:32 +00:00
Daniel Dickinson 9232721abc brcm-2.4: preinit: Renamed failsafe echo scriplet to reflect that it is brcm-specific
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21637 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 03:21:22 +00:00
Daniel Dickinson 5e5a288fef brcm-2.4: preinit: Removed duplicate failsafe switch config file
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21636 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 03:21:11 +00:00
Daniel Dickinson fe3f850ad0 ramips: Added preinit scriptlet to set vars based on cpuinfo during preinit_main. This fixes a bug in which the vars were not set due to /proc not being mounted when ramips.sh was sourced
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21635 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 03:21:00 +00:00
Daniel Dickinson 9de82160b1 ar71xx: Added preinit scriptlet to set vars based on cpuinfo during preinit_main. This fixes a bug in which the vars were not set due to /proc not being mounted when ar71xx.sh was sourced
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21634 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 03:20:49 +00:00
Daniel Dickinson f165cba5c1 adm5120: Added preinit script to set vars based on cpuinfo during preinit main; This fixes a bug in which the per-board vars were not set due to cpuinfo not being mounted when the adm5120.sh was run
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21633 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 03:20:38 +00:00
Daniel Dickinson f3d7a5138d adm5120: Fixed name of preinit_iface scriptlet
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21632 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 03:20:27 +00:00
Daniel Dickinson 9a6f5981fe brcm63xx: Fixed 96348GW (Tecom Gx00) LED definitions to match reality (vs reference design)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21631 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 02:04:56 +00:00
Daniel Dickinson 1f0332b969 brcm63xx: Tecom GW6x00 profile: Added hotplug button events and gpio-leds kmods
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21630 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 01:44:37 +00:00