blob: 400419d8e7d956fd573eea6ddeb33d077cfee2c0 [file] [log] [blame]
Sergey Ryazanov43cc7392014-10-29 03:18:38 +04001#include <linux/kernel.h>
2#include <linux/init.h>
Sergey Ryazanov1ac91b12014-10-29 03:18:43 +04003#include <linux/serial_8250.h>
Sergey Ryazanov43cc7392014-10-29 03:18:38 +04004#include <asm/bootinfo.h>
5
6#include "devices.h"
Sergey Ryazanov1ac91b12014-10-29 03:18:43 +04007#include "ar5312.h"
8#include "ar2315.h"
Sergey Ryazanov43cc7392014-10-29 03:18:38 +04009
10const char *get_system_type(void)
11{
12 return "Atheros (unknown)";
13}
Sergey Ryazanov1ac91b12014-10-29 03:18:43 +040014
15void __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
31static 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
41arch_initcall(ath25_arch_init);