Jean-Christophe PLAGNIOL-VILLARD | 4342d64 | 2011-11-27 23:15:50 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
| 3 | * |
| 4 | * Under GPLv2 |
| 5 | */ |
| 6 | |
| 7 | #ifndef __MACH_AT91_MATRIX_H__ |
| 8 | #define __MACH_AT91_MATRIX_H__ |
| 9 | |
| 10 | #ifndef __ASSEMBLY__ |
| 11 | extern void __iomem *at91_matrix_base; |
| 12 | |
| 13 | #define at91_matrix_read(field) \ |
| 14 | __raw_readl(at91_matrix_base + field) |
| 15 | |
| 16 | #define at91_matrix_write(field, value) \ |
Johan Hovold | 3aa630b | 2013-04-07 16:49:59 +0200 | [diff] [blame] | 17 | __raw_writel(value, at91_matrix_base + field) |
Jean-Christophe PLAGNIOL-VILLARD | 4342d64 | 2011-11-27 23:15:50 +0800 | [diff] [blame] | 18 | |
| 19 | #else |
| 20 | .extern at91_matrix_base |
| 21 | #endif |
| 22 | |
| 23 | #endif /* __MACH_AT91_MATRIX_H__ */ |