• Home
  • Raw
  • Download

Lines Matching refs:PIIX4_dev

230 static bool piix4_sb800_use_mmio(struct pci_dev *PIIX4_dev)  in piix4_sb800_use_mmio()  argument
237 return (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD && in piix4_sb800_use_mmio()
238 PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS && in piix4_sb800_use_mmio()
239 PIIX4_dev->revision >= 0x51); in piix4_sb800_use_mmio()
242 static int piix4_setup(struct pci_dev *PIIX4_dev, in piix4_setup() argument
248 if ((PIIX4_dev->vendor == PCI_VENDOR_ID_SERVERWORKS) && in piix4_setup()
249 (PIIX4_dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5)) in piix4_setup()
255 dev_err(&PIIX4_dev->dev, in piix4_setup()
262 PIIX4_dev->vendor == PCI_VENDOR_ID_INTEL) { in piix4_setup()
263 dev_err(&PIIX4_dev->dev, "IBM system detected; this module " in piix4_setup()
274 pci_read_config_word(PIIX4_dev, SMBBA, &piix4_smba); in piix4_setup()
277 dev_err(&PIIX4_dev->dev, "SMBus base address " in piix4_setup()
288 dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", in piix4_setup()
293 pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp); in piix4_setup()
298 pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp & 0xfe); in piix4_setup()
299 pci_write_config_word(PIIX4_dev, SMBBA, piix4_smba); in piix4_setup()
300 pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp | 0x01); in piix4_setup()
301 dev_info(&PIIX4_dev->dev, "WARNING: SMBus interface set to " in piix4_setup()
313 pci_write_config_byte(PIIX4_dev, SMBHSTCFG, in piix4_setup()
315 dev_notice(&PIIX4_dev->dev, in piix4_setup()
318 dev_err(&PIIX4_dev->dev, in piix4_setup()
326 dev_dbg(&PIIX4_dev->dev, "Using IRQ for SMBus\n"); in piix4_setup()
328 dev_dbg(&PIIX4_dev->dev, "Using SMI# for SMBus\n"); in piix4_setup()
330 dev_err(&PIIX4_dev->dev, "Illegal Interrupt configuration " in piix4_setup()
333 pci_read_config_byte(PIIX4_dev, SMBREV, &temp); in piix4_setup()
334 dev_info(&PIIX4_dev->dev, in piix4_setup()
341 static int piix4_setup_sb800_smba(struct pci_dev *PIIX4_dev, in piix4_setup_sb800_smba() argument
352 mmio_cfg.use_mmio = piix4_sb800_use_mmio(PIIX4_dev); in piix4_setup_sb800_smba()
353 retval = piix4_sb800_region_request(&PIIX4_dev->dev, &mmio_cfg); in piix4_setup_sb800_smba()
367 piix4_sb800_region_release(&PIIX4_dev->dev, &mmio_cfg); in piix4_setup_sb800_smba()
380 dev_err(&PIIX4_dev->dev, in piix4_setup_sb800_smba()
388 static int piix4_setup_sb800(struct pci_dev *PIIX4_dev, in piix4_setup_sb800() argument
399 dev_err(&PIIX4_dev->dev, "SMBus does not support " in piix4_setup_sb800()
405 if ((PIIX4_dev->vendor == PCI_VENDOR_ID_AMD && in piix4_setup_sb800()
406 PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS && in piix4_setup_sb800()
407 PIIX4_dev->revision >= 0x41) || in piix4_setup_sb800()
408 (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD && in piix4_setup_sb800()
409 PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS && in piix4_setup_sb800()
410 PIIX4_dev->revision >= 0x49) || in piix4_setup_sb800()
411 (PIIX4_dev->vendor == PCI_VENDOR_ID_HYGON && in piix4_setup_sb800()
412 PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS)) in piix4_setup_sb800()
417 retval = piix4_setup_sb800_smba(PIIX4_dev, smb_en, aux, &smb_en_status, in piix4_setup_sb800()
427 dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", in piix4_setup_sb800()
434 dev_info(&PIIX4_dev->dev, in piix4_setup_sb800()
442 dev_err(&PIIX4_dev->dev, "SMBus I2C bus config region " in piix4_setup_sb800()
451 dev_dbg(&PIIX4_dev->dev, "Using IRQ for SMBus\n"); in piix4_setup_sb800()
453 dev_dbg(&PIIX4_dev->dev, "Using SMI# for SMBus\n"); in piix4_setup_sb800()
455 dev_info(&PIIX4_dev->dev, in piix4_setup_sb800()
460 if (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD || in piix4_setup_sb800()
461 PIIX4_dev->vendor == PCI_VENDOR_ID_HYGON) { in piix4_setup_sb800()
462 if (PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS || in piix4_setup_sb800()
463 (PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS && in piix4_setup_sb800()
464 PIIX4_dev->revision >= 0x1F)) { in piix4_setup_sb800()
474 mmio_cfg.use_mmio = piix4_sb800_use_mmio(PIIX4_dev); in piix4_setup_sb800()
475 retval = piix4_sb800_region_request(&PIIX4_dev->dev, &mmio_cfg); in piix4_setup_sb800()
488 piix4_sb800_region_release(&PIIX4_dev->dev, &mmio_cfg); in piix4_setup_sb800()
491 dev_info(&PIIX4_dev->dev, in piix4_setup_sb800()
498 static int piix4_setup_aux(struct pci_dev *PIIX4_dev, in piix4_setup_aux() argument
508 pci_read_config_word(PIIX4_dev, base_reg_addr, &piix4_smba); in piix4_setup_aux()
510 dev_dbg(&PIIX4_dev->dev, in piix4_setup_aux()
517 dev_dbg(&PIIX4_dev->dev, in piix4_setup_aux()
526 dev_err(&PIIX4_dev->dev, "Auxiliary SMBus region 0x%x " in piix4_setup_aux()
531 dev_info(&PIIX4_dev->dev, in piix4_setup_aux()