dest = cmf_backdoor_address(addr);
while ((cnt>=4) && (rc == ERR_OK))
{
- data =*((volatile u32 *) src);
+ data = *((volatile u32 *) src);
*(volatile u32*) dest = data;
MCFCFM_CMD = MCFCFM_CMD_PGM;
MCFCFM_USTAT = MCFCFM_USTAT_CBEIF;
dest = addr;
while ((cnt>=2) && (rc == ERR_OK))
{
- data =*((volatile u16 *) src);
+ data = *((volatile u16 *) src);
rc=amd_write_word (info,dest,data);
src +=2;
dest +=2;
device_t kbddev ;
char *stdinname = getenv ("stdin");
- if(isa_kbd_init()==-1)
+ if(isa_kbd_init() == -1)
return -1;
memset (&kbddev, 0, sizeof(kbddev));
strcpy(kbddev.name, DEVNAME);
int val;
unsigned char status;
- val=-1;
+ val = -1;
status = kbd_read_status();
if (status & KBD_STAT_OBF) {
val = kbd_read_input();
uhci_td_t *td,*prevtd;
for(i=0;i<8;i++) {
- prevtd=&td_int[i]; /* the first previous td is the skeleton td */
+ prevtd = &td_int[i]; /* the first previous td is the skeleton td */
link=swap_32(td_int[i].link) & 0xfffffff0; /* next in chain */
td=(uhci_td_t *)link; /* assign it */
/* all interrupt TDs are finally linked to the td_int[0].
busdevfunc=pci_find_device(USB_UHCI_VEND_ID,USB_UHCI_DEV_ID,0); /* get PCI Device ID */
- if(busdevfunc==-1) {
+ if(busdevfunc == -1) {
printf("Error USB UHCI (%04X,%04X) not found\n",USB_UHCI_VEND_ID,USB_UHCI_DEV_ID);
return -1;
}
*/
int usb_lowlevel_stop(void)
{
- if(irqvec==-1)
+ if(irqvec == -1)
return 1;
irq_free_handler(irqvec);
irq_free_handler(0);
reset_hc();
- irqvec=-1;
+ irqvec = -1;
return 0;
}
for (cnt = STARTVAL/sizeof(long); cnt < maxsize/sizeof(long); cnt <<= 1) {
addr = base + cnt; /* pointer arith! */
- save1=*addr; /* save contents of addr */
- save2=*b; /* save contents of base */
+ save1 = *addr; /* save contents of addr */
+ save2 = *b; /* save contents of base */
*addr=cnt; /* write cnt to addr */
*b=0; /* put null at base */
int eth_len=0;
char *eth_data;
- eth0_rx_desc_single *rx=&p->eth_rx_desc[(p->rdn)];
+ eth0_rx_desc_single *rx = &p->eth_rx_desc[(p->rdn)];
INVALIDATE_DCACHE((unsigned int)rx,(unsigned int)(rx+1));
#ifdef DEBUG
unsigned int old_command_stat,old_psr;
#endif
- eth0_tx_desc_single *tx=&dev->eth_tx_desc[dev->tdn];
+ eth0_tx_desc_single *tx = &dev->eth_tx_desc[dev->tdn];
/* wait for tx to be ready */
INVALIDATE_DCACHE((unsigned int)tx,(unsigned int)(tx+1));
int
mpsc_test_char(void)
{
- volatile unsigned int *p=&rx_desc_base[rx_desc_index*8];
+ volatile unsigned int *p = &rx_desc_base[rx_desc_index*8];
INVALIDATE_DCACHE(&p[1], &p[2]);
unsigned long long result;
int rc = ERR_OK;
- result=*addr;
+ result = *addr;
if ((result & data) != data)
return ERR_NOT_ERASED;
eieio();
do {
- result=*addr;
+ result = *addr;
} while(~result & BIT_BUSY);
*addr=CMD_READ_ARRAY;
}
while(cnt>=8) {
- data=*((unsigned long long *)src);
+ data = *((unsigned long long *)src);
if ((rc = write_word(info, wp, data)) != 0)
return rc;
src+=8;
unsigned off;
uchar *name, *value;
- name=&name_buf[0];
- value=&value_buf[0];
+ name = &name_buf[0];
+ value = &value_buf[0];
len=size;
off = sizeof(long);
while (len > off) {
if(c == '\0')
break;
} while(len > off);
- name=&name_buf[0];
- value=&value_buf[0];
+ name = &name_buf[0];
+ value = &value_buf[0];
if(strncmp((char *)name,"baudrate",8)!=0) {
setenv((char *)name,(char *)value);
}
++s;
break;
}
- buf[i++]=*s;
+ buf[i++] = *s;
}
sprintf(&buf[i]," SN ");
i+=4;
for (; s < e; ++s) {
- buf[i++]=*s;
+ buf[i++] = *s;
}
buf[i++]=0;
}
unsigned long size_b1,flashcr,size_reg;
int mode;
extern char version_string;
- char *p=&version_string;
+ char *p = &version_string;
/* Since we are relocated, we can set-up the CS finally */
setup_cs_reloc();
int val;
unsigned char status;
- val=-1;
+ val = -1;
status = kbd_read_status();
if (status & KBD_STAT_OBF) {
val = kbd_read_input();
uhci_td_t *td,*prevtd;
for(i=0;i<8;i++) {
- prevtd=&td_int[i]; /* the first previous td is the skeleton td */
+ prevtd = &td_int[i]; /* the first previous td is the skeleton td */
link=swap_32(td_int[i].link) & 0xfffffff0; /* next in chain */
td=(uhci_td_t *)link; /* assign it */
/* all interrupt TDs are finally linked to the td_int[0].
return 1;
irq_free_handler(irqvec);
reset_hc();
- irqvec=-1;
+ irqvec = -1;
return 0;
}
psc->command = (PSC_RX_ENABLE | PSC_TX_ENABLE);
for(i = 0;i < (len / 4); i++) {
- swapped[3]=*wave_file++;
- swapped[2]=*wave_file++;
- swapped[1]=*wave_file++;
- swapped[0]=*wave_file++;
+ swapped[3] = *wave_file++;
+ swapped[2] = *wave_file++;
+ swapped[1] = *wave_file++;
+ swapped[0] = *wave_file++;
psc->psc_buffer_32 = *((unsigned long*)swapped);
while (psc->tfnum > 400) {
if(ctrlc())
if(readblk>blocks) /* is end within 1st track */
readblk=blocks; /* yes, correct it */
PRINTF("we read %ld blocks start %ld\n",readblk,pCMD->blnr);
- bufferw=&buffer[0]; /* setup working buffer */
+ bufferw = &buffer[0]; /* setup working buffer */
do {
retryrw:
len=sect_size * readblk;
* we need to get the results */
fdc_terminate(pCMD);
offset+=(sect_size*readblk); /* set up buffer pointer */
- bufferw=&buffer[offset];
+ bufferw = &buffer[offset];
pCMD->blnr+=readblk; /* update current block nr */
blocks-=readblk; /* update blocks */
if(blocks==0)
s_last [bank] = -1; /* last sector to erase */
}
- for (bank=0,info=&flash_info[0];
+ for (bank=0,info = &flash_info[0];
(bank < CFG_MAX_FLASH_BANKS) && (addr_first <= addr_last);
++bank, ++info) {
ulong b_end;
s_first, s_last, &planned );
if (planned && (rcode == 0)) {
- for (bank=0,info=&flash_info[0];
+ for (bank=0,info = &flash_info[0];
(bank < CFG_MAX_FLASH_BANKS) && (rcode == 0);
++bank, ++info) {
if (s_first[bank]>=0) {
protected = 0;
if (planned && (rcode == 0)) {
- for (bank=0,info=&flash_info[0]; bank < CFG_MAX_FLASH_BANKS; ++bank, ++info) {
+ for (bank=0,info = &flash_info[0]; bank < CFG_MAX_FLASH_BANKS; ++bank, ++info) {
if (info->flash_id == FLASH_UNKNOWN) {
continue;
}
length = (*dataptr << 8) + *(dataptr+1);
dataptr+=2;
for(i=0;i<length;i++)
- buffer[i]=*dataptr++;
+ buffer[i] = *dataptr++;
printf(" design filename = \"%s\"\n", buffer);
length = (*dataptr << 8) + *(dataptr+1);
dataptr+=2;
for(i=0;i<length;i++)
- buffer[i]=*dataptr++;
+ buffer[i] = *dataptr++;
printf(" part number = \"%s\"\n", buffer);
/* get date (identifier, length, string) */
length = (*dataptr << 8) + *(dataptr+1);
dataptr+=2;
for(i=0;i<length;i++)
- buffer[i]=*dataptr++;
+ buffer[i] = *dataptr++;
printf(" date = \"%s\"\n", buffer);
/* get time (identifier, length, string) */
length = (*dataptr << 8) + *(dataptr+1);
dataptr+=2;
for(i=0;i<length;i++)
- buffer[i]=*dataptr++;
+ buffer[i] = *dataptr++;
printf(" time = \"%s\"\n", buffer);
/* get fpga data length (identifier, length) */
if(scsi_max_devs>0)
scsi_curr_dev=0;
else
- scsi_curr_dev=-1;
+ scsi_curr_dev = -1;
}
#include <usb.h>
#ifdef CONFIG_USB_STORAGE
-static int usb_stor_curr_dev=-1; /* current device */
+static int usb_stor_curr_dev = -1; /* current device */
#endif
/* some display routines (info command) */
device_t *dev = NULL;
char temp_names[3][8];
- dev_index=-1;
+ dev_index = -1;
for (i=1; i<=ListNumItems(devlist); i++) {
dev = ListGetPtrToItem (devlist, i);
if(strcmp(dev->name,devname)==0) {
flash_info_t *info;
int i;
- for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
+ for (i=0, info = &flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
if (info->flash_id != FLASH_UNKNOWN &&
addr >= info->start[0] &&
/* WARNING - The '- 1' is needed if the flash
static int static_get(struct in_str *i)
{
- int ch=*i->p++;
+ int ch = *i->p++;
if (ch=='\0') return EOF;
return ch;
}
ch = 0;
/* If there is data waiting, eat it up */
if (i->p && *i->p) {
- ch=*i->p++;
+ ch = *i->p++;
} else {
/* need to double check i->file because we might be doing something
* more complicated by now, like sourcing or substituting. */
i->__promptme = 0;
#endif
if (i->p && *i->p) {
- ch=*i->p++;
+ ch = *i->p++;
}
#ifndef __U_BOOT__
} else {
WATCHDOG_RESET();
for (j = 0; j < width ; j++)
#if defined(CONFIG_PXA250)
- *(fb++)=*(bmap++);
+ *(fb++) = *(bmap++);
#elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200)
*(fb++)=255-*(bmap++);
#endif
for(i=0; i<dev->config.bNumInterfaces;i++) {
for(ii=0; ii<dev->config.if_desc[i].bNumEndpoints; ii++) {
- ep=&dev->config.if_desc[i].ep_desc[ii];
+ ep = &dev->config.if_desc[i].ep_desc[ii];
b=ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
if((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)==USB_ENDPOINT_XFER_CONTROL) { /* Control => bidirectional */
if (size <= 0 || !buf || !index)
return -1;
buf[0] = 0;
- tbuf=&mybuf[0];
+ tbuf = &mybuf[0];
/* get langid for strings if it's not yet known */
if (!dev->have_langid) {
/* first make all devices unknown */
for(i=0;i<USB_MAX_DEVICE;i++) {
memset(&usb_dev[i],0,sizeof(struct usb_device));
- usb_dev[i].devnum=-1;
+ usb_dev[i].devnum = -1;
}
dev_index=0;
/* device 0 is always present (root hub, so let it analyze) */
return -1;
}
printf(" report descriptor (size %u, read %d)\n", len, index);
- start=&buffer[0];
- end=&buffer[len];
+ start = &buffer[0];
+ end = &buffer[len];
i=0;
do {
index=fetch_item(start,end,&item);
ccb reqsrb;
int retry,notready;
- psrb=&reqsrb;
+ psrb = &reqsrb;
status=USB_STOR_TRANSPORT_GOOD;
retry=0;
notready=0;
psrb->cmd[1]=srb->lun<<5;
psrb->cmd[4]=18;
psrb->datalen=18;
- psrb->pdata=&srb->sense_buf[0];
+ psrb->pdata = &srb->sense_buf[0];
psrb->cmdlen=12;
/* issue the command */
result=usb_stor_CB_comdat(psrb,us);
srb->cmd[1]=srb->lun<<5;
srb->cmd[4]=18;
srb->datalen=18;
- srb->pdata=&srb->sense_buf[0];
+ srb->pdata = &srb->sense_buf[0];
srb->cmdlen=12;
ss->transport(srb,ss);
USB_STOR_PRINTF("Request Sense returned %02X %02X %02X\n",srb->sense_buf[2],srb->sense_buf[12],srb->sense_buf[13]);
int sdram0_pmit=0x07c00000;
#ifndef CONFIG_405EP /* not on PPC405EP */
- int sdram0_besr0=-1;
- int sdram0_besr1=-1;
- int sdram0_eccesr=-1;
+ int sdram0_besr0 = -1;
+ int sdram0_besr1 = -1;
+ int sdram0_eccesr = -1;
#endif
int sdram0_ecccfg;
pccb->msgout[0]=SCSI_IDENTIFY;
transbytes=pccb->trans_bytes;
tmpptr=pccb->pdata;
- pccb->pdata=&pccb->sense_buf[0];
+ pccb->pdata = &pccb->sense_buf[0];
datalen=pccb->datalen;
pccb->datalen=14;
tmpstat=pccb->status;
int val;
unsigned char status;
- val=-1;
+ val = -1;
status = kbd_read_status();
if (status & KBD_STAT_OBF) {
val = kbd_read_input();
pci_dev_t dev = PCI_BDF(busno,0,0);
/* Initialize ATMU registers based on hose regions and flags */
- volatile pot_t *po=&pci->pot[1]; /* skip 0 */
- volatile pit_t *pi=&pci->pit[0]; /* ranges from: 3 to 1 */
+ volatile pot_t *po = &pci->pot[1]; /* skip 0 */
+ volatile pit_t *pi = &pci->pit[0]; /* ranges from: 3 to 1 */
#ifdef DEBUG
int neg_link_w;
erased = 0;
- for (bank=0,info=&flash_info[0]; bank < CFG_MAX_FLASH_BANKS; ++bank, ++info) {
+ for (bank=0,info = &flash_info[0]; bank < CFG_MAX_FLASH_BANKS; ++bank, ++info) {
ulong b_end;
int sect;
protected = 0;
- for (bank=0,info=&flash_info[0]; bank < CFG_MAX_FLASH_BANKS; ++bank, ++info) {
+ for (bank=0,info = &flash_info[0]; bank < CFG_MAX_FLASH_BANKS; ++bank, ++info) {
ulong b_end;
int sect;
flash_info_t *info;
int i;
- for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
+ for (i=0, info = &flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
if (info->flash_id != FLASH_UNKNOWN &&
addr >= info->start[0] &&
/* WARNING - The '- 1' is needed if the flash