Lines Matching refs:fm_idx
26 void *fm_muram_base(int fm_idx) in fm_muram_base() argument
28 return muram[fm_idx].base; in fm_muram_base()
31 void *fm_muram_alloc(int fm_idx, size_t size, ulong align) in fm_muram_alloc() argument
39 save = muram[fm_idx].alloc; in fm_muram_alloc()
43 muram[fm_idx].alloc += (align - off); in fm_muram_alloc()
47 if ((muram[fm_idx].alloc + size) >= muram[fm_idx].top) { in fm_muram_alloc()
48 muram[fm_idx].alloc = save; in fm_muram_alloc()
53 ret = muram[fm_idx].alloc; in fm_muram_alloc()
54 muram[fm_idx].alloc += size; in fm_muram_alloc()
60 static void fm_init_muram(int fm_idx, void *reg) in fm_init_muram() argument
64 muram[fm_idx].base = base; in fm_init_muram()
65 muram[fm_idx].size = CONFIG_SYS_FM_MURAM_SIZE; in fm_init_muram()
66 muram[fm_idx].alloc = base + FM_MURAM_RES_SIZE; in fm_init_muram()
67 muram[fm_idx].top = base + CONFIG_SYS_FM_MURAM_SIZE; in fm_init_muram()
76 static void fm_upload_ucode(int fm_idx, struct fm_imem *imem, in fm_upload_ucode() argument
93 printf("Fman%u: microcode upload timeout\n", fm_idx + 1); in fm_upload_ucode()
110 static int fman_upload_firmware(int fm_idx, in fman_upload_firmware() argument
121 printf("Fman%u: Invalid address for firmware\n", fm_idx + 1); in fman_upload_firmware()
131 printf("Fman%u: Data at %p is not a firmware\n", fm_idx + 1, in fman_upload_firmware()
138 printf("Fman%u: Unsupported firmware version %u\n", fm_idx + 1, in fman_upload_firmware()
145 printf("Fman%u: Invalid data in firmware header\n", fm_idx + 1); in fman_upload_firmware()
164 fm_idx + 1); in fman_upload_firmware()
174 printf("Fman%u: Firmware CRC is invalid\n", fm_idx + 1); in fman_upload_firmware()
187 fm_idx + 1, ucode->major, ucode->minor, in fman_upload_firmware()
192 fm_upload_ucode(fm_idx, fm_imem, code, ucode_size); in fman_upload_firmware()
259 static int fm_init_bmi(int fm_idx, struct fm_bmi_common *bmi) in fm_init_bmi() argument
267 base = fm_muram_alloc(fm_idx, FM_FREE_POOL_SIZE, FM_FREE_POOL_ALIGN); in fm_init_bmi()
272 offset = base - fm_muram_base(fm_idx); in fm_init_bmi()