~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to drivers/staging/generic_serial/rio/cmdpkt.h

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
** -----------------------------------------------------------------------------
3
 
**
4
 
**  Perle Specialix driver for Linux
5
 
**  Ported from existing RIO Driver for SCO sources.
6
 
 *
7
 
 *  (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
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 as published by
11
 
 *      the Free Software Foundation; either version 2 of the License, or
12
 
 *      (at your option) any later version.
13
 
 *
14
 
 *      This program is distributed in the hope that it will be useful,
15
 
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 *      GNU General Public License for more details.
18
 
 *
19
 
 *      You should have received a copy of the GNU General Public License
20
 
 *      along with this program; if not, write to the Free Software
21
 
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
 
**
23
 
**      Module          : cmdpkt.h
24
 
**      SID             : 1.2
25
 
**      Last Modified   : 11/6/98 11:34:09
26
 
**      Retrieved       : 11/6/98 11:34:20
27
 
**
28
 
**  ident @(#)cmdpkt.h  1.2
29
 
**
30
 
** -----------------------------------------------------------------------------
31
 
*/
32
 
#ifndef __rio_cmdpkt_h__
33
 
#define __rio_cmdpkt_h__
34
 
 
35
 
/*
36
 
** overlays for the data area of a packet. Used in both directions
37
 
** (to build a packet to send, and to interpret a packet that arrives)
38
 
** and is very inconvenient for MIPS, so they appear as two separate
39
 
** structures - those used for modifying/reading packets on the card
40
 
** and those for modifying/reading packets in real memory, which have an _M
41
 
** suffix.
42
 
*/
43
 
 
44
 
#define RTA_BOOT_DATA_SIZE (PKT_MAX_DATA_LEN-2)
45
 
 
46
 
/*
47
 
** The boot information packet looks like this:
48
 
** This structure overlays a PktCmd->CmdData structure, and so starts
49
 
** at Data[2] in the actual pkt!
50
 
*/
51
 
struct BootSequence {
52
 
        u16 NumPackets;
53
 
        u16 LoadBase;
54
 
        u16 CodeSize;
55
 
};
56
 
 
57
 
#define BOOT_SEQUENCE_LEN       8
58
 
 
59
 
struct SamTop {
60
 
        u8 Unit;
61
 
        u8 Link;
62
 
};
63
 
 
64
 
struct CmdHdr {
65
 
        u8 PcCommand;
66
 
        union {
67
 
                u8 PcPhbNum;
68
 
                u8 PcLinkNum;
69
 
                u8 PcIDNum;
70
 
        } U0;
71
 
};
72
 
 
73
 
 
74
 
struct PktCmd {
75
 
        union {
76
 
                struct {
77
 
                        struct CmdHdr CmdHdr;
78
 
                        struct BootSequence PcBootSequence;
79
 
                } S1;
80
 
                struct {
81
 
                        u16 PcSequence;
82
 
                        u8 PcBootData[RTA_BOOT_DATA_SIZE];
83
 
                } S2;
84
 
                struct {
85
 
                        u16 __crud__;
86
 
                        u8 PcUniqNum[4];        /* this is really a uint. */
87
 
                        u8 PcModuleTypes;       /* what modules are fitted */
88
 
                } S3;
89
 
                struct {
90
 
                        struct CmdHdr CmdHdr;
91
 
                        u8 __undefined__;
92
 
                        u8 PcModemStatus;
93
 
                        u8 PcPortStatus;
94
 
                        u8 PcSubCommand;        /* commands like mem or register dump */
95
 
                        u16 PcSubAddr;  /* Address for command */
96
 
                        u8 PcSubData[64];       /* Date area for command */
97
 
                } S4;
98
 
                struct {
99
 
                        struct CmdHdr CmdHdr;
100
 
                        u8 PcCommandText[1];
101
 
                        u8 __crud__[20];
102
 
                        u8 PcIDNum2;    /* It had to go somewhere! */
103
 
                } S5;
104
 
                struct {
105
 
                        struct CmdHdr CmdHdr;
106
 
                        struct SamTop Topology[LINKS_PER_UNIT];
107
 
                } S6;
108
 
        } U1;
109
 
};
110
 
 
111
 
struct PktCmd_M {
112
 
        union {
113
 
                struct {
114
 
                        struct {
115
 
                                u8 PcCommand;
116
 
                                union {
117
 
                                        u8 PcPhbNum;
118
 
                                        u8 PcLinkNum;
119
 
                                        u8 PcIDNum;
120
 
                                } U0;
121
 
                        } CmdHdr;
122
 
                        struct {
123
 
                                u16 NumPackets;
124
 
                                u16 LoadBase;
125
 
                                u16 CodeSize;
126
 
                        } PcBootSequence;
127
 
                } S1;
128
 
                struct {
129
 
                        u16 PcSequence;
130
 
                        u8 PcBootData[RTA_BOOT_DATA_SIZE];
131
 
                } S2;
132
 
                struct {
133
 
                        u16 __crud__;
134
 
                        u8 PcUniqNum[4];        /* this is really a uint. */
135
 
                        u8 PcModuleTypes;       /* what modules are fitted */
136
 
                } S3;
137
 
                struct {
138
 
                        u16 __cmd_hdr__;
139
 
                        u8 __undefined__;
140
 
                        u8 PcModemStatus;
141
 
                        u8 PcPortStatus;
142
 
                        u8 PcSubCommand;
143
 
                        u16 PcSubAddr;
144
 
                        u8 PcSubData[64];
145
 
                } S4;
146
 
                struct {
147
 
                        u16 __cmd_hdr__;
148
 
                        u8 PcCommandText[1];
149
 
                        u8 __crud__[20];
150
 
                        u8 PcIDNum2;    /* Tacked on end */
151
 
                } S5;
152
 
                struct {
153
 
                        u16 __cmd_hdr__;
154
 
                        struct Top Topology[LINKS_PER_UNIT];
155
 
                } S6;
156
 
        } U1;
157
 
};
158
 
 
159
 
#define Command         U1.S1.CmdHdr.PcCommand
160
 
#define PhbNum          U1.S1.CmdHdr.U0.PcPhbNum
161
 
#define IDNum           U1.S1.CmdHdr.U0.PcIDNum
162
 
#define IDNum2          U1.S5.PcIDNum2
163
 
#define LinkNum         U1.S1.CmdHdr.U0.PcLinkNum
164
 
#define Sequence        U1.S2.PcSequence
165
 
#define BootData        U1.S2.PcBootData
166
 
#define BootSequence    U1.S1.PcBootSequence
167
 
#define UniqNum         U1.S3.PcUniqNum
168
 
#define ModemStatus     U1.S4.PcModemStatus
169
 
#define PortStatus      U1.S4.PcPortStatus
170
 
#define SubCommand      U1.S4.PcSubCommand
171
 
#define SubAddr         U1.S4.PcSubAddr
172
 
#define SubData         U1.S4.PcSubData
173
 
#define CommandText     U1.S5.PcCommandText
174
 
#define RouteTopology   U1.S6.Topology
175
 
#define ModuleTypes     U1.S3.PcModuleTypes
176
 
 
177
 
#endif