7 #include <linux/module.h>
8 #include <linux/kernel.h>
10 #include <linux/device.h>
14 #include <hwregs/reg_map.h>
15 #include <hwregs/iop/iop_reg_space.h>
19 #include <hwregs/iop/iop_sw_cpu_defs.h>
21 #define IOP_TIMEOUT 100
23 #error "This driver is broken with regard to its driver core usage."
24 #error "Please contact <[email protected]> for details on how to fix it properly."
26 static struct device iop_spu_device[2] = {
27 { .init_name =
"iop-spu0", },
28 { .init_name =
"iop-spu1", },
31 static struct device iop_mpu_device = {
32 .init_name =
"iop-mpu",
35 static int wait_mpu_idle(
void)
75 &iop_spu_device[spu_inst]);
79 "iop_load_spu: Failed to load firmware \"%s\"\n",
108 for (i = 0; i < (fw_entry->
size/4); i++) {
142 "iop_load_spu: Failed to load firmware \"%s\"\n",
154 if ((retval = wait_mpu_idle()) != 0)
157 for (i = 0; i < (fw_entry->
size / 4); i++) {
159 if ((retval = wait_mpu_idle()) != 0)
175 if ((retval = wait_mpu_idle()) != 0)
178 if ((retval = wait_mpu_idle()) != 0)
181 if ((retval = wait_mpu_idle()) != 0)
184 if ((retval = wait_mpu_idle()) != 0)
188 if ((retval = wait_mpu_idle()) != 0)
196 static int __init iop_fw_load_init(
void)
218 static void __exit iop_fw_load_exit(
void)