Path: blob/master/arch/cris/include/arch-v32/mach-a3/mach/hwregs/pio_defs.h
15163 views
#ifndef __pio_defs_h1#define __pio_defs_h23/*4* This file is autogenerated from5* file: pio.r6*7* by ../../../tools/rdesc/bin/rdes2c -outfile pio_defs.h pio.r8* Any changes here will be lost.9*10* -*- buffer-read-only: t -*-11*/12/* Main access macros */13#ifndef REG_RD14#define REG_RD( scope, inst, reg ) \15REG_READ( reg_##scope##_##reg, \16(inst) + REG_RD_ADDR_##scope##_##reg )17#endif1819#ifndef REG_WR20#define REG_WR( scope, inst, reg, val ) \21REG_WRITE( reg_##scope##_##reg, \22(inst) + REG_WR_ADDR_##scope##_##reg, (val) )23#endif2425#ifndef REG_RD_VECT26#define REG_RD_VECT( scope, inst, reg, index ) \27REG_READ( reg_##scope##_##reg, \28(inst) + REG_RD_ADDR_##scope##_##reg + \29(index) * STRIDE_##scope##_##reg )30#endif3132#ifndef REG_WR_VECT33#define REG_WR_VECT( scope, inst, reg, index, val ) \34REG_WRITE( reg_##scope##_##reg, \35(inst) + REG_WR_ADDR_##scope##_##reg + \36(index) * STRIDE_##scope##_##reg, (val) )37#endif3839#ifndef REG_RD_INT40#define REG_RD_INT( scope, inst, reg ) \41REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )42#endif4344#ifndef REG_WR_INT45#define REG_WR_INT( scope, inst, reg, val ) \46REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )47#endif4849#ifndef REG_RD_INT_VECT50#define REG_RD_INT_VECT( scope, inst, reg, index ) \51REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \52(index) * STRIDE_##scope##_##reg )53#endif5455#ifndef REG_WR_INT_VECT56#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \57REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \58(index) * STRIDE_##scope##_##reg, (val) )59#endif6061#ifndef REG_TYPE_CONV62#define REG_TYPE_CONV( type, orgtype, val ) \63( { union { orgtype o; type n; } r; r.o = val; r.n; } )64#endif6566#ifndef reg_page_size67#define reg_page_size 819268#endif6970#ifndef REG_ADDR71#define REG_ADDR( scope, inst, reg ) \72( (inst) + REG_RD_ADDR_##scope##_##reg )73#endif7475#ifndef REG_ADDR_VECT76#define REG_ADDR_VECT( scope, inst, reg, index ) \77( (inst) + REG_RD_ADDR_##scope##_##reg + \78(index) * STRIDE_##scope##_##reg )79#endif8081/* C-code for register scope pio */8283/* Register rw_data, scope pio, type rw */84typedef unsigned int reg_pio_rw_data;85#define REG_RD_ADDR_pio_rw_data 6486#define REG_WR_ADDR_pio_rw_data 648788/* Register rw_io_access0, scope pio, type rw */89typedef struct {90unsigned int data : 8;91unsigned int dummy1 : 24;92} reg_pio_rw_io_access0;93#define REG_RD_ADDR_pio_rw_io_access0 094#define REG_WR_ADDR_pio_rw_io_access0 09596/* Register rw_io_access1, scope pio, type rw */97typedef struct {98unsigned int data : 8;99unsigned int dummy1 : 24;100} reg_pio_rw_io_access1;101#define REG_RD_ADDR_pio_rw_io_access1 4102#define REG_WR_ADDR_pio_rw_io_access1 4103104/* Register rw_io_access2, scope pio, type rw */105typedef struct {106unsigned int data : 8;107unsigned int dummy1 : 24;108} reg_pio_rw_io_access2;109#define REG_RD_ADDR_pio_rw_io_access2 8110#define REG_WR_ADDR_pio_rw_io_access2 8111112/* Register rw_io_access3, scope pio, type rw */113typedef struct {114unsigned int data : 8;115unsigned int dummy1 : 24;116} reg_pio_rw_io_access3;117#define REG_RD_ADDR_pio_rw_io_access3 12118#define REG_WR_ADDR_pio_rw_io_access3 12119120/* Register rw_io_access4, scope pio, type rw */121typedef struct {122unsigned int data : 8;123unsigned int dummy1 : 24;124} reg_pio_rw_io_access4;125#define REG_RD_ADDR_pio_rw_io_access4 16126#define REG_WR_ADDR_pio_rw_io_access4 16127128/* Register rw_io_access5, scope pio, type rw */129typedef struct {130unsigned int data : 8;131unsigned int dummy1 : 24;132} reg_pio_rw_io_access5;133#define REG_RD_ADDR_pio_rw_io_access5 20134#define REG_WR_ADDR_pio_rw_io_access5 20135136/* Register rw_io_access6, scope pio, type rw */137typedef struct {138unsigned int data : 8;139unsigned int dummy1 : 24;140} reg_pio_rw_io_access6;141#define REG_RD_ADDR_pio_rw_io_access6 24142#define REG_WR_ADDR_pio_rw_io_access6 24143144/* Register rw_io_access7, scope pio, type rw */145typedef struct {146unsigned int data : 8;147unsigned int dummy1 : 24;148} reg_pio_rw_io_access7;149#define REG_RD_ADDR_pio_rw_io_access7 28150#define REG_WR_ADDR_pio_rw_io_access7 28151152/* Register rw_io_access8, scope pio, type rw */153typedef struct {154unsigned int data : 8;155unsigned int dummy1 : 24;156} reg_pio_rw_io_access8;157#define REG_RD_ADDR_pio_rw_io_access8 32158#define REG_WR_ADDR_pio_rw_io_access8 32159160/* Register rw_io_access9, scope pio, type rw */161typedef struct {162unsigned int data : 8;163unsigned int dummy1 : 24;164} reg_pio_rw_io_access9;165#define REG_RD_ADDR_pio_rw_io_access9 36166#define REG_WR_ADDR_pio_rw_io_access9 36167168/* Register rw_io_access10, scope pio, type rw */169typedef struct {170unsigned int data : 8;171unsigned int dummy1 : 24;172} reg_pio_rw_io_access10;173#define REG_RD_ADDR_pio_rw_io_access10 40174#define REG_WR_ADDR_pio_rw_io_access10 40175176/* Register rw_io_access11, scope pio, type rw */177typedef struct {178unsigned int data : 8;179unsigned int dummy1 : 24;180} reg_pio_rw_io_access11;181#define REG_RD_ADDR_pio_rw_io_access11 44182#define REG_WR_ADDR_pio_rw_io_access11 44183184/* Register rw_io_access12, scope pio, type rw */185typedef struct {186unsigned int data : 8;187unsigned int dummy1 : 24;188} reg_pio_rw_io_access12;189#define REG_RD_ADDR_pio_rw_io_access12 48190#define REG_WR_ADDR_pio_rw_io_access12 48191192/* Register rw_io_access13, scope pio, type rw */193typedef struct {194unsigned int data : 8;195unsigned int dummy1 : 24;196} reg_pio_rw_io_access13;197#define REG_RD_ADDR_pio_rw_io_access13 52198#define REG_WR_ADDR_pio_rw_io_access13 52199200/* Register rw_io_access14, scope pio, type rw */201typedef struct {202unsigned int data : 8;203unsigned int dummy1 : 24;204} reg_pio_rw_io_access14;205#define REG_RD_ADDR_pio_rw_io_access14 56206#define REG_WR_ADDR_pio_rw_io_access14 56207208/* Register rw_io_access15, scope pio, type rw */209typedef struct {210unsigned int data : 8;211unsigned int dummy1 : 24;212} reg_pio_rw_io_access15;213#define REG_RD_ADDR_pio_rw_io_access15 60214#define REG_WR_ADDR_pio_rw_io_access15 60215216/* Register rw_ce0_cfg, scope pio, type rw */217typedef struct {218unsigned int lw : 6;219unsigned int ew : 3;220unsigned int zw : 3;221unsigned int aw : 2;222unsigned int mode : 2;223unsigned int dummy1 : 16;224} reg_pio_rw_ce0_cfg;225#define REG_RD_ADDR_pio_rw_ce0_cfg 68226#define REG_WR_ADDR_pio_rw_ce0_cfg 68227228/* Register rw_ce1_cfg, scope pio, type rw */229typedef struct {230unsigned int lw : 6;231unsigned int ew : 3;232unsigned int zw : 3;233unsigned int aw : 2;234unsigned int mode : 2;235unsigned int dummy1 : 16;236} reg_pio_rw_ce1_cfg;237#define REG_RD_ADDR_pio_rw_ce1_cfg 72238#define REG_WR_ADDR_pio_rw_ce1_cfg 72239240/* Register rw_ce2_cfg, scope pio, type rw */241typedef struct {242unsigned int lw : 6;243unsigned int ew : 3;244unsigned int zw : 3;245unsigned int aw : 2;246unsigned int mode : 2;247unsigned int dummy1 : 16;248} reg_pio_rw_ce2_cfg;249#define REG_RD_ADDR_pio_rw_ce2_cfg 76250#define REG_WR_ADDR_pio_rw_ce2_cfg 76251252/* Register rw_dout, scope pio, type rw */253typedef struct {254unsigned int data : 8;255unsigned int rd_n : 1;256unsigned int wr_n : 1;257unsigned int a0 : 1;258unsigned int a1 : 1;259unsigned int ce0_n : 1;260unsigned int ce1_n : 1;261unsigned int ce2_n : 1;262unsigned int rdy : 1;263unsigned int dummy1 : 16;264} reg_pio_rw_dout;265#define REG_RD_ADDR_pio_rw_dout 80266#define REG_WR_ADDR_pio_rw_dout 80267268/* Register rw_oe, scope pio, type rw */269typedef struct {270unsigned int data : 8;271unsigned int rd_n : 1;272unsigned int wr_n : 1;273unsigned int a0 : 1;274unsigned int a1 : 1;275unsigned int ce0_n : 1;276unsigned int ce1_n : 1;277unsigned int ce2_n : 1;278unsigned int rdy : 1;279unsigned int dummy1 : 16;280} reg_pio_rw_oe;281#define REG_RD_ADDR_pio_rw_oe 84282#define REG_WR_ADDR_pio_rw_oe 84283284/* Register rw_man_ctrl, scope pio, type rw */285typedef struct {286unsigned int data : 8;287unsigned int rd_n : 1;288unsigned int wr_n : 1;289unsigned int a0 : 1;290unsigned int a1 : 1;291unsigned int ce0_n : 1;292unsigned int ce1_n : 1;293unsigned int ce2_n : 1;294unsigned int rdy : 1;295unsigned int dummy1 : 16;296} reg_pio_rw_man_ctrl;297#define REG_RD_ADDR_pio_rw_man_ctrl 88298#define REG_WR_ADDR_pio_rw_man_ctrl 88299300/* Register r_din, scope pio, type r */301typedef struct {302unsigned int data : 8;303unsigned int rd_n : 1;304unsigned int wr_n : 1;305unsigned int a0 : 1;306unsigned int a1 : 1;307unsigned int ce0_n : 1;308unsigned int ce1_n : 1;309unsigned int ce2_n : 1;310unsigned int rdy : 1;311unsigned int dummy1 : 16;312} reg_pio_r_din;313#define REG_RD_ADDR_pio_r_din 92314315/* Register r_stat, scope pio, type r */316typedef struct {317unsigned int busy : 1;318unsigned int dummy1 : 31;319} reg_pio_r_stat;320#define REG_RD_ADDR_pio_r_stat 96321322/* Register rw_intr_mask, scope pio, type rw */323typedef struct {324unsigned int rdy : 1;325unsigned int dummy1 : 31;326} reg_pio_rw_intr_mask;327#define REG_RD_ADDR_pio_rw_intr_mask 100328#define REG_WR_ADDR_pio_rw_intr_mask 100329330/* Register rw_ack_intr, scope pio, type rw */331typedef struct {332unsigned int rdy : 1;333unsigned int dummy1 : 31;334} reg_pio_rw_ack_intr;335#define REG_RD_ADDR_pio_rw_ack_intr 104336#define REG_WR_ADDR_pio_rw_ack_intr 104337338/* Register r_intr, scope pio, type r */339typedef struct {340unsigned int rdy : 1;341unsigned int dummy1 : 31;342} reg_pio_r_intr;343#define REG_RD_ADDR_pio_r_intr 108344345/* Register r_masked_intr, scope pio, type r */346typedef struct {347unsigned int rdy : 1;348unsigned int dummy1 : 31;349} reg_pio_r_masked_intr;350#define REG_RD_ADDR_pio_r_masked_intr 112351352353/* Constants */354enum {355regk_pio_a2 = 0x00000003,356regk_pio_no = 0x00000000,357regk_pio_normal = 0x00000000,358regk_pio_rd = 0x00000001,359regk_pio_rw_ce0_cfg_default = 0x00000000,360regk_pio_rw_ce1_cfg_default = 0x00000000,361regk_pio_rw_ce2_cfg_default = 0x00000000,362regk_pio_rw_intr_mask_default = 0x00000000,363regk_pio_rw_man_ctrl_default = 0x00000000,364regk_pio_rw_oe_default = 0x00000000,365regk_pio_wr = 0x00000002,366regk_pio_wr_ce2 = 0x00000003,367regk_pio_yes = 0x00000001,368regk_pio_yes_all = 0x000000ff369};370#endif /* __pio_defs_h */371372373