Apply relevant parts of a22eb754c4bb to tpm1.2
The TIS 1.2 driver uses the IRQ resource value directly as the four-bit LPC SIRQ selector in TPM_INT_VECTOR, without validating it before narrowing. Add the missing range check on the full resource value and use polling for routes outside 1 through 15. This restriction reflects the driver's current routing support: parent interrupt numbers need not equal LPC SIRQ channels. Attach also installs a handler when the chip's quirks select polling. Release the IRQ resource when initialization selects polling. Retain an interrupt cookie only after successful setup and require it for interrupt waits. Share verified interrupt masking across initialization, resume, and detach. Quiesce after draining cdev methods and before removing a handler, including polling devices whose failed resume left firmware delivery on. Preserve an owned locality until the existing abort path discards any pending response. Report quiesce failures while completing detach cleanup. Diagnose a failed initialization-time disable in the attach context, even when the cleanup retry succeeds. Lifecycle locality acquisition uses the bounded timeout without PCATCH so signals cannot interrupt masking; command-path acquisition remains interruptible. Cancel timed-out or interrupted locality requests, including requests made by the ISA probe, so a late grant cannot leave locality reserved. A device whose global enable does not read back cleared now fails attach instead of publishing a cdev, and fails resume instead of accepting new commands. Initialization's existing requirement to acquire locality is unchanged. The separate legacy Atmel transport is unaffected. MFC after: 2 weeks