Big white-space cleanup.

This commit gets rid of a huge amount of silly white-space issues.
Especially, all sequences of SPACEs followed by TAB characters get
removed (unless they appear in print statements).

Also remove all embedded "vim:" and "vi:" statements which hide
indentation problems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
Wolfgang Denk 2008-05-20 16:00:29 +02:00
parent 727f633346
commit 53677ef18e
1010 changed files with 13324 additions and 13313 deletions

View file

@ -71,7 +71,7 @@ __asm__(" .globl send_kb \n "
" li r3, 0x01 \n " " li r3, 0x01 \n "
" bl send_kb \n " " bl send_kb \n "
" mtlr r10 \n " " mtlr r10 \n "
" blr " " blr \n "
); );

View file

@ -379,14 +379,12 @@ static int auto_negotiate(struct eth_device* dev)
EL3WINDOW (dev, 1); EL3WINDOW (dev, 1);
/* Wait for Auto negotiation to complete */ /* Wait for Auto negotiation to complete */
for (i = 0; i <= 1000; i++) for (i = 0; i <= 1000; i++) {
{
if (ETH_INW (dev, 2) & 0x04) if (ETH_INW (dev, 2) & 0x04)
break; break;
udelay (100); udelay (100);
if (i == 1000) if (i == 1000) {
{
PRINTF ("Error: Auto negotiation failed\n"); PRINTF ("Error: Auto negotiation failed\n");
return 0; return 0;
} }
@ -405,20 +403,17 @@ void eth_interrupt(struct eth_device *dev)
if (!(status & IntLatch)) if (!(status & IntLatch))
return; return;
if (status & (1<<6)) if (status & (1 << 6)) {
{
ETH_CMD (dev, AckIntr | (1 << 6)); ETH_CMD (dev, AckIntr | (1 << 6));
printf ("Acknowledged Interrupt command\n"); printf ("Acknowledged Interrupt command\n");
} }
if (status & DownComplete) if (status & DownComplete) {
{
ETH_CMD (dev, AckIntr | DownComplete); ETH_CMD (dev, AckIntr | DownComplete);
printf ("Acknowledged DownComplete\n"); printf ("Acknowledged DownComplete\n");
} }
if (status & UpComplete) if (status & UpComplete) {
{
ETH_CMD (dev, AckIntr | UpComplete); ETH_CMD (dev, AckIntr | UpComplete);
printf ("Acknowledged UpComplete\n"); printf ("Acknowledged UpComplete\n");
} }
@ -439,16 +434,18 @@ int eth_3com_initialize(bd_t *bis)
/* Find ethernet controller on the PCI bus */ /* Find ethernet controller on the PCI bus */
if ((devno = pci_find_device(PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C, 0)) < 0) if ((devno =
{ pci_find_device (PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C,
0)) < 0) {
PRINTF ("Error: Cannot find the ethernet device on the PCI bus\n"); PRINTF ("Error: Cannot find the ethernet device on the PCI bus\n");
goto Done; goto Done;
} }
if (s) if (s) {
{
unsigned long base = atoi (s); unsigned long base = atoi (s);
pci_write_config_dword(devno, PCI_BASE_ADDRESS_0, base | 0x01);
pci_write_config_dword (devno, PCI_BASE_ADDRESS_0,
base | 0x01);
} }
ret = pci_read_config_dword (devno, PCI_BASE_ADDRESS_0, &eth_iobase); ret = pci_read_config_dword (devno, PCI_BASE_ADDRESS_0, &eth_iobase);
@ -456,26 +453,25 @@ int eth_3com_initialize(bd_t *bis)
PRINTF ("eth: 3Com Found at Address: 0x%x\n", eth_iobase); PRINTF ("eth: 3Com Found at Address: 0x%x\n", eth_iobase);
pci_write_config_dword(devno, PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); pci_write_config_dword (devno, PCI_COMMAND,
PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER);
/* Check if I/O accesses and Bus Mastering are enabled */ /* Check if I/O accesses and Bus Mastering are enabled */
ret = pci_read_config_dword (devno, PCI_COMMAND, &status); ret = pci_read_config_dword (devno, PCI_COMMAND, &status);
if (!(status & PCI_COMMAND_IO)) if (!(status & PCI_COMMAND_IO)) {
{
printf ("Error: Cannot enable IO access.\n"); printf ("Error: Cannot enable IO access.\n");
goto Done; goto Done;
} }
if (!(status & PCI_COMMAND_MEMORY)) if (!(status & PCI_COMMAND_MEMORY)) {
{
printf ("Error: Cannot enable MEMORY access.\n"); printf ("Error: Cannot enable MEMORY access.\n");
goto Done; goto Done;
} }
if (!(status & PCI_COMMAND_MASTER)) if (!(status & PCI_COMMAND_MASTER)) {
{
printf ("Error: Cannot enable Bus Mastering.\n"); printf ("Error: Cannot enable Bus Mastering.\n");
goto Done; goto Done;
} }
@ -505,35 +501,31 @@ int eth_3com_initialize(bd_t *bis)
/* Set the latency timer for value */ /* Set the latency timer for value */
s = getenv ("3com_latency"); s = getenv ("3com_latency");
if (s) if (s) {
{ ret = pci_write_config_byte (devno, PCI_LATENCY_TIMER,
ret = pci_write_config_byte(devno, PCI_LATENCY_TIMER, (unsigned char)atoi(s)); (unsigned char) atoi (s));
} } else
else ret = pci_write_config_byte(devno, PCI_LATENCY_TIMER, 0x0a); ret = pci_write_config_byte (devno, PCI_LATENCY_TIMER, 0x0a);
read_hw_addr (dev, bis); /* get the MAC address from Window 2 */ read_hw_addr (dev, bis); /* get the MAC address from Window 2 */
/* Reset the ethernet controller */ /* Reset the ethernet controller */
PRINTF ("Issuing reset command....\n"); PRINTF ("Issuing reset command....\n");
if (!issue_and_wait(dev, TotalReset)) if (!issue_and_wait (dev, TotalReset)) {
{
printf ("Error: Cannot reset ethernet controller.\n"); printf ("Error: Cannot reset ethernet controller.\n");
goto Done; goto Done;
} } else
else
PRINTF ("Ethernet controller reset.\n"); PRINTF ("Ethernet controller reset.\n");
/* allocate memory for rx and tx rings */ /* allocate memory for rx and tx rings */
if(!(rx_ring = memalign(sizeof(struct rx_desc_3com) * NUM_RX_DESC, 16))) if (!(rx_ring = memalign (sizeof (struct rx_desc_3com) * NUM_RX_DESC, 16))) {
{
PRINTF ("Cannot allocate memory for RX_RING.....\n"); PRINTF ("Cannot allocate memory for RX_RING.....\n");
goto Done; goto Done;
} }
if (!(tx_ring = memalign(sizeof(struct tx_desc_3com) * NUM_TX_DESC, 16))) if (!(tx_ring = memalign (sizeof (struct tx_desc_3com) * NUM_TX_DESC, 16))) {
{
PRINTF ("Cannot allocate memory for TX_RING.....\n"); PRINTF ("Cannot allocate memory for TX_RING.....\n");
goto Done; goto Done;
} }
@ -553,8 +545,7 @@ static int eth_3com_init(struct eth_device* dev, bd_t *bis)
/* Determine what type of network the machine is connected to */ /* Determine what type of network the machine is connected to */
/* presently drops the connect to 10Mbps */ /* presently drops the connect to 10Mbps */
if (!auto_negotiate(dev)) if (!auto_negotiate (dev)) {
{
printf ("Error: Cannot determine network media.\n"); printf ("Error: Cannot determine network media.\n");
goto Done; goto Done;
} }
@ -576,7 +567,9 @@ static int eth_3com_init(struct eth_device* dev, bd_t *bis)
/* Below sets which indication bits to be seen. */ /* Below sets which indication bits to be seen. */
status_enable = SetStatusEnb | HostError | DownComplete | UpComplete | (1<<6); status_enable =
SetStatusEnb | HostError | DownComplete | UpComplete | (1 <<
6);
ETH_CMD (dev, status_enable); ETH_CMD (dev, status_enable);
/* Below sets no bits are to cause an interrupt since this is just polling */ /* Below sets no bits are to cause an interrupt since this is just polling */
@ -615,24 +608,21 @@ static int eth_3com_init(struct eth_device* dev, bd_t *bis)
issue_and_wait (dev, DownStall); /* Stall and set the DownListPtr. */ issue_and_wait (dev, DownStall); /* Stall and set the DownListPtr. */
ETH_OUTL (dev, (u32) & tx_ring[tx_cur], DownListPtr); ETH_OUTL (dev, (u32) & tx_ring[tx_cur], DownListPtr);
issue_and_wait (dev, DownUnstall); issue_and_wait (dev, DownUnstall);
for (i=0; !(ETH_STATUS(dev) & DownComplete); i++) for (i = 0; !(ETH_STATUS (dev) & DownComplete); i++) {
{ if (i >= TOUT_LOOP) {
if (i >= TOUT_LOOP) PRINTF ("TX Ring status (Init): 0x%4x\n",
{ le32_to_cpu (tx_ring[tx_cur].status));
PRINTF("TX Ring status (Init): 0x%4x\n", le32_to_cpu(tx_ring[tx_cur].status));
PRINTF ("ETH_STATUS: 0x%x\n", ETH_STATUS (dev)); PRINTF ("ETH_STATUS: 0x%x\n", ETH_STATUS (dev));
goto Done; goto Done;
} }
} }
if (ETH_STATUS(dev) & DownComplete) /* If DownLoad Complete ACK the bit */ if (ETH_STATUS (dev) & DownComplete) { /* If DownLoad Complete ACK the bit */
{
ETH_CMD (dev, AckIntr | DownComplete); /* acknowledge the indication bit */ ETH_CMD (dev, AckIntr | DownComplete); /* acknowledge the indication bit */
issue_and_wait (dev, DownStall); /* stall and clear DownListPtr */ issue_and_wait (dev, DownStall); /* stall and clear DownListPtr */
ETH_OUTL (dev, 0, DownListPtr); ETH_OUTL (dev, 0, DownListPtr);
issue_and_wait (dev, DownUnstall); issue_and_wait (dev, DownUnstall);
} }
status = 1; status = 1;
Done: Done:
return status; return status;
} }
@ -642,8 +632,7 @@ int eth_3com_send(struct eth_device* dev, volatile void *packet, int length)
int i, status = 0; int i, status = 0;
int tx_cur; int tx_cur;
if (length <= 0) if (length <= 0) {
{
PRINTF ("eth: bad packet size: %d\n", length); PRINTF ("eth: bad packet size: %d\n", length);
goto Done; goto Done;
} }
@ -662,16 +651,14 @@ int eth_3com_send(struct eth_device* dev, volatile void *packet, int length)
ETH_OUTL (dev, (u32) & tx_ring[tx_cur], DownListPtr); ETH_OUTL (dev, (u32) & tx_ring[tx_cur], DownListPtr);
issue_and_wait (dev, DownUnstall); issue_and_wait (dev, DownUnstall);
for (i=0; !(ETH_STATUS(dev) & DownComplete); i++) for (i = 0; !(ETH_STATUS (dev) & DownComplete); i++) {
{ if (i >= TOUT_LOOP) {
if (i >= TOUT_LOOP) PRINTF ("TX Ring status (send): 0x%4x\n",
{ le32_to_cpu (tx_ring[tx_cur].status));
PRINTF("TX Ring status (send): 0x%4x\n", le32_to_cpu(tx_ring[tx_cur].status));
goto Done; goto Done;
} }
} }
if (ETH_STATUS(dev) & DownComplete) /* If DownLoad Complete ACK the bit */ if (ETH_STATUS (dev) & DownComplete) { /* If DownLoad Complete ACK the bit */
{
ETH_CMD (dev, AckIntr | DownComplete); /* acknowledge the indication bit */ ETH_CMD (dev, AckIntr | DownComplete); /* acknowledge the indication bit */
issue_and_wait (dev, DownStall); /* stall and clear DownListPtr */ issue_and_wait (dev, DownStall); /* stall and clear DownListPtr */
ETH_OUTL (dev, 0, DownListPtr); ETH_OUTL (dev, 0, DownListPtr);
@ -689,8 +676,7 @@ uchar *ptr;
printf ("Printing packet of length %x.\n\n", length); printf ("Printing packet of length %x.\n\n", length);
ptr = packet; ptr = packet;
for (loop = 1; loop <= length; loop++) for (loop = 1; loop <= length; loop++) {
{
printf ("%2x ", *ptr++); printf ("%2x ", *ptr++);
if ((loop % 40) == 0) if ((loop % 40) == 0)
printf ("\n"); printf ("\n");
@ -708,26 +694,23 @@ int eth_3com_recv(struct eth_device* dev)
status = le32_to_cpu (rx_ring[rx_next].status); /* packet status */ status = le32_to_cpu (rx_ring[rx_next].status); /* packet status */
while (status & (1<<15)) while (status & (1 << 15)) {
{
/* A packet has been received */ /* A packet has been received */
if (status & (1<<15)) if (status & (1 << 15)) {
{
/* A valid frame received */ /* A valid frame received */
length = le32_to_cpu (rx_ring[rx_next].status) & 0x1fff; /* length is in bits 0 - 12 */ length = le32_to_cpu (rx_ring[rx_next].status) & 0x1fff; /* length is in bits 0 - 12 */
/* Pass the packet up to the protocol layers */ /* Pass the packet up to the protocol layers */
NetReceive((uchar *)le32_to_cpu(rx_ring[rx_next].addr), length); NetReceive ((uchar *)
le32_to_cpu (rx_ring[rx_next].addr),
length);
rx_ring[rx_next].status = 0; /* clear the status word */ rx_ring[rx_next].status = 0; /* clear the status word */
ETH_CMD (dev, AckIntr | UpComplete); ETH_CMD (dev, AckIntr | UpComplete);
issue_and_wait (dev, UpUnstall); issue_and_wait (dev, UpUnstall);
} } else if (stat & HostError) {
else
if (stat & HostError)
{
/* There was an error */ /* There was an error */
printf ("Rx error status: 0x%4x\n", stat); printf ("Rx error status: 0x%4x\n", stat);
@ -740,15 +723,13 @@ int eth_3com_recv(struct eth_device* dev)
stat = ETH_STATUS (dev); /* register status */ stat = ETH_STATUS (dev); /* register status */
status = le32_to_cpu (rx_ring[rx_next].status); /* packet status */ status = le32_to_cpu (rx_ring[rx_next].status); /* packet status */
} }
Done: Done:
return length; return length;
} }
void eth_3com_halt (struct eth_device *dev) void eth_3com_halt (struct eth_device *dev)
{ {
if (!(dev->iobase)) if (!(dev->iobase)) {
{
goto Done; goto Done;
} }
@ -771,9 +752,10 @@ static void init_rx_ring(struct eth_device* dev)
PRINTF ("Initializing rx_ring. rx_buffer = %p\n", rx_buffer); PRINTF ("Initializing rx_ring. rx_buffer = %p\n", rx_buffer);
issue_and_wait (dev, UpStall); issue_and_wait (dev, UpStall);
for (i = 0; i < NUM_RX_DESC; i++) for (i = 0; i < NUM_RX_DESC; i++) {
{ rx_ring[i].next =
rx_ring[i].next = cpu_to_le32(((u32) &rx_ring[(i+1) % NUM_RX_DESC])); cpu_to_le32 (((u32) &
rx_ring[(i + 1) % NUM_RX_DESC]));
rx_ring[i].status = 0; rx_ring[i].status = 0;
rx_ring[i].addr = cpu_to_le32 (((u32) & rx_buffer[i][0])); rx_ring[i].addr = cpu_to_le32 (((u32) & rx_buffer[i][0]));
rx_ring[i].length = cpu_to_le32 (PKTSIZE_ALIGN | LAST_FRAG); rx_ring[i].length = cpu_to_le32 (PKTSIZE_ALIGN | LAST_FRAG);
@ -789,8 +771,7 @@ static void purge_tx_ring(struct eth_device* dev)
tx_next = 0; tx_next = 0;
for (i = 0; i < NUM_TX_DESC; i++) for (i = 0; i < NUM_TX_DESC; i++) {
{
tx_ring[i].next = 0; tx_ring[i].next = 0;
tx_ring[i].status = 0; tx_ring[i].status = 0;
tx_ring[i].addr = 0; tx_ring[i].addr = 0;
@ -808,12 +789,10 @@ static void read_hw_addr(struct eth_device* dev, bd_t *bis)
/* Read the station address from the EEPROM. */ /* Read the station address from the EEPROM. */
EL3WINDOW (dev, 0); EL3WINDOW (dev, 0);
for (i = 0; i < 0x40; i++) for (i = 0; i < 0x40; i++) {
{
ETH_OUTW (dev, EEPROM_Read + i, Wn0EepromCmd); ETH_OUTW (dev, EEPROM_Read + i, Wn0EepromCmd);
/* Pause for at least 162 us. for the read to take place. */ /* Pause for at least 162 us. for the read to take place. */
for (timer = 10; timer >= 0; timer--) for (timer = 10; timer >= 0; timer--) {
{
udelay (162); udelay (162);
if ((ETH_INW (dev, Wn0EepromCmd) & 0x8000) == 0) if ((ETH_INW (dev, Wn0EepromCmd) & 0x8000) == 0)
break; break;
@ -828,10 +807,10 @@ static void read_hw_addr(struct eth_device* dev, bd_t *bis)
checksum = (checksum ^ (checksum >> 8)) & 0xff; checksum = (checksum ^ (checksum >> 8)) & 0xff;
if (checksum != 0xbb) if (checksum != 0xbb)
printf(" *** INVALID EEPROM CHECKSUM %4.4x *** \n", checksum); printf (" *** INVALID EEPROM CHECKSUM %4.4x *** \n",
checksum);
for (i = 0, j = 0; i < 3; i++) for (i = 0, j = 0; i < 3; i++) {
{
hw_addr[j++] = (u8) ((eeprom[i + 10] >> 8) & 0xff); hw_addr[j++] = (u8) ((eeprom[i + 10] >> 8) & 0xff);
hw_addr[j++] = (u8) (eeprom[i + 10] & 0xff); hw_addr[j++] = (u8) (eeprom[i + 10] & 0xff);
} }
@ -842,16 +821,13 @@ static void read_hw_addr(struct eth_device* dev, bd_t *bis)
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
ETH_OUTB (dev, hw_addr[i], i); ETH_OUTB (dev, hw_addr[i], i);
for (j = 0; j < ETH_ALEN; j+=2) for (j = 0; j < ETH_ALEN; j += 2) {
{
hw_addr[j] = (u8) (ETH_INW (dev, j) & 0xff); hw_addr[j] = (u8) (ETH_INW (dev, j) & 0xff);
hw_addr[j + 1] = (u8) ((ETH_INW (dev, j) >> 8) & 0xff); hw_addr[j + 1] = (u8) ((ETH_INW (dev, j) >> 8) & 0xff);
} }
for (i=0;i<ETH_ALEN;i++) for (i = 0; i < ETH_ALEN; i++) {
{ if (hw_addr[i] != bis->bi_enetaddr[i]) {
if (hw_addr[i] != bis->bi_enetaddr[i])
{
/* printf("Warning: HW address don't match:\n"); */ /* printf("Warning: HW address don't match:\n"); */
/* printf("Address in 3Com Window 2 is " */ /* printf("Address in 3Com Window 2 is " */
/* "%02X:%02X:%02X:%02X:%02X:%02X\n", */ /* "%02X:%02X:%02X:%02X:%02X:%02X\n", */
@ -864,12 +840,16 @@ static void read_hw_addr(struct eth_device* dev, bd_t *bis)
/* bis->bi_enetaddr[4], bis->bi_enetaddr[5]); */ /* bis->bi_enetaddr[4], bis->bi_enetaddr[5]); */
/* goto Done; */ /* goto Done; */
char buffer[256]; char buffer[256];
if (bis->bi_enetaddr[0] == 0 && bis->bi_enetaddr[1] == 0 &&
bis->bi_enetaddr[2] == 0 && bis->bi_enetaddr[3] == 0 &&
bis->bi_enetaddr[4] == 0 && bis->bi_enetaddr[5] == 0)
{
sprintf(buffer, "%02X:%02X:%02X:%02X:%02X:%02X", if (bis->bi_enetaddr[0] == 0
&& bis->bi_enetaddr[1] == 0
&& bis->bi_enetaddr[2] == 0
&& bis->bi_enetaddr[3] == 0
&& bis->bi_enetaddr[4] == 0
&& bis->bi_enetaddr[5] == 0) {
sprintf (buffer,
"%02X:%02X:%02X:%02X:%02X:%02X",
hw_addr[0], hw_addr[1], hw_addr[2], hw_addr[0], hw_addr[1], hw_addr[2],
hw_addr[3], hw_addr[4], hw_addr[5]); hw_addr[3], hw_addr[4], hw_addr[5]);
setenv ("ethaddr", buffer); setenv ("ethaddr", buffer);
@ -877,7 +857,8 @@ static void read_hw_addr(struct eth_device* dev, bd_t *bis)
} }
} }
for(i=0; i<ETH_ALEN; i++) dev->enetaddr[i] = hw_addr[i]; for (i = 0; i < ETH_ALEN; i++)
dev->enetaddr[i] = hw_addr[i];
Done: Done:
return; return;

View file

@ -197,17 +197,18 @@ static unsigned char kbd_ctrl_xlate[] = {
int isa_kbd_init (void) int isa_kbd_init (void)
{ {
char *result; char *result;
result = kbd_initialize (); result = kbd_initialize ();
if (result != NULL) if (result != NULL) {
{
result = kbd_initialize (); result = kbd_initialize ();
} }
if (result == NULL) { if (result == NULL) {
printf ("AT Keyboard initialized\n"); printf ("AT Keyboard initialized\n");
irq_install_handler(KBD_INTERRUPT, (interrupt_handler_t *)kbd_interrupt, NULL); irq_install_handler (KBD_INTERRUPT,
(interrupt_handler_t *) kbd_interrupt,
NULL);
return (1); return (1);
} } else {
else {
printf ("%s\n", result); printf ("%s\n", result);
return (-1); return (-1);
} }
@ -301,7 +302,6 @@ int kbd_getc(void)
} }
/* set LEDs */ /* set LEDs */
void kbd_set_leds(void) void kbd_set_leds(void)
@ -322,7 +322,6 @@ void kbd_set_leds(void)
kbd_send_data(leds); kbd_send_data(leds);
} }
void handle_keyboard_event (unsigned char scancode) void handle_keyboard_event (unsigned char scancode)
{ {
unsigned char keycode; unsigned char keycode;
@ -342,13 +341,13 @@ void handle_keyboard_event(unsigned char scancode)
((scancode) == 0x48) || /* arrow up */ ((scancode) == 0x48) || /* arrow up */
((scancode) == 0x50) || /* arrow down */ ((scancode) == 0x50) || /* arrow down */
((scancode) == 0x4b) || /* arrow left */ ((scancode) == 0x4b) || /* arrow left */
((scancode)==0x4d))) /* arrow right */ ((scancode) == 0x4d)))
/* arrow right */
/* we swallow unknown e0 codes */ /* we swallow unknown e0 codes */
return; return;
} }
/* special cntrl keys */ /* special cntrl keys */
switch(scancode) switch (scancode) {
{
case 0x48: case 0x48:
kbd_put_queue (27); kbd_put_queue (27);
kbd_put_queue (91); kbd_put_queue (91);
@ -370,9 +369,9 @@ void handle_keyboard_event(unsigned char scancode)
kbd_put_queue ('C'); kbd_put_queue ('C');
return; return;
case 0x58: /* F12 key */ case 0x58: /* F12 key */
if (ctrl == 1) if (ctrl == 1) {
{
extern int console_changed; extern int console_changed;
setenv ("stdin", DEVNAME); setenv ("stdin", DEVNAME);
setenv ("stdout", "vga"); setenv ("stdout", "vga");
console_changed = 1; console_changed = 1;
@ -476,10 +475,8 @@ unsigned char handle_kbd_event(void)
/* Error bytes must be ignored to make the /* Error bytes must be ignored to make the
Synaptics touchpads compaq use work */ Synaptics touchpads compaq use work */
/* Ignore error bytes */ /* Ignore error bytes */
if (!(status & (KBD_STAT_GTO | KBD_STAT_PERR))) if (!(status & (KBD_STAT_GTO | KBD_STAT_PERR))) {
{ if (status & KBD_STAT_MOUSE_OBF); /* not supported: handle_mouse_event(scancode); */
if (status & KBD_STAT_MOUSE_OBF)
; /* not supported: handle_mouse_event(scancode); */
else else
handle_keyboard_event (scancode); handle_keyboard_event (scancode);
} }
@ -490,7 +487,6 @@ unsigned char handle_kbd_event(void)
return status; return status;
} }
/****************************************************************************** /******************************************************************************
* Lowlevel Part of keyboard section * Lowlevel Part of keyboard section
*/ */
@ -536,8 +532,7 @@ int kbd_wait_for_input(void)
timeout = KBD_TIMEOUT; timeout = KBD_TIMEOUT;
val = kbd_read_data (); val = kbd_read_data ();
while(val < 0) while (val < 0) {
{
if (timeout-- == 0) if (timeout-- == 0)
return -1; return -1;
udelay (1000); udelay (1000);
@ -553,6 +548,7 @@ int kb_wait(void)
do { do {
unsigned char status = handle_kbd_event (); unsigned char status = handle_kbd_event ();
if (!(status & KBD_STAT_IBF)) if (!(status & KBD_STAT_IBF))
return 0; /* ok */ return 0; /* ok */
udelay (1000); udelay (1000);
@ -578,6 +574,7 @@ void kbd_write_output_w(int data)
void kbd_send_data (unsigned char data) void kbd_send_data (unsigned char data)
{ {
unsigned char status; unsigned char status;
i8259_mask_irq (KBD_INTERRUPT); /* disable interrupt */ i8259_mask_irq (KBD_INTERRUPT); /* disable interrupt */
kbd_write_output_w (data); kbd_write_output_w (data);
status = kbd_wait_for_input (); status = kbd_wait_for_input ();
@ -626,8 +623,7 @@ char * kbd_initialize(void)
status = kbd_wait_for_input (); status = kbd_wait_for_input ();
if (status == KBD_REPLY_ACK) if (status == KBD_REPLY_ACK)
break; break;
if (status != KBD_REPLY_RESEND) if (status != KBD_REPLY_RESEND) {
{
PRINTF ("status: %X\n", status); PRINTF ("status: %X\n", status);
return "Kbd: reset failed, no ACK"; return "Kbd: reset failed, no ACK";
} }
@ -653,8 +649,7 @@ char * kbd_initialize(void)
kbd_write_command_w (KBD_CCMD_WRITE_MODE); kbd_write_command_w (KBD_CCMD_WRITE_MODE);
kbd_write_output_w (KBD_MODE_KBD_INT kbd_write_output_w (KBD_MODE_KBD_INT
| KBD_MODE_SYS | KBD_MODE_SYS
| KBD_MODE_DISABLE_MOUSE | KBD_MODE_DISABLE_MOUSE | KBD_MODE_KCC);
| KBD_MODE_KCC);
/* AMCC powerpc portables need this to use scan-code set 1 -- Cort */ /* AMCC powerpc portables need this to use scan-code set 1 -- Cort */
kbd_write_command_w (KBD_CCMD_READ_MODE); kbd_write_command_w (KBD_CCMD_READ_MODE);

View file

@ -4,8 +4,7 @@
/* A single menu */ /* A single menu */
typedef void (*menu_finish_callback)(struct menu_s *menu); typedef void (*menu_finish_callback)(struct menu_s *menu);
typedef struct menu_s typedef struct menu_s {
{
char *name; /* Menu name */ char *name; /* Menu name */
int num_options; /* Number of options in this menu */ int num_options; /* Number of options in this menu */
int flags; /* Various flags - see below */ int flags; /* Various flags - see below */
@ -28,8 +27,7 @@ typedef struct menu_s
char *name; \ char *name; \
char *help; \ char *help; \
int id; \ int id; \
void *sys; \ void *sys;
/* /*
* Menu option types. * Menu option types.
@ -110,17 +108,13 @@ typedef struct menu_text_s
#define MENU_SELECTION_TYPE 3 #define MENU_SELECTION_TYPE 3
typedef struct menu_select_option_s typedef struct menu_select_option_s {
{
char *map_from; /* Map this variable contents ... */ char *map_from; /* Map this variable contents ... */
char *map_to; /* ... to this menu text and vice versa */ char *map_to; /* ... to this menu text and vice versa */
} menu_select_option_t; } menu_select_option_t;
typedef struct menu_select_s typedef struct menu_select_s {
{ OPTION_PREAMBLE int num_options; /* Number of mappings */
OPTION_PREAMBLE
int num_options; /* Number of mappings */
menu_select_option_t **options; menu_select_option_t **options;
/* Option list array */ /* Option list array */
} menu_select_t; } menu_select_t;
@ -129,10 +123,8 @@ typedef struct menu_select_s
#define MENU_ROUTINE_TYPE 4 #define MENU_ROUTINE_TYPE 4
typedef void (*menu_routine_callback) (struct menu_routine_s *); typedef void (*menu_routine_callback) (struct menu_routine_s *);
typedef struct menu_routine_s typedef struct menu_routine_s {
{ OPTION_PREAMBLE menu_routine_callback callback;
OPTION_PREAMBLE
menu_routine_callback callback;
/* routine to be called */ /* routine to be called */
void *user_data; /* User data, don't care for system */ void *user_data; /* User data, don't care for system */
} menu_routine_t; } menu_routine_t;
@ -142,10 +134,8 @@ typedef struct menu_routine_s
typedef void (*menu_custom_draw) (struct menu_custom_s *); typedef void (*menu_custom_draw) (struct menu_custom_s *);
typedef void (*menu_custom_key) (struct menu_custom_s *, int); typedef void (*menu_custom_key) (struct menu_custom_s *, int);
typedef struct menu_custom_s typedef struct menu_custom_s {
{ OPTION_PREAMBLE menu_custom_draw drawfunc;
OPTION_PREAMBLE
menu_custom_draw drawfunc;
menu_custom_key keyfunc; menu_custom_key keyfunc;
void *user_data; void *user_data;
} menu_custom_t; } menu_custom_t;
@ -153,10 +143,8 @@ typedef struct menu_custom_s
/* /*
* The menu option superstructure * The menu option superstructure
*/ */
typedef struct menu_option_s typedef struct menu_option_s {
{ union {
union
{
menu_submenu_t m_sub_menu; menu_submenu_t m_sub_menu;
menu_boolean_t m_boolean; menu_boolean_t m_boolean;
menu_text_t m_text; menu_text_t m_text;

View file

@ -178,8 +178,8 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
value = addr[0] ; value = addr[0] ;
switch (value & 0x00FF00FF) { switch (value & 0x00FF00FF) {
case AMD_MANUFACT: /* AMD_MANUFACT=0x00010001 in flash.h. */ case AMD_MANUFACT: /* AMD_MANUFACT =0x00010001 in flash.h */
info->flash_id = FLASH_MAN_AMD; /* FLASH_MAN_AMD=0x00000000 in flash.h.*/ info->flash_id = FLASH_MAN_AMD; /* FLASH_MAN_AMD=0x00000000 in flash.h */
break; break;
case FUJ_MANUFACT: case FUJ_MANUFACT:
info->flash_id = FLASH_MAN_FUJ; info->flash_id = FLASH_MAN_FUJ;

View file

@ -1016,7 +1016,8 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
if (info->flash_id > FLASH_AMD_COMP) { if (info->flash_id > FLASH_AMD_COMP) {
while ((*((vu_long *)dest) & 0x00800080) != (data & 0x00800080)) { while ((*((vu_long *) dest) & 0x00800080) !=
(data & 0x00800080)) {
if (get_timer (start) > CFG_FLASH_WRITE_TOUT) { if (get_timer (start) > CFG_FLASH_WRITE_TOUT) {
return (1); return (1);
} }
@ -1036,10 +1037,14 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
} else { } else {
barf = addr[0] & 0x0000003A; barf = addr[0] & 0x0000003A;
} }
printf("\nFlash write error at address %lx\n",(unsigned long)dest); printf ("\nFlash write error at address %lx\n",
if(barf & 0x0002) printf("Block locked, not erased.\n"); (unsigned long) dest);
if(barf & 0x0010) printf("Programming error.\n"); if (barf & 0x0002)
if(barf & 0x0008) printf("Vpp Low error.\n"); printf ("Block locked, not erased.\n");
if (barf & 0x0010)
printf ("Programming error.\n");
if (barf & 0x0008)
printf ("Vpp Low error.\n");
return (2); return (2);
} }
@ -1096,33 +1101,31 @@ static int write_short (flash_info_t *info, ulong dest, ushort data)
} else { } else {
/* intel stuff */ /* intel stuff */
while (!(addr[0] & 0x0080)) { /* wait for error or finish */ while (!(addr[0] & 0x0080)) { /* wait for error or finish */
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) return (1); if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
return (1);
} }
if (addr[0] & 0x003A) { /* check for error */ if (addr[0] & 0x003A) { /* check for error */
barf = addr[0] & 0x003A; barf = addr[0] & 0x003A;
printf("\nFlash write error at address %lx\n",(unsigned long)dest); printf ("\nFlash write error at address %lx\n",
if(barf & 0x0002) printf("Block locked, not erased.\n"); (unsigned long) dest);
if(barf & 0x0010) printf("Programming error.\n"); if (barf & 0x0002)
if(barf & 0x0008) printf("Vpp Low error.\n"); printf ("Block locked, not erased.\n");
if (barf & 0x0010)
printf ("Programming error.\n");
if (barf & 0x0008)
printf ("Vpp Low error.\n");
return (2); return (2);
} }
*addr = 0x00B0; *addr = 0x00B0;
*addr = 0x0070; *addr = 0x0070;
while (!(addr[0] & 0x0080)) { /* wait for error or finish */ while (!(addr[0] & 0x0080)) { /* wait for error or finish */
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) return (1); if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
return (1);
} }
*addr = 0x00FF; *addr = 0x00FF;
} }
return (0); return (0);
} }
#endif #endif
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
*/

View file

@ -134,8 +134,7 @@ typedef enum _max_CL_supported_SD {SD_CL_1=1, SD_CL_2, SD_CL_3, SD_CL_4, SD_CL
/* SDRAM/DDR information struct */ /* SDRAM/DDR information struct */
typedef struct _gtMemoryDimmInfo typedef struct _gtMemoryDimmInfo {
{
MEMORY_TYPE memoryType; MEMORY_TYPE memoryType;
unsigned int numOfRowAddresses; unsigned int numOfRowAddresses;
unsigned int numOfColAddresses; unsigned int numOfColAddresses;

View file

@ -39,6 +39,7 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
*/ */
ulong flash_get_size (volatile FLASH_WORD_SIZE * addr, flash_info_t * info); ulong flash_get_size (volatile FLASH_WORD_SIZE * addr, flash_info_t * info);
#ifndef CONFIG_FLASH_16BIT #ifndef CONFIG_FLASH_16BIT
static int write_word (flash_info_t * info, ulong dest, ulong data); static int write_word (flash_info_t * info, ulong dest, ulong data);
#else #else
@ -65,22 +66,21 @@ unsigned long flash_init (void)
/* Static FLASH Bank configuration here - FIXME XXX */ /* Static FLASH Bank configuration here - FIXME XXX */
size_b0 = flash_get_size((volatile FLASH_WORD_SIZE *)FLASH_BASE0_PRELIM, size_b0 =
&flash_info[0]); flash_get_size ((volatile FLASH_WORD_SIZE *)
FLASH_BASE0_PRELIM, &flash_info[0]);
if (flash_info[0].flash_id == FLASH_UNKNOWN) { if (flash_info[0].flash_id == FLASH_UNKNOWN) {
printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n", printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n", size_b0, size_b0 << 20);
size_b0, size_b0<<20);
} }
size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)FLASH_BASE1_PRELIM, size_b1 =
&flash_info[1]); flash_get_size ((volatile FLASH_WORD_SIZE *)
FLASH_BASE1_PRELIM, &flash_info[1]);
if (size_b1 > size_b0) { if (size_b1 > size_b0) {
printf ("## ERROR: " printf ("## ERROR: "
"Bank 1 (0x%08lx = %ld MB) > Bank 0 (0x%08lx = %ld MB)\n", "Bank 1 (0x%08lx = %ld MB) > Bank 0 (0x%08lx = %ld MB)\n",
size_b1, size_b1<<20, size_b1, size_b1 << 20, size_b0, size_b0 << 20);
size_b0, size_b0<<20
);
flash_info[0].flash_id = FLASH_UNKNOWN; flash_info[0].flash_id = FLASH_UNKNOWN;
flash_info[1].flash_id = FLASH_UNKNOWN; flash_info[1].flash_id = FLASH_UNKNOWN;
flash_info[0].sector_count = -1; flash_info[0].sector_count = -1;
@ -109,13 +109,17 @@ unsigned long flash_init (void)
#endif #endif
if (size_b1) { if (size_b1) {
memctl->memc_or1 = CFG_OR_TIMING_FLASH | (-size_b1 & 0xFFFF8000); memctl->memc_or1 =
memctl->memc_br1 = (CFG_FLASH_BASE | 0x00000801) + (size_b0 & BR_BA_MSK); CFG_OR_TIMING_FLASH | (-size_b1 & 0xFFFF8000);
memctl->memc_br1 =
(CFG_FLASH_BASE | 0x00000801) + (size_b0 & BR_BA_MSK);
/*((CFG_FLASH_BASE + size_b0) & BR_BA_MSK) | /*((CFG_FLASH_BASE + size_b0) & BR_BA_MSK) |
BR_MS_GPCM | BR_V; */ BR_MS_GPCM | BR_V; */
/* Re-do sizing to get full correct info */ /* Re-do sizing to get full correct info */
size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)(CFG_FLASH_BASE + size_b0), size_b1 =
flash_get_size ((volatile FLASH_WORD_SIZE
*) (CFG_FLASH_BASE + size_b0),
&flash_info[1]); &flash_info[1]);
flash_get_offsets (CFG_FLASH_BASE + size_b0, &flash_info[1]); flash_get_offsets (CFG_FLASH_BASE + size_b0, &flash_info[1]);
@ -124,8 +128,8 @@ unsigned long flash_init (void)
/* monitor protection ON by default */ /* monitor protection ON by default */
(void) flash_protect (FLAG_PROTECT_SET, (void) flash_protect (FLAG_PROTECT_SET,
CFG_MONITOR_BASE, CFG_MONITOR_BASE,
CFG_MONITOR_BASE+monitor_flash_len-1, CFG_MONITOR_BASE + monitor_flash_len -
&flash_info[1]); 1, &flash_info[1]);
#endif #endif
} else { } else {
memctl->memc_br1 = 0; /* invalidate bank */ memctl->memc_br1 = 0; /* invalidate bank */
@ -161,17 +165,18 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
info->start[6] = base + 0x00018000; info->start[6] = base + 0x00018000;
info->start[7] = base + 0x0001C000; info->start[7] = base + 0x0001C000;
for (i = 8; i < info->sector_count; i++) { for (i = 8; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00020000) - 0x000E0000; info->start[i] =
base + (i * 0x00020000) - 0x000E0000;
} }
} } else {
else {
/* set sector offsets for bottom boot block type */ /* set sector offsets for bottom boot block type */
info->start[0] = base + 0x00000000; info->start[0] = base + 0x00000000;
info->start[1] = base + 0x00008000; info->start[1] = base + 0x00008000;
info->start[2] = base + 0x0000C000; info->start[2] = base + 0x0000C000;
info->start[3] = base + 0x00010000; info->start[3] = base + 0x00010000;
for (i = 4; i < info->sector_count; i++) { for (i = 4; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00020000) - 0x00060000; info->start[i] =
base + (i * 0x00020000) - 0x00060000;
} }
} }
#else #else
@ -185,17 +190,18 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
info->start[6] = base + 0x0000C000; info->start[6] = base + 0x0000C000;
info->start[7] = base + 0x0000E000; info->start[7] = base + 0x0000E000;
for (i = 8; i < info->sector_count; i++) { for (i = 8; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00010000) - 0x00070000; info->start[i] =
base + (i * 0x00010000) - 0x00070000;
} }
} } else {
else {
/* set sector offsets for bottom boot block type */ /* set sector offsets for bottom boot block type */
info->start[0] = base + 0x00000000; info->start[0] = base + 0x00000000;
info->start[1] = base + 0x00004000; info->start[1] = base + 0x00004000;
info->start[2] = base + 0x00006000; info->start[2] = base + 0x00006000;
info->start[3] = base + 0x00008000; info->start[3] = base + 0x00008000;
for (i = 4; i < info->sector_count; i++) { for (i = 4; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00010000) - 0x00030000; info->start[i] =
base + (i * 0x00010000) - 0x00030000;
} }
} }
#endif #endif
@ -267,12 +273,24 @@ void flash_print_info (flash_info_t *info)
} }
switch (info->flash_id & FLASH_VENDMASK) { switch (info->flash_id & FLASH_VENDMASK) {
case FLASH_MAN_AMD: printf ("AMD "); break; case FLASH_MAN_AMD:
case FLASH_MAN_FUJ: printf ("FUJITSU "); break; printf ("AMD ");
case FLASH_MAN_SST: printf ("SST "); break; break;
case FLASH_MAN_STM: printf ("STM "); break; case FLASH_MAN_FUJ:
case FLASH_MAN_INTEL: printf ("INTEL "); break; printf ("FUJITSU ");
default: printf ("Unknown Vendor "); break; break;
case FLASH_MAN_SST:
printf ("SST ");
break;
case FLASH_MAN_STM:
printf ("STM ");
break;
case FLASH_MAN_INTEL:
printf ("INTEL ");
break;
default:
printf ("Unknown Vendor ");
break;
} }
if (info->flash_id & 0x0001) { if (info->flash_id & 0x0001) {
@ -282,44 +300,61 @@ void flash_print_info (flash_info_t *info)
} }
switch (info->flash_id & FLASH_TYPEMASK) { switch (info->flash_id & FLASH_TYPEMASK) {
case FLASH_AM400B: printf ("AM29LV400B (4 Mbit%s",boottype); case FLASH_AM400B:
printf ("AM29LV400B (4 Mbit%s", boottype);
break; break;
case FLASH_AM400T: printf ("AM29LV400T (4 Mbit%s",boottype); case FLASH_AM400T:
printf ("AM29LV400T (4 Mbit%s", boottype);
break; break;
case FLASH_AM800B: printf ("AM29LV800B (8 Mbit%s",boottype); case FLASH_AM800B:
printf ("AM29LV800B (8 Mbit%s", boottype);
break; break;
case FLASH_AM800T: printf ("AM29LV800T (8 Mbit%s",boottype); case FLASH_AM800T:
printf ("AM29LV800T (8 Mbit%s", boottype);
break; break;
case FLASH_AM160B: printf ("AM29LV160B (16 Mbit%s",boottype); case FLASH_AM160B:
printf ("AM29LV160B (16 Mbit%s", boottype);
break; break;
case FLASH_AM160T: printf ("AM29LV160T (16 Mbit%s",boottype); case FLASH_AM160T:
printf ("AM29LV160T (16 Mbit%s", boottype);
break; break;
case FLASH_AM320B: printf ("AM29LV320B (32 Mbit%s",boottype); case FLASH_AM320B:
printf ("AM29LV320B (32 Mbit%s", boottype);
break; break;
case FLASH_AM320T: printf ("AM29LV320T (32 Mbit%s",boottype); case FLASH_AM320T:
printf ("AM29LV320T (32 Mbit%s", boottype);
break; break;
case FLASH_INTEL800B: printf ("INTEL28F800B (8 Mbit%s",boottype); case FLASH_INTEL800B:
printf ("INTEL28F800B (8 Mbit%s", boottype);
break; break;
case FLASH_INTEL800T: printf ("INTEL28F800T (8 Mbit%s",boottype); case FLASH_INTEL800T:
printf ("INTEL28F800T (8 Mbit%s", boottype);
break; break;
case FLASH_INTEL160B: printf ("INTEL28F160B (16 Mbit%s",boottype); case FLASH_INTEL160B:
printf ("INTEL28F160B (16 Mbit%s", boottype);
break; break;
case FLASH_INTEL160T: printf ("INTEL28F160T (16 Mbit%s",boottype); case FLASH_INTEL160T:
printf ("INTEL28F160T (16 Mbit%s", boottype);
break; break;
case FLASH_INTEL320B: printf ("INTEL28F320B (32 Mbit%s",boottype); case FLASH_INTEL320B:
printf ("INTEL28F320B (32 Mbit%s", boottype);
break; break;
case FLASH_INTEL320T: printf ("INTEL28F320T (32 Mbit%s",boottype); case FLASH_INTEL320T:
printf ("INTEL28F320T (32 Mbit%s", boottype);
break; break;
#if 0 /* enable when devices are available */ #if 0 /* enable when devices are available */
case FLASH_INTEL640B: printf ("INTEL28F640B (64 Mbit%s",boottype); case FLASH_INTEL640B:
printf ("INTEL28F640B (64 Mbit%s", boottype);
break; break;
case FLASH_INTEL640T: printf ("INTEL28F640T (64 Mbit%s",boottype); case FLASH_INTEL640T:
printf ("INTEL28F640T (64 Mbit%s", boottype);
break; break;
#endif #endif
default: printf ("Unknown Chip Type\n"); default:
printf ("Unknown Chip Type\n");
break; break;
} }
@ -331,9 +366,7 @@ void flash_print_info (flash_info_t *info)
if ((i % 5) == 0) if ((i % 5) == 0)
printf ("\n "); printf ("\n ");
printf (" %08lX%s", printf (" %08lX%s",
info->start[i], info->start[i], info->protect[i] ? " (RO)" : " ");
info->protect[i] ? " (RO)" : " "
);
} }
printf ("\n"); printf ("\n");
return; return;
@ -536,17 +569,18 @@ ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
info->start[6] = base + 0x00018000; info->start[6] = base + 0x00018000;
info->start[7] = base + 0x0001C000; info->start[7] = base + 0x0001C000;
for (i = 8; i < info->sector_count; i++) { for (i = 8; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00020000) - 0x000E0000; info->start[i] =
base + (i * 0x00020000) - 0x000E0000;
} }
} } else {
else {
/* set sector offsets for bottom boot block type */ /* set sector offsets for bottom boot block type */
info->start[0] = base + 0x00000000; info->start[0] = base + 0x00000000;
info->start[1] = base + 0x00008000; info->start[1] = base + 0x00008000;
info->start[2] = base + 0x0000C000; info->start[2] = base + 0x0000C000;
info->start[3] = base + 0x00010000; info->start[3] = base + 0x00010000;
for (i = 4; i < info->sector_count; i++) { for (i = 4; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00020000) - 0x00060000; info->start[i] =
base + (i * 0x00020000) - 0x00060000;
} }
} }
#else #else
@ -560,17 +594,18 @@ ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
info->start[6] = base + 0x0000C000; info->start[6] = base + 0x0000C000;
info->start[7] = base + 0x0000E000; info->start[7] = base + 0x0000E000;
for (i = 8; i < info->sector_count; i++) { for (i = 8; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00010000) - 0x00070000; info->start[i] =
base + (i * 0x00010000) - 0x00070000;
} }
} } else {
else {
/* set sector offsets for bottom boot block type */ /* set sector offsets for bottom boot block type */
info->start[0] = base + 0x00000000; info->start[0] = base + 0x00000000;
info->start[1] = base + 0x00004000; info->start[1] = base + 0x00004000;
info->start[2] = base + 0x00006000; info->start[2] = base + 0x00006000;
info->start[3] = base + 0x00008000; info->start[3] = base + 0x00008000;
for (i = 4; i < info->sector_count; i++) { for (i = 4; i < info->sector_count; i++) {
info->start[i] = base + (i * 0x00010000) - 0x00030000; info->start[i] =
base + (i * 0x00010000) - 0x00030000;
} }
} }
#endif #endif
@ -654,7 +689,8 @@ ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
int flash_erase (flash_info_t * info, int s_first, int s_last) int flash_erase (flash_info_t * info, int s_first, int s_last)
{ {
volatile FLASH_WORD_SIZE *addr=(volatile FLASH_WORD_SIZE*)(info->start[0]); volatile FLASH_WORD_SIZE *addr =
(volatile FLASH_WORD_SIZE *) (info->start[0]);
int flag, prot, sect, l_sect, barf; int flag, prot, sect, l_sect, barf;
ulong start, now, last; ulong start, now, last;
int rcode = 0; int rcode = 0;
@ -683,8 +719,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
} }
if (prot) { if (prot) {
printf ("- Warning: %d protected sectors will not be erased!\n", printf ("- Warning: %d protected sectors will not be erased!\n", prot);
prot);
} else { } else {
printf ("\n"); printf ("\n");
} }
@ -733,8 +768,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
last = start; last = start;
addr = (volatile FLASH_WORD_SIZE *) (info->start[l_sect]); addr = (volatile FLASH_WORD_SIZE *) (info->start[l_sect]);
while ((addr[0] & (0x00800080 & FLASH_ID_MASK)) != while ((addr[0] & (0x00800080 & FLASH_ID_MASK)) !=
(0x00800080&FLASH_ID_MASK) ) (0x00800080 & FLASH_ID_MASK)) {
{
if ((now = get_timer (start)) > CFG_FLASH_ERASE_TOUT) { if ((now = get_timer (start)) > CFG_FLASH_ERASE_TOUT) {
printf ("Timeout\n"); printf ("Timeout\n");
return 1; return 1;
@ -779,14 +813,17 @@ DONE:
#endif #endif
if (barf) { if (barf) {
printf ("\nFlash error in sector at %lx\n", (unsigned long) addr); printf ("\nFlash error in sector at %lx\n", (unsigned long) addr);
if(barf & 0x0002) printf("Block locked, not erased.\n"); if (barf & 0x0002)
printf ("Block locked, not erased.\n");
if ((barf & 0x0030) == 0x0030) if ((barf & 0x0030) == 0x0030)
printf ("Command Sequence error.\n"); printf ("Command Sequence error.\n");
if ((barf & 0x0030) == 0x0020) if ((barf & 0x0030) == 0x0020)
printf ("Block Erase error.\n"); printf ("Block Erase error.\n");
if(barf & 0x0008) printf("Vpp Low error.\n"); if (barf & 0x0008)
printf ("Vpp Low error.\n");
rcode = 1; rcode = 1;
} else printf("."); } else
printf (".");
l_sect = sect; l_sect = sect;
} }
addr = (volatile FLASH_WORD_SIZE *) info->start[0]; addr = (volatile FLASH_WORD_SIZE *) info->start[0];
@ -983,7 +1020,8 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
if (info->flash_id > FLASH_AMD_COMP) { if (info->flash_id > FLASH_AMD_COMP) {
while ((*((vu_long *)dest) & 0x00800080) != (data & 0x00800080)) { while ((*((vu_long *) dest) & 0x00800080) !=
(data & 0x00800080)) {
if (get_timer (start) > CFG_FLASH_WRITE_TOUT) { if (get_timer (start) > CFG_FLASH_WRITE_TOUT) {
return (1); return (1);
} }
@ -1004,9 +1042,12 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
barf = addr[0] & 0x0000003A; barf = addr[0] & 0x0000003A;
} }
printf ("\nFlash write error at address %lx\n", (unsigned long) dest); printf ("\nFlash write error at address %lx\n", (unsigned long) dest);
if(barf & 0x0002) printf("Block locked, not erased.\n"); if (barf & 0x0002)
if(barf & 0x0010) printf("Programming error.\n"); printf ("Block locked, not erased.\n");
if(barf & 0x0008) printf("Vpp Low error.\n"); if (barf & 0x0010)
printf ("Programming error.\n");
if (barf & 0x0008)
printf ("Vpp Low error.\n");
return (2); return (2);
} }
@ -1063,33 +1104,32 @@ static int write_short (flash_info_t *info, ulong dest, ushort data)
} else { } else {
/* intel stuff */ /* intel stuff */
while (!(addr[0] & 0x0080)) { /* wait for error or finish */ while (!(addr[0] & 0x0080)) { /* wait for error or finish */
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) return (1); if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
return (1);
} }
if (addr[0] & 0x003A) { /* check for error */ if (addr[0] & 0x003A) { /* check for error */
barf = addr[0] & 0x003A; barf = addr[0] & 0x003A;
printf("\nFlash write error at address %lx\n",(unsigned long)dest); printf ("\nFlash write error at address %lx\n",
if(barf & 0x0002) printf("Block locked, not erased.\n"); (unsigned long) dest);
if(barf & 0x0010) printf("Programming error.\n"); if (barf & 0x0002)
if(barf & 0x0008) printf("Vpp Low error.\n"); printf ("Block locked, not erased.\n");
if (barf & 0x0010)
printf ("Programming error.\n");
if (barf & 0x0008)
printf ("Vpp Low error.\n");
return (2); return (2);
} }
*addr = 0x00B0; *addr = 0x00B0;
*addr = 0x0070; *addr = 0x0070;
while (!(addr[0] & 0x0080)) { /* wait for error or finish */ while (!(addr[0] & 0x0080)) { /* wait for error or finish */
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) return (1); if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
return (1);
} }
*addr = 0x00FF; *addr = 0x00FF;
} }
return (0); return (0);
} }
#endif #endif
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
*/

View file

@ -142,5 +142,3 @@ Sr. Staff Engineer
Microvision, Inc. Microvision, Inc.
<keith_outwater@mvis.com> <keith_outwater@mvis.com>
<outwater@eskimo.com> <outwater@eskimo.com>
vim: set ts=4 sw=4 tw=78:

View file

@ -34,7 +34,6 @@
* drives the amplifier input. * drives the amplifier input.
*/ */
/* /*
* Initialize beeper-related hardware. Initialize timer 1 for use with * Initialize beeper-related hardware. Initialize timer 1 for use with
* the beeper. Use 66 Mhz internal clock with prescale of 33 to get * the beeper. Use 66 Mhz internal clock with prescale of 33 to get
@ -42,8 +41,7 @@
* FIXME: we should really compute the prescale based on the reported * FIXME: we should really compute the prescale based on the reported
* core clock frequency. * core clock frequency.
*/ */
void void init_beeper (void)
init_beeper(void)
{ {
volatile immap_t *immap = (immap_t *) CFG_IMMR; volatile immap_t *immap = (immap_t *) CFG_IMMR;
@ -55,14 +53,12 @@ init_beeper(void)
immap->im_cpmtimer.cpmt_tgcr |= TGCR_RST1; immap->im_cpmtimer.cpmt_tgcr |= TGCR_RST1;
} }
/* /*
* Set beeper frequency. Max allowed frequency is 2.5 KHz. This limit * Set beeper frequency. Max allowed frequency is 2.5 KHz. This limit
* is mostly arbitrary, but the beeper isn't really much good beyond this * is mostly arbitrary, but the beeper isn't really much good beyond this
* frequency. * frequency.
*/ */
void void set_beeper_frequency (uint frequency)
set_beeper_frequency(uint frequency)
{ {
#define FREQ_LIMIT 2500 #define FREQ_LIMIT 2500
@ -72,36 +68,32 @@ set_beeper_frequency(uint frequency)
* Compute timer ticks given desired frequency. The timer is set up * Compute timer ticks given desired frequency. The timer is set up
* to count 0.5 uS per tick and it takes two ticks per cycle (Hz). * to count 0.5 uS per tick and it takes two ticks per cycle (Hz).
*/ */
if (frequency > FREQ_LIMIT) frequency = FREQ_LIMIT; if (frequency > FREQ_LIMIT)
frequency = FREQ_LIMIT;
frequency = 1000000 / frequency; frequency = 1000000 / frequency;
immap->im_cpmtimer.cpmt_trr1 = (ushort) frequency; immap->im_cpmtimer.cpmt_trr1 = (ushort) frequency;
} }
/* /*
* Turn the beeper on * Turn the beeper on
*/ */
void void beeper_on (void)
beeper_on(void)
{ {
volatile immap_t *immap = (immap_t *) CFG_IMMR; volatile immap_t *immap = (immap_t *) CFG_IMMR;
immap->im_cpmtimer.cpmt_tgcr &= ~TGCR_STP1; immap->im_cpmtimer.cpmt_tgcr &= ~TGCR_STP1;
} }
/* /*
* Turn the beeper off * Turn the beeper off
*/ */
void void beeper_off (void)
beeper_off(void)
{ {
volatile immap_t *immap = (immap_t *) CFG_IMMR; volatile immap_t *immap = (immap_t *) CFG_IMMR;
immap->im_cpmtimer.cpmt_tgcr |= TGCR_STP1; immap->im_cpmtimer.cpmt_tgcr |= TGCR_STP1;
} }
/* /*
* Increase or decrease the beeper volume. Volume can be set * Increase or decrease the beeper volume. Volume can be set
* from off to full in 64 steps. To increase volume, the output * from off to full in 64 steps. To increase volume, the output
@ -110,8 +102,7 @@ beeper_off(void)
* change pin mode to tristate) then output a high to go back to * change pin mode to tristate) then output a high to go back to
* tristate. * tristate.
*/ */
void void set_beeper_volume (int steps)
set_beeper_volume(int steps)
{ {
volatile immap_t *immap = (immap_t *) CFG_IMMR; volatile immap_t *immap = (immap_t *) CFG_IMMR;
int i; int i;
@ -123,8 +114,7 @@ set_beeper_volume(int steps)
immap->im_cpm.cp_pbodr |= (0x80000000 >> 19); immap->im_cpm.cp_pbodr |= (0x80000000 >> 19);
udelay (1); udelay (1);
} }
} } else {
else {
for (i = 0; i > (steps <= -64 ? -64 : steps); i--) { for (i = 0; i > (steps <= -64 ? -64 : steps); i--) {
immap->im_cpm.cp_pbdat &= ~(0x80000000 >> 19); immap->im_cpm.cp_pbdat &= ~(0x80000000 >> 19);
udelay (1); udelay (1);
@ -134,7 +124,6 @@ set_beeper_volume(int steps)
} }
} }
/* /*
* Check the environment to see if the beeper needs beeping. * Check the environment to see if the beeper needs beeping.
* Controlled by a sequence of the form: * Controlled by a sequence of the form:
@ -146,8 +135,7 @@ set_beeper_volume(int steps)
* *
* Return 1 on success, 0 on failure * Return 1 on success, 0 on failure
*/ */
int int do_beeper (char *sequence)
do_beeper(char *sequence)
{ {
#define DELIMITER ';' #define DELIMITER ';'
@ -171,14 +159,14 @@ char *tp;
i = 0; i = 0;
while (*p != '\0') { while (*p != '\0') {
while (*p != DELIMITER) { while (*p != DELIMITER) {
if (i > 3) i = 0; if (i > 3)
i = 0;
val = (int) simple_strtol (p, &tp, 0); val = (int) simple_strtol (p, &tp, 0);
if (tp == p) { if (tp == p) {
printf ("%s:%d: no digits or bad format\n", printf ("%s:%d: no digits or bad format\n",
__FILE__, __LINE__); __FILE__, __LINE__);
return 0; return 0;
} } else {
else {
args[i] = val; args[i] = val;
} }
@ -195,11 +183,11 @@ char *tp;
*/ */
#if 0 #if 0
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
printf("%s:%d:arg %d = %d\n", __FILE__, __LINE__, i, args[i]); printf ("%s:%d:arg %d = %d\n", __FILE__, __LINE__, i,
args[i]);
} }
printf ("\n"); printf ("\n");
#endif #endif
set_beeper_frequency (args[0]); set_beeper_frequency (args[0]);
set_beeper_volume (args[1]); set_beeper_volume (args[1]);
beeper_on (); beeper_on ();
@ -209,5 +197,3 @@ char *tp;
} }
return 1; return 1;
} }
/* vim: set ts=4 sw=4 tw=78: */

