Ryan Malloy dffef75b06 Add bcm_wait_ready() comprehensive pre-write readiness check
Stock firmware wait_for_ready() at 0x2000 checks three conditions before
each init block write — all must be simultaneously true:

  1. A2.bit3 = 1  (BCM4500 DSP processing complete)
  2. A8.bit0 = 0, A8.bit1 = 1  (command register ready)
  3. A4.bit7 = 1  (init pipeline flushed)

Our bcm_poll_ready() only checked A8.bit0, and was used for both
pre-write and post-write checks. Now:

  - bcm_wait_ready(): strict 3-condition check for PRE-write
    (with fallback to simple A8 check for gateway quirks)
  - bcm_poll_ready(): simple A8 check for POST-write
    (matches stock firmware's poll_ready() at 0x20C5)

Code size: 15,155 / 15,360 bytes (205 bytes spare)
2026-02-20 11:48:23 -07:00
..