Deleted Added
full compact
cudavar.h (184299) cudavar.h (185724)
1/*-
2 * Copyright (c) 2006 Michael Lorenz
3 * Copyright (c) 2008 Nathan Whitehorn
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:

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

22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
1/*-
2 * Copyright (c) 2006 Michael Lorenz
3 * Copyright (c) 2008 Nathan Whitehorn
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:

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

22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
30 * $FreeBSD: head/sys/powerpc/powermac/cudavar.h 184299 2008-10-26 19:37:38Z nwhitehorn $
30 * $FreeBSD: head/sys/powerpc/powermac/cudavar.h 185724 2008-12-06 23:26:02Z nwhitehorn $
31 *
32 */
33
34#ifndef _POWERPC_CUDAVAR_H_
35#define _POWERPC_CUDAVAR_H_
36
37#define CUDA_DEVSTR "Apple CUDA I/O Controller"
38

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

56
57/* Cuda state codes */
58#define CUDA_NOTREADY 0x1 /* has not been initialized yet */
59#define CUDA_IDLE 0x2 /* the bus is currently idle */
60#define CUDA_OUT 0x3 /* sending out a command */
61#define CUDA_IN 0x4 /* receiving data */
62#define CUDA_POLLING 0x5 /* polling - II only */
63
31 *
32 */
33
34#ifndef _POWERPC_CUDAVAR_H_
35#define _POWERPC_CUDAVAR_H_
36
37#define CUDA_DEVSTR "Apple CUDA I/O Controller"
38

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

56
57/* Cuda state codes */
58#define CUDA_NOTREADY 0x1 /* has not been initialized yet */
59#define CUDA_IDLE 0x2 /* the bus is currently idle */
60#define CUDA_OUT 0x3 /* sending out a command */
61#define CUDA_IN 0x4 /* receiving data */
62#define CUDA_POLLING 0x5 /* polling - II only */
63
64struct cuda_packet {
65 uint8_t len;
66 uint8_t type;
67
68 uint8_t data[253];
69 STAILQ_ENTRY(cuda_packet) pkt_q;
70};
71
72STAILQ_HEAD(cuda_pktq, cuda_packet);
73
64struct cuda_softc {
65 device_t sc_dev;
66 int sc_memrid;
67 struct resource *sc_memr;
68 int sc_irqrid;
69 struct resource *sc_irq;
70 void *sc_ih;
71
72 struct mtx sc_mutex;
73
74 device_t adb_bus;
75
74struct cuda_softc {
75 device_t sc_dev;
76 int sc_memrid;
77 struct resource *sc_memr;
78 int sc_irqrid;
79 struct resource *sc_irq;
80 void *sc_ih;
81
82 struct mtx sc_mutex;
83
84 device_t adb_bus;
85
76 int sc_node;
77 volatile int sc_state;
78 int sc_waiting;
79 int sc_polling;
80 int sc_sent;
81 int sc_out_length;
82 int sc_received;
83 int sc_iic_done;
84 int sc_error;
85 volatile int sc_autopoll;
86 int sc_node;
87 volatile int sc_state;
88 int sc_waiting;
89 int sc_polling;
90 int sc_iic_done;
91 volatile int sc_autopoll;
86
87 int sc_i2c_read_len;
88
89 /* internal buffers */
92
93 int sc_i2c_read_len;
94
95 /* internal buffers */
90 uint8_t sc_in[256];
91 uint8_t sc_out[256];
96 uint8_t sc_in[256];
97 uint8_t sc_out[256];
98 int sc_sent;
99 int sc_out_length;
100 int sc_received;
101
102 struct cuda_pktq sc_inq;
103 struct cuda_pktq sc_outq;
92};
93
94#endif /* _POWERPC_CUDAVAR_H_ */
104};
105
106#endif /* _POWERPC_CUDAVAR_H_ */