Searched refs:fh (Results 1 - 15 of 15) sorted by path

/broadcom-cfe-1.4.2/cfe/arch/mips/board/bcm91125e/src/
H A Dbcm91125e_devs.c367 int fh; local
406 fh = cfe_open("eeprom2");
407 if (fh <= 0) {
408 xprintf("Could not open device: %s\n",cfe_errortext(fh));
410 return fh;
413 res = cfe_writeblk(fh,0,PTR2HSADDR(spd),JEDEC_SPD_SIZE);
415 xprintf("Could not write to device: %s\n",cfe_errortext(fh));
417 return fh;
423 cfe_close(fh);
H A Dbcm91125e_tests.c86 int fh; local
115 fh = cfe_open(dev);
116 if (fh < 0) {
117 xprintf("Could not open device: %s\n",cfe_errortext(fh));
118 return fh;
131 cfe_ioctl(fh,IOCTL_ETHER_SETPACKETFIFO, (uint8_t *) &fifo_mode, sizeof(fifo_mode),NULL,0);
143 cfe_ioctl(fh,IOCTL_ETHER_SETSTROBESIG, (uint8_t *)&strobe,sizeof(strobe),NULL,0);
149 cfe_ioctl(fh,IOCTL_ETHER_SETLOOPBACK, (uint8_t *) &loopback, sizeof(loopback),NULL,0);
186 res = cfe_write(fh,PTR2HSADDR(tx_packet),pktsize);
191 res = cfe_read(fh,PTR2HSADD
[all...]
/broadcom-cfe-1.4.2/cfe/arch/mips/board/bcm91125f/src/
H A Dbcm91125f_devs.c317 int fh;
356 fh = cfe_open("eeprom1");
357 if (fh <= 0) {
358 xprintf("Could not open device: %s\n",cfe_errortext(fh));
360 return fh;
363 res = cfe_writeblk(fh,0,spd,JEDEC_SPD_SIZE);
365 xprintf("Could not write to device: %s\n",cfe_errortext(fh));
367 return fh;
373 cfe_close(fh);
/broadcom-cfe-1.4.2/cfe/arch/mips/board/sentosa/src/
H A Dsentosa_test.c101 int fh; local
130 fh = cfe_open(dev);
131 if (fh < 0) {
132 xprintf("Could not open device: %s\n",cfe_errortext(fh));
133 return fh;
146 cfe_ioctl(fh,IOCTL_ETHER_SETPACKETFIFO, (uint8_t *) &fifo_mode, sizeof(fifo_mode),NULL,0);
158 cfe_ioctl(fh,IOCTL_ETHER_SETSTROBESIG, (uint8_t *)&strobe,sizeof(strobe),NULL,0);
164 cfe_ioctl(fh,IOCTL_ETHER_SETLOOPBACK, (uint8_t *) &loopback, sizeof(loopback),NULL,0);
201 res = cfe_write(fh,tx_packet,pktsize);
206 res = cfe_read(fh,rx_packe
[all...]
/broadcom-cfe-1.4.2/cfe/arch/mips/chipset/sibyte/src/
H A Dcfe_tests.c109 int fh; local
177 fh = cfe_open(tok);
178 if (fh < 0) {
179 xprintf("Could not open device: %s\n", cfe_errortext(fh));
180 return fh;
183 res = cfe_write(fh, PTR2HSADDR((unsigned char *)base), len);
188 cfe_close(fh);
/broadcom-cfe-1.4.2/cfe/hosttools/
H A Ddocprep.c25 int fh; local
41 fh = open(argv[1],O_RDONLY);
42 if (fh < 0) {
46 totalsize = lseek(fh,0L,SEEK_END);
47 lseek(fh,0L,SEEK_SET);
55 if (read(fh,image, totalsize) != totalsize) {
60 close(fh);
66 fh = open(argv[2],O_RDWR |O_CREAT |O_TRUNC,
68 if (fh < 0) {
73 if (write(fh,imag
[all...]
H A Dinstallboot.c191 int fh; local
268 fh = open(argv[1],O_RDONLY);
269 if (fh < 0) {
273 bootsize = lseek(fh,0L,SEEK_END);
274 lseek(fh,0L,SEEK_SET);
284 if (read(fh,bootcode,bootsize) != bootsize) {
289 close(fh);
320 fh = open(argv[2],O_RDWR|O_CREAT,S_IREAD|S_IWRITE);
321 if (fh < 0) {
327 if (lseek(fh, bootsect_offse
[all...]
H A Dmkbootimage.c175 int fh; local
237 fh = open(argv[1],O_RDONLY);
238 if (fh < 0) {
242 bootsize = lseek(fh,0L,SEEK_END);
243 lseek(fh,0L,SEEK_SET);
253 if (read(fh,bootcode,bootsize) != bootsize) {
258 close(fh);
289 fh = open(argv[2],O_RDWR|O_CREAT,S_IREAD|S_IWRITE);
290 if (fh < 0) {
294 if (lseek(fh, sector_offse
[all...]
H A Dmkflashimage.c130 int fh; local
217 fh = open(argv[2],O_RDONLY|O_BINARY);
218 if (fh < 0) {
222 flashsize = lseek(fh,0L,SEEK_END);
223 lseek(fh,0L,SEEK_SET);
232 if (read(fh,flashcode+CFE_BIENDIAN_LE_OFFSET,flashsize) != flashsize) {
237 close(fh);
248 fh = open(argv[1],O_RDONLY|O_BINARY);
249 if (fh < 0) {
254 be_size = lseek(fh,
[all...]
H A Dswapflashimage.c150 int fh; local
201 fh = open(argv[1],O_RDONLY|O_BINARY);
202 if (fh < 0) {
206 flashsize = lseek(fh,0L,SEEK_END);
207 lseek(fh,0L,SEEK_SET);
209 if (read(fh,&header,sizeof(header)) != sizeof(header)) {
231 if (read(fh,flashcode,flashsize) != flashsize) {
236 close(fh);
275 fh = open(outfile,O_RDWR|O_CREAT|O_TRUNC,S_IREAD|S_IWRITE|S_IRGRP|S_IWGRP|S_IROTH|O_BINARY);
276 if (fh <
[all...]
/broadcom-cfe-1.4.2/cfe/ui/
H A Dui_flash.c241 int fh; local
448 fh = cfe_open(flashdev);
449 if (fh < 0) {
454 if (cfe_ioctl(fh,IOCTL_FLASH_GETINFO,
461 cfe_close(fh);
490 cfe_ioctl(fh,IOCTL_FLASH_WRITE_ALL, ptr,copysize,&retlen,0);
514 if (cfe_ioctl(fh,IOCTL_FLASH_ERASE_RANGE,
517 cfe_close(fh);
529 amtcopy = cfe_writeblk(fh,offset,PTR2HSADDR(ptr),copysize);
544 cfe_close(fh);
[all...]
H A Dui_robo.c84 int page, reg, len, i, offset, fh, bytes, devno; local
104 fh = cfe_open(fname);
105 if (fh < 0) {
106 return ui_showerror(fh,"Could not open RoboSwitch device");
110 bytes = cfe_readblk(fh,offset,PTR2HSADDR(buf),len);
112 cfe_close(fh);
129 int page, reg, len, fh, offset, bytes, devno; local
158 fh = cfe_open(fname);
159 if (fh < 0) {
160 return ui_showerror(fh,"Coul
[all...]
H A Dui_tcpcmds.c628 int fh; local
635 fh = cfe_open(x);
636 if (fh < 0) return ui_showerror(fh,"Could not open device %s",x);
640 res = cfe_read(fh,PTR2HSADDR(data),sizeof(data));
648 cfe_close(fh);
H A Dui_test_disk.c120 int fh; local
136 fh = cfe_open(tok);
137 if (fh < 0) {
138 xprintf("Could not open device; %d\n",fh);
142 res = cfe_readblk(fh,sec * BOOT_BLOCK_BLOCKSIZE,
151 cfe_close(fh);
185 res = cfe_readblk(fh,secoffset,PTR2HSADDR(code),secsize);
188 cfe_close(fh);
204 cfe_close(fh);
271 int fh; local
333 int fh; local
[all...]
H A Dui_test_ether.c111 int fh; local
131 fh = cfe_open(tok);
132 if (fh < 0) {
133 xprintf("Could not open device: %s\n",cfe_errortext(fh));
134 return fh;
139 cfe_ioctl(fh,IOCTL_ETHER_SETSPEED,(uint8_t *) &speed,sizeof(speed),&idx,0);
149 res = cfe_write(fh,PTR2HSADDR(packet),128);
155 cfe_close(fh);
161 res = cfe_read(fh,PTR2HSADDR(packet),sizeof(packet));
186 cfe_close(fh);
[all...]

Completed in 64 milliseconds