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 | |
Sergey Ryazanov | a747371 | 2014-10-29 03:18:44 +0400 | [diff] [blame^] | 10 | extern struct ar231x_board_config ath25_board; |
Sergey Ryazanov | 1753e74 | 2014-10-29 03:18:41 +0400 | [diff] [blame] | 11 | extern void (*ath25_irq_dispatch)(void); |
| 12 | |
Sergey Ryazanov | a747371 | 2014-10-29 03:18:44 +0400 | [diff] [blame^] | 13 | int ath25_find_config(phys_addr_t offset, unsigned long size); |
Sergey Ryazanov | 1ac91b1 | 2014-10-29 03:18:43 +0400 | [diff] [blame] | 14 | void ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk); |
| 15 | |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 16 | static inline bool is_ar2315(void) |
| 17 | { |
| 18 | return (current_cpu_data.cputype == CPU_4KEC); |
| 19 | } |
| 20 | |
| 21 | static inline bool is_ar5312(void) |
| 22 | { |
| 23 | return !is_ar2315(); |
| 24 | } |
| 25 | |
| 26 | #endif |