mvebu pcie driver (kirkwood) for v3.11
- kirkwood - enable pcie driver - migrate boards over to pcie dt init depends - mvebu/pcie - mvebu/of_pci -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJRpP1WAAoJEAi3KVZQDZAeItIH/1QVHhqYSpOnXGu4zQHswvIM SRQoy4hiCJm+yywTnIDJPMQdBKD1vURRRdGWQouNsFoBaHki4v2BBxfBNFoDN+rx VtECH7F1SbJ/Pb7XLVnswqRXVNqrY5fOY5mW42ALFBT9VxcKoD1FyqCaXfaU9JA4 VQCzR7DjFhr8bppZknQ5ZT/qI66Wj1oNiJtBdItmxT0pVfElvAOV6FHzfMGrrDrM +v8T8KdFIdmH1Ny5J5KLQSE9qBLqae0vlDNgsfwfh1DY/Lye3rDHqPDKrh7YZjHR xNc6JU+zEdP3tK1f1jgmjn/giY7HqpAFm46p9k/pF9gsE5SE0L/e0Dh9apOcq24= =qUyf -----END PGP SIGNATURE----- Merge tag 'pcie_kw-3.11' of git://git.infradead.org/users/jcooper/linux into next/soc From Jason Cooper: mvebu pcie driver (kirkwood) for v3.11 - kirkwood - enable pcie driver - migrate boards over to pcie dt init depends - mvebu/pcie - mvebu/of_pci Signed-off-by: Olof Johansson <olof@lixom.net> * tag 'pcie_kw-3.11' of git://git.infradead.org/users/jcooper/linux: arm: kirkwood: convert db-88f6281/db-88f6282 to the Device Tree arm: kirkwood: convert QNAP TS219 to use DT for the PCIe interface arm: kirkwood: convert ZyXEL NSA310 to use DT for the PCIe interface arm: kirkwood: convert MPL CEC4 to use DT for the PCIe interface arm: kirkwood: convert Iomega Iconnect to use DT for the PCIe interface arm: kirkwood: add SoC-level Device Tree data for PCIe interfaces arm: kirkwood: move PCIe window init to legacy driver pci: mvebu: enable driver usage on Kirkwood
This commit is contained in:
@ -4,6 +4,7 @@ Mandatory properties:
|
||||
- compatible: one of the following values:
|
||||
marvell,armada-370-pcie
|
||||
marvell,armada-xp-pcie
|
||||
marvell,kirkwood-pcie
|
||||
- #address-cells, set to <3>
|
||||
- #size-cells, set to <2>
|
||||
- #interrupt-cells, set to <1>
|
||||
|
@ -64,6 +64,8 @@ dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
|
||||
integratorcp.dtb
|
||||
dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
|
||||
dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
|
||||
kirkwood-db-88f6281.dtb \
|
||||
kirkwood-db-88f6282.dtb \
|
||||
kirkwood-dns320.dtb \
|
||||
kirkwood-dns325.dtb \
|
||||
kirkwood-dockstar.dtb \
|
||||
|
@ -40,5 +40,36 @@
|
||||
marvell,function = "sdio";
|
||||
};
|
||||
};
|
||||
|
||||
pcie-controller {
|
||||
compatible = "marvell,kirkwood-pcie";
|
||||
status = "disabled";
|
||||
device_type = "pci";
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */
|
||||
0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
|
||||
0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
|
||||
|
||||
pcie@1,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
|
||||
reg = <0x0800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
ranges;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &intc 9>;
|
||||
marvell,pcie-port = <0>;
|
||||
marvell,pcie-lane = <0>;
|
||||
clocks = <&gate_clk 2>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -65,5 +65,53 @@
|
||||
clocks = <&gate_clk 7>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcie-controller {
|
||||
compatible = "marvell,kirkwood-pcie";
|
||||
status = "disabled";
|
||||
device_type = "pci";
|
||||
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */
|
||||
0x82000000 0 0x00044000 0x00044000 0 0x00002000 /* Port 1.0 registers */
|
||||
0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
|
||||
0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
|
||||
|
||||
pcie@1,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
|
||||
reg = <0x0800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
ranges;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &intc 9>;
|
||||
marvell,pcie-port = <0>;
|
||||
marvell,pcie-lane = <0>;
|
||||
clocks = <&gate_clk 2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
ranges;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &intc 10>;
|
||||
marvell,pcie-port = <1>;
|
||||
marvell,pcie-lane = <0>;
|
||||
clocks = <&gate_clk 18>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
30
arch/arm/boot/dts/kirkwood-db-88f6281.dts
Normal file
30
arch/arm/boot/dts/kirkwood-db-88f6281.dts
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Marvell DB-88F6281-BP Development Board Setup
|
||||
*
|
||||
* Saeed Bishara <saeed@marvell.com>
|
||||
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "kirkwood-db.dtsi"
|
||||
/include/ "kirkwood-6281.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Marvell DB-88F6281-BP Development Board";
|
||||
compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
|
||||
ocp@f1000000 {
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
34
arch/arm/boot/dts/kirkwood-db-88f6282.dts
Normal file
34
arch/arm/boot/dts/kirkwood-db-88f6282.dts
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Marvell DB-88F6282-BP Development Board Setup
|
||||
*
|
||||
* Saeed Bishara <saeed@marvell.com>
|
||||
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "kirkwood-db.dtsi"
|
||||
/include/ "kirkwood-6282.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Marvell DB-88F6282-BP Development Board";
|
||||
compatible = "marvell,db-88f6282-bp", "marvell,kirkwood-88f6282", "marvell,kirkwood";
|
||||
|
||||
ocp@f1000000 {
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pcie@2,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
89
arch/arm/boot/dts/kirkwood-db.dtsi
Normal file
89
arch/arm/boot/dts/kirkwood-db.dtsi
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Marvell DB-{88F6281,88F6282}-BP Development Board Setup
|
||||
*
|
||||
* Saeed Bishara <saeed@marvell.com>
|
||||
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*
|
||||
* This file contains the definitions that are common between the 6281
|
||||
* and 6282 variants of the Marvell Kirkwood Development Board.
|
||||
*/
|
||||
|
||||
/include/ "kirkwood.dtsi"
|
||||
|
||||
/ {
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x20000000>; /* 512 MB */
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8 earlyprintk";
|
||||
};
|
||||
|
||||
ocp@f1000000 {
|
||||
pinctrl@10000 {
|
||||
pmx_sdio_gpios: pmx-sdio-gpios {
|
||||
marvell,pins = "mpp37", "mpp38";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
serial@12000 {
|
||||
pinctrl-0 = <&pmx_uart0>;
|
||||
pinctrl-names = "default";
|
||||
clock-frequency = <200000000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand@3000000 {
|
||||
pinctrl-0 = <&pmx_nand>;
|
||||
pinctrl-names = "default";
|
||||
chip-delay = <25>;
|
||||
status = "okay";
|
||||
|
||||
partition@0 {
|
||||
label = "uboot";
|
||||
reg = <0x0 0x100000>;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "uImage";
|
||||
reg = <0x100000 0x400000>;
|
||||
};
|
||||
|
||||
partition@500000 {
|
||||
label = "root";
|
||||
reg = <0x500000 0x1fb00000>;
|
||||
};
|
||||
};
|
||||
|
||||
sata@80000 {
|
||||
nr-ports = <2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ehci@50000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
mvsdio@90000 {
|
||||
pinctrl-0 = <&pmx_sdio_gpios>;
|
||||
pinctrl-names = "default";
|
||||
wp-gpios = <&gpio1 5 0>;
|
||||
cd-gpios = <&gpio1 6 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -109,6 +109,14 @@
|
||||
reg = <0x980000 0x1f400000>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
|
@ -139,6 +139,14 @@
|
||||
cd-gpios = <&gpio1 15 0>;
|
||||
/* No WP GPIO */
|
||||
};
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
|
@ -176,6 +176,14 @@
|
||||
reg = <0x5040000 0x2fc0000>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
|
@ -1,7 +1,8 @@
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "kirkwood-ts219.dtsi"
|
||||
/include/ "kirkwood.dtsi"
|
||||
/include/ "kirkwood-6281.dtsi"
|
||||
/include/ "kirkwood-ts219.dtsi"
|
||||
|
||||
/ {
|
||||
ocp@f1000000 {
|
||||
|
@ -1,7 +1,8 @@
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "kirkwood-ts219.dtsi"
|
||||
/include/ "kirkwood.dtsi"
|
||||
/include/ "kirkwood-6282.dtsi"
|
||||
/include/ "kirkwood-ts219.dtsi"
|
||||
|
||||
/ {
|
||||
ocp@f1000000 {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/include/ "kirkwood.dtsi"
|
||||
|
||||
/ {
|
||||
model = "QNAP TS219 family";
|
||||
compatible = "qnap,ts219", "marvell,kirkwood";
|
||||
@ -74,5 +72,12 @@
|
||||
status = "okay";
|
||||
nr-ports = <2>;
|
||||
};
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
||||
pcie@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -19,6 +19,7 @@
|
||||
ocp@f1000000 {
|
||||
compatible = "simple-bus";
|
||||
ranges = <0x00000000 0xf1000000 0x4000000
|
||||
0xe0000000 0xe0000000 0x8100000 /* PCIE */
|
||||
0xf5000000 0xf5000000 0x0000400>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -8,12 +8,6 @@ config MACH_D2NET_V2
|
||||
Say 'Y' here if you want your kernel to support the
|
||||
LaCie d2 Network v2 NAS.
|
||||
|
||||
config MACH_DB88F6281_BP
|
||||
bool "Marvell DB-88F6281-BP Development Board"
|
||||
help
|
||||
Say 'Y' here if you want your kernel to support the
|
||||
Marvell DB-88F6281-BP Development Board.
|
||||
|
||||
config MACH_DOCKSTAR
|
||||
bool "Seagate FreeAgent DockStar"
|
||||
help
|
||||
@ -153,6 +147,13 @@ config MACH_CLOUDBOX_DT
|
||||
Say 'Y' here if you want your kernel to support the LaCie
|
||||
CloudBox NAS, using Flattened Device Tree.
|
||||
|
||||
config MACH_DB88F628X_BP_DT
|
||||
bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)"
|
||||
help
|
||||
Say 'Y' here if you want your kernel to support the Marvell
|
||||
DB-88F6281-BP and DB-88F6282-BP Development Board (Flattened
|
||||
Device Tree).
|
||||
|
||||
config MACH_DLINK_KIRKWOOD_DT
|
||||
bool "D-Link Kirkwood-based NAS (Flattened Device Tree)"
|
||||
select ARCH_KIRKWOOD_DT
|
||||
@ -272,14 +273,6 @@ config MACH_NETSPACE_V2_DT
|
||||
Say 'Y' here if you want your kernel to support the LaCie
|
||||
Network Space v2 NAS, using Flattened Device Tree.
|
||||
|
||||
config MACH_NSA310_DT
|
||||
bool "ZyXEL NSA-310 (Flattened Device Tree)"
|
||||
select ARCH_KIRKWOOD_DT
|
||||
select ARM_ATAG_DTB_COMPAT
|
||||
help
|
||||
Say 'Y' here if you want your kernel to support the
|
||||
ZyXEL NSA-310 board (Flattened Device Tree).
|
||||
|
||||
config MACH_OPENBLOCKS_A6_DT
|
||||
bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
|
||||
select ARCH_KIRKWOOD_DT
|
||||
|
@ -1,7 +1,6 @@
|
||||
obj-y += common.o irq.o pcie.o mpp.o
|
||||
|
||||
obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
|
||||
obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
|
||||
obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
|
||||
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
|
||||
obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
|
||||
@ -21,6 +20,7 @@ obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
|
||||
|
||||
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
|
||||
obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o
|
||||
obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o
|
||||
obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
|
||||
obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
|
||||
obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
|
||||
@ -37,7 +37,6 @@ obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
|
||||
obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
|
||||
obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
|
||||
obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
|
||||
obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o
|
||||
obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o
|
||||
obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o
|
||||
obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o
|
||||
|
24
arch/arm/mach-kirkwood/board-db88f628x-bp.c
Normal file
24
arch/arm/mach-kirkwood/board-db88f628x-bp.c
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Saeed Bishara <saeed@marvell.com>
|
||||
*
|
||||
* Marvell DB-88F628{1,2}-BP Development Board Setup
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include "common.h"
|
||||
|
||||
static struct mv643xx_eth_platform_data db88f628x_ge00_data = {
|
||||
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
|
||||
};
|
||||
|
||||
void __init db88f628x_init(void)
|
||||
{
|
||||
kirkwood_ge00_init(&db88f628x_ge00_data);
|
||||
}
|
@ -144,6 +144,10 @@ static void __init kirkwood_dt_init(void)
|
||||
of_machine_is_compatible("lacie,netspace_v2"))
|
||||
ns2_init();
|
||||
|
||||
if (of_machine_is_compatible("marvell,db-88f6281-bp") ||
|
||||
of_machine_is_compatible("marvell,db-88f6282-bp"))
|
||||
db88f628x_init();
|
||||
|
||||
if (of_machine_is_compatible("mpl,cec4"))
|
||||
mplcec4_init();
|
||||
|
||||
@ -178,6 +182,8 @@ static const char * const kirkwood_dt_board_compat[] = {
|
||||
"lacie,netspace_max_v2",
|
||||
"lacie,netspace_mini_v2",
|
||||
"lacie,netspace_v2",
|
||||
"marvell,db-88f6281-bp",
|
||||
"marvell,db-88f6282-bp",
|
||||
"mpl,cec4",
|
||||
"netgear,readynas-duo-v2",
|
||||
"plathome,openblocks-a6",
|
||||
|
@ -22,11 +22,3 @@ void __init iconnect_init(void)
|
||||
{
|
||||
kirkwood_ge00_init(&iconnect_ge00_data);
|
||||
}
|
||||
|
||||
static int __init iconnect_pci_init(void)
|
||||
{
|
||||
if (of_machine_is_compatible("iom,iconnect"))
|
||||
kirkwood_pcie_init(KW_PCIE0);
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(iconnect_pci_init);
|
||||
|
@ -29,7 +29,6 @@ void __init mplcec4_init(void)
|
||||
*/
|
||||
kirkwood_ge00_init(&mplcec4_ge00_data);
|
||||
kirkwood_ge01_init(&mplcec4_ge01_data);
|
||||
kirkwood_pcie_init(KW_PCIE0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-kirkwood/nsa-310-setup.c
|
||||
*
|
||||
* ZyXEL NSA-310 Setup
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include <linux/of.h>
|
||||
#include "common.h"
|
||||
|
||||
static int __init nsa310_pci_init(void)
|
||||
{
|
||||
if (of_machine_is_compatible("zyxel,nsa310"))
|
||||
kirkwood_pcie_init(KW_PCIE0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
subsys_initcall(nsa310_pci_init);
|
@ -41,13 +41,3 @@ void __init qnap_dt_ts219_init(void)
|
||||
|
||||
pm_power_off = qnap_tsx1x_power_off;
|
||||
}
|
||||
|
||||
/* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */
|
||||
static int __init ts219_pci_init(void)
|
||||
{
|
||||
if (machine_is_ts219())
|
||||
kirkwood_pcie_init(KW_PCIE0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(ts219_pci_init);
|
||||
|
@ -671,30 +671,6 @@ char * __init kirkwood_id(void)
|
||||
|
||||
void __init kirkwood_setup_wins(void)
|
||||
{
|
||||
/*
|
||||
* The PCIe windows will no longer be statically allocated
|
||||
* here once Kirkwood is migrated to the pci-mvebu driver.
|
||||
*/
|
||||
mvebu_mbus_add_window_remap_flags("pcie0.0",
|
||||
KIRKWOOD_PCIE_IO_PHYS_BASE,
|
||||
KIRKWOOD_PCIE_IO_SIZE,
|
||||
KIRKWOOD_PCIE_IO_BUS_BASE,
|
||||
MVEBU_MBUS_PCI_IO);
|
||||
mvebu_mbus_add_window_remap_flags("pcie0.0",
|
||||
KIRKWOOD_PCIE_MEM_PHYS_BASE,
|
||||
KIRKWOOD_PCIE_MEM_SIZE,
|
||||
MVEBU_MBUS_NO_REMAP,
|
||||
MVEBU_MBUS_PCI_MEM);
|
||||
mvebu_mbus_add_window_remap_flags("pcie1.0",
|
||||
KIRKWOOD_PCIE1_IO_PHYS_BASE,
|
||||
KIRKWOOD_PCIE1_IO_SIZE,
|
||||
KIRKWOOD_PCIE1_IO_BUS_BASE,
|
||||
MVEBU_MBUS_PCI_IO);
|
||||
mvebu_mbus_add_window_remap_flags("pcie1.0",
|
||||
KIRKWOOD_PCIE1_MEM_PHYS_BASE,
|
||||
KIRKWOOD_PCIE1_MEM_SIZE,
|
||||
MVEBU_MBUS_NO_REMAP,
|
||||
MVEBU_MBUS_PCI_MEM);
|
||||
mvebu_mbus_add_window("nand", KIRKWOOD_NAND_MEM_PHYS_BASE,
|
||||
KIRKWOOD_NAND_MEM_SIZE);
|
||||
mvebu_mbus_add_window("sram", KIRKWOOD_SRAM_PHYS_BASE,
|
||||
|
@ -121,6 +121,12 @@ void km_kirkwood_init(void);
|
||||
static inline void km_kirkwood_init(void) {};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_DB88F628X_BP_DT
|
||||
void db88f628x_init(void);
|
||||
#else
|
||||
static inline void db88f628x_init(void) {};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_MPLCEC4_DT
|
||||
void mplcec4_init(void);
|
||||
#else
|
||||
|
@ -1,108 +0,0 @@
|
||||
/*
|
||||
* arch/arm/mach-kirkwood/db88f6281-bp-setup.c
|
||||
*
|
||||
* Marvell DB-88F6281-BP Development Board Setup
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <linux/mv643xx_eth.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/kirkwood.h>
|
||||
#include <linux/platform_data/mmc-mvsdio.h>
|
||||
#include "common.h"
|
||||
#include "mpp.h"
|
||||
|
||||
static struct mtd_partition db88f6281_nand_parts[] = {
|
||||
{
|
||||
.name = "u-boot",
|
||||
.offset = 0,
|
||||
.size = SZ_1M
|
||||
}, {
|
||||
.name = "uImage",
|
||||
.offset = MTDPART_OFS_NXTBLK,
|
||||
.size = SZ_4M
|
||||
}, {
|
||||
.name = "root",
|
||||
.offset = MTDPART_OFS_NXTBLK,
|
||||
.size = MTDPART_SIZ_FULL
|
||||
},
|
||||
};
|
||||
|
||||
static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
|
||||
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
|
||||
};
|
||||
|
||||
static struct mv_sata_platform_data db88f6281_sata_data = {
|
||||
.n_ports = 2,
|
||||
};
|
||||
|
||||
static struct mvsdio_platform_data db88f6281_mvsdio_data = {
|
||||
.gpio_write_protect = 37,
|
||||
.gpio_card_detect = 38,
|
||||
};
|
||||
|
||||
static unsigned int db88f6281_mpp_config[] __initdata = {
|
||||
MPP0_NF_IO2,
|
||||
MPP1_NF_IO3,
|
||||
MPP2_NF_IO4,
|
||||
MPP3_NF_IO5,
|
||||
MPP4_NF_IO6,
|
||||
MPP5_NF_IO7,
|
||||
MPP18_NF_IO0,
|
||||
MPP19_NF_IO1,
|
||||
MPP37_GPIO,
|
||||
MPP38_GPIO,
|
||||
0
|
||||
};
|
||||
|
||||
static void __init db88f6281_init(void)
|
||||
{
|
||||
/*
|
||||
* Basic setup. Needs to be called early.
|
||||
*/
|
||||
kirkwood_init();
|
||||
kirkwood_mpp_conf(db88f6281_mpp_config);
|
||||
|
||||
kirkwood_nand_init(ARRAY_AND_SIZE(db88f6281_nand_parts), 25);
|
||||
kirkwood_ehci_init();
|
||||
kirkwood_ge00_init(&db88f6281_ge00_data);
|
||||
kirkwood_sata_init(&db88f6281_sata_data);
|
||||
kirkwood_uart0_init();
|
||||
kirkwood_sdio_init(&db88f6281_mvsdio_data);
|
||||
}
|
||||
|
||||
static int __init db88f6281_pci_init(void)
|
||||
{
|
||||
if (machine_is_db88f6281_bp()) {
|
||||
u32 dev, rev;
|
||||
|
||||
kirkwood_pcie_id(&dev, &rev);
|
||||
if (dev == MV88F6282_DEV_ID)
|
||||
kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0);
|
||||
else
|
||||
kirkwood_pcie_init(KW_PCIE0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(db88f6281_pci_init);
|
||||
|
||||
MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
|
||||
/* Maintainer: Saeed Bishara <saeed@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.init_machine = db88f6281_init,
|
||||
.map_io = kirkwood_map_io,
|
||||
.init_early = kirkwood_init_early,
|
||||
.init_irq = kirkwood_init_irq,
|
||||
.init_time = kirkwood_timer_init,
|
||||
.restart = kirkwood_restart,
|
||||
MACHINE_END
|
@ -12,6 +12,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/mbus.h>
|
||||
#include <video/vga.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/pci.h>
|
||||
@ -253,6 +254,27 @@ static void __init add_pcie_port(int index, void __iomem *base)
|
||||
|
||||
void __init kirkwood_pcie_init(unsigned int portmask)
|
||||
{
|
||||
mvebu_mbus_add_window_remap_flags("pcie0.0",
|
||||
KIRKWOOD_PCIE_IO_PHYS_BASE,
|
||||
KIRKWOOD_PCIE_IO_SIZE,
|
||||
KIRKWOOD_PCIE_IO_BUS_BASE,
|
||||
MVEBU_MBUS_PCI_IO);
|
||||
mvebu_mbus_add_window_remap_flags("pcie0.0",
|
||||
KIRKWOOD_PCIE_MEM_PHYS_BASE,
|
||||
KIRKWOOD_PCIE_MEM_SIZE,
|
||||
MVEBU_MBUS_NO_REMAP,
|
||||
MVEBU_MBUS_PCI_MEM);
|
||||
mvebu_mbus_add_window_remap_flags("pcie1.0",
|
||||
KIRKWOOD_PCIE1_IO_PHYS_BASE,
|
||||
KIRKWOOD_PCIE1_IO_SIZE,
|
||||
KIRKWOOD_PCIE1_IO_BUS_BASE,
|
||||
MVEBU_MBUS_PCI_IO);
|
||||
mvebu_mbus_add_window_remap_flags("pcie1.0",
|
||||
KIRKWOOD_PCIE1_MEM_PHYS_BASE,
|
||||
KIRKWOOD_PCIE1_MEM_SIZE,
|
||||
MVEBU_MBUS_NO_REMAP,
|
||||
MVEBU_MBUS_PCI_MEM);
|
||||
|
||||
vga_base = KIRKWOOD_PCIE_MEM_PHYS_BASE;
|
||||
|
||||
if (portmask & KW_PCIE0)
|
||||
|
@ -3,6 +3,6 @@ menu "PCI host controller drivers"
|
||||
|
||||
config PCI_MVEBU
|
||||
bool "Marvell EBU PCIe controller"
|
||||
depends on ARCH_MVEBU
|
||||
depends on ARCH_MVEBU || ARCH_KIRKWOOD
|
||||
|
||||
endmenu
|
||||
|
@ -854,6 +854,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
|
||||
static const struct of_device_id mvebu_pcie_of_match_table[] = {
|
||||
{ .compatible = "marvell,armada-xp-pcie", },
|
||||
{ .compatible = "marvell,armada-370-pcie", },
|
||||
{ .compatible = "marvell,kirkwood-pcie", },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mvebu_pcie_of_match_table);
|
||||
|
Reference in New Issue
Block a user