Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 1 | #ifndef __ATH25_DEVICES_H |
| 2 | #define __ATH25_DEVICES_H |
| 3 | |
| 4 | #include <linux/cpu.h> |
| 5 | |
| 6 | #define ATH25_REG_MS(_val, _field) (((_val) & _field##_M) >> _field##_S) |
| 7 | |
Sergey Ryazanov | 1753e74 | 2014-10-29 03:18:41 +0400 | [diff] [blame] | 8 | #define ATH25_IRQ_CPU_CLOCK (MIPS_CPU_IRQ_BASE + 7) /* C0_CAUSE: 0x8000 */ |
| 9 | |
| 10 | extern void (*ath25_irq_dispatch)(void); |
| 11 | |
Sergey Ryazanov | 1ac91b1 | 2014-10-29 03:18:43 +0400 | [diff] [blame^] | 12 | void ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk); |
| 13 | |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 14 | static inline bool is_ar2315(void) |
| 15 | { |
| 16 | return (current_cpu_data.cputype == CPU_4KEC); |
| 17 | } |
| 18 | |
| 19 | static inline bool is_ar5312(void) |
| 20 | { |
| 21 | return !is_ar2315(); |
| 22 | } |
| 23 | |
| 24 | #endif |