Lines Matching +full:dvc +full:-
59 #define FWH_DEC_EN1_REG_NEW 0xd9 /* high byte of 16-bit register */
152 " positive value - skip if FWH space locked read-only\n"
153 " negative value - skip always");
169 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_data_present()
184 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_data_read()
193 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_init()
195 int err = -EIO; in intel_rng_init()
212 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_cleanup()
243 u8 mfc, dvc; in intel_rng_hw_init() local
247 if (!(intel_rng_hw->fwh_dec_en1_val & FWH_F8_EN_MASK)) in intel_rng_hw_init()
248 pci_write_config_byte(intel_rng_hw->dev, in intel_rng_hw_init()
249 intel_rng_hw->fwh_dec_en1_off, in intel_rng_hw_init()
250 intel_rng_hw->fwh_dec_en1_val | in intel_rng_hw_init()
252 if (!(intel_rng_hw->bios_cntl_val & BIOS_CNTL_WRITE_ENABLE_MASK)) in intel_rng_hw_init()
253 pci_write_config_byte(intel_rng_hw->dev, in intel_rng_hw_init()
254 intel_rng_hw->bios_cntl_off, in intel_rng_hw_init()
255 intel_rng_hw->bios_cntl_val | in intel_rng_hw_init()
258 writeb(INTEL_FWH_RESET_CMD, intel_rng_hw->mem); in intel_rng_hw_init()
259 writeb(INTEL_FWH_READ_ID_CMD, intel_rng_hw->mem); in intel_rng_hw_init()
260 mfc = readb(intel_rng_hw->mem + INTEL_FWH_MANUFACTURER_CODE_ADDRESS); in intel_rng_hw_init()
261 dvc = readb(intel_rng_hw->mem + INTEL_FWH_DEVICE_CODE_ADDRESS); in intel_rng_hw_init()
262 writeb(INTEL_FWH_RESET_CMD, intel_rng_hw->mem); in intel_rng_hw_init()
264 if (!(intel_rng_hw->bios_cntl_val & in intel_rng_hw_init()
266 pci_write_config_byte(intel_rng_hw->dev, in intel_rng_hw_init()
267 intel_rng_hw->bios_cntl_off, in intel_rng_hw_init()
268 intel_rng_hw->bios_cntl_val); in intel_rng_hw_init()
269 if (!(intel_rng_hw->fwh_dec_en1_val & FWH_F8_EN_MASK)) in intel_rng_hw_init()
270 pci_write_config_byte(intel_rng_hw->dev, in intel_rng_hw_init()
271 intel_rng_hw->fwh_dec_en1_off, in intel_rng_hw_init()
272 intel_rng_hw->fwh_dec_en1_val); in intel_rng_hw_init()
275 (dvc != INTEL_FWH_DEVICE_CODE_8M && in intel_rng_hw_init()
276 dvc != INTEL_FWH_DEVICE_CODE_4M)) { in intel_rng_hw_init()
278 return -ENODEV; in intel_rng_hw_init()
287 intel_rng_hw->bios_cntl_val = 0xff; in intel_init_hw_struct()
288 intel_rng_hw->fwh_dec_en1_val = 0xff; in intel_init_hw_struct()
289 intel_rng_hw->dev = dev; in intel_init_hw_struct()
292 if (dev->device < 0x2640) { in intel_init_hw_struct()
293 intel_rng_hw->fwh_dec_en1_off = FWH_DEC_EN1_REG_OLD; in intel_init_hw_struct()
294 intel_rng_hw->bios_cntl_off = BIOS_CNTL_REG_OLD; in intel_init_hw_struct()
296 intel_rng_hw->fwh_dec_en1_off = FWH_DEC_EN1_REG_NEW; in intel_init_hw_struct()
297 intel_rng_hw->bios_cntl_off = BIOS_CNTL_REG_NEW; in intel_init_hw_struct()
300 pci_read_config_byte(dev, intel_rng_hw->fwh_dec_en1_off, in intel_init_hw_struct()
301 &intel_rng_hw->fwh_dec_en1_val); in intel_init_hw_struct()
302 pci_read_config_byte(dev, intel_rng_hw->bios_cntl_off, in intel_init_hw_struct()
303 &intel_rng_hw->bios_cntl_val); in intel_init_hw_struct()
305 if ((intel_rng_hw->bios_cntl_val & in intel_init_hw_struct()
309 PFX "Firmware space is locked read-only. If you can't or\n" in intel_init_hw_struct()
315 return -ENODEV; in intel_init_hw_struct()
317 return -EBUSY; in intel_init_hw_struct()
320 intel_rng_hw->mem = ioremap(INTEL_FWH_ADDR, INTEL_FWH_ADDR_LEN); in intel_init_hw_struct()
321 if (intel_rng_hw->mem == NULL) in intel_init_hw_struct()
322 return -EBUSY; in intel_init_hw_struct()
330 int err = -ENODEV; in intel_rng_mod_init()
359 if (err == -ENODEV) in intel_rng_mod_init()
374 iounmap(intel_rng_hw->mem); in intel_rng_mod_init()
380 err = -ENOMEM; in intel_rng_mod_init()
387 err = -ENODEV; in intel_rng_mod_init()