cpcht.c (71e3c3083b47ad0f04322c5a1173377433c05a6e) cpcht.c (bfed756af67e4b84d61b4b8af4d0a103ddd6f628)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (C) 2008-2010 Nathan Whitehorn
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

134
135 struct cpcht_irq htirq_map[128];
136 struct mtx htirq_mtx;
137};
138
139static devclass_t cpcht_devclass;
140DEFINE_CLASS_1(pcib, cpcht_driver, cpcht_methods, sizeof(struct cpcht_softc),
141 ofw_pci_driver);
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (C) 2008-2010 Nathan Whitehorn
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

134
135 struct cpcht_irq htirq_map[128];
136 struct mtx htirq_mtx;
137};
138
139static devclass_t cpcht_devclass;
140DEFINE_CLASS_1(pcib, cpcht_driver, cpcht_methods, sizeof(struct cpcht_softc),
141 ofw_pci_driver);
142DRIVER_MODULE(cpcht, ofwbus, cpcht_driver, cpcht_devclass, 0, 0);
142EARLY_DRIVER_MODULE(cpcht, ofwbus, cpcht_driver, cpcht_devclass, 0, 0,
143 BUS_PASS_BUS);
143
144#define CPCHT_IOPORT_BASE 0xf4000000UL /* Hardwired */
145#define CPCHT_IOPORT_SIZE 0x00400000UL
146
147#define HTAPIC_REQUEST_EOI 0x20
148#define HTAPIC_TRIGGER_LEVEL 0x02
149#define HTAPIC_MASK 0x01
150

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

540};
541
542static driver_t openpic_cpcht_driver = {
543 "htpic",
544 openpic_cpcht_methods,
545 sizeof(struct openpic_cpcht_softc),
546};
547
144
145#define CPCHT_IOPORT_BASE 0xf4000000UL /* Hardwired */
146#define CPCHT_IOPORT_SIZE 0x00400000UL
147
148#define HTAPIC_REQUEST_EOI 0x20
149#define HTAPIC_TRIGGER_LEVEL 0x02
150#define HTAPIC_MASK 0x01
151

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

541};
542
543static driver_t openpic_cpcht_driver = {
544 "htpic",
545 openpic_cpcht_methods,
546 sizeof(struct openpic_cpcht_softc),
547};
548
548DRIVER_MODULE(openpic, unin, openpic_cpcht_driver, openpic_devclass, 0, 0);
549EARLY_DRIVER_MODULE(openpic, unin, openpic_cpcht_driver, openpic_devclass,
550 0, 0, BUS_PASS_INTERRUPT);
549
550static int
551openpic_cpcht_probe(device_t dev)
552{
553 const char *type = ofw_bus_get_type(dev);
554
555 if (strcmp(type, "open-pic") != 0)
556 return (ENXIO);

--- 183 unchanged lines hidden ---
551
552static int
553openpic_cpcht_probe(device_t dev)
554{
555 const char *type = ofw_bus_get_type(dev);
556
557 if (strcmp(type, "open-pic") != 0)
558 return (ENXIO);

--- 183 unchanged lines hidden ---