summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-11-29 15:33:28 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-11-29 15:33:28 +0000
commit44b06ca617a8d8910a308037ebad06876085a6cc (patch)
treec9bd98f2ad44ad1fbfab11b51f9b09c9d3561d0b /c/src/lib/libbsp/sparc/leon3
parentWhitespace removal. (diff)
downloadrtems-44b06ca617a8d8910a308037ebad06876085a6cc.tar.bz2
Whitespace removal.
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/amba/amba.c6
-rw-r--r--c/src/lib/libbsp/sparc/leon3/clock/ckinit.c2
-rw-r--r--c/src/lib/libbsp/sparc/leon3/console/console.c28
-rw-r--r--c/src/lib/libbsp/sparc/leon3/console/debugputs.c2
-rw-r--r--c/src/lib/libbsp/sparc/leon3/include/bsp.h8
-rw-r--r--c/src/lib/libbsp/sparc/leon3/include/leon.h36
-rw-r--r--c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c8
-rw-r--r--c/src/lib/libbsp/sparc/leon3/leon_open_eth/leon_open_eth.c6
-rw-r--r--c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c14
-rw-r--r--c/src/lib/libbsp/sparc/leon3/pci/pci.c106
-rw-r--r--c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c6
-rw-r--r--c/src/lib/libbsp/sparc/leon3/shmsupp/lock.c6
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/bspidle.S6
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/bspstart.c10
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/setvec.c8
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/spurious.c26
-rw-r--r--c/src/lib/libbsp/sparc/leon3/timer/timer.c12
17 files changed, 145 insertions, 145 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/amba/amba.c b/c/src/lib/libbsp/sparc/leon3/amba/amba.c
index 29a62f0f6a..ad901df1c0 100644
--- a/c/src/lib/libbsp/sparc/leon3/amba/amba.c
+++ b/c/src/lib/libbsp/sparc/leon3/amba/amba.c
@@ -27,9 +27,9 @@ int LEON3_Cpu_Index = 0;
* bsp_predriver_hook
*
* BSP predriver hook. Called just before drivers are initialized.
- * Used to scan system bus. Probes for AHB masters, AHB slaves and
+ * Used to scan system bus. Probes for AHB masters, AHB slaves and
* APB slaves. Addresses to configuration areas of the AHB masters,
- * AHB slaves, APB slaves and APB master are storeds in
+ * AHB slaves, APB slaves and APB master are storeds in
* amba_ahb_masters, amba_ahb_slaves and amba.
*/
@@ -64,7 +64,7 @@ void bsp_predriver_hook(void)
}
#endif
}
-
+
/* find GP Timer */
i = amba_find_apbslv(&amba_conf,VENDOR_GAISLER,GAISLER_GPTIMER,&dev);
if ( i > 0 ){
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
index 54794cd1c2..071265a30e 100644
--- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
@@ -36,7 +36,7 @@
(rtems_configuration_get_user_multiprocessing_table() ? LEON3_Cpu_Index : 0)
#else
#define LEON3_CLOCK_INDEX 0
-#endif
+#endif
volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs = 0;
diff --git a/c/src/lib/libbsp/sparc/leon3/console/console.c b/c/src/lib/libbsp/sparc/leon3/console/console.c
index 5a9084affd..817eb1c6d7 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/console.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/console.c
@@ -26,7 +26,7 @@
/*
* Should we use a polled or interrupt drived console?
- *
+ *
* NOTE: This is defined in the custom/leon.cfg file.
*/
@@ -44,7 +44,7 @@ void console_outbyte_polled(
/* body is in debugputs.c */
/*
- * console_inbyte_nonblocking
+ * console_inbyte_nonblocking
*
* This routine polls for a character.
*/
@@ -86,7 +86,7 @@ int scan_uarts(void) {
if (isinit == 0) {
i = 0;
uarts = 0;
-
+
uarts = amba_find_apbslvs(
&amba_conf, VENDOR_GAISLER, GAISLER_APBUART, apbuarts, LEON3_APBUARTS);
for(i=0; i<uarts; i++) {
@@ -113,16 +113,16 @@ rtems_device_driver console_initialize(
scan_uarts();
/* default to zero and override if multiprocessing */
- uart0 = 0;
+ uart0 = 0;
#if defined(RTEMS_MULTIPROCESSING)
if (rtems_configuration_get_user_multiprocessing_table() != NULL)
uart0 = LEON3_Cpu_Index;
#endif
/* Register Device Names */
-
- if (uarts && (uart0 < uarts))
- {
+
+ if (uarts && (uart0 < uarts))
+ {
status = rtems_io_register_name( "/dev/console", major, 0 );
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
@@ -139,7 +139,7 @@ rtems_device_driver console_initialize(
/*
* Initialize Hardware if ONLY CPU or first CPU in MP system
*/
-
+
#if defined(RTEMS_MULTIPROCESSING)
if (rtems_configuration_get_user_multiprocessing_table()->node == 1)
#endif
@@ -148,7 +148,7 @@ rtems_device_driver console_initialize(
{
LEON3_Console_Uart[i]->ctrl |=
LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
- LEON3_Console_Uart[i]->status = 0;
+ LEON3_Console_Uart[i]->status = 0;
}
}
@@ -178,13 +178,13 @@ rtems_device_driver console_open(
assert( minor <= LEON3_APBUARTS );
if ( minor > LEON3_APBUARTS )
return RTEMS_INVALID_NUMBER;
-
+
sc = rtems_termios_open (major, minor, arg, &pollCallbacks);
return RTEMS_SUCCESSFUL;
}
-
+
rtems_device_driver console_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
@@ -193,7 +193,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,
@@ -202,7 +202,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,
@@ -211,7 +211,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,
diff --git a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
index 10862b8ce5..b6276930d3 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
@@ -45,7 +45,7 @@ void console_outbyte_polled(
}
/*
- * console_inbyte_nonblocking
+ * console_inbyte_nonblocking
*
* This routine polls for a character.
*/
diff --git a/c/src/lib/libbsp/sparc/leon3/include/bsp.h b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
index c62cc0887b..2c41d70450 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
@@ -10,10 +10,10 @@
* http://www.rtems.com/license/LICENSE.
*
* Ported to ERC32 implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
+ * Research Corporation (OAR) under contract to the European Space
* Agency (ESA).
*
- * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
+ * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
* European Space Agency.
*
* $Id$
@@ -91,13 +91,13 @@ extern int CPU_SPARC_HAS_SNOOPING;
extern int RAM_START;
extern int RAM_END;
extern int RAM_SIZE;
-
+
extern int PROM_START;
extern int PROM_END;
extern int PROM_SIZE;
extern int CLOCK_SPEED;
-
+
extern int end; /* last address in the program */
/* miscellaneous stuff assumed to exist */
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 8c130ad6cc..93bc05462c 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -15,7 +15,7 @@
*
* $Id$
*/
-
+
#ifndef _INCLUDE_LEON_h
#define _INCLUDE_LEON_h
@@ -34,7 +34,7 @@ extern "C" {
*
* Source: Table 8 - Interrupt Trap Type and Default Priority Assignments
*
- * NOTE: The priority level for each source corresponds to the least
+ * NOTE: The priority level for each source corresponds to the least
* significant nibble of the trap type.
*/
@@ -45,14 +45,14 @@ extern "C" {
#define LEON_INT_TRAP( _trap ) \
( (_trap) >= 0x11 && \
(_trap) <= 0x1F )
-
+
/*
- * Structure for LEON memory mapped registers.
+ * Structure for LEON memory mapped registers.
*
* Source: Section 6.1 - On-chip registers
*
- * NOTE: There is only one of these structures per CPU, its base address
- * is 0x80000000, and the variable LEON_REG is placed there by the
+ * NOTE: There is only one of these structures per CPU, its base address
+ * is 0x80000000, and the variable LEON_REG is placed there by the
* linkcmds file.
*/
@@ -73,7 +73,7 @@ extern "C" {
volatile unsigned int Leon_Configuration;
volatile unsigned int dummy2;
volatile unsigned int dummy3;
- volatile unsigned int dummy4;
+ volatile unsigned int dummy4;
volatile unsigned int dummy5;
volatile unsigned int dummy6;
volatile unsigned int dummy7;
@@ -146,7 +146,7 @@ typedef struct {
/* Leon uses dynamic register mapping using amba configuration records */
/* LEON_Register_Map is obsolete */
/* extern LEON_Register_Map LEON_REG; */
-
+
#endif
/*
@@ -161,7 +161,7 @@ typedef struct {
#define LEON_MEMORY_CONFIGURATION_RAM_SIZE_MASK 0x00001E00
-
+
/*
* The following defines the bits in the Timer Control Register.
*/
@@ -178,8 +178,8 @@ typedef struct {
*
*/
-#define LEON_REG_UART_CONTROL_RTD 0x000000FF /* RX/TX data */
-
+#define LEON_REG_UART_CONTROL_RTD 0x000000FF /* RX/TX data */
+
/*
* The following defines the bits in the LEON UART Status Registers.
*/
@@ -193,7 +193,7 @@ typedef struct {
#define LEON_REG_UART_STATUS_FE 0x00000040 /* RX Framing Error */
#define LEON_REG_UART_STATUS_ERR 0x00000078 /* Error Mask */
-
+
/*
* The following defines the bits in the LEON UART Status Registers.
*/
@@ -243,16 +243,16 @@ extern int LEON3_Cpu_Index;
do { \
LEON3_IrqCtrl_Regs->iforce = (1 << (_source)); \
} while (0)
-
+
#define LEON_Is_interrupt_pending( _source ) \
(LEON3_IrqCtrl_Regs.ipend & (1 << (_source)))
-
+
#define LEON_Is_interrupt_masked( _source ) \
do {\
(LEON3_IrqCtrl_Regs.mask[LEON3_Cpu_Index] & (1 << (_source))); \
} while (0)
-
+
#define LEON_Mask_interrupt( _source ) \
do { \
uint32_t _level; \
@@ -260,7 +260,7 @@ extern int LEON3_Cpu_Index;
LEON3_IrqCtrl_Regs->mask[LEON3_Cpu_Index] &= ~(1 << (_source)); \
sparc_enable_interrupts( _level ); \
} while (0)
-
+
#define LEON_Unmask_interrupt( _source ) \
do { \
uint32_t _level; \
@@ -279,7 +279,7 @@ extern int LEON3_Cpu_Index;
sparc_enable_interrupts( _level ); \
(_previous) &= _mask; \
} while (0)
-
+
#define LEON_Restore_interrupt( _source, _previous ) \
do { \
uint32_t _level; \
@@ -303,7 +303,7 @@ extern int LEON3_Cpu_Index;
* 0 = stop counter at zero
*
* D2 - Counter Load
- * 1 = load counter with preset value
+ * 1 = load counter with preset value
* 0 = no function
*
*/
diff --git a/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c b/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
index 2058d7d7c1..341bd2792e 100644
--- a/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
+++ b/c/src/lib/libbsp/sparc/leon3/leon_greth/leon_greth.c
@@ -24,7 +24,7 @@
#define RDA_COUNT 32
#define TDA_COUNT 32
-greth_configuration_t leon_greth_configuration;
+greth_configuration_t leon_greth_configuration;
int rtems_leon_greth_driver_attach(
struct rtems_bsdnet_ifconfig *config,
@@ -38,11 +38,11 @@ int rtems_leon_greth_driver_attach(
/* Scan for MAC AHB slave interface */
device_found = amba_find_apbslv(&amba_conf,VENDOR_GAISLER,GAISLER_ETHMAC,&apbgreth);
- if (device_found == 1)
+ if (device_found == 1)
{
base_addr = apbgreth.start;
eth_irq = apbgreth.irq + 0x10;
-
+
/* clear control register and reset NIC */
*(volatile int *) base_addr = 0;
*(volatile int *) base_addr = GRETH_CTRL_RST;
@@ -54,7 +54,7 @@ int rtems_leon_greth_driver_attach(
if (rtems_greth_driver_attach( config, &leon_greth_configuration )) {
LEON_Clear_interrupt(leon_greth_configuration.vector);
LEON_Unmask_interrupt(leon_greth_configuration.vector);
- }
+ }
}
return 0;
}
diff --git a/c/src/lib/libbsp/sparc/leon3/leon_open_eth/leon_open_eth.c b/c/src/lib/libbsp/sparc/leon3/leon_open_eth/leon_open_eth.c
index c4586dd309..3d42d9f53b 100644
--- a/c/src/lib/libbsp/sparc/leon3/leon_open_eth/leon_open_eth.c
+++ b/c/src/lib/libbsp/sparc/leon3/leon_open_eth/leon_open_eth.c
@@ -24,7 +24,7 @@
#define RDA_COUNT 16
#define TDA_COUNT 16
-open_eth_configuration_t leon_open_eth_configuration;
+open_eth_configuration_t leon_open_eth_configuration;
int rtems_leon_open_eth_driver_attach(
struct rtems_bsdnet_ifconfig *config,
@@ -54,7 +54,7 @@ int rtems_leon_open_eth_driver_attach(
}
- if (device_found)
+ if (device_found)
{
/* clear control register and reset NIC */
*(volatile int *) base_addr = 0;
@@ -69,7 +69,7 @@ int rtems_leon_open_eth_driver_attach(
if (rtems_open_eth_driver_attach( config, &leon_open_eth_configuration )) {
LEON_Clear_interrupt(leon_open_eth_configuration.vector);
LEON_Unmask_interrupt(leon_open_eth_configuration.vector);
- }
+ }
}
return 0;
}
diff --git a/c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c b/c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c
index 443a12d04d..5ebdc12cfc 100644
--- a/c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c
+++ b/c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c
@@ -12,9 +12,9 @@
#define SMC91111_BASE_PIO 4
scmv91111_configuration_t leon_scmv91111_configuration = {
- SMC91111_BASE_ADDR, /* base address */
+ SMC91111_BASE_ADDR, /* base address */
LEON_TRAP_TYPE (SMC91111_BASE_IRQ), /* vector number */
- SMC91111_BASE_PIO, /* PIO */
+ SMC91111_BASE_PIO, /* PIO */
100, /* 100b */
1, /* fulldx */
1 /* autoneg */
@@ -35,12 +35,12 @@ rtems_smc91111_driver_attach_leon3 (struct rtems_bsdnet_ifconfig *config,
amba_apb_device apbpio;
amba_ahb_device apbmctrl;
-
+
if ( amba_find_apbslv(&amba_conf,VENDOR_GAISLER,GAISLER_PIOPORT,&apbpio) != 1 ){
printk("SMC9111_leon3: didn't find PIO\n");
return 0;
}
-
+
/* Find LEON2 memory controller */
if ( amba_find_ahbslv(&amba_conf,VENDOR_ESA,ESA_MCTRL,&apbmctrl) != 1 ){
/* LEON2 memory controller not found, search for fault tolerant memory controller */
@@ -49,16 +49,16 @@ rtems_smc91111_driver_attach_leon3 (struct rtems_bsdnet_ifconfig *config,
return 0;
}
}
-
+
/* Get controller address */
addr_mctrl = (unsigned long) apbmctrl.start;
io = (LEON3_IOPORT_Regs_Map *) apbpio.start;
-
+
printk(
"Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
(unsigned int)io,
(unsigned int)addr_mctrl);
-
+
/* Setup PIO IRQ */
io->irqmask |= (1 << leon_scmv91111_configuration.pio);
io->irqpol |= (1 << leon_scmv91111_configuration.pio);
diff --git a/c/src/lib/libbsp/sparc/leon3/pci/pci.c b/c/src/lib/libbsp/sparc/leon3/pci/pci.c
index f41936bb87..a5f5c3a34a 100644
--- a/c/src/lib/libbsp/sparc/leon3/pci/pci.c
+++ b/c/src/lib/libbsp/sparc/leon3/pci/pci.c
@@ -19,7 +19,7 @@
* - separated bridge detection code out of this file
*
*
- * Adapted to GRPCI
+ * Adapted to GRPCI
* Copyright (C) 2006 Gaisler Research
*
*/
@@ -39,14 +39,14 @@
/*#define BT_ENABLED 1*/
/* Define PCI_INFO to get a listing of configured devices at boot time */
-#define PCI_INFO 1
+#define PCI_INFO 1
-#define DEBUG 1
+#define DEBUG 1
#ifdef DEBUG
#define DBG(x...) printk(x)
#else
-#define DBG(x...)
+#define DBG(x...)
#endif
/* allow for overriding these definitions */
@@ -66,7 +66,7 @@
/*
* Bit encode for PCI_CONFIG_HEADER_TYPE register
*/
-unsigned char ucMaxPCIBus;
+unsigned char ucMaxPCIBus;
typedef struct {
volatile unsigned int cfg_stat;
volatile unsigned int bar0;
@@ -95,7 +95,7 @@ static inline unsigned int flip_dword (unsigned int l)
/* The configuration access functions uses the DMA functionality of the
* AT697 pci controller to be able access all slots
*/
-
+
static int
BSP_pci_read_config_dword(
@@ -109,7 +109,7 @@ BSP_pci_read_config_dword(
volatile unsigned int *pci_conf;
if (offset & 3) return PCIBIOS_BAD_REGISTER_NUMBER;
-
+
if (slot > 21) {
*val = 0xffffffff;
return PCIBIOS_SUCCESSFUL;
@@ -128,13 +128,13 @@ BSP_pci_read_config_dword(
*val = 0xffffffff;
}
- DBG("pci_read - bus: %d, dev: %d, fn: %d, off: %d => addr: %x, val: %x\n", bus, slot, function, offset, (1<<(11+slot) ) | ((function & 7)<<8) | (offset&0x3f), *val);
+ DBG("pci_read - bus: %d, dev: %d, fn: %d, off: %d => addr: %x, val: %x\n", bus, slot, function, offset, (1<<(11+slot) ) | ((function & 7)<<8) | (offset&0x3f), *val);
return PCIBIOS_SUCCESSFUL;
}
-static int
+static int
BSP_pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short *val) {
unsigned int v;
@@ -147,7 +147,7 @@ BSP_pci_read_config_word(unsigned char bus, unsigned char slot, unsigned char fu
}
-static int
+static int
BSP_pci_read_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char *val) {
unsigned int v;
@@ -179,13 +179,13 @@ BSP_pci_write_config_dword(unsigned char bus, unsigned char slot, unsigned char
*pci_conf = value;
- DBG("pci write - bus: %d, dev: %d, fn: %d, off: %d => addr: %x, val: %x\n", bus, slot, function, offset, (1<<(11+slot) ) | ((function & 7)<<8) | (offset&0x3f), value);
+ DBG("pci write - bus: %d, dev: %d, fn: %d, off: %d => addr: %x, val: %x\n", bus, slot, function, offset, (1<<(11+slot) ) | ((function & 7)<<8) | (offset&0x3f), value);
return PCIBIOS_SUCCESSFUL;
}
-static int
+static int
BSP_pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned short val) {
unsigned int v;
@@ -199,14 +199,14 @@ BSP_pci_write_config_word(unsigned char bus, unsigned char slot, unsigned char f
}
-static int
+static int
BSP_pci_write_config_byte(unsigned char bus, unsigned char slot, unsigned char function, unsigned char offset, unsigned char val) {
unsigned int v;
pci_read_config_dword(bus, slot, function, offset&~3, &v);
v = (v & ~(0xff << (8*(offset&3)))) | ((0xff&val) << (8*(offset&3)));
-
+
return pci_write_config_dword(bus, slot, function, offset&~3, v);
}
@@ -238,20 +238,20 @@ int init_grpci(void) {
pci_read_config_dword(0,0,0,0x10, &addr);
pci_write_config_dword(0,0,0,0x10, flip_dword(0x10000000)); /* Setup bar0 to nonzero value (grpci considers BAR==0 as invalid) */
addr = (~flip_dword(addr)+1)>>1; /* page0 is accessed through upper half of bar0 */
- pcic->cfg_stat |= 0x10000000; /* Setup mmap reg so we can reach bar0 */
+ pcic->cfg_stat |= 0x10000000; /* Setup mmap reg so we can reach bar0 */
page0[addr/4] = 0; /* Disable bytetwisting ... */
#endif
-
+
/* set 1:1 mapping between AHB -> PCI memory */
pcic->cfg_stat = (pcic->cfg_stat & 0x0fffffff) | PCI_MEM_START;
-
- /* and map system RAM at pci address 0x40000000 */
+
+ /* and map system RAM at pci address 0x40000000 */
pci_write_config_dword(0, 0, 0, 0x14, 0x40000000);
pcic->page1 = 0x40000000;
-
- /* set as bus master and enable pci memory responses */
+
+ /* set as bus master and enable pci memory responses */
pci_read_config_dword(0, 0, 0, 0x4, &data);
- pci_write_config_dword(0, 0, 0, 0x4, data | 0x6);
+ pci_write_config_dword(0, 0, 0, 0x4, data | 0x6);
return 0;
}
@@ -264,16 +264,16 @@ int dma_to_pci(unsigned int ahb_addr, unsigned int pci_addr, unsigned int len) {
pcidma[1] = ahb_addr;
pcidma[2] = pci_addr;
pcidma[3] = len;
- pcidma[0] = 0x83;
+ pcidma[0] = 0x83;
while ( (pcidma[0] & 0x4) == 0)
;
- if (pcidma[0] & 0x8) { /* error */
+ if (pcidma[0] & 0x8) { /* error */
ret = -1;
}
- pcidma[0] |= 0xC;
+ pcidma[0] |= 0xC;
return ret;
}
@@ -285,26 +285,26 @@ int dma_from_pci(unsigned int ahb_addr, unsigned int pci_addr, unsigned int len)
pcidma[1] = ahb_addr;
pcidma[2] = pci_addr;
pcidma[3] = len;
- pcidma[0] = 0x81;
+ pcidma[0] = 0x81;
while ( (pcidma[0] & 0x4) == 0)
;
- if (pcidma[0] & 0x8) { /* error */
+ if (pcidma[0] & 0x8) { /* error */
ret = -1;
}
- pcidma[0] |= 0xC;
+ pcidma[0] |= 0xC;
return ret;
-}
+}
void pci_mem_enable(unsigned char bus, unsigned char slot, unsigned char function) {
unsigned int data;
pci_read_config_dword(0, slot, function, PCI_COMMAND, &data);
- pci_write_config_dword(0, slot, function, PCI_COMMAND, data | PCI_COMMAND_MEMORY);
+ pci_write_config_dword(0, slot, function, PCI_COMMAND, data | PCI_COMMAND_MEMORY);
}
@@ -312,7 +312,7 @@ void pci_master_enable(unsigned char bus, unsigned char slot, unsigned char func
unsigned int data;
pci_read_config_dword(0, slot, function, PCI_COMMAND, &data);
- pci_write_config_dword(0, slot, function, PCI_COMMAND, data | PCI_COMMAND_MASTER);
+ pci_write_config_dword(0, slot, function, PCI_COMMAND, data | PCI_COMMAND_MASTER);
}
@@ -330,8 +330,8 @@ static inline void swap_res(struct pci_res **p1, struct pci_res **p2) {
* single function and multi function devices. All allocated devices are enabled and
* latency timers are set to 40.
*
- * NOTE that it only allocates PCI memory space devices (that are at least 1 KB).
- * IO spaces are not enabled. Also, it does not handle pci-pci bridges. They are left disabled.
+ * NOTE that it only allocates PCI memory space devices (that are at least 1 KB).
+ * IO spaces are not enabled. Also, it does not handle pci-pci bridges. They are left disabled.
*
*
*/
@@ -344,7 +344,7 @@ void pci_allocate_resources(void) {
res = (struct pci_res **) malloc(sizeof(struct pci_res *)*32*8*6);
for (i = 0; i < 32*8*6; i++) {
- res[i] = (struct pci_res *) malloc(sizeof(struct pci_res));
+ res[i] = (struct pci_res *) malloc(sizeof(struct pci_res));
res[i]->size = 0;
res[i]->devfn = i;
}
@@ -361,7 +361,7 @@ void pci_allocate_resources(void) {
}
pci_read_config_byte(0, slot, 0, PCI_HEADER_TYPE, &header);
-
+
if(header & PCI_MULTI_FUNCTION) {
numfuncs = PCI_MAX_FUNCTIONS;
}
@@ -381,7 +381,7 @@ void pci_allocate_resources(void) {
if (tmp == PCI_CLASS_BRIDGE_PCI) {
continue;
}
-
+
for (pos = 0; pos < 6; pos++) {
pci_write_config_dword(0, slot, func, PCI_BASE_ADDRESS_0 + (pos<<2), 0xffffffff);
pci_read_config_dword(0, slot, func, PCI_BASE_ADDRESS_0 + (pos<<2), &size);
@@ -403,7 +403,7 @@ void pci_allocate_resources(void) {
}
- /* Sort the resources in descending order */
+ /* Sort the resources in descending order */
swapped = 1;
while (swapped == 1) {
swapped = 0;
@@ -427,32 +427,32 @@ void pci_allocate_resources(void) {
printk("Out of PCI memory space, all devices not configured.\n");
goto done;
}
-
+
dev = res[i]->devfn >> 3;
fn = res[i]->devfn & 7;
-
+
DBG("Assigning PCI addr %x to device %d, function %d, bar %d\n", addr, dev, fn, res[i]->bar);
pci_write_config_dword(0, dev, fn, PCI_BASE_ADDRESS_0+res[i]->bar*4, addr);
addr += res[i]->size;
/* Set latency timer to 64 */
- pci_read_config_dword(0, dev, fn, 0xC, &tmp);
+ pci_read_config_dword(0, dev, fn, 0xC, &tmp);
pci_write_config_dword(0, dev, fn, 0xC, tmp|0x4000);
- pci_mem_enable(0, dev, fn);
+ pci_mem_enable(0, dev, fn);
+
+ }
- }
-
done:
#ifdef PCI_INFO
printk("\nPCI devices found and configured:\n");
for (slot = 1; slot < PCI_MAX_DEVICES; slot++) {
-
- pci_read_config_byte(0, slot, 0, PCI_HEADER_TYPE, &header);
-
+
+ pci_read_config_byte(0, slot, 0, PCI_HEADER_TYPE, &header);
+
if(header & PCI_MULTI_FUNCTION) {
numfuncs = PCI_MAX_FUNCTIONS;
}
@@ -461,15 +461,15 @@ done:
}
for (func = 0; func < numfuncs; func++) {
-
+
pci_read_config_dword(0, slot, func, PCI_COMMAND, &tmp);
- if (tmp & PCI_COMMAND_MEMORY) {
-
+ if (tmp & PCI_COMMAND_MEMORY) {
+
pci_read_config_dword(0, slot, func, PCI_VENDOR_ID, &id);
if (id == PCI_INVALID_VENDORDEVICEID || id == 0) continue;
-
+
printk("\nSlot %d function: %d\nVendor id: 0x%x, device id: 0x%x\n", slot, func, id & 0xffff, id>>16);
for (pos = 0; pos < 6; pos++) {
@@ -479,17 +479,17 @@ done:
printk("\tBAR %d: %x\n", pos, tmp);
}
-
+
}
printk("\n");
- }
+ }
}
}
printk("\n");
#endif
-
+
for (i = 0; i < 1536; i++) {
free(res[i]);
}
@@ -503,7 +503,7 @@ int init_pci(void)
unsigned char ucSlotNumber, ucFnNumber, ucNumFuncs;
unsigned char ucHeader;
unsigned char ucMaxSubordinate;
- unsigned int ulClass, ulDeviceID;
+ unsigned int ulClass, ulDeviceID;
DBG("Initializing PCI\n");
if ( init_grpci() ) {
diff --git a/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c b/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c
index e667779676..609c2b1d98 100644
--- a/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/sparc/leon3/shmsupp/getcfg.c
@@ -87,7 +87,7 @@ void Shm_Get_configuration(
extern rtems_configuration_table Configuration;
int i;
unsigned int tmp;
-
+
BSP_shm_cfgtbl.base = 0x40000000;
BSP_shm_cfgtbl.length = 0x00001000;
BSP_shm_cfgtbl.format = SHM_BIG;
@@ -108,7 +108,7 @@ void Shm_Get_configuration(
BSP_shm_cfgtbl.poll_intr = INTR_MODE;
BSP_shm_cfgtbl.Intr.address =
(vol_u32) &(LEON3_IrqCtrl_Regs->force[LEON3_Cpu_Index]);
- BSP_shm_cfgtbl.Intr.value = 1 << LEON3_MP_IRQ ;
+ BSP_shm_cfgtbl.Intr.value = 1 << LEON3_MP_IRQ ;
BSP_shm_cfgtbl.Intr.length = 4;
if (LEON3_Cpu_Index == 0) {
@@ -116,7 +116,7 @@ void Shm_Get_configuration(
for (i = 1;
i < (Configuration.User_multiprocessing_table)->maximum_nodes+1; i++)
tmp |= (1 << i);
- LEON3_IrqCtrl_Regs->mpstat = tmp;
+ LEON3_IrqCtrl_Regs->mpstat = tmp;
}
*shmcfg = &BSP_shm_cfgtbl;
diff --git a/c/src/lib/libbsp/sparc/leon3/shmsupp/lock.c b/c/src/lib/libbsp/sparc/leon3/shmsupp/lock.c
index f94cadb966..b915f746ef 100644
--- a/c/src/lib/libbsp/sparc/leon3/shmsupp/lock.c
+++ b/c/src/lib/libbsp/sparc/leon3/shmsupp/lock.c
@@ -45,10 +45,10 @@ asm(
".text\n"
".align 4\n"
"LEON3_Atomic_Swap:\n"
-" retl\n"
+" retl\n"
" swapa [%o1] 1, %o0\n"
-);
-
+);
+
void Shm_Lock(
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S b/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
index e25128c0f6..24be8c0cb0 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
+++ b/c/src/lib/libbsp/sparc/leon3/startup/bspidle.S
@@ -15,9 +15,9 @@
*/
-
+
#include <rtems/asm.h>
-
+
/* LEON specific power-down function */
.align 4
@@ -26,6 +26,6 @@ SYM(bsp_idle_thread):
pwdloop: mov %g0, %asr19
ba pwdloop
nop
- retl
+ retl
nop
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
index f53c1f4abc..fd44df82cf 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
@@ -24,21 +24,21 @@
/*
* Tells us if data cache snooping is available
- */
+ */
int CPU_SPARC_HAS_SNOOPING;
/*
* set_snooping
- *
+ *
* Read the data cache configuration register to determine if
* bus snooping is available. This is needed for some drivers so
- * that they can select the most efficient copy routines.
+ * that they can select the most efficient copy routines.
*
*/
-static inline int set_snooping(void)
+static inline int set_snooping(void)
{
- int tmp;
+ int tmp;
asm(" lda [%1] 2, %0 "
: "=r"(tmp)
: "r"(0xC)
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/setvec.c b/c/src/lib/libbsp/sparc/leon3/startup/setvec.c
index b48b3e050d..c7b8af6616 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/setvec.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/setvec.c
@@ -21,10 +21,10 @@
* http://www.rtems.com/license/LICENSE.
*
* Ported to LEON implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
+ * Research Corporation (OAR) under contract to the European Space
* Agency (ESA).
*
- * LEON modifications of respective RTEMS file: COPYRIGHT (c) 1995.
+ * LEON modifications of respective RTEMS file: COPYRIGHT (c) 1995.
* European Space Agency.
*
* $Id$
@@ -44,13 +44,13 @@ rtems_isr_entry set_vector( /* returns old vector */
if ( type )
rtems_interrupt_catch( handler, vector, &previous_isr );
- else
+ else
_CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
real_trap = SPARC_REAL_TRAP_NUMBER( vector );
if ( LEON_INT_TRAP( real_trap ) ) {
-
+
source = LEON_TRAP_SOURCE( real_trap );
LEON_Clear_interrupt( source );
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/spurious.c b/c/src/lib/libbsp/sparc/leon3/startup/spurious.c
index 3b0cab8e85..62d38d3f0c 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/spurious.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/spurious.c
@@ -1,11 +1,11 @@
/*
* LEON Spurious Trap Handler
*
- * This is just enough of a trap handler to let us know what
+ * This is just enough of a trap handler to let us know what
* the likely source of the trap was.
*
- * Developed as part of the port of RTEMS to the LEON implementation
- * of the SPARC by On-Line Applications Research Corporation (OAR)
+ * Developed as part of the port of RTEMS to the LEON implementation
+ * of the SPARC by On-Line Applications Research Corporation (OAR)
* under contract to the European Space Agency (ESA).
*
* COPYRIGHT (c) 1995. European Space Agency.
@@ -46,34 +46,34 @@ rtems_isr bsp_spurious_handler(
* First the ones defined by the basic architecture
*/
- case 0x00:
+ case 0x00:
printk( "reset\n" );
break;
- case 0x01:
+ case 0x01:
printk( "instruction access exception\n" );
break;
- case 0x02:
+ case 0x02:
printk( "illegal instruction\n" );
break;
- case 0x03:
+ case 0x03:
printk( "privileged instruction\n" );
break;
- case 0x04:
+ case 0x04:
printk( "fp disabled\n" );
break;
- case 0x07:
+ case 0x07:
printk( "memory address not aligned\n" );
break;
- case 0x08:
+ case 0x08:
printk( "fp exception\n" );
break;
- case 0x09:
+ case 0x09:
printk( "Unexpected trap (0x%2d) at address XXX\n",
real_trap
/* XXX FIXME isf->tpc */
);
break;
- case 0x0A:
+ case 0x0A:
printk( "tag overflow\n" );
break;
@@ -150,7 +150,7 @@ void bsp_spurious_initialize()
*/
if (( trap == 5 || trap == 6 ) ||
- (( trap >= 0x11 ) && ( trap <= 0x1f )) ||
+ (( trap >= 0x11 ) && ( trap <= 0x1f )) ||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
continue;
diff --git a/c/src/lib/libbsp/sparc/leon3/timer/timer.c b/c/src/lib/libbsp/sparc/leon3/timer/timer.c
index 03d7536db0..47de8339dc 100644
--- a/c/src/lib/libbsp/sparc/leon3/timer/timer.c
+++ b/c/src/lib/libbsp/sparc/leon3/timer/timer.c
@@ -10,10 +10,10 @@
* http://www.rtems.com/license/LICENSE.
*
* Ported to LEON implementation of the SPARC by On-Line Applications
- * Research Corporation (OAR) under contract to the European Space
+ * Research Corporation (OAR) under contract to the European Space
* Agency (ESA).
*
- * LEON modifications of respective RTEMS file: COPYRIGHT (c) 1995.
+ * LEON modifications of respective RTEMS file: COPYRIGHT (c) 1995.
* European Space Agency.
*
* $Id$
@@ -26,7 +26,7 @@
#define LEON3_TIMER_INDEX \
((rtems_configuration_get_user_multiprocessing_table()) ? \
(rtems_configuration_get_user_multiprocessing_table()->node) - 1 : 1)
-#else
+#else
#define LEON3_TIMER_INDEX 0
#endif
@@ -63,12 +63,12 @@ int benchmark_timer_read(void)
if (LEON3_Timer_Regs) {
total = LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].value;
-
+
total = 0xffffff - total;
-
+
if ( benchmark_timer_find_average_overhead == true )
return total; /* in one microsecond units */
-
+
if ( total < LEAST_VALID )
return 0; /* below timer resolution */