lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 10 Jun 2013 14:52:46 +0200 From: Giancarlo Asnaghi <giancarlo.asnaghi@...com> To: linux-kernel@...r.kernel.org Cc: netdev@...r.kernel.org, davem@...emloft.net, Alessandro Rubini <rubini@...dd.com>, Federico Vaga <federico.vaga@...il.com> Subject: [PATCH 3/3] arch/x86/pci/sta2x11-fixup.c: reset and enable STA2X11 MediaLB clock The MediaLB peripheral, devoted to the MOST protocol, must be reset using chipset registers, so this code is not part of the MLB PCI driver. Signed-off-by: Giancarlo Asnaghi <giancarlo.asnaghi@...com> Signed-off-by: Federico Vaga <federico.vaga@...il.com> --- arch/x86/pci/sta2x11-fixup.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c index 9d8a509..3eae9ab 100644 --- a/arch/x86/pci/sta2x11-fixup.c +++ b/arch/x86/pci/sta2x11-fixup.c @@ -26,6 +26,9 @@ #include <linux/pci_ids.h> #include <linux/export.h> #include <linux/list.h> +#include <linux/delay.h> +#include <linux/mfd/sta2x11-mfd.h> +#include <asm/sta2x11.h> #define STA2X11_SWIOTLB_SIZE (4*1024*1024) extern int swiotlb_late_init_with_default_size(size_t default_size); @@ -212,6 +215,20 @@ static void sta2x11_setup_pdev(struct pci_dev *pdev) } DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_STMICRO, PCI_ANY_ID, sta2x11_setup_pdev); +static void sta2x11_most_enable(struct pci_dev *pdev) +{ + /* trying to reset the MLB */ + sta2x11_apbreg_mask(pdev, APBREG_PCG, APBREG_MLB, 0); + sta2x11_apbreg_mask(pdev, APBREG_PUR, APBREG_MLB, 0); + msleep_interruptible(100); + + /* Config clock and release device from reset */ + sta2x11_apbreg_mask(pdev, APBREG_PCG, APBREG_MLB, APBREG_MLB); + sta2x11_apbreg_mask(pdev, APBREG_PUR, APBREG_MLB, APBREG_MLB); + msleep_interruptible(100); +} +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_STMICRO, 0xcc12, sta2x11_most_enable); + /* * The following three functions are exported (used in swiotlb: FIXME) */ -- 1.7.7.2 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists