d3000a871a21ee63787c531ab6fc1ae3295267e4
[firefly-linux-kernel-4.4.55.git] / arch / tile / include / arch / trio.h
1 /*
2  * Copyright 2012 Tilera Corporation. All Rights Reserved.
3  *
4  *   This program is free software; you can redistribute it and/or
5  *   modify it under the terms of the GNU General Public License
6  *   as published by the Free Software Foundation, version 2.
7  *
8  *   This program is distributed in the hope that it will be useful, but
9  *   WITHOUT ANY WARRANTY; without even the implied warranty of
10  *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11  *   NON INFRINGEMENT.  See the GNU General Public License for
12  *   more details.
13  */
14
15 /* Machine-generated file; do not edit. */
16
17 #ifndef __ARCH_TRIO_H__
18 #define __ARCH_TRIO_H__
19
20 #include <arch/abi.h>
21 #include <arch/trio_def.h>
22
23 #ifndef __ASSEMBLER__
24
25 /*
26  * Tile PIO Region Configuration - CFG Address Format.
27  * This register describes the address format for PIO accesses when the
28  * associated region is setup with TYPE=CFG.
29  */
30
31 __extension__
32 typedef union
33 {
34   struct
35   {
36 #ifndef __BIG_ENDIAN__
37     /* Register Address (full byte address). */
38     uint_reg_t reg_addr     : 12;
39     /* Function Number */
40     uint_reg_t fn           : 3;
41     /* Device Number */
42     uint_reg_t dev          : 5;
43     /* BUS Number */
44     uint_reg_t bus          : 8;
45     /* Config Type: 0 for access to directly-attached device.  1 otherwise. */
46     uint_reg_t type         : 1;
47     /* Reserved. */
48     uint_reg_t __reserved_0 : 1;
49     /*
50      * MAC select.  This must match the configuration in
51      * TILE_PIO_REGION_SETUP.MAC.
52      */
53     uint_reg_t mac          : 2;
54     /* Reserved. */
55     uint_reg_t __reserved_1 : 32;
56 #else   /* __BIG_ENDIAN__ */
57     uint_reg_t __reserved_1 : 32;
58     uint_reg_t mac          : 2;
59     uint_reg_t __reserved_0 : 1;
60     uint_reg_t type         : 1;
61     uint_reg_t bus          : 8;
62     uint_reg_t dev          : 5;
63     uint_reg_t fn           : 3;
64     uint_reg_t reg_addr     : 12;
65 #endif
66   };
67
68   uint_reg_t word;
69 } TRIO_TILE_PIO_REGION_SETUP_CFG_ADDR_t;
70 #endif /* !defined(__ASSEMBLER__) */
71
72 #endif /* !defined(__ARCH_TRIO_H__) */