Commit graph

9 commits

Author SHA1 Message Date
Sankalp Negi 86417b7ccc staging: mt7621-pci: Fix line size exceeding 80 columns.
This patch fixes the checkpatch.pl warning:

WARNING: line over 80 characters

Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-31 19:00:53 +02:00
NeilBrown bb52645a9c staging: mt7621-pci: remove some dead code.
Some code is dead because it is commented out.
Some is dead because it is uninteresting printks.
Some is dead because it declares unused functions.

Remove it all.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:09:23 -07:00
NeilBrown a6f1748415 staging: mt7621-pci: remove unnecessary resource details.
These resources are extracted from devicetree, so they aren't
needed here.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:09:23 -07:00
NeilBrown bba9b3ec0f staging: mt7621-pci: remove conditional compilation.
Code currently defines:

#define CONFIG_PCIE_PORT0
#define CONFIG_PCIE_PORT1
#define CONFIG_PCIE_PORT2
#define GPIO_PERST

and then compiles code only if they are defined.
We might want to disable some of these via devicetree one
day, but for now just remove the #defines and the
conditions - all the code for different ports is
easy to identify.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:09:23 -07:00
NeilBrown d4e3a1f6ce staging: mt7621-pci: white-space cleanups.
- remove white space at end of line.
- no more than 2 blank line at a time
- remove spaces before tabs
- use tabs to line things up
- re-indent some #define do{}while(0)

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:09:23 -07:00
NeilBrown 46d093124d staging: mt7621-pci: improve interrupt mapping
As the Interrupts for the PCI adapters are listed in
devicetree we shouldn't need to have them explicit in the code.

The simplest way to do this is to use of_irq_parse_and_map_pci()
and specify an interrupt-map which identifies the different
PCI hosts by bus/slot numbers.
This has the advantage that the hwirq number are mapped to virq
numbers for us, so the ugly hack can go.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:09:23 -07:00
Christian Lütke-Stetzkamp 70100e25ae staging: mt7621-pci: Remove redundant owner assignment
Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Found using coccinelle.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:12 +02:00
NeilBrown c4c11ae8e4 staging: mt7621-pci: Hack 2 more PCI interrupts for gnubee1
The mt7621-pci support 3 pci devices and has 3 interrupts.
Each of these need to be enabled by the same sort of hack to
map hwirq number to virq number.
This is a hack which will go as soon as I understand how this is
supposed to work.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:33:20 +02:00
John Crispin 03f152e31f staging: mt7621-pci: MIPS/ralink: add MT7621 pcie driver
NeilBrown: forward port and hack to work on GNUBEE1

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19 19:56:01 +01:00