/* Upload code to the shared RAM of an IOP.  */
void iop_upload_code(uint iop_num, __u8 *code_start, uint code_len, __u16 shared_ram_start)
/* Upload code to the shared RAM of an IOP.  */
void iop_upload_code(uint iop_num, __u8 *code_start, uint code_len, __u16 shared_ram_start)
{
	if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return;
	iop_loadaddr(iop_base[iop_num], shared_ram_start);
	while (code_len--) {
		iop_base[iop_num]->ram_data = *code_start++;
	}
}