summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 04:37:44 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 04:37:44 +0000
commitac7af4a359cc51bc06e1bf0ed3314744972b8395 (patch)
tree7c73805f8b66af9b3082fbde80f6eb70edd966ac /c/src/lib/libbsp
parent2009-11-30 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-ac7af4a359cc51bc06e1bf0ed3314744972b8395.tar.bz2
Whitespace removal.
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/alloc360.c8
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/config.c24
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/console.c18
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/m68360.h44
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c48
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c6
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/polled_io.c142
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.c42
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.h44
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/include/bsp.h16
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c12
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/irq/openpic_xxx_irq.c2
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/pci/no_host_bridge.c8
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/start/start.S4
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c52
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/vme/VMEConfig.h22
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/console/config.c2
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/console/console.c18
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/console/ns16550cfg.c6
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/i2c/i2c_init.c4
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/include/hwreg_vals.h24
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/include/irq.h2
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/irq/irq.c6
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/network/network.c12
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/spi/spi_init.c12
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/start/start.S86
-rw-r--r--c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c24
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/dlentry/dlentry.S26
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/irq/irq.c44
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/irq/irq.h12
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/irq/irq_init.c6
-rw-r--r--c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h10
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c16
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/include/smsc9218i.h100
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c16
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspgetworkarea.c2
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c8
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S14
-rw-r--r--c/src/lib/libbsp/powerpc/mpc55xxevb/tests/tests.c14
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c32
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/flash/flashcfg.c18
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/i2c/i2c_init.c20
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c24
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c_busdrv.h18
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h24
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/irq/irq.h2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/irq/irq_init.c4
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/network/if_tsec_pub.h36
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/network/tsec.c102
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c20
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/start/start.S6
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c16
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/startup/misc.c18
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h18
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c36
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c8
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h210
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c96
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h10
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c30
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c112
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.h10
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260ethreg.h34
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c136
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wmreg.h2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c4
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c18
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h8
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c36
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c10
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c14
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/start/start.S40
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c30
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c2
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h18
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c30
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/irq/irq_init.c6
-rw-r--r--c/src/lib/libbsp/powerpc/psim/network/if_sim.c4
-rw-r--r--c/src/lib/libbsp/powerpc/qemuppc/console/console-io.c2
-rw-r--r--c/src/lib/libbsp/powerpc/qemuppc/start/start.S2
-rw-r--r--c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c2
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/PCI_bus/universe.c4
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/console/85c30.c2
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c2
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/irq/irq.c6
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c2
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c12
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/vme/VMEConfig.h18
-rw-r--r--c/src/lib/libbsp/powerpc/shared/bootloader/pci.c16
-rw-r--r--c/src/lib/libbsp/powerpc/shared/clock/clock.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/bspreset.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/console.c6
-rw-r--r--c/src/lib/libbsp/powerpc/shared/console/uart.c4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/flash/flash.c28
-rw-r--r--c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h22
-rw-r--r--c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h32
-rw-r--r--c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c26
-rw-r--r--c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c24
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/irq_init.c8
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/openpic_i8259_irq.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/motorola/motorola.c16
-rw-r--r--c/src/lib/libbsp/powerpc/shared/motorola/vpd.c26
-rw-r--r--c/src/lib/libbsp/powerpc/shared/motorola/vpd.h22
-rw-r--r--c/src/lib/libbsp/powerpc/shared/openpic/openpic.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/openpic/openpic.h2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/pci.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c22
-rw-r--r--c/src/lib/libbsp/powerpc/shared/start/preload.S14
-rw-r--r--c/src/lib/libbsp/powerpc/shared/start/start.S4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c2
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c10
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/panic.c34
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c18
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c18
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/probeMemEnd.c28
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/sbrk.c16
-rw-r--r--c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/uboot_getenv.c4
-rw-r--r--c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h18
-rw-r--r--c/src/lib/libbsp/powerpc/shared/vme/vme_universe.c24
-rw-r--r--c/src/lib/libbsp/powerpc/shared/vme/vmeconfig.c18
-rw-r--r--c/src/lib/libbsp/powerpc/ss555/startup/start.S2
-rw-r--r--c/src/lib/libbsp/powerpc/ss555/startup/tm27supp.c38
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/console/console.c102
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h14
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/include/irq.h2
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/include/tqm.h2
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c38
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/network/network_fec.c16
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.c88
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.h2
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c10
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/startup/cpuinit.c4
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/startup/mmutlbtab.c2
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/startup/start.S66
-rw-r--r--c/src/lib/libbsp/powerpc/tqm8xx/timer/timer.c2
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/dlentry/dlentry.S4
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/include/opbintctrl.h2
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/include/xparameters_dflt.h4
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/irq/irq.h6
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c14
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/network/xiltemac.c94
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/network/xiltemac.h8
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/opbintctrl/opbintctrl.c8
-rw-r--r--c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c6
-rw-r--r--c/src/lib/libbsp/shared/umon/cli.h4
-rw-r--r--c/src/lib/libbsp/shared/umon/monlib.c16
-rw-r--r--c/src/lib/libbsp/shared/umon/tfs.h6
-rw-r--r--c/src/lib/libbsp/shared/umon/umoncons.c30
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/VME.h18
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/VMEDMA.h22
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.c26
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.h20
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaListP.h18
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c58
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.h48
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148DMA.h18
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c70
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h56
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vmeUniverseDMA.h18
-rw-r--r--c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h22
171 files changed, 1884 insertions, 1884 deletions
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/alloc360.c b/c/src/lib/libbsp/powerpc/ep1a/console/alloc360.c
index 0d1b31b729..57e887fe7d 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/alloc360.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/alloc360.c
@@ -25,15 +25,15 @@
#include <rtems/bspIo.h>
-#define DEBUG_PRINT 1
+#define DEBUG_PRINT 1
void M360SetupMemory( M68360_t ptr ){
volatile m360_t *m360;
-
+
m360 = ptr->m360;
#if DEBUG_PRINT
-printk("m360->mcr:0x%08x Q1_360_SIM_MCR:0x%08x\n",
+printk("m360->mcr:0x%08x Q1_360_SIM_MCR:0x%08x\n",
(unsigned int)&(m360->mcr), ((unsigned int)m360+Q1_360_SIM_MCR));
#endif
ptr->bdregions[0].base = (char *)&m360->dpram1[0];
@@ -93,7 +93,7 @@ M360AllocateBufferDescriptors (M68360_t ptr, int count)
continue;
}
*cp = 0x0;
- }
+ }
have = ptr->bdregions[i].size - ptr->bdregions[i].used;
if (have >= want) {
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/config.c b/c/src/lib/libbsp/powerpc/ep1a/console/config.c
index 9e0a952f8c..a2f390b431 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/config.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/config.c
@@ -1,6 +1,6 @@
/*
* This file contains the TTY driver table for the EP1A
- *
+ *
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
@@ -386,47 +386,47 @@ static bool config_68360_scc_base_probe(int minor, unsigned long busNo, unsigned
static bool config_68360_scc_base_probe_1( int minor ) {
return config_68360_scc_base_probe(minor, 0, 11, 1);
}
-
+
static bool config_68360_scc_base_probe_2( int minor ) {
return config_68360_scc_base_probe(minor, 0, 11, 2);
}
-
+
static bool config_68360_scc_base_probe_3( int minor ) {
return config_68360_scc_base_probe( minor, 0, 11, 3);
}
-
+
static bool config_68360_scc_base_probe_4( int minor ) {
return config_68360_scc_base_probe( minor, 0, 11, 4);
}
-
+
static bool config_68360_scc_base_probe_5( int minor ) {
return config_68360_scc_base_probe( minor, 0, 16, 1);
}
-
+
static bool config_68360_scc_base_probe_6( int minor ) {
return config_68360_scc_base_probe( minor, 0, 16, 2);
}
-
+
static bool config_68360_scc_base_probe_7( int minor ) {
return config_68360_scc_base_probe( minor, 0, 16, 3);
}
-
+
static bool config_68360_scc_base_probe_8( int minor ) {
return config_68360_scc_base_probe( minor, 0, 16, 4);
}
-
+
static bool config_68360_scc_base_probe_9( int minor ) {
return config_68360_scc_base_probe( minor, 0, 15, 1);
}
-
+
static bool config_68360_scc_base_probe_10( int minor ) {
return config_68360_scc_base_probe( minor, 0, 15, 2);
}
-
+
static bool config_68360_scc_base_probe_11( int minor ) {
return config_68360_scc_base_probe( minor, 0, 15, 3);
}
-
+
static bool config_68360_scc_base_probe_12( int minor ) {
return config_68360_scc_base_probe( minor, 0, 15, 4);
}
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/console.c b/c/src/lib/libbsp/powerpc/ep1a/console/console.c
index 6ea68b436d..58da412042 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/console.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/console.c
@@ -1,5 +1,5 @@
/*
- * This file contains the TTY driver for the ep1a
+ * This file contains the TTY driver for the ep1a
*
* This driver uses the termios pseudo driver.
*
@@ -32,7 +32,7 @@
console_data Console_Port_Data[NUM_CONSOLE_PORTS];
unsigned long Console_Port_Count;
rtems_device_minor_number Console_Port_Minor;
-
+
/* PAGE
*
* console_open
@@ -70,9 +70,9 @@ rtems_device_driver console_open(
Callbacks.pollRead = c->deviceRead;
Callbacks.write = c->deviceWrite;
Callbacks.setAttributes = c->deviceSetAttributes;
- Callbacks.stopRemoteTx =
+ Callbacks.stopRemoteTx =
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx;
- Callbacks.startRemoteTx =
+ Callbacks.startRemoteTx =
Console_Port_Tbl[minor].pDeviceFlow->deviceStartRemoteTx;
Callbacks.outputUsesInterrupts = c->deviceOutputUsesInterrupts;
status = rtems_termios_open ( major, minor, arg, &Callbacks);
@@ -102,7 +102,7 @@ rtems_device_driver console_open(
return status;
}
-
+
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -120,7 +120,7 @@ rtems_device_driver console_close(
return rtems_termios_close (arg);
}
-
+
rtems_device_driver console_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -129,7 +129,7 @@ rtems_device_driver console_read(
{
return rtems_termios_read (arg);
}
-
+
rtems_device_driver console_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -138,7 +138,7 @@ rtems_device_driver console_write(
{
return rtems_termios_write (arg);
}
-
+
rtems_device_driver console_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -194,7 +194,7 @@ rtems_device_driver console_initialize(
*/
rtems_fatal_error_occurred(RTEMS_IO_ERROR);
}
-
+
Console_Port_Minor=minor;
/*
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/m68360.h b/c/src/lib/libbsp/powerpc/ep1a/console/m68360.h
index c1077f482e..eee2c69285 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/m68360.h
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/m68360.h
@@ -1,20 +1,20 @@
/*
- * MOTOROLA MC68360 QUAD INTEGRATED COMMUNICATIONS CONTROLLER (QUICC)
- *
- * HARDWARE DECLARATIONS
- *
- *
- * Submitted By:
- *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * 107 North Road
- * Saskatoon, Saskatchewan, CANADA
- * S7N 5C6
- *
- * eric@skatter.usask.ca
- *
+ * MOTOROLA MC68360 QUAD INTEGRATED COMMUNICATIONS CONTROLLER (QUICC)
+ *
+ * HARDWARE DECLARATIONS
+ *
+ *
+ * Submitted By:
+ *
+ * W. Eric Norum
+ * Saskatchewan Accelerator Laboratory
+ * University of Saskatchewan
+ * 107 North Road
+ * Saskatoon, Saskatchewan, CANADA
+ * S7N 5C6
+ *
+ * eric@skatter.usask.ca
+ *
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
@@ -759,7 +759,7 @@ typedef struct m360_ {
volatile uint8_t _pad14[0xF0-0xD0];
volatile uint8_t _pad15[0x100-0xF0];
volatile uint8_t _pad16[0x500-0x100];
-
+
/*
* IDMA1 Block
*/
@@ -777,7 +777,7 @@ typedef struct m360_ {
volatile uint8_t csr1;
volatile uint8_t _pad21;
volatile uint16_t _pad22;
-
+
/*
* SDMA Block
*/
@@ -785,7 +785,7 @@ typedef struct m360_ {
volatile uint8_t _pad23;
volatile uint16_t sdcr;
volatile uint32_t sdar;
-
+
/*
* IDMA2 Block
*/
@@ -802,7 +802,7 @@ typedef struct m360_ {
volatile uint8_t _pad28;
volatile uint16_t _pad29;
volatile uint32_t _pad30;
-
+
/*
* CPIC Block
*/
@@ -826,7 +826,7 @@ typedef struct m360_ {
volatile uint16_t pcint;
volatile uint16_t _pad32;
volatile uint32_t _pad33[5];
-
+
/*
* TIMER Block
*/
@@ -854,7 +854,7 @@ typedef struct m360_ {
volatile uint16_t ter3;
volatile uint16_t ter4;
volatile uint32_t _pad36[2];
-
+
/*
* CP Block
*/
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c b/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
index 975e9a6104..ede9133864 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/mc68360_scc.c
@@ -148,10 +148,10 @@ void scc_write32(
void mc68360_sccShow_Regs(int minor){
M68360_serial_ports_t ptr;
ptr = Console_Port_Tbl[minor].pDeviceParams;
-
+
printk( "scce 0x%08x", &ptr->pSCCR->scce );
printk( " 0x%04x\n", ptr->pSCCR->scce );
-
+
}
#define TX_BUFFER_ADDRESS( _ptr ) \
@@ -212,11 +212,11 @@ mc68360_sccBRGC(int baud, int m360_clock_rate)
else data = (33333333 / (baud * 16 * 16) ) - 1;
data *= 2;
data &= 0x00001ffe ;
-
+
/* really data = 0x010000 | data | ((baud>300)? 0 : 1 ) ; */
data |= ((baud>300)? 0 : 1 ) ;
data |= 0x010000 ;
-
+
return data;
}
@@ -285,7 +285,7 @@ if (length > 1)
&data,
1);
}
- scc_write16( "sccRxBd->status", &chip->port[port].sccRxBd->status,
+ scc_write16( "sccRxBd->status", &chip->port[port].sccRxBd->status,
M360_BD_EMPTY | M360_BD_WRAP | M360_BD_INTERRUPT );
status =scc_read16( "sccRxBd->status", &chip->port[port].sccRxBd->status);
}
@@ -304,10 +304,10 @@ if (length > 1)
scc_write16("sccTxBd->status",&chip->port[port].sccTxBd->status,0);
#if 1
rtems_termios_dequeue_characters(
- Console_Port_Data[chip->port[port].minor].termios_data,
+ Console_Port_Data[chip->port[port].minor].termios_data,
chip->port[port].sccTxBd->length);
#else
- mc68360_scc_write_support_int(chip->port[port].minor,"*****", 5);
+ mc68360_scc_write_support_int(chip->port[port].minor,"*****", 5);
#endif
}
}
@@ -378,7 +378,7 @@ uint32_t mc68360_scc_calculate_pbdat( M68360_t chip )
pbdat_data = 0x3;
for (i=0; i<4; i++) {
minor = chip->port[i].minor;
- if mc68360_scc_Is_422( minor )
+ if mc68360_scc_Is_422( minor )
pbdat_data |= type422data[i];
}
@@ -408,7 +408,7 @@ void mc68360_scc_initialize_interrupts(int minor)
ptr = Console_Port_Tbl[minor].pDeviceParams;
m360 = ptr->chip->m360;
-
+
#ifdef DEBUG_360
printk("m360 0x%08x baseaddr 0x%08x\n",
m360, ptr->chip->board_data->baseaddr);
@@ -585,7 +585,7 @@ void mc68360_scc_initialize_interrupts(int minor)
scc_write16( "sccRxBd->status", &ptr->sccRxBd->status, 0x0000 );
SYNC();
scc_write16( "sccRxBd->length", &ptr->sccRxBd->length, 0x0000 );
- scc_write16( "sccRxBd->status", &ptr->sccRxBd->status,
+ scc_write16( "sccRxBd->status", &ptr->sccRxBd->status,
M360_BD_EMPTY | M360_BD_WRAP | M360_BD_INTERRUPT );
/* XXX Radstone Example writes RX buffer ptr as two u16's */
scc_write32( "sccRxBd->buffer", &ptr->sccRxBd->buffer,
@@ -612,14 +612,14 @@ void mc68360_scc_initialize_interrupts(int minor)
scc_write16( "pSCCR->sccm", &ptr->pSCCR->sccm, M360_SCCE_TX | M360_SCCE_RX );
- data = scc_read32("cimr", &m360->cimr);
+ data = scc_read32("cimr", &m360->cimr);
data |= (0x80000000 >> ptr->channel);
scc_write32( "cimr", &m360->cimr, data );
SYNC();
scc_write32( "cipr", &m360->cipr, scc_read32( "cipr", &m360->cipr ) );
scc_write32( "pSCCR->gsmr_h", &ptr->pSCCR->gsmr_h, M360_GSMR_RFW );
- scc_write32( "pSCCR->gsmr_l", &ptr->pSCCR->gsmr_l,
+ scc_write32( "pSCCR->gsmr_l", &ptr->pSCCR->gsmr_l,
(M360_GSMR_TDCR_16X | M360_GSMR_RDCR_16X | M360_GSMR_MODE_UART) );
scc_write16( "pSCCR->dsr", &ptr->pSCCR->dsr, 0x7e7e );
@@ -641,12 +641,12 @@ void mc68360_scc_initialize_interrupts(int minor)
data = PMCQ1_Read_EPLD(ptr->chip->board_data->baseaddr, PMCQ1_INT_MASK );
data &= (~PMCQ1_INT_MASK_QUICC);
- PMCQ1_Write_EPLD(ptr->chip->board_data->baseaddr, PMCQ1_INT_MASK, data );
-
+ PMCQ1_Write_EPLD(ptr->chip->board_data->baseaddr, PMCQ1_INT_MASK, data );
+
data = PMCQ1_Read_EPLD(ptr->chip->board_data->baseaddr, PMCQ1_INT_STATUS );
data &= (~PMCQ1_INT_STATUS_QUICC);
PMCQ1_Write_EPLD(ptr->chip->board_data->baseaddr, PMCQ1_INT_STATUS, data );
-#endif
+#endif
}
/*
@@ -696,10 +696,10 @@ int mc68360_scc_write_support_int(
scc_write16( "sccTxBd->status", &ptr->sccTxBd->status, 0 );
memcpy((void *) ptr->txBuf, buf, len);
- scc_write32( "sccTxBd->buffer", &ptr->sccTxBd->buffer,
+ scc_write32( "sccTxBd->buffer", &ptr->sccTxBd->buffer,
TX_BUFFER_ADDRESS(ptr->txBuf) );
scc_write16( "sccTxBd->length", &ptr->sccTxBd->length, len );
- scc_write16( "sccTxBd->status", &ptr->sccTxBd->status,
+ scc_write16( "sccTxBd->status", &ptr->sccTxBd->status,
(M360_BD_READY | M360_BD_WRAP | M360_BD_INTERRUPT) );
rtems_interrupt_enable(Irql);
@@ -802,18 +802,18 @@ printk("mc68360_scc_set_attributes\n");
else
value |= M360_PSMR_SL_1; /* One stop bit */
- /* Set Parity M360_PSMR_PEN bit should be clear on no parity so
- * do nothing in that case
+ /* Set Parity M360_PSMR_PEN bit should be clear on no parity so
+ * do nothing in that case
*/
if (t->c_cflag & PARENB) /* enable parity detection? */
{
- value |= M360_PSMR_PEN;
+ value |= M360_PSMR_PEN;
if (t->c_cflag & PARODD){
value |= M360_PSMR_RPM_ODD; /* select odd parity */
- value |= M360_PSMR_TPM_ODD;
+ value |= M360_PSMR_TPM_ODD;
} else {
value |= M360_PSMR_RPM_EVEN; /* select even parity */
- value |= M360_PSMR_TPM_EVEN;
+ value |= M360_PSMR_TPM_EVEN;
}
}
@@ -865,7 +865,7 @@ int mc68360_scc_write_support_polled(
int len
)
{
- printk("mc68360_scc_write_support_polled: minor %d char %c len %d\n",
+ printk("mc68360_scc_write_support_polled: minor %d char %c len %d\n",
minor, buf, len );
return 0;
}
@@ -955,7 +955,7 @@ int mc68360_scc_create_chip( PPMCQ1BoardData BoardData, uint8_t int_vector )
chip->board_data->slotNo,
chip->board_data->funcNo,
&mc68360_sccInterruptHandler,
- chip
+ chip
);
return RTEMS_SUCCESSFUL;
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c b/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c
index 1a75435f37..8237193a7b 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/ns16550cfg.c
@@ -1,4 +1,4 @@
-/*
+/*
* This include file contains all console driver definations for the nc16550
*
* COPYRIGHT (c) 1989-2008.
@@ -14,7 +14,7 @@
#include <rtems.h>
#include <bsp.h>
#include "console.h"
-
+
typedef struct uart_reg
{
unsigned char reg;
@@ -41,7 +41,7 @@ void Write_ns16550_register(
{
volatile struct uart_reg *p = (volatile struct uart_reg *)ulCtrlPort;
volatile int i;
- p[ucRegNum].reg = ucData;
+ p[ucRegNum].reg = ucData;
asm volatile("sync");
asm volatile("isync");
asm volatile("eieio");
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/polled_io.c b/c/src/lib/libbsp/powerpc/ep1a/console/polled_io.c
index 9093456fcf..56015145cb 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/polled_io.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/polled_io.c
@@ -206,34 +206,34 @@ unsigned int keymap_count = 7;
*/
char func_buf[] = {
- '\033', '[', '[', 'A', 0,
- '\033', '[', '[', 'B', 0,
- '\033', '[', '[', 'C', 0,
- '\033', '[', '[', 'D', 0,
- '\033', '[', '[', 'E', 0,
- '\033', '[', '1', '7', '~', 0,
- '\033', '[', '1', '8', '~', 0,
- '\033', '[', '1', '9', '~', 0,
- '\033', '[', '2', '0', '~', 0,
- '\033', '[', '2', '1', '~', 0,
- '\033', '[', '2', '3', '~', 0,
- '\033', '[', '2', '4', '~', 0,
- '\033', '[', '2', '5', '~', 0,
- '\033', '[', '2', '6', '~', 0,
- '\033', '[', '2', '8', '~', 0,
- '\033', '[', '2', '9', '~', 0,
- '\033', '[', '3', '1', '~', 0,
- '\033', '[', '3', '2', '~', 0,
- '\033', '[', '3', '3', '~', 0,
- '\033', '[', '3', '4', '~', 0,
- '\033', '[', '1', '~', 0,
- '\033', '[', '2', '~', 0,
- '\033', '[', '3', '~', 0,
- '\033', '[', '4', '~', 0,
- '\033', '[', '5', '~', 0,
- '\033', '[', '6', '~', 0,
- '\033', '[', 'M', 0,
- '\033', '[', 'P', 0,
+ '\033', '[', '[', 'A', 0,
+ '\033', '[', '[', 'B', 0,
+ '\033', '[', '[', 'C', 0,
+ '\033', '[', '[', 'D', 0,
+ '\033', '[', '[', 'E', 0,
+ '\033', '[', '1', '7', '~', 0,
+ '\033', '[', '1', '8', '~', 0,
+ '\033', '[', '1', '9', '~', 0,
+ '\033', '[', '2', '0', '~', 0,
+ '\033', '[', '2', '1', '~', 0,
+ '\033', '[', '2', '3', '~', 0,
+ '\033', '[', '2', '4', '~', 0,
+ '\033', '[', '2', '5', '~', 0,
+ '\033', '[', '2', '6', '~', 0,
+ '\033', '[', '2', '8', '~', 0,
+ '\033', '[', '2', '9', '~', 0,
+ '\033', '[', '3', '1', '~', 0,
+ '\033', '[', '3', '2', '~', 0,
+ '\033', '[', '3', '3', '~', 0,
+ '\033', '[', '3', '4', '~', 0,
+ '\033', '[', '1', '~', 0,
+ '\033', '[', '2', '~', 0,
+ '\033', '[', '3', '~', 0,
+ '\033', '[', '4', '~', 0,
+ '\033', '[', '5', '~', 0,
+ '\033', '[', '6', '~', 0,
+ '\033', '[', 'M', 0,
+ '\033', '[', 'P', 0,
};
char *funcbufptr = func_buf;
@@ -321,7 +321,7 @@ unsigned int accent_table_size = 68;
/* These #defines have been copied from drivers/char/pc_keyb.h, by
- * Martin Mares (mj@ucw.cz).
+ * Martin Mares (mj@ucw.cz).
* converted to offsets by Till Straumann <strauman@slac.stanford.edu>
*/
#define KBD_STATUS_REG 0x4 /* Status register (R) */
@@ -386,7 +386,7 @@ SPR_RO(PVR)
#endif /* USE_KBD_SUPPORT */
-/* Early messages after mm init but before console init are kept in log
+/* Early messages after mm init but before console init are kept in log
* buffers.
*/
#define PAGE_LOG_CHARS (PAGE_SIZE-sizeof(int)-sizeof(u_long)-1)
@@ -511,7 +511,7 @@ static void pfree(void* p)
--global_index;
}
#endif
-
+
void log_putc(const u_char c) {
console_log *l;
@@ -521,11 +521,11 @@ void log_putc(const u_char c) {
if (!l) {
l=__palloc(sizeof(console_log));
memset(l, 0, sizeof(console_log));
- if (!console_global_data.log)
+ if (!console_global_data.log)
console_global_data.log = l;
else {
console_log *p;
- for (p=console_global_data.log;
+ for (p=console_global_data.log;
p->next; p=p->next);
p->next = l;
}
@@ -536,7 +536,7 @@ void log_putc(const u_char c) {
/* This puts is non standard since it does not automatically add a newline
* at the end. So it is made private to avoid confusion in other files.
*/
-static
+static
void puts(const u_char *s)
{
char c;
@@ -551,10 +551,10 @@ static
void flush_log(void) {
console_log *p, *next;
if (console_global_data.vacuum_sent) {
-#ifdef TRACE_FLUSH_LOG
- printk("%d characters sent into oblivion before MM init!\n",
+#ifdef TRACE_FLUSH_LOG
+ printk("%d characters sent into oblivion before MM init!\n",
console_global_data.vacuum_sent);
-#endif
+#endif
}
for(p=console_global_data.log; p; p=next) {
puts(p->data);
@@ -572,7 +572,7 @@ void serial_putc(const u_char c)
while ((INL_CONSOLE_INB(lsr) & LSR_THRE) == 0) ;
INL_CONSOLE_OUTB(thr, c);
}
-
+
int serial_getc(void)
{
while ((INL_CONSOLE_INB(lsr) & LSR_DR) == 0) ;
@@ -589,16 +589,16 @@ static void scroll(void)
{
int i;
- memcpy ( (u_char *)vidmem, (u_char *)vidmem + console_global_data.cols * 2,
+ memcpy ( (u_char *)vidmem, (u_char *)vidmem + console_global_data.cols * 2,
( console_global_data.lines - 1 ) * console_global_data.cols * 2 );
- for ( i = ( console_global_data.lines - 1 ) * console_global_data.cols * 2;
- i < console_global_data.lines * console_global_data.cols * 2;
+ for ( i = ( console_global_data.lines - 1 ) * console_global_data.cols * 2;
+ i < console_global_data.lines * console_global_data.cols * 2;
i += 2 )
vidmem[i] = ' ';
}
/*
- * cursor() sets an offset (0-1999) into the 80x25 text area
+ * cursor() sets an offset (0-1999) into the 80x25 text area
*/
static void
cursor(int x, int y)
@@ -610,7 +610,7 @@ cursor(int x, int y)
vga_outb(0x15, pos);
}
-void
+void
vga_putc(const u_char c)
{
int x,y;
@@ -630,7 +630,7 @@ vga_putc(const u_char c)
} else if (c == '\r') {
x = 0;
} else {
- vidmem [ ( x + console_global_data.cols * y ) * 2 ] = c;
+ vidmem [ ( x + console_global_data.cols * y ) * 2 ] = c;
if ( ++x >= console_global_data.cols ) {
x = 0;
if ( ++y >= console_global_data.lines ) {
@@ -767,7 +767,7 @@ static int kbd_get(int ms) {
else
return data;
}
- if (--ms < 0) return -1;
+ if (--ms < 0) return -1;
#ifdef __BOOT__
boot_udelay(1000);
#else
@@ -778,7 +778,7 @@ static int kbd_get(int ms) {
static void kbd_put(u_char c, int ms, int port) {
while (kbd_inb(KBD_STATUS_REG) & KBD_STAT_IBF) {
- if (--ms < 0) return;
+ if (--ms < 0) return;
#ifdef __BOOT__
boot_udelay(1000);
#else
@@ -802,14 +802,14 @@ int kbdreset(void)
/* Enable then reset the KB */
kbd_put(KBD_CCMD_KBD_ENABLE, 10, KBD_CNTL_REG);
-
+
while (1) {
kbd_put(KBD_CMD_RESET, 10, KBD_DATA_REG);
c = kbd_get(1000);
if (c == KBD_REPLY_ACK) break;
if (c != KBD_REPLY_RESEND) return 2;
}
-
+
if (kbd_get(1000) != KBD_REPLY_POR) return 3;
/* Disable the keyboard while setting up the controller */
@@ -818,7 +818,7 @@ int kbdreset(void)
/* Enable interrupts and keyboard controller */
kbd_put(KBD_CCMD_WRITE_MODE, 10, KBD_CNTL_REG);
- kbd_put(KBD_MODE_KBD_INT | KBD_MODE_SYS |
+ kbd_put(KBD_MODE_KBD_INT | KBD_MODE_SYS |
KBD_MODE_DISABLE_MOUSE | KBD_MODE_KCC,
10, KBD_DATA_REG);
@@ -835,30 +835,30 @@ int kbd_tstc(void)
}
#endif /* USE_KBD_SUPPORT */
-const struct console_io
+const struct console_io
vacuum_console_functions = {
- vacuum_putc,
- vacuum_getc,
+ vacuum_putc,
+ vacuum_getc,
vacuum_tstc
};
static const struct console_io
log_console_functions = {
- log_putc,
- vacuum_getc,
+ log_putc,
+ vacuum_getc,
vacuum_tstc
}
,
serial_console_functions = {
- serial_putc,
- serial_getc,
+ serial_putc,
+ serial_getc,
serial_tstc
}
#if defined(USE_KBD_SUPPORT) && defined(USE_VGA_SUPPORT)
,
vga_console_functions = {
- vga_putc,
- kbd_getc,
+ vga_putc,
+ kbd_getc,
kbd_tstc
}
#endif
@@ -868,7 +868,7 @@ console_io* curIo = (console_io*) &vacuum_console_functions;
int select_console(ioType t) {
static ioType curType = CONSOLE_VACUUM;
-
+
switch (t) {
case CONSOLE_VACUUM : curIo = (console_io*)&vacuum_console_functions; break;
case CONSOLE_LOG : curIo = (console_io*)&log_console_functions; break;
@@ -911,7 +911,7 @@ int printk(const char *fmt, ...) {
int i;
/* Should not be a problem with 8kB of stack */
char buf[1024];
-
+
va_start(args, fmt);
i = k_vsprintf(buf, fmt, args);
va_end(args);
@@ -949,7 +949,7 @@ do { u32 t1, t2, t3; \
"=r" (num), "=&r" (t1), "=&r" (t2), "=&r"(t3), "=&b" (rmd) : \
"0" (num)); \
\
-} while(0);
+} while(0);
#define SIGN 1 /* unsigned/signed long */
#define LARGE 2 /* use 'ABCDEF' instead of 'abcdef' */
@@ -976,7 +976,7 @@ static char * number(char * str, int size, int type, u64 num)
sign = '-';
num = -num;
size--;
- }
+ }
}
i = 0;
@@ -990,7 +990,7 @@ static char * number(char * str, int size, int type, u64 num)
}
tmp[i++] = digits[rem];
} while (num != 0);
-
+
size -= i;
if (!(type&(ZEROPAD)))
while(size-->0)
@@ -1024,14 +1024,14 @@ int k_vsprintf(char *buf, const char *fmt, va_list args)
*str++ = *fmt;
continue;
}
-
+
/* process flags, only 0 padding needed */
flags = 0;
if (*++fmt == '0' ) {
flags |= ZEROPAD;
fmt++;
}
-
+
/* get field width */
field_width = -1;
if (is_digit(*fmt))
@@ -1094,14 +1094,14 @@ int k_vsprintf(char *buf, const char *fmt, va_list args)
--fmt;
continue;
}
- /* This ugly code tries to minimize the number of va_arg()
- * since they expand to a lot of code on PPC under the SYSV
- * calling conventions (but not with -mcall-aix which has
+ /* This ugly code tries to minimize the number of va_arg()
+ * since they expand to a lot of code on PPC under the SYSV
+ * calling conventions (but not with -mcall-aix which has
* other problems). Arguments have at least the size of a
* long allocated, and we use this fact to minimize bloat.
* (and pointers are assimilated to unsigned long too).
*/
- if (sizeof(long long) > sizeof(long) && flags & LLONG)
+ if (sizeof(long long) > sizeof(long) && flags & LLONG)
num = va_arg(args, unsigned long long);
else {
u_long n = va_arg(args, unsigned long);
@@ -1111,10 +1111,10 @@ int k_vsprintf(char *buf, const char *fmt, va_list args)
else
n = (unsigned short) n;
} else if (! flags & LONG) {
- /* Here the compiler correctly removes this
+ /* Here the compiler correctly removes this
* do nothing code on 32 bit PPC.
*/
- if (flags & SIGN)
+ if (flags & SIGN)
n = (int) n;
else
n = (unsigned) n;
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.c b/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.c
index 764ab53eb1..4f45af45b8 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.c
@@ -1,6 +1,6 @@
/* rsPMCQ1.c - Radstone PMCQ1 Common Initialisation Code
*
- * Copyright 2000 Radstone Technology
+ * Copyright 2000 Radstone Technology
*
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
@@ -34,7 +34,7 @@ call rsPMCQ1Init() to perform ba sic initialisation of the PMCQ1's.
#include <libcpu/io.h>
#include <bsp/irq.h>
#include <stdlib.h>
-#include <rtems/bspIo.h>
+#include <rtems/bspIo.h>
#include <bsp/pci.h>
#include <bsp.h>
#include "rsPMCQ1.h"
@@ -103,7 +103,7 @@ int read32( int addr){
void rsPMCQ1_scc_nullFunc(void) {}
-
+
/*******************************************************************************
* rsPMCQ1Int - handle a PMCQ1 interrupt
*
@@ -185,7 +185,7 @@ unsigned int rsPMCQ1MaIntConnect (
for (boardData = pmcq1BoardData; boardData; boardData = boardData->pNext)
{
- if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
+ if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
(boardData->funcNo == funcNo))
{
boardData->maInt = routine;
@@ -206,7 +206,7 @@ unsigned int rsPMCQ1MaIntConnect (
return (status);
}
-
+
/*******************************************************************************
*
* rsPMCQ1MaIntDisconnect - disconnect a MiniAce interrupt routine
@@ -227,7 +227,7 @@ unsigned int rsPMCQ1MaIntDisconnect(
unsigned int status = RTEMS_IO_ERROR;
for (boardData = pmcq1BoardData; boardData; boardData = boardData->pNext) {
- if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
+ if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
(boardData->funcNo == funcNo))
{
boardData->maInt = NULL;
@@ -239,7 +239,7 @@ unsigned int rsPMCQ1MaIntDisconnect(
return (status);
}
-
+
/*******************************************************************************
*
* rsPMCQ1QuiccIntConnect - connect a Quicc interrupt routine
@@ -263,8 +263,8 @@ unsigned int rsPMCQ1QuiccIntConnect(
for (boardData = pmcq1BoardData; boardData; boardData = boardData->pNext)
{
- if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
- (boardData->funcNo == funcNo))
+ if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
+ (boardData->funcNo == funcNo))
{
boardData->quiccInt = routine;
boardData->quiccArg = arg;
@@ -274,7 +274,7 @@ unsigned int rsPMCQ1QuiccIntConnect(
}
return (status);
}
-
+
/*******************************************************************************
*
* rsPMCQ1QuiccIntDisconnect - disconnect a Quicc interrupt routine
@@ -294,9 +294,9 @@ unsigned int rsPMCQ1QuiccIntDisconnect(
PPMCQ1BoardData boardData;
unsigned int status = RTEMS_IO_ERROR;
- for (boardData = pmcq1BoardData; boardData; boardData = boardData->pNext)
+ for (boardData = pmcq1BoardData; boardData; boardData = boardData->pNext)
{
- if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
+ if ((boardData->busNo == busNo) && (boardData->slotNo == slotNo) &&
(boardData->funcNo == funcNo))
{
boardData->quiccInt = NULL;
@@ -308,8 +308,8 @@ unsigned int rsPMCQ1QuiccIntDisconnect(
return (status);
}
-
-
+
+
/*******************************************************************************
*
* rsPMCQ1Init - initialize the PMCQ1's
@@ -363,7 +363,7 @@ unsigned int rsPMCQ1Init(void)
eieio();
/*
- * Hold QBus in reset for 1ms
+ * Hold QBus in reset for 1ms
*/
MsDelay();
@@ -376,7 +376,7 @@ unsigned int rsPMCQ1Init(void)
/* If a QUICC is fitted initialise it */
if (PMCQ1_Read_EPLD(baseaddr, PMCQ1_BUILD_OPTION) & PMCQ1_QUICC_FITTED)
{
-#ifdef DEBUG_360
+#ifdef DEBUG_360
printk(" Found QUICC busNo %d slotNo %d\n", busNo, slotNo);
#endif
@@ -393,7 +393,7 @@ unsigned int rsPMCQ1Init(void)
eieio();
/* Disable the SWT and perform basic initialisation */
- write8(baseaddr+Q1_360_SIM_SYPCR,0);
+ write8(baseaddr+Q1_360_SIM_SYPCR,0);
eieio();
write32(baseaddr+Q1_360_SIM_MCR,0xa0001029);
@@ -411,11 +411,11 @@ unsigned int rsPMCQ1Init(void)
eieio();
write32(baseaddr+Q1_360_SIM_OR0,0x1ff00000); /*| MEMC_OR_FC*/
eieio();
- write32(baseaddr+Q1_360_SIM_BR0,0);
+ write32(baseaddr+Q1_360_SIM_BR0,0);
eieio();
write32(baseaddr+Q1_360_SIM_OR1,(0x5ff00000 | 0x00000780)); /*| MEMC_OR_FC*/
eieio();
- write32(baseaddr+Q1_360_SIM_BR1,(0x00000040 | 0x00000001 | 0x00200280) );
+ write32(baseaddr+Q1_360_SIM_BR1,(0x00000040 | 0x00000001 | 0x00200280) );
eieio();
}
@@ -465,7 +465,7 @@ unsigned int rsPMCQ1Init(void)
/*
* Enable PMCQ1 Interrupts from QSPAN-II
*/
-
+
*(unsigned long *)(bridgeaddr + 0x600) = 0x00001000;
eieio();
*(unsigned long *)(bridgeaddr + 0x604) |= 0x00001000;
@@ -549,7 +549,7 @@ unsigned int rsPMCQ1Commission( unsigned long busNo, unsigned long slotNo )
printk("Error writing byte %d expected 0x%02x got 0x%02x\n",
i, rsPMCQ1eeprom[i], (unsigned char)(val >> 8));
status = RTEMS_IO_ERROR;
- break;
+ break;
}
}
}
diff --git a/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.h b/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.h
index bc78217103..3304ed369e 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.h
+++ b/c/src/lib/libbsp/powerpc/ep1a/console/rsPMCQ1.h
@@ -37,28 +37,28 @@
* PMCQ1 definitions
*/
-/*
- * 360 definitions
+/*
+ * 360 definitions
*/
#define Q1_360_MBAR 0x0003ff00 /* master base address register */
#define REG_B_OFFSET 0x1000 /* offset to the internal registers */
-#define Q1_360_SIM_MCR (REG_B_OFFSET+0x00)
-#define Q1_360_SIM_PEPAR (REG_B_OFFSET+0x16)
-#define Q1_360_SIM_SYPCR (REG_B_OFFSET+0x22)
-#define Q1_360_SIM_PICR (REG_B_OFFSET+0x26)
-#define Q1_360_SIM_PITR (REG_B_OFFSET+0x2A)
-#define Q1_360_SIM_GMR (REG_B_OFFSET+0x40)
-#define Q1_360_SIM_BR0 (REG_B_OFFSET+0x50)
-#define Q1_360_SIM_OR0 (REG_B_OFFSET+0x54)
-#define Q1_360_SIM_BR1 (REG_B_OFFSET+0x60)
-#define Q1_360_SIM_OR1 (REG_B_OFFSET+0x64)
-
-#define Q1_360_CPM_ICCR (REG_B_OFFSET+0x500)
-#define Q1_360_CPM_SDCR (REG_B_OFFSET+0x51E)
-#define Q1_360_CPM_CICR (REG_B_OFFSET+0x540)
+#define Q1_360_SIM_MCR (REG_B_OFFSET+0x00)
+#define Q1_360_SIM_PEPAR (REG_B_OFFSET+0x16)
+#define Q1_360_SIM_SYPCR (REG_B_OFFSET+0x22)
+#define Q1_360_SIM_PICR (REG_B_OFFSET+0x26)
+#define Q1_360_SIM_PITR (REG_B_OFFSET+0x2A)
+#define Q1_360_SIM_GMR (REG_B_OFFSET+0x40)
+#define Q1_360_SIM_BR0 (REG_B_OFFSET+0x50)
+#define Q1_360_SIM_OR0 (REG_B_OFFSET+0x54)
+#define Q1_360_SIM_BR1 (REG_B_OFFSET+0x60)
+#define Q1_360_SIM_OR1 (REG_B_OFFSET+0x64)
+
+#define Q1_360_CPM_ICCR (REG_B_OFFSET+0x500)
+#define Q1_360_CPM_SDCR (REG_B_OFFSET+0x51E)
+#define Q1_360_CPM_CICR (REG_B_OFFSET+0x540)
/*
* EPLD offsets
@@ -123,9 +123,9 @@ typedef void (*FUNCION_PTR) (int);
-typedef struct _PMCQ1BoardData
+typedef struct _PMCQ1BoardData
{
- struct _PMCQ1BoardData *pNext;
+ struct _PMCQ1BoardData *pNext;
unsigned long busNo;
unsigned long slotNo;
unsigned long funcNo;
@@ -143,10 +143,10 @@ extern PPMCQ1BoardData pmcq1BoardData;
* Function declarations
*/
extern unsigned int rsPMCQ1QuiccIntConnect(
- unsigned long busNo,
- unsigned long slotNo,
- unsigned long funcNo,
- FUNCION_PTR routine,
+ unsigned long busNo,
+ unsigned long slotNo,
+ unsigned long funcNo,
+ FUNCION_PTR routine,
int arg
);
unsigned int rsPMCQ1Init(void);
diff --git a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
index b51ed74a0f..eafa292676 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
@@ -21,18 +21,18 @@
#include <bsp/vectors.h>
/* fundamental addresses for BSP (CHRPxxx and PREPxxx are from libcpu/io.h) */
-#define _IO_BASE CHRP_ISA_IO_BASE
+#define _IO_BASE CHRP_ISA_IO_BASE
#define _ISA_MEM_BASE CHRP_ISA_MEM_BASE
/* address of our ram on the PCI bus */
#define PCI_DRAM_OFFSET CHRP_PCI_DRAM_OFFSET
#define PCI_MEM_BASE 0x80000000
-#define PCI_MEM_BASE_ADJUSTMENT 0
+#define PCI_MEM_BASE_ADJUSTMENT 0
/* address of our ram on the PCI bus */
#define PCI_DRAM_OFFSET CHRP_PCI_DRAM_OFFSET
/* offset of pci memory as seen from the CPU */
#undef PCI_MEM_BASE
-#define PCI_MEM_BASE 0x00000000
+#define PCI_MEM_BASE 0x00000000
/* Override the default values for the following DEFAULT */
#define PCI_CONFIG_ADDR 0xfec00000 /* 0xcf8 */
@@ -67,7 +67,7 @@
#define PMC_SLOT1_PRESENT 0x02
#define PMC_SLOT2_PRESENT 0x01
-
+
/* BOARD_REVISION_REGISTER1 */
#define ARTWORK_REVISION_MASK 0xf0
#define BUILD_REVISION_MASK 0x0f
@@ -105,7 +105,7 @@
* address definitions for several devices
*
*/
-#define UART_OFFSET_1_8245 (0x04500)
+#define UART_OFFSET_1_8245 (0x04500)
#define UART_OFFSET_2_8245 (0x04600)
#define UART_BASE_COM1 0xff800000
#define UART_BASE_COM2 0xff800040
@@ -117,7 +117,7 @@
* 8245 docs.
* This is an offset from EUMBBAR
*/
-#define BSP_OPEN_PIC_BASE_OFFSET 0x40000
+#define BSP_OPEN_PIC_BASE_OFFSET 0x40000
/* BSP_PIC_DO_EOI is optionally used by the 'vmeUniverse' driver
* to implement VME IRQ priorities in software.
@@ -151,7 +151,7 @@
extern unsigned int EUMBBAR;
/*
- * Total memory
+ * Total memory
*/
extern unsigned int BSP_mem_size;
@@ -181,7 +181,7 @@ extern int BSP_disconnect_clock_handler (void);
extern int BSP_connect_clock_handler (void);
/*
- * FLASH
+ * FLASH
*/
int BSP_FLASH_Enable_writes( uint32_t area );
int BSP_FLASH_Disable_writes( uint32_t area );
diff --git a/c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c b/c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c
index cfa39338c7..c5ddbc2ab2 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c
@@ -127,7 +127,7 @@ static unsigned char mcp750_openpic_initsenses[] = {
1, /*14 MCP750_INT_PCI_BUS2_INTC */
1, /*15 MCP750_INT_PCI_BUS2_INTD */
1,
- 1,
+ 1,
1,
1,
1,
@@ -151,9 +151,9 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
/*
* First initialize the Interrupt management hardware
*/
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Going to initialize openpic compliant device\n");
-#endif
+#endif
/* FIXME (t.s.): we should probably setup the EOI delay by
* passing a non-zero 'epic_freq' argument (frequency of the
* EPIC serial interface) but I don't know the value on this
@@ -161,7 +161,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
*/
openpic_init(1, mcp750_openpic_initpolarities, mcp750_openpic_initsenses, 0, 16, 0 /* epic_freq */);
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Going to initialize the PCI/ISA bridge IRQ related setting (VIA 82C586)\n");
#endif
@@ -191,8 +191,8 @@ printk("Call BSP_rtems_irq_mngt_set\n");
*/
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
}
-
-#ifdef TRACE_IRQ_INIT
+
+#ifdef TRACE_IRQ_INIT
printk("RTEMS IRQ management is now operationnal\n");
#endif
}
diff --git a/c/src/lib/libbsp/powerpc/ep1a/irq/openpic_xxx_irq.c b/c/src/lib/libbsp/powerpc/ep1a/irq/openpic_xxx_irq.c
index afdf8a1064..ebf4161fce 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/irq/openpic_xxx_irq.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/irq/openpic_xxx_irq.c
@@ -109,7 +109,7 @@ printk("ERROR BSP_irq_enable_at_i8259s Being Called for %d\n", (int)name);
BSP_irq_enable_at_i8259s ((int) name);
}
#endif
-
+
if (is_pci_irq(name)) {
/*
* Enable interrupt at OPENPIC level
diff --git a/c/src/lib/libbsp/powerpc/ep1a/pci/no_host_bridge.c b/c/src/lib/libbsp/powerpc/ep1a/pci/no_host_bridge.c
index 5c3fe4308b..a4cb0d2e3a 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/pci/no_host_bridge.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/pci/no_host_bridge.c
@@ -8,20 +8,20 @@
*
* $Id$
*/
-
+
#include <libcpu/io.h>
#include <libcpu/spr.h>
-
+
#include <bsp.h>
#include <bsp/pci.h>
#include <bsp/consoleIo.h>
#include <bsp/residual.h>
#include <bsp/openpic.h>
-
+
#include <rtems/bspIo.h>
/*
- * For the 8240 and the 8245 there is no host bridge the
+ * For the 8240 and the 8245 there is no host bridge the
* Open PIC device is built into the processor chip.
*/
diff --git a/c/src/lib/libbsp/powerpc/ep1a/start/start.S b/c/src/lib/libbsp/powerpc/ep1a/start/start.S
index 1ef8edd125..974739affa 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/start/start.S
+++ b/c/src/lib/libbsp/powerpc/ep1a/start/start.S
@@ -40,7 +40,7 @@
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these warnings.
-
+
#include <rtems/asm.h>
#include <rtems/score/cpu.h>
#include <libcpu/io.h>
@@ -73,7 +73,7 @@ __rtems_entry_point:
*/
li r3,MSR_IR | MSR_DR | MSR_FP
mtmsr r3
-
+
/* XXX - ADD BACK IN CACHING INSTRUCTIONS */
/* clear bss */
diff --git a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c
index dbf6e5a989..b7db8936bb 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c
@@ -88,7 +88,7 @@ uint32_t VME_Slot1 = FALSE;
/*
* PCI Bus Frequency
*/
-unsigned int BSP_bus_frequency;
+unsigned int BSP_bus_frequency;
/*
* processor clock frequency
@@ -103,25 +103,25 @@ unsigned int BSP_time_base_divisor = 1000; /* XXX - Just a guess */
void BSP_panic(char *s)
{
printk("%s PANIC %s\n",_RTEMS_version, s);
- __asm__ __volatile ("sc");
+ __asm__ __volatile ("sc");
}
void _BSP_Fatal_error(unsigned int v)
{
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
- __asm__ __volatile ("sc");
+ __asm__ __volatile ("sc");
}
-
+
int BSP_FLASH_Disable_writes(
uint32_t area
)
{
unsigned char data;
-
+
data = *GENERAL_REGISTER1;
data |= DISABLE_USER_FLASH;
*GENERAL_REGISTER1 = data;
-
+
return RTEMS_SUCCESSFUL;
}
@@ -130,11 +130,11 @@ int BSP_FLASH_Enable_writes(
)
{
unsigned char data;
-
+
data = *GENERAL_REGISTER1;
data &= (~DISABLE_USER_FLASH);
*GENERAL_REGISTER1 = data;
-
+
return RTEMS_SUCCESSFUL;
}
@@ -143,7 +143,7 @@ void BSP_FLASH_set_page(
)
{
unsigned char data;
-
+
/* Set the flash page register. */
data = *GENERAL_REGISTER2;
data &= ~(BSP_FLASH_PAGE_MASK);
@@ -170,7 +170,7 @@ void zero_bss(void)
char * save_boot_params(RESIDUAL* r3, void *r4, void* r5, char *additional_boot_options)
{
-#if 0
+#if 0
residualCopy = *r3;
strncpy(loaderParam, additional_boot_options, MAX_LOADER_ADD_PARM);
loaderParam[MAX_LOADER_ADD_PARM - 1] ='\0';
@@ -186,14 +186,14 @@ unsigned int get_eumbbar(void) {
asm volatile( "lis %0,0xfec0; ori %0,%0,0x0000": "=r" (a) );
asm volatile("sync");
-
- asm volatile("lis %0,0x8000; ori %0,%0,0x0078": "=r"(e) );
- asm volatile("stwbrx %0,0x0,%1": "=r"(e): "r"(a));
+
+ asm volatile("lis %0,0x8000; ori %0,%0,0x0078": "=r"(e) );
+ asm volatile("stwbrx %0,0x0,%1": "=r"(e): "r"(a));
asm volatile("sync");
- asm volatile("lis %0,0xfee0; ori %0,%0,0x0000": "=r" (a) );
+ asm volatile("lis %0,0xfee0; ori %0,%0,0x0000": "=r" (a) );
asm volatile("sync");
-
+
asm volatile("lwbrx %0,0x0,%1": "=r" (e): "r" (a));
asm volatile("isync");
return e;
@@ -212,12 +212,12 @@ void Read_ep1a_config_registers( ppc_cpu_id_t myCpu ) {
value = *BOARD_REVISION_REGISTER2 & HARDWARE_ID_MASK;
if ( value == HARDWARE_ID_PPC5_EP1A )
printk(" EP1A ");
- else if ( value == HARDWARE_ID_EP1B )
+ else if ( value == HARDWARE_ID_EP1B )
printk(" EP1B ");
else
printk(" Unknown ");
-
- value = *BOARD_REVISION_REGISTER2&0x1;
+
+ value = *BOARD_REVISION_REGISTER2&0x1;
printk("Board ID %08x", value);
if(value == 0x0){
VME_Slot1 = TRUE;
@@ -293,10 +293,10 @@ void bsp_start( void )
myCpu = get_ppc_cpu_type();
myCpuRevision = get_ppc_cpu_revision();
- EUMBBAR = get_eumbbar();
+ EUMBBAR = get_eumbbar();
printk("EUMBBAR 0x%08x\n", EUMBBAR );
- /*
+ /*
* Note this sets BSP_processor_frequency based upon register settings.
* It must be done prior to setting up hooks.
*/
@@ -341,13 +341,13 @@ ShowBATS();
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Going to start PCI buses scanning and initialization\n");
-#endif
+#endif
pci_initialize();
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Number of PCI buses found is : %d\n", pci_bus_count());
#endif
-#ifdef TEST_RAW_EXCEPTION_CODE
+#ifdef TEST_RAW_EXCEPTION_CODE
printk("Testing exception handling Part 1\n");
/*
@@ -360,17 +360,17 @@ ShowBATS();
*/
printk("Testing exception handling Part 2\n");
__asm__ __volatile ("sc");
-#endif
+#endif
/*
* Initalize RTEMS IRQ system
*/
BSP_rtems_irq_mng_init(0);
-
+
/* Activate the page table mappings only after
* initializing interrupts because the irq_mng_init()
* routine needs to modify the text
- */
+ */
if (pt) {
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Page table setup finished; will activate it NOW...\n");
@@ -394,5 +394,5 @@ ShowBATS();
#ifdef SHOW_MORE_INIT_SETTINGS
ShowBATS();
printk("Exit from bspstart\n");
-#endif
+#endif
}
diff --git a/c/src/lib/libbsp/powerpc/ep1a/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/ep1a/vme/VMEConfig.h
index 8492733a2d..2fade79e0c 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/ep1a/vme/VMEConfig.h
@@ -4,19 +4,19 @@
/* BSP specific address space configuration parameters */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/*
* The BSP maps VME address ranges into
* one BAT.
@@ -77,7 +77,7 @@
* at _VME_DRAM_OFFSET
*/
#undef _VME_DRAM_OFFSET
-#define _VME_DRAM_OFFSET 0xc0000000
+#define _VME_DRAM_OFFSET 0xc0000000
#define _VME_DRAM_32_OFFSET1 0x20000000
#define _VME_DRAM_32_OFFSET2 0x20b00000
#define _VME_DRAM_24_OFFSET1 0x00000000
@@ -85,7 +85,7 @@
#define _VME_DRAM_16_OFFSET1 0x00000000
#define _VME_DRAM_16_OFFSET2 0x00008000
-#define _VME_A24_SIZE 0x00100000
+#define _VME_A24_SIZE 0x00100000
#define _VME_A16_SIZE 0x00008000
#undef _VME_CSR_ON_PCI
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/console/config.c b/c/src/lib/libbsp/powerpc/gen83xx/console/config.c
index 39c7899cb6..ad36676fa3 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/console/config.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/console/config.c
@@ -23,7 +23,7 @@
/* derived from: */
/*
* This file contains the TTY driver table for the EP1A
- *
+ *
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/console/console.c b/c/src/lib/libbsp/powerpc/gen83xx/console/console.c
index 15fe80acb5..52ee30ec09 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/console/console.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/console/console.c
@@ -56,7 +56,7 @@
console_data Console_Port_Data[NUM_CONSOLE_PORTS];
unsigned long Console_Port_Count;
rtems_device_minor_number Console_Port_Minor;
-bool Console_Is_Initialized = false;
+bool Console_Is_Initialized = false;
/* PAGE
*
* console_open
@@ -92,9 +92,9 @@ rtems_device_driver console_open(
Callbacks.pollRead = c->deviceRead;
Callbacks.write = c->deviceWrite;
Callbacks.setAttributes = c->deviceSetAttributes;
- Callbacks.stopRemoteTx =
+ Callbacks.stopRemoteTx =
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx;
- Callbacks.startRemoteTx =
+ Callbacks.startRemoteTx =
Console_Port_Tbl[minor].pDeviceFlow->deviceStartRemoteTx;
Callbacks.outputUsesInterrupts = c->deviceOutputUsesInterrupts;
status = rtems_termios_open ( major, minor, arg, &Callbacks);
@@ -105,7 +105,7 @@ rtems_device_driver console_open(
return status;
}
-
+
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -123,7 +123,7 @@ rtems_device_driver console_close(
return rtems_termios_close (arg);
}
-
+
rtems_device_driver console_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -132,7 +132,7 @@ rtems_device_driver console_read(
{
return rtems_termios_read (arg);
}
-
+
rtems_device_driver console_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -141,7 +141,7 @@ rtems_device_driver console_write(
{
return rtems_termios_write (arg);
}
-
+
rtems_device_driver console_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -177,7 +177,7 @@ rtems_device_driver console_initialize(
minor++)
{
/*
- * transfer the real internal bus frequency into the
+ * transfer the real internal bus frequency into the
* console port table
*/
Console_Port_Tbl[minor].ulClock = BSP_bus_frequency;
@@ -202,7 +202,7 @@ rtems_device_driver console_initialize(
*/
rtems_fatal_error_occurred(RTEMS_IO_ERROR);
}
-
+
Console_Port_Minor=minor;
/*
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/console/ns16550cfg.c b/c/src/lib/libbsp/powerpc/gen83xx/console/ns16550cfg.c
index 2a2ab64138..3275835c86 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/console/ns16550cfg.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/console/ns16550cfg.c
@@ -37,7 +37,7 @@
#include <rtems.h>
#include <bsp.h>
#include "console.h"
-
+
typedef struct uart_reg
{
volatile unsigned char reg;
@@ -50,7 +50,7 @@ uint8_t Read_ns16550_register(
{
struct uart_reg *p = (struct uart_reg *)ulCtrlPort;
uint8_t ucData;
- ucData = p[ucRegNum].reg;
+ ucData = p[ucRegNum].reg;
asm volatile("sync");
return ucData;
}
@@ -62,6 +62,6 @@ void Write_ns16550_register(
)
{
struct uart_reg *p = (struct uart_reg *)ulCtrlPort;
- p[ucRegNum].reg = ucData;
+ p[ucRegNum].reg = ucData;
asm volatile("sync");
}
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/i2c/i2c_init.c b/c/src/lib/libbsp/powerpc/gen83xx/i2c/i2c_init.c
index c47359e431..88ebe35b93 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/i2c/i2c_init.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/i2c/i2c_init.c
@@ -47,7 +47,7 @@ static mpc83xx_i2c_desc_t mpc83xx_i2c_bus_tbl[2] = {
.irq_number = BSP_IPIC_IRQ_I2C2,
.base_frq = 0 /* will be set during initiailization */
}
- }
+ }
};
rtems_libi2c_bus_t *mpc83xx_i2c_bus_descriptor[2] = {
@@ -89,7 +89,7 @@ rtems_status_code bsp_register_i2c
* I2C1 is clocked with TSEC 1
*/
if (((mpc83xx.clk.sccr >> (31-1)) & 0x03) > 0) {
- mpc83xx_i2c_bus_tbl[0].softc.base_frq =
+ mpc83xx_i2c_bus_tbl[0].softc.base_frq =
(BSP_bus_frequency
/((mpc83xx.clk.sccr >> (31-1)) & 0x03));
}
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
index 2fddd48c6b..bb6dc4c7f3 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h
@@ -36,7 +36,7 @@
#endif /* MPC8313ERDB */
-#include <libcpu/powerpc-utility.h>
+#include <libcpu/powerpc-utility.h>
#include <bsp/hwreg_vals.h>
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/hwreg_vals.h b/c/src/lib/libbsp/powerpc/gen83xx/include/hwreg_vals.h
index 7c43be8832..f5786812b6 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/hwreg_vals.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/hwreg_vals.h
@@ -40,7 +40,7 @@
* clocking infos
*/
#define BSP_CLKIN_FRQ 66000000L
-#define RCFG_SYSPLL_MF 4
+#define RCFG_SYSPLL_MF 4
#define RCFG_COREPLL_MF 4
/*
@@ -80,7 +80,7 @@
* clocking infos
*/
#define BSP_CLKIN_FRQ 30000000L
-#define RCFG_SYSPLL_MF 11
+#define RCFG_SYSPLL_MF 11
#define RCFG_COREPLL_MF 4
/*
* Reset configuration words
@@ -115,7 +115,7 @@
#endif
-#if defined(MPC8349EAMDS)
+#if defined(MPC8349EAMDS)
/**************************
* for Freescale MPC8349EAMDS
*/
@@ -126,7 +126,7 @@
/*
* Local Access Windows
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define LBLAWBAR0_VAL 0xFE000000
#define LBLAWAR0_VAL 0x80000016
@@ -138,7 +138,7 @@
#define DDRLAWAR0_VAL 0x8000001B
/*
* Local Bus (Memory) Controller
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define BR0_VAL 0xFE001001
#define OR0_VAL 0xFF806FF7
@@ -148,7 +148,7 @@
#define OR2_VAL 0xFC006901
/*
* SDRAM registers
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define MRPTR_VAL 0x20000000
#define LSRT_VAL 0x32000000
@@ -157,7 +157,7 @@
/*
* DDR-SDRAM registers
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define CS2_BNDS_VAL 0x00000007
#define CS3_BNDS_VAL 0x0008000F
@@ -201,7 +201,7 @@
/*
* Local Access Windows
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define LBLAWBAR0_VAL bsp_rom_start
@@ -212,7 +212,7 @@
#define DDRLAWAR0_VAL 0x8000001B
/*
* Local Bus (Memory) Controller
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define BR0_VAL (0xFE000000 | 0x01001)
#define OR0_VAL 0xFE000E54
@@ -238,7 +238,7 @@
/*
* DDR-SDRAM registers
- * FIXME: decode bit settings
+ * FIXME: decode bit settings
*/
#define DDRCDR_VAL 0x00000001
#define CS0_BNDS_VAL 0x0000000F
@@ -273,8 +273,8 @@
/* value of input clock divider (derived from pll mode reg) */
#define BSP_SYSPLL_CKID (((mpc83xx.clk.spmr>>(31-8))&0x01)+1)
/* value of system pll (derived from pll mode reg) */
-#define BSP_SYSPLL_MF ((mpc83xx.clk.spmr>>(31-7))&0x0f)
+#define BSP_SYSPLL_MF ((mpc83xx.clk.spmr>>(31-7))&0x0f)
/* value of system pll (derived from pll mode reg) */
-#define BSP_COREPLL_MF ((mpc83xx.clk.spmr>>(31-15))&0x7f)
+#define BSP_COREPLL_MF ((mpc83xx.clk.spmr>>(31-15))&0x7f)
#endif /* __GEN83xx_HWREG_VALS_h */
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/irq.h b/c/src/lib/libbsp/powerpc/gen83xx/include/irq.h
index eb2602c703..3d6794bff0 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/include/irq.h
+++ b/c/src/lib/libbsp/powerpc/gen83xx/include/irq.h
@@ -26,7 +26,7 @@
#include <rtems/irq-extension.h>
/*
- * the following definitions specify the indices used
+ * the following definitions specify the indices used
* to interface the interrupt handler API
*/
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/irq/irq.c b/c/src/lib/libbsp/powerpc/gen83xx/irq/irq.c
index e9a14c9d35..77702229dc 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/irq/irq.c
@@ -291,7 +291,7 @@ static const uint8_t mpc83xx_ipic_mask_position_table [MPC83XX_IPIC_VECTOR_NUMBE
};
/*
- * this array will be filled with mask values needed
+ * this array will be filled with mask values needed
* to temporarily disable all IRQ soures with lower or same
* priority of the current source (whose vector is the array index)
*/
@@ -493,8 +493,8 @@ rtems_status_code mpc83xx_ipic_calc_prio2mask( void)
*/
rtems_status_code mpc83xx_ipic_initialize( void)
{
- /*
- * mask off all interrupts
+ /*
+ * mask off all interrupts
*/
mpc83xx.ipic.simsr [0] = 0;
mpc83xx.ipic.simsr [1] = 0;
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/network/network.c b/c/src/lib/libbsp/powerpc/gen83xx/network/network.c
index a4e8f432f2..66c1199389 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/network/network.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/network/network.c
@@ -87,8 +87,8 @@ int BSP_tsec_attach
if (unitNumber == 1) {
/*
- * init system I/O configuration registers
- * to ensure proper pin functions
+ * init system I/O configuration registers
+ * to ensure proper pin functions
*/
mpc83xx.syscon.sicrh = mpc83xx.syscon.sicrh & ~0x1F800000;
/*
@@ -99,8 +99,8 @@ int BSP_tsec_attach
}
if (unitNumber == 2) {
/*
- * init system I/O configuration registers
- * to ensure proper pin functions
+ * init system I/O configuration registers
+ * to ensure proper pin functions
*/
mpc83xx.syscon.sicrh = mpc83xx.syscon.sicrh & ~0x007f8000;
/*
@@ -116,7 +116,7 @@ int BSP_tsec_attach
/*
* Nothing special needed for TSEC1 operation
*/
-#endif
+#endif
}
/*
* add MAC address into config->hardware_adderss
@@ -131,7 +131,7 @@ int BSP_tsec_attach
/* we expect it htere from the boot loader */
reg_ptr = &mpc83xx.tsec[unitNumber - 1];
config->hardware_address = hw_addr[unitNumber-1];
-
+
hw_addr[unitNumber-1][5] = (reg_ptr->macstnaddr[0] >> 24) & 0xff;
hw_addr[unitNumber-1][4] = (reg_ptr->macstnaddr[0] >> 16) & 0xff;
hw_addr[unitNumber-1][3] = (reg_ptr->macstnaddr[0] >> 8) & 0xff;
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/spi/spi_init.c b/c/src/lib/libbsp/powerpc/gen83xx/spi/spi_init.c
index ac01a754fd..3778f7c413 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/spi/spi_init.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/spi/spi_init.c
@@ -104,13 +104,13 @@ static rtems_status_code bsp_spi_sel_addr
* GPIO1[24] is SPI_A0
* GPIO1[25] is SPI_A1
* GPIO1[26] is SPI_A2
- * set pins to address
+ * set pins to address
*/
- mpc83xx.gpio[0].gpdat =
+ mpc83xx.gpio[0].gpdat =
(mpc83xx.gpio[0].gpdat & ~(0x7 << (31-26)))
| (addr << (31-26));
/*
- * GPIO1[27] is high-active strobe
+ * GPIO1[27] is high-active strobe
*/
mpc83xx.gpio[0].gpdat |= (1 << (31- 27));
@@ -154,7 +154,7 @@ static rtems_status_code bsp_spi_send_start_dummy
#elif defined( HSC_CM01)
/*
- * GPIO1[27] is high-active strobe
+ * GPIO1[27] is high-active strobe
* set it to inactive/ low
*/
mpc83xx.gpio[0].gpdat &= ~(0x1 << (31-27));
@@ -204,7 +204,7 @@ static rtems_status_code bsp_spi_send_stop
/*
* deselect device
- * GPIO1[27] is high-active strobe
+ * GPIO1[27] is high-active strobe
*/
mpc83xx.gpio[0].gpdat &= ~(1 << (31- 27));
@@ -351,7 +351,7 @@ rtems_status_code bsp_register_spi
* GPIO1[24] is SPI_A0
* GPIO1[25] is SPI_A1
* GPIO1[26] is SPI_A2
- * GPIO1[27] is high-active strobe
+ * GPIO1[27] is high-active strobe
* set pins to be output, low
*/
mpc83xx.gpio[0].gpdat &= ~(0xf << (31-27));
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/start/start.S b/c/src/lib/libbsp/powerpc/gen83xx/start/start.S
index 8dec6a1822..ace422bb44 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/start/start.S
+++ b/c/src/lib/libbsp/powerpc/gen83xx/start/start.S
@@ -16,10 +16,10 @@
+-----------------------------------------------------------------+
| this file contains the startup assembly code |
\*===============================================================*/
-/* $Id$ */
+/* $Id$ */
-#include <libcpu/powerpc-utility.h>
+#include <libcpu/powerpc-utility.h>
#include <rtems/powerpc/cache.h>
#include <bsp.h>
#include <mpc83xx/mpc83xx.h>
@@ -27,7 +27,7 @@
.macro SET_IMM_REGW base, reg2, offset, value
LA \reg2, \value
stw \reg2,\offset(\base)
-.endm
+.endm
#define REP8(l) l ; l; l; l; l; l; l; l;
@@ -37,7 +37,7 @@
#if defined(RESET_CONF_WRD_L)
.section ".resconf","ax"
PUBLIC_VAR (reset_conf_words)
-reset_conf_words:
+reset_conf_words:
REP8( .byte ((RESET_CONF_WRD_L >> 24) & 0xff))
REP8( .byte ((RESET_CONF_WRD_L >> 16) & 0xff))
REP8( .byte ((RESET_CONF_WRD_L >> 8) & 0xff))
@@ -51,10 +51,10 @@ reset_conf_words:
.section ".vectors","ax"
PUBLIC_VAR (reset_vec)
-reset_vec:
+reset_vec:
bl rom_entry
-
-.section ".entry"
+
+.section ".entry"
PUBLIC_VAR (start)
start:
@@ -84,7 +84,7 @@ copy_uboot_board_info:
#endif /* HAS_UBOOT */
/*
- * basic CPU setup:
+ * basic CPU setup:
* init MSR
*/
mfmsr r30
@@ -93,18 +93,18 @@ copy_uboot_board_info:
mtmsr r30 /* Set RI/ME, Clr EE in MSR */
b start_rom_skip
-
+
PUBLIC_VAR (rom_entry)
rom_entry:
/*
- * basic CPU setup:
+ * basic CPU setup:
* init MSR
*/
mfmsr r30
SETBITS r30, r29, MSR_ME|MSR_RI
CLRBITS r30, r29, MSR_IP|MSR_EE
mtmsr r30 /* Set RI/ME, Clr EE in MSR */
-
+
/*
* ROM startup: remap IMMR to 0xE0000000
* use special sequence from MPC8349EA RM Rev 1, 5.2.4.1.1 "Updating IMMRBAR"
@@ -147,14 +147,14 @@ rom_entry:
mtlr r29
blr /* now further execution in upper ROM */
-start_code_in_rom:
+start_code_in_rom:
#ifdef LBLAWBAR0_VAL
SET_IMM_REGW r31,r30,LBLAWBAR0_OFF,LBLAWBAR0_VAL
#endif
#ifdef LBLAWAR0_VAL
SET_IMM_REGW r31,r30,LBLAWAR0_OFF,LBLAWAR0_VAL
-#endif
+#endif
#ifdef LBLAWBAR1_VAL
SET_IMM_REGW r31,r30,LBLAWBAR1_OFF,LBLAWBAR1_VAL
#endif
@@ -232,7 +232,7 @@ start_code_in_rom:
*/
#ifdef MRPTR_VAL
SET_IMM_REGW r31,r30,MRPTR_OFF,MRPTR_VAL
-#endif
+#endif
/*
* ROM startup: init SDRAM
*/
@@ -357,7 +357,7 @@ start_rom_skip:
start_rom_skip1:
mflr r20
LA r30,start_rom_skip1
- sub. r20,r20,r30
+ sub. r20,r20,r30
/*
* execution address offset == 0?
* then do not relocate code and data
@@ -367,24 +367,24 @@ start_rom_skip1:
* ROM or relocatable startup: copy startup code to SDRAM
*/
/* get start address of text section in RAM */
- LA r29, bsp_section_text_start
+ LA r29, bsp_section_text_start
/* get start address of text section in ROM (add reloc offset) */
- add r30, r20, r29
+ add r30, r20, r29
/* get size of startup code */
LA r28, end_reloc_startup
LA r31, bsp_section_text_start
sub 28,r28,r31
/* copy startup code from ROM to RAM location */
- bl copy_image
-
+ bl copy_image
+
/*
* ROM startup: jump to code copy in SDRAM
*/
/* get compile time address of label */
- LA r29, copy_rest_of_text
+ LA r29, copy_rest_of_text
mtlr r29
blr /* now further execution RAM */
-copy_rest_of_text:
+copy_rest_of_text:
#ifdef LCRR_VAL
SET_IMM_REGW r31,r30,LCRR_OFF,LCRR_VAL
#endif
@@ -394,27 +394,27 @@ copy_rest_of_text:
/* get start address of rest of code in RAM */
LA r29, end_reloc_startup
/* get start address of text section in ROM (add reloc offset) */
- add r30, r20, r29
+ add r30, r20, r29
/* get size of rest of code */
LA r28, bsp_section_text_start
LA r31, bsp_section_text_size
add r28,r28,r31
sub r28,r28,r29
bl copy_image /* copy text section from ROM to RAM location */
-
+
/*
* ROM or relocatable startup: copy data to SDRAM
*/
/* get start address of data section in RAM */
- LA r29, bsp_section_data_start
+ LA r29, bsp_section_data_start
/* get start address of data section in ROM (add reloc offset) */
- add r30, r20, r29
+ add r30, r20, r29
/* get size of RAM image */
- LA r28, bsp_section_data_size
+ LA r28, bsp_section_data_size
/* copy initialized data section from ROM to RAM location */
- bl copy_image
+ bl copy_image
-start_code_in_ram:
+start_code_in_ram:
/*
* ROM/RAM startup: clear bss in SDRAM
@@ -427,8 +427,8 @@ start_code_in_ram:
*/
/* Set stack pointer (common for RAM/ROM startup) */
- LA r1, bsp_section_text_start
- addi r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
+ LA r1, bsp_section_text_start
+ addi r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
/* Create NULL */
li r0, 0
@@ -451,12 +451,12 @@ start_code_in_ram:
xor r3, r3, r3
bl SYM (boot_card) /* Call the first C routine */
-
+
twiddle:
/* We don't expect to return from boot_card but if we do */
/* wait here for watchdog to kick us into hard reset */
- b twiddle
-
+ b twiddle
+
copy_image:
mr r27, r28
srwi r28, r28, 2
@@ -466,13 +466,13 @@ copy_image:
sub r27, r27, r28 /* maybe some residual bytes */
copy_image_word:
lswi r28, r30, 0x04
-
+
stswi r28, r29, 0x04 /* do word copy ROM -> RAM */
-
+
addi r30, r30, 0x04 /* increment source pointer */
addi r29, r29, 0x04 /* increment destination pointer */
-
+
bdnz copy_image_word /* decrement ctr and branch if not 0 */
cmpwi r27, 0x00 /* copy image finished ? */
@@ -480,19 +480,19 @@ copy_image_word:
mtctr r27 /* reload counter for residual bytes */
copy_image_byte:
lswi r28, r30, 0x01
-
+
stswi r28, r29, 0x01 /* do byte copy ROM -> RAM */
-
-
+
+
addi r30, r30, 0x01 /* increment source pointer */
addi r29, r29, 0x01 /* increment destination pointer */
-
+
bdnz copy_image_byte /* decrement ctr and branch if not 0 */
-
+
copy_image_end:
blr
-
+
/**
* @fn int mpc83xx_zero_4( void *dest, size_t n)
*
@@ -542,7 +542,7 @@ mpc83xx_zero_4_tail:
stwx r0, r3, r8
addi r8, r8, 16
bdnz mpc83xx_zero_4_tail
-
+
/* Return */
blr
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c
index d3f04d26c7..44c3439e90 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c
@@ -110,18 +110,18 @@ static void calc_dbat_regvals(
while ((end_addr & block_mask) != (base_addr & block_mask)) {
block_mask <<= 1;
}
-
- bat_ptr->batu.bepi = base_addr >> (32 - 15);
+
+ bat_ptr->batu.bepi = base_addr >> (32 - 15);
bat_ptr->batu.bl = ~(block_mask >> (28 - 11));
bat_ptr->batu.vs = 1;
bat_ptr->batu.vp = 1;
-
- bat_ptr->batl.brpn = base_addr >> (32 - 15);
- bat_ptr->batl.w = flg_w;
- bat_ptr->batl.i = flg_i;
- bat_ptr->batl.m = flg_m;
- bat_ptr->batl.g = flg_g;
- bat_ptr->batl.pp = flg_bpp;
+
+ bat_ptr->batl.brpn = base_addr >> (32 - 15);
+ bat_ptr->batl.w = flg_w;
+ bat_ptr->batl.i = flg_i;
+ bat_ptr->batl.m = flg_m;
+ bat_ptr->batl.g = flg_g;
+ bat_ptr->batl.pp = flg_bpp;
}
static void clear_mmu_regs( void)
@@ -132,7 +132,7 @@ static void clear_mmu_regs( void)
for (i = 0;i < 16;i++) {
asm volatile( "mtsrin %0, %1\n" : : "r" (i * 0x1000), "r" (i << (31 - 3)));
}
-
+
/* Clear TLBs */
for (i = 0;i < 32;i++) {
asm volatile( "tlbie %0\n" : : "r" (i << (31 - 19)));
@@ -151,7 +151,7 @@ void cpu_init( void)
PPC_CLEAR_SPECIAL_PURPOSE_REGISTER_BITS( HID0, HID0_ILOCK | HID0_DLOCK);
PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS( HID0, HID0_ICFI | HID0_DCI);
PPC_CLEAR_SPECIAL_PURPOSE_REGISTER_BITS( HID0, HID0_ICFI | HID0_DCI);
-
+
/*
* Set up IBAT registers in MMU
*/
@@ -301,7 +301,7 @@ void cpu_init( void)
ppc_set_machine_state_register( msr);
/*
- * In HID0:
+ * In HID0:
* - Enable dynamic power management
* - Enable machine check interrupts
*/
diff --git a/c/src/lib/libbsp/powerpc/haleakala/dlentry/dlentry.S b/c/src/lib/libbsp/powerpc/haleakala/dlentry/dlentry.S
index 9801bf3239..05f60fd71e 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/dlentry/dlentry.S
+++ b/c/src/lib/libbsp/powerpc/haleakala/dlentry/dlentry.S
@@ -36,7 +36,7 @@
* Further changes to derive for the PPC405CR/GP/GPr/EX/EXr
* by Michael Hamel ADInstruments Ltd 2008
*
- *
+ *
* Id: dlentry.S,v 1.2 2000/08/02 16:30:57 joel Exp
*/
@@ -44,7 +44,7 @@
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these warnings.
-
+
#include <rtems/asm.h>
/*
@@ -82,7 +82,7 @@
PUBLIC_VAR (start)
PUBLIC_VAR (download_entry)
PUBLIC_VAR (__rtems_entry_point)
-
+
SYM(start):
SYM(download_entry):
SYM(__rtems_entry_point):
@@ -95,7 +95,7 @@ SYM(__rtems_entry_point):
/*---------------------------------------------------------------------------
* Parameters from linker
*--------------------------------------------------------------------------*/
-
+
base_addr:
toc_pointer:
.long s.got
@@ -125,10 +125,10 @@ text_length:
/* Initialise procesor registers generally */
bl init405
-
+
/* Clear .bss and .sbss */
bl bssclr
-
+
/*-------------------------------------------------------------------
* C_setup.
*------------------------------------------------------------------*/
@@ -141,9 +141,9 @@ text_length:
stw r3, 12(r1)
bl __eabi /* Initialise EABI: sets up r2 & r13 */
-
+
li r3, 0 /* command line */
-
+
b SYM (boot_card) /* call the first C routine */
/*---------------------------------------------------------------------------
@@ -175,11 +175,11 @@ clear_sbss: stwu r0,4(r2)
* Generic 405 register setup
*--------------------------------------------------------------------------*/
init405:
- li r0, 0
+ li r0, 0
mtmsr r0
mticcr r0
mtdccr r0
-
+
li r3,0x7FFC # 405EX-specific
mtsgr r3 # Clear guarded mode on all storage except PCIe region
@@ -201,13 +201,13 @@ dcloop: dccci 0,r3 # invalidate line
mtdcwr r0 # Select write-back caching
lis r3,0xC000 # Enable 0000 0000 to 0FFF FFFF
# mtdccr r3 # Enable data cache
-
+
mtevpr r0
mtesr r0
mtxer r0
-
+
lwarx r3,r0,r0 # get some data/set resv bit
- stwcx. r3,r0,r0 # store out and clear resv bit
+ stwcx. r3,r0,r0 # store out and clear resv bit
lis r3,0xDEAD
ori r3,r3,0xBEEF # Make distintive uninitialised value
diff --git a/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h b/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h
index 558abc55e5..f1a52a0490 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/haleakala/include/bsp.h
@@ -72,7 +72,7 @@ extern "C" {
/* Network Defines */
#define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0"
-
+
struct rtems_bsdnet_ifconfig;
int rtems_emac_driver_attach(struct rtems_bsdnet_ifconfig* config, int attaching);
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_emac_driver_attach
@@ -91,7 +91,7 @@ extern "C" {
rtems_vector_number vector, /* vector number */
int type /* RTEMS or RAW intr */
);
-
+
#endif /* ASM */
#ifdef __cplusplus
diff --git a/c/src/lib/libbsp/powerpc/haleakala/irq/irq.c b/c/src/lib/libbsp/powerpc/haleakala/irq/irq.c
index 736fde0e52..e6263389d4 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/haleakala/irq/irq.c
@@ -69,11 +69,11 @@ static inline int IsUICIRQ(const rtems_irq_number irqLine)
static void WriteIState(void)
/* Write the gEnabledInts state masked by gIntInhibited to the hardware */
{
- PPC_SET_DEVICE_CONTROL_REGISTER(UIC0_ER,
+ PPC_SET_DEVICE_CONTROL_REGISTER(UIC0_ER,
gEnabledInts[0] & ~gIntInhibited[0]);
- PPC_SET_DEVICE_CONTROL_REGISTER(UIC1_ER,
+ PPC_SET_DEVICE_CONTROL_REGISTER(UIC1_ER,
gEnabledInts[1] & ~gIntInhibited[1]);
- PPC_SET_DEVICE_CONTROL_REGISTER(UIC2_ER,
+ PPC_SET_DEVICE_CONTROL_REGISTER(UIC2_ER,
gEnabledInts[2] & ~gIntInhibited[2]);
}
@@ -96,7 +96,7 @@ BSP_disable_irq_at_pic(const rtems_irq_number irq)
uint32_t oldState;
int iword = irq>>5;
uint32_t mask = (0x80000000 >> (irq & 0x1F));
-
+
oldState = gEnabledInts[iword] & mask;
gEnabledInts[iword] &= ~mask;
WriteIState();
@@ -109,14 +109,14 @@ int
BSP_setup_the_pic(rtems_irq_global_settings* config)
{
int i;
-
+
dflt_entry = config->defaultEntry;
rtems_hdl_tblP = config->irqHdlTbl;
for (i=0; i<kUICWords; i++)
gIntInhibited[i] = 0;
-
+
/* disable all interrupts */
- PPC_SET_DEVICE_CONTROL_REGISTER (UIC2_ER, 0x00000000);
+ PPC_SET_DEVICE_CONTROL_REGISTER (UIC2_ER, 0x00000000);
/* Set Critical / Non Critical interrupts */
PPC_SET_DEVICE_CONTROL_REGISTER (UIC2_CR, 0x00000000);
/* Set Interrupt Polarities */
@@ -153,7 +153,7 @@ BSP_setup_the_pic(rtems_irq_global_settings* config)
PPC_SET_DEVICE_CONTROL_REGISTER (UIC0_VR, 0x00000001);
/* clear all interrupts */
PPC_SET_DEVICE_CONTROL_REGISTER (UIC0_SR, 0xffffffff);
-
+
return 1;
}
@@ -164,8 +164,8 @@ BSP_setup_the_pic(rtems_irq_global_settings* config)
*
* No support for critical interrupts here yet
*/
-
-int
+
+int
C_dispatch_irq_handler( BSP_Exception_frame* frame, unsigned int excNum )
{
if (excNum == ASM_EXT_VECTOR) {
@@ -180,15 +180,15 @@ C_dispatch_irq_handler( BSP_Exception_frame* frame, unsigned int excNum )
gIntInhibited[0] |= active[0];
gIntInhibited[1] |= active[1];
gIntInhibited[2] |= active[2];
-
+
/* ...and update the hardware so the active interrupts are disabled */
WriteIState();
-
+
/* Loop, calling bsp_irq_dispatch_list for each active interrupt */
while ((active[0] | active[1] | active[2]) != 0) {
uint32_t index = -1;
uint32_t bit, bmask;
-
+
/* Find an active interrupt, searching 0..2, bit 0..bit 31 (IBM order) */
do {
index++;
@@ -201,17 +201,17 @@ C_dispatch_irq_handler( BSP_Exception_frame* frame, unsigned int excNum )
/* Write a 1-bit to the appropriate status register to clear it */
bmask = 0x80000000 >> bit;
switch (index) {
- case 0:
+ case 0:
PPC_SET_DEVICE_CONTROL_REGISTER(UIC0_SR, bmask);
break;
- case 1:
+ case 1:
PPC_SET_DEVICE_CONTROL_REGISTER(UIC1_SR, bmask);
break;
- case 2:
+ case 2:
PPC_SET_DEVICE_CONTROL_REGISTER(UIC2_SR, bmask);
break;
}
-
+
/* Clear in the active record and gIntInhibited */
active[index] &= ~bmask;
gIntInhibited[index] &= ~bmask;
@@ -220,20 +220,20 @@ C_dispatch_irq_handler( BSP_Exception_frame* frame, unsigned int excNum )
/* Update the hardware again so the interrupts we have handled are unmasked */
WriteIState();
return 0;
-
+
} else if (excNum == ASM_DEC_VECTOR) { /* 0x1000 remapped by C_dispatch_dec_handler_bookE */
bsp_irq_dispatch_list(rtems_hdl_tblP, BSP_PIT, dflt_entry.hdl);
return 0;
-
+
} else if (excNum == ASM_BOOKE_FIT_VECTOR) { /* 0x1010 mapped to 0x13 by ppc_get_vector_addr */
bsp_irq_dispatch_list(rtems_hdl_tblP, BSP_FIT, dflt_entry.hdl);
return 0;
-
+
} else if (excNum == ASM_BOOKE_WDOG_VECTOR) { /* 0x1020 mapped to 0x14 by ppc_get_vector_addr */
bsp_irq_dispatch_list(rtems_hdl_tblP, BSP_WDOG, dflt_entry.hdl);
return 0;
-
- } else
+
+ } else
return -1; /* unhandled interrupt, panic time */
}
diff --git a/c/src/lib/libbsp/powerpc/haleakala/irq/irq.h b/c/src/lib/libbsp/powerpc/haleakala/irq/irq.h
index 908fe4bf9b..d8395a609b 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/irq/irq.h
+++ b/c/src/lib/libbsp/powerpc/haleakala/irq/irq.h
@@ -23,7 +23,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
/* Define UIC interrupt numbers; IRQs that cause an external interrupt that needs further decode.
These are arbitrary but it makes things easier if they match the CPU interrupt numbers */
@@ -103,7 +103,7 @@ extern "C" {
#define BSP_UIC_EIPKP_SLAVE (BSP_UIC1_IRQ_LOWEST_OFFSET + 7)
#define BSP_UIC_GPT_TIMER5 (BSP_UIC1_IRQ_LOWEST_OFFSET + 8)
#define BSP_UIC_GPT_TIMER6 (BSP_UIC1_IRQ_LOWEST_OFFSET + 9)
-
+
#define BSP_UIC_GPT_TIMER0 (BSP_UIC1_IRQ_LOWEST_OFFSET + 16)
#define BSP_UIC_GPT_TIMER1 (BSP_UIC1_IRQ_LOWEST_OFFSET + 17)
#define BSP_UIC_IRQ7 (BSP_UIC1_IRQ_LOWEST_OFFSET + 18)
@@ -127,7 +127,7 @@ extern "C" {
#define BSP_UIC_PCIe0INTC (BSP_UIC2_IRQ_LOWEST_OFFSET + 2)
#define BSP_UIC_PCIe0INTD (BSP_UIC2_IRQ_LOWEST_OFFSET + 3)
#define BSP_UIC_IRQ3 (BSP_UIC2_IRQ_LOWEST_OFFSET + 4)
-
+
#define BSP_UIC_USBOTG (BSP_UIC2_IRQ_LOWEST_OFFSET + 30)
#define BSP_UIC_IRQ_NUMBER (95)
@@ -143,7 +143,7 @@ extern "C" {
#define BSP_PIT BSP_PROCESSOR_IRQ_LOWEST_OFFSET /* Required by ppc403/clock.c */
#define BSP_FIT BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 1
- #define BSP_WDOG BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 2
+ #define BSP_WDOG BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 2
#define BSP_PROCESSOR_IRQ_NUMBER (3)
#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_UIC_IRQ_MAX_OFFSET + 1)
@@ -154,10 +154,10 @@ extern "C" {
#define BSP_IRQ_NUMBER (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
#define BSP_LOWEST_OFFSET (BSP_UIC_IRQ_LOWEST_OFFSET)
#define BSP_MAX_OFFSET (BSP_IRQ_NUMBER - 1)
-
+
extern void BSP_rtems_irq_mng_init(unsigned cpuId); // Implemented in irq_init.c
#include <bsp/irq_supp.h>
-
+
#ifdef __cplusplus
}
#endif
diff --git a/c/src/lib/libbsp/powerpc/haleakala/irq/irq_init.c b/c/src/lib/libbsp/powerpc/haleakala/irq/irq_init.c
index cafe6f6d7a..1e801c8431 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/haleakala/irq/irq_init.c
@@ -57,7 +57,7 @@ static rtems_irq_prio irqPrioTable[BSP_IRQ_NUMBER]={
void BSP_rtems_irq_mng_init(unsigned cpuId)
{
int i;
-
+
/*
* re-init the rtemsIrq table
*/
@@ -82,8 +82,8 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
"Unable to initialize RTEMS interrupt management!!! System locked\n"
);
}
-
- #ifdef TRACE_IRQ_INIT
+
+ #ifdef TRACE_IRQ_INIT
printk("RTEMS IRQ management is now operational\n");
#endif
}
diff --git a/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c b/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c
index cf37168e03..9ca78b959b 100644
--- a/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c
@@ -182,8 +182,8 @@ void bsp_start( void )
EarlyUARTInit(115200);
/*
- * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
- * function store the result in global variables
+ * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
+ * function store the result in global variables
* so that it can be used later...
*/
myCpu = get_ppc_cpu_type();
@@ -200,9 +200,9 @@ void bsp_start( void )
bsp_timer_internal_clock = TRUE;
bsp_timer_average_overhead = 2;
bsp_timer_least_valid = 3;
-
+
/*
- * Initialize default raw exception handlers.
+ * Initialize default raw exception handlers.
*/
sc = ppc_exc_initialize(
PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
index 0fca420bd3..5e38f8076a 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/include/bsp.h
@@ -43,11 +43,11 @@
* NOTE: VME addresses should NEVER be translated using these constants!
* they are strictly for BSP internal use. Drivers etc. should use
* the translation routines int VME.h (BSP_vme2local_adrs/BSP_local2vme_adrs).
- *
+ *
* CPU ADDR PCI_ADDR VME ADDR
- *
+ *
* 00000000 XXXXXXXX XXXXXXXX
- * ^ ^ ........
+ * ^ ^ ........
* | |
* | | e.g., RAM XXXXXXXX
* | | 00000000
@@ -70,7 +70,7 @@
* VME devices hostbridge mapped by
* visible here universe
* =====================================================
- *
+ *
*/
/* fundamental addresses for BSP (CHRPxxx and PREPxxx are from libcpu/io.h) */
@@ -82,7 +82,7 @@
/* offset of pci memory as seen from the CPU */
#define PCI_MEM_BASE 0
/* where (in CPU addr. space) does the PCI window start */
-#define PCI_MEM_WIN0 0x80000000
+#define PCI_MEM_WIN0 0x80000000
#else
#define _IO_BASE PREP_ISA_IO_BASE
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c
index b9601d08d7..7daae561d3 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/clock/clock-config.c
@@ -81,25 +81,25 @@ static void mpc55xx_clock_initialize( void)
}
/* Configure eMIOS channel */
-
+
/* Set channel in GPIO mode */
ccr.B.MODE = MPC55XX_EMIOS_MODE_GPIO_INPUT;
regs->CCR.R = ccr.R;
-
+
/* Clear status flags */
csr.B.OVR = 1;
csr.B.OVFL = 1;
csr.B.FLAG = 1;
regs->CSR.R = csr.R;
-
+
/* Set timer period */
regs->CADR.R = (uint32_t) interval - 1;
-
+
/* Set unused registers */
regs->CBDR.R = 0;
regs->CCNTR.R = 0;
regs->ALTCADR.R = 0;
-
+
/* Set control register */
ccr.B.MODE = MPC55XX_EMIOS_MODE_MC_UP_INT_CLK;
ccr.B.UCPREN = 1;
@@ -132,17 +132,17 @@ static uint32_t mpc55xx_clock_nanoseconds_since_last_tick( void)
uint64_t clicks = EMIOS.CH [MPC55XX_CLOCK_EMIOS_CHANNEL].CCNTR.R;
uint64_t clock = bsp_clock_speed;
uint64_t ns = (clicks * 1000000000) / clock;
-
+
return (uint32_t) ns;
}
-
+
#define Clock_driver_support_initialize_hardware() mpc55xx_clock_initialize()
#define Clock_driver_support_install_isr( isr, old_isr) \
mpc55xx_clock_handler_install()
#define Clock_driver_support_shutdown_hardware() mpc55xx_clock_cleanup()
-
+
#define Clock_driver_nanoseconds_since_last_tick \
mpc55xx_clock_nanoseconds_since_last_tick
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/smsc9218i.h b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/smsc9218i.h
index 9086a1b215..294aefcb89 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/smsc9218i.h
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/smsc9218i.h
@@ -21,7 +21,7 @@
/**
* @name Memory Map
- * @{
+ * @{
*/
typedef struct {
@@ -95,7 +95,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Receive Status
- * @{
+ * @{
*/
#define SMSC9218I_RX_STS_FILTER_FAIL SMSC9218I_FLAG(30)
@@ -117,7 +117,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Transmit Status
- * @{
+ * @{
*/
#define SMSC9218I_TX_STS_GET_TAG(reg) SMSC9218I_GET_FIELD_16(reg, 16)
@@ -133,7 +133,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Transmit Command A
- * @{
+ * @{
*/
#define SMSC9218I_TX_A_IOC SMSC9218I_FLAG(31)
@@ -149,7 +149,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Transmit Command B
- * @{
+ * @{
*/
#define SMSC9218I_TX_B_TAG(val) SMSC9218I_FIELD_16(val, 16)
@@ -162,7 +162,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Chip ID and Revision
- * @{
+ * @{
*/
#define SMSC9218I_ID_REV_GET_ID(reg) SMSC9218I_GET_FIELD_16(reg, 16)
@@ -174,7 +174,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Interrupt Configuration
- * @{
+ * @{
*/
#define SMSC9218I_IRQ_CFG_INT_DEAS(val) SMSC9218I_FIELD_8(val, 24)
@@ -190,7 +190,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Interrupt Status
- * @{
+ * @{
*/
#define SMSC9218I_INT_STS_SW SMSC9218I_FLAG(31)
@@ -220,7 +220,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Interrupt Enable
- * @{
+ * @{
*/
#define SMSC9218I_INT_EN_SW SMSC9218I_FLAG(31)
@@ -250,7 +250,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Byte Order Testing
- * @{
+ * @{
*/
#define SMSC9218I_BYTE_TEST SMSC9218I_SWAP(0x87654321U)
@@ -259,7 +259,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name FIFO Level Interrupts
- * @{
+ * @{
*/
#define SMSC9218I_FIFO_INT_TDAL(val) SMSC9218I_FIELD_8(val, 24)
@@ -273,7 +273,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Receive Configuration
- * @{
+ * @{
*/
#define SMSC9218I_RX_CFG_END_ALIGN_4 0
@@ -289,7 +289,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Transmit Configuration
- * @{
+ * @{
*/
#define SMSC9218I_TX_CFG_SDUMP SMSC9218I_FLAG(15)
@@ -302,7 +302,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Hardware Configuration
- * @{
+ * @{
*/
#define SMSC9218I_HW_CFG_AMDIX SMSC9218I_FLAG(24)
@@ -317,7 +317,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Receive Datapath Control
- * @{
+ * @{
*/
#define SMSC9218I_RX_DP_CTRL_FFWD SMSC9218I_FLAG(31)
@@ -326,7 +326,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Receive FIFO Information
- * @{
+ * @{
*/
#define SMSC9218I_RX_FIFO_INF_GET_SUSED(reg) SMSC9218I_GET_FIELD_8(reg, 16)
@@ -336,7 +336,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Transmit FIFO Information
- * @{
+ * @{
*/
#define SMSC9218I_TX_FIFO_INF_GET_SUSED(reg) SMSC9218I_GET_FIELD_8(reg, 16)
@@ -346,7 +346,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Power Management Control
- * @{
+ * @{
*/
#define SMSC9218I_PMT_CTRL_PM_MODE_D0 0
@@ -368,7 +368,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name General Purpose IO Configuration
- * @{
+ * @{
*/
#define SMSC9218I_GPIO_CFG_LED3 SMSC9218I_FLAG(30)
@@ -393,7 +393,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name General Purpose Timer Configuration
- * @{
+ * @{
*/
#define SMSC9218I_GPT_CFG_TIMER_EN SMSC9218I_FLAG(29)
@@ -404,7 +404,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name General Purpose Timer Count
- * @{
+ * @{
*/
#define SMSC9218I_GPT_CNT_GET_CNT SMSC9218I_GET_FIELD_16(reg, 0)
@@ -413,7 +413,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Word Swap
- * @{
+ * @{
*/
#define SMSC9218I_ENDIAN_BIG 0xffffffffU
@@ -422,7 +422,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Free Run Counter
- * @{
+ * @{
*/
#define SMSC9218I_FREE_RUN_GET(reg) SMSC9218I_SWAP(reg)
@@ -431,7 +431,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Receiver Dropped Frames Counter
- * @{
+ * @{
*/
#define SMSC9218I_RX_DROP_GET(reg) SMSC9218I_SWAP(reg)
@@ -440,7 +440,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name MAC Control and Status Synchronizer Command
- * @{
+ * @{
*/
#define SMSC9218I_MAC_CSR_CMD_BUSY SMSC9218I_FLAG(31)
@@ -452,7 +452,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name MAC Control Register
- * @{
+ * @{
*/
#define SMSC9218I_MAC_CR 0x00000001U
@@ -484,7 +484,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name MAC Address High
- * @{
+ * @{
*/
#define SMSC9218I_MAC_ADDRH 0x00000002U
@@ -494,7 +494,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name MAC Address Low
- * @{
+ * @{
*/
#define SMSC9218I_MAC_ADDRL 0x00000003U
@@ -504,7 +504,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Multicast Hash Table High
- * @{
+ * @{
*/
#define SMSC9218I_MAC_HASHH 0x00000004U
@@ -514,7 +514,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Multicast Hash Table Low
- * @{
+ * @{
*/
#define SMSC9218I_MAC_HASHL 0x00000005U
@@ -524,7 +524,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name MII Access
- * @{
+ * @{
*/
#define SMSC9218I_MAC_MII_ACC 0x00000006U
@@ -537,7 +537,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name MII Data
- * @{
+ * @{
*/
#define SMSC9218I_MAC_MII_DATA 0x00000007U
@@ -546,7 +546,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Flow Control
- * @{
+ * @{
*/
#define SMSC9218I_MAC_FLOW 0x00000008U
@@ -559,7 +559,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name VLAN1 Tag
- * @{
+ * @{
*/
#define SMSC9218I_MAC_VLAN1 0x00000009U
@@ -568,7 +568,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name VLAN2 Tag
- * @{
+ * @{
*/
#define SMSC9218I_MAC_VLAN2 0x0000000aU
@@ -577,7 +577,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Wake-up Frame Filter
- * @{
+ * @{
*/
#define SMSC9218I_MAC_WUFF 0x0000000bU
@@ -586,7 +586,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Wake-up Control and Status
- * @{
+ * @{
*/
#define SMSC9218I_MAC_WUCSR 0x0000000cU
@@ -600,7 +600,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Basic Control
- * @{
+ * @{
*/
#define SMSC9218I_PHY_BCR 0x00000000U
@@ -617,7 +617,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Basic Status
- * @{
+ * @{
*/
#define SMSC9218I_PHY_BSR 0x00000001U
@@ -637,7 +637,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name PHY Identifier 1
- * @{
+ * @{
*/
#define SMSC9218I_PHY_ID1 0x00000002U
@@ -649,7 +649,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name PHY Identifier 2
- * @{
+ * @{
*/
#define SMSC9218I_PHY_ID2 0x00000003U
@@ -663,7 +663,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Auto-negotiation Advertisment
- * @{
+ * @{
*/
#define SMSC9218I_PHY_ANAR 0x00000004U
@@ -684,7 +684,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Auto-negotiation Link Partner Ability
- * @{
+ * @{
*/
#define SMSC9218I_PHY_ANLPAR 0x00000005U
@@ -702,7 +702,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Auto-negotiation Expansion
- * @{
+ * @{
*/
#define SMSC9218I_PHY_ANEXPR 0x00000006U
@@ -716,7 +716,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Mode Control and Status
- * @{
+ * @{
*/
#define SMSC9218I_PHY_MCSR 0x00000011U
@@ -727,7 +727,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Special Modes
- * @{
+ * @{
*/
#define SMSC9218I_PHY_SPMODES 0x00000012U
@@ -736,7 +736,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Special Control and Status Indications
- * @{
+ * @{
*/
#define SMSC9218I_PHY_CSIR 0x0000001bU
@@ -748,7 +748,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Interrupt Source Flag
- * @{
+ * @{
*/
#define SMSC9218I_PHY_ISR 0x0000001dU
@@ -764,7 +764,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name Interrupt Mask
- * @{
+ * @{
*/
#define SMSC9218I_PHY_IMR 0x0000001eU
@@ -780,7 +780,7 @@ volatile smsc9218i_registers *const smsc9218i = (volatile smsc9218i_registers *)
/**
* @name PHY Special Control and Status
- * @{
+ * @{
*/
#define SMSC9218I_PHY_PHYSCSR 0x0000001fU
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c
index a540faf4e0..a1c7d0902d 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c
@@ -581,7 +581,7 @@ static void smsc9218i_receive_task(void *arg)
/* Wait for events */
sc = rtems_bsdnet_event_receive(
- SMSC9218I_EVENT_RX | SMSC9218I_EVENT_PHY,
+ SMSC9218I_EVENT_RX | SMSC9218I_EVENT_PHY,
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&events
@@ -650,7 +650,7 @@ static void smsc9218i_receive_task(void *arg)
/* Wait for eDMA events */
sc = rtems_bsdnet_event_receive(
- SMSC9218I_EVENT_EDMA | SMSC9218I_EVENT_EDMA_ERROR,
+ SMSC9218I_EVENT_EDMA | SMSC9218I_EVENT_EDMA_ERROR,
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&events
@@ -870,7 +870,7 @@ static struct mbuf *smsc9218i_next_transmit_fragment(
jc->done = true;
SMSC9218I_PRINTF("tx: inactive\n");
- }
+ }
}
return m;
@@ -1222,7 +1222,7 @@ static void smsc9218i_transmit_task(void *arg)
SMSC9218I_EVENT_TX
| SMSC9218I_EVENT_TX_START
| SMSC9218I_EVENT_EDMA
- | SMSC9218I_EVENT_EDMA_ERROR,
+ | SMSC9218I_EVENT_EDMA_ERROR,
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&events
@@ -1471,8 +1471,8 @@ static void smsc9218i_interface_init(void *arg)
/* Start receive task */
if (e->receive_task == RTEMS_ID_NONE) {
e->receive_task = rtems_bsdnet_newproc(
- "ntrx",
- 4096,
+ "ntrx",
+ 4096,
smsc9218i_receive_task,
e
);
@@ -1481,8 +1481,8 @@ static void smsc9218i_interface_init(void *arg)
/* Start transmit task */
if (e->transmit_task == RTEMS_ID_NONE) {
e->transmit_task = rtems_bsdnet_newproc(
- "nttx",
- 4096,
+ "nttx",
+ 4096,
smsc9218i_transmit_task,
e
);
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspgetworkarea.c
index 93c13a6147..3d7aba56dd 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspgetworkarea.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspgetworkarea.c
@@ -39,7 +39,7 @@ void bsp_get_work_area(
)
{
*work_area_start = bsp_section_bss_end;
- *work_area_size = bsp_ram_end - 2 *
+ *work_area_size = bsp_ram_end - 2 *
MPC55XX_INTERRUPT_STACK_SIZE - bsp_section_bss_end;
*heap_start = bsp_external_ram_start;
*heap_size = (uintptr_t) bsp_external_ram_size;
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
index 8f516d335a..10e3881fe4 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
@@ -208,7 +208,7 @@ void bsp_start(void)
RTEMS_DEBUG_PRINT( "Interrupt stack start : 0x%08x\n", interrupt_stack_start);
RTEMS_DEBUG_PRINT( "Interrupt stack end : 0x%08x\n", interrupt_stack_start + interrupt_stack_size);
RTEMS_DEBUG_PRINT( "Interrupt stack size : 0x%08x\n", interrupt_stack_size);
-
+
/*
* Get CPU identification dynamically. Note that the get_ppc_cpu_type()
* function store the result in global variables so that it can be used
@@ -216,13 +216,13 @@ void bsp_start(void)
*/
myCpu = get_ppc_cpu_type();
myCpuRevision = get_ppc_cpu_revision();
-
+
/* Time reference value */
bsp_clicks_per_usec = bsp_clock_speed / 1000000;
/* Initialize External Bus Interface */
mpc55xx_ebi_init();
-
+
/* Initialize exceptions */
RTEMS_DEBUG_PRINT( "Initialize exceptions ...\n");
sc = ppc_exc_initialize(
@@ -244,7 +244,7 @@ void bsp_start(void)
} else {
DEBUG_DONE();
}
-
+
/* Initialize eMIOS */
mpc55xx_emios_initialize( 1);
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S
index 6caf618828..5bfe00f3f8 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S
@@ -22,17 +22,17 @@
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these warnings.
-
+
/**
* @defgroup mpc55xx_asm Assembler files
*
* @ingroup mpc55xx
*/
-
+
#include <libcpu/powerpc-utility.h>
#include <mpc55xx/reg-defs.h>
-.section ".entry", "ax"
+.section ".entry", "ax"
PUBLIC_VAR (start)
start:
/*
@@ -214,7 +214,7 @@ start:
/* Clear command line */
xor r3, r3, r3
-
+
/* Start RTEMS */
bl SYM (boot_card)
@@ -260,7 +260,7 @@ no_chache_invalidation_abort:
/* Wait? */
bne check_cache_invalidation
-
+
/* Enable cache */
LWI r6, L1CSR0_SETTINGS
mfspr r5, L1CSR0
@@ -270,7 +270,7 @@ no_chache_invalidation_abort:
mtspr L1CSR0, r5
/* Return */
- blr
+ blr
-twiddle:
+twiddle:
b twiddle
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/tests/tests.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/tests/tests.c
index 758ef4ce8e..a61ae53b81 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/tests/tests.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/tests/tests.c
@@ -95,7 +95,7 @@ static rtems_task test_mpc55xx_dspi_writer( rtems_task_argument arg)
sc = rtems_libi2c_send_addr( device, MPC55XX_TEST_DSPI_ADDRESS);
RTEMS_CHECK_SC_TASK( sc, "rtems_libi2c_send_addr");
-
+
for (i = 0; i < MPC55XX_TEST_DSPI_BUFSIZE; ++i) {
test_mpc55xx_dspi_writer_outbuf [0] [i] = 0xa5;
test_mpc55xx_dspi_writer_outbuf [1] [i] = 0xa5;
@@ -164,7 +164,7 @@ static rtems_task test_mpc55xx_dspi_reader( rtems_task_argument arg)
sc = rtems_libi2c_send_addr( device, MPC55XX_TEST_DSPI_ADDRESS);
RTEMS_CHECK_SC_TASK( sc, "rtems_libi2c_send_addr");
-
+
for (i = 0; i < MPC55XX_TEST_DSPI_BUFSIZE; ++i) {
test_mpc55xx_dspi_reader_inbuf [i] = -1;
}
@@ -182,7 +182,7 @@ static rtems_task test_mpc55xx_dspi_reader( rtems_task_argument arg)
RTEMS_CHECK_SC_TASK( sc, "rtems_semaphore_obtain");
RTEMS_DEBUG_PRINT( "Pong\n");
-
+
rv = rtems_libi2c_read_bytes( device, test_mpc55xx_dspi_reader_inbuf, MPC55XX_TEST_DSPI_BUFSIZE);
RTEMS_CHECK_RV_TASK( rv, "rtems_libi2c_read_bytes");
@@ -287,7 +287,7 @@ rtems_status_code mpc55xx_dspi_register(void)
#if 0
rtems_id writer_task_id;
rtems_id reader_task_id;
-
+
sc = rtems_task_create(
rtems_build_name( 'T', 'W', 'R', 'T'),
2,
@@ -306,7 +306,7 @@ rtems_status_code mpc55xx_dspi_register(void)
&reader_task_id
);
RTEMS_CHECK_SC( sc, "rtems_task_create");
-
+
sc = rtems_task_start( writer_task_id, test_mpc55xx_dspi_writer, 0);
RTEMS_CHECK_SC( sc, "rtems_task_start");
sc = rtems_task_start( reader_task_id, test_mpc55xx_dspi_reader, 0);
@@ -506,7 +506,7 @@ rtems_task test_sd_card( rtems_task_argument arg)
int b = 0;
const char device_name [] = "/dev/spi0.sd-card-0";
fd = open( device_name, O_RDWR);
-
+
RTEMS_CHECK_RV_TASK( fd, "open");
while (1) {
for (i = 0; i < TEST_SD_CARD_BUF_SIZE; ++i) {
@@ -520,7 +520,7 @@ rtems_task test_sd_card( rtems_task_argument arg)
}
rv = close( fd);
RTEMS_CHECK_RV_TASK( rv, "close");
-
+
/* Read */
fd = open( device_name, O_RDWR);
RTEMS_CHECK_RV_TASK( fd, "open");
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c b/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
index 8994896696..ebfb5cc32c 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
@@ -192,18 +192,18 @@ int BSP_irq_disable_at_cpm(const rtems_irq_number irqLine)
return 0;
}
-
-int BSP_irq_enabled_at_cpm(const rtems_irq_number irqLine)
-{
- int cpm_irq_index;
-
- if (!is_cpm_irq(irqLine))
- return 0;
-
- cpm_irq_index = ((int) (irqLine) - BSP_CPM_IRQ_LOWEST_OFFSET);
-
- return ((m8260.simr_h & SIU_MaskBit[cpm_irq_index].mask_h) ||
- (m8260.simr_l & SIU_MaskBit[cpm_irq_index].mask_l));
+
+int BSP_irq_enabled_at_cpm(const rtems_irq_number irqLine)
+{
+ int cpm_irq_index;
+
+ if (!is_cpm_irq(irqLine))
+ return 0;
+
+ cpm_irq_index = ((int) (irqLine) - BSP_CPM_IRQ_LOWEST_OFFSET);
+
+ return ((m8260.simr_h & SIU_MaskBit[cpm_irq_index].mask_h) ||
+ (m8260.simr_l & SIU_MaskBit[cpm_irq_index].mask_l));
}
#ifdef DISPATCH_HANDLER_STAT
@@ -274,8 +274,8 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned excNum)
m8260.sipnr_h |= SIU_MaskBit[irq].mask_h;
m8260.sipnr_l |= SIU_MaskBit[irq].mask_l;
- /*
- * make sure, that the masking operations in
+ /*
+ * make sure, that the masking operations in
* ICTL and MSR are executed in order
*/
asm volatile("sync":::"memory");
@@ -291,8 +291,8 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned excNum)
/* disable exceptions again */
_CPU_MSR_SET(msr);
- /*
- * make sure, that the masking operations in
+ /*
+ * make sure, that the masking operations in
* ICTL and MSR are executed in order
*/
asm volatile("sync":::"memory");
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/flash/flashcfg.c b/c/src/lib/libbsp/powerpc/mvme3100/flash/flashcfg.c
index 6451a20976..7da2be2079 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/flash/flashcfg.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/flash/flashcfg.c
@@ -2,20 +2,20 @@
/* BSP-specific bits of flash programmer support */
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -24,18 +24,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -44,9 +44,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <bsp.h>
#include <libcpu/spr.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/i2c/i2c_init.c b/c/src/lib/libbsp/powerpc/mvme3100/i2c/i2c_init.c
index 6e9e49eb65..ce0b834a1c 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/i2c/i2c_init.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/i2c/i2c_init.c
@@ -2,20 +2,20 @@
/* Register i2c bus driver & devices */
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -24,18 +24,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -44,9 +44,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <bsp.h>
@@ -92,7 +92,7 @@ int busno, succ = 0;
safe_printf("Initializing I2C library failed\n");
return -1;
}
-
+
/* Register our bus driver */
if ( (busno=rtems_libi2c_register_bus(
BSP_I2C_BUS0_NAME,
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c b/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c
index 1c57f5723e..e3f2524ea6 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c.c
@@ -1,19 +1,19 @@
/* I2C bus driver for mpc8540-based boards */
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -22,18 +22,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -42,9 +42,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/* Note: We maintain base address, IRQ etc. statically and
* globally. We don't bother creating driver-specific
@@ -64,7 +64,7 @@
#include "mpc8540_i2c_busdrv.h"
-#define STATIC
+#define STATIC
/* I2C controller register definitions */
#define I2CADR 0x3000
@@ -205,7 +205,7 @@ i2c_xfer(int rw, uint8_t *buf, int len)
{
int i;
rtems_status_code sc;
-
+
if ( rw ) {
i2c_clr( I2CCR, I2CCR_MTX );
} else {
@@ -233,7 +233,7 @@ rtems_status_code sc;
return i;
}
-/*
+/*
* This bus controller gives us lagging data, i.e.,
* when we read a byte from the data reg then that
* issues a read cycle on the bus and gives us the
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c_busdrv.h b/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c_busdrv.h
index 96921c19d8..7ebebb0b00 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c_busdrv.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/i2c/mpc8540_i2c_busdrv.h
@@ -1,20 +1,20 @@
#ifndef MPC8540_I2C_BUS_DRIVER_H
#define MPC8540_I2C_BUS_DRIVER_H
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -23,18 +23,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -43,9 +43,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#ifdef __cplusplus
extern "C" {
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
index 115750fb0c..664cdf9003 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/include/bsp.h
@@ -26,7 +26,7 @@
* confdefs.h overrides for this BSP:
*/
#define CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
-
+
#define BSP_INTERRUPT_STACK_SIZE (16 * 1024)
/*
@@ -47,11 +47,11 @@
* NOTE: VME addresses should NEVER be translated using these constants!
* they are strictly for BSP internal use. Drivers etc. should use
* the translation routines int VME.h (BSP_vme2local_adrs/BSP_local2vme_adrs).
- *
+ *
* CPU ADDR PCI_ADDR VME ADDR
- *
+ *
* 00000000 XXXXXXXX XXXXXXXX
- * ^ ^ ........
+ * ^ ^ ........
* | |
* | | e.g., RAM XXXXXXXX
* | | 00000000
@@ -74,18 +74,18 @@
* VME devices hostbridge mapped by
* visible here universe
* =====================================================
- *
+ *
*/
/* fundamental addresses for BSP (CHRPxxx and PREPxxx are from libcpu/io.h) */
-#define _IO_BASE 0xe0000000 /* Motload's PCI IO base */
+#define _IO_BASE 0xe0000000 /* Motload's PCI IO base */
#define _ISA_MEM_BASE CHRP_ISA_MEM_BASE
/* address of our ram on the PCI bus */
#define PCI_DRAM_OFFSET CHRP_PCI_DRAM_OFFSET
/* offset of pci memory as seen from the CPU */
#define PCI_MEM_BASE 0
/* where (in CPU addr. space) does the PCI window start */
-#define PCI_MEM_WIN0 0x80000000
+#define PCI_MEM_WIN0 0x80000000
/*
* Base address definitions for several devices
@@ -117,7 +117,7 @@
#define BSP_USR1_I2C_ADDR (0xA6>>1) /* the 2nd user EEPROM */
#define BSP_THM_I2C_ADDR (0x90>>1) /* the DS1621 temperature sensor & thermostat */
#define BSP_RTC_I2C_ADDR (0xD0>>1) /* the DS1375 wall-clock */
-
+
#define BSP_I2C_BUS_DESCRIPTOR mpc8540_i2c_bus_descriptor
#define BSP_I2C_BUS0_NAME "/dev/i2c0"
@@ -152,7 +152,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-/* Initialize the I2C driver and register all devices
+/* Initialize the I2C driver and register all devices
* RETURNS 0 on success, -1 on error.
*
* Access to the VPD and user EEPROMS as well
@@ -165,15 +165,15 @@ extern "C" {
* /dev/i2c0.ds1621 (read-only; one byte: board-temp in degC)
* /dev/i2c0.ds1621-raw (read-write; transfer bytes to/from the ds1621)
* /dev/i2c0.ds1375-raw (read-write; transfer bytes to/from the ds1375)
- *
+ *
*/
int
BSP_i2c_initialize();
/* System Control Register */
#define BSP_MVME3100_SYS_CR ((volatile uint8_t *)0xe2000001)
-#define BSP_MVME3100_SYS_CR_RESET_MSK (7<<5)
-#define BSP_MVME3100_SYS_CR_RESET (5<<5)
+#define BSP_MVME3100_SYS_CR_RESET_MSK (7<<5)
+#define BSP_MVME3100_SYS_CR_RESET (5<<5)
#define BSP_MVME3100_SYS_CR_EEPROM_WP (1<<1)
#define BSP_MVME3100_SYS_CR_TSTAT_MSK (1<<0)
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/irq/irq.h b/c/src/lib/libbsp/powerpc/mvme3100/irq/irq.h
index d7002527e9..4c982712d6 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/irq/irq.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/irq/irq.h
@@ -97,7 +97,7 @@ extern "C" {
#define BSP_UART_COM2_IRQ (BSP_CORE_IRQ_LOWEST_OFFSET + 26)
#define BSP_I2C_IRQ (BSP_CORE_IRQ_LOWEST_OFFSET + 27)
-/*
+/*
* Some internal (CORE) name definitions
*/
/* Ethernet (FEC) */
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/irq/irq_init.c b/c/src/lib/libbsp/powerpc/mvme3100/irq/irq_init.c
index 58f364b462..24eedccab9 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/irq/irq_init.c
@@ -73,7 +73,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
unsigned char pol[56];
int i;
- /* Note: The openpic driver initializes only as many
+ /* Note: The openpic driver initializes only as many
* 'pic-external' interrupt sources as reported
* by the feature register.
* The 8540's openpic supports 12 core-external
@@ -103,7 +103,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
* to 'low/0' will disable the interrupt but
* I found this not to be true: on the device
* I tested the interrupt was asserted hard.
- */
+ */
/* core-external sources on the mvme3100 are active-low,
* core-internal sources are active high.
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/network/if_tsec_pub.h b/c/src/lib/libbsp/powerpc/mvme3100/network/if_tsec_pub.h
index f0a6f586e3..f84c760cd0 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/network/if_tsec_pub.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/network/if_tsec_pub.h
@@ -1,20 +1,20 @@
#ifndef IF_TSEC_PUBLIC_INTERFACE_H
#define IF_TSEC_PUBLIC_INTERFACE_H
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -23,18 +23,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -43,9 +43,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <stdio.h>
@@ -87,8 +87,8 @@ struct tsec_private;
* by BSP_tsec_send_buf() earlier. The callback is passed 'cleanup_txbuf_arg'
* and a flag indicating whether the send had been successful.
* The driver no longer accesses 'user_buf' after invoking this callback.
- * CONTEXT: This callback is executed either by BSP_tsec_swipe_tx() or
- * BSP_tsec_send_buf(), BSP_tsec_init_hw(), BSP_tsec_stop_hw() (the latter
+ * CONTEXT: This callback is executed either by BSP_tsec_swipe_tx() or
+ * BSP_tsec_send_buf(), BSP_tsec_init_hw(), BSP_tsec_stop_hw() (the latter
* ones calling BSP_tsec_swipe_tx()).
* void *cleanup_txbuf_arg:
* Closure argument that is passed on to 'cleanup_txbuf()' callback;
@@ -106,7 +106,7 @@ struct tsec_private;
* instead of handing it out to 'consume_rxbuf()'.
* CONTEXT: Called when initializing the RX ring (BSP_tsec_init_hw()) or when
* swiping it (BSP_tsec_swipe_rx()).
- *
+ *
*
* void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len);
* Pointer to user-supplied callback to pass a received buffer back to
@@ -141,7 +141,7 @@ struct tsec_private *
BSP_tsec_setup(
int unit,
rtems_id driver_tid,
- void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
+ void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
void * cleanup_txbuf_arg,
void * (*alloc_rxbuf)(int *p_size, uintptr_t *p_data_addr),
void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len),
@@ -162,7 +162,7 @@ BSP_tsec_setup_1(
int unit,
void (*isr)(void *isr_arg),
void * isr_arg,
- void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
+ void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
void * cleanup_txbuf_arg,
void * (*alloc_rxbuf)(int *p_size, uintptr_t *p_data_addr),
void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len),
@@ -195,7 +195,7 @@ BSP_tsec_reset_stats(struct tsec_private *mp);
/*
* Initialize interface hardware
*
- * 'mp' handle obtained by from BSP_tsec_setup().
+ * 'mp' handle obtained by from BSP_tsec_setup().
* 'promisc' whether to set promiscuous flag.
* 'enaddr' pointer to six bytes with MAC address. Read
* from the device if NULL.
@@ -228,7 +228,7 @@ BSP_tsec_mcast_filter_accept_all(struct tsec_private *mp);
* Add a MAC address to the multicast filter and increment
* the reference count for the matching hash-table entry
* (see BSP_tsec_mcast_filter_accept_del()).
- *
+ *
* Existing entries are not changed but note that
* the filter is imperfect, i.e., multiple MAC addresses
* may alias to a single filter entry. Hence software
@@ -405,7 +405,7 @@ BSP_tsec_disable_irq_mask(struct tsec_private *mp, uint32_t irq_mask);
/* Acknowledge and clear selected interrupts.
*
* RETURNS: All pending interrupts.
- *
+ *
* NOTE: Only pending interrupts contained in 'mask'
* are cleared. Others are left pending.
*
@@ -427,7 +427,7 @@ BSP_tsec_get_tid(struct tsec_private *mp);
struct tsec_private *
BSP_tsec_getp(unsigned index);
-/*
+/*
*
* Example driver task loop (note: no synchronization of
* buffer access shown!).
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/network/tsec.c b/c/src/lib/libbsp/powerpc/mvme3100/network/tsec.c
index 1b54688128..2a6b568403 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/network/tsec.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/network/tsec.c
@@ -1,17 +1,17 @@
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -20,18 +20,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -40,9 +40,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <rtems/error.h>
@@ -219,7 +219,7 @@ void tsec_dump_rring(struct tsec_private *mp);
/*
* Misuse reserved bit 4 to flag link interrupts
* (which are totally external to the TSEC).
- * Because reading the MII is so slow we don't
+ * Because reading the MII is so slow we don't
* want to poll MII unnecessarily from RX/TX ISRs
*/
#define TSEC_LINK_INTR (1<<(31- 4))
@@ -232,7 +232,7 @@ void tsec_dump_rring(struct tsec_private *mp);
#define TSEC_IEVENT_TXF (1<<(31-11))
#define TSEC_IEVENT_LC (1<<(31-13))
#define TSEC_IEVENT_CRLXDA (1<<(31-14))
-#define TSEC_IEVENT_XFUN (1<<(31-15))
+#define TSEC_IEVENT_XFUN (1<<(31-15))
#define TSEC_IEVENT_RXB (1<<(31-16))
#define TSEC_IEVENT_GRSC (1<<(31-23))
#define TSEC_IEVENT_RXF (1<<(31-24))
@@ -264,7 +264,7 @@ void tsec_dump_rring(struct tsec_private *mp);
#define TSEC_IMASK_TXFEN (1<<(31-11))
#define TSEC_IMASK_LCEN (1<<(31-13))
#define TSEC_IMASK_CRLXDAEN (1<<(31-14))
-#define TSEC_IMASK_XFUNEN (1<<(31-15))
+#define TSEC_IMASK_XFUNEN (1<<(31-15))
#define TSEC_IMASK_RXBEN (1<<(31-16))
#define TSEC_IMASK_GRSCEN (1<<(31-23))
#define TSEC_IMASK_RXFEN (1<<(31-24))
@@ -341,7 +341,7 @@ void tsec_dump_rring(struct tsec_private *mp);
#define TSEC_IPGIFG 0x508
#define TSEC_HAFDUP 0x50c
#define TSEC_MAXFRM 0x510
-#define TSEC_MIIMCFG 0x520 /* TSEC only */
+#define TSEC_MIIMCFG 0x520 /* TSEC only */
#define TSEC_MIIMCOM 0x524 /* TSEC only */
#define TSEC_MIIMCOM_SCAN (1<<(31-30))
#define TSEC_MIIMCOM_READ (1<<(31-31))
@@ -532,7 +532,7 @@ static inline void st_be32(volatile uint32_t *a, uint32_t v)
#ifdef SW_COHERENCY
#error "SW_COHERENCY not implemented"
-/* Note: maintaining BD coherency in software is not trivial
+/* Note: maintaining BD coherency in software is not trivial
* because BDs are smaller than a cache line;
* we cannot pad a BD to the length of a cache line because
* the TSEC assumes BDs layed out sequentially in memory.
@@ -540,7 +540,7 @@ static inline void st_be32(volatile uint32_t *a, uint32_t v)
* line either because the manual says that the length
* field of a TX BD must not be zero.
*
- * We probably would need MMU resources to map BDs
+ * We probably would need MMU resources to map BDs
* as non-cachable.
*
* Maintaining buffer coherency would be easier:
@@ -659,7 +659,7 @@ struct tsec_private {
* connected to mii bus of 1st controller.
*/
unsigned phy; /* Phy address on mii bus */
- unsigned unit; /* Driver instance (one-based */
+ unsigned unit; /* Driver instance (one-based */
int isfec; /* Set if a FEC (not TSEC) controller */
struct tsec_softc *sc; /* Pointer to BSD driver struct */
TSEC_BD *ring_area; /* Not necessarily aligned */
@@ -727,12 +727,12 @@ typedef struct tsec_bsp_config {
/********** Global Variables ********************/
/* You may override base addresses
- * externally - but you must
+ * externally - but you must
* then also define TSEC_NUM_DRIVER_SLOTS.
*/
#ifndef TSEC_CONFIG
-static TsecBspConfig tsec_config[] =
+static TsecBspConfig tsec_config[] =
{
{
base: BSP_8540_CCSR_BASE + 0x24000,
@@ -896,7 +896,7 @@ FEC_Enet_Base b = mp->base;
* the PHY ISR is not hooked yet and there can be no
* interrupts...
*/
- if ( tsec_mtx )
+ if ( tsec_mtx )
#endif
phy_dis_irq_at_phy( mp );
@@ -918,7 +918,7 @@ FEC_Enet_Base b = mp->base;
/* wait for > 8ms */
rtems_task_wake_after(1);
-
+
/* set GRS if not already stopped */
if ( ! (TSEC_DMACTRL_GRS & fec_rd(b, TSEC_DMACTRL)) ) {
/* Make sure GRSC is clear */
@@ -947,7 +947,7 @@ install_remove_isrs(int install, struct tsec_private *mp, uint32_t irq_mask)
xxx.on = noop;
xxx.off = noop;
- xxx.isOn = nopf;
+ xxx.isOn = nopf;
xxx.handle = mp;
if ( irq_mask & TSEC_TXIRQ ) {
@@ -965,7 +965,7 @@ install_remove_isrs(int install, struct tsec_private *mp, uint32_t irq_mask)
if ( (line = TSEC_CONFIG[unit-1].rirq) < 0 && ! installed ) {
/* have no dedicated RX IRQ line; install TX ISR if not already done */
line = TSEC_CONFIG[unit-1].xirq;
- }
+ }
xxx.name = line;
xxx.hdl = tsec_risr;
if ( ! (install ?
@@ -979,7 +979,7 @@ install_remove_isrs(int install, struct tsec_private *mp, uint32_t irq_mask)
if ( (line = TSEC_CONFIG[unit-1].eirq) < 0 && ! installed ) {
/* have no dedicated RX IRQ line; install TX ISR if not already done */
line = TSEC_CONFIG[unit-1].xirq;
- }
+ }
xxx.name = line;
xxx.hdl = tsec_eisr;
if ( ! (install ?
@@ -1010,8 +1010,8 @@ install_remove_isrs(int install, struct tsec_private *mp, uint32_t irq_mask)
* by BSP_tsec_send_buf() earlier. The callback is passed 'cleanup_txbuf_arg'
* and a flag indicating whether the send had been successful.
* The driver no longer accesses 'user_buf' after invoking this callback.
- * CONTEXT: This callback is executed either by BSP_tsec_swipe_tx() or
- * BSP_tsec_send_buf(), BSP_tsec_init_hw(), BSP_tsec_stop_hw() (the latter
+ * CONTEXT: This callback is executed either by BSP_tsec_swipe_tx() or
+ * BSP_tsec_send_buf(), BSP_tsec_init_hw(), BSP_tsec_stop_hw() (the latter
* ones calling BSP_tsec_swipe_tx()).
* void *cleanup_txbuf_arg:
* Closure argument that is passed on to 'cleanup_txbuf()' callback;
@@ -1029,7 +1029,7 @@ install_remove_isrs(int install, struct tsec_private *mp, uint32_t irq_mask)
* instead of handing it out to 'consume_rxbuf()'.
* CONTEXT: Called when initializing the RX ring (BSP_tsec_init_hw()) or when
* swiping it (BSP_tsec_swipe_rx()).
- *
+ *
*
* void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len);
* Pointer to user-supplied callback to pass a received buffer back to
@@ -1067,7 +1067,7 @@ tsec_setup_internal(
rtems_id driver_tid,
void (*isr)(void *),
void * isr_arg,
- void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
+ void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
void * cleanup_txbuf_arg,
void * (*alloc_rxbuf)(int *p_size, uintptr_t *p_data_addr),
void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len),
@@ -1145,7 +1145,7 @@ struct ifnet *ifp;
M_DEVBUF,
M_WAIT );
assert( mp->tx_ring_user );
-
+
mp->rx_ring_user = mp->tx_ring_user + mp->tx_ring_size;
/* Initialize TX ring */
@@ -1208,7 +1208,7 @@ struct ifnet *ifp;
/* another task was faster installing the mutex */
rtems_semaphore_delete( new_mtx );
}
-
+
}
#endif
@@ -1228,7 +1228,7 @@ struct tsec_private *
BSP_tsec_setup(
int unit,
rtems_id driver_tid,
- void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
+ void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
void * cleanup_txbuf_arg,
void * (*alloc_rxbuf)(int *p_size, uintptr_t *p_data_addr),
void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len),
@@ -1260,7 +1260,7 @@ BSP_tsec_setup_1(
int unit,
void (*isr)(void*),
void * isr_arg,
- void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
+ void (*cleanup_txbuf)(void *user_buf, void *cleanup_txbuf_arg, int error_on_tx_occurred),
void * cleanup_txbuf_arg,
void * (*alloc_rxbuf)(int *p_size, uintptr_t *p_data_addr),
void (*consume_rxbuf)(void *user_buf, void *consume_rxbuf_arg, int len),
@@ -1329,7 +1329,7 @@ int media = IFM_MAKEWORD(0, 0, 0, 0);
/*
* Initialize interface hardware
*
- * 'mp' handle obtained by from BSP_tsec_setup().
+ * 'mp' handle obtained by from BSP_tsec_setup().
* 'promisc' whether to set promiscuous flag.
* 'enaddr' pointer to six bytes with MAC address. Read
* from the device if NULL.
@@ -1360,7 +1360,7 @@ int sz;
}
if ( data_area & (RX_BUF_ALIGNMENT-1) )
rtems_panic(DRVNAME": RX buffers must be %i-byte aligned", RX_BUF_ALIGNMENT);
-
+
bd_wrbuf( &mp->rx_ring[i], data_area );
st_be16 ( &mp->rx_ring[i].len, sz );
bd_setfl( &mp->rx_ring[i], TSEC_RXBD_E | TSEC_RXBD_I );
@@ -1407,7 +1407,7 @@ int sz;
*/
fec_wr( b, TSEC_TXIC, 0);
}
- fec_wr( b, TSEC_OSTBD, 0 );
+ fec_wr( b, TSEC_OSTBD, 0 );
fec_wr( b, TSEC_RCTRL, (promisc ? TSEC_RCTRL_PROM : 0) );
fec_wr( b, TSEC_RSTAT, TSEC_RSTAT_QHLT );
if ( !mp->isfec ) {
@@ -1484,7 +1484,7 @@ int sz;
/* enable PHY irq (MII operation, slow) */
phy_en_irq_at_phy (mp );
}
-
+
BSP_tsec_enable_irq_mask( mp, mp->irq_mask );
}
@@ -1631,7 +1631,7 @@ unsigned i;
/* should be OK to clear all ownership flags */
for ( i=0; i<mp->tx_ring_size; i++ ) {
bd_clrfl( &mp->tx_ring[i], TSEC_TXBD_R );
- }
+ }
BSP_tsec_swipe_tx(mp);
#if DEBUG > 0
tsec_dump_tring(mp);
@@ -1835,7 +1835,7 @@ startover:
#endif
bd_wrbuf( bd, 0 );
bd_clrfl( bd, TSEC_TXBD_R | TSEC_TXBD_L );
-
+
mp->tx_avail++;
}
mp->tx_avail++;
@@ -1872,7 +1872,7 @@ startover:
if ( d == t ) {
tsec_dump_tring(mp);
printf("l %i, d %i, t %i, nmbs %i\n", l,d,t, nmbs);
- } else
+ } else
assert( d != t );
assert( ! bd_rdbuf( &mp->tx_ring[d] ) );
#endif
@@ -1949,7 +1949,7 @@ void *newbuf;
int sz;
uint16_t len;
uintptr_t baddr;
-
+
i = mp->rx_tail;
bd = mp->rx_ring + i;
flags = bd_rdfl( bd );
@@ -1994,7 +1994,7 @@ uintptr_t baddr;
rval++;
- i = NEXT_RXI( mp, i );
+ i = NEXT_RXI( mp, i );
bd = mp->rx_ring + i;
flags = bd_rdfl( bd );
}
@@ -2014,7 +2014,7 @@ union {
uint16_t s[2];
uint8_t c[4];
} x;
- st_le32( (volatile uint32_t *)(eaddr+2), fec_rd(mp->base, TSEC_MACSTNADDR1) );
+ st_le32( (volatile uint32_t *)(eaddr+2), fec_rd(mp->base, TSEC_MACSTNADDR1) );
x.u = fec_rd(mp->base, TSEC_MACSTNADDR2);
st_le16( (volatile uint16_t *)(eaddr), x.s[0]);
}
@@ -2401,7 +2401,7 @@ BSP_tsec_getp(unsigned index)
return & theTsecEths[index].pvt;
}
-/*
+/*
*
* Example driver task loop (note: no synchronization of
* buffer access shown!).
@@ -2462,7 +2462,7 @@ unsigned long l,o;
m->m_len = m->m_pkthdr.len = l;
*psz = m->m_len;
- *paddr = mtod(m, unsigned long);
+ *paddr = mtod(m, unsigned long);
return (void*) m;
}
@@ -2489,7 +2489,7 @@ struct mbuf *m = buf;
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
-
+
/* send buffer upwards */
if (0) {
/* Low-level debugging */
@@ -2658,7 +2658,7 @@ int f;
case SIOCSIFMEDIA:
error = BSP_tsec_media_ioctl(&sc->pvt, cmd, &ifr->ifr_media);
break;
-
+
case SIOCADDMULTI:
case SIOCDELMULTI:
error = (cmd == SIOCADDMULTI)
@@ -2831,7 +2831,7 @@ struct ifnet *ifp;
/*
* While nonzero, the 'if->if_timer' is decremented
* (by the networking code) at a rate of IFNET_SLOWHZ (1hz) and 'if_watchdog'
- * is called when it expires.
+ * is called when it expires.
* If either of those fields is 0 the feature is disabled.
*/
ifp->if_watchdog = tsec_watchdog;
@@ -2947,7 +2947,7 @@ struct ifnet *ifp;
#define PHY_IRQS ( BCM54xx_IRQ_LNK | BCM54xx_IRQ_SPD | BCM54xx_IRQ_DUP )
-static void
+static void
phy_en_irq_at_phy( struct tsec_private *mp )
{
uint32_t ecr;
@@ -2959,7 +2959,7 @@ uint32_t ecr;
REGUNLOCK();
}
-static void
+static void
phy_dis_irq_at_phy( struct tsec_private *mp )
{
uint32_t ecr;
@@ -3109,7 +3109,7 @@ void cleanup_txbuf_test(void *u, void *a, int err)
{
printf("cleanup_txbuf_test (releasing buf 0x%8p)\n", u);
free(u);
- if ( err )
+ if ( err )
printf("cleanup_txbuf_test: an error was detected\n");
}
@@ -3135,7 +3135,7 @@ uintptr_t d = (uintptr_t)ALIGNTO(user_buf,RX_BUF_ALIGNMENT);
/* PRIxPTR is still broken */
printf("consuming rx buf 0x%8p (data@ 0x%08"PRIx32")\n",user_buf, (uint32_t)d);
- if ( len > 32 )
+ if ( len > 32 )
len = 32;
if ( len < 0 )
printf("consume_rxbuf_test: ERROR occurred: 0x%x\n", len);
@@ -3158,7 +3158,7 @@ void * tsec_up()
struct tsec_private *tsec =
BSP_tsec_setup( 1, 0,
cleanup_txbuf_test, 0,
- alloc_rxbuf_test,
+ alloc_rxbuf_test,
consume_rxbuf_test, 0,
2,
2,
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c b/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c
index 56c16e7f07..92e2244171 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/pci/detect_host_bridge.c
@@ -2,20 +2,20 @@
/* PCI Initialization */
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -24,18 +24,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -44,9 +44,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <bsp.h>
#include <bsp/pci.h>
@@ -86,7 +86,7 @@ dump_dev_cb(
int dev,
int fun,
void *uarg
-)
+)
{
uint16_t vi,di;
uint16_t cd,st;
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/start/start.S b/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
index dbbe5f69c7..bfbe4d321c 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
+++ b/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
@@ -6,7 +6,7 @@
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
- *
+ *
* Modified for mvme3100 by T. Straumann, 2007.
*
* $Id$
@@ -45,7 +45,7 @@ __rtems_entry_point:
* mapping a possible larger area as memory (not-guarded, caching-enabled)
* than actual physical memory is available.
* In case of speculative loads this may cause 'memory-select' errors
- * which seem to raise 'core_fault_in' (found no description in
+ * which seem to raise 'core_fault_in' (found no description in
* the manual but I experienced this problem).
* Such errors (if HID1[RFXE] is clear) may *stall* execution
* leading to mysterious 'hangs'.
@@ -79,7 +79,7 @@ __rtems_entry_point:
li r5, (CPU_STACK_ALIGNMENT - 1)
andc r1, r9, r5
/*
- * We are now in a environment that is totally independent from
+ * We are now in a environment that is totally independent from
* bootloader setup.
*/
/* pass result of 'save_boot_params' to 'boot_card' in R3 */
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
index 65da976c7f..69d3569ea9 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c
@@ -28,13 +28,13 @@
#include <libcpu/spr.h>
#include <libcpu/io.h>
#include <libcpu/e500_mmu.h>
-#include <bsp/uart.h>
-#include <bsp/irq.h>
-#include <bsp/pci.h>
+#include <bsp/uart.h>
+#include <bsp/irq.h>
+#include <bsp/pci.h>
#include <bsp/vpd.h>
#include <libcpu/cpuIdent.h>
#include <bsp/vectors.h>
-#include <rtems/powerpc/powerpc.h>
+#include <rtems/powerpc/powerpc.h>
#define SHOW_MORE_INIT_SETTINGS
#undef DEBUG
@@ -68,11 +68,11 @@ uint32_t bsp_clicks_per_usec = 0;
* Total memory using RESIDUAL DATA
*/
unsigned int BSP_mem_size = 0;
-/*
+/*
* PCI Bus Frequency
*/
unsigned int BSP_pci_bus_frequency = 0xdeadbeef;
-/*
+/*
* PPC Bus Frequency
*/
unsigned int BSP_bus_frequency = 0;
@@ -250,7 +250,7 @@ VpdBufRec vpdData [] = {
/*
* Get CPU identification dynamically. Note that the get_ppc_cpu_type()
- * function store the result in global variables so that it can be used
+ * function store the result in global variables so that it can be used
* later...
*/
myCpu = get_ppc_cpu_type();
@@ -412,7 +412,7 @@ VpdBufRec vpdData [] = {
if (0) {
asm volatile("mtmsr %0"::"r"(msr|0x8000));
for (i=0; i<12; i++)
- BSP_enable_irq_at_pic(i);
+ BSP_enable_irq_at_pic(i);
printk("IRQS enabled\n");
}
}
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/misc.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/misc.c
index 7a18df3362..5cd26d7749 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/startup/misc.c
+++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/misc.c
@@ -2,20 +2,20 @@
/* Miscellaneous small BSP routines; reboot, board CSR, ... */
-/*
+/*
* Authorship
* ----------
* This software ('mvme3100' RTEMS BSP) was created by
*
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'mvme3100' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -24,18 +24,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -44,9 +44,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <bsp.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h
index 3366efab41..4c7d9b076c 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/mvme3100/vme/VMEConfig.h
@@ -4,19 +4,19 @@
/* mvme3100 BSP specific address space configuration parameters */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002..2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/*
* NOTE: the BSP (startup/bspstart.c) uses
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c
index a12ee38052..c0f34b38c7 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c
@@ -13,8 +13,8 @@
* For full TWSI protocol description look in Philips Semiconductor
* TWSI spec.
*
- * We need it to read out I2C devices used for the MVME5500
- * (eg. the memory SPD and VPD).
+ * We need it to read out I2C devices used for the MVME5500
+ * (eg. the memory SPD and VPD).
*
*/
#include <libcpu/spr.h> /*registers.h included here for rtems_bsp_delay()*/
@@ -42,8 +42,8 @@ void GT64260TWSIinit(void)
/* See 24.2.5 : Assume bus speed is 133MHZ
* Try to be close to the default frequency : 62.5KHZ
- * value 0x2c: 69.27 KHz TWSI bus clock
- */
+ * value 0x2c: 69.27 KHz TWSI bus clock
+ */
outl(0x2c, TWSI_BAUDE_RATE);
rtems_bsp_delay(1000);
@@ -54,11 +54,11 @@ void GT64260TWSIinit(void)
#if TWSI_DEBUG
printk(")\n");
#endif
- }
+ }
}
/* return the interrupt flag */
-int GT64260TWSIintFlag(void)
+int GT64260TWSIintFlag(void)
{
unsigned int loop;
@@ -70,7 +70,7 @@ int GT64260TWSIintFlag(void)
return(0);
}
-int GT64260TWSIstop(void)
+int GT64260TWSIstop(void)
{
#if TWSI_DEBUG
@@ -97,8 +97,8 @@ int GT64260TWSIstop(void)
int GT64260TWSIstart(void)
{
- unsigned int loop;
- unsigned int status;
+ unsigned int loop;
+ unsigned int status;
#if TWSI_DEBUG
printk("GT64260TWSIstart(");
@@ -113,7 +113,7 @@ int GT64260TWSIstart(void)
if (GT64260TWSIintFlag()) {
/* Check for completion of START sequence */
for (loop = 0; loop<MAX_LOOP; loop++ ) {
- /* if (start condition transmitted) ||
+ /* if (start condition transmitted) ||
* (repeated start condition transmitted )
*/
if (((status= inl( TWSI_STATUS)) == 8) || (status == 0x10)) {
@@ -130,9 +130,9 @@ int GT64260TWSIstart(void)
return(-1);
}
-int GT64260TWSIread(unsigned char * pData, int lastByte)
+int GT64260TWSIread(unsigned char * pData, int lastByte)
{
- unsigned int loop;
+ unsigned int loop;
#if TWSI_DEBUG
printk("GT64260TWSIread(");
@@ -145,7 +145,7 @@ int GT64260TWSIread(unsigned char * pData, int lastByte)
for (loop = 0; loop< MAX_LOOP; loop++) {
/* if Master received read data, acknowledge transmitted */
if ( (inl( TWSI_STATUS) == 0x50)) {
- *pData = (unsigned char) inl( TWSI_DATA);
+ *pData = (unsigned char) inl( TWSI_DATA);
rtems_bsp_delay(1500);
/* Clear INTFLAG and set Enable bit only */
@@ -165,16 +165,16 @@ int GT64260TWSIread(unsigned char * pData, int lastByte)
}
/* do a TWSI write cycle on the TWSI bus*/
-int GT64260TWSIwrite(unsigned char Data)
+int GT64260TWSIwrite(unsigned char Data)
{
- unsigned int loop;
- unsigned int status;
+ unsigned int loop;
+ unsigned int status;
#if TWSI_DEBUG
printk("GT64260TWSIwrite(");
#endif
/* Write data into the TWSI data register */
- outl(((unsigned int) Data), TWSI_DATA);
+ outl(((unsigned int) Data), TWSI_DATA);
rtems_bsp_delay(1000);
/* Clear INTFLG in the control register to drive data onto TWSI bus */
@@ -192,7 +192,7 @@ int GT64260TWSIwrite(unsigned char Data)
return(-1);
}
/* if (address + write bit transmitted, acknowledge received)
- * (Master transmmitted data byte, acknowledge received)
+ * (Master transmmitted data byte, acknowledge received)
* (address + read bit transmitted, acknowledge received)
*/
if ((status == 0x18)||(status == 0x28)||(status == 0x40)) {
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
index 0391088086..30b5ed5ccd 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
@@ -72,23 +72,23 @@ int I2Cread_eeprom(unsigned char I2cBusAddr,uint32_t devA2A1A0,uint32_t AddrByte
}
}
break;
- default:
+ default:
status=-1;
- break;
+ break;
}
if (status !=-1) {
#ifdef I2C_DEBUG
printk("\n");
#endif
/* read data from device */
- for ( ; numBytes > 0; numBytes-- ) {
+ for ( ; numBytes > 0; numBytes-- ) {
if ( numBytes == 1) lastByte=1;
if (GT64260TWSIread(pBuff,lastByte) == -1) return (-1);
#ifdef I2C_DEBUG
printk("%2x ", *pBuff);
if ( (numBytes % 20)==0 ) printk("\n");
#endif
- pBuff++;
+ pBuff++;
}
#ifdef I2C_DEBUG
printk("\n");
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h
index 20da5be0ed..9fb53869ff 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h
@@ -1,6 +1,6 @@
/* GT64260 register base mapping on the MVME5500
*
- * (C) Shuchen K. Feng <feng1@bnl.gov>,NSLS,
+ * (C) Shuchen K. Feng <feng1@bnl.gov>,NSLS,
* Brookhaven National Laboratory, 2003
*
*/
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h
index 1c2b7b24d3..e9aaeff844 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h
@@ -47,133 +47,133 @@
#define GT__INS(new, bit) ((new) << (bit))
-/*
+/*
* Table 30: CPU Address Decode Register Map
*/
-#define GT_SCS0_Low_Decode 0x0008
-#define GT_SCS0_High_Decode 0x0010
-#define GT_SCS1_Low_Decode 0x0208
-#define GT_SCS1_High_Decode 0x0210
-#define GT_SCS2_Low_Decode 0x0018
-#define GT_SCS2_High_Decode 0x0020
-#define GT_SCS3_Low_Decode 0x0218
-#define GT_SCS3_High_Decode 0x0220
-#define GT_CS0_Low_Decode 0x0028
-#define GT_CS0_High_Decode 0x0030
-#define GT_CS1_Low_Decode 0x0228
-#define GT_CS1_High_Decode 0x0230
-#define GT_CS2_Low_Decode 0x0248
-#define GT_CS2_High_Decode 0x0250
-#define GT_CS3_Low_Decode 0x0038
-#define GT_CS3_High_Decode 0x0040
-#define GT_BootCS_Low_Decode 0x0238
-#define GT_BootCS_High_Decode 0x0240
-#define GT_PCI0_IO_Low_Decode 0x0048
-#define GT_PCI0_IO_High_Decode 0x0050
-#define GT_PCI0_Mem0_Low_Decode 0x0058
-#define GT_PCI0_Mem0_High_Decode 0x0060
-#define GT_PCI0_Mem1_Low_Decode 0x0080
-#define GT_PCI0_Mem1_High_Decode 0x0088
-#define GT_PCI0_Mem2_Low_Decode 0x0258
-#define GT_PCI0_Mem2_High_Decode 0x0260
-#define GT_PCI0_Mem3_Low_Decode 0x0280
-#define GT_PCI0_Mem3_High_Decode 0x0288
-#define GT_PCI1_IO_Low_Decode 0x0090
-#define GT_PCI1_IO_High_Decode 0x0098
-#define GT_PCI1_Mem0_Low_Decode 0x00a0
-#define GT_PCI1_Mem0_High_Decode 0x00a8
-#define GT_PCI1_Mem1_Low_Decode 0x00b0
-#define GT_PCI1_Mem1_High_Decode 0x00b8
-#define GT_PCI1_Mem2_Low_Decode 0x02a0
-#define GT_PCI1_Mem2_High_Decode 0x02a8
-#define GT_PCI1_Mem3_Low_Decode 0x02b0
-#define GT_PCI1_Mem3_High_Decode 0x02b8
-#define GT_Internal_Decode 0x0068
-#define GT_CPU0_Low_Decode 0x0290
-#define GT_CPU0_High_Decode 0x0298
-#define GT_CPU1_Low_Decode 0x02c0
-#define GT_CPU1_High_Decode 0x02c8
-#define GT_PCI0_IO_Remap 0x00f0
-#define GT_PCI0_Mem0_Remap_Low 0x00f8
-#define GT_PCI0_Mem0_Remap_High 0x0320
-#define GT_PCI0_Mem1_Remap_Low 0x0100
-#define GT_PCI0_Mem1_Remap_High 0x0328
-#define GT_PCI0_Mem2_Remap_Low 0x02f8
-#define GT_PCI0_Mem2_Remap_High 0x0330
-#define GT_PCI0_Mem3_Remap_Low 0x0300
-#define GT_PCI0_Mem3_Remap_High 0x0338
-#define GT_PCI1_IO_Remap 0x0108
-#define GT_PCI1_Mem0_Remap_Low 0x0110
-#define GT_PCI1_Mem0_Remap_High 0x0340
-#define GT_PCI1_Mem1_Remap_Low 0x0118
-#define GT_PCI1_Mem1_Remap_High 0x0348
-#define GT_PCI1_Mem2_Remap_Low 0x0310
-#define GT_PCI1_Mem2_Remap_High 0x0350
-#define GT_PCI1_Mem3_Remap_Low 0x0318
-#define GT_PCI1_Mem3_Remap_High 0x0358
+#define GT_SCS0_Low_Decode 0x0008
+#define GT_SCS0_High_Decode 0x0010
+#define GT_SCS1_Low_Decode 0x0208
+#define GT_SCS1_High_Decode 0x0210
+#define GT_SCS2_Low_Decode 0x0018
+#define GT_SCS2_High_Decode 0x0020
+#define GT_SCS3_Low_Decode 0x0218
+#define GT_SCS3_High_Decode 0x0220
+#define GT_CS0_Low_Decode 0x0028
+#define GT_CS0_High_Decode 0x0030
+#define GT_CS1_Low_Decode 0x0228
+#define GT_CS1_High_Decode 0x0230
+#define GT_CS2_Low_Decode 0x0248
+#define GT_CS2_High_Decode 0x0250
+#define GT_CS3_Low_Decode 0x0038
+#define GT_CS3_High_Decode 0x0040
+#define GT_BootCS_Low_Decode 0x0238
+#define GT_BootCS_High_Decode 0x0240
+#define GT_PCI0_IO_Low_Decode 0x0048
+#define GT_PCI0_IO_High_Decode 0x0050
+#define GT_PCI0_Mem0_Low_Decode 0x0058
+#define GT_PCI0_Mem0_High_Decode 0x0060
+#define GT_PCI0_Mem1_Low_Decode 0x0080
+#define GT_PCI0_Mem1_High_Decode 0x0088
+#define GT_PCI0_Mem2_Low_Decode 0x0258
+#define GT_PCI0_Mem2_High_Decode 0x0260
+#define GT_PCI0_Mem3_Low_Decode 0x0280
+#define GT_PCI0_Mem3_High_Decode 0x0288
+#define GT_PCI1_IO_Low_Decode 0x0090
+#define GT_PCI1_IO_High_Decode 0x0098
+#define GT_PCI1_Mem0_Low_Decode 0x00a0
+#define GT_PCI1_Mem0_High_Decode 0x00a8
+#define GT_PCI1_Mem1_Low_Decode 0x00b0
+#define GT_PCI1_Mem1_High_Decode 0x00b8
+#define GT_PCI1_Mem2_Low_Decode 0x02a0
+#define GT_PCI1_Mem2_High_Decode 0x02a8
+#define GT_PCI1_Mem3_Low_Decode 0x02b0
+#define GT_PCI1_Mem3_High_Decode 0x02b8
+#define GT_Internal_Decode 0x0068
+#define GT_CPU0_Low_Decode 0x0290
+#define GT_CPU0_High_Decode 0x0298
+#define GT_CPU1_Low_Decode 0x02c0
+#define GT_CPU1_High_Decode 0x02c8
+#define GT_PCI0_IO_Remap 0x00f0
+#define GT_PCI0_Mem0_Remap_Low 0x00f8
+#define GT_PCI0_Mem0_Remap_High 0x0320
+#define GT_PCI0_Mem1_Remap_Low 0x0100
+#define GT_PCI0_Mem1_Remap_High 0x0328
+#define GT_PCI0_Mem2_Remap_Low 0x02f8
+#define GT_PCI0_Mem2_Remap_High 0x0330
+#define GT_PCI0_Mem3_Remap_Low 0x0300
+#define GT_PCI0_Mem3_Remap_High 0x0338
+#define GT_PCI1_IO_Remap 0x0108
+#define GT_PCI1_Mem0_Remap_Low 0x0110
+#define GT_PCI1_Mem0_Remap_High 0x0340
+#define GT_PCI1_Mem1_Remap_Low 0x0118
+#define GT_PCI1_Mem1_Remap_High 0x0348
+#define GT_PCI1_Mem2_Remap_Low 0x0310
+#define GT_PCI1_Mem2_Remap_High 0x0350
+#define GT_PCI1_Mem3_Remap_Low 0x0318
+#define GT_PCI1_Mem3_Remap_High 0x0358
/*
* Table 31: CPU Control Register Map
*/
-#define GT_CPU_Cfg 0x0000
-#define GT_CPU_Mode 0x0120
-#define GT_CPU_Master_Ctl 0x0160
-#define GT_CPU_If_Xbar_Ctl_Low 0x0150
-#define GT_CPU_If_Xbar_Ctl_High 0x0158
-#define GT_CPU_If_Xbar_Timeout 0x0168
-#define GT_CPU_Rd_Rsp_Xbar_Ctl_Low 0x0170
-#define GT_CPU_Rd_Rsp_Xbar_Ctl_High 0x0178
+#define GT_CPU_Cfg 0x0000
+#define GT_CPU_Mode 0x0120
+#define GT_CPU_Master_Ctl 0x0160
+#define GT_CPU_If_Xbar_Ctl_Low 0x0150
+#define GT_CPU_If_Xbar_Ctl_High 0x0158
+#define GT_CPU_If_Xbar_Timeout 0x0168
+#define GT_CPU_Rd_Rsp_Xbar_Ctl_Low 0x0170
+#define GT_CPU_Rd_Rsp_Xbar_Ctl_High 0x0178
/*
* Table 32: CPU Sync Barrier Register Map
*/
#define GT_PCI_Sync_Barrier(bus) (0x00c0 | ((bus) << 3))
-#define GT_PCI0_Sync_Barrier 0x00c0
-#define GT_PCI1_Sync_Barrier 0x00c8
+#define GT_PCI0_Sync_Barrier 0x00c0
+#define GT_PCI1_Sync_Barrier 0x00c8
/*
* Table 33: CPU Access Protection Register Map
*/
-#define GT_Protect_Low_0 0x0180
-#define GT_Protect_High_0 0x0188
-#define GT_Protect_Low_1 0x0190
-#define GT_Protect_High_1 0x0198
-#define GT_Protect_Low_2 0x01a0
-#define GT_Protect_High_2 0x01a8
-#define GT_Protect_Low_3 0x01b0
-#define GT_Protect_High_3 0x01b8
-#define GT_Protect_Low_4 0x01c0
-#define GT_Protect_High_4 0x01c8
-#define GT_Protect_Low_5 0x01d0
-#define GT_Protect_High_5 0x01d8
-#define GT_Protect_Low_6 0x01e0
-#define GT_Protect_High_6 0x01e8
-#define GT_Protect_Low_7 0x01f0
-#define GT_Protect_High_7 0x01f8
+#define GT_Protect_Low_0 0x0180
+#define GT_Protect_High_0 0x0188
+#define GT_Protect_Low_1 0x0190
+#define GT_Protect_High_1 0x0198
+#define GT_Protect_Low_2 0x01a0
+#define GT_Protect_High_2 0x01a8
+#define GT_Protect_Low_3 0x01b0
+#define GT_Protect_High_3 0x01b8
+#define GT_Protect_Low_4 0x01c0
+#define GT_Protect_High_4 0x01c8
+#define GT_Protect_Low_5 0x01d0
+#define GT_Protect_High_5 0x01d8
+#define GT_Protect_Low_6 0x01e0
+#define GT_Protect_High_6 0x01e8
+#define GT_Protect_Low_7 0x01f0
+#define GT_Protect_High_7 0x01f8
/*
* Table 34: Snoop Control Register Map
*/
-#define GT_Snoop_Base_0 0x0380
-#define GT_Snoop_Top_0 0x0388
-#define GT_Snoop_Base_1 0x0390
-#define GT_Snoop_Top_1 0x0398
-#define GT_Snoop_Base_2 0x03a0
-#define GT_Snoop_Top_2 0x03a8
-#define GT_Snoop_Base_3 0x03b0
-#define GT_Snoop_Top_3 0x03b8
+#define GT_Snoop_Base_0 0x0380
+#define GT_Snoop_Top_0 0x0388
+#define GT_Snoop_Base_1 0x0390
+#define GT_Snoop_Top_1 0x0398
+#define GT_Snoop_Base_2 0x03a0
+#define GT_Snoop_Top_2 0x03a8
+#define GT_Snoop_Base_3 0x03b0
+#define GT_Snoop_Top_3 0x03b8
/*
* Table 35: CPU Error Report Register Map
*/
-#define GT_CPU_Error_Address_Low 0x0070
-#define GT_CPU_Error_Address_High 0x0078
-#define GT_CPU_Error_Data_Low 0x0128
-#define GT_CPU_Error_Data_High 0x0130
-#define GT_CPU_Error_Parity 0x0138
-#define GT_CPU_Error_Cause 0x0140
-#define GT_CPU_Error_Mask 0x0148
+#define GT_CPU_Error_Address_Low 0x0070
+#define GT_CPU_Error_Address_High 0x0078
+#define GT_CPU_Error_Data_Low 0x0128
+#define GT_CPU_Error_Data_High 0x0130
+#define GT_CPU_Error_Parity 0x0138
+#define GT_CPU_Error_Cause 0x0140
+#define GT_CPU_Error_Mask 0x0148
#define GT_DecodeAddr_SET(g, r, v) \
do { \
@@ -527,7 +527,7 @@
* 23:20 Arb13 Slice 13 of CPU Slave pizza Arbiter
* 27:24 Arb14 Slice 14 of CPU Slave pizza Arbiter
* 31:28 Arb15 Slice 15 of CPU Slave pizza Arbiter
- */
+ */
/*
* Table 105: PCI_0 Sync Barrier Virtual Register, Offset: 0x0c0
@@ -562,7 +562,7 @@
#define GT_CPU_WrProtect GT__BIT(17)
#define GT_CPU_CacheProtect GT__BIT(18)
-/*
+/*
* Table 108: CPU Protect Address 0 High, Offset: 0x188
* Table 110: CPU Protect Address 1 High, Offset: 0x198
* Table 112: CPU Protect Address 2 High, Offset: 0x1a8
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
index d84d17487e..83d7e64d8f 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
@@ -44,9 +44,9 @@ BSP_VMEchipTypes BSP_getVMEchipType();
/* The version of Discovery system controller */
typedef enum {
- notdefined,
+ notdefined,
GT64260A,
- GT64260B,
+ GT64260B,
MV64360,
} DiscoveryChipVersion;
@@ -68,9 +68,9 @@ DiscoveryChipVersion BSP_getDiscoveryChipVersion();
#define BSP_NVRAM_BASE_ADDR 0xf1110000
#define BSP_RTC_INTA_REG 0x7ff0
-#define BSP_RTC_SECOND 0x7ff2
+#define BSP_RTC_SECOND 0x7ff2
#define BSP_RTC_MINUTE 0x7ff3
-#define BSP_RTC_HOUR 0x7ff4
+#define BSP_RTC_HOUR 0x7ff4
#define BSP_RTC_DATE 0x7ff5
#define BSP_RTC_INTERRUPTS 0x7ff6
#define BSP_RTC_WATCHDOG 0x7ff7
@@ -103,7 +103,7 @@ DiscoveryChipVersion BSP_getDiscoveryChipVersion();
/* The glues to Till's vmeUniverse, although the name does not
* actually reflect the relevant architect of the MVME5500.
- * Till TODO ? : BSP_PCI_DO_EOI instead ?
+ * Till TODO ? : BSP_PCI_DO_EOI instead ?
* BSP_EXT_IRQ0 instead of BSP_PCI_IRQ0 ?
*
*/
@@ -184,4 +184,4 @@ static inline void ioBar()
asm volatile("eieio":::"memory");
}
-#endif
+#endif
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c
index dc0e77b986..629913e5c0 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/BSP_irq.c
@@ -19,14 +19,14 @@
* (Copyright : NDA item)
* 2) The implementation of picPrioTable[] is an original work by the
* author to optimize the software IRQ priority scheduling because
- * Discovery controller does not provide H/W IRQ priority schedule.
+ * Discovery controller does not provide H/W IRQ priority schedule.
* It ensures the fastest/faster interrupt service to the
* highest/higher priority IRQ, if pendig.
* 3) _CPU_MSR_SET() needs RTEMS_COMPILER_MEMORY_BARRIER()
- *
+ *
*/
-#include <stdio.h>
+#include <stdio.h>
#include <rtems/system.h>
#include <bsp.h>
#include <bsp/irq.h>
@@ -58,7 +58,7 @@ static unsigned int BSP_irq_prio_mask_tbl[3][BSP_PIC_IRQ_NUMBER];
/*
* location used to store initial tables used for interrupt
- * management.BSP copy of the configuration
+ * management.BSP copy of the configuration
*/
static rtems_irq_global_settings BSP_config;
static rtems_irq_connect_data* rtems_hdl_tbl;
@@ -72,13 +72,13 @@ void (*default_rtems_hdl)(rtems_irq_hdl_param) = (void(*)(rtems_irq_hdl_param))
static volatile unsigned *BSP_irqMask_reg[3];
static volatile unsigned *BSP_irqCause_reg[3];
-static volatile unsigned BSP_irqMask_cache[3]={0,0,0};
+static volatile unsigned BSP_irqMask_cache[3]={0,0,0};
static int picPrioTblPtr=0;
static unsigned int GPPIrqInTbl=0;
static unsigned long long MainIrqInTbl=0;
-/*
+/*
* The software developers are forbidden to setup picPrioTable[],
* as it is a powerful engine for the BSP to find the pending
* highest priority IRQ at run time. It ensures the fastest/faster
@@ -89,7 +89,7 @@ static unsigned long long MainIrqInTbl=0;
* while the BSP_enable_irq_at_pic(), and BSP_disable_irq_at_pic()
* commands are invoked.
*
- * The picPrioTable[96] lists the enabled CPU main and GPP external interrupt
+ * The picPrioTable[96] lists the enabled CPU main and GPP external interrupt
* numbers [0 (lowest)- 95 (highest)] starting from the highest priority
* one to the lowest priority one. The highest priority interrupt is
* located at picPrioTable[0], and the lowest priority interrupt is located
@@ -99,8 +99,8 @@ static unsigned long long MainIrqInTbl=0;
*/
#define DynamicIsrTable
#ifdef DynamicIsrTable
-/* BitNums for Main Interrupt Lo/High Cause, -1 means invalid bit */
-static unsigned int picPrioTable[BSP_PIC_IRQ_NUMBER]={
+/* BitNums for Main Interrupt Lo/High Cause, -1 means invalid bit */
+static unsigned int picPrioTable[BSP_PIC_IRQ_NUMBER]={
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -112,7 +112,7 @@ static unsigned int picPrioTable[BSP_PIC_IRQ_NUMBER]={
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1 };
#else
-static unsigned int picPrioTable[BSP_PIC_IRQ_NUMBER]={
+static unsigned int picPrioTable[BSP_PIC_IRQ_NUMBER]={
80, 84, 76, 77, 32, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -148,7 +148,7 @@ static inline int is_processor_irq(const rtems_irq_number irqLine)
/*
* ------------------------ RTEMS Irq helper functions ----------------
*/
-
+
/*
* Caution : this function assumes the variable "BSP_config"
* is already set and that the tables it contains are still valid
@@ -174,38 +174,38 @@ static void compute_pic_masks_from_prio(void)
irq_prio_mask =0;
isGppMain =1;
break;
- default :
+ default :
isGppMain =0;
irq_prio_mask = (unsigned long long) (1LLU << i);
break;
}
- if ( isGppMain) continue;
+ if ( isGppMain) continue;
for (j = 0; j <BSP_MAIN_IRQ_NUMBER; j++) {
/*
* Mask interrupts at PIC level that have a lower priority
- * or <Till Straumann> a equal priority.
+ * or <Till Straumann> a equal priority.
*/
if (BSP_config.irqPrioTbl [i] >= BSP_config.irqPrioTbl [j])
irq_prio_mask |= (unsigned long long)(1LLU << j);
}
-
+
BSP_irq_prio_mask_tbl[0][i] = irq_prio_mask & 0xffffffff;
BSP_irq_prio_mask_tbl[1][i] = (irq_prio_mask>>32) & 0xffffffff;
#if 0
printk("irq_mask_prio_tbl[%d]:0x%8x%8x\n",i,BSP_irq_prio_mask_tbl[1][i],
BSP_irq_prio_mask_tbl[0][i]);
-#endif
+#endif
BSP_irq_prio_mask_tbl[2][i] = 1<<i;
/* Compute for the GPP priority interrupt mask */
- for (j=BSP_GPP_IRQ_LOWEST_OFFSET; j <BSP_PROCESSOR_IRQ_LOWEST_OFFSET; j++) {
+ for (j=BSP_GPP_IRQ_LOWEST_OFFSET; j <BSP_PROCESSOR_IRQ_LOWEST_OFFSET; j++) {
if (BSP_config.irqPrioTbl [i] >= BSP_config.irqPrioTbl [j])
- BSP_irq_prio_mask_tbl[2][i] |= 1 << (j-BSP_GPP_IRQ_LOWEST_OFFSET);
+ BSP_irq_prio_mask_tbl[2][i] |= 1 << (j-BSP_GPP_IRQ_LOWEST_OFFSET);
}
#if 0
printk("GPPirq_mask_prio_tbl[%d]:0x%8x\n",i,BSP_irq_prio_mask_tbl[2][i]);
-#endif
+#endif
}
}
@@ -217,7 +217,7 @@ static void UpdateMainIrqTbl(int irqNum)
case BSP_MAIN_GPP7_0_IRQ:
case BSP_MAIN_GPP15_8_IRQ:
case BSP_MAIN_GPP23_16_IRQ:
- case BSP_MAIN_GPP31_24_IRQ:
+ case BSP_MAIN_GPP31_24_IRQ:
return; /* Do nothing, let GPP take care of it */
break;
}
@@ -226,11 +226,11 @@ static void UpdateMainIrqTbl(int irqNum)
#endif
/* If entry not in table*/
- if ( ((irqNum<BSP_GPP_IRQ_LOWEST_OFFSET) &&
+ if ( ((irqNum<BSP_GPP_IRQ_LOWEST_OFFSET) &&
(!((unsigned long long)(1LLU << irqNum) & MainIrqInTbl))) ||
- ((irqNum>BSP_MICH_IRQ_MAX_OFFSET) &&
+ ((irqNum>BSP_MICH_IRQ_MAX_OFFSET) &&
(!(( 1 << (irqNum-BSP_GPP_IRQ_LOWEST_OFFSET)) & GPPIrqInTbl))))
- {
+ {
while ( picPrioTable[i]!=-1) {
if (BSP_config.irqPrioTbl[irqNum]>BSP_config.irqPrioTbl[picPrioTable[i]]) {
/* all other lower priority entries shifted right */
@@ -246,15 +246,15 @@ static void UpdateMainIrqTbl(int irqNum)
if (!shifted) picPrioTable[picPrioTblPtr] =irqNum;
if (irqNum >BSP_MICH_IRQ_MAX_OFFSET)
- GPPIrqInTbl |= (1<< (irqNum-BSP_GPP_IRQ_LOWEST_OFFSET));
- else
+ GPPIrqInTbl |= (1<< (irqNum-BSP_GPP_IRQ_LOWEST_OFFSET));
+ else
MainIrqInTbl |= (unsigned long long)(1LLU << irqNum);
picPrioTblPtr++;
}
#ifdef SHOW_MORE_INIT_SETTINGS
val2 = (MainIrqInTbl>>32) & 0xffffffff;
val1 = MainIrqInTbl&0xffffffff;
- printk("irqNum %d, MainIrqInTbl 0x%x%x\n", irqNum, val2, val1);
+ printk("irqNum %d, MainIrqInTbl 0x%x%x\n", irqNum, val2, val1);
BSP_printPicIsrTbl();
#endif
@@ -269,13 +269,13 @@ static void CleanMainIrqTbl(int irqNum)
case BSP_MAIN_GPP7_0_IRQ:
case BSP_MAIN_GPP15_8_IRQ:
case BSP_MAIN_GPP23_16_IRQ:
- case BSP_MAIN_GPP31_24_IRQ:
+ case BSP_MAIN_GPP31_24_IRQ:
return; /* Do nothing, let GPP take care of it */
- break;
+ break;
}
- if ( ((irqNum<BSP_GPP_IRQ_LOWEST_OFFSET) &&
+ if ( ((irqNum<BSP_GPP_IRQ_LOWEST_OFFSET) &&
((unsigned long long)(1LLU << irqNum) & MainIrqInTbl)) ||
- ((irqNum>BSP_MICH_IRQ_MAX_OFFSET) &&
+ ((irqNum>BSP_MICH_IRQ_MAX_OFFSET) &&
(( 1 << (irqNum-BSP_GPP_IRQ_LOWEST_OFFSET)) & GPPIrqInTbl)))
{ /* If entry in table*/
for (i=0; i<64; i++) {
@@ -285,8 +285,8 @@ static void CleanMainIrqTbl(int irqNum)
picPrioTable[j]=picPrioTable[j+1];
}
if (irqNum >BSP_MICH_IRQ_MAX_OFFSET)
- GPPIrqInTbl &= ~(1<< (irqNum-BSP_GPP_IRQ_LOWEST_OFFSET));
- else
+ GPPIrqInTbl &= ~(1<< (irqNum-BSP_GPP_IRQ_LOWEST_OFFSET));
+ else
MainIrqInTbl &= ~(1LLU << irqNum);
picPrioTblPtr--;
break;
@@ -306,7 +306,7 @@ void BSP_enable_irq_at_pic(const rtems_irq_number irqNum)
bitNum = (((unsigned int)irqNum) - BSP_MICL_IRQ_LOWEST_OFFSET)%32;
regNum = (((unsigned int)irqNum) - BSP_MICL_IRQ_LOWEST_OFFSET)>>5;
- rtems_interrupt_disable(level);
+ rtems_interrupt_disable(level);
#ifdef DynamicIsrTable
UpdateMainIrqTbl((int) irqNum);
@@ -336,7 +336,7 @@ int BSP_disable_irq_at_pic(const rtems_irq_number irqNum)
bitNum = (((unsigned int)irqNum) - BSP_MICL_IRQ_LOWEST_OFFSET)%32;
regNum = (((unsigned int)irqNum) - BSP_MICL_IRQ_LOWEST_OFFSET)>>5;
- rtems_interrupt_disable(level);
+ rtems_interrupt_disable(level);
#ifdef DynamicIsrTable
CleanMainIrqTbl((int) irqNum);
@@ -360,7 +360,7 @@ void BSP_disable_pic_irq(const rtems_irq_number irqNum)
}
/* Use shared/irq : 2008 */
-int BSP_setup_the_pic(rtems_irq_global_settings* config)
+int BSP_setup_the_pic(rtems_irq_global_settings* config)
{
int i;
@@ -384,13 +384,13 @@ int BSP_setup_the_pic(rtems_irq_global_settings* config)
out_le32(GT_CommUnitArb_Ctrl, (in_le32(GT_CommUnitArb_Ctrl)| (1<<10)));
#if 0
- printk("BSP_irqMask_reg[0] = 0x%x, BSP_irqCause_reg[0] 0x%x\n",
+ printk("BSP_irqMask_reg[0] = 0x%x, BSP_irqCause_reg[0] 0x%x\n",
in_le32(BSP_irqMask_reg[0]),
in_le32(BSP_irqCause_reg[0]));
- printk("BSP_irqMask_reg[1] = 0x%x, BSP_irqCause_reg[1] 0x%x\n",
+ printk("BSP_irqMask_reg[1] = 0x%x, BSP_irqCause_reg[1] 0x%x\n",
in_le32(BSP_irqMask_reg[1]),
in_le32(BSP_irqCause_reg[1]));
- printk("BSP_irqMask_reg[2] = 0x%x, BSP_irqCause_reg[2] 0x%x\n",
+ printk("BSP_irqMask_reg[2] = 0x%x, BSP_irqCause_reg[2] 0x%x\n",
in_le32(BSP_irqMask_reg[2]),
in_le32(BSP_irqCause_reg[2]));
#endif
@@ -399,24 +399,24 @@ int BSP_setup_the_pic(rtems_irq_global_settings* config)
for (i=0; i<3; i++) {
out_le32(BSP_irqCause_reg[i], 0);
out_le32(BSP_irqMask_reg[i], 0);
- }
+ }
in_le32(BSP_irqMask_reg[2]);
compute_pic_masks_from_prio();
#if 0
- printk("BSP_irqMask_reg[0] = 0x%x, BSP_irqCause_reg[0] 0x%x\n",
+ printk("BSP_irqMask_reg[0] = 0x%x, BSP_irqCause_reg[0] 0x%x\n",
in_le32(BSP_irqMask_reg[0]),
in_le32(BSP_irqCause_reg[0]));
- printk("BSP_irqMask_reg[1] = 0x%x, BSP_irqCause_reg[1] 0x%x\n",
+ printk("BSP_irqMask_reg[1] = 0x%x, BSP_irqCause_reg[1] 0x%x\n",
in_le32(BSP_irqMask_reg[1]),
in_le32(BSP_irqCause_reg[1]));
- printk("BSP_irqMask_reg[2] = 0x%x, BSP_irqCause_reg[2] 0x%x\n",
+ printk("BSP_irqMask_reg[2] = 0x%x, BSP_irqCause_reg[2] 0x%x\n",
in_le32(BSP_irqMask_reg[2]),
in_le32(BSP_irqCause_reg[2]));
#endif
/*
- *
+ *
*/
for (i=BSP_MICL_IRQ_LOWEST_OFFSET; i < BSP_PROCESSOR_IRQ_LOWEST_OFFSET ; i++) {
if ( BSP_config.irqHdlTbl[i].hdl != BSP_config.defaultEntry.hdl) {
@@ -428,9 +428,9 @@ int BSP_setup_the_pic(rtems_irq_global_settings* config)
BSP_disable_irq_at_pic(i);
}
}
- for (i= BSP_MAIN_GPP7_0_IRQ; i < BSP_MAIN_GPP31_24_IRQ; i++)
+ for (i= BSP_MAIN_GPP7_0_IRQ; i < BSP_MAIN_GPP31_24_IRQ; i++)
BSP_enable_irq_at_pic(i);
-
+
return(1);
}
@@ -446,14 +446,14 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
if (excNum == ASM_DEC_VECTOR) {
bsp_irq_dispatch_list( rtems_hdl_tbl, BSP_DECREMENTER, default_rtems_hdl);
- return 0;
+ return 0;
}
for (j=0; j<3; j++ ) oldMask[j] = BSP_irqMask_cache[j];
for (j=0; j<3; j++) irqCause[j] = in_le32(BSP_irqCause_reg[j]) & in_le32(BSP_irqMask_reg[j]);
while (((irq = picPrioTable[i++])!=-1)&& (loop++ < MAX_IRQ_LOOP))
- {
+ {
if (irqCause[group= irq/32] & ( 1<<(irq % 32))) {
for (j=0; j<3; j++)
BSP_irqMask_cache[j] &= (~ BSP_irq_prio_mask_tbl[j][irq]);
@@ -466,7 +466,7 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
bsp_irq_dispatch_list( rtems_hdl_tbl, irq, default_rtems_hdl);
for (j=0; j<3; j++ ) BSP_irqMask_cache[j] = oldMask[j];
-
+
out_le32(BSP_irqMask_reg[0], oldMask[0]);
out_le32(BSP_irqMask_reg[1], oldMask[1]);
out_le32(BSP_irqMask_reg[2], oldMask[2]);
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h
index d0cb0da7f8..c68bd0f9eb 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h
@@ -16,11 +16,11 @@
* http://www.rtems.com/license/LICENSE.
*
* Copyright 2004, 2005 Brookhaven National Laboratory and
- * Shuchen Kate Feng <feng1@bnl.gov>
+ * Shuchen Kate Feng <feng1@bnl.gov>
*
* - modified shared/irq/irq.h for Mvme5500 (no ISA devices/PIC)
* - Discovery GT64260 interrupt controller instead of 8259.
- * - Added support for software IRQ priority levels.
+ * - Added support for software IRQ priority levels.
* - modified to optimize the IRQ latency and handling
*
* $Id$
@@ -46,13 +46,13 @@
* (OPENPIC_VEC_SOURCE in openpic.h)
*/
- /* See section 25.2 , Table 734 of GT64260 controller
+ /* See section 25.2 , Table 734 of GT64260 controller
* Main Interrupt Cause Low register
*/
#define BSP_MICL_IRQ_NUMBER (32)
#define BSP_MICL_IRQ_LOWEST_OFFSET (0)
#define BSP_MICL_IRQ_MAX_OFFSET (BSP_MICL_IRQ_LOWEST_OFFSET + BSP_MICL_IRQ_NUMBER -1)
- /*
+ /*
* Main Interrupt Cause High register
*/
#define BSP_MICH_IRQ_NUMBER (32)
@@ -73,7 +73,7 @@
#define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET + BSP_PROCESSOR_IRQ_NUMBER - 1)
/* allow a couple of vectors for VME and counter/timer irq sources etc.
- * This is probably not needed any more.
+ * This is probably not needed any more.
*/
#define BSP_MISC_IRQ_NUMBER (30)
#define BSP_MISC_IRQ_LOWEST_OFFSET (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
index 913f37ef1c..8cb2796704 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
@@ -12,7 +12,7 @@
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE
- *
+ *
*/
#include <libcpu/io.h>
#include <libcpu/spr.h>
@@ -54,17 +54,17 @@ rtems_irq_prio BSPirqPrioTable[BSP_PIC_IRQ_NUMBER]={
* This table is where the developers can change the levels of priority
* based on the need of their applications.
*
- * actual priorities for CPU MAIN and GPP interrupts (0-95)
+ * actual priorities for CPU MAIN and GPP interrupts (0-95)
*
* 0 means that only current interrupt is masked (lowest priority)
* 255 is only used by bits 24, 25, 26 and 27 of the CPU high
- * interrupt Mask: (e.g. GPP7_0, GPP15_8, GPP23_16, GPP31_24).
+ * interrupt Mask: (e.g. GPP7_0, GPP15_8, GPP23_16, GPP31_24).
* The IRQs of those four bits are always enabled. When it's used,
* the IRQ number is never listed in the dynamic picIsrTable[96].
*
* The priorities of GPP interrupts were decided by their own
* value set at BSPirqPrioTable.
- *
+ *
*/
/* CPU Main cause low interrupt */
/* 0-15 */
@@ -75,7 +75,7 @@ rtems_irq_prio BSPirqPrioTable[BSP_PIC_IRQ_NUMBER]={
/* 32-47 */
2/*10/100MHZ*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 48-63 */
- 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
255 /*GPP0-7*/, 255/*GPP8-15*/, 255/*GPP16-23*/, 255/*GPP24-31*/, 0, 0, 0, 0,
/* GPP interrupts */
/* GPP0-7 */
@@ -83,7 +83,7 @@ rtems_irq_prio BSPirqPrioTable[BSP_PIC_IRQ_NUMBER]={
/* GPP8-15 */
47/*PMC1A*/,46/*PMC1B*/,45/*PMC1C*/,44/*PMC1D*/,30/*VME0*/, 29/*VME1*/,3,1,
/* GPP16-23 */
- 37/*PMC2A*/,36/*PMC2B*/,35/*PMC2C*/,34/*PMC2D*/,23/*1GHZ*/, 0,0,0,
+ 37/*PMC2A*/,36/*PMC2B*/,35/*PMC2C*/,34/*PMC2D*/,23/*1GHZ*/, 0,0,0,
/* GPP24-31 */
7/*watchdog*/, 0,0,0,0,0,0,0
};
@@ -102,13 +102,13 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
/*
* First initialize the Interrupt management hardware
*/
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Initializing the interrupt controller of the GT64260\n");
-#endif
+#endif
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Going to re-initialize the rtemsIrq table %d\n",BSP_IRQ_NUMBER);
-#endif
+#endif
/*
* Initialize Rtems management interrupt table
*/
@@ -116,7 +116,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
* re-init the rtemsIrq table
*/
for (i = 0; i < BSP_IRQ_NUMBER; i++) {
- rtemsIrq[i] = defaultIrq;
+ rtemsIrq[i] = defaultIrq;
rtemsIrq[i].name = i;
}
@@ -129,9 +129,9 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
initial_config.irqBase = BSP_LOWEST_OFFSET;
initial_config.irqPrioTbl = BSPirqPrioTable;
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Going to setup irq mngt configuration\n");
-#endif
+#endif
rtems_interrupt_disable(l);
if (!BSP_rtems_irq_mngt_set(&initial_config)) {
@@ -140,11 +140,11 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
*/
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
}
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Done setup irq mngt configuration\n");
#endif
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("RTEMS IRQ management is now operationnal\n");
#endif
}
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c
index 8288641bd7..4f3f5fa235 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c
@@ -2,10 +2,10 @@
*
* Copyright (c) 2003,2004 Brookhaven National Laboratory
* S. Kate Feng <feng1@bnl.gov>
- * All rights reserved
+ * All rights reserved
*
* Acknowledgements:
- * netBSD : Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
+ * netBSD : Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
* Marvell : NDA document for the discovery system controller
*
* Some notes from the author, S. Kate Feng :
@@ -16,7 +16,7 @@
* 2) Implemented hardware snoop instead of software snoop
* to ensure SDRAM cache coherency. (Copyright : NDA item)
* 3) Added S/W support for multi mbuf. (TODO : Let the H/W do it)
- *
+ *
*/
#define BYTE_ORDER BIG_ENDIAN
@@ -37,7 +37,7 @@
#include <rtems/rtems_bsdnet.h>
#include <rtems/rtems_bsdnet_internal.h>
-#include <rtems/error.h>
+#include <rtems/error.h>
#include <errno.h>
#include <rtems/rtems/types.h>
@@ -65,12 +65,12 @@ extern unsigned char ReadConfVPD_buff(int offset); /* in startup/bspstart.c */
#define GT_ETH_TASK_NAME "Geth"
#define PKT_BUF_SZ 1536
-#define SOFTC_ALIGN 31
-#define HASH_ALIGN 15
+#define SOFTC_ALIGN 31
+#define HASH_ALIGN 15
#define TXQ_HiLmt_OFF 2
-/* <skf>
+/* <skf>
* 1. printk debug is for diagnosis only, which may cause
* unexpected result, especially if txq is under heavy load
* because CPU is fast with a decent cache.
@@ -81,7 +81,7 @@ extern unsigned char ReadConfVPD_buff(int offset); /* in startup/bspstart.c */
#if 0
#define GE_FORGOT
#define GE_NORX
-#define GT_DEBUG
+#define GT_DEBUG
#endif
/* RTEMS event to kill the daemon */
@@ -138,7 +138,7 @@ static void GT64260eth_irq_on(const rtems_irq_connect_data *irq)
for (sc= root_GT64260eth_dev; sc; sc= sc-> next_module) {
outl(0x30883444,ETH0_EIMR); /* MOTLoad default interrupt mask */
return;
- }
+ }
}
static void GT64260eth_irq_off(const rtems_irq_connect_data *irq)
@@ -168,7 +168,7 @@ static void GT64260eth_isr(void)
sc->intr_errsts[sc->intr_err_ptr2++]=cause;
sc->intr_err_ptr2 %=INTR_ERR_SIZE; /* Till Straumann */
events |= ERR_EVENT;
- }
+ }
/* ETH_IR_RxBuffer_3|ETH_IR_RxError_3 */
if (cause & 0x880000) {
@@ -200,7 +200,7 @@ static rtems_irq_connect_data GT64260ethIrqData={
NULL,
(rtems_irq_enable) GT64260eth_irq_on,
(rtems_irq_disable) GT64260eth_irq_off,
- (rtems_irq_is_enabled) GT64260eth_irq_is_on,
+ (rtems_irq_is_enabled) GT64260eth_irq_is_on,
};
static void GT64260eth_init_hw(struct GTeth_softc *sc)
@@ -217,7 +217,7 @@ static void GT64260eth_init_hw(struct GTeth_softc *sc)
sc->rxq_intrbits=0;
sc->sc_flags=0;
-
+
#ifndef GE_NORX
GTeth_rx_setup(sc);
#endif
@@ -248,7 +248,7 @@ static void GT64260eth_init_hw(struct GTeth_softc *sc)
*/
if (!BSP_install_rtems_irq_handler(&GT64260ethIrqData))
printk("GT64260eth: unable to install ISR");
-
+
/* The ethernet port is ready to transmit/receive */
outl(sc->sc_pcr | ETH_EPCR_EN, ETH0_EPCR);
@@ -319,8 +319,8 @@ static void GT64260eth_ifinit(void *arg)
}
#ifndef GE_NOHASH
- /* Mvme5500, the user must initialize the hash table before enabling the
- * Ethernet controller
+ /* Mvme5500, the user must initialize the hash table before enabling the
+ * Ethernet controller
*/
GTeth_hash_init(sc);
GTeth_hash_fill(sc);
@@ -360,7 +360,7 @@ int rtems_GT64260eth_driver_attach(struct rtems_bsdnet_ifconfig *config, int att
unit = rtems_bsdnet_parse_driver_name(config, &name);
if (unit < 0) return 0;
-
+
printk("\nEthernet driver name %s unit %d \n",name, unit);
printk("RTEMS-mvme5500 BSP Copyright (c) 2004, Brookhaven National Lab., Shuchen Kate Feng \n");
/* Make certain elements e.g. descriptor lists are aligned. */
@@ -481,7 +481,7 @@ int rtems_GT64260eth_driver_attach(struct rtems_bsdnet_ifconfig *config, int att
/* ifp->if_watchdog = GTeth_ifwatchdog;*/
if (ifp->if_snd.ifq_maxlen == 0)
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ ifp->if_snd.ifq_maxlen = ifqmaxlen;
/* create the synchronization semaphore */
if (RTEMS_SUCCESSFUL != rtems_semaphore_create(
@@ -513,7 +513,7 @@ static void GT64260eth_stats(struct GTeth_softc *sc)
printf(" Framing Errors:%-8lu\n", sc->stats.frame_errors);
printf(" Crc Errors:%-8lu\n", sc->stats.crc_errors);
printf(" Oversized Frames:%-8lu\n", sc->stats.length_errors);
- printf(" Active Rxqs:%-8u\n", sc->rxq_active);
+ printf(" Active Rxqs:%-8u\n", sc->rxq_active);
printf(" Tx Interrupts:%-8lu\n", sc->stats.txInterrupts);
#endif
printf("Multi-BuffTx Packets:%-8lu\n", sc->stats.txMultiBuffPacket);
@@ -525,7 +525,7 @@ static void GT64260eth_stats(struct GTeth_softc *sc)
printf(" Transmitt Packets:%-8lu\n", ifp->if_opackets);
printf(" Transmitt errors:%-8lu\n", ifp->if_oerrors);
printf(" Tx/Rx collisions:%-8lu\n", ifp->if_collisions);
- printf(" Active Txqs:%-8u\n", sc->txq_nactive);
+ printf(" Active Txqs:%-8u\n", sc->txq_nactive);
#endif
}
@@ -595,7 +595,7 @@ static int GTeth_ifioctl(struct ifnet *ifp, ioctl_command_t cmd, caddr_t data)
#ifdef GT_DEBUG
printk("exit ioctl\n");
-#endif
+#endif
return error;
}
@@ -610,7 +610,7 @@ static void GTeth_ifstart(struct ifnet *ifp)
if ((ifp->if_flags & IFF_RUNNING) == 0) {
#ifdef GT_DEBUG
printk("IFF_RUNNING==0\n");
-#endif
+#endif
return;
}
@@ -644,7 +644,7 @@ static void GTeth_init_rx_ring(struct GTeth_softc *sc)
for (i = 0; i < RX_RING_SIZE; i++, rxd++, nxtaddr += sizeof(*rxd)) {
struct mbuf *m;
-
+
rxd->ed_lencnt= sc->rx_buf_sz <<16;
rxd->ed_cmdsts = RX_CMD_F|RX_CMD_L|RX_CMD_O|RX_CMD_EI;
@@ -653,7 +653,7 @@ static void GTeth_init_rx_ring(struct GTeth_softc *sc)
m->m_pkthdr.rcvif = &sc->arpcom.ac_if;
sc->rxq_mbuf[i] = m;
- /* convert mbuf pointer to data pointer of correct type */
+ /* convert mbuf pointer to data pointer of correct type */
rxd->ed_bufptr = (unsigned) mtod(m, void *);
/*
@@ -706,23 +706,23 @@ static int GT64260eth_rx(struct GTeth_softc *sc)
byteCount = rxd->ed_lencnt & 0xffff;
if (cmdsts & RX_CMD_O) {
- if (byteCount == 0)
+ if (byteCount == 0)
return(0);
/* <Kate Feng> Setting command/status to be zero seems to eliminate
* the spurious interrupt associated with the GE_FORGOT issue.
*/
- rxd->ed_cmdsts=0;
+ rxd->ed_cmdsts=0;
#ifdef GE_FORGOT
- /*
+ /*
* For dignosis purpose only. Not a good practice to turn it on
*/
printk("Rxq %d %d %d\n", sc->rxq_fi, byteCount,nloops);
#endif
}
- /* GT gave the ownership back to the CPU or the length has
+ /* GT gave the ownership back to the CPU or the length has
* been rewritten , which means there
* is new packet in the descriptor/buffer
*/
@@ -762,8 +762,8 @@ static int GT64260eth_rx(struct GTeth_softc *sc)
MCLGET (m, M_WAIT);
m->m_pkthdr.rcvif = ifp;
sc->rxq_mbuf[sc->rxq_fi]= m;
- /* convert mbuf pointer to data pointer of correct type */
- rxd->ed_bufptr = (unsigned) mtod(m, void*);
+ /* convert mbuf pointer to data pointer of correct type */
+ rxd->ed_bufptr = (unsigned) mtod(m, void*);
rxd->ed_lencnt = (unsigned long) sc->rx_buf_sz <<16;
rxd->ed_cmdsts = RX_CMD_F|RX_CMD_L|RX_CMD_O|RX_CMD_EI;
@@ -791,7 +791,7 @@ static void GTeth_rx_setup(struct GTeth_softc *sc)
outl( sc->rxq_desc_busaddr,ETH0_ECRDP3);
#ifdef GT_DEBUG
printk("ETH0_EFRDP3 0x%x, ETH0_ECRDP3 0x%x \n", inl(ETH0_EFRDP3),
- inl(ETH0_ECRDP3));
+ inl(ETH0_ECRDP3));
#endif
}
sc->sc_intrmask |= sc->rxq_intrbits;
@@ -907,7 +907,7 @@ static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
unsigned intrmask = sc->sc_intrmask;
unsigned loop=0, index= sc->txq_lo;
- /*
+ /*
* The end-of-list descriptor we put on last time is the starting point
* for this packet. The GT is supposed to terminate list processing on
* a NULL nxtptr but that currently is broken so a CPU-owned descriptor
@@ -920,14 +920,14 @@ static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
sc->stats.txSinglMaxLen= MAX(m->m_len, sc->stats.txSinglMaxLen);
}
else /* multiple mbufs in this packet */
- {
+ {
struct mbuf *mtp, *mdest;
volatile unsigned char *pt;
int len, y;
#ifdef GT_DEBUG
printk("multi mbufs ");
-#endif
+#endif
MGETHDR(mdest, M_WAIT, MT_DATA);
MCLGET(mdest, M_WAIT);
pt = (volatile unsigned char *)mdest->m_data;
@@ -935,9 +935,9 @@ static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
loop++;
if ( (y=(len+mtp->m_len)) > sizeof(union mcluster)) {
/* GT64260 allows us to chain the remaining to the next
- * free descriptors.
+ * free descriptors.
*/
- printk("packet size %x > mcluster %x\n", y,sizeof(union mcluster));
+ printk("packet size %x > mcluster %x\n", y,sizeof(union mcluster));
printk("GT64260eth : packet too large ");
}
memcpy((void *)pt,(char *)mtp->m_data, mtp->m_len);
@@ -946,7 +946,7 @@ static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
printk("%d ",mtp->m_len);
#endif
len += mtp->m_len;
- sc->stats.txBuffMaxLen=MAX(mtp->m_len,sc->stats.txBuffMaxLen);
+ sc->stats.txBuffMaxLen=MAX(mtp->m_len,sc->stats.txBuffMaxLen);
}
sc->stats.txMultiMaxLoop=MAX(loop, sc->stats.txMultiMaxLoop);
#if 0
@@ -961,14 +961,14 @@ static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
}
if (m->m_len < ET_MINLEN) m->m_len = ET_MINLEN;
- txd->ed_bufptr = (unsigned) mtod(m, void*);
+ txd->ed_bufptr = (unsigned) mtod(m, void*);
txd->ed_lencnt = m->m_len << 16;
/*txd->ed_cmdsts = TX_CMD_L|TX_CMD_GC|TX_CMD_P|TX_CMD_O|TX_CMD_F|TX_CMD_EI;*/
txd->ed_cmdsts = 0x80c70000;
while (txd->ed_cmdsts != 0x80c70000);
memBar();
-#ifdef GT_DEBUG
+#ifdef GT_DEBUG
printk("len = %d, cmdsts 0x%x ", m->m_len,txd->ed_cmdsts);
#endif
@@ -1042,10 +1042,10 @@ static unsigned GTeth_txq_done(struct GTeth_softc *sc)
*/
nextin = (sc->txq_fi + 1) % TX_RING_SIZE;
- if (sc->txq_desc[nextin].ed_cmdsts & TX_CMD_O) return(0);
+ if (sc->txq_desc[nextin].ed_cmdsts & TX_CMD_O) return(0);
printk("Txq%d forgot\n",sc->txq_fi);
} /* end checking GT64260eth owner */
- GTeth_txq_free(sc, cmdsts);
+ GTeth_txq_free(sc, cmdsts);
} /* end while */
if (GTeth_debug>0) printk(")\n");
return(1);
@@ -1097,7 +1097,7 @@ static void GTeth_tx_start(struct GTeth_softc *sc)
printk("next desc. @ 0x%x\n",txd->ed_nxtptr);
#endif
}
-
+
sc->txq_intrbits = ETH_IR_TxEndHigh|ETH_IR_TxBufferHigh;
sc->txq_esdcmrbits = ETH_ESDCMR_TXDH; /* Start Tx high */
sc->txq_epsrbits = ETH_EPSR_TxHigh;
@@ -1175,7 +1175,7 @@ static int GTeth_hash_compute(struct GTeth_softc *sc,unsigned char eaddr[ETHER_A
#ifdef GT_DEBUG
printk("eaddr= %s add1:%x add0:%x\n", ether_sprintf1(eaddr), add1, add0);
#endif
-
+
/*
* hashResult is the 15 bits Hash entry address.
* ethernetADD is a 48 bit number, which is derived from the Ethernet
@@ -1231,8 +1231,8 @@ static int GTeth_hash_compute(struct GTeth_softc *sc,unsigned char eaddr[ETHER_A
printk(")");
#endif
- /* 1/2K address filtering (MOTLoad default )? ->16KB memory required
- * or 8k address filtering ? -> 256KB memory required
+ /* 1/2K address filtering (MOTLoad default )? ->16KB memory required
+ * or 8k address filtering ? -> 256KB memory required
*/
return result & ((sc->sc_pcr & ETH_EPCR_HS_512) ? 0x7ff : 0x7fff);
}
@@ -1290,7 +1290,7 @@ static int GTeth_hash_entry_op(struct GTeth_softc *sc, enum GTeth_hash_op op,
for (limit = HSH_LIMIT; limit > 0 ; --limit) {
/*
* Does the GT wrap at the end, stop at the, or overrun the
- * end? Assume it wraps for now. Stash a copy of the
+ * end? Assume it wraps for now. Stash a copy of the
* current hash entry.
*/
unsigned long long *he_p = &sc->sc_hashtable[hash];
@@ -1336,7 +1336,7 @@ static int GTeth_hash_entry_op(struct GTeth_softc *sc, enum GTeth_hash_op op,
if (maybe_he_p == NULL && (thishe & HSH_S)) {
maybe_he_p = he_p;
maybe_hash = hash;
- }
+ }
hash = (hash + 1) & (sc->sc_hashmask / sizeof(he));
}
@@ -1425,7 +1425,7 @@ static void GTeth_hash_init(struct GTeth_softc *sc)
if (GTeth_debug>0) printk("GTeth_hash_init(");
/* MOTLoad defualt : 512 bytes of address filtering, which
- * requires 16KB of memory
+ * requires 16KB of memory
*/
#if 1
hash_mem = rtems_bsdnet_malloc(HASH_DRAM_SIZE + HASH_ALIGN, M_FREE, M_NOWAIT);
@@ -1453,7 +1453,7 @@ static void GT64260eth_error(struct GTeth_softc *sc)
* by the ISR, we must disable interrupts here
*/
if (intr_status) {
- printk("%s%d: ICR = 0x%x ",
+ printk("%s%d: ICR = 0x%x ",
ifp->if_name, ifp->if_unit, intr_status);
#if 1
if (intr_status & INTR_RX_ERROR) {
@@ -1467,10 +1467,10 @@ static void GT64260eth_error(struct GTeth_softc *sc)
printk("Txq error, if_oerrors %d\n",ifp->if_oerrors);
}
}
- else
+ else
printk("%s%d: Ghost interrupt ?\n",ifp->if_name,
ifp->if_unit);
- sc->intr_errsts[sc->intr_err_ptr1++]=0;
+ sc->intr_errsts[sc->intr_err_ptr1++]=0;
sc->intr_err_ptr1 %= INTR_ERR_SIZE; /* Till Straumann */
}
#endif
@@ -1483,7 +1483,7 @@ static void GT64260eth_daemon(void *arg)
struct mbuf *m=0;
struct ifnet *ifp=&sc->arpcom.ac_if;
-#if 0
+#if 0
/* see comments in GT64260eth_init(); in newer versions of
* rtems, we hold the network semaphore at this point
*/
@@ -1509,7 +1509,7 @@ static void GT64260eth_daemon(void *arg)
RTEMS_WAIT | RTEMS_EVENT_ANY,
RTEMS_NO_TIMEOUT,
&events);
-
+
if (KILL_EVENT & events) break;
#ifndef GE_NORX
@@ -1521,7 +1521,7 @@ static void GT64260eth_daemon(void *arg)
#endif
/* clean up and try sending packets */
- do {
+ do {
if (sc->txq_nactive) GTeth_txq_done(sc);
while (sc->txq_free>0) {
@@ -1529,7 +1529,7 @@ static void GT64260eth_daemon(void *arg)
m=0;
IF_DEQUEUE(&ifp->if_snd,m);
if (m==0) break;
- GT64260eth_sendpacket(sc, m);
+ GT64260eth_sendpacket(sc, m);
}
else {
GTeth_txq_done(sc);
@@ -1548,7 +1548,7 @@ static void GT64260eth_daemon(void *arg)
/* Log errors and other uncommon events. */
#ifdef GT64260eth_DEBUG
- if (events & ERR_EVENT) GT64260eth_error(sc);
+ if (events & ERR_EVENT) GT64260eth_error(sc);
#endif
} /* end for(;;) { rtems_bsdnet_event_receive() .....*/
@@ -1568,7 +1568,7 @@ static void GT64260eth_daemon(void *arg)
rtems_bsdnet_semaphore_release();
rtems_semaphore_release(sc->daemonSync);
- /* Note that I dont use sc->daemonTid here -
+ /* Note that I dont use sc->daemonTid here -
* theoretically, that variable could already
* hold a newly created TID
*/
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.h b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.h
index 52ea42c39e..2703bb423e 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.h
@@ -1,8 +1,8 @@
-/* GT64260eth.h
+/* GT64260eth.h
*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
* All rights reserved.
- *
+ *
* RTEMS/Mvme5500 port 2004 by S. Kate Feng, <feng1@bnl.gov>,
* All rights reserved.
*
@@ -51,7 +51,7 @@
#define HASH_TABLE_SIZE 16
#define HASH_DRAM_SIZE HASH_TABLE_SIZE*1024 /* size of DRAM for hash table */
#define INTR_ERR_SIZE 16
-
+
enum GTeth_txprio {
GE_TXPRIO_HI=1,
GE_TXPRIO_LO=0,
@@ -83,7 +83,7 @@ struct GTeth_softc {
unsigned int txq_nintr; /* number of txq desc. send TX_EVENT */
unsigned int txq_outptr; /* where to put next transmit packet */
unsigned int txq_inptr; /* start of 1st queued tx packet */
- unsigned int txq_free; /* free Tx queue slots. */
+ unsigned int txq_free; /* free Tx queue slots. */
unsigned txq_intrbits; /* bits to write to EIMR */
unsigned txq_esdcmrbits; /* bits to write to ESDCMR */
unsigned txq_epsrbits; /* bits to test with EPSR */
@@ -114,7 +114,7 @@ struct GTeth_softc {
unsigned sc_intrmask; /* current EIMR value */
unsigned sc_idlemask; /* suspended EIMR bits */
unsigned sc_max_frame_length; /* maximum frame length */
- unsigned rx_buf_sz;
+ unsigned rx_buf_sz;
/* Hash table related members */
unsigned long long *sc_hashtable;
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260ethreg.h b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260ethreg.h
index efa9ebf0e0..71a59af787 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260ethreg.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260ethreg.h
@@ -268,7 +268,7 @@ struct GTeth_desc {
#define ETH_ESMIR_ReadValid ETH__BIT(27)
#define ETH_ESMIR_Busy ETH__BIT(28)
-/*
+/*
* Table 597: Port Configuration Register (PCR)
* 00:00 PM Promiscuous mode
* 0: Normal mode (Frames are only received if the
@@ -352,7 +352,7 @@ struct GTeth_desc {
-/*
+/*
* Table 598: Port Configuration Extend Register (PCXR)
* 00:00 IGMP IGMP Packets Capture Enable
* 0: IGMP packets are treated as normal Multicast
@@ -449,7 +449,7 @@ struct GTeth_desc {
-/*
+/*
* Table 599: Port Command Register (PCMR)
* 14:00 Reserved
* 15:15 FJ Force Jam / Flow Control
@@ -471,7 +471,7 @@ struct GTeth_desc {
#define ETH_EPCMR_FJ ETH__BIT(15)
-/*
+/*
* Table 600: Port Status Register (PSR) -- Read Only
* 00:00 Speed Indicates Port Speed (0: 10Mbs, 1: 100Mbs)
* 01:01 Duplex Indicates Port Duplex Mode (0: Half, 1: Full)
@@ -506,7 +506,7 @@ struct GTeth_desc {
#define ETH_EPSR_TXinProg ETH__BIT(7)
-/*
+/*
* Table 601: Serial Parameters Register (SPR)
* 01:00 JAM_LENGTH Two bits to determine the JAM Length
* (in Backpressure) as follows:
@@ -554,13 +554,13 @@ struct GTeth_desc {
#define ETH_ESPR_Data_Bilnd_GET(v) ETH__EXT(v, 17, 5)
#define ETH_ESPR_Limit4(v) ETH__BIT(22)
-/*
+/*
* Table 602: Hash Table Pointer Register (HTPR)
* 31:00 HTP 32-bit pointer to the address table.
* Bits [2:0] must be set to zero.
*/
-/*
+/*
* Table 603: Flow Control Source Address Low (FCSAL)
* 15:0 SA[15:0] Source Address
* The least significant bits of the source
@@ -569,7 +569,7 @@ struct GTeth_desc {
* 31:16 Reserved
*/
-/*
+/*
* Table 604: Flow Control Source Address High (FCSAH)
* 31:0 SA[47:16] Source Address
* The most significant bits of the source address
@@ -578,7 +578,7 @@ struct GTeth_desc {
*/
-/*
+/*
* Table 605: SDMA Configuration Register (SDCR)
* 01:00 Reserved
* 05:02 RC Retransmit Count
@@ -636,7 +636,7 @@ struct GTeth_desc {
#define ETH_ESDCR_BSZ_Strings { "1 64-bit word", "2 64-bit words", \
"4 64-bit words", "8 64-bit words" }
-/*
+/*
* Table 606: SDMA Command Register (SDCMR)
* 06:00 Reserved
* 07:07 ERD Enable RX DMA.
@@ -697,7 +697,7 @@ struct GTeth_desc {
#define ETH_ESDCMR_TXDL ETH__BIT(24)
#define ETH_ESDCMR_AT ETH__BIT(31)
-/*
+/*
* Table 607: Interrupt Cause Register (ICR)
* 00:00 RxBuffer Rx Buffer Return
* Indicates an Rx buffer returned to CPU ownership
@@ -844,32 +844,32 @@ struct GTeth_desc {
#define INTR_RX_ERROR 0x801100
#define INTR_TX_ERROR 0x002c00
-/*
+/*
* Table 608: Interrupt Mask Register (IMR)
* 31:00 Various Mask bits for the Interrupt Cause register.
*/
-/*
+/*
* Table 609: IP Differentiated Services CodePoint to Priority0 low (DSCP2P0L),
* 31:00 Priority0_low The LSB priority bits for DSCP[31:0] entries.
*/
-/*
+/*
* Table 610: IP Differentiated Services CodePoint to Priority0 high (DSCP2P0H)
* 31:00 Priority0_high The LSB priority bits for DSCP[63:32] entries.
*/
-/*
+/*
* Table 611: IP Differentiated Services CodePoint to Priority1 low (DSCP2P1L)
* 31:00 Priority1_low The MSB priority bits for DSCP[31:0] entries.
*/
-/*
+/*
* Table 612: IP Differentiated Services CodePoint to Priority1 high (DSCP2P1H)
* 31:00 Priority1_high The MSB priority bit for DSCP[63:32] entries.
*/
-/*
+/*
* Table 613: VLAN Priority Tag to Priority (VPT2P)
* 07:00 Priority0 The LSB priority bits for VLAN Priority[7:0]
* entries.
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c
index 761beb0a10..a4653809c4 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c
@@ -6,10 +6,10 @@
* Acknowledgements:
* netBSD : Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
* Jason R. Thorpe for Wasabi Systems, Inc.
- * Intel : NDA document
+ * Intel : NDA document
*
* Some notes from the author, S. Kate Feng :
- *
+ *
* 1) The error reporting routine i82544EI_error() employs two pointers
* for the error report buffer. One for the ISR and another one for
* the error report.
@@ -27,7 +27,7 @@
* to WB region", MII mode (PHY) instead of TBI mode.
* 6) We currently only use 32-bit (instead of 64-bit) DMA addressing.
* 7) Implementation for Jumbo Frame and TCP checksum is not completed yet.
- *
+ *
*/
#define BYTE_ORDER BIG_ENDIAN
@@ -52,7 +52,7 @@
#include <rtems/rtems_bsdnet.h>
#include <rtems/rtems_bsdnet_internal.h>
-#include <rtems/error.h>
+#include <rtems/error.h>
#include <errno.h>
#include <rtems/rtems/types.h>
@@ -111,7 +111,7 @@ static int wm_debug = WM_DEBUG_TX|WM_DEBUG_RX|WM_DEBUG_LINK; /* May 7, 2009 */
#define TX_EVENT RTEMS_EVENT_4
#define ERR_EVENT RTEMS_EVENT_5
#define INIT_EVENT RTEMS_EVENT_6
-
+
#define ALL_EVENTS (KILL_EVENT|START_TRANSMIT_EVENT|RX_EVENT|TX_EVENT|ERR_EVENT|INIT_EVENT)
/* <skf> used 64 in 4.8.0, TOD; try 4096 */
@@ -244,7 +244,7 @@ static void i82544EI_irq_on(const rtems_irq_connect_data *irq)
{
struct wm_softc *sc;
unsigned int irqMask= ICR_TXDW | ICR_LSC | ICR_RXSEQ | ICR_RXDMT0 | ICR_RXO | ICR_RXT0 | ICR_RXCFG;
-
+
for (sc= root_i82544EI_dev; sc; sc= sc-> next_module) {
CSR_WRITE(sc,WMREG_IMS,(CSR_READ(sc,WMREG_IMS)| irqMask) );
return;
@@ -273,7 +273,7 @@ static rtems_irq_connect_data i82544IrqData={
(rtems_irq_hdl_param) NULL,
(rtems_irq_enable) i82544EI_irq_on,
(rtems_irq_disable) i82544EI_irq_off,
- (rtems_irq_is_enabled) i82544EI_irq_is_on,
+ (rtems_irq_is_enabled) i82544EI_irq_is_on,
};
int rtems_i82544EI_driver_attach(struct rtems_bsdnet_ifconfig *config, int attach)
@@ -293,11 +293,11 @@ int rtems_i82544EI_driver_attach(struct rtems_bsdnet_ifconfig *config, int attac
if ( !strncmp((const char *)name,"autoz",5))
memcpy(name,"gtGHz",5);
-
- printk("\nAttaching MVME5500 1GHz NIC%d\n", unit);
+
+ printk("\nAttaching MVME5500 1GHz NIC%d\n", unit);
printk("RTEMS-mvme5500 BSP Copyright (c) 2004,2005,2008, Brookhaven National Lab., Shuchen Kate Feng \n");
- /* Make sure certain elements e.g. descriptor lists are aligned.*/
+ /* Make sure certain elements e.g. descriptor lists are aligned.*/
softc_mem = rtems_bsdnet_malloc(sizeof(*sc) + SOFTC_ALIGN, M_FREE, M_NOWAIT);
/* Check for the very unlikely case of no memory. */
@@ -321,22 +321,22 @@ int rtems_i82544EI_driver_attach(struct rtems_bsdnet_ifconfig *config, int attac
if ( pci_mem_find(b,d,f,PCI_MAPREG_START, &sc->sc_membase, &sc->sc_memsize))
rtems_panic("i82544EI: unable to map memory space\n");
-#ifdef WM_DEBUG
+#ifdef WM_DEBUG
printk("Memory base addr 0x%x\n", sc->sc_membase);
#endif
BSP_1GHz_membase= sc->sc_membase;
#ifdef WM_DEBUG
printk("Memory base addr 0x%x\n", sc->sc_membase);
- printk("txdesc[0] addr:0x%x, rxdesc[0] addr:0x%x, sizeof sc %d\n",&sc->sc_txdescs[0], &sc->sc_rxdescs[0], sizeof(*sc));
+ printk("txdesc[0] addr:0x%x, rxdesc[0] addr:0x%x, sizeof sc %d\n",&sc->sc_txdescs[0], &sc->sc_rxdescs[0], sizeof(*sc));
#endif
- sc->sc_ctrl=CSR_READ(sc,WMREG_CTRL);
+ sc->sc_ctrl=CSR_READ(sc,WMREG_CTRL);
/*
* Determine a few things about the bus we're connected to.
*/
- reg = CSR_READ(sc,WMREG_STATUS);
+ reg = CSR_READ(sc,WMREG_STATUS);
if (reg & STATUS_BUS64) sc->sc_flags |= WM_F_BUS64;
sc->sc_bus_speed = (reg & STATUS_PCI66) ? 66 : 33;
#ifdef WM_DEBUG
@@ -360,7 +360,7 @@ int rtems_i82544EI_driver_attach(struct rtems_bsdnet_ifconfig *config, int attac
* Read the Ethernet address from the EEPROM.
*/
if (wm_read_eeprom(sc, EEPROM_OFF_MACADDR,
- sizeof(myea) / sizeof(myea[0]), myea))
+ sizeof(myea) / sizeof(myea[0]), myea))
rtems_panic("i82544ei 1GHZ ethernet: unable to read Ethernet address");
enaddr[0] = myea[0] & 0xff;
@@ -409,11 +409,11 @@ int rtems_i82544EI_driver_attach(struct rtems_bsdnet_ifconfig *config, int attac
* media structures accordingly.
*/
if ((CSR_READ(sc, WMREG_STATUS) & STATUS_TBIMODE) != 0) {
- /* 1000BASE-X : fiber (TBI mode)
+ /* 1000BASE-X : fiber (TBI mode)
wm_tbi_mediainit(sc); */
} else { /* 1000BASE-T : copper (internal PHY mode), for the mvme5500 */
wm_gmii_mediainit(sc);
- }
+ }
ifp = &sc->arpcom.ac_if;
/* set this interface's name and unit */
@@ -421,13 +421,13 @@ int rtems_i82544EI_driver_attach(struct rtems_bsdnet_ifconfig *config, int attac
ifp->if_name = name;
ifp->if_softc = sc;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
-#ifdef RTEMS_ETHERMTU_JUMBO
+#ifdef RTEMS_ETHERMTU_JUMBO
sc->arpcom.ec_capabilities |= ETHERCAP_JUMBO_MTU;
ifp->if_mtu = config->mtu ? config->mtu : ETHERMTU_JUMBO;
#else
ifp->if_mtu = config->mtu ? config->mtu : ETHERMTU;
#endif
-#ifdef RTEMS_CKSUM_OFFLOAD
+#ifdef RTEMS_CKSUM_OFFLOAD
/* < skf> The following is really not related to jumbo frame
sc->arpcom.ec_capabilities |= ETHERCAP_VLAN_MTU;*/
ifp->if_capabilities |= IFCAP_CSUM_IPv4_Tx | IFCAP_CSUM_IPv4_Rx |
@@ -481,7 +481,7 @@ static void wm_reset(struct wm_softc *sc)
* 82544 has a Packet Buffer of 64K.
* Default allocation : PBA=40K for Rx, leaving 24K for Tx.
* Default for jumbo: PBA=48K for Rx, leaving 16K for Tx.
- */
+ */
sc->sc_pba = sc->arpcom.ac_if.if_mtu > 8192 ? PBA_40K : PBA_48K;
CSR_WRITE(sc, WMREG_PBA, sc->sc_pba);
@@ -499,7 +499,7 @@ static void wm_reset(struct wm_softc *sc)
sc->sc_ctrl_ext = CSR_READ(sc,WMREG_CTRL_EXT);
sc->sc_ctrl_ext |= CTRL_EXT_EE_RST;
- CSR_WRITE(sc, WMREG_CTRL_EXT, sc->sc_ctrl_ext);
+ CSR_WRITE(sc, WMREG_CTRL_EXT, sc->sc_ctrl_ext);
CSR_READ(sc, WMREG_STATUS);
/* Wait for EEPROM reload */
rtems_bsp_delay(2000);
@@ -523,7 +523,7 @@ i82544EI_ifstart(struct ifnet *ifp)
if ((ifp->if_flags & IFF_RUNNING) == 0) {
#ifdef WM_DEBUG
printk("IFF_RUNNING==0\n");
-#endif
+#endif
return;
}
@@ -549,7 +549,7 @@ static void i82544EI_stats(struct wm_softc *sc)
printf(" Tx Interrupts:%-8lu\n", sc->stats.txInterrupts);
printf(" Transmitt Packets:%-8u\n", CSR_READ(sc,WMREG_GPTC));
printf(" Transmitt errors:%-8lu\n", ifp->if_oerrors);
- printf(" Active Txqs:%-8lu\n", sc->txq_nactive);
+ printf(" Active Txqs:%-8lu\n", sc->txq_nactive);
printf(" collisions:%-8u\n", CSR_READ(sc,WMREG_COLC));
printf(" Crc Errors:%-8u\n", CSR_READ(sc,WMREG_CRCERRS));
printf(" Link Status Change:%-8lu\n", sc->stats.linkStatusChng);
@@ -654,16 +654,16 @@ static void i82544EI_sendpacket(struct wm_softc *sc, struct mbuf *m)
sc->txq_free--;
}
else /* multiple mbufs in this packet */
- {
+ {
struct mbuf *mtp, *mdest;
volatile unsigned char *pt;
int len, y, loop=0;
#ifdef WM_DEBUG_TX
printk("multi mbufs ");
-#endif
+#endif
mtp = m;
- while ( mtp) {
+ while ( mtp) {
MGETHDR(mdest, M_WAIT, MT_DATA);
MCLGET(mdest, M_WAIT);
pt = (volatile unsigned char *)mdest->m_data;
@@ -673,12 +673,12 @@ static void i82544EI_sendpacket(struct wm_softc *sc, struct mbuf *m)
* the length of each descriptor can be up to 16288 bytes.
* For packets which fill more than one buffer ( >2k), we
* chain them together.
- * <Kate Feng> : This effective for packets > 2K
+ * <Kate Feng> : This effective for packets > 2K
* The other way is effective for packets < 2K
*/
if ( ((y=(len+mtp->m_len)) > sizeof(union mcluster))) {
printk(" >%d, use next descriptor\n", sizeof(union mcluster));
- break;
+ break;
}
memcpy((void *)pt,(char *)mtp->m_data, mtp->m_len);
pt += mtp->m_len;
@@ -692,16 +692,16 @@ static void i82544EI_sendpacket(struct wm_softc *sc, struct mbuf *m)
sc->txs_lastdesc = sc->txq_next;
sc->txq_next = WM_NEXTTX(sc->txq_next);
sc->txq_nactive ++;
- if (sc->txq_free)
+ if (sc->txq_free)
sc->txq_free--;
else
rtems_panic("i8254EI : no more free descriptors");
} /* end for while */
/* free old mbuf chain */
- m_freem(m);
+ m_freem(m);
m=0;
} /* end multiple mbufs */
-
+
DPRINTF(WM_DEBUG_TX,("%s: TX: desc %d: cmdlen 0x%08x\n", sc->dv_xname,
sc->txs_lastdesc, le32toh(sc->sc_txdescs[sc->txs_lastdesc].wtx_cmdlen)));
DPRINTF(WM_DEBUG_TX,("status 0x%08x\n",sc->sc_txdescs[sc->txq_fi].wtx_fields.wtxu_status));
@@ -724,9 +724,9 @@ static void i82544EI_txq_free(struct wm_softc *sc, uint8_t status)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
- /* We might use the statistics registers instead of variables
+ /* We might use the statistics registers instead of variables
* to keep tack of the network statistics
- */
+ */
/* statistics */
ifp->if_opackets++;
@@ -734,7 +734,7 @@ static void i82544EI_txq_free(struct wm_softc *sc, uint8_t status)
if (status & (WTX_ST_EC|WTX_ST_LC)) {
ifp->if_oerrors++;
- if (status & WTX_ST_LC)
+ if (status & WTX_ST_LC)
printf("%s: late collision\n", sc->dv_xname);
else if (status & WTX_ST_EC) {
ifp->if_collisions += 16;
@@ -768,23 +768,23 @@ static void i82544EI_txq_done(struct wm_softc *sc)
}
}
-static void wm_init_rxdesc(struct wm_softc *sc, int x)
-{
- wiseman_rxdesc_t *__rxd = &(sc)->sc_rxdescs[(x)];
+static void wm_init_rxdesc(struct wm_softc *sc, int x)
+{
+ wiseman_rxdesc_t *__rxd = &(sc)->sc_rxdescs[(x)];
struct mbuf *m;
m = sc->rxs_mbuf[x];
-
- __rxd->wrx_addr.wa_low=htole32(mtod(m, void*));
- __rxd->wrx_addr.wa_high = 0;
- __rxd->wrx_len = 0;
- __rxd->wrx_cksum = 0;
- __rxd->wrx_status = 0;
- __rxd->wrx_errors = 0;
- __rxd->wrx_special = 0;
- /* Receive Descriptor Tail: add Rx desc. to H/W free list */
- CSR_WRITE(sc,WMREG_RDT, (x));
-}
+
+ __rxd->wrx_addr.wa_low=htole32(mtod(m, void*));
+ __rxd->wrx_addr.wa_high = 0;
+ __rxd->wrx_len = 0;
+ __rxd->wrx_cksum = 0;
+ __rxd->wrx_status = 0;
+ __rxd->wrx_errors = 0;
+ __rxd->wrx_special = 0;
+ /* Receive Descriptor Tail: add Rx desc. to H/W free list */
+ CSR_WRITE(sc,WMREG_RDT, (x));
+}
static void i82544EI_rx(struct wm_softc *sc)
{
@@ -851,7 +851,7 @@ static void i82544EI_rx(struct wm_softc *sc)
ether_input (ifp, eh, m);
/* Pass it on. */
ifp->if_ipackets++;
-
+
give_it_back:
/* Add a new receive buffer to the ring.*/
if (wm_add_rxbuf(sc, i) != 0) {
@@ -937,7 +937,7 @@ static int i82544EI_init_hw(struct wm_softc *sc)
CSR_WRITE(sc,WMREG_TDLEN, sizeof(sc->sc_txdescs));
CSR_WRITE(sc,WMREG_TDH, 0);
CSR_WRITE(sc,WMREG_TDT, 0);
- CSR_WRITE(sc,WMREG_TIDV, 0 );
+ CSR_WRITE(sc,WMREG_TIDV, 0 );
/* CSR_WRITE(sc,WMREG_TADV, 128); not for 82544 */
CSR_WRITE(sc,WMREG_TXDCTL, TXDCTL_PTHRESH(0) |
@@ -968,7 +968,7 @@ static int i82544EI_init_hw(struct wm_softc *sc)
}
#endif
- TxDescCmd |= WTX_CMD_EOP|WTX_CMD_IFCS|WTX_CMD_RS;
+ TxDescCmd |= WTX_CMD_EOP|WTX_CMD_IFCS|WTX_CMD_RS;
/* Initialize the transmit job descriptors. */
for (i = 0; i < NTXDESC; i++) {
@@ -976,7 +976,7 @@ static int i82544EI_init_hw(struct wm_softc *sc)
sc->sc_txdescs[i].wtx_fields.wtxu_options=cksumfields;
sc->sc_txdescs[i].wtx_addr.wa_high = 0;
sc->sc_txdescs[i].wtx_addr.wa_low = 0;
- sc->sc_txdescs[i].wtx_cmdlen = htole32(TxDescCmd);
+ sc->sc_txdescs[i].wtx_cmdlen = htole32(TxDescCmd);
}
/*
@@ -989,7 +989,7 @@ static int i82544EI_init_hw(struct wm_softc *sc)
CSR_WRITE(sc,WMREG_RDLEN, sizeof(sc->sc_rxdescs));
CSR_WRITE(sc,WMREG_RDH, 0);
CSR_WRITE(sc,WMREG_RDT, 0);
- CSR_WRITE(sc,WMREG_RDTR, 0 |RDTR_FPD);
+ CSR_WRITE(sc,WMREG_RDTR, 0 |RDTR_FPD);
/* CSR_WRITE(sc, WMREG_RADV, 256); not for 82544. */
for (i = 0; i < NRXDESC; i++) {
@@ -1049,7 +1049,7 @@ static int i82544EI_init_hw(struct wm_softc *sc)
CSR_WRITE(sc,WMREG_CTRL_EXT, sc->sc_ctrl_ext);
#endif
- /* MOTLoad : WMREG_RXCSUM (0x5000)= 0, no Rx checksum offloading */
+ /* MOTLoad : WMREG_RXCSUM (0x5000)= 0, no Rx checksum offloading */
#ifdef RTEMS_CKSUM_OFFLOAD
/*
* Set up checksum offload parameters.
@@ -1094,7 +1094,7 @@ static int i82544EI_init_hw(struct wm_softc *sc)
*/
sc->sc_tctl = TCTL_EN | TCTL_PSP | TCTL_CT(TX_COLLISION_THRESHOLD) |
TCTL_COLD(TX_COLLISION_DISTANCE_FDX) |
- TCTL_RTLC /* retransmit on late collision */;
+ TCTL_RTLC /* retransmit on late collision */;
/*
* Set up the receive control register; we actually program
@@ -1185,7 +1185,7 @@ static void i82544EI_ifinit(void *arg)
sc->daemonTid = rtems_bsdnet_newproc(i82544EI_TASK_NAME,4096,i82544EI_daemon,arg);
/* ...all done! */
- sc->arpcom.ac_if.if_flags |= IFF_RUNNING;
+ sc->arpcom.ac_if.if_flags |= IFF_RUNNING;
#ifdef WM_DEBUG
printk(")");
@@ -1271,7 +1271,7 @@ static void wm_stop(struct ifnet *ifp, int disable)
#ifdef WM_DEBUG
printk("wm_stop(");
-#endif
+#endif
/* Stop the transmit and receive processes. */
CSR_WRITE(sc,WMREG_TCTL, 0);
CSR_WRITE(sc,WMREG_RCTL, 0);
@@ -1283,7 +1283,7 @@ static void wm_stop(struct ifnet *ifp, int disable)
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
#ifdef WM_DEBUG
printk(")\n");
-#endif
+#endif
}
/*
@@ -1341,7 +1341,7 @@ static void wm_eeprom_recvbits(struct wm_softc *sc, uint32_t *valp, int nbits)
*
* Read a word from the EEPROM using the MicroWire protocol.
*
- * (The 82544EI Gigabit Ethernet Controller is compatible with
+ * (The 82544EI Gigabit Ethernet Controller is compatible with
* most MicroWire interface, serial EEPROM devices.)
*/
static int wm_read_eeprom_uwire(struct wm_softc *sc, int word, int wordcnt, uint16_t *data)
@@ -1510,7 +1510,7 @@ static void wm_set_filter(struct wm_softc *sc)
#ifdef WM_DEBUG
printk("wm_set_filter(");
-#endif
+#endif
mta_reg = WMREG_CORDOVA_MTA;
sc->sc_rctl &= ~(RCTL_BAM | RCTL_UPE | RCTL_MPE);
@@ -1578,7 +1578,7 @@ static void wm_set_filter(struct wm_softc *sc)
#ifdef WM_DEBUG
printk("RCTL 0x%x)\n", CSR_READ(sc,WMREG_RCTL));
-#endif
+#endif
}
static void i82544EI_error(struct wm_softc *sc)
@@ -1596,9 +1596,9 @@ static void i82544EI_error(struct wm_softc *sc)
intr_status, ifp->if_ierrors);
}
}
- else
+ else
printk("%s%d: Ghost interrupt ?\n",ifp->if_name,ifp->if_unit);
- sc->if_errsts[sc->if_err_ptr1]=0;
+ sc->if_errsts[sc->if_err_ptr1]=0;
if ((++sc->if_err_ptr1)==IF_ERR_BUFSZE) sc->if_err_ptr1=0; /* Till Straumann */
}
@@ -1643,7 +1643,7 @@ static void i82544EI_daemon(void *arg)
if (events & RX_EVENT) i82544EI_rx(sc); /* in ISR instead */
/* clean up and try sending packets */
- do {
+ do {
i82544EI_txq_done(sc);
while (sc->txq_free>0) {
@@ -1651,7 +1651,7 @@ static void i82544EI_daemon(void *arg)
m=0;
IF_DEQUEUE(&ifp->if_snd,m);
if (m==0) break;
- i82544EI_sendpacket(sc, m);
+ i82544EI_sendpacket(sc, m);
}
else {
i82544EI_txq_done(sc);
@@ -1669,7 +1669,7 @@ static void i82544EI_daemon(void *arg)
ifp->if_flags &= ~IFF_OACTIVE;
/* Log errors and other uncommon events. */
- if (events & ERR_EVENT) i82544EI_error(sc);
+ if (events & ERR_EVENT) i82544EI_error(sc);
/* Rx overrun */
if ( events & INIT_EVENT) {
printk("Warnning, Rx overrun. Make sure the old mbuf was free\n");
@@ -1695,7 +1695,7 @@ static void i82544EI_daemon(void *arg)
rtems_bsdnet_semaphore_release();
rtems_semaphore_release(sc->daemonSync);
- /* Note that I dont use sc->daemonTid here -
+ /* Note that I dont use sc->daemonTid here -
* theoretically, that variable could already
* hold a newly created TID
*/
@@ -1732,7 +1732,7 @@ static void wm_gmii_mediainit(struct wm_softc *sc)
#if 1
/* <skf> May 2009 : The value that should be programmed into IPGT is 10 */
- sc->sc_tipg = TIPG_IPGT(10)+TIPG_IPGR1(8)+TIPG_IPGR2(6);
+ sc->sc_tipg = TIPG_IPGT(10)+TIPG_IPGR1(8)+TIPG_IPGR2(6);
#else
sc->sc_tipg = TIPG_1000T_DFLT; /* 0x602008 */
#endif
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wmreg.h b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wmreg.h
index f1615e8cb7..3e21c62581 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wmreg.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wmreg.h
@@ -732,7 +732,7 @@ struct livengood_tcpip_ctxdesc {
#define ICH_GFPREG_BASE_MASK 0x1FFF
#define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
-/* start of Kate Feng added */
+/* start of Kate Feng added */
#define WMREG_GPTC 0x4080 /* Good packets transmitted count */
#define WMREG_GPRC 0x4074 /* Good packets received count */
#define WMREG_CRCERRS 0x4000 /* CRC Error Count */
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c
index 7594fe9841..26b143ea1a 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c
@@ -8,7 +8,7 @@
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
- * by Charles M. Hannum; by William R. Studenmund; by Jason R. Thorpe.
+ * by Charles M. Hannum; by William R. Studenmund; by Jason R. Thorpe.
*
*/
@@ -114,7 +114,7 @@ int pci_get_capability(int b, int d, int f, int capid,int *offset,uint32_t *valu
uint32_t reg, ofs;
/* i82544EI PCI_CAPLISTPTR_REG */
- pci_read_config_dword(b,d,f,PCI_CAPLISTPTR_REG, &reg);
+ pci_read_config_dword(b,d,f,PCI_CAPLISTPTR_REG, &reg);
ofs = PCI_CAPLIST_PTR(reg);
while (ofs != 0) {
#ifdef DIAGNOSTIC
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c
index 4615464491..56ccb8313d 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c
@@ -4,17 +4,17 @@
* This code is inspired by detect_grackle_bridge.c of SVGM BSP
* written by Till Straumann
* Copyright (C) 2001, 2003 Till Straumann <strauman@slac.stanford.edu>
- *
+ *
* Copyright (C) 2004 S. Kate Feng, <feng1@bnl.gov>
* wrote it to support the MVME5500 board.
- *
+ *
*/
#include <libcpu/io.h>
#include <rtems/bspIo.h> /* printk */
#include <bsp/pci.h>
#include <bsp/gtreg.h>
-#include <bsp/gtpcireg.h>
+#include <bsp/gtpcireg.h>
#include <stdio.h>
#include <string.h>
@@ -29,7 +29,7 @@ unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
{
unsigned int pcidata, pcidata1;
int PciLocal, busNumber=0;
-
+
/* On the mvme5500 board, the GT64260B system controller had the MCP
* signal pulled up high. Thus, the MCP signal is not used as it is
* on other boards such as mvme2307.
@@ -40,10 +40,10 @@ unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
0,
0,
PCI_COMMAND,
- &pcidata);
+ &pcidata);
if (!quiet)
- printk("Before _BSP_clear_hostbridge_errors(): 0x%x, cause 0x%x\n",
+ printk("Before _BSP_clear_hostbridge_errors(): 0x%x, cause 0x%x\n",
pcidata, inl(0x1d58));
outl(0,0x1d58);
@@ -51,7 +51,7 @@ unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
/* Clear the error on the host bridge */
pcidata1= pcidata;
pcidata1 |= PCI_STATUS_CLRERR_MASK;
- pcidata1 |= 0x140;
+ pcidata1 |= 0x140;
pci_write_config_dword(busNumber,
0,
0,
@@ -62,9 +62,9 @@ unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
0,
0,
PCI_COMMAND,
- &pcidata1);
+ &pcidata1);
- if (!quiet) printk("After _BSP_clear_hostbridge_errors(): sts 0x%x\n",
+ if (!quiet) printk("After _BSP_clear_hostbridge_errors(): sts 0x%x\n",
pcidata1);
if (pcidata1 & HOSTBRIDGET_ERROR) printk("BSP_clear_hostbridge_errors(): unable to clear pending hostbridge errors\n");
busNumber += BSP_MAX_PCI_BUS_ON_PCI0;
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h b/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h
index 7548a9304c..74751f6088 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h
@@ -58,8 +58,8 @@
#define PCI_ACCCTLBASEL_PCISwap_NoSwap 0x1000000
#define PCI0_P2P_CONFIG 0x1d14
-#define PCI_SNOOP_BASE0_LOW 0x1f00
-#define PCI_SNOOP_BASE0_HIGH 0x1f04
+#define PCI_SNOOP_BASE0_LOW 0x1f00
+#define PCI_SNOOP_BASE0_HIGH 0x1f04
#define PCI_SNOOP_TOP0 0x1f08
#define PCI0_SCS0_BAR_SIZE 0x0c08
@@ -87,8 +87,8 @@
#define PCI1_ACCESS_CNTL_BASE1_HIGH 0x1e94
#define PCI1_ACCESS_CNTL_BASE1_TOP 0x1e98
-#define PCI_SNOOP_BASE1_LOW 0x1f10
-#define PCI_SNOOP_BASE1_HIGH 0x1f14
+#define PCI_SNOOP_BASE1_LOW 0x1f10
+#define PCI_SNOOP_BASE1_HIGH 0x1f14
#define PCI_SNOOP_TOP1 0x1f18
#define PCI0_CMD_CNTL 0xc00
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c
index 2bdee3681a..9a34257c3a 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c
@@ -17,7 +17,7 @@
*
* Copyright 2004, 2008 Brookhaven National Laboratory and
* Shuchen K. Feng, <feng1@bnl.gov>
- *
+ *
* - to be consistent with the original pci.c written by Eric Valette
* - added 2nd PCI support for discovery based PCI bridge (e.g. mvme5500/mvme6100)
* - added bus support for the expansion of PMCSpan as per request by Peter
@@ -30,7 +30,7 @@
#include <bsp/irq.h>
#include <bsp/pci.h>
#include <bsp/gtreg.h>
-#include <bsp/gtpcireg.h>
+#include <bsp/gtpcireg.h>
#include <bsp.h>
#include <stdio.h>
@@ -123,7 +123,7 @@ unsigned char func, unsigned char offset, unsigned short *val)
n=1;
}
- *val = 0xffff;
+ *val = 0xffff;
if ((offset&1)|| (offset & ~0xff)) return PCIBIOS_BAD_REGISTER_NUMBER;
#if 0
printk("addr %x, data %x, pack %x \n", config_addr,
@@ -135,7 +135,7 @@ unsigned char func, unsigned char offset, unsigned short *val)
}
static int indirect_pci_read_config_dword(unsigned char bus, unsigned char dev,
-unsigned char func, unsigned char offset, unsigned int *val)
+unsigned char func, unsigned char offset, unsigned int *val)
{
int n=0;
@@ -144,7 +144,7 @@ unsigned char func, unsigned char offset, unsigned int *val)
n=1;
}
- *val = 0xffffffff;
+ *val = 0xffffffff;
if ((offset&3)|| (offset & ~0xff)) return PCIBIOS_BAD_REGISTER_NUMBER;
out_be32(BSP_pci[n].pci_config_addr, pciConfigPack(bus,dev,func,offset));
@@ -152,7 +152,7 @@ unsigned char func, unsigned char offset, unsigned int *val)
return PCIBIOS_SUCCESSFUL;
}
-static int indirect_pci_write_config_byte(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned char val)
+static int indirect_pci_write_config_byte(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned char val)
{
int n=0;
@@ -168,7 +168,7 @@ static int indirect_pci_write_config_byte(unsigned char bus, unsigned char dev,u
return PCIBIOS_SUCCESSFUL;
}
-static int indirect_pci_write_config_word(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned short val)
+static int indirect_pci_write_config_word(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned short val)
{
int n=0;
@@ -184,7 +184,7 @@ static int indirect_pci_write_config_word(unsigned char bus, unsigned char dev,u
return PCIBIOS_SUCCESSFUL;
}
-static int indirect_pci_write_config_dword(unsigned char bus,unsigned char dev,unsigned char func, unsigned char offset, unsigned int val)
+static int indirect_pci_write_config_dword(unsigned char bus,unsigned char dev,unsigned char func, unsigned char offset, unsigned int val)
{
int n=0;
@@ -263,7 +263,7 @@ int pci_initialize(void)
}
if (!deviceFound) deviceFound=1;
- switch(ulDeviceID) {
+ switch(ulDeviceID) {
case (PCI_VENDOR_ID_MARVELL+(PCI_DEVICE_ID_MARVELL_GT6426xAB<<16)):
pci_read_config_byte(0,0,0,PCI_REVISION_ID, &data8);
switch(data8) {
@@ -298,7 +298,7 @@ int pci_initialize(void)
ucBusNumber,ucSlotNumber);
#endif
break;
- default :
+ default :
#if PCI_PRINT
printk("BSP unlisted vendor, Bus%d Slot%d DeviceID 0x%x \n",
ucBusNumber,ucSlotNumber, ulDeviceID);
@@ -317,7 +317,7 @@ int pci_initialize(void)
0,
PCI_BASE_ADDRESS_0,
&data);
- printk("Bus%d BASE_ADDRESS_0 0x%x \n",ucBusNumber, data);
+ printk("Bus%d BASE_ADDRESS_0 0x%x \n",ucBusNumber, data);
pci_read_config_dword(ucBusNumber,
ucSlotNumber,
0,
@@ -336,14 +336,14 @@ int pci_initialize(void)
0,
PCI_BASE_ADDRESS_3,
&data);
- printk("Bus%d BASE_ADDRESS_3 0x%x \n", ucBusNumber, data);
+ printk("Bus%d BASE_ADDRESS_3 0x%x \n", ucBusNumber, data);
pci_read_config_word(ucBusNumber,
ucSlotNumber,
0,
PCI_INTERRUPT_LINE,
&sdata);
- printk("Bus%d INTERRUPT_LINE 0x%x \n", ucBusNumber, sdata);
+ printk("Bus%d INTERRUPT_LINE 0x%x \n", ucBusNumber, sdata);
/* We always enable internal memory. */
pci_read_config_dword(ucBusNumber,
@@ -374,7 +374,7 @@ int pci_initialize(void)
#if PCI_DEBUG
printk("Bus%d Slot 0x%x HEADER/LAT/CACHE 0x%x \n",
- ucBusNumber, ucSlotNumber, ulHeader);
+ ucBusNumber, ucSlotNumber, ulHeader);
#endif
for (ucFnNumber=1;ucFnNumber<ucNumFuncs;ucFnNumber++) {
@@ -393,8 +393,8 @@ int pci_initialize(void)
ucSlotNumber,
ucFnNumber,
PCI_CLASS_REVISION,
- &ulClass);
-#if PCI_DEBUG
+ &ulClass);
+#if PCI_DEBUG
printk("Bus%d Slot 0x%x Func %d classID 0x%x \n",ucBusNumber,ucSlotNumber,
ucFnNumber, ulClass);
#endif
@@ -404,10 +404,10 @@ int pci_initialize(void)
if (deviceFound) ucMaxPCIBus++;
} /* for (ucBusNumber=0; ucBusNumber<BSP_MAX_PCI_BUS; ... */
#if PCI_DEBUG
- printk("number of PCI buses: %d, numPCIDevs %d\n",
+ printk("number of PCI buses: %d, numPCIDevs %d\n",
pci_bus_count(), numPCIDevs);
#endif
- pci_interface();
+ pci_interface();
return(0);
}
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h
index f682d710ea..dc85f2a0fb 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h
@@ -27,7 +27,7 @@
/* Device classes and subclasses */
#define PCI_CLASS_GT6426xAB_BRIDGE_PCI 0x0580 /* <SKF> */
-
+
/*
* Vendor and card ID's: sort these numerically according to vendor
* (and according to card ID within vendor). Send all updates to
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c
index 729be9bed8..d22691b724 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c
@@ -9,7 +9,7 @@
* 8/17/2006 : S. Kate Feng
* uses in_le32()/out_le32(), instead of inl()/outl() for compatibility.
*
- * 11/2008 : Enable "PCI Read Agressive Prefetch",
+ * 11/2008 : Enable "PCI Read Agressive Prefetch",
* "PCI Read Line Agressive Prefetch", and
* "PCI Read Multiple Agressive Prefetch" to improve the
* performance of the PCI based applications (e.g. 1GHz NIC).
@@ -21,7 +21,7 @@
#include <bsp.h>
#include <bsp/pci.h>
#include <bsp/gtreg.h>
-#include <bsp/gtpcireg.h>
+#include <bsp/gtpcireg.h>
#define PCI_DEBUG 0
@@ -37,7 +37,7 @@
#ifdef PCI2CPU_ORDER
#define PCI_ACCCTLBASEL_VALUE 0x01079000
#else
-#define PCI_ACCCTLBASEL_VALUE 0x01071000
+#define PCI_ACCCTLBASEL_VALUE 0x01071000
#endif
@@ -86,12 +86,12 @@ void pciAccessInit(void)
data = in_le32((volatile unsigned int *)(GT64x60_REG_BASE+PCI0_ACCESS_CNTL_BASE0_LOW+(PciLocal * 0x80)));
#if 0
printk("PCI%d_ACCESS_CNTL_BASE0_LOW was 0x%x\n",PciLocal,data);
-#endif
+#endif
data |= PCI_ACCCTLBASEL_VALUE;
data &= ~0x300000;
out_le32((volatile unsigned int *)(GT64x60_REG_BASE+PCI0_ACCESS_CNTL_BASE0_LOW+(PciLocal * 0x80)), data);
#if 0
- printf("PCI%d_ACCESS_CNTL_BASE0_LOW now 0x%x\n",PciLocal,in_le32((volatile unsigned int *)(GT64x60_REG_BASE+PCI0_ACCESS_CNTL_BASE0_LOW+(PciLocal * 0x80))));
+ printf("PCI%d_ACCESS_CNTL_BASE0_LOW now 0x%x\n",PciLocal,in_le32((volatile unsigned int *)(GT64x60_REG_BASE+PCI0_ACCESS_CNTL_BASE0_LOW+(PciLocal * 0x80))));
#endif
}
}
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c
index 60d96419a1..5f1b59a546 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c
@@ -1,13 +1,13 @@
/* pcifinddevice.c
*
- * Copyright 2001, Till Straumann <strauman@slac.stanford.edu>
+ * Copyright 2001, Till Straumann <strauman@slac.stanford.edu>
*
* find a particular PCI device
* (we assume, the firmware configured the PCI bus[es] for us)
*
- *
+ *
* Kate Feng <feng1@bnl.gov>, modified it to support the mvme5500 board.
- *
+ *
*/
#define PCI_INVALID_VENDORDEVICEID 0xffffffff
@@ -30,7 +30,7 @@ int BSP_pciFindDevicePrint(unsigned short vendorid, unsigned short deviceid,
BSP_pciDebug = 0;
return 0;
-}
+}
int pci_find_device( unsigned short vendorid, unsigned short deviceid,
int instance, int *pbus, int *pdev, int *pfun )
@@ -44,7 +44,7 @@ int pci_find_device( unsigned short vendorid, unsigned short deviceid,
pci_read_config_byte(bus, dev, 0, PCI_HEADER_TYPE, &hd);
hd = (hd & PCI_MULTI_FUNCTION ? PCI_MAX_FUNCTIONS : 1);
for (fun=0; fun<hd; fun++) {
- /*
+ /*
* The last devfn id/slot is special; must skip it
*/
if (PCI_MAX_DEVICES-1==dev && PCI_MAX_FUNCTIONS-1 == fun)
@@ -54,8 +54,8 @@ int pci_find_device( unsigned short vendorid, unsigned short deviceid,
continue;
if (BSP_pciDebug) {
printk("pci_find_device: found 0x%08x at %2d/%2d/%2d ",d,bus,dev,fun);
- printk("(Physically: PCI%d %2d/%2d/%2d)\n",
- (bus>= BSP_MAX_PCI_BUS_ON_PCI0)? 1:0,
+ printk("(Physically: PCI%d %2d/%2d/%2d)\n",
+ (bus>= BSP_MAX_PCI_BUS_ON_PCI0)? 1:0,
(bus>= BSP_MAX_PCI_BUS_ON_PCI0)? bus-BSP_MAX_PCI_BUS_ON_PCI0:bus,
dev, fun);
}
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/start/start.S b/c/src/lib/libbsp/powerpc/mvme5500/start/start.S
index 41b4d59fdb..720811c364 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/start/start.S
+++ b/c/src/lib/libbsp/powerpc/mvme5500/start/start.S
@@ -10,7 +10,7 @@
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
- *
+ *
*/
#include <rtems/asm.h>
@@ -25,7 +25,7 @@
#define KERNELBASE 0x0
#define MEM256MB 0x10000000
-
+
#define MONITOR_ENTER \
mfmsr r10 ; \
ori r10,r10,MSR_IP ; \
@@ -33,20 +33,20 @@
li r10,0x63 ; \
sc
-
+
.text
.globl __rtems_entry_point
.type __rtems_entry_point,@function
__rtems_entry_point:
#ifdef DEBUG_EARLY_START
MONITOR_ENTER
-#endif
-
-/*
+#endif
+
+/*
* PREP
* This is jumped to on prep systems right after the kernel is relocated
* to its proper place in memory by the boot loader. The expected layout
- * of the regs is:
+ * of the regs is:
* r3: ptr to residual data
* r4: initrd_start or if no initrd then 0
* r5: initrd_end - unused if r4 is 0
@@ -56,7 +56,7 @@ __rtems_entry_point:
* The Prep boot loader insure that the MMU is currently off...
*
*/
-
+
mr r31,r3 /* save parameters */
mr r30,r4
mr r29,r5
@@ -69,7 +69,7 @@ __rtems_entry_point:
bl flush_tlbs
/*
* Use the first pair of BAT registers to map the 1st 256MB
- * of RAM to KERNELBASE.
+ * of RAM to KERNELBASE.
*/
lis r11,KERNELBASE@h
ori r11,r11,0x1ffe /* set up BAT0 registers for 604+ */
@@ -92,18 +92,18 @@ __rtems_entry_point:
mtspr DBAT1L,r8 /* N.B. 6xx (not 601) have valid */
mtspr DBAT1U,r11 /* bit in upper BAT register */
mtspr IBAT1L,r8
- mtspr IBAT1U,r11
+ mtspr IBAT1U,r11
isync
/*
- * we now have the two 256M of ram mapped with the bats. We are still
- * running on the bootloader stack and cannot switch to an RTEMS allocated
+ * we now have the two 256M of ram mapped with the bats. We are still
+ * running on the bootloader stack and cannot switch to an RTEMS allocated
* init stack before copying the residual data that may have been set just
* after rtems_end address. This bug has been experienced on MVME2304. Thank
* to Till Straumann <strauman@SLAC.Stanford.EDU> for hunting it and
* suggesting the appropriate code.
*/
-
+
enter_C_code:
bl MMUon
bl __eabi /* setup EABI and SYSV environment */
@@ -115,7 +115,7 @@ enter_C_code:
mr r4,r30
mr r5,r29
mr r6,r28
- mr r7,r27
+ mr r7,r27
bl save_boot_params
/*
* stack = &__rtems_end + 4096
@@ -129,10 +129,10 @@ enter_C_code:
/* pass result of 'save_boot_params' to 'boot_card' in R3 */
bl boot_card
bl _return_to_ppcbug
-
+
.globl MMUon
.type MMUon,@function
-MMUon:
+MMUon:
mfmsr r0
ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1 | MSR_FP
#if (PPC_HAS_FPU == 0)
@@ -145,10 +145,10 @@ MMUon:
mtsrr1 r0
SYNC
rfi
-
+
.globl MMUoff
.type MMUoff,@function
-MMUoff:
+MMUoff:
mfmsr r0
ori r0,r0,MSR_IR| MSR_DR | MSR_IP
mflr r11
@@ -161,14 +161,14 @@ MMUoff:
.globl _return_to_ppcbug
.type _return_to_ppcbug,@function
-
+
_return_to_ppcbug:
mflr r30
bl MMUoff
MONITOR_ENTER
bl MMUon
mtctr r30
- bctr
+ bctr
flush_tlbs:
lis r20, 0x1000
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c
index fdc94b851f..d57809c287 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c
@@ -29,7 +29,7 @@ static ParmRec parmList[]={
FLAG_MAND,
},
{ "BP_GTWY=", &net_config.gateway,
- FLAG_CLRBP,
+ FLAG_CLRBP,
},
{ "BP_MYIP=", &boot_my_ip,
FLAG_MAND | FLAG_CLRBP,
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
index 70fff644cd..0b951c5793 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
@@ -20,7 +20,7 @@
* Modified to support the MVME5500 board.
* Also, the settings of L1, L2, and L3 caches is not necessary here.
* (C) by Brookhaven National Lab., S. Kate Feng <feng1@bnl.gov>, 2003-2009
- *
+ *
* $Id$
*/
@@ -124,15 +124,15 @@ char *BSP_commandline_string = cmdline_buf;
void BSP_panic(char *s)
{
printk("%s PANIC %s\n",_RTEMS_version, s);
- __asm__ __volatile ("sc");
+ __asm__ __volatile ("sc");
}
void _BSP_Fatal_error(unsigned int v)
{
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
- __asm__ __volatile ("sc");
+ __asm__ __volatile ("sc");
}
-
+
void zero_bss(void)
{
memset(
@@ -184,7 +184,7 @@ void zero_bss(void)
* the data to the environment / malloced areas...
*/
-/* this routine is called early at shared/start/start.S
+/* this routine is called early at shared/start/start.S
* and must be safe with a not properly aligned stack
*/
char *
@@ -240,7 +240,7 @@ void bsp_start( void )
* (otherwise we silently die)
*/
/*
- * Kate Feng : PCI 0 domain memory space, want to leave room for the VME window
+ * Kate Feng : PCI 0 domain memory space, want to leave room for the VME window
*/
setdbat(2, PCI0_MEM_BASE, PCI0_MEM_BASE, 0x10000000, IO_PAGE);
@@ -248,7 +248,7 @@ void bsp_start( void )
* map the PCI 0, 1 Domain I/O space, GT64260B registers
* and the reserved area so that the size is the power of 2.
* 2009 : map the entire 256 M space
- *
+ *
*/
setdbat(3,PCI0_IO_BASE, PCI0_IO_BASE, 0x10000000, IO_PAGE);
@@ -262,7 +262,7 @@ void bsp_start( void )
#ifdef SHOW_LCR1_REGISTER
l1cr = get_L1CR();
- printk("Initial L1CR value = %x\n", l1cr);
+ printk("Initial L1CR value = %x\n", l1cr);
#endif
/*
@@ -315,7 +315,7 @@ void bsp_start( void )
if (!pt)
printk("WARNING: unable to setup page tables.\n");
- printk("Now BSP_mem_size = 0x%x\n",BSP_mem_size);
+ printk("Now BSP_mem_size = 0x%x\n",BSP_mem_size);
/* P94 : 7455 TB/DECR is clocked by the system bus clock frequency */
@@ -329,19 +329,19 @@ void bsp_start( void )
#ifdef SHOW_LCR2_REGISTER
l2cr = get_L2CR();
printk("Initial L2CR value = %x\n", l2cr);
-#endif
+#endif
#ifdef SHOW_LCR3_REGISTER
/* L3CR needs DEC int. handler installed for bsp_delay()*/
l3cr = get_L3CR();
printk("Initial L3CR value = %x\n", l3cr);
-#endif
+#endif
/* Activate the page table mappings only after
* initializing interrupts because the irq_mng_init()
* routine needs to modify the text
- */
+ */
if (pt) {
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Page table setup finished; will activate it NOW...\n");
@@ -355,7 +355,7 @@ void bsp_start( void )
#ifdef CONF_VPD
printk("\n");
for (i=0; i<150; i++) {
- printk("%2x ", ConfVPD_buff[i]);
+ printk("%2x ", ConfVPD_buff[i]);
if ((i % 20)==0 ) printk("\n");
}
printk("\n");
@@ -366,11 +366,11 @@ void bsp_start( void )
* PCI 1 domain memory space
*/
setdbat(1, PCI1_MEM_BASE, PCI1_MEM_BASE, 0x10000000, IO_PAGE);
-
+
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Going to start PCI buses scanning and initialization\n");
-#endif
+#endif
pci_initialize();
#ifdef SHOW_MORE_INIT_SETTINGS
printk("Number of PCI buses found is : %d\n", pci_bus_count());
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c
index 8b14f9923e..293fd2ce24 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c
@@ -9,7 +9,7 @@
* default activation procedure.
*/
-/* Author: Till Straumann, <strauman@slac.stanford.edu>, 4/2002
+/* Author: Till Straumann, <strauman@slac.stanford.edu>, 4/2002
* Kate Feng <feng1@bnl.gov> ported it to MVME5500, 4/2004
*/
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h b/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h
index 8f18284247..8cbc9e17f1 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h
@@ -4,19 +4,19 @@
/* A slightly improved exception 'default' exception handler for RTEMS / SVGM */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 5/2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <bsp/vectors.h>
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
index c11894cbd3..b76d997fbe 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
@@ -1,18 +1,18 @@
/* $Id$ */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 5/2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -21,18 +21,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -41,9 +41,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/* Copyright :
* (C) S. Kate Feng <feng1@bnl.gov> 4/2004 modified it for MVME5500
*/
@@ -83,7 +83,7 @@ rtems_id id=0;
int recoverable = 0;
char *fmt="Uhuuuh, Exception %d in unknown task???\n";
int quiet=0;
-
+
if (!quiet) printk("In BSP_exceptionHandler()\n");
/* If we are in interrupt context, we are in trouble - skip the user
* hook and panic
@@ -113,7 +113,7 @@ int quiet=0;
fmt="exception %d\n";
}
}
-
+
if (ext && ext->lowlevelHook && ext->lowlevelHook(excPtr,ext,0)) {
/* they did all the work and want us to do nothing! */
printk("they did all the work and want us to do nothing!\n");
@@ -163,10 +163,10 @@ int quiet=0;
printk("\t XER = %08x\n", excPtr->EXC_XER);
printk("\t LR = %08x\n", excPtr->EXC_LR);
printk("\t DAR = %08x\n", excPtr->EXC_DAR);
-
+
BSP_printStackTrace(excPtr);
}
-
+
if (ASM_MACH_VECTOR == excPtr->_EXC_number) {
/* ollah , we got a machine check - this could either
* be a TEA, MCP or internal; let's see and provide more info
@@ -176,7 +176,7 @@ int quiet=0;
if ( ! (excPtr->EXC_SRR1 & (SRR1_TEA_EXC | SRR1_MCP_EXC)) ) {
if (!quiet)
printk("SRR1\n");
- } else {
+ } else {
if (excPtr->EXC_SRR1 & (SRR1_TEA_EXC)) {
if (!quiet)
printk(" TEA");
@@ -196,7 +196,7 @@ int quiet=0;
} else if (ASM_DEC_VECTOR == excPtr->_EXC_number) {
recoverable = 1;
} else if (ASM_SYS_VECTOR == excPtr->_EXC_number) {
-#ifdef TEST_RAW_EXCEPTION_CODE
+#ifdef TEST_RAW_EXCEPTION_CODE
recoverable = 1;
#else
recoverable = 0;
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
index 1a901b7c3e..35ac1913d9 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
@@ -3,7 +3,7 @@
/* VMEConfig.h, S. Kate Feng modified it for MVME5500 3/04 */
/* BSP specific address space configuration parameters */
-/*
+/*
* The BSP maps VME address ranges into
* one BAT.
* NOTE: the BSP (startup/bspstart.c) uses
diff --git a/c/src/lib/libbsp/powerpc/psim/irq/irq_init.c b/c/src/lib/libbsp/powerpc/psim/irq/irq_init.c
index 5ac5fb45f2..2f29b2ea80 100644
--- a/c/src/lib/libbsp/powerpc/psim/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/psim/irq/irq_init.c
@@ -46,7 +46,7 @@ static rtems_irq_prio irqPrioTable[BSP_IRQ_NUMBER]={
void BSP_rtems_irq_mng_init(unsigned cpuId)
{
int i;
-
+
/*
* First initialize the Interrupt management hardware
*/
@@ -84,8 +84,8 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
"Unable to initialize RTEMS interrupt Management!!! System locked\n"
);
}
-
- #ifdef TRACE_IRQ_INIT
+
+ #ifdef TRACE_IRQ_INIT
printk("RTEMS IRQ management is now operationnal\n");
#endif
}
diff --git a/c/src/lib/libbsp/powerpc/psim/network/if_sim.c b/c/src/lib/libbsp/powerpc/psim/network/if_sim.c
index 58f35396fc..0bf2915ff2 100644
--- a/c/src/lib/libbsp/powerpc/psim/network/if_sim.c
+++ b/c/src/lib/libbsp/powerpc/psim/network/if_sim.c
@@ -256,7 +256,7 @@ int f;
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
}
}
-
+
break;
case SIO_RTEMS_SHOW_STATS:
@@ -461,7 +461,7 @@ rtems_irq_connect_data ihdl;
ihdl.name = ifcfg->irno;
ihdl.hdl = ifsim_isr;
- ihdl.handle = sc;
+ ihdl.handle = sc;
ihdl.on = ifsim_irq_on;
ihdl.off = ifsim_irq_off;
ihdl.isOn = ifsim_irq_ison;
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/console/console-io.c b/c/src/lib/libbsp/powerpc/qemuppc/console/console-io.c
index bd9126b592..c67bc0dab4 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/console/console-io.c
+++ b/c/src/lib/libbsp/powerpc/qemuppc/console/console-io.c
@@ -62,7 +62,7 @@ int console_inbyte_nonblocking(
int port
)
{
-
+
if ( __inb(0x3f8 + 0x05) & 0x01 )
return __inb(0x3f8 + 0x00);
return -1;
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/start/start.S b/c/src/lib/libbsp/powerpc/qemuppc/start/start.S
index e9946c4df4..5fe24b82b9 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/start/start.S
+++ b/c/src/lib/libbsp/powerpc/qemuppc/start/start.S
@@ -18,7 +18,7 @@ _start:
bl cmain
.size _start, . - _start
-
+
.global __eabi
__eabi:
blr
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c b/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c
index d8d089af74..55aa6ee20e 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c
@@ -74,7 +74,7 @@ void bsp_start( void )
/*
* initialize the device driver parameters
- * assume we are running with 20MHz bus
+ * assume we are running with 20MHz bus
* this should speed up some tests :-)
*/
BSP_bus_frequency = 20;
diff --git a/c/src/lib/libbsp/powerpc/score603e/PCI_bus/universe.c b/c/src/lib/libbsp/powerpc/score603e/PCI_bus/universe.c
index a27bb38f57..0905ad7ce9 100644
--- a/c/src/lib/libbsp/powerpc/score603e/PCI_bus/universe.c
+++ b/c/src/lib/libbsp/powerpc/score603e/PCI_bus/universe.c
@@ -166,7 +166,7 @@ void initialize_universe(void)
*/
jumper_selection = PCI_bus_read(
(volatile uint32_t*)SCORE603E_VME_JUMPER_ADDR );
- printk("initialize_universe: Read 0x%x = 0x%x\n",
+ printk("initialize_universe: Read 0x%x = 0x%x\n",
SCORE603E_VME_JUMPER_ADDR, jumper_selection);
jumper_selection = (jumper_selection >> 3) & 0x1f;
@@ -182,7 +182,7 @@ void initialize_universe(void)
printk ("Invalid SCORE603E_UNIVERSE_CHIP_ID: 0x08%" PRId32 "\n", pci_id);
rtems_fatal_error_occurred( 0x603e0bad );
} else {
- printk("initialize_universe: Reg 0x%x read 0x%x\n",
+ printk("initialize_universe: Reg 0x%x read 0x%x\n",
SCORE603E_IO_VME_UNIVERSE_BASE, pci_id );
}
diff --git a/c/src/lib/libbsp/powerpc/score603e/console/85c30.c b/c/src/lib/libbsp/powerpc/score603e/console/85c30.c
index c73a4fc0d2..c826b4e20c 100644
--- a/c/src/lib/libbsp/powerpc/score603e/console/85c30.c
+++ b/c/src/lib/libbsp/powerpc/score603e/console/85c30.c
@@ -10,7 +10,7 @@
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
- *
+ *
* $Id$
*/
diff --git a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
index 374001f876..3345351b31 100644
--- a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h
@@ -64,7 +64,7 @@ extern "C" {
#define Initialize_Board_ctrl_register() \
*SCORE603E_BOARD_CTRL_REG = (*SCORE603E_BOARD_CTRL_REG | \
- SCORE603E_BRD_FLASH_DISABLE_MASK)
+ SCORE603E_BRD_FLASH_DISABLE_MASK)
#define Processor_Synchronize() \
asm volatile(" eieio ")
diff --git a/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c b/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c
index 91a8e7a9df..b1520ff8c7 100644
--- a/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c
+++ b/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c
@@ -25,7 +25,7 @@
*/
void initialize_PCI_bridge (void)
{
- /* Note: Accept DINKs setup of the PCI Bridge and don't
+ /* Note: Accept DINKs setup of the PCI Bridge and don't
* change anything.
*/
}
diff --git a/c/src/lib/libbsp/powerpc/score603e/irq/irq.c b/c/src/lib/libbsp/powerpc/score603e/irq/irq.c
index 8fab2c653e..658b29e243 100644
--- a/c/src/lib/libbsp/powerpc/score603e/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/score603e/irq/irq.c
@@ -195,7 +195,7 @@ printk(" BSP_install_rtems_irq_handler %d\n", irq->name );
/* XXX -FIX ME !! */
if (is_pci_irq(irq->name)) {
/*
- * Enable interrupt
+ * Enable interrupt
*/
printk("is_pci_irq = TRUE - FIX THIS!\n");
}
@@ -288,7 +288,7 @@ printk(" BSP_remove_rtems_irq_handler %d\n", irq->name );
/* XXX - FIX ME !! */
if (is_pci_irq(irq->name)) {
/*
- * disable interrupt
+ * disable interrupt
*/
}
if (is_processor_irq(irq->name)) {
@@ -357,7 +357,7 @@ printk(" BSP_rtems_irq_mngt_set\n");
*/
/*
- * XXX - FIX ME !!!
+ * XXX - FIX ME !!!
*/
for (i=BSP_PCI_IRQ_LOWEST_OFFSET; i < BSP_PCI_IRQ_LOWEST_OFFSET + BSP_PCI_IRQ_NUMBER ; i++) {
if (rtems_hdl_tbl[i].hdl != default_rtems_entry.hdl) {
diff --git a/c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c b/c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c
index a7c223800e..29ac764f84 100644
--- a/c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c
@@ -29,7 +29,7 @@
#define SHOW_ISA_PCI_BRIDGE_SETTINGS 1
#define SCAN_PCI_PRINT 1
-#define TRACE_IRQ_INIT 0
+#define TRACE_IRQ_INIT 0
typedef struct {
unsigned char bus; /* few chance the PCI/ISA bridge is not on first bus but ... */
diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c
index bbca59dd79..bbccb0fc61 100644
--- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c
@@ -33,12 +33,12 @@ unsigned int BSP_heap_start;
/*
* PCI Bus Frequency
*/
-unsigned int BSP_bus_frequency;
+unsigned int BSP_bus_frequency;
/*
* processor clock frequency
*/
-unsigned int BSP_processor_frequency;
+unsigned int BSP_processor_frequency;
/*
* Time base divisior (how many tick for 1 second).
@@ -180,7 +180,7 @@ void bsp_start( void )
/*
* Get CPU identification dynamically. Note that the get_ppc_cpu_type()
- * function store the result in global variables so that it can be used
+ * function store the result in global variables so that it can be used
* later...
*/
myCpu = get_ppc_cpu_type();
@@ -199,7 +199,7 @@ void bsp_start( void )
BSP_mem_size = RamSize;
printk("BSP_mem_size: 0x%x\n", BSP_mem_size );
-
+
/*
* Initialize default raw exception handlers.
@@ -239,11 +239,11 @@ void bsp_start( void )
/*
* Initalize RTEMS IRQ system
*/
- #if DEBUG
+ #if DEBUG
printk("bspstart: Call BSP_rtems_irq_mng_init\n");
#endif
BSP_rtems_irq_mng_init(0);
-
+
#if DEBUG
printk("bsp_start: end BSPSTART\n");
ShowBATS();
diff --git a/c/src/lib/libbsp/powerpc/score603e/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/score603e/vme/VMEConfig.h
index afdca20eb0..b678913012 100644
--- a/c/src/lib/libbsp/powerpc/score603e/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/score603e/vme/VMEConfig.h
@@ -4,19 +4,19 @@
/* BSP specific address space configuration parameters */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/*
* The BSP maps VME address ranges into
* one BAT.
diff --git a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c
index 7b508ce0f6..7bb34102fd 100644
--- a/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c
+++ b/c/src/lib/libbsp/powerpc/shared/bootloader/pci.c
@@ -770,7 +770,7 @@ void pci_read_bases(struct pci_dev *dev, unsigned int howmany)
#ifdef PCI_DEBUG
printk(" readbase bus %d, (%04x:%04x), base %08x, size %08x, type %d\n",
- r->dev->bus->number,
+ r->dev->bus->number,
r->dev->vendor,
r->dev->device,
r->base,
@@ -1190,15 +1190,15 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus )
#endif
#ifdef WRITE_BRIDGE_ENABLE
- pcibios_write_config_word(pdev->bus->number,
- pdev->devfn,
- PCI_BRIDGE_CONTROL,
+ pcibios_write_config_word(pdev->bus->number,
+ pdev->devfn,
+ PCI_BRIDGE_CONTROL,
(uint16_t)( 0 ));
- pcibios_write_config_word(pdev->bus->number,
- pdev->devfn,
- PCI_COMMAND,
- (uint16_t)( PCI_COMMAND_IO |
+ pcibios_write_config_word(pdev->bus->number,
+ pdev->devfn,
+ PCI_COMMAND,
+ (uint16_t)( PCI_COMMAND_IO |
PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER ));
#endif
diff --git a/c/src/lib/libbsp/powerpc/shared/clock/clock.c b/c/src/lib/libbsp/powerpc/shared/clock/clock.c
index 740972fa76..54efc46298 100644
--- a/c/src/lib/libbsp/powerpc/shared/clock/clock.c
+++ b/c/src/lib/libbsp/powerpc/shared/clock/clock.c
@@ -161,7 +161,7 @@ rtems_device_driver Clock_initialize( rtems_device_major_number major, rtems_dev
/*
* Set default ticker.
- *
+ *
* The function rtems_clock_tick() returns a status code. This value
* will be discarded since the RTEMS documentation claims that it is
* always successful.
diff --git a/c/src/lib/libbsp/powerpc/shared/console/bspreset.c b/c/src/lib/libbsp/powerpc/shared/console/bspreset.c
index a6d0f52a2a..706121d6b6 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/bspreset.c
+++ b/c/src/lib/libbsp/powerpc/shared/console/bspreset.c
@@ -16,7 +16,7 @@ void bsp_reset(void)
printk("Printing a stack trace for your convenience :-)\n");
CPU_print_stack();
/* shutdown and reboot */
-
+
#if defined(mvme2100)
*(unsigned char*)0xffe00000 |= 0x80;
#else
diff --git a/c/src/lib/libbsp/powerpc/shared/console/console.c b/c/src/lib/libbsp/powerpc/shared/console/console.c
index 58d590a002..9345461f5a 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/console.c
+++ b/c/src/lib/libbsp/powerpc/shared/console/console.c
@@ -74,7 +74,7 @@ static int conSetAttr(int minor, const struct termios *);
typedef struct TtySTblRec_ {
char *name;
rtems_irq_hdl isr;
-} TtySTblRec, *TtySTbl;
+} TtySTblRec, *TtySTbl;
static TtySTblRec ttyS[]={
{ "/dev/ttyS0",
@@ -197,7 +197,7 @@ rtems_device_driver console_open(
rtems_status_code status;
static rtems_termios_callbacks cb =
#if defined(USE_POLLED_IO)
- {
+ {
NULL, /* firstOpen */
NULL, /* lastClose */
NULL, /* pollRead */
@@ -208,7 +208,7 @@ rtems_device_driver console_open(
TERMIOS_POLLED /* outputUsesInterrupts */
};
#else
- {
+ {
console_first_open, /* firstOpen */
console_last_close, /* lastClose */
#if ( TERMIOS_OUTPUT_MODE == TERMIOS_TASK_DRIVEN )
diff --git a/c/src/lib/libbsp/powerpc/shared/console/uart.c b/c/src/lib/libbsp/powerpc/shared/console/uart.c
index dd63c6781b..3e89701666 100644
--- a/c/src/lib/libbsp/powerpc/shared/console/uart.c
+++ b/c/src/lib/libbsp/powerpc/shared/console/uart.c
@@ -142,7 +142,7 @@ BSP_uart_init(int uart, int baud, int hwFlow)
/* Sanity check */
SANITY_CHECK(uart);
-
+
/* Make sure any printk activity drains before
* re-initializing.
*/
@@ -756,7 +756,7 @@ BSP_uart_termios_isr_com(int uart)
/*
* XXX - Note that this can now be one isr with the uart
- * passed as the parameter.
+ * passed as the parameter.
*/
void
BSP_uart_termios_isr_com1(void *unused)
diff --git a/c/src/lib/libbsp/powerpc/shared/flash/flash.c b/c/src/lib/libbsp/powerpc/shared/flash/flash.c
index 02558dccb0..687c533489 100644
--- a/c/src/lib/libbsp/powerpc/shared/flash/flash.c
+++ b/c/src/lib/libbsp/powerpc/shared/flash/flash.c
@@ -28,19 +28,19 @@
* and other combinations are untested.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -49,18 +49,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -69,9 +69,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#ifndef TESTING
#include <rtems.h>
#include <bsp/flashPgm.h>
@@ -331,7 +331,7 @@ bail:
* This is not really clean since (until we implement CFI)
* we already need to know what kind of device it is to
* be able to read its ID...
- *
+ *
* NOTES: - device switched back to array mode on exit.
* - 'addr' must be 32-bit aligned.
*/
@@ -390,7 +390,7 @@ struct devdesc *dd;
/* Scan address range for flash devices and compute total size
* of bank.
- *
+ *
* RETURNS: size in bytes.
*/
STATIC uint32_t
@@ -573,7 +573,7 @@ uint32_t a,e;
if ( quiet < 2 ) {
printf("ERASING "); fflush(stdout);
}
-
+
if ( (i = BSP_flashErase(bank, a, e-a, quiet ? quiet : 1)) )
return i;
@@ -719,7 +719,7 @@ int f;
if ( quiet < 2 ) {
f = flip(f);
}
-
+
a += b->fblksz;
size -= b->fblksz;
}
@@ -787,7 +787,7 @@ unsigned f = 0;
perror("Opening file");
return -1;
}
-
+
if ( sz )
break;
diff --git a/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h b/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h
index 3b49ff172c..aae35966e5 100644
--- a/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h
+++ b/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h
@@ -92,11 +92,11 @@ BSP_flashErase(int bank, uint32_t offset, uint32_t size, int quiet);
* not block-aligned then adjacent data are preserved provided that
* the relevant chunks of the destination are blank (erased).
*
- * | <neighbour> fffffff |
+ * | <neighbour> fffffff |
* ^--- destination ----- ^
* | : block boundary
* f : blank/erased pieces
- *
+ *
* (If the start of the destination region up to the next block boundary
* is blank then '<neighbour>'-data is preserved. The end of the
* destination is treated the same way.)
@@ -162,19 +162,19 @@ BSP_flashBlockSize(int bank);
}
#endif
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -183,18 +183,18 @@ BSP_flashBlockSize(int bank);
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -203,8 +203,8 @@ BSP_flashBlockSize(int bank);
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#endif
diff --git a/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h b/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h
index 55d0bf1333..c035a08ef2 100644
--- a/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h
+++ b/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h
@@ -10,10 +10,10 @@
/* DO NOT INCLUDE THIS HEADER FROM APPLICATION CODE */
/*
- * Glue interface -- to be used only internally by BSP
+ * Glue interface -- to be used only internally by BSP
* and chip drivers:
* - BSP provides info about what chip drivers to use
- * as well as 'wiring' info (how many devices are
+ * as well as 'wiring' info (how many devices are
* operated in parallel etc).
* - Chip drivers provide low-level 'methods' / 'ops'
* for performing basic operations which are used
@@ -40,19 +40,19 @@
* width to make it more generic.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -61,18 +61,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -81,9 +81,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdint.h>
@@ -185,7 +185,7 @@ struct vendesc {
/* array of supported devices;
* the 'ops' specified below
* are used to access these devices
- */
+ */
struct devdesc *known_devs;
/* access methods for talking to
* devices associated with this
@@ -202,14 +202,14 @@ struct flash_bank_ops {
/* Read vendor/device ID; Return 0 on success, nonzero if unable to read id */
int (*get_id)(struct bankdesc *b, uint32_t addr, uint32_t *pVendorId, uint32_t *pDeviceId);
/* Unlock block holding 'addr'ess
- *
+ *
* NOTES: - device switched back to array mode on exit.
* - 'addr' must be 32-bit aligned.
*/
void (*unlock_block)(struct bankdesc *b, uint32_t addr);
/* Lock block holding 'addr'ess
- *
+ *
* NOTES: - device switched back to array mode on exit.
* - 'addr' must be 32-bit aligned.
*/
@@ -255,9 +255,9 @@ struct flash_bank_ops {
struct flash_bsp_ops {
/* Return descriptor for bank # 'bank' or NULL (invalid arg) */
struct bankdesc *(*bankcheck)(int bank, int quiet);
-/* set (enbl:1), clear (enbl:0) or query (enbl:-1)
+/* set (enbl:1), clear (enbl:0) or query (enbl:-1)
* on-board write protection.
- *
+ *
* RETURNS 0 on success, nonzero on error.
*/
int (*flash_wp)(int bank, int enbl);
diff --git a/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c b/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c
index c0685b32f0..a2059a029a 100644
--- a/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c
+++ b/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c
@@ -10,19 +10,19 @@
* mode (width=2).
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -31,18 +31,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -51,9 +51,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#ifdef TESTING
#define TIMEOUT_US 100000
@@ -176,7 +176,7 @@ struct vendesc BSP_flash_vendor_intel[] =
/********* Helper Subroutines ******************/
-/* Basic low-level access routine for writing a command to the
+/* Basic low-level access routine for writing a command to the
* internal state machine.
*
* Flash is slow, so who cares if these access routines
@@ -351,7 +351,7 @@ int i;
}
/* Unlock block holding 'addr'ess
- *
+ *
* NOTES: - device switched back to array mode on exit.
* - 'addr' must be 32-bit aligned.
*/
@@ -368,7 +368,7 @@ flash_unlock_block_intel(struct bankdesc *b, uint32_t addr)
}
/* Lock block holding 'addr'ess
- *
+ *
* NOTES: - device switched back to array mode on exit.
* - 'addr' must be 32-bit aligned.
*/
@@ -428,7 +428,7 @@ union {
/* Query device for basic information verifying that we talk
* to a 'known'/'supported' device.
- *
+ *
* NOTES: - device switched back to array mode on exit.
* - 'addr' must be 32-bit aligned.
*/
diff --git a/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c b/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c
index b538e666a8..332d35a191 100644
--- a/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c
+++ b/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c
@@ -10,19 +10,19 @@
* and in 16-bit mode (width=2).
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -31,18 +31,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -51,9 +51,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <stdio.h>
@@ -420,18 +420,18 @@ rtems_interval p,i;
}
return -1;
}
-
+
STATIC void
flash_print_stat_s160(struct bankdesc *b, uint32_t sta, int verbose)
{
fprintf(stderr,"Flash Spansion 160 error %"PRIi32"\n", sta);
}
-
+
STATIC uint32_t
flash_write_line_s160(struct bankdesc *b, uint32_t a, char *s, uint32_t N)
{
uint32_t sta, nxt, j, v;
-union bconv buf;
+union bconv buf;
if ( 0 == N )
return -11;
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c b/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c
index a33e331228..bbde96213a 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/shared/irq/irq_init.c
@@ -274,11 +274,11 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
*/
openpic_init(1, mvme2100_openpic_initpolarities, mvme2100_openpic_initsenses, 16, 16, BSP_bus_frequency);
#else
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Going to initialize raven interrupt controller (openpic compliant)\n");
#endif
openpic_init(1, mcp750_openpic_initpolarities, mcp750_openpic_initsenses, 0, 0, 0);
-#ifdef TRACE_IRQ_INIT
+#ifdef TRACE_IRQ_INIT
printk("Going to initialize the PCI/ISA bridge IRQ related setting (VIA 82C586)\n");
#endif
if ( currentBoard == MESQUITE ) {
@@ -330,8 +330,8 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
*/
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
}
-
-#ifdef TRACE_IRQ_INIT
+
+#ifdef TRACE_IRQ_INIT
printk("RTEMS IRQ management is now operational\n");
#endif
}
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/openpic_i8259_irq.c b/c/src/lib/libbsp/powerpc/shared/irq/openpic_i8259_irq.c
index 63d0d82f1b..e726343d80 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/openpic_i8259_irq.c
+++ b/c/src/lib/libbsp/powerpc/shared/irq/openpic_i8259_irq.c
@@ -111,7 +111,7 @@ BSP_enable_irq_at_pic(const rtems_irq_number name)
BSP_irq_enable_at_i8259s ((int) name - BSP_ISA_IRQ_LOWEST_OFFSET);
}
#endif
-
+
if (is_pci_irq(name)) {
/*
* Enable interrupt at OPENPIC level
diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c
index a8f6b29929..03c5e03527 100644
--- a/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c
+++ b/c/src/lib/libbsp/powerpc/shared/motorola/motorola.c
@@ -113,12 +113,12 @@ static struct _int_map mtx603_intmap[] = {
static struct _int_map mvme23xx_intmap[] = {
/* Raven Hostbridge; has int_pin == 0
- {0, 0, 0, {{0, {-1,-1,-1,-1}},
+ {0, 0, 0, {{0, {-1,-1,-1,-1}},
NULL_PINMAP}},
*/
/* Winbond PCI/ISA 83c553; has int_pin == 0
- {0, 11, 0, {{0, {-1,-1,-1,-1}},
+ {0, 11, 0, {{0, {-1,-1,-1,-1}},
NULL_PINMAP}},
*/
@@ -156,12 +156,12 @@ static struct _int_map mvme23xx_intmap[] = {
static struct _int_map mvme24xx_intmap[] = {
/* Raven Hostbridge; has int_pin == 0
- {0, 0, 0, {{0, {-1,-1,-1,-1}},
+ {0, 0, 0, {{0, {-1,-1,-1,-1}},
NULL_PINMAP}},
*/
/* Winbond PCI/ISA 83c553; has int_pin == 0
- {0, 11, 0, {{0, {-1,-1,-1,-1}},
+ {0, 11, 0, {{0, {-1,-1,-1,-1}},
NULL_PINMAP}},
*/
@@ -195,12 +195,12 @@ static struct _int_map mvme24xx_intmap[] = {
static struct _int_map mvme27xx_intmap[] = {
/* Raven Hostbridge; has int_pin == 0 */
- {0, 0, 0, {{0, {-1,-1,-1,-1}},
+ {0, 0, 0, {{0, {-1,-1,-1,-1}},
NULL_PINMAP}},
/* Winbond PCI/ISA 83c553; has int_pin == 0 */
- {0, 11, 0, {{0, {-1,-1,-1,-1}},
+ {0, 11, 0, {{0, {-1,-1,-1,-1}},
NULL_PINMAP}},
{0, 13, PCI_FIXUP_OPT_OVERRIDE_NAME,
@@ -369,11 +369,11 @@ motorolaBoard getMotorolaBoard(void)
for (entry = 0; mot_boards[entry].cpu_type != 0; entry++) {
if ((mot_boards[entry].cpu_type & 0xff) != cpu_type)
continue;
-
+
if ((mot_boards[entry].proc_type != PPC_UNKNOWN) &&
(mot_boards[entry].proc_type != proc_type))
/*
- * IMD: processor type does not match
+ * IMD: processor type does not match
* (here we distinguish a MVME2300 and a MVME2400)
*/
continue;
diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/vpd.c b/c/src/lib/libbsp/powerpc/shared/motorola/vpd.c
index e61b9a1bd2..b4cba3f3eb 100644
--- a/c/src/lib/libbsp/powerpc/shared/motorola/vpd.c
+++ b/c/src/lib/libbsp/powerpc/shared/motorola/vpd.c
@@ -8,19 +8,19 @@ VPD = "MOTOROLA" , { field }
field = type, length, { data }
*/
-/*
+/*
* Authorship
* ----------
* This software ('beatnik' RTEMS BSP for MVME6100 and MVME5500) was
* created by Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'beatnik' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -29,18 +29,18 @@ field = type, length, { data }
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -49,9 +49,9 @@ field = type, length, { data }
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <string.h>
@@ -97,7 +97,7 @@ uint8_t fp[2];
fp[0] = early_fp>>8;
fp[1] = early_fp;
write_bytes(dev,fp,2);
-
+
start(d);
addr(d, BSP_VPD_I2C_ADDR, I2C_READ);
rval = d->ops->read_bytes(d, buf, len);
@@ -119,7 +119,7 @@ int got, rval = 0;
if ( (got = read_bytes(fd, buf+rval, len)) <= 0 )
return -1;
len -= got;
- rval+= got;
+ rval+= got;
}
return rval;
}
@@ -148,7 +148,7 @@ static int (*stop)(int fd);
/*
init(dev);
*
- * Hangs - probably would need a delay here - just leave motload settings
+ * Hangs - probably would need a delay here - just leave motload settings
*/
read_bytes = early_read;
@@ -267,7 +267,7 @@ L2 Cache Configuration : FF FF FF FF FF FF FF FF
VPD Revision : 00 03 00 00
L3 Cache Configuration : 01 01 07 02 03 00 00 00
: 01 00
-
+
diff --git a/c/src/lib/libbsp/powerpc/shared/motorola/vpd.h b/c/src/lib/libbsp/powerpc/shared/motorola/vpd.h
index 30fc20bf2e..61b633f38a 100644
--- a/c/src/lib/libbsp/powerpc/shared/motorola/vpd.h
+++ b/c/src/lib/libbsp/powerpc/shared/motorola/vpd.h
@@ -30,7 +30,7 @@ typedef enum {
L2CacheConfig = 0x0e, /* binary */
VPDRevision = 0x0f, /* binary (4bytes) */
L3CacheConfig = 0x19, /* binary */
- End = 0xff
+ End = 0xff
} VpdKey;
typedef struct {
@@ -43,7 +43,7 @@ typedef struct {
#define VPD_END { key:End, }
-
+
/* Scan the VPD EEPROM for a number of fields
*
@@ -96,19 +96,19 @@ BSP_vpdRetrieveKey(VpdKey k, void *buf, int buflen, int instance);
}
#endif
-/*
+/*
* Authorship
* ----------
* This software ('beatnik' RTEMS BSP for MVME6100 and MVME5500) was
* created by Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* The 'beatnik' BSP was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -117,18 +117,18 @@ BSP_vpdRetrieveKey(VpdKey k, void *buf, int buflen, int instance);
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -137,8 +137,8 @@ BSP_vpdRetrieveKey(VpdKey k, void *buf, int buflen, int instance);
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#endif
diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
index b5688c168f..a9fe3b2e4f 100644
--- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
+++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
@@ -315,7 +315,7 @@ void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses
/* round to nearest integer:
* round(Bus_freq/33000000) = floor( 2*(Bus_freq/33e6) + 1 ) / 2
- */
+ */
ratio = epic_freq / 16500000 + 1;
ratio >>= 2; /* EICR value is half actual divisor */
if ( 0==ratio )
diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h
index 7a9764857b..14d306e204 100644
--- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h
+++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.h
@@ -336,7 +336,7 @@ extern unsigned openpic_set_eoi_delay(unsigned tb_cycles);
* and 'level sensitive', respectively.
* NOTE: if you do pass arrays then their size must either
* match the number of sources read from the device or
- * that value must be overridden by specifying
+ * that value must be overridden by specifying
* a non-zero 'num_sources' parameter.
*
* Nonzero 'epic_freq' activates the EOI delay if the EPIC is
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c b/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c
index febe7601d0..eb297dca45 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c
+++ b/c/src/lib/libbsp/powerpc/shared/pci/generic_clear_hberrs.c
@@ -56,7 +56,7 @@ int count;
if ( !PCI_STATUS_OK(pcistat) ) {
printk("Unable to clear PCI errors: still 0x%04x after 10 attempts\n", pcistat);
}
-
+
rval &= PCI_ERR_BITS;
/* Some VME bridges (Tsi148) don't propagate VME bus errors to PCI status reg. */
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pci.c b/c/src/lib/libbsp/powerpc/shared/pci/pci.c
index 973f5d7bb8..99b3ef5a99 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/pci.c
+++ b/c/src/lib/libbsp/powerpc/shared/pci/pci.c
@@ -323,7 +323,7 @@ static int test_intname(
}
}
- if( _nopin )
+ if( _nopin )
{
printk("pci : Device %d:0x%02x:%d supplied a bogus interrupt_pin %d\n", pbus, pslot, pfun, int_pin );
return -1;
diff --git a/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c b/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c
index d8d8ef3eb1..d4c6018fb4 100644
--- a/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c
+++ b/c/src/lib/libbsp/powerpc/shared/pci/pcifinddevice.c
@@ -5,19 +5,19 @@
* $Id$
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2001,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -26,18 +26,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -46,9 +46,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#define PCI_INVALID_VENDORDEVICEID 0xffffffff
#define PCI_MULTI_FUNCTION 0x80
@@ -111,7 +111,7 @@ fd_arg a;
void *h;
a.vid = vendorid;
a.did = deviceid;
- a.inst = instance;
+ a.inst = instance;
if ( (h = BSP_pciScan(0, find_dev_cb, (void*)&a)) ) {
*pbus = PCIB_DEVSIG_BUS( a.inst );
@@ -128,7 +128,7 @@ dump_dev_cb(
int dev,
int fun,
void *uarg
-)
+)
{
uint16_t vi,di;
uint16_t cd,st;
diff --git a/c/src/lib/libbsp/powerpc/shared/start/preload.S b/c/src/lib/libbsp/powerpc/shared/start/preload.S
index 9da4b1ca7d..eda0ac0618 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/preload.S
+++ b/c/src/lib/libbsp/powerpc/shared/start/preload.S
@@ -12,11 +12,11 @@
*
* The SMON firmware is unable to load the RTEMS image below
* 0x2000 (I believe their stack is growing below 0x1000).
- *
+ *
* The code provided by this file is responsible for the performing
* the following steps:
*
- * 1) Save commandline parameters to an area that is
+ * 1) Save commandline parameters to an area that is
* a) not covered by the downloaded image
* b) will not be overwritten by the moved image
* nor the final BSS segment (rtems clears BSS
@@ -29,7 +29,7 @@
* data (such as its stack).
* 3) Flush the cache to make sure the relocated image is actually
* in memory.
- * 4) setup RTEMS environment (initial register values), most
+ * 4) setup RTEMS environment (initial register values), most
* notably an initial STACK. The initial stack may be small and
* is used by RTEMS only at a very early stage.
* A safe place for the stack seems to be the 00..0x7f area.
@@ -111,7 +111,7 @@ here:
/* at this point the register contents are
* R3: command line start
* R4: R3 + command line length
- * R5: address we are running from / loaded to
+ * R5: address we are running from / loaded to
* R27: image end
*/
@@ -162,7 +162,7 @@ leaveparms:
li r16, 0x80
cmpw r5, r16 /* 'from' must be > 0x80 */
blt panic
-
+
1: /* store some arbitrary, nonzero stuff in 0..0x7c */
stwu r16,-4(r16)
cmpwi r16,0
@@ -176,7 +176,7 @@ leaveparms:
#else
li r16,CACHE_LINE_SIZE
#endif
-
+
lis r3,preload@h
ori r3,r3,preload@l
mr r4,r5 /* from-addr */
@@ -187,7 +187,7 @@ leaveparms:
*/
lis r0,return_here@h
ori r0,r0,return_here@l
- mtlr r0
+ mtlr r0
b domove /* move the preloader itself */
return_here:
/* now we move the entire rest of the image */
diff --git a/c/src/lib/libbsp/powerpc/shared/start/start.S b/c/src/lib/libbsp/powerpc/shared/start/start.S
index de7d097f49..6c7a35bf4b 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/start.S
+++ b/c/src/lib/libbsp/powerpc/shared/start/start.S
@@ -71,7 +71,7 @@ __rtems_entry_point:
*/
lis r11,KERNELBASE@h
/* set up BAT registers for 604 */
- ori r11,r11,0x1ffe
+ ori r11,r11,0x1ffe
li r8,2 /* R/W access */
isync
mtspr DBAT0L,r8 /* N.B. 6xx (not 601) have valid */
@@ -115,7 +115,7 @@ enter_C_code:
li r0, (CPU_STACK_ALIGNMENT-1)
andc r1, r9, r0
/*
- * We are now in a environment that is totally independent from
+ * We are now in a environment that is totally independent from
* bootloader setup.
*/
/* pass result of 'save_boot_params' to 'boot_card' in R3 */
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
index f30bf44261..bf8e9e4103 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
@@ -50,7 +50,7 @@ void bsp_get_work_area(
* you are allocating the Work Area in a new BSP.
*/
#ifdef BSP_GET_WORK_AREA_DEBUG
- {
+ {
void *sp = __builtin_frame_address(0);
void *end = *work_area_start + *work_area_size;
printk(
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
index bfab28aa31..991abcd66f 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
@@ -121,11 +121,11 @@ char * save_boot_params(
#if defined(mvme2100)
unsigned int EUMBBAR;
-/*
+/*
* Return the current value of the Embedded Utilities Memory Block Base Address
* Register (EUMBBAR) as read from the processor configuration register using
* Processor Address Map B (CHRP).
- */
+ */
unsigned int get_eumbbar(void) {
out_le32( (uint32_t*)0xfec00000, 0x80000078 );
return in_le32( (uint32_t*)0xfee00000 );
@@ -154,7 +154,7 @@ void bsp_start( void )
/*
* Get CPU identification dynamically. Note that the get_ppc_cpu_type()
- * function store the result in global variables so that it can be used
+ * function store the result in global variables so that it can be used
* later...
*/
myCpu = get_ppc_cpu_type();
@@ -186,7 +186,7 @@ void bsp_start( void )
#if defined(mvme2100)
/* Need 0xfec00000 mapped for this */
- EUMBBAR = get_eumbbar();
+ EUMBBAR = get_eumbbar();
#endif
/*
@@ -358,7 +358,7 @@ void bsp_start( void )
#endif
BSP_pgtbl_activate(pt);
/* finally, switch off DBAT3 */
- setdbat(3, 0, 0, 0, 0);
+ setdbat(3, 0, 0, 0, 0);
}
#if defined(DEBUG_BATS)
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/panic.c b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
index 86c1675c2e..45e449c9f9 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/panic.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
@@ -27,39 +27,39 @@ void BSP_panic(char *s)
char *score_status_text(rtems_status_code sc)
{
switch (sc) {
- case INTERNAL_ERROR_NO_CONFIGURATION_TABLE:
+ case INTERNAL_ERROR_NO_CONFIGURATION_TABLE:
return "INTERNAL_ERROR_NO_CONFIGURATION_TABLE";
- case INTERNAL_ERROR_NO_CPU_TABLE:
+ case INTERNAL_ERROR_NO_CPU_TABLE:
return "INTERNAL_ERROR_NO_CPU_TABLE";
- case INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS:
+ case INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS:
return "INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS";
- case INTERNAL_ERROR_TOO_LITTLE_WORKSPACE:
+ case INTERNAL_ERROR_TOO_LITTLE_WORKSPACE:
return "INTERNAL_ERROR_TOO_LITTLE_WORKSPACE";
- case INTERNAL_ERROR_WORKSPACE_ALLOCATION:
+ case INTERNAL_ERROR_WORKSPACE_ALLOCATION:
return "INTERNAL_ERROR_WORKSPACE_ALLOCATION";
- case INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL:
+ case INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL:
return "INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL";
- case INTERNAL_ERROR_THREAD_EXITTED:
+ case INTERNAL_ERROR_THREAD_EXITTED:
return "INTERNAL_ERROR_THREAD_EXITTED";
- case INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION:
+ case INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION:
return "INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION";
- case INTERNAL_ERROR_INVALID_NODE:
+ case INTERNAL_ERROR_INVALID_NODE:
return "INTERNAL_ERROR_INVALID_NODE";
- case INTERNAL_ERROR_NO_MPCI:
+ case INTERNAL_ERROR_NO_MPCI:
return "INTERNAL_ERROR_NO_MPCI";
- case INTERNAL_ERROR_BAD_PACKET:
+ case INTERNAL_ERROR_BAD_PACKET:
return "INTERNAL_ERROR_BAD_PACKET";
- case INTERNAL_ERROR_OUT_OF_PACKETS:
+ case INTERNAL_ERROR_OUT_OF_PACKETS:
return "INTERNAL_ERROR_OUT_OF_PACKETS";
- case INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS:
+ case INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS:
return "INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS";
- case INTERNAL_ERROR_OUT_OF_PROXIES:
+ case INTERNAL_ERROR_OUT_OF_PROXIES:
return "INTERNAL_ERROR_OUT_OF_PROXIES";
- case INTERNAL_ERROR_INVALID_GLOBAL_ID:
+ case INTERNAL_ERROR_INVALID_GLOBAL_ID:
return "INTERNAL_ERROR_INVALID_GLOBAL_ID";
- case INTERNAL_ERROR_BAD_STACK_HOOK:
+ case INTERNAL_ERROR_BAD_STACK_HOOK:
return "INTERNAL_ERROR_BAD_STACK_HOOK";
- case INTERNAL_ERROR_BAD_ATTRIBUTES:
+ case INTERNAL_ERROR_BAD_ATTRIBUTES:
return "INTERNAL_ERROR_BAD_ATTRIBUTES";
case 18: /* not in header (yet) :-( */
return "INTERNAL_ERROR_CALLED_FROM_WRONG_ENVIRONMENT";
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c
index 5448e8d050..ed06fe26b9 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c
@@ -9,19 +9,19 @@
* default activation procedure.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 4/2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -30,18 +30,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -50,9 +50,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
void
BSP_pgtbl_activate(Triv121PgTbl) __attribute__ (( weak, alias("__BSP_default_pgtbl_activate") ));
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c
index 73f210c2b5..6e5c4bf886 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_setup.c
@@ -18,19 +18,19 @@
* *pmemsize by the size of the page table.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 4/2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -39,18 +39,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -59,9 +59,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
Triv121PgTbl
BSP_pgtbl_setup(unsigned int *) __attribute__ (( weak, alias("__BSP_default_pgtbl_setup") ));
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/probeMemEnd.c b/c/src/lib/libbsp/powerpc/shared/startup/probeMemEnd.c
index 5e9906ff36..f90d9bc06e 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/probeMemEnd.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/probeMemEnd.c
@@ -4,19 +4,19 @@
#include <libcpu/cpuIdent.h>
#include <rtems/bspIo.h>
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,14 +45,14 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/* Simple memory probing routine
- *
- * - call from MMU-disabled section to avoid having to
+ *
+ * - call from MMU-disabled section to avoid having to
* set up mappings.
* NOTE: this implies WIMG = 0011
* - call AFTER image is at its destination and PRIOR
@@ -134,8 +134,8 @@ register uint32_t v, x;
return -1;
case PPC_750: printk("CPU_lockUnlockCaches(): Can't lock L2 on a mpc750, sorry :-(\n");
return -2; /* cannot lock L2 :-( */
- case PPC_7455:
- case PPC_7457:
+ case PPC_7455:
+ case PPC_7457:
v = _read_L3CR();
x = 1<<(31-9);
v = doLock ? v | x : v & ~x;
@@ -158,7 +158,7 @@ register uint32_t v, x;
case PPC_604e:
break;
}
-
+
v = _read_HID0();
x = 1<<(31-19);
v = doLock ? v | x : v & ~x;
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c b/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c
index 2c51d6f6f5..a4e78dd67a 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/sbrk.c
@@ -8,13 +8,13 @@
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -23,18 +23,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -43,9 +43,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/*
* Hack around the 32bit powerpc 32M problem:
diff --git a/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c b/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c
index 0cb160df4d..a50a98f3cc 100644
--- a/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c
+++ b/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c
@@ -27,7 +27,7 @@
/*
* Dump U-Boot Board Information Structure
- *
+ *
* u - pointer to information structure
*/
void dumpUBootBDInfo(
@@ -78,7 +78,7 @@ void dumpUBootBDInfo(
u->bi_pcifreq
#endif
);
-
+
}
#endif
diff --git a/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c b/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
index 9fb5875c62..e57b0d1f8d 100644
--- a/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
+++ b/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
@@ -28,7 +28,7 @@ static int bsp_uboot_environ_check_crc(void)
unsigned long crc;
unsigned long max;
- for (max=0 ; max <= 0x20000 ; max+=4 ) {
+ for (max=0 ; max <= 0x20000 ; max+=4 ) {
crc = crc32( 0, NULL, 0 );
crc = crc32( crc, &uboot_environment[4], max);
printk( "crc=0x%08lx need %0x max=%d\n", crc,
@@ -49,7 +49,7 @@ const char *bsp_uboot_getenv(
return NULL;
for ( i=4 ; i<uboot_environment_size ; i++ ) {
- memset( lhs, '\0', sizeof(lhs) );
+ memset( lhs, '\0', sizeof(lhs) );
for( j=0 ; uboot_environment[i] != '=' && j<sizeof(lhs) ; i++, j++ ) {
lhs[j] = uboot_environment[i];
}
diff --git a/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h
index 9447fce4b7..963fb90453 100644
--- a/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h
+++ b/c/src/lib/libbsp/powerpc/shared/vme/VMEConfig.h
@@ -4,19 +4,19 @@
/* BSP specific address space configuration parameters */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/*
* The BSP maps VME address ranges into
diff --git a/c/src/lib/libbsp/powerpc/shared/vme/vme_universe.c b/c/src/lib/libbsp/powerpc/shared/vme/vme_universe.c
index 84c22c462f..591e676598 100644
--- a/c/src/lib/libbsp/powerpc/shared/vme/vme_universe.c
+++ b/c/src/lib/libbsp/powerpc/shared/vme/vme_universe.c
@@ -45,19 +45,19 @@
* This file is named 'vme_universe.c' for historical reasons.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 9/2005,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -66,18 +66,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -86,9 +86,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
typedef struct {
int (*xlate_adrs)(int, int, unsigned long, unsigned long, unsigned long *);
int (*install_isr)(unsigned long, BSP_VME_ISR_t, void *);
@@ -305,7 +305,7 @@ VMEDmaListClass pc;
pci_addr,
vme_addr,
n_bytes);
-
+
}
return BSP_VMEDmaListDescriptorSetupTool(d, attr_mask, xfer_mode, pci_addr, vme_addr, n_bytes);
@@ -344,7 +344,7 @@ void *carg;
BSP_disableVME_int_lvl(vec);
return 0;
}
-
+
if ( cb ) {
if ( BSP_installVME_isr(vec, (BSP_VME_ISR_t)cb, usr_arg) )
return -4;
@@ -426,7 +426,7 @@ int err;
/* This feature is only supported by the Universe driver (not Tsi148) */
#if defined(BSP_PCI_VME_DRIVER_DOES_EOI) && defined(BSP_PIC_DO_EOI)
-#ifdef _VME_DRIVER_TSI148
+#ifdef _VME_DRIVER_TSI148
#error "BSP_PCI_VME_DRIVER_DOES_EOI/BSP_PIC_DO_EOI feature can only be used with vmeUniverse"
#endif
if ( vmeUniverse0PciIrqLine < 0 )
diff --git a/c/src/lib/libbsp/powerpc/shared/vme/vmeconfig.c b/c/src/lib/libbsp/powerpc/shared/vme/vmeconfig.c
index 05f1d6ed3e..b7c91333c9 100644
--- a/c/src/lib/libbsp/powerpc/shared/vme/vmeconfig.c
+++ b/c/src/lib/libbsp/powerpc/shared/vme/vmeconfig.c
@@ -4,19 +4,19 @@
* is independent of the bridge driver/chip
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 3/2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <bsp.h>
#include <bsp/VME.h>
diff --git a/c/src/lib/libbsp/powerpc/ss555/startup/start.S b/c/src/lib/libbsp/powerpc/ss555/startup/start.S
index 813011e1c1..790191af1d 100644
--- a/c/src/lib/libbsp/powerpc/ss555/startup/start.S
+++ b/c/src/lib/libbsp/powerpc/ss555/startup/start.S
@@ -56,7 +56,7 @@
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these warnings.
-
+
/*
* The initial stack is set to the top of the internal RAM.
*
diff --git a/c/src/lib/libbsp/powerpc/ss555/startup/tm27supp.c b/c/src/lib/libbsp/powerpc/ss555/startup/tm27supp.c
index a05b4e5b7a..c2cf9f85c6 100644
--- a/c/src/lib/libbsp/powerpc/ss555/startup/tm27supp.c
+++ b/c/src/lib/libbsp/powerpc/ss555/startup/tm27supp.c
@@ -6,24 +6,24 @@
#include <bsp.h>
-void tm27On()
-{
-}
-
-void tm27Off()
-{
-}
-
-int tm27IsOn()
-{
- return 1;
-}
-
-rtems_irq_connect_data tm27IrqData = {
- CPU_USIU_EXT_IRQ_7,
- (rtems_irq_hdl)0,
- (rtems_irq_enable)tm27On,
- (rtems_irq_disable)tm27Off,
- (rtems_irq_is_enabled)tm27IsOn
+void tm27On()
+{
+}
+
+void tm27Off()
+{
+}
+
+int tm27IsOn()
+{
+ return 1;
+}
+
+rtems_irq_connect_data tm27IrqData = {
+ CPU_USIU_EXT_IRQ_7,
+ (rtems_irq_hdl)0,
+ (rtems_irq_enable)tm27On,
+ (rtems_irq_disable)tm27Off,
+ (rtems_irq_is_enabled)tm27IsOn
};
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/console/console.c b/c/src/lib/libbsp/powerpc/tqm8xx/console/console.c
index 6ca12de107..90ac1a4aed 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/console/console.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/console/console.c
@@ -242,11 +242,11 @@ sccBRGval (int baud)
typedef struct {
uint32_t reg_content;
int link_cnt;
-}brg_state_t;
+}brg_state_t;
brg_state_t scc_brg_state[BRG_CNT];
/*
- * initialize brg_state
+ * initialize brg_state
*/
static void sccBRGinit(void)
{
@@ -318,7 +318,7 @@ static int sccBRGalloc(int chan,int baud)
}
#endif
- rtems_interrupt_disable(level);
+ rtems_interrupt_disable(level);
if (new_brg < 0) {
/* search for brg with this settings */
@@ -329,9 +329,9 @@ static int sccBRGalloc(int chan,int baud)
new_brg = brg_idx;
}
}
- /*
- * if not found: check, whether brg currently in use
- * is linked only from our channel
+ /*
+ * if not found: check, whether brg currently in use
+ * is linked only from our channel
*/
if ((new_brg < 0) &&
(old_brg >= 0) &&
@@ -349,17 +349,17 @@ static int sccBRGalloc(int chan,int baud)
}
/* decrease old link count */
- if ((old_brg >= 0) &&
+ if ((old_brg >= 0) &&
(old_brg < 4)) {
scc_brg_state[old_brg].link_cnt--;
}
/* increase new brg link count, set brg */
- if ((new_brg >= 0) &&
+ if ((new_brg >= 0) &&
(new_brg < 4)) {
scc_brg_state[new_brg].link_cnt++;
scc_brg_state[new_brg].reg_content = reg_val;
(&m8xx.brgc1)[new_brg] = reg_val;
- }
+ }
rtems_interrupt_enable(level);
/* connect to scc/smc */
@@ -419,7 +419,7 @@ sccSetAttributes (int minor, const struct termios *t)
}
/*
- * Interrupt handler
+ * Interrupt handler
*/
static rtems_isr
sccInterruptHandler (void *arg)
@@ -431,7 +431,7 @@ sccInterruptHandler (void *arg)
*/
if (CHN_EVENT_GET(chan) & 0x1) {
/*
- * clear SCC event flag
+ * clear SCC event flag
*/
CHN_EVENT_CLR(chan,0x01);
/*
@@ -448,8 +448,8 @@ sccInterruptHandler (void *arg)
/*
* clear status
*/
- sccCurrRxBd[chan]->status =
- (sccCurrRxBd[chan]->status
+ sccCurrRxBd[chan]->status =
+ (sccCurrRxBd[chan]->status
& (M8xx_BD_WRAP | M8xx_BD_INTERRUPT))
| M8xx_BD_EMPTY;
/*
@@ -480,7 +480,7 @@ sccInterruptHandler (void *arg)
while((sccDequTxBd[chan] != sccPrepTxBd[chan]) &&
((sccDequTxBd[chan]->status & M8xx_BD_READY) == 0)) {
if (sccttyp[chan] != NULL) {
- rtems_termios_dequeue_characters (sccttyp[chan],
+ rtems_termios_dequeue_characters (sccttyp[chan],
sccDequTxBd[chan]->length);
}
/*
@@ -531,17 +531,17 @@ sccInitialize (int chan)
* round up rxBuf[chan] to start at a cache line size
*/
rxBuf[chan] = (sccRxBuf_t *)
- (((uint32_t)rxBuf[chan]) +
+ (((uint32_t)rxBuf[chan]) +
(PPC_CACHE_ALIGNMENT
- ((uint32_t)rxBuf[chan]) % PPC_CACHE_ALIGNMENT));
}
/*
- * Allocate buffer descriptors
+ * Allocate buffer descriptors
*/
- sccCurrRxBd[chan] =
+ sccCurrRxBd[chan] =
sccFrstRxBd[chan] = m8xx_bd_allocate(SCC_RXBD_CNT);
- sccPrepTxBd[chan] =
- sccDequTxBd[chan] =
+ sccPrepTxBd[chan] =
+ sccDequTxBd[chan] =
sccFrstTxBd[chan] = m8xx_bd_allocate(SCC_TXBD_CNT);
switch(chan) {
case CONS_CHN_SCC1:
@@ -612,7 +612,7 @@ sccInitialize (int chan)
/*
* Configure port B pins to enable SMTXD1 and SMRXD1 pins
*/
- m8xx.pbpar |= 0xC0;
+ m8xx.pbpar |= 0xC0;
m8xx.pbdir &= ~0xC0;
break;
case CONS_CHN_SMC2:
@@ -624,11 +624,11 @@ sccInitialize (int chan)
break;
}
/*
- * allocate and connect BRG
+ * allocate and connect BRG
*/
sccBRGalloc(chan,9600);
-
-
+
+
/*
* Set up SCCx parameter RAM common to all protocols
*/
@@ -640,7 +640,7 @@ sccInitialize (int chan)
CHN_PARAM_SET(chan,mrblr,RXBUFSIZE);
else
CHN_PARAM_SET(chan,mrblr,1);
-
+
/*
* Set up SCCx parameter RAM UART-specific parameters
*/
@@ -652,7 +652,7 @@ sccInitialize (int chan)
m8xx_console_chan_desc[chan].parms.sccp->un.uart.character[0]=0x8000; /* no char filter */
m8xx_console_chan_desc[chan].parms.sccp->un.uart.rccm=0x80FF; /* control character mask */
}
-
+
/*
* Set up the Receive Buffer Descriptors
*/
@@ -675,13 +675,13 @@ sccInitialize (int chan)
sccFrstTxBd[chan][i].length = 0;
sccFrstTxBd[chan][i].buffer = NULL;
}
-
+
/*
* Set up SCC general and protocol-specific mode registers
*/
CHN_EVENT_CLR(chan,~0); /* Clear any pending events */
CHN_MASK_SET(chan,0); /* Mask all interrupt/event sources */
-
+
if (m8xx_console_chan_desc[chan].is_scc) {
m8xx_console_chan_desc[chan].regs.sccr->psmr = 0xb000; /* 8N1, CTS flow control */
m8xx_console_chan_desc[chan].regs.sccr->gsmr_h = 0x00000000;
@@ -693,9 +693,9 @@ sccInitialize (int chan)
/*
* Send "Init parameters" command
*/
- m8xx_cp_execute_cmd(M8xx_CR_OP_INIT_RX_TX
+ m8xx_cp_execute_cmd(M8xx_CR_OP_INIT_RX_TX
| m8xx_console_chan_desc[chan].cr_chan_code);
-
+
/*
* Enable receiver and transmitter
*/
@@ -707,7 +707,7 @@ sccInitialize (int chan)
}
if (m8xx_scc_mode[chan] != TERMIOS_POLLED) {
-
+
rtems_irq_connect_data irq_conn_data = {
m8xx_console_chan_desc[chan].ivec_src,
sccInterruptHandler, /* rtems_irq_hdl */
@@ -735,9 +735,9 @@ sccPollRead (int minor)
if ((sccCurrRxBd[chan]->status & M8xx_BD_EMPTY) != 0) {
return -1;
}
-
- if (0 == (sccCurrRxBd[chan]->status & (M8xx_BD_OVERRUN
- | M8xx_BD_PARITY_ERROR
+
+ if (0 == (sccCurrRxBd[chan]->status & (M8xx_BD_OVERRUN
+ | M8xx_BD_PARITY_ERROR
| M8xx_BD_FRAMING_ERROR
| M8xx_BD_BREAK
| M8xx_BD_IDLE))) {
@@ -749,8 +749,8 @@ sccPollRead (int minor)
* clear status
*/
}
- sccCurrRxBd[chan]->status =
- (sccCurrRxBd[chan]->status
+ sccCurrRxBd[chan]->status =
+ (sccCurrRxBd[chan]->status
& (M8xx_BD_WRAP | M8xx_BD_INTERRUPT))
| M8xx_BD_EMPTY;
/*
@@ -788,8 +788,8 @@ sccInterruptWrite (int minor, const char *buf, int len)
/*
* clear status, set ready bit
*/
- sccPrepTxBd[chan]->status =
- (sccPrepTxBd[chan]->status
+ sccPrepTxBd[chan]->status =
+ (sccPrepTxBd[chan]->status
& M8xx_BD_WRAP)
| M8xx_BD_READY | M8xx_BD_INTERRUPT;
if ((sccPrepTxBd[chan]->status & M8xx_BD_WRAP) != 0) {
@@ -808,18 +808,18 @@ sccPollWrite (int minor, const char *buf, int len)
static char txBuf[CONS_CHN_CNT][SCC_TXBD_CNT];
int chan = minor;
int bd_used;
-
+
while (len--) {
while (sccPrepTxBd[chan]->status & M8xx_BD_READY)
continue;
bd_used = sccPrepTxBd[chan]-sccFrstTxBd[chan];
txBuf[chan][bd_used] = *buf++;
rtems_cache_flush_multiple_data_lines((const void *)&txBuf[chan][bd_used],
- sizeof(txBuf[chan][bd_used]));
+ sizeof(txBuf[chan][bd_used]));
sccPrepTxBd[chan]->buffer = &(txBuf[chan][bd_used]);
sccPrepTxBd[chan]->length = 1;
- sccPrepTxBd[chan]->status =
- (sccPrepTxBd[chan]->status
+ sccPrepTxBd[chan]->status =
+ (sccPrepTxBd[chan]->status
& M8xx_BD_WRAP)
| M8xx_BD_READY;
if ((sccPrepTxBd[chan]->status & M8xx_BD_WRAP) != 0) {
@@ -844,7 +844,7 @@ static void console_debug_putc_onlcr(const char c)
if (BSP_output_chan != CONS_CHN_NONE) {
rtems_interrupt_disable(irq_level);
-
+
if (c == '\n') {
sccPollWrite (BSP_output_chan,&cr_chr,1);
}
@@ -917,18 +917,18 @@ rtems_device_driver console_initialize(rtems_device_major_number major,
* Register the device
*/
status = rtems_io_register_name (tty_name,
- major,
+ major,
channel_list[entry].minor);
if (status != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (status);
}
- }
+ }
}
/*
* register /dev/console
*/
status = rtems_io_register_name ("/dev/console",
- major,
+ major,
CONSOLE_CHN);
if (status != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (status);
@@ -974,7 +974,7 @@ rtems_device_driver console_open(
0 /* outputUsesInterrupts */
};
- if (m8xx_scc_mode[chan] == TERMIOS_IRQ_DRIVEN) {
+ if (m8xx_scc_mode[chan] == TERMIOS_IRQ_DRIVEN) {
status = rtems_termios_open (major, minor, arg, &interruptCallbacks);
sccttyp[chan] = args->iop->data1;
}
@@ -984,7 +984,7 @@ rtems_device_driver console_open(
}
return status;
}
-
+
/*
* Close the device
*/
@@ -1056,7 +1056,7 @@ static int scc_io_set_trm_char(rtems_device_minor_number minor,
}
}
/*
- * transfer characters
+ * transfer characters
*/
if (rc == RTEMS_SUCCESSFUL) {
if (trm_char_info->char_cnt > CON8XX_TRM_CHAR_CNT) {
@@ -1066,7 +1066,7 @@ static int scc_io_set_trm_char(rtems_device_minor_number minor,
/*
* check, whether device is a SCC
*/
- if ((rc == RTEMS_SUCCESSFUL) &&
+ if ((rc == RTEMS_SUCCESSFUL) &&
!m8xx_console_chan_desc[minor].is_scc) {
rc = RTEMS_UNSATISFIED;
}
@@ -1096,14 +1096,14 @@ rtems_device_driver console_control(
rtems_device_minor_number minor,
void * arg
)
-{
+{
rtems_libio_ioctl_args_t *ioa=arg;
switch (ioa->command) {
#if 0
case CON8XX_IO_SET_TRM_CHAR:
return scc_io_set_trm_char(minor, ioa);
-#endif
+#endif
default:
return rtems_termios_ioctl (arg);
break;
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h b/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h
index 24a45410c3..8544390f05 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/include/bsp.h
@@ -91,7 +91,7 @@ extern "C" {
#include <mpc8xx/console.h>
#include <bsp/vectors.h>
#include <bsp/tqm.h>
-#include <libcpu/powerpc-utility.h>
+#include <libcpu/powerpc-utility.h>
/*
* Network driver configuration
@@ -99,25 +99,25 @@ extern "C" {
struct rtems_bsdnet_ifconfig;
#if BSP_USE_NETWORK_FEC
-extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
+extern int rtems_fec_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
int attaching);
#define RTEMS_BSP_FEC_NETWORK_DRIVER_NAME "fec1"
#define RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH rtems_fec_enet_driver_attach
#endif
#if BSP_USE_NETWORK_SCC
-extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
+extern int rtems_scc_enet_driver_attach (struct rtems_bsdnet_ifconfig *config,
int attaching);
#define RTEMS_BSP_SCC_NETWORK_DRIVER_NAME "scc1"
#define RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH rtems_scc_enet_driver_attach
#endif
#if BSP_USE_NETWORK_FEC
-#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_FEC_NETWORK_DRIVER_NAME
-#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH
+#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_FEC_NETWORK_DRIVER_NAME
+#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_FEC_NETWORK_DRIVER_ATTACH
#elif BSP_USE_NETWORK_SCC
-#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_SCC_NETWORK_DRIVER_NAME
-#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH
+#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_SCC_NETWORK_DRIVER_NAME
+#define RTEMS_BSP_NETWORK_DRIVER_ATTACH RTEMS_BSP_SCC_NETWORK_DRIVER_ATTACH
#endif
/*
* We need to decide how much memory will be non-cacheable. This
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/include/irq.h b/c/src/lib/libbsp/powerpc/tqm8xx/include/irq.h
index 2ada75bd43..6baaeafb87 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/include/irq.h
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/include/irq.h
@@ -31,7 +31,7 @@
#include <rtems/irq-extension.h>
/*
- * the following definitions specify the indices used
+ * the following definitions specify the indices used
* to interface the interrupt handler API
*/
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/include/tqm.h b/c/src/lib/libbsp/powerpc/tqm8xx/include/tqm.h
index 31500e25f2..bb0daf5396 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/include/tqm.h
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/include/tqm.h
@@ -29,7 +29,7 @@ typedef struct {
uint32_t sdram_size; /* existing SDRAM size */
uint32_t flash_base; /* start address flash */
uint32_t flash_size; /* existing Flash size */
- uint32_t flash_offset;
+ uint32_t flash_offset;
uint32_t sram_base; /* start address sram */
uint32_t sram_size; /* existing sram size */
uint32_t immr_base; /* start address internal memory map */
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c b/c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c
index 2e3e9ef02e..1e87902566 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c
@@ -68,11 +68,11 @@ rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
if (BSP_IS_CPM_IRQ(irqnum)) {
bsp_irq_enable_at_CPM(irqnum);
return RTEMS_SUCCESSFUL;
- }
+ }
else if (BSP_IS_SIU_IRQ(irqnum)) {
bsp_irq_enable_at_SIU(irqnum);
return RTEMS_SUCCESSFUL;
- }
+ }
return RTEMS_INVALID_ID;
}
@@ -81,11 +81,11 @@ rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
if (BSP_IS_CPM_IRQ(irqnum)) {
bsp_irq_disable_at_CPM(irqnum);
return RTEMS_SUCCESSFUL;
- }
+ }
else if (BSP_IS_SIU_IRQ(irqnum)) {
bsp_irq_disable_at_SIU(irqnum);
return RTEMS_SUCCESSFUL;
- }
+ }
return RTEMS_INVALID_ID;
}
@@ -100,13 +100,13 @@ static int BSP_irq_handle_at_cpm(void)
/* Get vector number: write IACK=1, then read vectir */
m8xx.civr = 1;
cpvecnum = (m8xx.civr >> 11) + BSP_CPM_IRQ_LOWEST_OFFSET;
-
+
/*
* Check the vector number,
* enable exceptions and dispatch the handler.
* NOTE: lower-prio interrupts are automatically masked in CPIC
*/
- if (BSP_IS_CPM_IRQ(cpvecnum)) {
+ if (BSP_IS_CPM_IRQ(cpvecnum)) {
/* Enable all interrupts */
msr = ppc_external_exceptions_enable();
/* Dispatch interrupt handlers */
@@ -144,16 +144,16 @@ static int BSP_irq_handle_at_siu( unsigned excNum)
* Check the vector number, mask lower priority interrupts, enable
* exceptions and dispatch the handler.
*/
- if (BSP_IS_SIU_IRQ(sivecnum)) {
+ if (BSP_IS_SIU_IRQ(sivecnum)) {
simask_save = m8xx.simask;
/*
* if this is the CPM interrupt, mask lower prio interrupts at SIU
* else mask lower and same priority interrupts
*/
- m8xx.simask &= ~0 << (32
+ m8xx.simask &= ~0 << (32
- sivecnum
- - ((is_cpm_irq) ? 1 : 0));
-
+ - ((is_cpm_irq) ? 1 : 0));
+
if (is_cpm_irq) {
BSP_irq_handle_at_cpm();
}
@@ -169,8 +169,8 @@ static int BSP_irq_handle_at_siu( unsigned excNum)
*/
m8xx.sipend = 1 << (31 - sivecnum);
}
-
-
+
+
/* Restore initial masks */
m8xx.simask = simask_save;
} else {
@@ -186,11 +186,11 @@ static int BSP_irq_handle_at_siu( unsigned excNum)
*/
rtems_status_code mpc8xx_cpic_initialize( void)
{
- /*
- * mask off all interrupts
+ /*
+ * mask off all interrupts
*/
m8xx.cimr = 0;
- /*
+ /*
* make sure CPIC request proper level at SIU interrupt controller
*/
m8xx.cicr = (0x00e41f00 |
@@ -204,15 +204,15 @@ rtems_status_code mpc8xx_cpic_initialize( void)
*/
rtems_status_code mpc8xx_siu_int_initialize( void)
{
- /*
- * mask off all interrupts
+ /*
+ * mask off all interrupts
*/
m8xx.simask = 0;
return RTEMS_SUCCESSFUL;
}
-int mpc8xx_exception_handler(BSP_Exception_frame *frame,
+int mpc8xx_exception_handler(BSP_Exception_frame *frame,
unsigned exception_number)
{
return BSP_irq_handle_at_siu(exception_number);
@@ -226,7 +226,7 @@ rtems_status_code bsp_interrupt_facility_initialize()
}
/* Initialize the SIU interrupt controller */
if (mpc8xx_siu_int_initialize()) {
- return RTEMS_IO_ERROR;
+ return RTEMS_IO_ERROR;
}
/* Initialize the CPIC interrupt controller */
return mpc8xx_cpic_initialize();
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/network/network_fec.c b/c/src/lib/libbsp/powerpc/tqm8xx/network/network_fec.c
index 29d1c497a7..6d58721f77 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/network/network_fec.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/network/network_fec.c
@@ -161,7 +161,7 @@ struct m8xx_fec_enet_struct {
static struct m8xx_fec_enet_struct enet_driver[NIFACES];
/* declare ioctl function for internal use */
-static int fec_ioctl (struct ifnet *ifp,
+static int fec_ioctl (struct ifnet *ifp,
ioctl_command_t command, caddr_t data);
/***************************************************************************\
| MII Management access functions |
@@ -221,7 +221,7 @@ int fec_mdio_read
*/
if (phy == -1) {
/*
- * set default phy number: 0
+ * set default phy number: 0
*/
phy = sc->phy_default;
}
@@ -288,7 +288,7 @@ int fec_mdio_write
*/
if (phy == -1) {
/*
- * set default phy number: 0
+ * set default phy number: 0
*/
phy = sc->phy_default;
}
@@ -978,7 +978,7 @@ static void fec_enet_stats (struct m8xx_fec_enet_struct *sc)
printf (" Raw output wait:%-8lu\n", sc->txRawWait);
}
-static int fec_ioctl (struct ifnet *ifp,
+static int fec_ioctl (struct ifnet *ifp,
ioctl_command_t command, caddr_t data)
{
struct m8xx_fec_enet_struct *sc = ifp->if_softc;
@@ -1107,7 +1107,7 @@ int fec_mode_adapt
}
else {
m8xx.fec.x_cntrl |= M8xx_FEC_X_CNTRL_FDEN;
- }
+ }
/*
* store current media state for future compares
*/
@@ -1136,7 +1136,7 @@ static void fec_watchdog
\*=========================================================================*/
{
fec_mode_adapt(ifp);
- ifp->if_timer = FEC_WATCHDOG_TIMEOUT;
+ ifp->if_timer = FEC_WATCHDOG_TIMEOUT;
}
int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config)
@@ -1205,7 +1205,7 @@ int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config)
/*
* assume: IF 1 -> PHY 0
*/
- sc->phy_default = unitNumber-1;
+ sc->phy_default = unitNumber-1;
/*
* Set up network interface values
@@ -1231,7 +1231,7 @@ int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config)
return 1;
};
-int rtems_fec_enet_driver_attach(struct rtems_bsdnet_ifconfig *config,
+int rtems_fec_enet_driver_attach(struct rtems_bsdnet_ifconfig *config,
int attaching)
{
/*
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.c b/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.c
index 67da184f8e..134dd536d0 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.c
@@ -33,7 +33,7 @@
#undef DEBUG
/*
- * this is a dummy receive buffer for sequences,
+ * this is a dummy receive buffer for sequences,
* where only send data are available
*/
uint8_t m8xx_spi_dummy_rxbuf[2];
@@ -144,7 +144,7 @@ static int m8xx_spi_wait
/*
* allow interrupts, when receiver is not empty
*/
- m8xx.spim = (M8xx_SPIE_TXE | M8xx_SPIE_TXB |
+ m8xx.spim = (M8xx_SPIE_TXE | M8xx_SPIE_TXB |
M8xx_SPIE_BSY | M8xx_SPIE_MME);
rc = rtems_semaphore_obtain(softc_ptr->irq_sema_id,
@@ -170,7 +170,7 @@ static int m8xx_spi_wait
}
act_status = m8xx.spie;
- if ((act_status & (M8xx_SPIE_TXE | M8xx_SPIE_TXB |
+ if ((act_status & (M8xx_SPIE_TXE | M8xx_SPIE_TXB |
M8xx_SPIE_BSY | M8xx_SPIE_MME))!= M8xx_SPIE_TXB) {
#if defined(DEBUG)
printk("... exit with RTEMS_IO_ERROR,"
@@ -204,14 +204,14 @@ static rtems_isr m8xx_spi_irq_handler
\*=========================================================================*/
{
m8xx_spi_softc_t *softc_ptr = arg;
-
+
/*
- * disable interrupt mask
+ * disable interrupt mask
*/
m8xx.spim = 0;
if (softc_ptr->initialized) {
rtems_semaphore_release(softc_ptr->irq_sema_id);
- }
+ }
}
static void
@@ -259,7 +259,7 @@ static void m8xx_spi_install_irq_handler
*/
rc = rtems_semaphore_create(rtems_build_name('s','p','i','s'),
0,
- RTEMS_FIFO
+ RTEMS_FIFO
| RTEMS_SIMPLE_BINARY_SEMAPHORE,
0,
&softc_ptr->irq_sema_id);
@@ -280,7 +280,7 @@ static void m8xx_spi_install_irq_handler
}
}
}
-
+
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
@@ -301,7 +301,7 @@ rtems_status_code m8xx_spi_init
{
m8xx_spi_softc_t *softc_ptr = &(((m8xx_spi_desc_t *)(bh))->softc);
rtems_status_code rc = RTEMS_SUCCESSFUL;
-
+
#if defined(DEBUG)
printk("m8xx_spi_init called... ");
#endif
@@ -311,7 +311,7 @@ rtems_status_code m8xx_spi_init
/*
* FIXME: set default mode in SPMODE
*/
-
+
/*
* allocate BDs (1x RX, 1x TX)
*/
@@ -331,7 +331,7 @@ rtems_status_code m8xx_spi_init
m8xx.spip.rfcr = M8xx_RFCR_MOT | M8xx_RFCR_DMA_SPACE(0);
m8xx.spip.tfcr = M8xx_RFCR_MOT | M8xx_RFCR_DMA_SPACE(0);
m8xx.spip.mrblr = 2;
-
+
/*
* issue "InitRxTx" Command to CP
*/
@@ -348,23 +348,23 @@ rtems_status_code m8xx_spi_init
* set up ports
* LINE PAR DIR DAT
* -----------------------
- * MOSI 1 1 x
+ * MOSI 1 1 x
* MISO 1 1 x
* CLK 1 1 x
*/
-
+
/* set Port B Pin Assignment Register... */
- m8xx.pbpar =
+ m8xx.pbpar =
m8xx.pbpar
- | M8xx_PB_SPI_MISO_MSK
- | M8xx_PB_SPI_MOSI_MSK
+ | M8xx_PB_SPI_MISO_MSK
+ | M8xx_PB_SPI_MOSI_MSK
| M8xx_PB_SPI_CLK_MSK;
-
+
/* set Port B Data Direction Register... */
- m8xx.pbdir =
- m8xx.pbdir
- | M8xx_PB_SPI_MISO_MSK
- | M8xx_PB_SPI_MOSI_MSK
+ m8xx.pbdir =
+ m8xx.pbdir
+ | M8xx_PB_SPI_MISO_MSK
+ | M8xx_PB_SPI_MOSI_MSK
| M8xx_PB_SPI_CLK_MSK;
}
/*
@@ -420,7 +420,7 @@ static int m8xx_spi_read_write_bytes
m8xx.spip.mrblr = sizeof(m8xx_spi_dummy_rxbuf);
softc_ptr->rx_bd->buffer = m8xx_spi_dummy_rxbuf;
softc_ptr->rx_bd->length = 0;
- softc_ptr->rx_bd->status = (M8xx_BD_EMPTY | M8xx_BD_WRAP |
+ softc_ptr->rx_bd->status = (M8xx_BD_EMPTY | M8xx_BD_WRAP |
M8xx_BD_CONTINUOUS);
}
else {
@@ -440,7 +440,7 @@ static int m8xx_spi_read_write_bytes
*/
softc_ptr->tx_bd->buffer = m8xx_spi_dummy_rxbuf;
softc_ptr->tx_bd->length = len;
- softc_ptr->tx_bd->status = (M8xx_BD_READY | M8xx_BD_WRAP |
+ softc_ptr->tx_bd->status = (M8xx_BD_READY | M8xx_BD_WRAP |
M8xx_BD_CONTINUOUS);
}
else {
@@ -561,7 +561,7 @@ rtems_status_code m8xx_spi_set_tfr_mode
spimode |= M8xx_SPMODE_CP;
}
}
-
+
if (rc == RTEMS_SUCCESSFUL) {
/*
* disable SPI
@@ -600,12 +600,12 @@ int m8xx_spi_ioctl
switch(cmd) {
case RTEMS_LIBI2C_IOCTL_SET_TFRMODE:
- ret_val =
+ ret_val =
-m8xx_spi_set_tfr_mode(bh,
(const rtems_libi2c_tfr_mode_t *)arg);
break;
case RTEMS_LIBI2C_IOCTL_READ_WRITE:
- ret_val =
+ ret_val =
m8xx_spi_read_write_bytes(bh,
((rtems_libi2c_read_write_t *)arg)->rd_buf,
((rtems_libi2c_read_write_t *)arg)->wr_buf,
@@ -650,20 +650,20 @@ static rtems_status_code bsp_spi_sel_addr
* GPIO1[24] is SPI_A0
* GPIO1[25] is SPI_A1
* GPIO1[26] is SPI_A2
- * set pins to address
+ * set pins to address
*/
switch(addr) {
case PGH360_SPI_ADDR_EEPROM:
m8xx.pbdat &= ~PGH360_PB_SPI_EEP_CE_MSK;
break;
case PGH360_SPI_ADDR_DISP4_DATA:
- m8xx.pbdat = (m8xx.pbdat
- & ~(PGH360_PB_SPI_DISP4_CE_MSK |
+ m8xx.pbdat = (m8xx.pbdat
+ & ~(PGH360_PB_SPI_DISP4_CE_MSK |
PGH360_PB_SPI_DISP4_RS_MSK));
break;
case PGH360_SPI_ADDR_DISP4_CTRL:
- m8xx.pbdat = (m8xx.pbdat
- & ~(PGH360_PB_SPI_DISP4_CE_MSK)
+ m8xx.pbdat = (m8xx.pbdat
+ & ~(PGH360_PB_SPI_DISP4_CE_MSK)
| PGH360_PB_SPI_DISP4_RS_MSK);
break;
default:
@@ -716,7 +716,7 @@ static rtems_status_code bsp_spi_send_stop
printk("bsp_spi_send_stop called... ");
#endif
#if defined(PGH360)
- m8xx.pbdat = (m8xx.pbdat
+ m8xx.pbdat = (m8xx.pbdat
| PGH360_PB_SPI_DISP4_CE_MSK
| PGH360_PB_SPI_EEP_CE_MSK);
#endif
@@ -783,7 +783,7 @@ rtems_status_code bsp_register_spi
/*
* init port pins used to address/select SPI devices
*/
-
+
#if defined(PGH360)
/*
@@ -794,24 +794,24 @@ rtems_status_code bsp_register_spi
* DISP4_CS 0 1 act-high
* DISP4_RS 0 1 active
*/
-
+
/* set Port B Pin Assignment Register... */
- m8xx.pbpar =
- (m8xx.pbpar
- & ~(PGH360_PB_SPI_EEP_CE_MSK
+ m8xx.pbpar =
+ (m8xx.pbpar
+ & ~(PGH360_PB_SPI_EEP_CE_MSK
| PGH360_PB_SPI_DISP4_CE_MSK
| PGH360_PB_SPI_DISP4_RS_MSK));
-
+
/* set Port B Data Direction Register... */
- m8xx.pbdir =
- m8xx.pbdir
- | PGH360_PB_SPI_EEP_CE_MSK
+ m8xx.pbdir =
+ m8xx.pbdir
+ | PGH360_PB_SPI_EEP_CE_MSK
| PGH360_PB_SPI_DISP4_CE_MSK
| PGH360_PB_SPI_DISP4_RS_MSK;
-
+
/* set Port B Data Register to inactive CE state */
- m8xx.pbdat =
- m8xx.pbdat
+ m8xx.pbdat =
+ m8xx.pbdat
| PGH360_PB_SPI_DISP4_CE_MSK
| PGH360_PB_SPI_DISP4_RS_MSK;
#endif
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.h b/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.h
index 28bd7f1b16..7d4f63a296 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.h
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/spi/spi.h
@@ -36,7 +36,7 @@ typedef struct m8xx_spi_softc {
} m8xx_spi_softc_t ;
typedef struct {
- rtems_libi2c_bus_t bus_desc;
+ rtems_libi2c_bus_t bus_desc;
m8xx_spi_softc_t softc;
} m8xx_spi_desc_t;
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
index 11bcf51377..20e3c3722d 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
@@ -82,7 +82,7 @@ const char *bsp_tqm_get_cib_string( const char *cib_id)
{
char srch_pattern[10] = "";
char *fnd_str;
- /*
+ /*
* create search pattern
*/
strcat(srch_pattern,"-");
@@ -164,17 +164,17 @@ void bsp_start( void)
/*
* get the (internal) bus frequency
* NOTE: the external bus may be clocked at a lower speed
- * but this does not concern the internal units like PIT,
+ * but this does not concern the internal units like PIT,
* DEC, baudrate generator etc)
*/
- if (RTEMS_SUCCESSFUL !=
+ if (RTEMS_SUCCESSFUL !=
bsp_tqm_get_cib_uint32("cu",
&BSP_bus_frequency)) {
BSP_panic("Cannot determine BUS frequency\n");
}
- bsp_clicks_per_usec = BSP_bus_frequency/1000000/16;
- bsp_timer_least_valid = 3;
+ bsp_clicks_per_usec = BSP_bus_frequency/1000000/16;
+ bsp_timer_least_valid = 3;
bsp_timer_average_overhead = 3;
/* Initialize exception handler */
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/cpuinit.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/cpuinit.c
index 23311ee2aa..acdc629f7a 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/cpuinit.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/cpuinit.c
@@ -106,7 +106,7 @@ void _InitTQM8xx (void)
* Timebase Source is GCLK2 / 16
*/
m8xx.sccrk = M8xx_UNLOCK_KEY; /* unlock SCCR */
- m8xx.sccr |= 0x02000000;
+ m8xx.sccr |= 0x02000000;
/* Unlock the timebase and decrementer registers. */
m8xx.tbk = M8xx_UNLOCK_KEY;
@@ -124,7 +124,7 @@ void _InitTQM8xx (void)
_mtspr( M8xx_TBL_WR, r1 );
}
/*
- * further initialization (called from bsp_start)
+ * further initialization (called from bsp_start)
*/
void cpu_init(void)
{
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/mmutlbtab.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/mmutlbtab.c
index 6dc3aea712..dcfc0c3495 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/mmutlbtab.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/mmutlbtab.c
@@ -88,7 +88,7 @@ MMU_TLB_table_t MMU_TLB_table[] = {
{ 0xFA200200, 0x13, 0xFA2009FF }, /* IMMR - PS=16K */
/*
*
- * Flash: Start address 0x40000000, 8M,
+ * Flash: Start address 0x40000000, 8M,
* ASID=0x0, APG=0x0, not guarded memory,
* R/O,X for all, no ASID comparison, not cache-inhibited.
* EPN TWC RPN
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/start.S b/c/src/lib/libbsp/powerpc/tqm8xx/startup/start.S
index d94817d597..950730dc5c 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/start.S
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/start.S
@@ -17,21 +17,21 @@
| this file contains the startup assembly code |
| it is based on the gen83xx BSP |
\*===============================================================*/
-/* $Id$ */
+/* $Id$ */
-#include <libcpu/powerpc-utility.h>
+#include <libcpu/powerpc-utility.h>
#include <rtems/powerpc/cache.h>
#include <bsp.h>
#include <mpc8xx.h>
.extern boot_card
-.section ".entry"
+.section ".entry"
PUBLIC_VAR (start)
start:
/*
- * basic CPU setup:
+ * basic CPU setup:
* init MSR
*/
mfmsr r30
@@ -50,7 +50,7 @@ start:
start_1:
mflr r20
LA r30,start_1
- sub. r20,r20,r30
+ sub. r20,r20,r30
/*
* execution address offset == 0?
* then do not relocate code and data
@@ -60,51 +60,51 @@ start_1:
* ROM or relocatable startup: copy startup code to SDRAM
*/
/* get start address of text section in RAM */
- LA r29, bsp_section_text_start
+ LA r29, bsp_section_text_start
/* get start address of text section in ROM (add reloc offset) */
- add r30, r20, r29
+ add r30, r20, r29
/* get size of startup code */
LA r28, end_reloc_startup
LA r31, bsp_section_text_start
sub 28,r28,r31
/* copy startup code from ROM to RAM location */
- bl copy_image
-
+ bl copy_image
+
/*
* jump to code copy in SDRAM
*/
/* get compile time address of label */
- LA r29, copy_rest_of_text
+ LA r29, copy_rest_of_text
mtlr r29
blr /* now further execution RAM */
-copy_rest_of_text:
+copy_rest_of_text:
/*
* ROM or relocatable startup: copy rest of code to SDRAM
*/
/* get start address of rest of code in RAM */
LA r29, end_reloc_startup
/* get start address of text section in ROM (add reloc offset) */
- add r30, r20, r29
+ add r30, r20, r29
/* get size of rest of code */
LA r28, bsp_section_text_start
LA r31, bsp_section_text_size
add r28,r28,r31
sub r28,r28,r29
bl copy_image /* copy text section from ROM to RAM location */
-
+
/*
* ROM or relocatable startup: copy data to SDRAM
*/
/* get start address of data section in RAM */
- LA r29, bsp_section_data_start
+ LA r29, bsp_section_data_start
/* get start address of data section in ROM (add reloc offset) */
- add r30, r20, r29
+ add r30, r20, r29
/* get size of RAM image */
- LA r28, bsp_section_data_size
+ LA r28, bsp_section_data_size
/* copy initialized data section from ROM to RAM location */
- bl copy_image
+ bl copy_image
-start_code_in_ram:
+start_code_in_ram:
/*
* ROM/RAM startup: clear bss in SDRAM
@@ -117,8 +117,8 @@ start_code_in_ram:
*/
/* Set stack pointer (common for RAM/ROM startup) */
- LA r1, bsp_section_text_start
- addi r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
+ LA r1, bsp_section_text_start
+ addi r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
/* Create NULL */
li r0, 0
@@ -139,19 +139,19 @@ start_code_in_ram:
* init some CPU stuff
*/
bl SYM (_InitTQM8xx)
-
+
/* clear arguments and do further init. in C (common for RAM/ROM startup) */
/* Clear cmdline */
xor r3, r3, r3
bl SYM (boot_card) /* Call the first C routine */
-
+
twiddle:
/* We don't expect to return from boot_card but if we do */
/* wait here for watchdog to kick us into hard reset */
- b twiddle
-
+ b twiddle
+
copy_with_watchdog:
addi r5,r5,16
rlwinm. r5,r5,28,4,31
@@ -200,7 +200,7 @@ copy_image_4word:
stw r21, 4(r29)
stw r22, 8(r29)
stw r23,12(r29)
-
+
addi r30, r30, 0x10 /* increment source pointer */
addi r29, r29, 0x10 /* increment destination pointer */
/*
@@ -208,7 +208,7 @@ copy_image_4word:
*/
sth r25,14(r26)
sth r24,14(r26)
-
+
bdnz copy_image_4word /* decrement ctr and branch if not 0 */
cmpwi r27, 0x00 /* copy image finished ? */
@@ -216,19 +216,19 @@ copy_image_4word:
mtctr r27 /* reload counter for residual bytes */
copy_image_byte:
lswi r28, r30, 0x01
-
+
stswi r28, r29, 0x01 /* do byte copy ROM -> RAM */
-
-
+
+
addi r30, r30, 0x01 /* increment source pointer */
addi r29, r29, 0x01 /* increment destination pointer */
-
+
bdnz copy_image_byte /* decrement ctr and branch if not 0 */
-
+
copy_image_end:
blr
-
+
/**
* @fn int mpc8xx_zero_4( void *dest, size_t n)
*
@@ -278,7 +278,7 @@ mpc8xx_zero_4_tail:
stwx r0, r3, r8
addi r8, r8, 16
bdnz mpc8xx_zero_4_tail
-
+
/* Return */
blr
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/timer/timer.c b/c/src/lib/libbsp/powerpc/tqm8xx/timer/timer.c
index 276fff340c..b38feec17f 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/timer/timer.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/timer/timer.c
@@ -27,7 +27,7 @@
*
* this is derived from "timer.c" available in the m68k/gen68360 BSP
* adapted by Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
- *
+ *
* $Id$
*/
diff --git a/c/src/lib/libbsp/powerpc/virtex/dlentry/dlentry.S b/c/src/lib/libbsp/powerpc/virtex/dlentry/dlentry.S
index 79f7d29201..1b66af4d90 100644
--- a/c/src/lib/libbsp/powerpc/virtex/dlentry/dlentry.S
+++ b/c/src/lib/libbsp/powerpc/virtex/dlentry/dlentry.S
@@ -41,7 +41,7 @@
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these errors.
-
+
/*
* The virtex ELF link scripts support three special sections:
* .entry The actual entry point
@@ -116,7 +116,7 @@ text_length:
lis r2,__vectors@h /* set EVPR exc. vector prefix */
#else
lis r2,0
-#endif
+#endif
mtspr evpr,r2
/*-------------------------------------------------------------------
diff --git a/c/src/lib/libbsp/powerpc/virtex/include/opbintctrl.h b/c/src/lib/libbsp/powerpc/virtex/include/opbintctrl.h
index f4a1c39bbc..587f467d72 100644
--- a/c/src/lib/libbsp/powerpc/virtex/include/opbintctrl.h
+++ b/c/src/lib/libbsp/powerpc/virtex/include/opbintctrl.h
@@ -82,7 +82,7 @@ extern "C" {
* activate the interrupt controller
*/
rtems_status_code opb_intc_init(void);
-
+
#ifdef __cplusplus
}
#endif
diff --git a/c/src/lib/libbsp/powerpc/virtex/include/xparameters_dflt.h b/c/src/lib/libbsp/powerpc/virtex/include/xparameters_dflt.h
index 6dc91751e0..ca136c2525 100644
--- a/c/src/lib/libbsp/powerpc/virtex/include/xparameters_dflt.h
+++ b/c/src/lib/libbsp/powerpc/virtex/include/xparameters_dflt.h
@@ -5,8 +5,8 @@
* Version: Xilinx EDK 8.2.02 EDK_Im_Sp2.4
* DO NOT EDIT.
*
-* Copyright (c) 2005 Xilinx, Inc. All rights reserved.
-*
+* Copyright (c) 2005 Xilinx, Inc. All rights reserved.
+*
* Description: Driver parameters
*
*******************************************************************/
diff --git a/c/src/lib/libbsp/powerpc/virtex/irq/irq.h b/c/src/lib/libbsp/powerpc/virtex/irq/irq.h
index b9a4413495..f8d6eae7ce 100644
--- a/c/src/lib/libbsp/powerpc/virtex/irq/irq.h
+++ b/c/src/lib/libbsp/powerpc/virtex/irq/irq.h
@@ -23,7 +23,7 @@
#include <bsp/opbintctrl.h>
/*
- * the following definitions specify the indices used
+ * the following definitions specify the indices used
* to interface the interrupt handler API
*/
@@ -70,8 +70,8 @@ extern "C" {
*/
typedef enum {
BSP_OPBINTC_IRQ_FIRST = BSP_OPBINTC_IRQ_LOWEST_OFFSET,
- /*
- * Note: for this BSP, the peripheral names are derived
+ /*
+ * Note: for this BSP, the peripheral names are derived
* from the Xilinx parameter file
*/
BSP_OPBINTC_IRQ_LAST = BSP_OPBINTC_IRQ_MAX_OFFSET,
diff --git a/c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c b/c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c
index a4a8991599..0352683cea 100644
--- a/c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c
+++ b/c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c
@@ -101,7 +101,7 @@ int C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum)
#if 0 /* We now let the clock driver hook the exception directly */
case ASM_BOOKE_DEC_VECTOR:
BSP_rtems_irq_tbl[BSP_PIT].hdl
- (BSP_rtems_irq_tbl[BSP_PIT].handle);
+ (BSP_rtems_irq_tbl[BSP_PIT].handle);
break;
#endif
#if 0 /* Critical interrupts not yet supported */
@@ -111,7 +111,7 @@ int C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum)
}
return 0;
}
-
+
/***********************************************************
* functions to set/get/remove interrupt handlers
***********************************************************/
@@ -166,7 +166,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* irq)
{
rtems_interrupt_level level;
-
+
/*
* check for valid IRQ name
*/
@@ -185,7 +185,7 @@ int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* irq)
int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
{
rtems_interrupt_level level;
-
+
/*
* check for valid IRQ name
*/
@@ -268,7 +268,7 @@ int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
/*
* store any irq-like processor exceptions
*/
- for (i = BSP_PROCESSOR_IRQ_LOWEST_OFFSET;
+ for (i = BSP_PROCESSOR_IRQ_LOWEST_OFFSET;
i < BSP_PROCESSOR_IRQ_MAX_OFFSET;
i++) {
if (BSP_rtems_irq_tbl[i].hdl != config->defaultEntry.hdl) {
@@ -290,7 +290,7 @@ int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
/*
* dummy for an empty IRQ handler entry
- */
+ */
static rtems_irq_connect_data emptyIrq = {
0, /* Irq Name */
BSP_irq_nop_hdl, /* handler function */
@@ -342,6 +342,6 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
*/
if (!BSP_rtems_irq_mngt_set(&initialConfig)) {
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
- }
+ }
}
diff --git a/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.c b/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.c
index c4578d452c..9307a68415 100644
--- a/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.c
+++ b/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.c
@@ -96,14 +96,14 @@ void xilTemacFifoRead64(uint32_t aBaseAddr, uint32_t* aBuf, uint32_t aBytes)
uint32_t xtrabytes = aBytes % 8;
uint32_t i;
- for(i = 0; i < numqwords; i++)
+ for(i = 0; i < numqwords; i++)
{
aBuf[ (i*2) ] = IN32(aBaseAddr + XTE_PFIFO_RX_DATA_OFFSET);
aBuf[ (i*2)+1 ] = IN32(aBaseAddr + XTE_PFIFO_RX_DATA_OFFSET + 4);
}
/* If there was a non qword sized read */
- if( xtrabytes != 0 )
+ if( xtrabytes != 0 )
{
uint32_t lastdwordMS = IN32(aBaseAddr + XTE_PFIFO_RX_DATA_OFFSET);
uint32_t lastdwordLS = IN32(aBaseAddr + XTE_PFIFO_RX_DATA_OFFSET + 4);
@@ -236,17 +236,17 @@ void xilTemacStart(struct ifnet *ifp)
/* Reset plb temac */
OUT32(base + XTE_DSR_OFFSET, XTE_DSR_RESET_MASK);
- /* Don't have usleep on rtems 4.6
+ /* Don't have usleep on rtems 4.6
usleep(1);
*/
/* @ fastest ppc clock of 500 MHz = 2ns clk */
uint32_t i = 0;
for( i = 0; i < 1 * 500; i++) {
}
-
+
/* Reset hard temac */
OUT32(base + XTE_CR_OFFSET, XTE_CR_HTRST_MASK);
- /* Don't have usleep on rtems 4.6
+ /* Don't have usleep on rtems 4.6
usleep(4);
*/
for( i = 0; i < 4 * 500; i++) {
@@ -291,7 +291,7 @@ void xilTemacStart(struct ifnet *ifp)
rtems_status_code sc;
extern rtems_isr xilTemacIsr( rtems_vector_number aVector );
sc = opb_intc_set_vector( xilTemacIsr, xilTemac->iIsrVector, &xilTemac->iOldHandler );
- if( sc != RTEMS_SUCCESSFUL )
+ if( sc != RTEMS_SUCCESSFUL )
{
xilTemac->iOldHandler = 0;
printk("%s: Could not set interrupt vector for interface '%s' opb_intc_set_vector ret: %d\n", DRIVER_PREFIX, xilTemac->iUnitName, sc );
@@ -351,7 +351,7 @@ void xilTemacStart(struct ifnet *ifp)
printk("%s: xiltemacStart, ipier: %08x\n",DRIVER_PREFIX, ipier);
/* Enable device global interrutps */
- OUT32(base + XTE_DGIE_OFFSET, XTE_DGIE_ENABLE_MASK);
+ OUT32(base + XTE_DGIE_OFFSET, XTE_DGIE_ENABLE_MASK);
ifp->if_flags |= IFF_RUNNING;
}
}
@@ -362,7 +362,7 @@ void xilTemacInit( void *voidptr )
void xilTemacReset(struct ifnet *ifp)
{
- xilTemacStop( ifp );
+ xilTemacStop( ifp );
xilTemacStart( ifp );
}
@@ -405,7 +405,7 @@ void xilTemacPrintStats( struct ifnet *ifp )
printf("%s:Rx Rej Length Fifo Full: %lu\n", DRIVER_PREFIX, xilTemac->iStats.iRxRejectedLengthFifoFull);
printf("%s: Rx Stray Events: %lu\n", DRIVER_PREFIX, xilTemac->iStats.iRxStrayEvents);
printf("%s: Rx Max Drained: %lu\n", DRIVER_PREFIX, xilTemac->iStats.iRxMaxDrained);
- printf("%s: Tx Interrupts: %lu\n", DRIVER_PREFIX, xilTemac->iStats.iTxInterrupts);
+ printf("%s: Tx Interrupts: %lu\n", DRIVER_PREFIX, xilTemac->iStats.iTxInterrupts);
printf("%s: Tx Max Drained: %lu\n", DRIVER_PREFIX, xilTemac->iStats.iTxMaxDrained);
printf("\n");
@@ -423,7 +423,7 @@ void xilTemacIsrSingle(struct XilTemac* xilTemac)
/*assert(0);*/
} else {
/* Handle all error conditions first */
- if( disr & (XTE_DXR_DPTO_MASK | XTE_DXR_TERR_MASK |
+ if( disr & (XTE_DXR_DPTO_MASK | XTE_DXR_TERR_MASK |
XTE_DXR_RECV_FIFO_MASK | XTE_DXR_SEND_FIFO_MASK) ) {
printk("%s: Fatal Bus error, disr: %08x\n", DRIVER_PREFIX, disr);
/*assert(0);*/
@@ -443,11 +443,11 @@ void xilTemacIsrSingle(struct XilTemac* xilTemac)
}
if(pending & XTE_IPXR_RECV_DONE_MASK) {
- /* We've received a packet
+ /* We've received a packet
- inc stats
- disable rx interrupt
- - signal rx thread to empty out fifo
- (rx thread must renable interrupt)
+ - signal rx thread to empty out fifo
+ (rx thread must renable interrupt)
*/
xilTemac->iStats.iRxInterrupts++;
@@ -458,22 +458,22 @@ void xilTemacIsrSingle(struct XilTemac* xilTemac)
if(pending & XTE_IPXR_XMIT_DONE_MASK) {
/* We've transmitted a packet. This interrupt is only ever enabled in
the ipier if the tx thread didn't have enough space in the data fifo
- or the tplr fifo. If that's the case, we:
+ or the tplr fifo. If that's the case, we:
- inc stats
- disable tx interrupt
- signal tx thread that a transmit has completed and thus there is now
- room to send again.
+ room to send again.
*/
xilTemac->iStats.iTxInterrupts++;
newipier &= ~XTE_IPXR_XMIT_DONE_MASK;
- rtems_event_send(gXilTxThread, xilTemac->iIoEvent);
+ rtems_event_send(gXilTxThread, xilTemac->iIoEvent);
}
if(pending & XTE_IPXR_RECV_DROPPED_MASK) {
/* A packet was dropped (because it was invalid, or receiving it
- have overflowed one of the rx fifo's).
- - Increment stats.
+ have overflowed one of the rx fifo's).
+ - Increment stats.
- Clear interrupt condition.
*/
uint32_t toggle = 0;
@@ -493,7 +493,7 @@ void xilTemacIsrSingle(struct XilTemac* xilTemac)
OUT32(base + XTE_IPISR_OFFSET, toggle);
}
if(pending & XTE_IPXR_AUTO_NEG_MASK) {
- printk("%s: Autonegotiation finished\n", DRIVER_PREFIX);
+ printk("%s: Autonegotiation finished\n", DRIVER_PREFIX);
OUT32(base + XTE_IPISR_OFFSET, XTE_IPXR_AUTO_NEG_MASK);
}
if(newipier != ipier) {
@@ -502,7 +502,7 @@ void xilTemacIsrSingle(struct XilTemac* xilTemac)
}
}
}
-
+
#if PPC_HAS_CLASSIC_EXCEPTIONS
rtems_isr xilTemacIsr( rtems_vector_number aVector )
{
@@ -549,7 +549,7 @@ int xilTemacIoctl(struct ifnet* ifp, ioctl_command_t aCommand, caddr_t aData)
{
struct XilTemac* xilTemac = ifp->if_softc;
int32_t error = 0;
-
+
switch(aCommand) {
case SIOCGIFADDR:
case SIOCSIFADDR:
@@ -557,7 +557,7 @@ int xilTemacIoctl(struct ifnet* ifp, ioctl_command_t aCommand, caddr_t aData)
break;
case SIOCSIFFLAGS:
- switch(ifp->if_flags & (IFF_UP | IFF_RUNNING))
+ switch(ifp->if_flags & (IFF_UP | IFF_RUNNING))
{
case IFF_RUNNING:
xilTemacStop(ifp);
@@ -579,12 +579,12 @@ int xilTemacIoctl(struct ifnet* ifp, ioctl_command_t aCommand, caddr_t aData)
case SIOCADDMULTI:
case SIOCDELMULTI: {
struct ifreq* ifr = (struct ifreq*) aData;
- error = ((aCommand == SIOCADDMULTI) ?
- ( ether_addmulti(ifr, &(xilTemac->iArpcom)) ) :
- ( ether_delmulti(ifr, &(xilTemac->iArpcom)))
+ error = ((aCommand == SIOCADDMULTI) ?
+ ( ether_addmulti(ifr, &(xilTemac->iArpcom)) ) :
+ ( ether_delmulti(ifr, &(xilTemac->iArpcom)))
);
/* ENETRESET indicates that driver should update its multicast filters */
- if(error == ENETRESET)
+ if(error == ENETRESET)
{
error = xilTemacSetMulticastFilter( ifp );
}
@@ -601,7 +601,7 @@ int xilTemacIoctl(struct ifnet* ifp, ioctl_command_t aCommand, caddr_t aData)
}
return error;
}
-
+
void xilTemacSend(struct ifnet* ifp)
{
struct XilTemac* xilTemac = ifp->if_softc;
@@ -633,14 +633,14 @@ void xilTemacSendPacket(struct ifnet *ifp, struct mbuf* aMbuf)
uint32_t i = 0;
printk("MBUF: 0x%08x : ", (int32_t) n->m_data);
for (i=0;i<n->m_len;i+=2) {
- printk("%02x%02x ", mtod(n, unsigned char*)[i], mtod(n, unsigned char*)[i+1]);
+ printk("%02x%02x ", mtod(n, unsigned char*)[i], mtod(n, unsigned char*)[i+1]);
}
printk("\n");
#endif
if( n->m_len > 0 ) {
- memcpy( &gTxBuf[ len ], (char *)n->m_data, n->m_len);
- len += n->m_len;
+ memcpy( &gTxBuf[ len ], (char *)n->m_data, n->m_len);
+ len += n->m_len;
}
if( (n = n->m_next) == 0) {
break;
@@ -664,7 +664,7 @@ void xilTemacTxThreadSingle(struct ifnet* ifp)
struct XilTemac* xilTemac = ifp->if_softc;
struct mbuf* m;
uint32_t base = xilTemac->iAddr;
-
+
#ifdef DEBUG
printk("%s: tx send packet, interface '%s'\n", DRIVER_PREFIX, xilTemac->iUnitName );
#endif
@@ -719,7 +719,7 @@ void xilTemacTxThread( void *ignore )
for(;;) {
/* Wait for:
- - notification from stack of packet to send OR
+ - notification from stack of packet to send OR
- notification from interrupt handler that there is space available to
send already queued packets
*/
@@ -741,7 +741,7 @@ void xilTemacTxThread( void *ignore )
}
} else {
- printk("%s: xilTemacTxThread: event received for device: %s, but device not active\n",
+ printk("%s: xilTemacTxThread: event received for device: %s, but device not active\n",
DRIVER_PREFIX, xilTemac->iUnitName);
assert(0);
}
@@ -800,7 +800,7 @@ void xilTemacRxThreadSingle(struct ifnet* ifp)
* there's no more packets, this will turn it off.
*/
OUT32(base + XTE_IPISR_OFFSET, XTE_IPXR_RECV_DONE_MASK);
- }
+ }
/* End) All Rx packets serviced, renable rx interrupt */
uint32_t ipier = IN32(base + XTE_IPIER_OFFSET);
@@ -821,14 +821,14 @@ void xilTemacRxThreadSingle(struct ifnet* ifp)
* bad happens, as long as we don't read from the rx fifo's if nothing is
* there. It is just not as efficient as possible (rx thread being evented
* pointlessly) and a bit disconcerting about how it's ocurring.
- * The best way to reproduce this is to have two clients run:
- * $ ping <host> -f -s 65507
+ * The best way to reproduce this is to have two clients run:
+ * $ ping <host> -f -s 65507
* This flood pings the device from two clients with the maximum size ping
* packet. It absolutely hammers the device under test. Eventually, (if
* you leave it running overnight for instance), you'll get a couple of these
* stray rx events. */
if(npkts == 0) {
- /*printk("%s: RxThreadSingle: fatal error: event received, but no packets available\n", DRIVER_PREFIX);
+ /*printk("%s: RxThreadSingle: fatal error: event received, but no packets available\n", DRIVER_PREFIX);
assert(0); */
xilTemac->iStats.iRxStrayEvents++;
}
@@ -846,9 +846,9 @@ void xilTemacRxThread( void *ignore )
#endif
for(;;) {
- rtems_bsdnet_event_receive( RTEMS_ALL_EVENTS,
+ rtems_bsdnet_event_receive( RTEMS_ALL_EVENTS,
RTEMS_WAIT | RTEMS_EVENT_ANY,
- RTEMS_NO_TIMEOUT,
+ RTEMS_NO_TIMEOUT,
&events);
#ifdef DEBUG
@@ -884,7 +884,7 @@ int32_t xilTemac_driver_attach(struct rtems_bsdnet_ifconfig* aBsdConfig, int aDu
struct XilTemac* xilTemac;
unit = rtems_bsdnet_parse_driver_name(aBsdConfig, &unitName);
- if(unit < 0 )
+ if(unit < 0 )
{
printk("%s: Interface Unit number < 0\n", DRIVER_PREFIX );
return 0;
@@ -896,7 +896,7 @@ int32_t xilTemac_driver_attach(struct rtems_bsdnet_ifconfig* aBsdConfig, int aDu
return 0;
}
- if( aBsdConfig->hardware_address == NULL )
+ if( aBsdConfig->hardware_address == NULL )
{
printk("%s: No MAC address given for interface '%s'\n", DRIVER_PREFIX, unitName );
return 0;
@@ -917,11 +917,11 @@ int32_t xilTemac_driver_attach(struct rtems_bsdnet_ifconfig* aBsdConfig, int aDu
memcpy( xilTemac->iArpcom.ac_enaddr, aBsdConfig->hardware_address, ETHER_ADDR_LEN);
- if( aBsdConfig->mtu )
+ if( aBsdConfig->mtu )
{
mtu = aBsdConfig->mtu;
- }
- else
+ }
+ else
{
mtu = ETHERMTU;
}
@@ -937,7 +937,7 @@ int32_t xilTemac_driver_attach(struct rtems_bsdnet_ifconfig* aBsdConfig, int aDu
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
- if(ifp->if_snd.ifq_maxlen == 0)
+ if(ifp->if_snd.ifq_maxlen == 0)
{
ifp->if_snd.ifq_maxlen = ifqmaxlen;
}
@@ -946,7 +946,7 @@ int32_t xilTemac_driver_attach(struct rtems_bsdnet_ifconfig* aBsdConfig, int aDu
ether_ifattach(ifp);
/* create shared rx & tx threads */
- if( (gXilRxThread == 0) && (gXilTxThread == 0) )
+ if( (gXilRxThread == 0) && (gXilTxThread == 0) )
{
printk("%s: Creating shared RX/TX threads\n", DRIVER_PREFIX );
gXilRxThread = rtems_bsdnet_newproc("xerx", 4096, xilTemacRxThread, NULL );
@@ -954,7 +954,7 @@ int32_t xilTemac_driver_attach(struct rtems_bsdnet_ifconfig* aBsdConfig, int aDu
}
printk("%s: Initializing driver for '%s'\n", DRIVER_PREFIX, xilTemac->iUnitName );
-
+
printk("%s: base address 0x%08X, intnum 0x%02X, \n",
DRIVER_PREFIX,
aBsdConfig->bpar,
diff --git a/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.h b/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.h
index 6a0c821b01..177d67b02a 100644
--- a/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.h
+++ b/c/src/lib/libbsp/powerpc/virtex/network/xiltemac.h
@@ -31,13 +31,13 @@
#define XTE_IPIER_OFFSET 0x00000028 /**< IP interrupt enable */
#define XTE_DSR_OFFSET 0x00000040 /**< Device software reset (write) */
-/** IPIF transmit fifo
+/** IPIF transmit fifo
*/
#define XTE_PFIFO_TX_BASE_OFFSET 0x00002000 /**< Packet FIFO Tx channel */
#define XTE_PFIFO_TX_VACANCY_OFFSET 0x00002004 /**< Packet Fifo Tx Vacancy */
#define XTE_PFIFO_TX_DATA_OFFSET 0x00002100 /**< IPIF Tx packet fifo port */
-/** IPIF receive fifo
+/** IPIF receive fifo
*/
#define XTE_PFIFO_RX_BASE_OFFSET 0x00002010 /**< Packet FIFO Rx channel */
#define XTE_PFIFO_RX_VACANCY_OFFSET 0x00002014 /**< Packet Fifo Rx Vacancy */
@@ -45,7 +45,7 @@
/** IPIF fifo masks
*/
-#define XTE_PFIFO_COUNT_MASK 0x00FFFFFF
+#define XTE_PFIFO_COUNT_MASK 0x00FFFFFF
/** IPIF transmit and recieve DMA offsets
*/
@@ -332,7 +332,7 @@
#define XTE_EMIID_MIIMDECADDR_MASK 0x0000FFFF /**< Address port */
-struct XilTemacStats
+struct XilTemacStats
{
volatile uint32_t iInterrupts;
diff --git a/c/src/lib/libbsp/powerpc/virtex/opbintctrl/opbintctrl.c b/c/src/lib/libbsp/powerpc/virtex/opbintctrl/opbintctrl.c
index 0c47e9b7fe..cc59aae857 100644
--- a/c/src/lib/libbsp/powerpc/virtex/opbintctrl/opbintctrl.c
+++ b/c/src/lib/libbsp/powerpc/virtex/opbintctrl/opbintctrl.c
@@ -45,7 +45,7 @@ RTEMS_INLINE_ROUTINE uint32_t get_ipr(void)
void BSP_irq_enable_at_opbintc (rtems_irq_number irqnum)
{
- *((volatile uint32_t *) (OPB_INTC_BASE + OPB_INTC_SIE))
+ *((volatile uint32_t *) (OPB_INTC_BASE + OPB_INTC_SIE))
= 1 << (irqnum - BSP_OPBINTC_IRQ_LOWEST_OFFSET);
}
@@ -67,9 +67,9 @@ void BSP_irq_handle_at_opbintc(void)
c = 0;
mask = 0;
- for (i = 0;
- (i < BSP_OPBINTC_PER_IRQ_NUMBER)
- && (ipr != 0);
+ for (i = 0;
+ (i < BSP_OPBINTC_PER_IRQ_NUMBER)
+ && (ipr != 0);
i++) {
c = (1 << i);
diff --git a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c
index 72296ab8c1..5076a7c4f8 100644
--- a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c
@@ -111,8 +111,8 @@ void bsp_start( void )
ppc_cpu_revision_t myCpuRevision;
/*
- * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
- * function store the result in global variables
+ * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
+ * function store the result in global variables
* so that it can be used latter...
*/
myCpu = get_ppc_cpu_type();
@@ -134,7 +134,7 @@ void bsp_start( void )
bsp_timer_least_valid = 3;
/*
- * Initialize default raw exception handlers.
+ * Initialize default raw exception handlers.
*/
sc = ppc_exc_initialize(
PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
diff --git a/c/src/lib/libbsp/shared/umon/cli.h b/c/src/lib/libbsp/shared/umon/cli.h
index 6384816b1b..cedb295efe 100644
--- a/c/src/lib/libbsp/shared/umon/cli.h
+++ b/c/src/lib/libbsp/shared/umon/cli.h
@@ -68,7 +68,7 @@ struct monCommand {
* reason. The docommand() function does not print a message here, it
* is assumed that the error message was printed by the local function.
* CMD_PARAM_ERROR:
- * Command line did not parse properly. Control was passed to a
+ * Command line did not parse properly. Control was passed to a
* local command function, but argument syntax caused it to choke.
* In this case docommand() will print out the generic CLI syntax error
* message.
@@ -96,7 +96,7 @@ struct monCommand {
#define CMD_MONRC_DENIED -6
/* Notes on help text array:
- * The monitor's CLI processor assumes that every command's help text
+ * The monitor's CLI processor assumes that every command's help text
* array abides by a few basic rules...
* First of all, it assumes that every array has AT LEAST two strings.
* The first string in the array of strings is assumed to be a one-line
diff --git a/c/src/lib/libbsp/shared/umon/monlib.c b/c/src/lib/libbsp/shared/umon/monlib.c
index f43390f0a2..0e315d15c9 100644
--- a/c/src/lib/libbsp/shared/umon/monlib.c
+++ b/c/src/lib/libbsp/shared/umon/monlib.c
@@ -3,7 +3,7 @@
* the application. It is built with (but not linked with) the monitor,
* then the monlib.o file is linked with the application.
* The only requirement on the application is that it know where the address
- * of the monCom function is in the monitor's space.
+ * of the monCom function is in the monitor's space.
* The monCom function will be accessible in some "well-known" way (processor
* and platform dependent) so that this will not be a problem.
*
@@ -132,7 +132,7 @@ static int (*_moncom)(int,void *,void *, void *);
* is to be used, then simply redefine them here. Refer to the monitor
* app note that discusses multi-tasking access to the monitor API for more
* information.
- *
+ *
* TFS_MONLOCK/UNLOCK:
* Lock/unlock for functions that access TFS flash space:
*/
@@ -158,7 +158,7 @@ static int (*_moncom)(int,void *,void *, void *);
#define HEAP_MONUNLOCK monUnlock
/* BLOCKING_MONLOCK/UNLOCK:
- * Lock/unlock for functions in the monitor that block waiting for
+ * Lock/unlock for functions in the monitor that block waiting for
* console input.
*/
#define BLOCKING_MONLOCK monLock
@@ -182,7 +182,7 @@ static int (*_moncom)(int,void *,void *, void *);
* know it.
* lock: Points to a function in the application code that will be
* used by the monitor as a lock-out function (some kind of
- * semaphore in the application).
+ * semaphore in the application).
* unlock: Points to a function in the application code that will be
* used by the monitor as an un-lock-out function (undo whatever
* lock-out mechanism was done by lock).
@@ -288,7 +288,7 @@ monConnect(int (*mon)(int,void *,void *,void *),
* is already active, so when the function tries to call some other mon_xxx
* function it won't be able to because of the lock already being set.
*
- * With these functions in the application space, the user can do the
+ * With these functions in the application space, the user can do the
* following:
* call %DisableLock
* call %Func_with_monXXX_in_it
@@ -319,7 +319,7 @@ EnableMonLock(void)
* These functions must test both the function pointer and the state
* of the ignorelock variable. The function DisableMonLock() sets the
* ignorelock variable to 2 because it is being executed through "call"
- * which means that the lock is active.
+ * which means that the lock is active.
*/
static void
monLock(void)
@@ -358,7 +358,7 @@ int
mon_com(int cmd, void *arg1, void *arg2, void *arg3)
{
int ret;
-
+
GENERIC_MONLOCK();
ret = _moncom(cmd,arg1,arg2,arg3);
GENERIC_MONUNLOCK();
@@ -369,7 +369,7 @@ int
mon_putchar(char c)
{
int ret;
-
+
CONSOLE_MONLOCK();
ret = _rputchar(c);
CONSOLE_MONUNLOCK();
diff --git a/c/src/lib/libbsp/shared/umon/tfs.h b/c/src/lib/libbsp/shared/umon/tfs.h
index f83d518237..9f8aa9804c 100644
--- a/c/src/lib/libbsp/shared/umon/tfs.h
+++ b/c/src/lib/libbsp/shared/umon/tfs.h
@@ -1,6 +1,6 @@
/* tfs.h:
* Header file for TFS transactions, used by both application and monitor.
- *
+ *
* General notice:
* This code is part of a boot-monitor package developed as a generic base
* platform for embedded system designs. As such, it is likely to be
@@ -62,8 +62,8 @@
#define TFS_ULVL2 0x00000400 /* '2' level 2 */
#define TFS_ULVL3 0x00000600 /* '3' level 3 */
#define TFS_NSTALE 0x00000800 /* File is NOT stale, invisible to user.
- * When this bit is clear, the file is
- * considered stale (see notes in tfsadd()).
+ * When this bit is clear, the file is
+ * considered stale (see notes in tfsadd()).
* See notes in tfsclose() for this.
*/
#define TFS_ACTIVE 0x00008000 /* Used to indicate that file is not deleted. */
diff --git a/c/src/lib/libbsp/shared/umon/umoncons.c b/c/src/lib/libbsp/shared/umon/umoncons.c
index 408eb5cd6d..9ccde1d2a2 100644
--- a/c/src/lib/libbsp/shared/umon/umoncons.c
+++ b/c/src/lib/libbsp/shared/umon/umoncons.c
@@ -28,8 +28,8 @@ static void umoncons_write_polled(int minor, char c);
static int umoncons_set_attributes(int minor, const struct termios *t);
/* Pointers to functions for handling the UART. */
-console_fns umoncons_fns =
-{
+console_fns umoncons_fns =
+{
libchip_serial_default_probe,
umoncons_first_open,
umoncons_last_close,
@@ -45,23 +45,23 @@ console_fns umoncons_fns =
/* Functions called via callbacks (i.e. the ones in uart_fns */
/*********************************************************************/
-/*
+/*
* This is called the first time each device is opened. Since
- * the driver is polled, we don't have to do anything. If the driver
- * were interrupt driven, we'd enable interrupts here.
+ * the driver is polled, we don't have to do anything. If the driver
+ * were interrupt driven, we'd enable interrupts here.
*/
-static int umoncons_first_open(int major, int minor, void *arg)
+static int umoncons_first_open(int major, int minor, void *arg)
{
return 0;
}
-/*
+/*
* This is called the last time each device is closed. Since
- * the driver is polled, we don't have to do anything. If the driver
- * were interrupt driven, we'd disable interrupts here.
+ * the driver is polled, we don't have to do anything. If the driver
+ * were interrupt driven, we'd disable interrupts here.
*/
-static int umoncons_last_close(int major, int minor, void *arg)
+static int umoncons_last_close(int major, int minor, void *arg)
{
return 0;
}
@@ -73,7 +73,7 @@ static int umoncons_last_close(int major, int minor, void *arg)
* return -1 if there's no data, otherwise return
* the character in lowest 8 bits of returned int.
*/
-static int umoncons_read(int minor)
+static int umoncons_read(int minor)
{
if ( !mon_gotachar() )
return -1;
@@ -81,8 +81,8 @@ static int umoncons_read(int minor)
}
-/*
- * Write buffer to LCD
+/*
+ * Write buffer to LCD
*
* return 1 on success, -1 on error
*/
@@ -110,7 +110,7 @@ static void umoncons_write_polled(int minor, char c)
}
/* This is for setting baud rate, bits, etc. */
-static int umoncons_set_attributes(int minor, const struct termios *t)
+static int umoncons_set_attributes(int minor, const struct termios *t)
{
return 0;
}
@@ -121,7 +121,7 @@ static int umoncons_set_attributes(int minor, const struct termios *t)
* functions use them instead.
*/
/***********************************************************************/
-/*
+/*
* Read from UART. This is used in the exit code, and can't
* rely on interrupts.
*/
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/VME.h b/c/src/lib/libbsp/shared/vmeUniverse/VME.h
index 0d03743f19..886994bad4 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/VME.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/VME.h
@@ -4,19 +4,19 @@
/* SVGM et al. BSP's VME support */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdio.h>
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/VMEDMA.h b/c/src/lib/libbsp/shared/vmeUniverse/VMEDMA.h
index 9c56b13ca5..6e2fc94f17 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/VMEDMA.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/VMEDMA.h
@@ -5,19 +5,19 @@
/* Public interface of DMA routines */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2006, 2007
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -26,18 +26,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -46,9 +46,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdint.h>
@@ -120,7 +120,7 @@ typedef void *BSP_VMEDmaListDescriptor;
*
* 'bus_mode': one of the ...VMEDMA_OPT... choices
* listed above.
- * 'xfer_mode': VME address-modifier optionally ORed with
+ * 'xfer_mode': VME address-modifier optionally ORed with
* ...VMEDMA_MODE... bits listed above.
* 'custom': (only used if bus_mode is VMEDMA_OPT_CUSTOM)
* pointer to a list of setup parameters (chip-driver
@@ -277,7 +277,7 @@ BSP_VMEDmaListDescriptorGetUsr(BSP_VMEDmaListDescriptor d);
int
BSP_VMEDmaListRefresh(BSP_VMEDmaListDescriptor anchor);
-
+
/* Start linked-list operation.
*
* RETURNS: 0 on success, nonzero on failure
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.c b/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.c
index 80a464b9bd..ad1fc861c4 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.c
+++ b/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.c
@@ -4,19 +4,19 @@
* implementation of generic parts of the 'linked-list VME DMA' API.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2006, 2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdint.h>
#include <stdlib.h>
@@ -88,9 +88,9 @@ int i;
pc->freeList = calloc( (LCHUNK), sizeof(*pc->freeList));
if ( ! (pc->freeList) ) {
- return 0;
+ return 0;
}
-
+
/* link together and set 'class' pointer */
for (i=0; i<(LCHUNK)-1; i++) {
pc->freeList[i].n = &pc->freeList[i+1];
@@ -150,7 +150,7 @@ lfree(VMEDmaListNode d)
if ( d->p || d->n )
return -1;
d->n = d->class->freeList;
- d->class->freeList = d;
+ d->class->freeList = d;
return 0;
}
@@ -269,7 +269,7 @@ DmaDescriptorSetNxt setnxt = d->class->desc_setnxt;
}
if ( lenq(anchor, d) )
return -1;
- /* update descriptor pointers */
+ /* update descriptor pointers */
if ( anchor ) {
setnxt(d->d, d->n ? d->n->d : 0);
setnxt(anchor->d, d->d);
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.h b/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.h
index c95d866f50..25b1e9d16b 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaList.h
@@ -29,7 +29,7 @@
* BSP_VMEDmaListDescriptorNewTool(),
* BSP_VMEDmaListDescriptorSetupTool(),
*
- * and
+ * and
*
* BSP_VMEDmaListDescriptorStartTool()
*
@@ -37,19 +37,19 @@
* chosing to use bspVmeDmaList for implementing VMEDMA.h
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2006, 2007
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -58,18 +58,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -78,9 +78,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdint.h>
#include <bsp/VMEDMA.h>
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaListP.h b/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaListP.h
index e609cf7698..e32d1cd09c 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaListP.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/bspVmeDmaListP.h
@@ -12,19 +12,19 @@
* the device in an abstract manner.
*/
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2006, 2007
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -33,18 +33,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -53,9 +53,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
index 306feb3847..f3930b051b 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
@@ -2,19 +2,19 @@
/* Driver for the Tundra Tsi148 pci-vme bridge */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -23,18 +23,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -43,9 +43,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <rtems.h>
#include <stdio.h>
@@ -405,7 +405,7 @@ static Tsi148Dev devs[NUM_TSI_DEVS] = {{0}};
extern int vmeTsi148RegPort;
extern int vmeTsi148RegCSR;
-/* registers should be mapped to guarded, non-cached memory; hence
+/* registers should be mapped to guarded, non-cached memory; hence
* subsequent stores are ordered. eieio is only needed to enforce
* ordering of loads with respect to stores.
*/
@@ -421,7 +421,7 @@ va_list ap;
* to a buffer.
*/
vprintk(fmt,ap);
- } else
+ } else
{
vfprintf(f,fmt,ap);
}
@@ -524,7 +524,7 @@ uint32_t v;
/* Clear BDFAIL / (--> SYSFAIL) */
# define TSI_VSTAT_BDFAIL (1<<14)
TSI_WR(base, TSI_VSTAT_REG, TSI_RD(base, TSI_VSTAT_REG) & ~TSI_VSTAT_BDFAIL);
- /* Set (long) bus master timeout; the timeout actually overrides
+ /* Set (long) bus master timeout; the timeout actually overrides
* the DMA block size so that the DMA settings would effectively
* not be used.
* Also, we enable 'release on request' mode so that we normally
@@ -1015,14 +1015,14 @@ unsigned long tsau_reg, tat_reg, gran, skip;
break;
case VME_MODE_AS_MATCH:
- if ( outbound )
+ if ( outbound )
mode_msk = TSI_OTAT_ADMODE(-1) | TSI_OTAT_EN;
else
mode_msk = TSI_ITAT_AS(-1) | TSI_ITAT_EN;
break;
default:
- if ( outbound )
+ if ( outbound )
mode_msk = TSI_OTAT_PGM | TSI_OTAT_SUP | TSI_OTAT_ADMODE(-1) | TSI_OTAT_EN;
else
mode_msk = TSI_ITAT_PGM | TSI_ITAT_DATA | TSI_ITAT_SUP | TSI_ITAT_USR | TSI_ITAT_AS(-1) | TSI_ITAT_EN;
@@ -1059,7 +1059,7 @@ unsigned long tsau_reg, tat_reg, gran, skip;
limit += gran;
if ( !reverse ) {
- start += offst;
+ start += offst;
limit += offst;
offst = -offst;
}
@@ -1295,10 +1295,10 @@ uint32_t mode;
if ( VME_AM_IS_SHORT(as) ) {
mode |= TSI_CRGAT_A16;
- } else
+ } else
if ( VME_AM_IS_STD(as) ) {
mode |= TSI_CRGAT_A24;
- } else
+ } else
if ( VME_AM_IS_EXT(as) ) {
mode |= TSI_CRGAT_A32;
} else {
@@ -1597,7 +1597,7 @@ rtems_irq_connect_data xx;
xx.off = my_no_op;
xx.isOn = my_isOn;
xx.hdl = isr;
- xx.handle = (rtems_irq_hdl_param)slot;
+ xx.handle = (rtems_irq_hdl_param)slot;
xx.name = pic_line;
if ( shared ) {
@@ -1685,7 +1685,7 @@ unsigned long cpu_base, vme_reg_base;
pic_pin[0] = pic_pin0 < 0 ? devs[0].irqLine : pic_pin0;
i = 1;
while ( (tsi_pin[i] = va_arg(ap, int)) >= 0 ) {
-
+
if ( i >= TSI_NUM_WIRES ) {
return -5;
}
@@ -1772,7 +1772,7 @@ unsigned long cpu_base, vme_reg_base;
specialPin = tsi_pin[1] >= 0 ? 1 : 0;
/* setup routing */
-
+
/* IntRoute checks for mgr being installed */
vmeTsi148IrqMgrInstalled=1;
@@ -1944,7 +1944,7 @@ unsigned long v;
TSI_WR(base, TSI_VICR_REG, v);
return 0;
-
+
}
int
@@ -2020,7 +2020,7 @@ LoopbackTstArgs a;
if ( !vmeTsi148IntIsEnabled(level) && 0==vmeTsi148IntEnable(level) )
doDisable = 1;
-
+
/* make sure there are no pending interrupts */
TSI_WR(b, TSI_INTC_REG, TSI_INTC_IACKC);
@@ -2133,9 +2133,9 @@ vmeTsi148ClearVMEBusErrors(uint32_t *paddr)
/* descriptor must be 8-byte aligned */
typedef struct VmeTsi148DmaListDescriptorRec_ {
- BEValue dsau, dsal;
- BEValue ddau, ddal;
- BEValue dsat, ddat;
+ BEValue dsau, dsal;
+ BEValue ddau, ddal;
+ BEValue dsat, ddat;
BEValue dnlau, dnlal;
BEValue dcnt, ddbs;
} VmeTsi148DmaListDescriptorRec;
@@ -2161,7 +2161,7 @@ VMEDmaListClassRec vmeTsi148DmaListClass = {
};
/* DMA Control */
-#define TSI_DMA_REG(off,i) ((off)+(((i)&1)<<7))
+#define TSI_DMA_REG(off,i) ((off)+(((i)&1)<<7))
#define TSI_DCTL_REG(i) TSI_DMA_REG(0x500,i)
#define TSI_DCTL0_REG 0x500
@@ -2437,10 +2437,10 @@ uint32_t vmeatt, pciatt, sat, dat;
switch ( mode ) {
case BSP_VMEDMA_OPT_THROUGHPUT:
- ctl |= TSI_DCTL_VBKS_1024;
+ ctl |= TSI_DCTL_VBKS_1024;
ctl |= TSI_DCTL_VBOT_0us;
break;
-
+
case BSP_VMEDMA_OPT_LOWLATENCY:
ctl |= TSI_DCTL_VBKS_32;
ctl |= TSI_DCTL_VBOT_0us;
@@ -2541,7 +2541,7 @@ uint32_t src, dst, ctl;
asm volatile("":::"memory");
/* Start transfer */
- ctl = TSI_RD(base, TSI_DCTL_REG(channel)) | TSI_DCTL_DGO | TSI_DCTL_MOD;
+ ctl = TSI_RD(base, TSI_DCTL_REG(channel)) | TSI_DCTL_DGO | TSI_DCTL_MOD;
TSI_WR(base, TSI_DCTL_REG(channel), ctl);
return 0;
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.h b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.h
index b0d122429c..0eb703b60b 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.h
@@ -4,19 +4,19 @@
/* Driver for the Tundra Tsi148 pci-vme bridge */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2005-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdint.h>
#include <bsp/vme_am_defs.h>
@@ -79,7 +79,7 @@ typedef volatile uint32_t BERegister; /* emphasize contents are big endian */
/*
* Scan the PCI busses for the Nth (N=='instance') Tsi148 VME bridge.
- *
+ *
* RETURNS:
* contents of the IRQ_LINE PCI config register on Success,
* the base address of the Tsi148 register block is stored in
@@ -245,7 +245,7 @@ vmeTsi148XlateAddr(
*/
#ifdef _VME_TSI148_DECLARE_SHOW_ROUTINES
-/* Print the current configuration of all outbound ports to
+/* Print the current configuration of all outbound ports to
* f (stdout if NULL)
*/
@@ -255,7 +255,7 @@ vmeTsi148OutboundPortsShowXX(BERegister *base, FILE *f);
void
vmeTsi148OutboundPortsShow(FILE *f);
-/* Print the current configuration of all inbound ports to
+/* Print the current configuration of all inbound ports to
* f (stdout if NULL)
*/
@@ -295,7 +295,7 @@ vmeTsi148DisableAllOutboundPorts(void);
# define TSI_VEAT_AM(v) (((v)>>8)&63)
# define TSI_VEAT_XAM(v) ((v)&255)
-/* Check and clear the error (AKA 'exception') register.
+/* Check and clear the error (AKA 'exception') register.
* Note that the Tsi148 does *not* propagate VME bus errors of any kind to
* the PCI status register and hence this routine (or registering an ISR
* to the TSI_VERR_INT_VEC) is the only means for detecting a bus error.
@@ -320,7 +320,7 @@ vmeTsi148ClearVMEBusErrors(uint32_t *paddr);
/* Map internal register block to VME.
*
* This routine is intended for BSP implementors. The registers must be
- * accessible from VME so that the interrupt handler can flush the
+ * accessible from VME so that the interrupt handler can flush the
* bridge FIFO (see below).
*
* vme_base: VME address where the TSI registers (4k) can be mapped.
@@ -399,8 +399,8 @@ vmeTsi148IntDisable(unsigned int level);
/* Check if an interrupt level or internal source is enabled:
*
* 'level': VME level 1..7 or internal special vector > 255
- *
- * RETURNS: value > 0 if interrupt is currently enabled,
+ *
+ * RETURNS: value > 0 if interrupt is currently enabled,
* zero if interrupt is currently disabled,
* -1 on error (invalid argument).
*/
@@ -432,7 +432,7 @@ vmeTsi148SetIackWidth(int level, int width);
* different hardware priorities of the PIC. Let's
* say you want to give IRQ level 7 the highest priority.
* You could then give 'pin 0' a higher priority (at the
- * PIC) and 'pin 1' a lower priority and issue.
+ * PIC) and 'pin 1' a lower priority and issue.
*
* for ( i=1; i<7; i++ ) vmeTsi148IntRoute(i, 1);
*
@@ -446,7 +446,7 @@ vmeTsi148SetIackWidth(int level, int width);
* etc.
*
* RETURNS: 0 on success, nonzero on error (invalid arguments)
- *
+ *
* NOTES: - DONT change the tsi148 'map' registers
* directly. The driver caches routing internally.
* - support for the extra wires (beyond wire #0) is
@@ -460,7 +460,7 @@ vmeTsi148IntRoute(unsigned int level, unsigned int pin);
/* Raise a VME Interrupt at 'level' and respond with 'vector' to a
* handler on the VME bus. (The handler could be a different board
* or the tsi148 itself.
- *
+ *
* Note that you could install a interrupt handler at TSI_VME_SW_IACK_INT_VEC
* to be notified of an IACK cycle having completed.
*
@@ -497,7 +497,7 @@ vmeTsi148IntRaise(int level, unsigned vector);
* - waits for both interrupts: 'ordinary' VME interrupt of 'level' and
* IACK completion interrupt ('special' vector TSI_VME_SW_IACK_INT_VEC).
*
- * NOTES:
+ * NOTES:
* - make sure no other handler responds to 'level'.
* - make sure no ISR is installed on both vectors yet.
* - ISRs installed by this routine are removed after completion.
@@ -529,7 +529,7 @@ vmeTsi148IntLoopbackTst(int level, unsigned vector);
* DO NOT CHANGE THE ORDER OF THESE VECTORS - THE DRIVER
* DEPENDS ON IT
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- *
+ *
* Deliberately, these vectors match the universe driver's
*/
/* 256 no VOWN interrupt */
@@ -584,14 +584,14 @@ vmeTsi148IntLoopbackTst(int level, unsigned vector);
* are wired.
* Optionally, the first PIC input line can be read from PCI config space
* but the second must be passed to this routine. Note that the info read
- * from PCI config space is wrong for some boards!
+ * from PCI config space is wrong for some boards!
*
* PARAMETERS:
- * flags: VMETSI148_IRQ_MGR_FLAG_SHARED:
+ * flags: VMETSI148_IRQ_MGR_FLAG_SHARED:
* use the BSP_install_rtems_shared_irq_handler() instead
* of BSP_install_rtems_irq_handler(). Use this if the PIC
* line is used by other devices, too.
- * CAVEAT: shared interrupts need RTEMS workspace, i.e., the
+ * CAVEAT: shared interrupts need RTEMS workspace, i.e., the
* VME interrupt manager can only be installed
* *after workspace is initialized* if 'shared' is nonzero
* (i.e., *not* from bspstart()).
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148DMA.h b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148DMA.h
index 11543a96bf..addb315178 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148DMA.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148DMA.h
@@ -4,19 +4,19 @@
#include <bsp/vmeTsi148.h>
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2006, 2007
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c b/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
index 3f5683f084..ef2403f4f8 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
@@ -2,19 +2,19 @@
/* Driver for the Tundra Universe II pci-vme bridge */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2000-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -23,18 +23,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -43,9 +43,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <stdio.h>
#include <inttypes.h>
@@ -224,7 +224,7 @@ WRITE_LE(
#warning "SYNC instruction unknown for this architecture"
#endif
-/* registers should be mapped to guarded, non-cached memory; hence
+/* registers should be mapped to guarded, non-cached memory; hence
* subsequent stores are ordered. eieio is only needed to enforce
* ordering of loads with respect to stores.
*/
@@ -267,11 +267,11 @@ return READ_LE0((volatile LERegister *)(((unsigned long)adrs)+off));
}
#define PORT_UNALIGNED(addr,port) \
- ( (port)%4 ? ((addr) & 0xffff) : ((addr) & 4095) )
+ ( (port)%4 ? ((addr) & 0xffff) : ((addr) & 4095) )
#define UNIV_REV(base) (READ_LE(base,2*sizeof(LERegister)) & 0xff)
-
+
#if defined(__rtems__) && 0
static int
uprintk(char *fmt, va_list ap)
@@ -306,7 +306,7 @@ va_list ap;
* to a buffer.
*/
vprintk(fmt,ap);
- } else
+ } else
#endif
{
vfprintf(f,fmt,ap);
@@ -440,7 +440,7 @@ unsigned long vdw =0;
mode |= UNIV_CTL_VAS24;
break;
-
+
case VME_AM_EXT_SUP_PGM:
case VME_AM_EXT_USR_PGM:
@@ -736,7 +736,7 @@ showUniversePort(
if ( cntrl & UNIV_MCTL_PWEN )
uprintf(f,", PWEN");
} else {
- uprintf(f,"%s %s %s %s",
+ uprintf(f,"%s %s %s %s",
cntrl&UNIV_SCTL_PGM ? "Pgm," : " ",
cntrl&UNIV_SCTL_DAT ? "Dat," : " ",
cntrl&UNIV_SCTL_SUPER ? "Sup," : " ",
@@ -859,7 +859,7 @@ int rval;
CHECK_DFLT_BASE(base);
- rptr = (base +
+ rptr = (base +
(ismaster ? UNIV_REGOFF_PCITGT0_CTRL : UNIV_REGOFF_VMESLV0_CTRL)/sizeof(LERegister));
#undef TSILL
#ifdef TSILL
@@ -874,7 +874,7 @@ int rval;
/* only rev. 2 has 8 ports */
if (UNIV_REV(base)<2) return -1;
- rptr = (base +
+ rptr = (base +
(ismaster ? UNIV_REGOFF_PCITGT4_CTRL : UNIV_REGOFF_VMESLV4_CTRL)/sizeof(LERegister));
for (port=4; port<UNIV_NUM_MPORTS; port++) {
if ((rval=func(ismaster,port,rptr,arg))) return rval;
@@ -998,7 +998,7 @@ vmeUniverseReset(void)
vmeUniverseDisableAllSlaves();
vmeUniverseDisableAllMasters();
-
+
vmeUniverseWriteReg(UNIV_VCSR_CLR_SYSFAIL, UNIV_REGOFF_VCSR_CLR);
/* clear interrupt status bits */
@@ -1235,7 +1235,7 @@ unsigned long b;
vmeUniverseWriteRegXX(base, v | b, UNIV_REGOFF_VINT_EN );
return 0;
-
+
}
int
@@ -1267,10 +1267,10 @@ uint32_t mode;
if ( VME_AM_IS_SHORT(as) ) {
mode |= UNIV_VRAI_CTL_VAS_A16;
- } else
+ } else
if ( VME_AM_IS_STD(as) ) {
mode |= UNIV_VRAI_CTL_VAS_A24;
- } else
+ } else
if ( VME_AM_IS_EXT(as) ) {
mode |= UNIV_VRAI_CTL_VAS_A32;
} else {
@@ -1327,7 +1327,7 @@ uint32_t dctl;
/* Luckily DCTL bits match MCTL bits so we can use am2mode */
if ( am2mode( 1, xfer_mode, &dctl ) )
return BSP_VMEDMA_STATUS_UNSUP;
-
+
/* However, the book says that for DMA VAS==5 [which would
* be a CSR access] is reserved. Tests indicate that
* CSR access works on the IIb/d but not really (odd 32-bit
@@ -1371,7 +1371,7 @@ uint32_t dctl;
dctl |= UNIV_DCTL_VDW_32;
}
}
-
+
/* Set direction flag */
if ( BSP_VMEDMA_MODE_PCI2VME & xfer_mode )
@@ -1406,7 +1406,7 @@ uint32_t dctl, dgcs;
dgcs |= ( xfer_mode & BSP_VMEDMA_MODE_NOINC_VME ) ?
UNIV_DGCS_VON_2048 : UNIV_DGCS_VON_1024;
break;
-
+
case BSP_VMEDMA_OPT_LOWLATENCY:
dgcs |= UNIV_DGCS_VOFF_0_US;
/* VON counts are different in NO_VINC mode :-( */
@@ -1857,14 +1857,14 @@ register unsigned long s;
* like this:
*
*
- * VME IRQ ------
- * & ----- LINT_STAT ----
+ * VME IRQ ------
+ * & ----- LINT_STAT ----
* | & ---------- PCI LINE
* | |
- * | |
- * LINT_EN ---------------------------
+ * | |
+ * LINT_EN ---------------------------
*
- * I.e.
+ * I.e.
* - if LINT_EN is disabled, a VME IRQ will not set LINT_STAT.
* - while LINT_STAT is set, it will pull the PCI line unless
* masked by LINT_EN.
@@ -1926,7 +1926,7 @@ unsigned long linten;
/* try the special handler */
universeSpecialISR( lintstat & SPECIAL_IRQ_MSK );
- /*
+ /*
* let the pic end this cycle
*/
if ( 0 == pin )
@@ -2114,7 +2114,7 @@ unsigned long cpu_base, vme_reg_base;
pic_pin[0] = pic_pin0 < 0 ? vmeUniverse0PciIrqLine : pic_pin0;
i = 1;
while ( (uni_pin[i] = va_arg(ap, int)) >= 0 ) {
-
+
if ( i >= UNIV_NUM_WIRES ) {
return -5;
}
@@ -2315,9 +2315,9 @@ int shift;
rtems_interrupt_disable(flags);
if ( dis<0 )
- vmeUniverseWriteReg( vmeUniverseReadReg(UNIV_REGOFF_LINT_EN) & ~v, UNIV_REGOFF_LINT_EN );
+ vmeUniverseWriteReg( vmeUniverseReadReg(UNIV_REGOFF_LINT_EN) & ~v, UNIV_REGOFF_LINT_EN );
else {
- vmeUniverseWriteReg( vmeUniverseReadReg(UNIV_REGOFF_LINT_EN) | v, UNIV_REGOFF_LINT_EN );
+ vmeUniverseWriteReg( vmeUniverseReadReg(UNIV_REGOFF_LINT_EN) | v, UNIV_REGOFF_LINT_EN );
}
rtems_interrupt_enable(flags);
return 0;
@@ -2425,14 +2425,14 @@ LoopbackTstArgs a;
if ( !vmeUniverseIntIsEnabled(level) && 0==vmeUniverseIntEnable(level) )
doDisable = 1;
-
+
/* make sure there are no pending interrupts */
vmeUniverseWriteReg( UNIV_LINT_STAT_SW_IACK, UNIV_REGOFF_LINT_STAT );
if ( vmeUniverseIntEnable( UNIV_VME_SW_IACK_INT_VEC ) ) {
fprintf(stderr,"Unable to enable IACK interrupt\n");
goto bail;
- }
+ }
printf("vmeUniverse VME interrupt loopback test; STARTING...\n");
printf(" --> asserting VME IRQ level %i\n", level);
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h b/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h
index 3d6c5ea941..179f2648d7 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h
@@ -4,19 +4,19 @@
/* Driver for the Tundra Universe II pci-vme bridge */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2000-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -25,18 +25,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -45,9 +45,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/* Register definitions */
/* NOTE: all registers contents in PCI space are LITTLE ENDIAN */
@@ -413,7 +413,7 @@ typedef struct VmeUniverseDMAPacketRec_ {
/* Location Monitor control register */
#define UNIV_REGOFF_LM_CTL 0xf64
-# define UNIV_LM_CTL_EN (1<<31) /* image enable */
+# define UNIV_LM_CTL_EN (1<<31) /* image enable */
# define UNIV_LM_CTL_PGM (1<<23) /* program AM */
# define UNIV_LM_CTL_DATA (1<<22) /* data AM */
# define UNIV_LM_CTL_SUPER (1<<21) /* supervisor AM */
@@ -427,7 +427,7 @@ typedef struct VmeUniverseDMAPacketRec_ {
/* VMEbus register access image control register */
#define UNIV_REGOFF_VRAI_CTL 0xf70
-# define UNIV_VRAI_CTL_EN (1<<31) /* image enable */
+# define UNIV_VRAI_CTL_EN (1<<31) /* image enable */
# define UNIV_VRAI_CTL_PGM (1<<23) /* program AM */
# define UNIV_VRAI_CTL_DATA (1<<22) /* data AM */
# define UNIV_VRAI_CTL_SUPER (1<<21) /* supervisor AM */
@@ -508,7 +508,7 @@ vmeUniverseReset(void);
* #define _VME_UNIVERSE_DECLARE_SHOW_ROUTINES
* #include <vmeUniverse.h>
*/
-/* print the current configuration of all master ports to
+/* print the current configuration of all master ports to
* f (stderr if NULL)
*/
void
@@ -684,7 +684,7 @@ vmeUniverseDisableAllMastersXX(volatile LERegister *ubase);
void
vmeUniverseDisableAllSlavesXX(volatile LERegister *ubase);
-/* print the current configuration of all master ports to
+/* print the current configuration of all master ports to
* f (stderr if NULL)
*/
void
@@ -701,7 +701,7 @@ vmeUniverseSlavePortsShowXX(
/* Raise a VME Interrupt at 'level' and respond with 'vector' to a
* handler on the VME bus. (The handler could be a different board
* or the universe itself - [only works with universe II]).
- *
+ *
* Note that you could install a interrupt handler at UNIV_VME_SW_IACK_INT_VEC
* to be notified of an IACK cycle having completed.
*
@@ -740,7 +740,7 @@ vmeUniverseIntRaise(int level, unsigned vector);
/* Map internal register block to VME.
*
* This routine is intended for BSP implementors. The registers can be
- * made accessible from VME so that the interrupt handler can flush the
+ * made accessible from VME so that the interrupt handler can flush the
* bridge FIFO (see below). The preferred method is by accessing VME CSR,
* though, if these are mapped [and the BSP provides an outbound window].
* On the universe we can also disable posted writes in the 'ordinary'
@@ -790,7 +790,7 @@ vmeUniverseMapCRG(unsigned long vme_base, unsigned long address_space);
typedef void (*VmeUniverseISR) (void *usrArg, unsigned long vector);
/* use these special vectors to connect a handler to the
- * universe specific interrupts (such as "DMA done",
+ * universe specific interrupts (such as "DMA done",
* VOWN, error irqs etc.)
* NOTE: The wrapper clears all status LINT bits (except
* for regular VME irqs). Also note that it is the user's
@@ -801,7 +801,7 @@ typedef void (*VmeUniverseISR) (void *usrArg, unsigned long vector);
* DO NOT CHANGE THE ORDER OF THESE VECTORS - THE DRIVER
* DEPENDS ON IT
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- *
+ *
*/
#define UNIV_VOWN_INT_VEC 256
#define UNIV_DMA_INT_VEC 257
@@ -844,7 +844,7 @@ VmeUniverseISR
vmeUniverseISRGet(unsigned long vector, void **parg);
/* utility routines to enable/disable a VME IRQ level.
- *
+ *
* To enable/disable the internal interrupt sources (special vectors above)
* pass a vector argument > 255.
*
@@ -858,8 +858,8 @@ vmeUniverseIntDisable(unsigned int level);
/* Check if an interrupt level or internal source is enabled:
*
* 'level': VME level 1..7 or internal special vector > 255
- *
- * RETURNS: value > 0 if interrupt is currently enabled,
+ *
+ * RETURNS: value > 0 if interrupt is currently enabled,
* zero if interrupt is currently disabled,
* -1 on error (invalid argument).
*/
@@ -879,7 +879,7 @@ vmeUniverseIntIsEnabled(unsigned int level);
* different hardware priorities of the PIC. Let's
* say you want to give IRQ level 7 the highest priority.
* You could then give 'pin 0' a higher priority (at the
- * PIC) and 'pin 1' a lower priority and issue.
+ * PIC) and 'pin 1' a lower priority and issue.
*
* for ( i=1; i<7; i++ ) vmeUniverseIntRoute(i, 1);
*
@@ -893,7 +893,7 @@ vmeUniverseIntIsEnabled(unsigned int level);
* routes it to the alternate wire
* (specialIrqUnivOut)
* RETURNS: 0 on success, nonzero on error (invalid arguments)
- *
+ *
* NOTES: - DONT change the universe 'map' registers
* directly. The driver caches routing internally.
* - support for the 'specialIrqUnivOut' wire is
@@ -910,7 +910,7 @@ vmeUniverseIntRoute(unsigned int level, unsigned int pin);
* - waits for both interrupts: 'ordinary' VME interrupt of 'level' and
* IACK completion interrupt ('special' vector UNIV_VME_SW_IACK_INT_VEC).
*
- * NOTES:
+ * NOTES:
* - make sure no other handler responds to 'level'.
* - make sure no ISR is installed on both vectors yet.
* - ISRs installed by this routine are removed after completion.
@@ -956,7 +956,7 @@ vmeUniverseIntLoopbackTst(int level, unsigned vector);
* are wired.
* Optionally, the first PIC input line can be read from PCI config space
* but the second must be passed to this routine. Note that the info read
- * from PCI config space is wrong for many boards!
+ * from PCI config space is wrong for many boards!
*
* PARAMETERS:
* vmeIrqUnivOut: to which output pin (of the universe) should the 7
@@ -972,7 +972,7 @@ vmeUniverseIntLoopbackTst(int level, unsigned vector);
* the PIC is determined by reading PCI config space.
*
* RETURNS: 0 on success, -1 on failure.
- *
+ *
*/
/* This routine is outside of the __INSIDE_RTEMS_BSP__ test for bwrds compatibility ONLY */
@@ -988,13 +988,13 @@ vmeUniverseInstallIrqMgr(int vmeIrqUnivOut,
/* up to 4 universe outputs are now supported by this alternate
* entry point.
- * Terminate the vararg list (uni_pin/pic_pin pairs) with a
+ * Terminate the vararg list (uni_pin/pic_pin pairs) with a
* '-1' uni_pin.
- * E.g., the old interface is now just a wrapper to
+ * E.g., the old interface is now just a wrapper to
* vmeUniverseInstallIrqMgrAlt(0, vmeUnivOut, vmePicLint, specUnivOut, specPicLine, -1);
*
* The 'IRQ_MGR_SHARED' flag uses the BSP_install_rtems_shared_irq_handler()
- * API. CAVEAT: shared interrupts need RTEMS workspace, i.e., the
+ * API. CAVEAT: shared interrupts need RTEMS workspace, i.e., the
* VME interrupt manager can only be installed *after workspace is initialized*
* if 'shared' is nonzero (i.e., *not* from bspstart()).
*
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverseDMA.h b/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverseDMA.h
index 0b1f93b7b3..03ff3d147f 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverseDMA.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vmeUniverseDMA.h
@@ -2,19 +2,19 @@
#ifndef VME_UNIVERSE_DMA_H
#define VME_UNIVERSE_DMA_H
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2006, 2007
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -23,18 +23,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -43,9 +43,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
#include <bsp/vmeUniverse.h>
#include <stdint.h>
diff --git a/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h b/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
index ed42e37a38..fb6b72bc8b 100644
--- a/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
+++ b/c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
@@ -3,19 +3,19 @@
/* vxworks compatible addressing modes */
-/*
+/*
* Authorship
* ----------
* This software was created by
* Till Straumann <strauman@slac.stanford.edu>, 2002-2007,
* Stanford Linear Accelerator Center, Stanford University.
- *
+ *
* Acknowledgement of sponsorship
* ------------------------------
* This software was produced by
* the Stanford Linear Accelerator Center, Stanford University,
* under Contract DE-AC03-76SFO0515 with the Department of Energy.
- *
+ *
* Government disclaimer of liability
* ----------------------------------
* Neither the United States nor the United States Department of Energy,
@@ -24,18 +24,18 @@
* completeness, or usefulness of any data, apparatus, product, or process
* disclosed, or represents that its use would not infringe privately owned
* rights.
- *
+ *
* Stanford disclaimer of liability
* --------------------------------
* Stanford University makes no representations or warranties, express or
* implied, nor assumes any liability for the use of this software.
- *
+ *
* Stanford disclaimer of copyright
* --------------------------------
* Stanford University, owner of the copyright, hereby disclaims its
* copyright and all other rights in this software. Hence, anyone may
- * freely use it for any purpose without restriction.
- *
+ * freely use it for any purpose without restriction.
+ *
* Maintenance of notices
* ----------------------
* In the interest of clarity regarding the origin and status of this
@@ -44,9 +44,9 @@
* or distributed by the recipient and are to be affixed to any copy of
* software made or distributed by the recipient that contains a copy or
* derivative of this software.
- *
+ *
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
- */
+ */
/* NOTE: 64-bit *addresses* are not supported [data are]. */
#ifndef VME_AM_STD_SUP_BLT
@@ -143,7 +143,7 @@
#define VME_AM_MASK 0x3f
#endif
-/* Hint that a window is mapping memory; the
+/* Hint that a window is mapping memory; the
* driver may assume it to be safe to enable decoupled
* cycles, caching and the like...
*/
@@ -154,7 +154,7 @@
/* I don't know AMs for 2eSST so we use some extra bits;
* HOWEVER: these are just qualifiers to the VME_AM_2eVME_xx modes
* i.e., if you want 2eSST you must also select 2eVME...
- */
+ */
/* 2eSST broadcast; you still need to set one of the speed bits */
#define VME_AM_2eSST_BCST (1<<9)