.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-sa1100/hackkit.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * This file contains all HackKit tweaks. Based on original work from |
---|
7 | 8 | * Nicolas Pitre's assabet fixes |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 as |
---|
11 | | - * published by the Free Software Foundation. |
---|
12 | | - * |
---|
13 | 9 | */ |
---|
14 | 10 | #include <linux/init.h> |
---|
15 | 11 | #include <linux/kernel.h> |
---|
.. | .. |
---|
26 | 22 | #include <linux/gpio.h> |
---|
27 | 23 | #include <linux/leds.h> |
---|
28 | 24 | #include <linux/platform_device.h> |
---|
| 25 | +#include <linux/pgtable.h> |
---|
29 | 26 | |
---|
30 | 27 | #include <asm/mach-types.h> |
---|
31 | 28 | #include <asm/setup.h> |
---|
32 | 29 | #include <asm/page.h> |
---|
33 | | -#include <asm/pgtable.h> |
---|
34 | 30 | |
---|
35 | 31 | #include <asm/mach/arch.h> |
---|
36 | 32 | #include <asm/mach/flash.h> |
---|
.. | .. |
---|
49 | 45 | /* init funcs */ |
---|
50 | 46 | static void __init hackkit_map_io(void); |
---|
51 | 47 | |
---|
52 | | -static u_int hackkit_get_mctrl(struct uart_port *port); |
---|
53 | | -static void hackkit_set_mctrl(struct uart_port *port, u_int mctrl); |
---|
54 | 48 | static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate); |
---|
55 | 49 | |
---|
56 | 50 | /********************************************************************** |
---|
.. | .. |
---|
71 | 65 | }; |
---|
72 | 66 | |
---|
73 | 67 | static struct sa1100_port_fns hackkit_port_fns __initdata = { |
---|
74 | | - .set_mctrl = hackkit_set_mctrl, |
---|
75 | | - .get_mctrl = hackkit_get_mctrl, |
---|
76 | 68 | .pm = hackkit_uart_pm, |
---|
77 | 69 | }; |
---|
78 | 70 | |
---|
.. | .. |
---|
103 | 95 | static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate) |
---|
104 | 96 | { |
---|
105 | 97 | /* TODO: switch on/off uart in powersave mode */ |
---|
106 | | -} |
---|
107 | | - |
---|
108 | | -/* |
---|
109 | | - * Note! this can be called from IRQ context. |
---|
110 | | - * FIXME: No modem ctrl lines yet. |
---|
111 | | - */ |
---|
112 | | -static void hackkit_set_mctrl(struct uart_port *port, u_int mctrl) |
---|
113 | | -{ |
---|
114 | | -#if 0 |
---|
115 | | - if (port->mapbase == _Ser1UTCR0) { |
---|
116 | | - u_int set = 0, clear = 0; |
---|
117 | | - |
---|
118 | | - if (mctrl & TIOCM_RTS) |
---|
119 | | - set |= PT_CTRL2_RS1_RTS; |
---|
120 | | - else |
---|
121 | | - clear |= PT_CTRL2_RS1_RTS; |
---|
122 | | - |
---|
123 | | - if (mctrl & TIOCM_DTR) |
---|
124 | | - set |= PT_CTRL2_RS1_DTR; |
---|
125 | | - else |
---|
126 | | - clear |= PT_CTRL2_RS1_DTR; |
---|
127 | | - |
---|
128 | | - PTCTRL2_clear(clear); |
---|
129 | | - PTCTRL2_set(set); |
---|
130 | | - } |
---|
131 | | -#endif |
---|
132 | | -} |
---|
133 | | - |
---|
134 | | -static u_int hackkit_get_mctrl(struct uart_port *port) |
---|
135 | | -{ |
---|
136 | | - u_int ret = 0; |
---|
137 | | -#if 0 |
---|
138 | | - u_int irqsr = PT_IRQSR; |
---|
139 | | - |
---|
140 | | - /* need 2 reads to read current value */ |
---|
141 | | - irqsr = PT_IRQSR; |
---|
142 | | - |
---|
143 | | - /* TODO: check IRQ source register for modem/com |
---|
144 | | - status lines and set them correctly. */ |
---|
145 | | -#endif |
---|
146 | | - |
---|
147 | | - ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR; |
---|
148 | | - |
---|
149 | | - return ret; |
---|
150 | 98 | } |
---|
151 | 99 | |
---|
152 | 100 | static struct mtd_partition hackkit_partitions[] = { |
---|