Commit graph

403 commits

Author SHA1 Message Date
Felix Fietkau
c288d2d6d9 kernel: makefiles: make use of new var KERNEL_PATCHVER
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
2014-10-24 19:34:02 +00:00
John Crispin
80ff3af16f atheros: refresh config
Remove symbols that are now placed in the generic config.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42513
2014-09-12 06:54:16 +00:00
John Crispin
cb5902d603 atheros: convert AR2315 GPIO code to platform driver
Convert gpiolib realization to platform driver and move to the
appropriate subdirectory. Misc GPIO interrupt acknowledgement placed
to the MISC IRQ handler since in fact we can detect only one GPIO state
change.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42512
2014-09-12 06:54:10 +00:00
John Crispin
a8799105d7 atheros: convert AR5312 GPIO code to platform driver
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42511
2014-09-12 06:54:05 +00:00
John Crispin
0e86c116cb atheros: rework chained interrupts handling
Call generic_handle_irq() instead of do_IRQ() for chained interrupts,
remove XXX_NONE interrupts and call spurious_interrupt() when an interrupt
is unexpected.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42510
2014-09-12 06:53:58 +00:00
John Crispin
d780abcbbc atheros: convert gpio.h to stub
Implement to_irq() handler for AR2315 GPIO chip and convert custom
gpio.h header to stub.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42509
2014-09-12 06:53:53 +00:00
John Crispin
6f874d84d5 atheros: rename SoCs config symbols
Rename config symbols to be consistent with other SoCs config symbols
supported by MIPS arch.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42508
2014-09-12 06:53:48 +00:00
John Crispin
413736e5f8 atheros: add AR2316 and AR2318 SoCs detection
Tested with AR2315, AR2316 and AR2317 SoCs, not tested with AR2318 but
changes seems correct: revision is one more than AR2317.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42507
2014-09-12 06:53:43 +00:00
John Crispin
c883854f7e atheros: ar2315-pci: convert to platform driver
Convert the PCI controller support code to platform driver and move it to
appropriate subdirectory.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42506
2014-09-12 06:53:33 +00:00
John Crispin
4156c9734a atheros: ar2315-pci: rename configuration symbol
Rename configuration symbol to be consistent with other MIPS machines.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42505
2014-09-12 06:53:27 +00:00
John Crispin
fb4196ec2a atheros: ar2315-pci: update DMA offset macroses
Remove duplicated macroses, which define DMA offset (SDRAM baseaddress).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42504
2014-09-12 06:53:21 +00:00
John Crispin
94efeaa51f atheros: ar2315-pci: update host bridge resources
It seems that the PCI controller does not support I/O ports, so remove
the ports range. Also correct the beginning of the memory range and its
size.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42503
2014-09-12 06:53:15 +00:00
John Crispin
78c914ffe5 atheros: ar2315-pci: rework the configuration access code
Use __raw_{read,write}l accessors and use Abort interrupt to detect a
configuration space read/write errors. The second change improves errors
detection, what improves the device presence detection and helps us to
avoid following (and similar) errors:

