summaryrefslogtreecommitdiff
path: root/target/linux/ifxmips
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2010-03-18 10:56:00 +0000
committerJohn Crispin <john@openwrt.org>2010-03-18 10:56:00 +0000
commit10af553b63e4e81ff05639def4c04fc62b29fcb2 (patch)
tree239ee3c9f136cb1ded7b335c820652c51d22a0b0 /target/linux/ifxmips
parentf0aa9bc04f9f9518fdf6f75dd232a7407d5345a0 (diff)
downloadmtk-20170518-10af553b63e4e81ff05639def4c04fc62b29fcb2.zip
mtk-20170518-10af553b63e4e81ff05639def4c04fc62b29fcb2.tar.gz
mtk-20170518-10af553b63e4e81ff05639def4c04fc62b29fcb2.tar.bz2
Make it possible for boards to disable PCI REQ signals in the PCI controller, signed off by Ithamar R. Adema
SVN-Revision: 20264
Diffstat (limited to 'target/linux/ifxmips')
-rw-r--r--target/linux/ifxmips/files/arch/mips/ifxmips/board.c4
-rw-r--r--target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
index 7d77e9c..6a17f60 100644
--- a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
+++ b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
@@ -55,6 +55,7 @@ enum {
};
extern int ifxmips_pci_external_clock;
+extern int ifxmips_pci_req_mask;
static unsigned int chiprev;
static int cmdline_mac;
@@ -70,6 +71,7 @@ struct ifxmips_board {
struct gpio_led *ifxmips_leds;
struct gpio_led *gpio_leds;
int pci_external_clock;
+ int pci_req_mask;
int num_devs;
};
@@ -392,6 +394,8 @@ int __init ifxmips_init_devices(void)
ifxmips_gpio_dev.resource = &board->gpiodev_resource;
if (board->pci_external_clock)
ifxmips_pci_external_clock = 1;
+ if (board->pci_req_mask)
+ ifxmips_pci_req_mask = board->pci_req_mask;
printk(KERN_INFO "using board definition %s\n", board->name);
return platform_add_devices(board->devs, board->num_devs);
}
diff --git a/target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c b/target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c
index 64f37d5..6ff765e 100644
--- a/target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c
+++ b/target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c
@@ -54,6 +54,10 @@ static struct pci_controller ifxmips_pci_controller =
u32 ifxmips_pci_mapped_cfg;
int ifxmips_pci_external_clock = 0;
+/* Since the PCI REQ pins can be reused for other functionality, make it possible
+ to exclude those from interpretation by the PCI controller */
+int ifxmips_pci_req_mask = 0xf;
+
static int __init
ifxmips_pci_set_external_clk(char *str)
{
@@ -126,7 +130,7 @@ ifxmips_pci_startup(void)
/* enable external 2 PCI masters */
temp_buffer = ifxmips_r32(PCI_CR_PC_ARB);
- temp_buffer &= (~(0xf << 16));
+ temp_buffer &= (~(ifxmips_pci_req_mask << 16));
/* enable internal arbiter */
temp_buffer |= (1 << INTERNAL_ARB_ENABLE_BIT);
/* enable internal PCI master reqest */