Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / hp700 / stand / common / dev_hppa.h
blob267448839da4f0c3e4235aa2fc872a5274759852
1 /* $NetBSD: dev_hppa.h,v 1.4 2005/12/11 12:17:25 christos Exp $ */
3 /* $OpenBSD: dev_hppa.h,v 1.3 1999/04/20 20:01:01 mickey Exp $ */
6 #define IOPGSHIFT 11
7 #define IONBPG (1 << IOPGSHIFT)
8 #define IOPGOFSET (IONBPG - 1)
10 struct disklabel;
11 struct hppa_dev {
12 btdev_t bootdev;
13 struct pz_device *pz_dev; /* device descriptor */
14 u_long last_blk; /* byte offset for last read blk */
15 size_t last_read; /* amount read last time */
16 u_long part_off; /* byte offset of boot partition */
17 /* buffer to cache data (aligned properly) */
18 char *buf;
19 char ua_buf[IODC_MAXIOSIZ + IODC_MINIOSIZ];
23 #ifdef PDCDEBUG
24 #define DEVPATH_PRINT(dp) \
25 printf("%x, %d.%d.%d.%d.%d.%d, 0x%x, %x.%x.%x.%x.%x.%x\n", \
26 (dp)->dp_flags, (dp)->dp_bc[0], (dp)->dp_bc[1], (dp)->dp_bc[2], \
27 (dp)->dp_bc[3], (dp)->dp_bc[4], (dp)->dp_bc[5], (dp)->dp_mod, \
28 (dp)->dp_layers[0], (dp)->dp_layers[1], (dp)->dp_layers[2], \
29 (dp)->dp_layers[3], (dp)->dp_layers[4], (dp)->dp_layers[5]);
30 #define PZDEV_PRINT(dp) \
31 printf("devpath={%x, %d.%d.%d.%d.%d.%d, 0x%x, %x.%x.%x.%x.%x.%x}," \
32 "\n\thpa=%p, spa=%p, io=%p, class=%u\n", \
33 (dp)->pz_flags, (dp)->pz_bc[0], (dp)->pz_bc[1], (dp)->pz_bc[2], \
34 (dp)->pz_bc[3], (dp)->pz_bc[4], (dp)->pz_bc[5], (dp)->pz_mod, \
35 (dp)->pz_layers[0], (dp)->pz_layers[1], (dp)->pz_layers[2], \
36 (dp)->pz_layers[3], (dp)->pz_layers[4], (dp)->pz_layers[5], \
37 (dp)->pz_hpa, (dp)->pz_spa, (dp)->pz_iodc_io, (dp)->pz_class);
38 #endif
40 extern pdcio_t pdc;
41 extern int pdcbuf[]; /* PDC returns, pdc.c */
42 extern struct pz_device ctdev; /* cartridge tape (boot) device path */
44 int iodc_rw(char *, u_int, u_int, int func, struct pz_device *);