Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature vr9vpe #143

Closed
wants to merge 15 commits into from
Closed

Feature vr9vpe #143

wants to merge 15 commits into from

Conversation

kochstefan
Copy link
Contributor

@kochstefan kochstefan commented Oct 22, 2016

This patchset is based on an earlier patchset from Eddi De Pieri.
It was committed to the OpenWRT BB branch in 11/2014.
For details see description of single commits.

The patchset allows using the FXS ports
(for analogue telephones) from Lantiq VR9 based routers.

If the VR9 based router provides FXS ports and they shoud enabled then the following must added to the kernel command line:
mem=[TOTALMEMSIZE-2M] vpe1_load_addr=ADDRESS vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp

To use FXS 2M of RAM are needed for the VPE firmware. The size is given by vpe1_mem.
The available RAM must be reduced by this size using the mem argument.
A correct load address (example 0x83e00000) for the firmware must given, too.

Furthermore the following changes are needed to use FXS:

  • At least CONFIG_MIPS_MT_SMP needs to be disabled in xrx200/config-default or nosmp needs to be added to the kernel command line
  • VPE needs to be enabled similar to commit 064f467
  • Command line must be added to DTS of device (see above)
  • DTS of device needs vmmc part similar to commit 1379a2d

@kochstefan
Copy link
Contributor Author

kochstefan commented Nov 7, 2016

I have created a patchset for the LEDE project, too.
It's already merged. Most of the patches of this pull request are already part of LEDE.

SMP must be disabled with nosmp within kernel command line if FXS functionality should used by a router.

kochstefan and others added 15 commits April 4, 2017 23:00
(required not-distributable firmware blob - dump it by yourself from original firmware)

Signed-off-by: Eddi De Pieri <eddi@depieri.net>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@43156 3c298f89-4303-0410-b956-a3cf2f4a3e73
(cherry picked from commit ea9e61b)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
(required not-distributable firmware blob - dump it by yourself from original firmware)

Signed-off-by: Eddi De Pieri <eddi@depieri.net>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@43161 3c298f89-4303-0410-b956-a3cf2f4a3e73
(cherry picked from commit 47b1ff9)

Modified after cherry-pick:
FW_MD5SUM in Makefile

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
(required not-distributable firmware blob - dump it by yourself from original firmware)

Signed-off-by: Eddi De Pieri <eddi@depieri.net>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@43163 3c298f89-4303-0410-b956-a3cf2f4a3e73
(cherry picked from commit 8d924d4)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Created minimal patchset based on BB rev 43158 by Eddi De Pieri
14.07/openwrt.git 79472c0

If the VR9 based router provides FXS ports and they shoud enabled then
the following must added to the kernel command line:
mem=[TOTALMEMSIZE-2M] vpe1_load_addr=ADDRESS vpe1_mem=2M maxvpes=1
maxtcs=1

To use FXS 2M of RAM are needed for the VPE firmware. The size is set
by vpe1_mem.
The available RAM must be reduced by this size using the mem argument.
A correct load address (example 0x83e00000) for the firmware must be given,
too.

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit ca9b996)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
modify 500-ar9_vr9.patch from
commit 29367aa ("lantiq: ltq-vmmc add support for ar9-vr9")

- remove unused dependencies to external watchdog functions
  (wdog setup is already disabled)
- using header file from kernel (asm/vpe.h) instead patched file (vpe.h)
- cleanup whitspace warning

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
…zers

modify 0152-lantiq-VPE.patch from
commit e0229a1 ("lantiq: added support for VPE1")

- remove wdog function declarations from header (asm/vpe.h)
- remove wdog command line init functions (vpe.c)

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
As specified by e0229a1 if the VR9
based router provides FXS ports and they should enabled then the
following must added to the kernel command line:

  mem=[TOTALMEMSIZE-2M] vpe1_load_addr=ADDRESS vpe1_mem=2M

By adding mem= parameter a pci device stop working correctly. The
pci-lantiq.c module use get_num_physpages() to compute dynamically the
memory amount of the board.

The mem= make the module to compute in the wrong way the BAR11MASK, so
in this situation the mask is misaligned with the dma area that the
hardware expects.

This patch is a port of what legacy ifxmips_pci.c does.

Signed-off-by: Eddi De Pieri <eddi@depieri.net>
(cherry picked from commit 07bc0d6)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
SMP state is generally affected by
- CONFIG_SMP build-time kernel configuration option and
- 'nosmp' runtime kernel commandline option

The SMP state within vpe-mt.c is determined by CONFIG_SMP option.
A runtime check is needed if VPE functionality
should be used with a kernel image that supports SMP.

This fix introduces a check for 'nosmp' command line option
if CONFIG_SMP kernel configuration option is enabled.

Note: This patch is needed to use lantiq FXS if CONFIG_MIPS_MT_SMP
(that activates CONFIG_SMP) is enabled within kernel configuration
and the 'nosmp' command line argument is given to disable SMP at runtime.

Without this patch CONFIG_MIPS_MT_SMP must be disabled before using FXS.
With this patch setting the 'nosmp' parameter is enough.

In general, concurrent usage of FXS and SMP
is incompatible and will cause kernel panics.

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
(required not-distributable firmware blob - dump it by yourself from original firmware)

Signed-off-by: Eddi De Pieri <eddi@depieri.net>

(cherry picked from commit 064f467)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
(cherry picked from commit 4649a92)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
- remove unused code within 500-ar9_vr9.patch
- fixed return of IFX_ERROR (solves SIGSEGV in asterisk at failure)
- align it a bit with 400-falcon.patch
- remove 600-kernel-4.9.patch since changed parts
  are removed during cleanup

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
@blogic
Copy link
Contributor

blogic commented Nov 7, 2017

already part of the LEDE tree which will replace the OWRT tree shortly

@blogic blogic closed this Nov 7, 2017
openwrt-bot pushed a commit that referenced this pull request Feb 14, 2023
08c709c58187 rtnl: add support for registering an uloop based listener
599a7fb59380 Merge pull request #140 from nbd168/rtnl
c4125c516e0a nl80211: fix NL80211_ATTR_SURVEY_INFO
c43bb9d8fe8d Merge pull request #141 from dhewg/master
c1342d934b2d nl80211: add missing ucv_get() calls
9022b270683a rtnl: add missing ucv_get() calls
837cffec5a5c Merge pull request #142 from nbd168/ref-fixes
65b1f181e642 rtnl: add missing uc_vm_registry_set call
ab2f3f70257d Merge pull request #143 from nbd168/rtnl-fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Feb 15, 2023
08c709c58187 rtnl: add support for registering an uloop based listener
599a7fb59380 Merge pull request openwrt#140 from nbd168/rtnl
c4125c516e0a nl80211: fix NL80211_ATTR_SURVEY_INFO
c43bb9d8fe8d Merge pull request openwrt#141 from dhewg/master
c1342d934b2d nl80211: add missing ucv_get() calls
9022b270683a rtnl: add missing ucv_get() calls
837cffec5a5c Merge pull request openwrt#142 from nbd168/ref-fixes
65b1f181e642 rtnl: add missing uc_vm_registry_set call
ab2f3f70257d Merge pull request openwrt#143 from nbd168/rtnl-fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants