diff options
| -rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index d0cfb225ec9a..7e5ec34894e2 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
| 14 | #include <linux/clkdev.h> | 14 | #include <linux/clkdev.h> |
| 15 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
| 16 | #include <linux/delay.h> | ||
| 16 | #include <linux/export.h> | 17 | #include <linux/export.h> |
| 17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| @@ -23,6 +24,7 @@ | |||
| 23 | #include <linux/of_irq.h> | 24 | #include <linux/of_irq.h> |
| 24 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
| 25 | #include <linux/pm_opp.h> | 26 | #include <linux/pm_opp.h> |
| 27 | #include <linux/pci.h> | ||
| 26 | #include <linux/phy.h> | 28 | #include <linux/phy.h> |
| 27 | #include <linux/reboot.h> | 29 | #include <linux/reboot.h> |
| 28 | #include <linux/regmap.h> | 30 | #include <linux/regmap.h> |
| @@ -78,6 +80,34 @@ static int ksz9031rn_phy_fixup(struct phy_device *dev) | |||
| 78 | return 0; | 80 | return 0; |
| 79 | } | 81 | } |
| 80 | 82 | ||
| 83 | /* | ||
| 84 | * fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High | ||
| 85 | * as they are used for slots1-7 PERST# | ||
| 86 | */ | ||
| 87 | static void ventana_pciesw_early_fixup(struct pci_dev *dev) | ||
| 88 | { | ||
| 89 | u32 dw; | ||
| 90 | |||
| 91 | if (!of_machine_is_compatible("gw,ventana")) | ||
| 92 | return; | ||
| 93 | |||
| 94 | if (dev->devfn != 0) | ||
| 95 | return; | ||
| 96 | |||
| 97 | pci_read_config_dword(dev, 0x62c, &dw); | ||
| 98 | dw |= 0xaaa8; // GPIO1-7 outputs | ||
| 99 | pci_write_config_dword(dev, 0x62c, dw); | ||
| 100 | |||
| 101 | pci_read_config_dword(dev, 0x644, &dw); | ||
| 102 | dw |= 0xfe; // GPIO1-7 output high | ||
| 103 | pci_write_config_dword(dev, 0x644, dw); | ||
| 104 | |||
| 105 | msleep(100); | ||
| 106 | } | ||
| 107 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8609, ventana_pciesw_early_fixup); | ||
| 108 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8606, ventana_pciesw_early_fixup); | ||
| 109 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8604, ventana_pciesw_early_fixup); | ||
| 110 | |||
| 81 | static int ar8031_phy_fixup(struct phy_device *dev) | 111 | static int ar8031_phy_fixup(struct phy_device *dev) |
| 82 | { | 112 | { |
| 83 | u16 val; | 113 | u16 val; |
