Currently AR5312 misc IRQ numbers are used for AR2315+ chips, what cause
us to use switch-case to map IRQ number to ISR bit. Introduce AR2315
specific misc IRQs set and simplify interrupt (un)mask operation.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41694
Rename interrupt control handlers to be consistent with operation names
and add IRQ chips names.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41693
UART IRQ number could be different for different SoCs, so make them
configurable.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41691
* Pass iomem and IRQ via platform device resources
* Remap iomem and use iowrite32 accessor function
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41688
Rename config symbol to AR2315_WDT to avoid confusion with other Atheros
SoCs.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41685
205-fix-headers_install.patch is obseleted by upstream commit 3246a0352e3d58380b9386570f1db1faf7edf8a8
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41351
We do not need global access to it, so move it from arch include to the
mtd subdir.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41321
Pass I/O memory regions (flash read and MMR) via platform device
resources array and use them inside spiflash driver.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41320
Moving the start of IO mem to 0x10000000 leads to allocation conflict
with SPI flash memory region, which starts at 0x08000000.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41319
We should not detect actual flash size during board initialization to
find board config at the end of the flash, just use large enough mapping
size (currently 128 mbit). If mapping size is larger than the actual
flash size, than flash will simply be mapped multiple times. This change
simplifies code by removing duplication and saves about 200 bytes of
uncompressed kernel :)
Tested with Ubnt LS2 board equipped with STM 25p32v6p NOR flash (32 mbit).
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41317
Merge 3_10-updates.patch into the ar2313_ethernet.patch since it contains
only one ethernet driver fix.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41316
Use msleep(20) instead of msleep(10) to make code closer to reality
since msleep can sleep for up to 20ms even we request shorter delay.
All updated calls are located in PCI initialization routine which is
called only once upon device boot. So there should be no performance
issues caused by more longer delay.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41096
Use __func__ instead of gcc specific __FUNCTION__ as suggested by
checkpatch.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41093
Move trailing statements to next line with indentation as suggested by
checkpatch.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41092
Various indent fixes suggested by checkpatch: use tabs, use same level
of indentation for switch and case, correct indentation levels.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41090
Remove some unnecessary includes and use <linux/foo.h> instead of
<asm/foo.h> when it possible as suggested by checkpatch.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41089
Use more particular functions dev_<level> or pr_<level>(...) insead of
direct printk(...) call. Add KERN_LEVEL to calls what missed it.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41088
Fix braces location, remove unnecessary empty lines before or after code
block, remove useless braces. All cases are detected by checkpatch.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41087
Remove parentheses around return values since return is no a function,
as suggested by checkpatch.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41083
Fix comment issues detected by checkpatch. Convert C99 // comments to
ordinary /* ... */ comments. Correct block comments style or convert
them to single line comments.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41081
Change fooBar variables names to foo_bar as suggested by checkpatch,
write few tables names in lower case and correctly place __initdata
keyword.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41080
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
Remove get_c0_compare_int fix which is useless for latest kernels.
Tested on Ubnt Bullet2, which could successfully boot without this
workaround.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 40593
The 3.10.x infrastructure has been present for some time, and seems to
run fine here.
Signed-off-by: Russell Senior <russell@personaltelco.net>
SVN-Revision: 39483
During a reset the gpiolib warns about using the reset gpio
without explicit requesting it before:
[ 147.930000] ------------[ cut here ]------------
[ 147.930000] WARNING: at drivers/gpio/gpiolib.c:103 gpio_ensure_requested+0x68/0xcc()
[ 147.930000] autorequest GPIO-5
[ 147.930000] Modules linked in: ath5k ath mac80211 ipv6 cfg80211 compat arc4 crypto_blkcipher aead gpio_button_hotplug
[ 147.930000] Call Trace:
[ 147.930000] [<8004e3bc>] dump_stack+0x8/0x34
[ 147.930000] [<80058430>] warn_slowpath_common+0x78/0xa4
[ 147.930000] [<800584e4>] warn_slowpath_fmt+0x2c/0x38
[ 147.930000] [<80166f18>] gpio_ensure_requested+0x68/0xcc
[ 147.930000] [<80167264>] gpio_direction_output+0xdc/0x168
[ 147.930000] [<8004aba8>] ar2315_restart+0x28/0x54
[ 147.930000] [<80069778>] sys_reboot+0x178/0x1c0
[ 147.930000] [<80043670>] stack_done+0x20/0x40
[ 147.930000]
[ 147.930000] ---[ end trace 2c7a53d8549562d6 ]---
This is fixed with this patch by using another gpiolib api call
which includes the missing request.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 38183
This builds and boots.
Because of the function pointer indirection (e.g. mtd_info's read
function pointer is assigned to spiflash_read), it is difficult for me
to understand where the calls are coming from (could be anywhere,
conditionally pointing at spiflash versions), so I punted and used the
renamed function pointers (_erase, _read, _write). If someone knows
better what to do, please fix.
Cleaned up other sundry kernel tracking issues like get_phy_id and
__devinit,etc.
[juhosg: don't switch to that yet]
Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35727
atheros trunk moved to full sysfs gpiolib, but the leds were forgotten.
This restores the wlan led that was missing after switching from backfire
to trunk.
Signed-off-by: Karl Palsson <karlp@remake.is>
SVN-Revision: 32885
With our recent switch to the 3.3 kernel target, some headers were
occidentally omitted.
Signed-off-by: Jonathan Bither <jonbither@gmail.com>
SVN-Revision: 31640
- Use physical addresses definition for AR2315 the same way as AR5312. Fixes ioremap
- Fix dma mapping for AHB bus (only use the PCI DMA offset for PCI devices)
Based on patches by Wojciech Dubowik
SVN-Revision: 26554