blob: 65e86cc46e490b0cdc6e57c86a63ede2e4d30ff7 [file] [log] [blame]
Sergey Ryazanov43cc7392014-10-29 03:18:38 +04001#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 Ryazanov1753e742014-10-29 03:18:41 +04008#define ATH25_IRQ_CPU_CLOCK (MIPS_CPU_IRQ_BASE + 7) /* C0_CAUSE: 0x8000 */
9
Sergey Ryazanova7473712014-10-29 03:18:44 +040010extern struct ar231x_board_config ath25_board;
Sergey Ryazanov1753e742014-10-29 03:18:41 +040011extern void (*ath25_irq_dispatch)(void);
12
Sergey Ryazanova7473712014-10-29 03:18:44 +040013int ath25_find_config(phys_addr_t offset, unsigned long size);
Sergey Ryazanov1ac91b12014-10-29 03:18:43 +040014void ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk);
15
Sergey Ryazanov43cc7392014-10-29 03:18:38 +040016static inline bool is_ar2315(void)
17{
18 return (current_cpu_data.cputype == CPU_4KEC);
19}
20
21static inline bool is_ar5312(void)
22{
23 return !is_ar2315();
24}
25
26#endif