View file

@ -27,5 +27,3 @@ void beeper_on(void);
void beeper_off(void); void beeper_off(void);
void set_beeper_volume(int steps); void set_beeper_volume(int steps);
int do_beeper(char *sequence); int do_beeper(char *sequence);
/* vim: set ts=4 tw=78 sw=4: */

View file

@ -376,5 +376,3 @@ int fpga_busy_fn (int cookie)
return 0; return 0;
} }
#endif #endif
/* vim: set ts=4 tw=78 sw=4: */

View file

@ -41,5 +41,3 @@ extern int fpga_busy_fn(int cookie);
extern int fpga_abort_fn(int cookie ); extern int fpga_abort_fn(int cookie );
extern int fpga_pre_config_fn(int cookie ); extern int fpga_pre_config_fn(int cookie );
extern int fpga_post_config_fn(int cookie ); extern int fpga_post_config_fn(int cookie );
/* vim: set ts=4 sw=4 tw=78: */

View file

@ -40,5 +40,3 @@ typedef struct {
} mpc8xx_iop_conf_t; } mpc8xx_iop_conf_t;
extern void config_mpc8xx_ioports(volatile immap_t *immr); extern void config_mpc8xx_ioports(volatile immap_t *immr);
/* vim: set ts=4 tw=78 sw=4: */

