aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>2016-08-12 07:48:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-31 09:45:18 -0400
commitbed3d7babafda16cf2e095366dec3f64143b370a (patch)
treef3819dda1a2acdd5367ba1426273aef169b9b1ce /drivers/misc
parent549ce8f134bd95a1d4bf1a62215a62f1e9408a96 (diff)
misc: pch_phub: Add UART_CLK quirk for Boston platform
The EG20T has 4 UART blocks. The clock source for the UART block is configured to receive a clock from an external pin by default. An internal 25MHz clock in the EG20T can also be used as a clock source for the clock. The MIPS based Boston platform ties the external clock pin down and relies on the internal clock source for the UART to function. Boston is based on device tree. Add a quirk to allow Boston to be detected via device tree and set the correct clock source for UART. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/pch_phub.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c
index 1dd18f500730..e42bdc90fa27 100644
--- a/drivers/misc/pch_phub.c
+++ b/drivers/misc/pch_phub.c
@@ -58,6 +58,7 @@
58 58
59/* CM-iTC */ 59/* CM-iTC */
60#define CLKCFG_UART_48MHZ (1 << 16) 60#define CLKCFG_UART_48MHZ (1 << 16)
61#define CLKCFG_UART_25MHZ (2 << 16)
61#define CLKCFG_BAUDDIV (2 << 20) 62#define CLKCFG_BAUDDIV (2 << 20)
62#define CLKCFG_PLL2VCO (8 << 9) 63#define CLKCFG_PLL2VCO (8 << 9)
63#define CLKCFG_UARTCLKSEL (1 << 18) 64#define CLKCFG_UARTCLKSEL (1 << 18)
@@ -748,6 +749,16 @@ static int pch_phub_probe(struct pci_dev *pdev,
748 iowrite32(0x25, chip->pch_phub_base_address + 0x44); 749 iowrite32(0x25, chip->pch_phub_base_address + 0x44);
749 chip->pch_opt_rom_start_address = PCH_PHUB_ROM_START_ADDR_EG20T; 750 chip->pch_opt_rom_start_address = PCH_PHUB_ROM_START_ADDR_EG20T;
750 chip->pch_mac_start_address = PCH_PHUB_MAC_START_ADDR_EG20T; 751 chip->pch_mac_start_address = PCH_PHUB_MAC_START_ADDR_EG20T;
752
753 /* quirk for MIPS Boston platform */
754 if (pdev->dev.of_node) {
755 if (of_machine_is_compatible("img,boston")) {
756 pch_phub_read_modify_write_reg(chip,
757 (unsigned int)CLKCFG_REG_OFFSET,
758 CLKCFG_UART_25MHZ,
759 CLKCFG_UART_MASK);
760 }
761 }
751 } else if (id->driver_data == 2) { /* ML7213 IOH */ 762 } else if (id->driver_data == 2) { /* ML7213 IOH */
752 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); 763 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr);
753 if (ret) 764 if (ret)