Lines Matching refs:hdp
712 static int hpet_is_known(struct hpet_data *hdp) in hpet_is_known() argument
717 if (hpetp->hp_hpet_phys == hdp->hd_phys_address) in hpet_is_known()
800 int hpet_alloc(struct hpet_data *hdp) in hpet_alloc() argument
817 if (hpet_is_known(hdp)) { in hpet_alloc()
823 hpetp = kzalloc(struct_size(hpetp, hp_dev, hdp->hd_nirqs), in hpet_alloc()
830 hpetp->hp_hpet = hdp->hd_address; in hpet_alloc()
831 hpetp->hp_hpet_phys = hdp->hd_phys_address; in hpet_alloc()
833 hpetp->hp_ntimer = hdp->hd_nirqs; in hpet_alloc()
835 for (i = 0; i < hdp->hd_nirqs; i++) in hpet_alloc()
836 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i]; in hpet_alloc()
866 hpetp->hp_which, hdp->hd_phys_address, in hpet_alloc()
869 printk(KERN_CONT "%s %d", i > 0 ? "," : "", hdp->hd_irq[i]); in hpet_alloc()
900 if (hdp->hd_state & (1 << i)) { in hpet_alloc()
926 struct hpet_data *hdp; in hpet_resources() local
930 hdp = data; in hpet_resources()
935 hdp->hd_phys_address = addr.address.minimum; in hpet_resources()
936 hdp->hd_address = ioremap(addr.address.minimum, addr.address.address_length); in hpet_resources()
937 if (!hdp->hd_address) in hpet_resources()
940 if (hpet_is_known(hdp)) { in hpet_resources()
941 iounmap(hdp->hd_address); in hpet_resources()
949 hdp->hd_phys_address = fixmem32->address; in hpet_resources()
950 hdp->hd_address = ioremap(fixmem32->address, in hpet_resources()
952 if (!hdp->hd_address) in hpet_resources()
955 if (hpet_is_known(hdp)) { in hpet_resources()
956 iounmap(hdp->hd_address); in hpet_resources()
966 if (hdp->hd_nirqs >= HPET_MAX_TIMERS) in hpet_resources()
975 hdp->hd_irq[hdp->hd_nirqs] = irq; in hpet_resources()
976 hdp->hd_nirqs++; in hpet_resources()