Path: blob/master/arch/cris/include/arch-v32/mach-fs/mach/hwregs/config_defs.h
15207 views
#ifndef __config_defs_h1#define __config_defs_h23/*4* This file is autogenerated from5* file: ../../rtl/config_regs.r6* id: config_regs.r,v 1.23 2004/03/04 11:34:42 mikaeln Exp7* last modfied: Thu Mar 4 12:34:39 20048*9* by /n/asic/design/tools/rdesc/src/rdes2c --outfile config_defs.h ../../rtl/config_regs.r10* id: $Id: config_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $11* Any changes here will be lost.12*13* -*- buffer-read-only: t -*-14*/15/* Main access macros */16#ifndef REG_RD17#define REG_RD( scope, inst, reg ) \18REG_READ( reg_##scope##_##reg, \19(inst) + REG_RD_ADDR_##scope##_##reg )20#endif2122#ifndef REG_WR23#define REG_WR( scope, inst, reg, val ) \24REG_WRITE( reg_##scope##_##reg, \25(inst) + REG_WR_ADDR_##scope##_##reg, (val) )26#endif2728#ifndef REG_RD_VECT29#define REG_RD_VECT( scope, inst, reg, index ) \30REG_READ( reg_##scope##_##reg, \31(inst) + REG_RD_ADDR_##scope##_##reg + \32(index) * STRIDE_##scope##_##reg )33#endif3435#ifndef REG_WR_VECT36#define REG_WR_VECT( scope, inst, reg, index, val ) \37REG_WRITE( reg_##scope##_##reg, \38(inst) + REG_WR_ADDR_##scope##_##reg + \39(index) * STRIDE_##scope##_##reg, (val) )40#endif4142#ifndef REG_RD_INT43#define REG_RD_INT( scope, inst, reg ) \44REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )45#endif4647#ifndef REG_WR_INT48#define REG_WR_INT( scope, inst, reg, val ) \49REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )50#endif5152#ifndef REG_RD_INT_VECT53#define REG_RD_INT_VECT( scope, inst, reg, index ) \54REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \55(index) * STRIDE_##scope##_##reg )56#endif5758#ifndef REG_WR_INT_VECT59#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \60REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \61(index) * STRIDE_##scope##_##reg, (val) )62#endif6364#ifndef REG_TYPE_CONV65#define REG_TYPE_CONV( type, orgtype, val ) \66( { union { orgtype o; type n; } r; r.o = val; r.n; } )67#endif6869#ifndef reg_page_size70#define reg_page_size 819271#endif7273#ifndef REG_ADDR74#define REG_ADDR( scope, inst, reg ) \75( (inst) + REG_RD_ADDR_##scope##_##reg )76#endif7778#ifndef REG_ADDR_VECT79#define REG_ADDR_VECT( scope, inst, reg, index ) \80( (inst) + REG_RD_ADDR_##scope##_##reg + \81(index) * STRIDE_##scope##_##reg )82#endif8384/* C-code for register scope config */8586/* Register r_bootsel, scope config, type r */87typedef struct {88unsigned int boot_mode : 3;89unsigned int full_duplex : 1;90unsigned int user : 1;91unsigned int pll : 1;92unsigned int flash_bw : 1;93unsigned int dummy1 : 25;94} reg_config_r_bootsel;95#define REG_RD_ADDR_config_r_bootsel 09697/* Register rw_clk_ctrl, scope config, type rw */98typedef struct {99unsigned int pll : 1;100unsigned int cpu : 1;101unsigned int iop : 1;102unsigned int dma01_eth0 : 1;103unsigned int dma23 : 1;104unsigned int dma45 : 1;105unsigned int dma67 : 1;106unsigned int dma89_strcop : 1;107unsigned int bif : 1;108unsigned int fix_io : 1;109unsigned int dummy1 : 22;110} reg_config_rw_clk_ctrl;111#define REG_RD_ADDR_config_rw_clk_ctrl 4112#define REG_WR_ADDR_config_rw_clk_ctrl 4113114/* Register rw_pad_ctrl, scope config, type rw */115typedef struct {116unsigned int usb_susp : 1;117unsigned int phyrst_n : 1;118unsigned int dummy1 : 30;119} reg_config_rw_pad_ctrl;120#define REG_RD_ADDR_config_rw_pad_ctrl 8121#define REG_WR_ADDR_config_rw_pad_ctrl 8122123124/* Constants */125enum {126regk_config_bw16 = 0x00000000,127regk_config_bw32 = 0x00000001,128regk_config_master = 0x00000005,129regk_config_nand = 0x00000003,130regk_config_net_rx = 0x00000001,131regk_config_net_tx_rx = 0x00000002,132regk_config_no = 0x00000000,133regk_config_none = 0x00000007,134regk_config_nor = 0x00000000,135regk_config_rw_clk_ctrl_default = 0x00000002,136regk_config_rw_pad_ctrl_default = 0x00000000,137regk_config_ser = 0x00000004,138regk_config_slave = 0x00000006,139regk_config_yes = 0x00000001140};141#endif /* __config_defs_h */142143144