summaryrefslogtreecommitdiff
path: root/board/mpl/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/mpl/common
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
* Code cleanup:LABEL_2003_06_27_2340
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'board/mpl/common')
-rw-r--r--board/mpl/common/common_util.c6
-rw-r--r--board/mpl/common/common_util.h1
-rw-r--r--board/mpl/common/flash.c8
-rw-r--r--board/mpl/common/isa.c24
-rw-r--r--board/mpl/common/isa.h3
-rw-r--r--board/mpl/common/kbd.c8
-rw-r--r--board/mpl/common/memtst.c4
-rw-r--r--board/mpl/common/pci_parts.h6
-rw-r--r--board/mpl/common/piix4_pci.h2
-rw-r--r--board/mpl/common/usb_uhci.c1
-rw-r--r--board/mpl/common/usb_uhci.h2
11 files changed, 15 insertions, 50 deletions
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index 503654e2962..e2672f7b11c 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -56,7 +56,6 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */
static image_header_t header;
-
int mpl_prg(unsigned long src,unsigned long size)
{
unsigned long start;
@@ -348,7 +347,6 @@ void check_env(void)
}
-
extern device_t *stdio_devices[];
extern char *stdio_names[];
@@ -454,10 +452,10 @@ int get_boot_mode(void)
unsigned long pbcr;
int res = 0;
pbcr = mfdcr (strap);
- if ((pbcr & PSR_ROM_WIDTH_MASK) == 0)
+ if ((pbcr & PSR_ROM_WIDTH_MASK) == 0)
/* boot via MPS or MPS mapping */
res = BOOT_MPS;
- if(pbcr & PSR_ROM_LOC)
+ if(pbcr & PSR_ROM_LOC)
/* boot via PCI.. */
res |= BOOT_PCI;
return res;
diff --git a/board/mpl/common/common_util.h b/board/mpl/common/common_util.h
index caf7f9b3ca2..bcc79229f15 100644
--- a/board/mpl/common/common_util.h
+++ b/board/mpl/common/common_util.h
@@ -46,4 +46,3 @@ void doc_init (void);
#endif
#endif /* _COMMON_UTIL_H_ */
-
diff --git a/board/mpl/common/flash.c b/board/mpl/common/flash.c
index 563039b9cd0..28f6f0a22b0 100644
--- a/board/mpl/common/flash.c
+++ b/board/mpl/common/flash.c
@@ -251,7 +251,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
/* printf("Device value %x\n",value); */
switch (value) {
case (FLASH_WORD_SIZE)AMD_ID_F040B:
- info->flash_id += FLASH_AM040;
+ info->flash_id += FLASH_AM040;
info->sector_count = 8;
info->size = 0x0080000; /* => 512 ko */
break;
@@ -494,7 +494,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
wait_for_DQ7(info, sect);
}
else {
- if((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL){
+ if((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL){
addr2[0] = (FLASH_WORD_SIZE)0x00600060; /* unlock sector */
addr2[0] = (FLASH_WORD_SIZE)0x00D000D0; /* sector erase */
intel_wait_for_DQ7(info, sect);
@@ -659,7 +659,7 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
{
volatile FLASH_WORD_SIZE *addr2 = (FLASH_WORD_SIZE *)(info->start[0]);
volatile FLASH_WORD_SIZE *dest2 = (FLASH_WORD_SIZE *)dest;
- volatile FLASH_WORD_SIZE *data2 = (FLASH_WORD_SIZE *)&data;
+ volatile FLASH_WORD_SIZE *data2 = (FLASH_WORD_SIZE *)&data;
ulong start;
int flag;
int i;
@@ -708,7 +708,7 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
while ((dest2[i] & (FLASH_WORD_SIZE)0x00800080) !=
(data2[i] & (FLASH_WORD_SIZE)0x00800080)) {
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
- return (1);
+ return (1);
}
}
}
diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c
index 40731fc79f4..1788d5117e9 100644
--- a/board/mpl/common/isa.c
+++ b/board/mpl/common/isa.c
@@ -50,7 +50,6 @@ extern int drv_isa_kbd_init (void);
#endif
-
/* fdc (logical device 0) */
const SIO_LOGDEV_TABLE sio_fdc[] = {
{0x60, 3}, /* set IO to FDPort (3F0) */
@@ -186,7 +185,6 @@ void isa_sio_setup(void)
}
-
/******************************************************************************
* IRQ Controller
* we use the Vector mode
@@ -396,12 +394,12 @@ int handle_isa_int(void)
/* we should handle cascaded interrupts here also */
/* printf("ISA Irq %d\n",irq); */
isa_irqs[irq].count++;
- if (isa_irqs[irq].handler != NULL)
- (*isa_irqs[irq].handler)(isa_irqs[irq].arg); /* call isr */
- else
- {
- PRINTF ("bogus interrupt vector 0x%x\n", irq);
- }
+ if (isa_irqs[irq].handler != NULL)
+ (*isa_irqs[irq].handler)(isa_irqs[irq].arg); /* call isr */
+ else
+ {
+ PRINTF ("bogus interrupt vector 0x%x\n", irq);
+ }
}
/* issue EOI instruction to clear the IRQ */
mask_and_ack_8259A(irq);
@@ -409,7 +407,6 @@ int handle_isa_int(void)
}
-
/******************************************************************
* Install and free an ISA interrupt handler.
*/
@@ -418,12 +415,12 @@ void isa_irq_install_handler(int vec, interrupt_handler_t *handler, void *arg)
{
if (isa_irqs[vec].handler != NULL) {
printf ("ISA Interrupt vector %d: handler 0x%x replacing 0x%x\n",
- vec, (uint)handler, (uint)isa_irqs[vec].handler);
+ vec, (uint)handler, (uint)isa_irqs[vec].handler);
}
isa_irqs[vec].handler = handler;
isa_irqs[vec].arg = arg;
enable_8259A_irq(vec);
- PRINTF ("Install ISA IRQ %d ==> %p, @ %p mask=%04x\n", vec, handler, &isa_irqs[vec].handler,cached_irq_mask);
+ PRINTF ("Install ISA IRQ %d ==> %p, @ %p mask=%04x\n", vec, handler, &isa_irqs[vec].handler,cached_irq_mask);
}
@@ -432,7 +429,7 @@ void isa_irq_free_handler(int vec)
disable_8259A_irq(vec);
isa_irqs[vec].handler = NULL;
isa_irqs[vec].arg = NULL;
- printf ("Free ISA IRQ %d mask=%04x\n", vec, cached_irq_mask);
+ printf ("Free ISA IRQ %d mask=%04x\n", vec, cached_irq_mask);
}
@@ -464,6 +461,3 @@ int isa_init(void)
drv_isa_kbd_init();
return 0;
}
-
-
-
diff --git a/board/mpl/common/isa.h b/board/mpl/common/isa.h
index 66dd2c98042..578222d440b 100644
--- a/board/mpl/common/isa.h
+++ b/board/mpl/common/isa.h
@@ -27,7 +27,6 @@
#define SIO_CFG_PORT 0x3F0 /* Config Port Address */
-
/* table fore SIO initialization */
typedef struct {
const uchar index;
@@ -40,8 +39,6 @@ typedef struct {
} SIO_TABLE;
-
-
unsigned char open_cfg_super_IO(int address);
unsigned char read_cfg_super_IO(int address, unsigned char function, unsigned char regaddr);
void write_cfg_super_IO(int address, unsigned char function, unsigned char regaddr, unsigned char data);
diff --git a/board/mpl/common/kbd.c b/board/mpl/common/kbd.c
index 5b87cdb5395..9bd1ff94d46 100644
--- a/board/mpl/common/kbd.c
+++ b/board/mpl/common/kbd.c
@@ -137,8 +137,6 @@ void enable_8259A_irq(unsigned int irq);
#define KBD_BUFFER_LEN 0x20 /* size of the keyboardbuffer */
-
-
static volatile char kbd_buffer[KBD_BUFFER_LEN];
static volatile int in_pointer = 0;
static volatile int out_pointer = 0;
@@ -450,7 +448,6 @@ unsigned char handle_kbd_event(void)
}
-
/******************************************************************************
* Lowlevel Part of keyboard section
*/
@@ -648,8 +645,3 @@ void kbd_interrupt(void)
{
handle_kbd_event();
}
-
-
-
-/* eof */
-
diff --git a/board/mpl/common/memtst.c b/board/mpl/common/memtst.c
index 122ba2ecdce..c994a8b05f4 100644
--- a/board/mpl/common/memtst.c
+++ b/board/mpl/common/memtst.c
@@ -65,9 +65,6 @@ int testdram (void)
#define MEGABYTE (1024*1024)
-
-
-
typedef struct {
volatile unsigned long pat1;
volatile unsigned long pat2;
@@ -444,7 +441,6 @@ void *RAM_MemTest_Check2Addr2 (int mode, unsigned long startaddr,
}
-
typedef struct {
void (*test_write) (unsigned long startaddr, unsigned long size,
unsigned long *pat);
diff --git a/board/mpl/common/pci_parts.h b/board/mpl/common/pci_parts.h
index a8e3232fc05..82426f3d033 100644
--- a/board/mpl/common/pci_parts.h
+++ b/board/mpl/common/pci_parts.h
@@ -59,7 +59,6 @@
#define PCI_IRQ_VECTOR(x) ((PCI_DEV(x) + 10) % 4) + 28
-
/* PCI Device List for PIP405 */
/* Mapping:
@@ -191,8 +190,3 @@ static struct pci_config_table pci_pip405_config_table[]={
{ }
};
#endif /* _PCI_PARTS_H_ */
-
-
-
-
-
diff --git a/board/mpl/common/piix4_pci.h b/board/mpl/common/piix4_pci.h
index 5a0fd5ea221..3c0523f2506 100644
--- a/board/mpl/common/piix4_pci.h
+++ b/board/mpl/common/piix4_pci.h
@@ -22,7 +22,6 @@
*/
-
#ifndef _PIIX4_PCI_H
#define _PIIX4_PCI_H
@@ -163,5 +162,4 @@
#define PCI_CFG_PIIX4_SMBBA 0x90
-
#endif
diff --git a/board/mpl/common/usb_uhci.c b/board/mpl/common/usb_uhci.c
index 83624a9dae7..4a10b7969b7 100644
--- a/board/mpl/common/usb_uhci.c
+++ b/board/mpl/common/usb_uhci.c
@@ -1088,7 +1088,6 @@ static void usb_display_wValue(unsigned short wValue,unsigned short wIndex)
#endif
-
#ifdef USB_UHCI_DEBUG
static int usb_display_td(uhci_td_t *td)
diff --git a/board/mpl/common/usb_uhci.h b/board/mpl/common/usb_uhci.h
index 8c8f1615e32..af8083751ee 100644
--- a/board/mpl/common/usb_uhci.h
+++ b/board/mpl/common/usb_uhci.h
@@ -186,5 +186,3 @@ struct virt_root_hub {
#endif /* _USB_UHCI_H_ */
-
-