| Tony Lindgren | bf027ca | 2012-10-29 13:54:06 -0700 | [diff] [blame] | 1 | int omap_sram_init(void); |
| 2 | |
| Tony Lindgren | d8cfd6c | 2012-10-29 14:36:25 -0700 | [diff] [blame] | 3 | void omap_map_sram(unsigned long start, unsigned long size, |
| 4 | unsigned long skip, int cached); |
| 5 | void omap_sram_reset(void); |
| 6 | |
| Tony Lindgren | bf027ca | 2012-10-29 13:54:06 -0700 | [diff] [blame] | 7 | extern void *omap_sram_push_address(unsigned long size); |
| 8 | |
| 9 | /* Macro to push a function to the internal SRAM, using the fncpy API */ |
| 10 | #define omap_sram_push(funcp, size) ({ \ |
| 11 | typeof(&(funcp)) _res = NULL; \ |
| 12 | void *_sram_address = omap_sram_push_address(size); \ |
| 13 | if (_sram_address) \ |
| 14 | _res = fncpy(_sram_address, &(funcp), size); \ |
| 15 | _res; \ |
| 16 | }) |