46 Netra CP2500 Board Programming Guide • March 2007

The ioctl supported commands are listed below:

Note that these ioctl commands are not supported:

Structures to Use in IOCTL Arguments

PROM Information Structure

The PROM information structure holds device information returnedby the driver in

response to an identify command.

#define UIOCIBLK (uflashIOC|0) /* identify */
#define UIOCQBLK (uflashIOC|1) /* query a block */
#define UIOCLBLK (uflashIOC|2) /* lock a block */
#define UIOCCLCK (uflashIOC|4) /* clear all locks */
#define UIOCEBLK (uflashIOC|5) /* erase a block */
#define UIOCMLCK (uflashIOC|3) /* master lock */
#define UIOCEALL (uflashIOC|6) /* erase all unlocked blocks */
#define UIOCEFUL (uflashIOC|7) /* erase full chip */
CODEEXAMPLE 3-1 PROM Information Structure
/*
* PROM info structure.
*/
typedef struct {
uint16_t mfr_id; /* manufacturer id */
uint16_t dev_id; /* device id */
/* allow future expansion */
int8_t blk_status[256]; /* blks status filled
by driver */
int32_t blk_num; /* total # of blocks */
int32_t blk_size; /* # of bytes per block */
} uflash_info_t;