pci 0000:00:00.2: ignoring class 0x7e0200 (doesn't match header type 02)
pci 0000:00:00.2: bridge configuration invalid ([bus 03-90]), reconfiguring
pci 0000:00:00.2: not setting up bridge for bus 0000:01

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42502
2014-09-12 06:53:09 +00:00
John Crispin
dbdd8906ac atheros: ar2315-pci: rework interrupt handling
Add PCI IRQ controller to facilitate interrupt handling, move interrupts
initialization to the IRQ controller initialization from
pcibios_plat_dev_init() callback.

Also remove odd PCI dev configuration manipulation from pcibios_plat_dev_init()
callback.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42501
2014-09-12 06:53:00 +00:00
John Crispin
0f645cbd83 atheros: ar2315-pci: rework host controller initialization
Explicitly configure PCI host controller, and do not expose it to PCI
subsystem. The PCI host controller acts as a usual PCI device connected
to the bus, but its configuration as a usual PCI device is senseless,
since the host controller provide access to _internal_ memory space for
_external_ device.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42500
2014-09-12 06:52:55 +00:00
John Crispin
37d2445fcb atheros: ar2315-pci: cosmetic changes
- add comment, which briefly describes PCI controller features and
   Fonera 2.0g schematics.
 - rename several functions and structures, to make it clear that this
   code only for AR2315 chips.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42499
2014-09-12 06:52:51 +00:00
John Crispin
1e6af86ff9 atheros: ar2315-pci: remove odd locking in PCI config space access function
Caller (generic PCI code) already do proper locking so no need to add
another one here.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42498
2014-09-12 06:52:46 +00:00
John Crispin
09f38a3f76 atheros: remove odd ATHEROS_AR2315 config symbol dependencies
Remove options which already selected by ATHEROS_AR231X on which
ATHEROS_AR2315 depends.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42497
2014-09-12 06:52:42 +00:00
John Crispin
2e9deed90a atheros: various space related changes
- remove odd blank lines
 - remove odd spaces after casts
 - fix alignment

 No functional changes.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42496
2014-09-12 06:52:36 +00:00
John Crispin
d34c3e0674 atheros: rework and cleanup board initialization
- remove odd flags and branching
  - add __init mark
  - make shorter variables names
  - returns true or false from boolean functions
  - unwrap short function declarations
  - unwrap quoted string
  - rename macroses with names in CamelCase

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42495
2014-09-12 06:52:26 +00:00
John Crispin
98b6a56b3c atheros: update ether addresses handling
- use ether_foo() routines to work with addresses
 - use ETH_ALEN inplace of magic '6'

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42494
2014-09-12 06:52:21 +00:00
John Crispin
bdc1357e7b atheros: remove useless includes
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42493
2014-09-12 06:52:14 +00:00
John Crispin
300021d6c4 atheros: ar231x-eth: remove useless IOCTL handlers
These IOCTLs handled in the core now.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42492
2014-09-12 06:52:07 +00:00
John Crispin
a28fd0dfd0 atheros: ar2315-spiflash: use mutex inplace of spinlock
Use mutex inplace of spinlock to make code simple, also call
mutex_{lock,unlock} explicitly to avoid sparse warning about context
imbalance.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42491
2014-09-12 06:52:00 +00:00
John Crispin
ffa6091eef atheros: ar2315-spiflash: update initialization
- fill module metadata
  - remove odd module_{init,exit}

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42490
2014-09-12 06:51:51 +00:00
John Crispin
7a4cf9adfd atheros: ar2315-spiflash: use devm_* API to simplify the code
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42489
2014-09-12 06:51:46 +00:00
John Crispin
f9e46af383 atheros: remove useless return
Remove useless void function return.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42488
2014-09-12 06:51:39 +00:00
John Crispin
9055970e92 atheros: remove FSF mailing address
Remove FSF mailing address as suggested by checkpach and place license
URL.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42487
2014-09-12 06:51:33 +00:00
John Crispin
7aaaef6b4a atheros: add blank line after declarations
as suggested by checkpach.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42486
2014-09-12 06:51:26 +00:00
John Crispin
5b4e53f59f atheros: use static keywork for local code
Make PCI IRQ handler and several structures static as suggested by
sparse.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42485
2014-09-12 06:51:10 +00:00
John Crispin
9b5f1a4f33 atheros: use NULL instead of plain integer
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42484
2014-09-12 06:51:05 +00:00
John Crispin
d4113b1055 atheros: add missing include
Missing this headers cause several sparse "symbol 'foo' was not
declared. Should it be static?" warnings.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42483
2014-09-12 06:50:58 +00:00
John Crispin
60922d0013 atheros: avoid extern prototypes
Avoid using of extern prototypes as suggested by checkpatch.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 42482
2014-09-12 06:50:53 +00:00
Luka Perkov
02629d8f87 kernel: update 3.14 to 3.14.18
Targets were build tested and patches are refreshed.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 42463
2014-09-10 21:40:19 +00:00
Felix Fietkau
c772d71d05 atheros: enable the low_mem flag to better deal with 16M RAM devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42460
2014-09-10 13:50:10 +00:00
Felix Fietkau
efa2159e17 atheros: remove linux 3.10
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42426
2014-09-06 17:51:35 +00:00
Luka Perkov
dd8d729096 kernel: update 3.14 to 3.14.16
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 42070
2014-08-08 13:38:22 +00:00
Felix Fietkau
30ec58a217 atheros: switch kernel version to 3.14
After several tests, 3.14 kernel seems run fine.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41997
2014-08-04 20:54:57 +00:00
Felix Fietkau
930c0c24a7 atheros: add 3.14 configuration
Created on basis of 3.10 config. Remove few obsolete symbols and add new
upstream symbols. New symbols left in its default state.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41996
2014-08-04 20:54:53 +00:00
Felix Fietkau
5b9d4fd80a atheros: copy 3.10 patches to 3.14 and refresh them
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41995
2014-08-04 20:54:49 +00:00
Felix Fietkau
005f8ed563 atheros: refresh config-3.10
Refresh 3.10 kernel configuration, particulary correct AR2315_WDT symbol
position.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41994
2014-08-04 20:54:39 +00:00
Felix Fietkau
980e9b5fc2 atheros: remove linux 3.8 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41874
2014-07-29 10:23:59 +00:00
John Crispin
ba63338d3f kernel: update to 3.10.49 Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41776
2014-07-20 17:31:11 +00:00
Felix Fietkau
5e0bd41bbe atheros: update macroses names
Use AR2315_ prefix for macroses specific to AR2315/AR2316/AR2317 chips,
use AR5312_ prefix for macroses specific to AR5312/AR2312/AR2313 chips,
and use AR231X_ prefix for common macroses.

This patch should not cause any functional changes, only make clear
which macros is common and which macros is specific.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41701
2014-07-17 16:36:55 +00:00
Felix Fietkau
04f3012fba atheros[uart]: pass only physical I/O mem address to 8250 driver
Pass only physical address to 8250 serial port driver and set flag to
remap I/O memory inside the driver. Also fix AR5312 UART base address
definition, which seems specified already mapped.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41700
2014-07-17 16:36:52 +00:00
Felix Fietkau
e744878636 atheros[uart]: use 32-bit aligned I/O
Use 32-bit aligned I/O and update base UART address (remove +3 offset).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41699
2014-07-17 16:36:49 +00:00
Felix Fietkau
572b532e6a atheros[ar231x-eth]: pass PHY I/O memory via device resources
Pass PHY I/O memory region via platform resources and remap them
unconditionally.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41698
2014-07-17 16:36:46 +00:00
Felix Fietkau
9041410017 atheros[ar231x-eth]: pass phys address of I/O memory via platform res
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41697
2014-07-17 16:36:43 +00:00
Felix Fietkau
a145d0410b atheros: simplify gpiolib realization
Each SoCs generation has own independent gpiolib realization, so we
have no reason to keep these realizations in semiuniversal form.
Following modifications are made:
 * Remove valid_mask field
 * Remove ar231x_gpio_chip structure
 * Rename AR2315_GPIO_CR to AR2315_GPIO_DIR
 * Fix count of AR5312 GPIOs
 * Simplify gpio_chip methods realization

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41696
2014-07-17 16:36:39 +00:00
Felix Fietkau
82e4cde1ce atheros: use irq_set_chained_handler()
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 41695
2014-07-17 16:36:36 +00:00