CONFIG_MTD_SPLIT_SUPPORT symbol default value is 'y' and many platform
specific configs explicitly enables it, while no one platform disables
this symbol. So place it in generic config and remove from platform
specific configs.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 44612
The flag is experimental and requires toolchain support, which we don't
provide. Also neither target has an FPU so it becomes meaningless
without the FPU emulator enabled.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44584
Linux commit d75b1ade567ffab ("net: less interrupt masking in NAPI")
chose the samantics of the napi poll return value, which caused napi to
not resume interrups/polling anymore.
Fix the return value to restore expected behaviour.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44576
Legacy probe passed the IRQSTAT registers instead of the IRQMASK
registers causing all register accesses to be offset by 16 bytes.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44575
The driver expected data then dir, but both dts and legacy code passed
dir then data. Fix this by making the driver expect the registers in
ascending order, i.e. dir then data.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44574
Now that all gpio users without named gpios use DT, we do not need
to fix the gpio controller bases anymore.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44567
Register buttons and leds through DT for all available dts,
and remove them from the board files.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[jogo: remove leds/buttons from board files
fix wrong led polarities for dsl-274xb-c2, cpva642, p870hw
comment out spi-gpio and associated leds]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44566
Add a generic mmio gpio controller based driver and probe it
through device tree.
Use aliases for base calculation until we converted all users to
device tree or named gpios.
Convert bcm63xx_enet's ephy-reset gpio to use a named gpio.
While at it, remove the duplicate reset gpio defintion for livebox.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44565
Add a dtsi for bcm3368, add a dts and profile for cvg834g, and convert
it to use ImageDTB. Since HCS requires more arguments, enhance the max
arguments of the call.
The image name is intentionally left blank to prevent non-initramfs
images to be built, as they currently contain no rootfs and consequently
won't work.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44561
Most 16 MiB RAM devices don't even load elf kernels, so it's safe to
assume we have at least 32 MB RAM. This fixes tftp booting with the
default package set as this already produces an uncompressed
kernel > 8 MiB.
New limit is 8 MiB compressed / 24 MiB compressed.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44558
Remove the need for the header file to be exported - we don't need most
of it anyway; all we care about are the offset of the rootfs length and
header crc fields.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44557
We do not need to align the start of read only rootfs's to erase blocks.
This allows us to write the squashfs rootfs directly behind the kernel,
potentially freeing up one erase block.
We still need to align for jffs2, so add a flag for imagetag to
optionally align the rootfs start.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44556
This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 43715
According to the vendor tarball, the TD-w8900GB's flash has 64k erase
block size, but CFE spans two blocks. So fixup the image offset
accordingly but keep block size at its default (64k).
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[jogo: add commit message, add image offset, change nvram offset]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 43572
Add the required nodes for the interrupt controllers and register
them through DT when a DTB is present.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 43457
Add irq-domain aware irqchip drivers for the irq controllers of bcm63xx
and switch to use them.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 43454
If there is no board support in the kernel, it does not make sense to
build images for devices. So drop any images for board ids for which
there are nc corresponding board_info structs in the kernel.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 43364
Move compatible strings from board structs into separate table. This
allows for several board compatibles to match to the same board in case
e.g. only the flash size / partitions differ.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 43341
replace all occurences of LINUX_VERSION with the cleaner
approach. future kernel upgrades must mostly touch only
one file. the only platform left is netlogic, because it
uses a intermediate kernel 3.14.16
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
SVN-Revision: 43047
This prevents generating every supported image, except for de "Default" profile.
Also fixes Neufbox 6 image generation.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42210
Use generic profiles for brcm63xx instead of having similar profiles for
each subtarget.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42208
This changes board info to match the Wiki
http://wiki.openwrt.org/toh/huawei/hg556a, removes the no longer needed
fallback board and fixes HG556 Ralink eeprom extraction.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[jogo: rename partitions instead]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42206
Now that we migrated all users to dtb based detection, we can drop the
board fixup code.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42129
This requires individual images for each board version for now.
Linux partition was shrunk to ensure writing thewrong image won't
erase wifi calibration data.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42126
Add the required nodes to the dtsi files and code to prevent double
registration from the board support code.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42123
In preparation for switching to dtb based board identification, add
support for building lzma-loader and lzma cfe kernels with dtb
appended.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42121
Allow appending a dtb blob to the binary and use it for identifying the
board. Fall back to nvram based identification in case of no dtb passed.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 42119
Mostly works except for USB led. Flashing not tested yet. Mostly
as an example for the sprom fixup code.
Fixup values taken from GPL tarball by comparing bcm43217_map.c
with the struct in sprom.c.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41944
Rework fallback sprom support by providing different sproms for
different chips. Also make it optional to use.
This likely causes sprom fallback support to break on a few boards.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41942
Now that BB is branched off, we can now switch to 3.14 and start
breaking stuff again.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41941
Add a working lzma loader and use it for generating initramfs kernels
to allow easily netbooting elf kernels on devices with a 4 MiB CFE
size limit.
Based on ar71xx's lzma-loader.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41940
Since kernel commit 928bea964827 ("PCI: Delay enabling bridges until
they're needed"), pci fixups are run with bridges (e.g. the pcie port)
disabled.
This causses hangs when ath9k_pci_fixup tries to manually enable the
device to apply the register fixups.
Fix this by enabling any parent bridges before trying to access the
device itself.
Fixes boot on DSL-274XB rev F1.
Reported-by: Matteo Croce <matteo@openwrt.org>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41856
- adsl and lan leds are swapped.
- internetkey is labeled as hspa.
- enable status led and reset button for failsafe.
- use new leds script.
- fix switch configuration.
- remove enet0 from board_info.
- add profile.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41588
This patch also makes use of the new leds script.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41585
Move defines and board_info structs back to their proper locations so
(de-)selecting SOC support won't break the build.
Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41550
The Livebox 1 support is currently broken. Fixed with this patch
Fixes:
- Redboot partitioning broken: fixed
- Replaced custom ephy reset with platform code
- USB code breaks the building process: fixed
- Led colors
- Removed unneded EHCI code since bcm6348 only has OHCI
Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
[jogo: drop unneded parts since merge, fixup to apply to current head]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41424
This adds support for Comtrend WAP-5813n.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[jogo: refresh patches]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41421
Some fixes for Telsey CPVA502+ bcm6348 routers:
- reset the external PHY (eth1) with proper platform code, not using a led definiton
- eth1 is an external phy, not a switch, deleted forced link speed
- fixed led color
Patch made for 3.14 kernel patches.
Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
[jogo: also fix 3.14, refresh patches]
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41420
205-fix-headers_install.patch is obseleted by upstream commit 3246a0352e3d58380b9386570f1db1faf7edf8a8
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41351
Use the CFE_EPTSEAL to tell them apart at runtime. Added for now only
for the 3.14 until properly tested.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 41296
ARGC is a 'C-ism', but not known/valid in shell-syntax - insert the correct
var $# (=number of args) here. under normal conditions this had no impact,
but we should at least correct it. the error was observable like this:
root@box:~ [ -e "/etc/functions.sh" ] && . /etc/functions.sh
root@box:~ [ -e "/lib/functions.sh" ] && . /lib/functions.sh
root@box:~ . /lib/upgrade/platform.sh
root@box:~ . /lib/upgrade/common.sh
root@box:~ platform_check_image /tmp/myfirmware.bin
ash: bad number
root@box:~ echo $?
0
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
SVN-Revision: 40915
mempy_fromio seems to be randomly failing when the destination is
unaligned; work around it by forcing the name to be aligned in memory.
Should fix jffs2 and SMP for now, but needs to be some additional
looking into as it does not fix the source.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 40396
Now that 3.13 will be EOL soon, switch to 3.14.
Known issues:
* 74x164 is not available because upstream dropped non-DT support
* jffs2 breaks with SMP
Unknown issues:
* probably plenty
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 40380
Add support for 3.13 as a development kernel. Mostly untested, only net
booted. If flashed may brick your router or kill your cat.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39746
Only netboot tested, so no images or now.
GbE ports are only working in FE mode, and leds do not work.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39679
Completely untested except for booting from network; wan port
only works in 10/HD, lan1 only in 100/FD.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39678
BCM63168 has 6 ports (3 FE PHY, 1 GE PHY, two RGMII) and BCM63268
has two additional RGMII ports, making it 8.
Fix this by checking the chip variant and applying an appropriate
limit.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39677
Support for Asmax AR 1004g router
Signed-off-by: Adrian Feliks <mexit@o2.pl>
Patchwork: http://patchwork.openwrt.org/patch/4464/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39674
This adds profile and build image for Sagemcom F@st2704, using b43
driver.
For WiFi to work properly BCMA fallback SPROM support patch must
be applied (http://git.io/z1Ki8A).
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/4212/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39673
This adds userspace support for Sagemcom F@st 2704 router.
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/4215/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39672
This adds kernel support support for Sagemcom F@st 2704 wireless ADSL
router.
It's a BCM6328-based 802.11n wireless router with USB port and ADSL2+
modem equipped with 64 MiB RAM and 8 MiB flash.
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/4266/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39671
Add kernel support for the BCM963269BHR board, USB and Ethernet switch,
LEDs and buttons are working.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39363
Allow using the HSSPI controller since it works just fine, as well as
the integrated switch core, since that one works too.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39362
Update a few devices with their actual port numbers, especially those
with two ports.
Should allow properly using the second port on the Neufboxen and HW553
and HW556.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39325
Allow setting the number of available usb host ports for boards with
additional sanity checks to allow using the second port on devices
where it is available.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39324
USB will fail to work if compiling with BCM6318 only if BCM63XX_HAS_EHCI
and BCM63XX_HAS_OHCI are not selected.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39322
Return the same clock for usbh and usbd on BCM6318 to prevent the clock
getting disabled despite being supposed to be enabled, e.g. by the
following sequence:
clk_enable(usbh); <- usbh->usage = 1, enabled
clk_enable(usbd); <- usbd->usage = 1, enabled (no effect)
clk_disable(usbd); <- usbd->usage = 0, -> disabled!
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 39321
Changeset r39302 updated a board section and added twice .has_ehci0,
this is not necessary, so fix it.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39304
BCM6318 has a special initialization sequence which involves touching
PLL control registers in the USBH_PRIV register space, as well as
toggling a bit the Simulation control register.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39302
Enable the use of the USB gadget device at the board level so we can use
bcm63xx_udc on this board.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39292
Also fixing a build warning due to a misplaced parenthesis in the
previous submission.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39291
Very similar to the BCM96318REF board except for the name and the
SDRAM/DDR configuration which is totally transparent for us.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39286
Add basic support for the BCM96318REF board which is comprised of:
- HS-SPI flash support
- Ethernet switch support
- USB slave device support
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39283
Provide clock toggling for the USB host and slave controller as well as
for the Ethernet Switch. The bcm63xx_enetsw driver is changed not to use
request_mem_region() as the Roboswitch register overlaps with the
Roboswitch IUDMA channels, hence making the driver return -EBUSY. A
future fix might be to use variable size RSET_ENETSW sizes depending on
the chip we are targetting.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39282
While adding support for BCM6345 Ethernet, some changes in the macros
ENETDMA{C,S} where introduced which now make the bcm63xx USB gadget
driver fail to build. Fix this.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39279
A missing condition check in dev-hsspi.c prevented the controller from
being registered on 6318 where it is fully functional.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 39278