Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/tqm85xx: add a quirk for ti1520 PCMCIA bridge

By default ti1520 bridge expects an input clock on CLOCK pin (to control
power chip). However on this boards CLOCK should be generated by PCI1520
itself. Add a quirk that enables internal 16 KHz clock generation on
this pin.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Dmitry Eremin-Solenikov and committed by
Kumar Gala
e9502fbe 07c63839

+21
+21
arch/powerpc/platforms/85xx/tqm85xx.c
··· 151 151 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 152 152 } 153 153 154 + static void __init tqm85xx_ti1520_fixup(struct pci_dev *pdev) 155 + { 156 + unsigned int val; 157 + 158 + /* Do not do the fixup on other platforms! */ 159 + if (!machine_is(tqm85xx)) 160 + return; 161 + 162 + dev_info(&pdev->dev, "Using TI 1520 fixup on TQM85xx\n"); 163 + 164 + /* 165 + * Enable P2CCLK bit in system control register 166 + * to enable CLOCK output to power chip 167 + */ 168 + pci_read_config_dword(pdev, 0x80, &val); 169 + pci_write_config_dword(pdev, 0x80, val | (1 << 27)); 170 + 171 + } 172 + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520, 173 + tqm85xx_ti1520_fixup); 174 + 154 175 static struct of_device_id __initdata of_bus_ids[] = { 155 176 { .compatible = "simple-bus", }, 156 177 { .compatible = "gianfar", },