• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/char/hw_random/

Lines Matching defs:intel_rng_hw

231 struct intel_rng_hw {
242 struct intel_rng_hw *intel_rng_hw = _intel_rng_hw;
247 if (!(intel_rng_hw->fwh_dec_en1_val & FWH_F8_EN_MASK))
248 pci_write_config_byte(intel_rng_hw->dev,
249 intel_rng_hw->fwh_dec_en1_off,
250 intel_rng_hw->fwh_dec_en1_val |
252 if (!(intel_rng_hw->bios_cntl_val & BIOS_CNTL_WRITE_ENABLE_MASK))
253 pci_write_config_byte(intel_rng_hw->dev,
254 intel_rng_hw->bios_cntl_off,
255 intel_rng_hw->bios_cntl_val |
258 writeb(INTEL_FWH_RESET_CMD, intel_rng_hw->mem);
259 writeb(INTEL_FWH_READ_ID_CMD, intel_rng_hw->mem);
260 mfc = readb(intel_rng_hw->mem + INTEL_FWH_MANUFACTURER_CODE_ADDRESS);
261 dvc = readb(intel_rng_hw->mem + INTEL_FWH_DEVICE_CODE_ADDRESS);
262 writeb(INTEL_FWH_RESET_CMD, intel_rng_hw->mem);
264 if (!(intel_rng_hw->bios_cntl_val &
266 pci_write_config_byte(intel_rng_hw->dev,
267 intel_rng_hw->bios_cntl_off,
268 intel_rng_hw->bios_cntl_val);
269 if (!(intel_rng_hw->fwh_dec_en1_val & FWH_F8_EN_MASK))
270 pci_write_config_byte(intel_rng_hw->dev,
271 intel_rng_hw->fwh_dec_en1_off,
272 intel_rng_hw->fwh_dec_en1_val);
284 static int __init intel_init_hw_struct(struct intel_rng_hw *intel_rng_hw,
287 intel_rng_hw->bios_cntl_val = 0xff;
288 intel_rng_hw->fwh_dec_en1_val = 0xff;
289 intel_rng_hw->dev = dev;
293 intel_rng_hw->fwh_dec_en1_off = FWH_DEC_EN1_REG_OLD;
294 intel_rng_hw->bios_cntl_off = BIOS_CNTL_REG_OLD;
296 intel_rng_hw->fwh_dec_en1_off = FWH_DEC_EN1_REG_NEW;
297 intel_rng_hw->bios_cntl_off = BIOS_CNTL_REG_NEW;
300 pci_read_config_byte(dev, intel_rng_hw->fwh_dec_en1_off,
301 &intel_rng_hw->fwh_dec_en1_val);
302 pci_read_config_byte(dev, intel_rng_hw->bios_cntl_off,
303 &intel_rng_hw->bios_cntl_val);
305 if ((intel_rng_hw->bios_cntl_val &
321 intel_rng_hw->mem = ioremap_nocache(INTEL_FWH_ADDR, INTEL_FWH_ADDR_LEN);
322 if (intel_rng_hw->mem == NULL)
336 struct intel_rng_hw *intel_rng_hw;
350 intel_rng_hw = kmalloc(sizeof(*intel_rng_hw), GFP_KERNEL);
351 if (!intel_rng_hw) {
356 err = intel_init_hw_struct(intel_rng_hw, dev);
359 kfree(intel_rng_hw);
373 err = stop_machine(intel_rng_hw_init, intel_rng_hw, NULL);
375 iounmap(intel_rng_hw->mem);
376 kfree(intel_rng_hw);