Commit d44ef7ffbfef26f71d5811006f00fc82e941fe98

Authored by Marek Vasut
1 parent fda915a4cf

fpga: altera: Clean up enums in altera.h

Get rid of the line-over-80 problems and zap the typedef that
went alongside those enums.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>

Showing 1 changed file with 49 additions and 27 deletions Side-by-side Diff

... ... @@ -10,35 +10,57 @@
10 10 #ifndef _ALTERA_H_
11 11 #define _ALTERA_H_
12 12  
13   -typedef enum { /* typedef Altera_iface */
14   - min_altera_iface_type, /* insert all new types after this */
15   - passive_serial, /* serial data and external clock */
16   - passive_parallel_synchronous, /* parallel data */
17   - passive_parallel_asynchronous, /* parallel data */
18   - passive_serial_asynchronous, /* serial data w/ internal clock (not used) */
19   - altera_jtag_mode, /* jtag/tap serial (not used ) */
20   - fast_passive_parallel, /* fast passive parallel (FPP) */
21   - fast_passive_parallel_security, /* fast passive parallel with security (FPPS) */
22   - max_altera_iface_type /* insert all new types before this */
23   -} Altera_iface; /* end, typedef Altera_iface */
  13 +enum altera_iface {
  14 + /* insert all new types after this */
  15 + min_altera_iface_type,
  16 + /* serial data and external clock */
  17 + passive_serial,
  18 + /* parallel data */
  19 + passive_parallel_synchronous,
  20 + /* parallel data */
  21 + passive_parallel_asynchronous,
  22 + /* serial data w/ internal clock (not used) */
  23 + passive_serial_asynchronous,
  24 + /* jtag/tap serial (not used ) */
  25 + altera_jtag_mode,
  26 + /* fast passive parallel (FPP) */
  27 + fast_passive_parallel,
  28 + /* fast passive parallel with security (FPPS) */
  29 + fast_passive_parallel_security,
  30 + /* insert all new types before this */
  31 + max_altera_iface_type,
  32 +};
24 33  
25   -typedef enum { /* typedef Altera_Family */
26   - min_altera_type, /* insert all new types after this */
27   - Altera_ACEX1K, /* ACEX1K Family */
28   - Altera_CYC2, /* CYCLONII Family */
29   - Altera_StratixII, /* StratixII Family */
30   -/* Add new models here */
31   - max_altera_type /* insert all new types before this */
32   -} Altera_Family; /* end, typedef Altera_Family */
  34 +enum altera_family {
  35 + /* insert all new types after this */
  36 + min_altera_type,
  37 + /* ACEX1K Family */
  38 + Altera_ACEX1K,
  39 + /* CYCLONII Family */
  40 + Altera_CYC2,
  41 + /* StratixII Family */
  42 + Altera_StratixII,
33 43  
34   -typedef struct { /* typedef Altera_desc */
35   - Altera_Family family; /* part type */
36   - Altera_iface iface; /* interface type */
37   - size_t size; /* bytes of data part can accept */
38   - void * iface_fns;/* interface function table */
39   - void * base; /* base interface address */
40   - int cookie; /* implementation specific cookie */
41   -} Altera_desc; /* end, typedef Altera_desc */
  44 + /* Add new models here */
  45 +
  46 + /* insert all new types before this */
  47 + max_altera_type,
  48 +};
  49 +
  50 +typedef struct {
  51 + /* part type */
  52 + enum altera_family family;
  53 + /* interface type */
  54 + enum altera_iface iface;
  55 + /* bytes of data part can accept */
  56 + size_t size;
  57 + /* interface function table */
  58 + void *iface_fns;
  59 + /* base interface address */
  60 + void *base;
  61 + /* implementation specific cookie */
  62 + int cookie;
  63 +} Altera_desc;
42 64  
43 65 /* Generic Altera Functions
44 66 *********************************************************************/