Deleted Added
full compact
uart_cpu_sparc64.c (206451) uart_cpu_sparc64.c (221960)
1/*-
2 * Copyright (c) 2003, 2004 Marcel Moolenaar
3 * Copyright (c) 2004 - 2006 Marius Strobl <marius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003, 2004 Marcel Moolenaar
3 * Copyright (c) 2004 - 2006 Marius Strobl <marius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/uart/uart_cpu_sparc64.c 206451 2010-04-10 11:52:12Z marius $");
29__FBSDID("$FreeBSD: head/sys/dev/uart/uart_cpu_sparc64.c 221960 2011-05-15 13:27:38Z marius $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33
34#include <machine/bus.h>
35#include <machine/bus_private.h>
36
37#include <dev/ofw/openfirm.h>

--- 195 unchanged lines hidden (view full) ---

233 /* Get the device class. */
234 if (OF_getprop(input, "name", buf, sizeof(buf)) == -1)
235 return (ENXIO);
236 if (OF_getprop(input, "compatible", compat, sizeof(compat)) == -1)
237 compat[0] = '\0';
238 di->bas.regshft = 0;
239 di->bas.rclk = 0;
240 class = NULL;
30
31#include <sys/param.h>
32#include <sys/systm.h>
33
34#include <machine/bus.h>
35#include <machine/bus_private.h>
36
37#include <dev/ofw/openfirm.h>

--- 195 unchanged lines hidden (view full) ---

233 /* Get the device class. */
234 if (OF_getprop(input, "name", buf, sizeof(buf)) == -1)
235 return (ENXIO);
236 if (OF_getprop(input, "compatible", compat, sizeof(compat)) == -1)
237 compat[0] = '\0';
238 di->bas.regshft = 0;
239 di->bas.rclk = 0;
240 class = NULL;
241 if (!strcmp(buf, "se") || !strcmp(compat, "sab82532")) {
241 if (!strcmp(buf, "se") || !strcmp(buf, "FJSV,se") ||
242 !strcmp(compat, "sab82532")) {
242 class = &uart_sab82532_class;
243 /* SAB82532 are only known to be used for TTYs. */
244 if ((di->bas.chan = uart_cpu_channel(dev)) == 0)
245 return (ENXIO);
246 addr += uart_getrange(class) * (di->bas.chan - 1);
247 } else if (!strcmp(buf, "zs")) {
248 class = &uart_z8530_class;
249 if ((di->bas.chan = uart_cpu_channel(dev)) == 0) {

--- 55 unchanged lines hidden ---
243 class = &uart_sab82532_class;
244 /* SAB82532 are only known to be used for TTYs. */
245 if ((di->bas.chan = uart_cpu_channel(dev)) == 0)
246 return (ENXIO);
247 addr += uart_getrange(class) * (di->bas.chan - 1);
248 } else if (!strcmp(buf, "zs")) {
249 class = &uart_z8530_class;
250 if ((di->bas.chan = uart_cpu_channel(dev)) == 0) {

--- 55 unchanged lines hidden ---