Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 1 | #include <linux/kernel.h> |
| 2 | #include <linux/init.h> |
Sergey Ryazanov | 1ac91b1 | 2014-10-29 03:18:43 +0400 | [diff] [blame^] | 3 | #include <linux/serial_8250.h> |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 4 | #include <asm/bootinfo.h> |
| 5 | |
| 6 | #include "devices.h" |
Sergey Ryazanov | 1ac91b1 | 2014-10-29 03:18:43 +0400 | [diff] [blame^] | 7 | #include "ar5312.h" |
| 8 | #include "ar2315.h" |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 9 | |
| 10 | const char *get_system_type(void) |
| 11 | { |
| 12 | return "Atheros (unknown)"; |
| 13 | } |
Sergey Ryazanov | 1ac91b1 | 2014-10-29 03:18:43 +0400 | [diff] [blame^] | 14 | |
| 15 | void __init ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk) |
| 16 | { |
| 17 | struct uart_port s; |
| 18 | |
| 19 | memset(&s, 0, sizeof(s)); |
| 20 | |
| 21 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP; |
| 22 | s.iotype = UPIO_MEM32; |
| 23 | s.irq = irq; |
| 24 | s.regshift = 2; |
| 25 | s.mapbase = mapbase; |
| 26 | s.uartclk = uartclk; |
| 27 | |
| 28 | early_serial_setup(&s); |
| 29 | } |
| 30 | |
| 31 | static int __init ath25_arch_init(void) |
| 32 | { |
| 33 | if (is_ar5312()) |
| 34 | ar5312_arch_init(); |
| 35 | else |
| 36 | ar2315_arch_init(); |
| 37 | |
| 38 | return 0; |
| 39 | } |
| 40 | |
| 41 | arch_initcall(ath25_arch_init); |