#define boot_spm_busy() \
	(__SPM_REG & (uint8_t)_BV(__SPM_ENABLE)) 

Check if the SPM instruction is busy.