intel_rng_hw
struct intel_rng_hw *intel_rng_hw = _intel_rng_hw;
if (!(intel_rng_hw->fwh_dec_en1_val & FWH_F8_EN_MASK))
pci_write_config_byte(intel_rng_hw->dev,
intel_rng_hw->fwh_dec_en1_off,
intel_rng_hw->fwh_dec_en1_val |
if (!(intel_rng_hw->bios_cntl_val & BIOS_CNTL_WRITE_ENABLE_MASK))
pci_write_config_byte(intel_rng_hw->dev,
intel_rng_hw->bios_cntl_off,
intel_rng_hw->bios_cntl_val |
writeb(INTEL_FWH_RESET_CMD, intel_rng_hw->mem);
writeb(INTEL_FWH_READ_ID_CMD, intel_rng_hw->mem);
mfc = readb(intel_rng_hw->mem + INTEL_FWH_MANUFACTURER_CODE_ADDRESS);
dvc = readb(intel_rng_hw->mem + INTEL_FWH_DEVICE_CODE_ADDRESS);
writeb(INTEL_FWH_RESET_CMD, intel_rng_hw->mem);
if (!(intel_rng_hw->bios_cntl_val &
pci_write_config_byte(intel_rng_hw->dev,
intel_rng_hw->bios_cntl_off,
intel_rng_hw->bios_cntl_val);
if (!(intel_rng_hw->fwh_dec_en1_val & FWH_F8_EN_MASK))
pci_write_config_byte(intel_rng_hw->dev,
intel_rng_hw->fwh_dec_en1_off,
intel_rng_hw->fwh_dec_en1_val);
static int __init intel_init_hw_struct(struct intel_rng_hw *intel_rng_hw,
intel_rng_hw->bios_cntl_val = 0xff;
intel_rng_hw->fwh_dec_en1_val = 0xff;
intel_rng_hw->dev = dev;
intel_rng_hw->fwh_dec_en1_off = FWH_DEC_EN1_REG_OLD;
intel_rng_hw->bios_cntl_off = BIOS_CNTL_REG_OLD;
intel_rng_hw->fwh_dec_en1_off = FWH_DEC_EN1_REG_NEW;
intel_rng_hw->bios_cntl_off = BIOS_CNTL_REG_NEW;
pci_read_config_byte(dev, intel_rng_hw->fwh_dec_en1_off,
&intel_rng_hw->fwh_dec_en1_val);
pci_read_config_byte(dev, intel_rng_hw->bios_cntl_off,
&intel_rng_hw->bios_cntl_val);
if ((intel_rng_hw->bios_cntl_val &
intel_rng_hw->mem = ioremap(INTEL_FWH_ADDR, INTEL_FWH_ADDR_LEN);
if (intel_rng_hw->mem == NULL)
struct intel_rng_hw *intel_rng_hw;
intel_rng_hw = kmalloc_obj(*intel_rng_hw);
if (!intel_rng_hw) {
err = intel_init_hw_struct(intel_rng_hw, dev);
kfree(intel_rng_hw);
err = stop_machine(intel_rng_hw_init, intel_rng_hw, NULL);
iounmap(intel_rng_hw->mem);
kfree(intel_rng_hw);