View file

@ -197,8 +197,7 @@ int isa_kbd_init(void)
irq_install_handler(25, (interrupt_handler_t *)handle_isa_int, NULL); irq_install_handler(25, (interrupt_handler_t *)handle_isa_int, NULL);
isa_irq_install_handler(KBD_INTERRUPT, (interrupt_handler_t *)kbd_interrupt, NULL); isa_irq_install_handler(KBD_INTERRUPT, (interrupt_handler_t *)kbd_interrupt, NULL);
return (1); return (1);
} } else {
else {
printf("%s\n",result); printf("%s\n",result);
return (-1); return (-1);
} }
@ -328,13 +327,13 @@ void handle_keyboard_event(unsigned char scancode)
if (!(((scancode & 0x7F) == 0x38) || /* the right ctrl key */ if (!(((scancode & 0x7F) == 0x38) || /* the right ctrl key */
((scancode & 0x7F) == 0x1D) || /* the right alt key */ ((scancode & 0x7F) == 0x1D) || /* the right alt key */
((scancode & 0x7F) == 0x35) || /* the right '/' key */ ((scancode & 0x7F) == 0x35) || /* the right '/' key */
((scancode&0x7F)==0x1C) )) /* the right enter key */ ((scancode & 0x7F) == 0x1C)))
/* the right enter key */
/* we swallow unknown e0 codes */ /* we swallow unknown e0 codes */
return; return;
} }
/* special cntrl keys */ /* special cntrl keys */
switch(scancode) switch (scancode) {
{
case 0x2A: case 0x2A:
case 0x36: /* shift pressed */ case 0x36: /* shift pressed */
shift = 1; shift = 1;
@ -583,8 +582,7 @@ char * kbd_initialize(void)
status = kbd_wait_for_input(); status = kbd_wait_for_input();
if (status == KBD_REPLY_ACK) if (status == KBD_REPLY_ACK)
break; break;
if (status != KBD_REPLY_RESEND) if (status != KBD_REPLY_RESEND) {
{
PRINTF("status: %X\n",status); PRINTF("status: %X\n",status);
return "Kbd: reset failed, no ACK"; return "Kbd: reset failed, no ACK";
} }

View file

@ -28,8 +28,7 @@
#include "pcippc2.h" #include "pcippc2.h"
#include "i2c.h" #include "i2c.h"
typedef struct cpc710_mem_org_s typedef struct cpc710_mem_org_s {
{
u8 rows; u8 rows;
u8 cols; u8 cols;
u8 banks2; u8 banks2;
@ -37,15 +36,11 @@ typedef struct cpc710_mem_org_s
} cpc710_mem_org_t; } cpc710_mem_org_t;
static int cpc710_compute_mcer (u32 * mcer, static int cpc710_compute_mcer (u32 * mcer,
unsigned long * unsigned long *size, unsigned int sdram);
size,
unsigned int sdram);
static int cpc710_eeprom_checksum (unsigned int sdram); static int cpc710_eeprom_checksum (unsigned int sdram);
static u8 cpc710_eeprom_read (unsigned int sdram, static u8 cpc710_eeprom_read (unsigned int sdram, unsigned int offset);
unsigned int offset);
static u32 cpc710_mcer_mem [] = static u32 cpc710_mcer_mem[] = {
{
0x000003f3, /* 18 lines, 4 Mb */ 0x000003f3, /* 18 lines, 4 Mb */
0x000003e3, /* 19 lines, 8 Mb */ 0x000003e3, /* 19 lines, 8 Mb */
0x000003c3, /* 20 lines, 16 Mb */ 0x000003c3, /* 20 lines, 16 Mb */
@ -56,8 +51,7 @@ static u32 cpc710_mcer_mem [] =
0x00000002, /* 25 lines, 512 Mb */ 0x00000002, /* 25 lines, 512 Mb */
0x00000001 /* 26 lines, 1024 Mb */ 0x00000001 /* 26 lines, 1024 Mb */
}; };
static cpc710_mem_org_t cpc710_mem_org [] = static cpc710_mem_org_t cpc710_mem_org[] = {
{
{0x0c, 0x09, 0x02, 0x00}, /* 0000: 12/ 9/2 */ {0x0c, 0x09, 0x02, 0x00}, /* 0000: 12/ 9/2 */
{0x0d, 0x09, 0x02, 0x00}, /* 0000: 13/ 9/2 */ {0x0d, 0x09, 0x02, 0x00}, /* 0000: 13/ 9/2 */
{0x0d, 0x0a, 0x02, 0x00}, /* 0000: 13/10/2 */ {0x0d, 0x0a, 0x02, 0x00}, /* 0000: 13/10/2 */
@ -108,8 +102,7 @@ unsigned long cpc710_ram_init (void)
/* Only the first memory bank is initialised now /* Only the first memory bank is initialised now
*/ */
if (! cpc710_compute_mcer(& mcer, & bank_size, 0)) if (!cpc710_compute_mcer (&mcer, &bank_size, 0)) {
{
puts ("Unsupported SDRAM type !\n"); puts ("Unsupported SDRAM type !\n");
hang (); hang ();
} }
@ -128,8 +121,7 @@ unsigned long cpc710_ram_init (void)
/* Wait until initialisation finished /* Wait until initialisation finished
*/ */
while (! (in32 (REG(SDRAM0, MCCR)) & 0x20000000)) while (!(in32 (REG (SDRAM0, MCCR)) & 0x20000000)) {
{
iobarrier_rw (); iobarrier_rw ();
} }
@ -150,10 +142,7 @@ unsigned long cpc710_ram_init (void)
return memsize; return memsize;
} }
static int cpc710_compute_mcer ( static int cpc710_compute_mcer (u32 * mcer, unsigned long *size, unsigned int sdram)
u32 * mcer,
unsigned long * size,
unsigned int sdram)
{ {
u8 rows; u8 rows;
u8 cols; u8 cols;
@ -163,15 +152,12 @@ static int cpc710_compute_mcer (
unsigned int i; unsigned int i;
cpc710_mem_org_t *org = 0; cpc710_mem_org_t *org = 0;
if (!i2c_reset ()) {
if (! i2c_reset())
{
puts ("Can't reset I2C!\n"); puts ("Can't reset I2C!\n");
hang (); hang ();
} }
if (! cpc710_eeprom_checksum(sdram)) if (!cpc710_eeprom_checksum (sdram)) {
{
puts ("Invalid EEPROM checksum !\n"); puts ("Invalid EEPROM checksum !\n");
hang (); hang ();
} }
@ -184,30 +170,27 @@ static int cpc710_compute_mcer (
lines = rows + cols + banks2; lines = rows + cols + banks2;
if (lines < 18 || lines > 26) if (lines < 18 || lines > 26) {
{
/* Unsupported configuration /* Unsupported configuration
*/ */
return 0; return 0;
} }
mc |= cpc710_mcer_mem[lines - 18] << 6; mc |= cpc710_mcer_mem[lines - 18] << 6;
for (i = 0; i < sizeof(cpc710_mem_org) / sizeof(cpc710_mem_org_t); i++) for (i = 0; i < sizeof (cpc710_mem_org) / sizeof (cpc710_mem_org_t);
{ i++) {
cpc710_mem_org_t *corg = cpc710_mem_org + i; cpc710_mem_org_t *corg = cpc710_mem_org + i;
if (corg->rows == rows && corg->cols == cols && corg->banks2 == banks2) if (corg->rows == rows && corg->cols == cols
{ && corg->banks2 == banks2) {
org = corg; org = corg;
break; break;
} }
} }
if (! org) if (!org) {
{
/* Unsupported configuration /* Unsupported configuration
*/ */
return 0; return 0;
@ -223,29 +206,24 @@ static int cpc710_compute_mcer (
return 1; return 1;
} }
static int cpc710_eeprom_checksum ( static int cpc710_eeprom_checksum (unsigned int sdram)
unsigned int sdram)
{ {
u8 sum = 0; u8 sum = 0;
unsigned int i; unsigned int i;
for (i = 0; i < 63; i++) for (i = 0; i < 63; i++) {
{
sum += cpc710_eeprom_read (sdram, i); sum += cpc710_eeprom_read (sdram, i);
} }
return sum == cpc710_eeprom_read (sdram, 63); return sum == cpc710_eeprom_read (sdram, 63);
} }
static u8 cpc710_eeprom_read ( static u8 cpc710_eeprom_read (unsigned int sdram, unsigned int offset)
unsigned int sdram,
unsigned int offset)
{ {
u8 dev = (sdram << 1) | 0xa0; u8 dev = (sdram << 1) | 0xa0;
u8 data; u8 data;
if (! i2c_read_byte(& data, dev,offset)) if (!i2c_read_byte (&data, dev, offset)) {
{
puts ("I2C error !\n"); puts ("I2C error !\n");
hang (); hang ();
} }

View file

@ -26,8 +26,7 @@
#include <config.h> #include <config.h>
typedef struct sconsole_buffer_s typedef struct sconsole_buffer_s {
{
unsigned long size; unsigned long size;
unsigned long max_size; unsigned long max_size;
unsigned long pos; unsigned long pos;

View file

@ -184,8 +184,7 @@ static void copydwords (ulong *source, ulong *destination, ulong nlongs)
ulong temp,temp1; ulong temp,temp1;
ulong *dstend = destination + nlongs; ulong *dstend = destination + nlongs;
while (destination < dstend) while (destination < dstend) {
{
temp = *source++; temp = *source++;
/* dummy read from sdram */ /* dummy read from sdram */
temp1 = *(ulong *)0xa0000000; temp1 = *(ulong *)0xa0000000;

View file

@ -26,8 +26,7 @@
#include <config.h> #include <config.h>
typedef struct sconsole_buffer_s typedef struct sconsole_buffer_s {
{
unsigned long size; unsigned long size;
unsigned long max_size; unsigned long max_size;
unsigned long pos; unsigned long pos;

View file

@ -31,4 +31,3 @@ int fpga_boot(unsigned char *fpgadata, int size);
#define ERROR_FPGA_PRG_INIT_LOW -1 /* Timeout after PRG* asserted */ #define ERROR_FPGA_PRG_INIT_LOW -1 /* Timeout after PRG* asserted */
#define ERROR_FPGA_PRG_INIT_HIGH -2 /* Timeout after PRG* deasserted */ #define ERROR_FPGA_PRG_INIT_HIGH -2 /* Timeout after PRG* deasserted */
#define ERROR_FPGA_PRG_DONE -3 /* Timeout after programming */ #define ERROR_FPGA_PRG_DONE -3 /* Timeout after programming */
/* vim: set ts=4 sw=4 tw=78: */

View file

@ -79,8 +79,7 @@ unsigned long flash_init (void)
} }
/* Only one bank */ /* Only one bank */
if (CFG_MAX_FLASH_BANKS == 1) if (CFG_MAX_FLASH_BANKS == 1) {
{
/* Setup offsets */ /* Setup offsets */
flash_get_offsets (FLASH_BASE1_PRELIM, &flash_info[0]); flash_get_offsets (FLASH_BASE1_PRELIM, &flash_info[0]);
@ -98,15 +97,11 @@ unsigned long flash_init (void)
#endif #endif
size_b1 = 0 ; size_b1 = 0 ;
flash_info[0].size = size_b0; flash_info[0].size = size_b0;
} } else { /* 2 banks */
/* 2 banks */
else
{
size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)FLASH_BASE1_PRELIM, &flash_info[1]); size_b1 = flash_get_size((volatile FLASH_WORD_SIZE *)FLASH_BASE1_PRELIM, &flash_info[1]);
/* Re-do sizing to get full correct info */ /* Re-do sizing to get full correct info */
if (size_b1) if (size_b1) {
{
mtdcr(ebccfga, pb0cr); mtdcr(ebccfga, pb0cr);
pbcr = mfdcr(ebccfgd); pbcr = mfdcr(ebccfgd);
mtdcr(ebccfga, pb0cr); mtdcr(ebccfga, pb0cr);
@ -115,8 +110,7 @@ unsigned long flash_init (void)
mtdcr(ebccfgd, pbcr); mtdcr(ebccfgd, pbcr);
} }
if (size_b0) if (size_b0) {
{
mtdcr(ebccfga, pb1cr); mtdcr(ebccfga, pb1cr);
pbcr = mfdcr(ebccfgd); pbcr = mfdcr(ebccfgd);
mtdcr(ebccfga, pb1cr); mtdcr(ebccfga, pb1cr);
@ -616,7 +610,8 @@ ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
int flash_erase (flash_info_t * info, int s_first, int s_last) int flash_erase (flash_info_t * info, int s_first, int s_last)
{ {
volatile FLASH_WORD_SIZE *addr=(volatile FLASH_WORD_SIZE*)(info->start[0]); volatile FLASH_WORD_SIZE *addr =
(volatile FLASH_WORD_SIZE *) (info->start[0]);
int flag, prot, sect, l_sect, barf; int flag, prot, sect, l_sect, barf;
ulong start, now, last; ulong start, now, last;
int rcode = 0; int rcode = 0;
@ -645,8 +640,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
} }
if (prot) { if (prot) {
printf ("- Warning: %d protected sectors will not be erased!\n", printf ("- Warning: %d protected sectors will not be erased!\n", prot);
prot);
} else { } else {
printf ("\n"); printf ("\n");
} }
@ -695,8 +689,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
last = start; last = start;
addr = (volatile FLASH_WORD_SIZE *) (info->start[l_sect]); addr = (volatile FLASH_WORD_SIZE *) (info->start[l_sect]);
while ((addr[0] & (0x00800080 & FLASH_ID_MASK)) != while ((addr[0] & (0x00800080 & FLASH_ID_MASK)) !=
(0x00800080&FLASH_ID_MASK) ) (0x00800080 & FLASH_ID_MASK)) {
{
if ((now = get_timer (start)) > CFG_FLASH_ERASE_TOUT) { if ((now = get_timer (start)) > CFG_FLASH_ERASE_TOUT) {
printf ("Timeout\n"); printf ("Timeout\n");
return 1; return 1;
@ -740,15 +733,19 @@ DONE:
barf = addr[0] & 0x003A; barf = addr[0] & 0x003A;
#endif #endif
if (barf) { if (barf) {
printf("\nFlash error in sector at %lx\n",(unsigned long)addr); printf ("\nFlash error in sector at %lx\n",
if(barf & 0x0002) printf("Block locked, not erased.\n"); (unsigned long) addr);
if (barf & 0x0002)
printf ("Block locked, not erased.\n");
if ((barf & 0x0030) == 0x0030) if ((barf & 0x0030) == 0x0030)
printf ("Command Sequence error.\n"); printf ("Command Sequence error.\n");
if ((barf & 0x0030) == 0x0020) if ((barf & 0x0030) == 0x0020)
printf ("Block Erase error.\n"); printf ("Block Erase error.\n");
if(barf & 0x0008) printf("Vpp Low error.\n"); if (barf & 0x0008)
printf ("Vpp Low error.\n");
rcode = 1; rcode = 1;
} else printf("."); } else
printf (".");
l_sect = sect; l_sect = sect;
} }
addr = (volatile FLASH_WORD_SIZE *) info->start[0]; addr = (volatile FLASH_WORD_SIZE *) info->start[0];
@ -1113,8 +1110,6 @@ static int write_short (flash_info_t *info, ulong dest, ushort data)
return (0); return (0);
} }
#endif #endif
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------*/
*/

View file

@ -111,8 +111,7 @@
#define TSC2000_DELAY_BASE 500 #define TSC2000_DELAY_BASE 500
#define TSC2000_NO_SENSOR -0x10000 #define TSC2000_NO_SENSOR -0x10000
#define ERROR_BATTERY 220 /* must be adjusted, if R68 is changed on #define ERROR_BATTERY 220 /* must be adjusted, if R68 is changed on TRAB */
* TRAB */
void tsc2000_write(unsigned short, unsigned short); void tsc2000_write(unsigned short, unsigned short);
unsigned short tsc2000_read (unsigned short); unsigned short tsc2000_read (unsigned short);

View file

@ -46,14 +46,12 @@
#define FALSE 0 #define FALSE 0
#endif #endif
/*#if defined(CONFIG_CMD_DATE) */ /*#if defined(CONFIG_CMD_DATE) */
/*#include <rtc.h> */ /*#include <rtc.h> */
/*#endif */ /*#endif */
#if defined(CONFIG_CMD_FDC) || defined(CONFIG_CMD_FDOS) #if defined(CONFIG_CMD_FDC) || defined(CONFIG_CMD_FDOS)
typedef struct { typedef struct {
int flags; /* connected drives ect */ int flags; /* connected drives ect */
unsigned long blnr; /* Logical block nr */ unsigned long blnr; /* Logical block nr */
@ -64,6 +62,7 @@ typedef struct {
uchar result[11]; /* status information */ uchar result[11]; /* status information */
uchar resultlen; /* lenght of result */ uchar resultlen; /* lenght of result */
} FDC_COMMAND_STRUCT; } FDC_COMMAND_STRUCT;
/* flags: only the lower 8bit used: /* flags: only the lower 8bit used:
* bit 0 if set drive 0 is present * bit 0 if set drive 0 is present
* bit 1 if set drive 1 is present * bit 1 if set drive 1 is present
@ -75,7 +74,6 @@ typedef struct {
* bit 7 if set disk in drive 4 is inserted * bit 7 if set disk in drive 4 is inserted
*/ */
/* cmd indexes */ /* cmd indexes */
#define COMMAND 0 #define COMMAND 0
#define DRIVE 1 #define DRIVE 1

View file

@ -196,9 +196,7 @@ do_test (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
expr = !expr; expr = !expr;
#if 0 debug (": returns %d\n", expr);
printf(": returns %d\n", expr);
#endif
return expr; return expr;
} }

View file

@ -1,4 +1,3 @@
/* vi: set sw=4 ts=4: */
/* /*
* sh.c -- a prototype Bourne shell grammar parser * sh.c -- a prototype Bourne shell grammar parser
* Intended to follow the original Thompson and Ritchie * Intended to follow the original Thompson and Ritchie

View file

@ -386,21 +386,19 @@ static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned long pipe);
/* +1 so we can align the storage */ /* +1 so we can align the storage */
td_t gtd[NUM_TD + 1]; td_t gtd[NUM_TD + 1];
/* pointers to aligned storage */ /* pointers to aligned storage */
td_t *ptd; td_t *ptd;
/* TDs ... */ /* TDs ... */
static inline struct td * static inline struct td *td_alloc (struct usb_device *usb_dev)
td_alloc (struct usb_device *usb_dev)
{ {
int i; int i;
struct td *td; struct td *td;
td = NULL; td = NULL;
for (i = 0; i < NUM_TD; i++) for (i = 0; i < NUM_TD; i++) {
{ if (ptd[i].usb_dev == NULL) {
if (ptd[i].usb_dev == NULL)
{
td = &ptd[i]; td = &ptd[i];
td->usb_dev = usb_dev; td->usb_dev = usb_dev;
break; break;
@ -410,8 +408,7 @@ td_alloc (struct usb_device *usb_dev)
return td; return td;
} }
static inline void static inline void ed_free (struct ed *ed)
ed_free (struct ed *ed)
{ {
ed->usb_dev = NULL; ed->usb_dev = NULL;
} }

View file

@ -538,18 +538,17 @@ static int tx_send_loop = 0;
static int dm644x_eth_send_packet (volatile void *packet, int length) static int dm644x_eth_send_packet (volatile void *packet, int length)
{ {
int ret_status = -1; int ret_status = -1;
tx_send_loop = 0; tx_send_loop = 0;
/* Return error if no link */ /* Return error if no link */
if (!phy.get_link_speed(active_phy_addr)) if (!phy.get_link_speed (active_phy_addr)) {
{
printf ("WARN: emac_send_packet: No link\n"); printf ("WARN: emac_send_packet: No link\n");
return (ret_status); return (ret_status);
} }
/* Check packet size and if < EMAC_MIN_ETHERNET_PKT_SIZE, pad it up */ /* Check packet size and if < EMAC_MIN_ETHERNET_PKT_SIZE, pad it up */
if (length < EMAC_MIN_ETHERNET_PKT_SIZE) if (length < EMAC_MIN_ETHERNET_PKT_SIZE) {
{
length = EMAC_MIN_ETHERNET_PKT_SIZE; length = EMAC_MIN_ETHERNET_PKT_SIZE;
} }
@ -597,18 +596,21 @@ static int dm644x_eth_rcv_packet(void)
/* Error in packet - discard it and requeue desc */ /* Error in packet - discard it and requeue desc */
printf ("WARN: emac_rcv_pkt: Error in packet\n"); printf ("WARN: emac_rcv_pkt: Error in packet\n");
} else { } else {
NetReceive(rx_curr_desc->buffer, (rx_curr_desc->buff_off_len & 0xffff)); NetReceive (rx_curr_desc->buffer,
(rx_curr_desc->buff_off_len & 0xffff));
ret = rx_curr_desc->buff_off_len & 0xffff; ret = rx_curr_desc->buff_off_len & 0xffff;
} }
/* Ack received packet descriptor */ /* Ack received packet descriptor */
adap_emac->RX0CP = (unsigned int) rx_curr_desc; adap_emac->RX0CP = (unsigned int) rx_curr_desc;
curr_desc = rx_curr_desc; curr_desc = rx_curr_desc;
emac_rx_active_head = (volatile emac_desc *)rx_curr_desc->next; emac_rx_active_head =
(volatile emac_desc *) rx_curr_desc->next;
if (status & EMAC_CPPI_EOQ_BIT) { if (status & EMAC_CPPI_EOQ_BIT) {
if (emac_rx_active_head) { if (emac_rx_active_head) {
adap_emac->RX0HDP = (unsigned int)emac_rx_active_head; adap_emac->RX0HDP =
(unsigned int) emac_rx_active_head;
} else { } else {
emac_rx_queue_active = 0; emac_rx_queue_active = 0;
printf ("INFO:emac_rcv_packet: RX Queue not active\n"); printf ("INFO:emac_rcv_packet: RX Queue not active\n");
@ -625,7 +627,8 @@ static int dm644x_eth_rcv_packet(void)
emac_rx_active_head = curr_desc; emac_rx_active_head = curr_desc;
emac_rx_active_tail = curr_desc; emac_rx_active_tail = curr_desc;
if (emac_rx_queue_active != 0) { if (emac_rx_queue_active != 0) {
adap_emac->RX0HDP = (unsigned int)emac_rx_active_head; adap_emac->RX0HDP =
(unsigned int) emac_rx_active_head;
printf ("INFO: emac_rcv_pkt: active queue head = 0, HDP fired\n"); printf ("INFO: emac_rcv_pkt: active queue head = 0, HDP fired\n");
emac_rx_queue_active = 1; emac_rx_queue_active = 1;
} }

View file

@ -122,60 +122,143 @@ void handle_scsi_int(void);
void scsi_print_error (ccb * pccb) void scsi_print_error (ccb * pccb)
{ {
int i; int i;
printf("SCSI Error: Target %d LUN %d Command %02X\n",pccb->target, pccb->lun, pccb->cmd[0]);
printf ("SCSI Error: Target %d LUN %d Command %02X\n", pccb->target,
pccb->lun, pccb->cmd[0]);
printf (" CCB: "); printf (" CCB: ");
for (i = 0; i < pccb->cmdlen; i++) for (i = 0; i < pccb->cmdlen; i++)
printf ("%02X ", pccb->cmd[i]); printf ("%02X ", pccb->cmd[i]);
printf ("(len=%d)\n", pccb->cmdlen); printf ("(len=%d)\n", pccb->cmdlen);
printf (" Cntrl: "); printf (" Cntrl: ");
switch (pccb->contr_stat) { switch (pccb->contr_stat) {
case SIR_COMPLETE: printf("Complete (no Error)\n"); break; case SIR_COMPLETE:
case SIR_SEL_ATN_NO_MSG_OUT: printf("Selected with ATN no MSG out phase\n"); break; printf ("Complete (no Error)\n");
case SIR_CMD_OUT_ILL_PH: printf("Command out illegal phase\n"); break; break;
case SIR_MSG_RECEIVED: printf("MSG received Error\n"); break; case SIR_SEL_ATN_NO_MSG_OUT:
case SIR_DATA_IN_ERR: printf("Data in Error\n"); break; printf ("Selected with ATN no MSG out phase\n");
case SIR_DATA_OUT_ERR: printf("Data out Error\n"); break; break;
case SIR_SCRIPT_ERROR: printf("Script Error\n"); break; case SIR_CMD_OUT_ILL_PH:
case SIR_MSG_OUT_NO_CMD: printf("MSG out no Command phase\n"); break; printf ("Command out illegal phase\n");
case SIR_MSG_OVER7: printf("MSG in over 7 bytes\n"); break; break;
case INT_ON_FY: printf("Interrupt on fly\n"); break; case SIR_MSG_RECEIVED:
case SCSI_SEL_TIME_OUT: printf("SCSI Selection Timeout\n"); break; printf ("MSG received Error\n");
case SCSI_HNS_TIME_OUT: printf("SCSI Handshake Timeout\n"); break; break;
case SCSI_MA_TIME_OUT: printf("SCSI Phase Error\n"); break; case SIR_DATA_IN_ERR:
case SCSI_UNEXP_DIS: printf("SCSI unexpected disconnect\n"); break; printf ("Data in Error\n");
default: printf("unknown status %lx\n",pccb->contr_stat); break; break;
case SIR_DATA_OUT_ERR:
printf ("Data out Error\n");
break;
case SIR_SCRIPT_ERROR:
printf ("Script Error\n");
break;
case SIR_MSG_OUT_NO_CMD:
printf ("MSG out no Command phase\n");
break;
case SIR_MSG_OVER7:
printf ("MSG in over 7 bytes\n");
break;
case INT_ON_FY:
printf ("Interrupt on fly\n");
break;
case SCSI_SEL_TIME_OUT:
printf ("SCSI Selection Timeout\n");
break;
case SCSI_HNS_TIME_OUT:
printf ("SCSI Handshake Timeout\n");
break;
case SCSI_MA_TIME_OUT:
printf ("SCSI Phase Error\n");
break;
case SCSI_UNEXP_DIS:
printf ("SCSI unexpected disconnect\n");
break;
default:
printf ("unknown status %lx\n", pccb->contr_stat);
break;
} }
printf (" Sense: SK %x (", pccb->sense_buf[2] & 0x0f); printf (" Sense: SK %x (", pccb->sense_buf[2] & 0x0f);
switch (pccb->sense_buf[2] & 0xf) { switch (pccb->sense_buf[2] & 0xf) {
case SENSE_NO_SENSE: printf("No Sense)"); break; case SENSE_NO_SENSE:
case SENSE_RECOVERED_ERROR: printf("Recovered Error)"); break; printf ("No Sense)");
case SENSE_NOT_READY: printf("Not Ready)"); break; break;
case SENSE_MEDIUM_ERROR: printf("Medium Error)"); break; case SENSE_RECOVERED_ERROR:
case SENSE_HARDWARE_ERROR: printf("Hardware Error)"); break; printf ("Recovered Error)");
case SENSE_ILLEGAL_REQUEST: printf("Illegal request)"); break; break;
case SENSE_UNIT_ATTENTION: printf("Unit Attention)"); break; case SENSE_NOT_READY:
case SENSE_DATA_PROTECT: printf("Data Protect)"); break; printf ("Not Ready)");
case SENSE_BLANK_CHECK: printf("Blank check)"); break; break;
case SENSE_VENDOR_SPECIFIC: printf("Vendor specific)"); break; case SENSE_MEDIUM_ERROR:
case SENSE_COPY_ABORTED: printf("Copy aborted)"); break; printf ("Medium Error)");
case SENSE_ABORTED_COMMAND: printf("Aborted Command)"); break; break;
case SENSE_VOLUME_OVERFLOW: printf("Volume overflow)"); break; case SENSE_HARDWARE_ERROR:
case SENSE_MISCOMPARE: printf("Misscompare\n"); break; printf ("Hardware Error)");
default: printf("Illegal Sensecode\n"); break; break;
case SENSE_ILLEGAL_REQUEST:
printf ("Illegal request)");
break;
case SENSE_UNIT_ATTENTION:
printf ("Unit Attention)");
break;
case SENSE_DATA_PROTECT:
printf ("Data Protect)");
break;
case SENSE_BLANK_CHECK:
printf ("Blank check)");
break;
case SENSE_VENDOR_SPECIFIC:
printf ("Vendor specific)");
break;
case SENSE_COPY_ABORTED:
printf ("Copy aborted)");
break;
case SENSE_ABORTED_COMMAND:
printf ("Aborted Command)");
break;
case SENSE_VOLUME_OVERFLOW:
printf ("Volume overflow)");
break;
case SENSE_MISCOMPARE:
printf ("Misscompare\n");
break;
default:
printf ("Illegal Sensecode\n");
break;
} }
printf(" ASC %x ASCQ %x\n",pccb->sense_buf[12],pccb->sense_buf[13]); printf (" ASC %x ASCQ %x\n", pccb->sense_buf[12],
pccb->sense_buf[13]);
printf (" Status: "); printf (" Status: ");
switch (pccb->status) { switch (pccb->status) {
case S_GOOD : printf("Good\n"); break; case S_GOOD:
case S_CHECK_COND: printf("Check condition\n"); break; printf ("Good\n");
case S_COND_MET: printf("Condition Met\n"); break; break;
case S_BUSY: printf("Busy\n"); break; case S_CHECK_COND:
case S_INT: printf("Intermediate\n"); break; printf ("Check condition\n");
case S_INT_COND_MET: printf("Intermediate condition met\n"); break; break;
case S_CONFLICT: printf("Reservation conflict\n"); break; case S_COND_MET:
case S_TERMINATED: printf("Command terminated\n"); break; printf ("Condition Met\n");
case S_QUEUE_FULL: printf("Task set full\n"); break; break;
default: printf("unknown: %02X\n",pccb->status); break; case S_BUSY:
printf ("Busy\n");
break;
case S_INT:
printf ("Intermediate\n");
break;
case S_INT_COND_MET:
printf ("Intermediate condition met\n");
break;
case S_CONFLICT:
printf ("Reservation conflict\n");
break;
case S_TERMINATED:
printf ("Command terminated\n");
break;
case S_QUEUE_FULL:
printf ("Task set full\n");
break;
default:
printf ("unknown: %02X\n", pccb->status);
break;
} }
} }
@ -252,8 +335,7 @@ void handle_scsi_int(void)
if((stat & DIP)==DIP) { /* DMA Interrupt pending */ if((stat & DIP)==DIP) { /* DMA Interrupt pending */
stat1=scsi_read_byte(DSTAT); stat1=scsi_read_byte(DSTAT);
#ifdef SCSI_SINGLE_STEP #ifdef SCSI_SINGLE_STEP
if((stat1 & SSI)==SSI) if((stat1 & SSI)==SSI) {
{
tt=in32r(scsi_mem_addr+DSP); tt=in32r(scsi_mem_addr+DSP);
if(((tt)>=start_script_select) && ((tt)<start_script_select+len_script_select)) { if(((tt)>=start_script_select) && ((tt)<start_script_select+len_script_select)) {
printf("select %d\n",(tt-start_script_select)>>2); printf("select %d\n",(tt-start_script_select)>>2);

View file

@ -761,8 +761,7 @@ static void update_srom(struct eth_device *dev, bd_t *bis)
eeprom[0x0b] = ((bis->bi_enetaddr[3] & 0xff) << 8) | (bis->bi_enetaddr[2] & 0xff); eeprom[0x0b] = ((bis->bi_enetaddr[3] & 0xff) << 8) | (bis->bi_enetaddr[2] & 0xff);
eeprom[0x0c] = ((bis->bi_enetaddr[5] & 0xff) << 8) | (bis->bi_enetaddr[4] & 0xff); eeprom[0x0c] = ((bis->bi_enetaddr[5] & 0xff) << 8) | (bis->bi_enetaddr[4] & 0xff);
for (i=0; i<0x40; i++) for (i=0; i<0x40; i++) {
{
write_srom(dev, DE4X5_APROM, i, eeprom[i]); write_srom(dev, DE4X5_APROM, i, eeprom[i]);
} }
} }

View file

@ -30,7 +30,6 @@
#include <asm/types.h> #include <asm/types.h>
#include <config.h> #include <config.h>
#ifdef CONFIG_DRIVER_RTL8019 #ifdef CONFIG_DRIVER_RTL8019
#define RTL8019_REG_00 (RTL8019_BASE + 0x00) #define RTL8019_REG_00 (RTL8019_BASE + 0x00)
@ -94,7 +93,6 @@
#define RTL8019_DMA_DATA RTL8019_REG_10 #define RTL8019_DMA_DATA RTL8019_REG_10
#define RTL8019_RESET RTL8019_REG_1f #define RTL8019_RESET RTL8019_REG_1f
#define RTL8019_PAGE0 0x22 #define RTL8019_PAGE0 0x22
#define RTL8019_PAGE1 0x62 #define RTL8019_PAGE1 0x62
#define RTL8019_PAGE0DMAWRITE 0x12 #define RTL8019_PAGE0DMAWRITE 0x12
@ -113,5 +111,4 @@
#define RTL8019_PSTOP 0x80 #define RTL8019_PSTOP 0x80
#define RTL8019_TPSTART 0x40 #define RTL8019_TPSTART 0x40
#endif /*end of CONFIG_DRIVER_RTL8019*/ #endif /*end of CONFIG_DRIVER_RTL8019*/

View file

@ -1091,7 +1091,6 @@ typedef struct s_PnmiData {
SK_PNMI_VCT_TIMER VctTimeout[SK_MAX_MACS]; SK_PNMI_VCT_TIMER VctTimeout[SK_MAX_MACS];
} SK_PNMI; } SK_PNMI;
/* /*
* Function prototypes * Function prototypes
*/ */

View file

@ -1264,8 +1264,7 @@ int Port) /* Port Index (MAC_1 + n) */
if (pPrt->PRxQSize == SK_MIN_RXQ_SIZE) { if (pPrt->PRxQSize == SK_MIN_RXQ_SIZE) {
RxQType = SK_RX_SRAM_Q; /* small Rx Queue */ RxQType = SK_RX_SRAM_Q; /* small Rx Queue */
} } else {
else {
RxQType = SK_RX_BRAM_Q; /* big Rx Queue */ RxQType = SK_RX_BRAM_Q; /* big Rx Queue */
} }

View file

@ -89,8 +89,7 @@
extern SK_AC *pACList; extern SK_AC *pACList;
extern struct net_device *SkGeRootDev; extern struct net_device *SkGeRootDev;
extern char * SkNumber( extern char *SkNumber (char *str,
char * str,
long long num, long long num,
int base, int base,
int size, int size,

View file

@ -1,4 +1,3 @@
/* vi: set sw=4 ts=4: */
/* /*
* mode_string implementation for busybox * mode_string implementation for busybox
* *

View file

@ -203,5 +203,4 @@ typedef struct mmc_csd
ecc:2; ecc:2;
} mmc_csd_t; } mmc_csd_t;
#endif /* __MMC_PXA_P_H__ */ #endif /* __MMC_PXA_P_H__ */

View file

@ -760,5 +760,3 @@
#endif #endif
#endif /* __CONFIG_GEN860T_H */ #endif /* __CONFIG_GEN860T_H */
/* vim: set ts=4 tw=78 ai shiftwidth=4: */

View file

@ -46,7 +46,10 @@
#define CONFIG_BAUDRATE 115200 /* console baudrate */ #define CONFIG_BAUDRATE 115200 /* console baudrate */
#define CONFIG_BOOTDELAY 5 /* autoboot after this many seconds */ #define CONFIG_BOOTDELAY 5 /* autoboot after this many seconds */
#define CONFIG_PREBOOT "echo;echo To mount root over NFS use \"run bootnet\";echo To mount root from FLASH use \"run bootflash\";echo" #define CONFIG_PREBOOT "echo;" \
"echo To mount root over NFS use \"run bootnet\";" \
"echo To mount root from FLASH use \"run bootflash\";" \
"echo"
#define CONFIG_BOOTARGS "root=/dev/mtdblock2 rw" #define CONFIG_BOOTARGS "root=/dev/mtdblock2 rw"
#define CONFIG_BOOTCOMMAND \ #define CONFIG_BOOTCOMMAND \
"bootp; " \ "bootp; " \

0
include/configs/apollon.h Executable file → Normal file
View file

View file

@ -169,7 +169,6 @@
"" ""
#endif #endif
/* /*
* BOOTP options * BOOTP options
*/ */
@ -178,7 +177,6 @@
#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_HOSTNAME #define CONFIG_BOOTP_HOSTNAME
/* /*
* Command line configuration. * Command line configuration.
*/ */
@ -193,7 +191,6 @@
#define CONFIG_CMD_DHCP #define CONFIG_CMD_DHCP
#endif #endif
/* /*
* Console settings * Console settings
*/ */

View file

@ -90,7 +90,8 @@
/*#define CONFIG_BOOTDELAY 10*/ /*#define CONFIG_BOOTDELAY 10*/
/* args and cmd for uClinux-image @ 0x10020000, ramdisk-image @ 0x100a0000 */ /* args and cmd for uClinux-image @ 0x10020000, ramdisk-image @ 0x100a0000 */
#define CONFIG_BOOTCOMMAND "bootm 0x10020000 0x100a0000" #define CONFIG_BOOTCOMMAND "bootm 0x10020000 0x100a0000"
#define CONFIG_BOOTARGS "console=ttyS0,38400 initrd=0x100a0040,530K root=/dev/ram keepinitrd" #define CONFIG_BOOTARGS "console=ttyS0,38400 initrd=0x100a0040,530K " \
"root=/dev/ram keepinitrd"
#if defined(CONFIG_CMD_KGDB) #if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */

View file

@ -106,7 +106,9 @@
#define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTDELAY 3
#define CONFIG_BOOTARGS "console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.1:/friendly-arm/rootfs_netserv ip=192.168.0.69:192.168.0.1:192.168.0.1:255.255.255.0:debian:eth0:off" #define CONFIG_BOOTARGS "console=ttySAC0 root=/dev/nfs " \
"nfsroot=192.168.0.1:/friendly-arm/rootfs_netserv " \
"ip=192.168.0.69:192.168.0.1:192.168.0.1:255.255.255.0:debian:eth0:off"
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b #define CONFIG_ETHADDR 08:00:3e:26:0a:5b
#define CONFIG_NETMASK 255.255.255.0 #define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.0.69 #define CONFIG_IPADDR 192.168.0.69

View file

@ -88,8 +88,12 @@
#define CONFIG_BOOTDELAY 15 #define CONFIG_BOOTDELAY 15
#define CONFIG_BOOTARGS "root=/dev/mtdblock1 console=ttyS0,9600 mtdparts=phys:7936k(root),256k(uboot) " #define CONFIG_BOOTARGS "root=/dev/mtdblock1 console=ttyS0,9600 " \
#define CONFIG_BOOTCOMMAND "setenv bootargs root=/dev/nfs ip=autoconf console=ttyS0,9600 mtdparts=phys:7808k(root),128k(env),256k(uboot); bootp; bootm" "mtdparts=phys:7936k(root),256k(uboot) "
#define CONFIG_BOOTCOMMAND "setenv bootargs root=/dev/nfs ip=autoconf " \
"console=ttyS0,9600 " \
"mtdparts=phys:7808k(root),128k(env),256k(uboot);" \
"bootp;bootm"
#if defined(CONFIG_CMD_KGDB) #if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */

View file

@ -114,17 +114,9 @@
#define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTDELAY 3
#if 0
#define CONFIG_BOOTARGS "root=ramfs devfs=mount console=ttySA0,9600"
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b
#endif
#define CONFIG_NETMASK 255.255.255.0 #define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 134.98.93.36 #define CONFIG_IPADDR 134.98.93.36
#define CONFIG_SERVERIP 134.98.93.22 #define CONFIG_SERVERIP 134.98.93.22
#if 0
#define CONFIG_BOOTFILE "elinos-lart"
#define CONFIG_BOOTCOMMAND "tftp; bootm"
#endif
#if defined(CONFIG_CMD_KGDB) #if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */

View file

@ -116,5 +116,3 @@ typedef struct {
{ Xilinx_Virtex2, iface, XILINX_XC2V10000_SIZE, fn_table, cookie } { Xilinx_Virtex2, iface, XILINX_XC2V10000_SIZE, fn_table, cookie }
#endif /* _VIRTEX2_H_ */ #endif /* _VIRTEX2_H_ */
/* vim: set ts=4 tw=78: */