Lines Matching defs:sdram
206 static __init int isram_read_test(char *sdram, void *l1inst)
215 sdram[i] = i % 255;
216 dma_memcpy(l1inst, sdram, test_len);
221 memcpy(&data2, sdram + i, sizeof(data2));
232 static __init int isram_write_test(char *sdram, void *l1inst)
240 memset(sdram, 0, test_len * 2);
241 dma_memcpy(l1inst, sdram, test_len);
243 sdram[i] = i % 255;
247 memcpy(&data1, sdram + i, sizeof(data1));
257 dma_memcpy(sdram + test_len, l1inst, test_len);
258 if (memcmp(sdram, sdram + test_len, test_len)) {
267 _isram_memcpy_test(char pattern, void *sdram, void *l1inst, const char *smemcpy,
270 memset(sdram, pattern, test_len);
271 fmemcpy(l1inst, sdram, test_len);
272 fmemcpy(sdram + test_len, l1inst, test_len);
273 if (memcmp(sdram, sdram + test_len, test_len)) {
275 smemcpy, l1inst, sdram, test_len, pattern);
282 static __init int isram_memcpy_test(char *sdram, void *l1inst)
289 ret += _isram_memcpy_test(i, sdram, l1inst, isram_memcpy);
296 sdram[i] = i % 255;
297 dma_memcpy(l1inst, sdram, test_len);
305 if (memcmp(cmp, sdram + i, j)) {
309 hex_dump(sdram + i, j);
324 memset(sdram + test_len, 0, test_len);
325 dma_memcpy(l1inst, sdram + test_len, test_len);
331 isram_memcpy(l1inst + i, sdram + i, j);
333 if (memcmp(cmp, sdram + i, j)) {
337 hex_dump(sdram + i, j);
355 char *sdram;
372 sdram = kmalloc(test_len * 2, GFP_KERNEL);
373 if (!sdram) {
375 pr_warning("SKIP: could not allocate sdram\n");
381 pr_info("INFO: running initial dma_memcpy checks %p\n", sdram);
382 if (_isram_memcpy_test(0xa, sdram, l1inst, dma_memcpy))
384 if (_isram_memcpy_test(0x5, sdram, l1inst, dma_memcpy))
388 ret += isram_read_test(sdram, l1inst);
389 ret += isram_write_test(sdram, l1inst);
390 ret += isram_memcpy_test(sdram, l1inst);
394 kfree(sdram);