mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 18:33:54 +08:00
bsps/sparc: Change tabs to spaces.
This commit is contained in:
committed by
Daniel Hellstrom
parent
c903fc28a9
commit
9f058fb1c2
@@ -82,14 +82,14 @@ static CPU_Counter_ticks erc32_counter_difference(
|
||||
rtems_configuration_get_microseconds_per_tick(); \
|
||||
\
|
||||
ERC32_MEC_Set_Real_Time_Clock_Timer_Control( \
|
||||
ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING | \
|
||||
ERC32_MEC_TIMER_COUNTER_LOAD_SCALER | \
|
||||
ERC32_MEC_TIMER_COUNTER_LOAD_COUNTER \
|
||||
ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING | \
|
||||
ERC32_MEC_TIMER_COUNTER_LOAD_SCALER | \
|
||||
ERC32_MEC_TIMER_COUNTER_LOAD_COUNTER \
|
||||
); \
|
||||
\
|
||||
ERC32_MEC_Set_Real_Time_Clock_Timer_Control( \
|
||||
ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING | \
|
||||
ERC32_MEC_TIMER_COUNTER_RELOAD_AT_ZERO \
|
||||
ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING | \
|
||||
ERC32_MEC_TIMER_COUNTER_RELOAD_AT_ZERO \
|
||||
); \
|
||||
_SPARC_Counter_initialize( \
|
||||
&ERC32_MEC.Real_Time_Clock_Counter, \
|
||||
|
||||
@@ -148,7 +148,7 @@ static int erc32_console_first_open(int major, int minor, void *arg)
|
||||
|
||||
#if (CONSOLE_USE_INTERRUPTS)
|
||||
static ssize_t erc32_console_write_support_int(
|
||||
int minor, const char *buf, size_t len)
|
||||
int minor, const char *buf, size_t len)
|
||||
{
|
||||
if (len > 0) {
|
||||
console_data *cd = &Console_Port_Data[minor];
|
||||
@@ -264,7 +264,7 @@ static void erc32_console_isr_b(
|
||||
buf[i] = ERC32_MEC.UART_Channel_B;
|
||||
++i;
|
||||
}
|
||||
if ( i )
|
||||
if ( i )
|
||||
rtems_termios_enqueue_raw_characters(cd->termios_data, buf, i);
|
||||
|
||||
/* dequeue transmitted chars */
|
||||
|
||||
@@ -112,9 +112,9 @@ int rtems_erc32_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config)
|
||||
{
|
||||
|
||||
ERC32_MEC.IO_Configuration |=
|
||||
(0x15 << (((SONIC_BASE_ADDRESS >> 24) & 0x3) * 8));
|
||||
(0x15 << (((SONIC_BASE_ADDRESS >> 24) & 0x3) * 8));
|
||||
ERC32_MEC.Control &= ~0x60001; /* Disable DMA time-out, parity & power-down */
|
||||
ERC32_MEC.Control |= 0x10000; /* Enable DMA */
|
||||
ERC32_MEC.Control |= 0x10000; /* Enable DMA */
|
||||
ERC32_MEC.Interrupt_Mask &= ~(1 << (SONIC_VECTOR - 0x10));
|
||||
return(rtems_sonic_driver_attach( config, &erc32_sonic_configuration ));
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ struct rtems_bsdnet_ifconfig;
|
||||
extern int rtems_erc32_sonic_driver_attach(
|
||||
struct rtems_bsdnet_ifconfig *config
|
||||
);
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
|
||||
|
||||
/* Constants */
|
||||
|
||||
|
||||
@@ -160,9 +160,9 @@ void bsp_spurious_initialize()
|
||||
* paramaters to the program.
|
||||
*/
|
||||
|
||||
if (( trap == 5 || trap == 6 ) ||
|
||||
(( trap >= 0x11 ) && ( trap <= 0x1f )) ||
|
||||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
|
||||
if (( trap == 5 || trap == 6 ) ||
|
||||
(( trap >= 0x11 ) && ( trap <= 0x1f )) ||
|
||||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
|
||||
continue;
|
||||
|
||||
set_vector( (rtems_isr_entry) bsp_spurious_handler,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ extern int CLOCK_SPEED;
|
||||
#define Clock_driver_support_initialize_hardware() \
|
||||
do { \
|
||||
LEON_REG.Timer_Reload_1 = \
|
||||
rtems_configuration_get_microseconds_per_tick() - 1; \
|
||||
rtems_configuration_get_microseconds_per_tick() - 1; \
|
||||
\
|
||||
LEON_REG.Timer_Control_1 = ( \
|
||||
LEON_REG_TIMER_COUNTER_ENABLE_COUNTING | \
|
||||
|
||||
@@ -322,7 +322,7 @@ rtems_device_driver console_initialize(
|
||||
|
||||
LEON_REG.UART_Control_1 |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
|
||||
LEON_REG.UART_Control_2 |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE |
|
||||
LEON_REG_UART_CTRL_RI; /* rx irq default enable for remote debugger */
|
||||
LEON_REG_UART_CTRL_RI; /* rx irq default enable for remote debugger */
|
||||
LEON_REG.UART_Status_1 = 0;
|
||||
LEON_REG.UART_Status_2 = 0;
|
||||
#if (CONSOLE_USE_INTERRUPTS)
|
||||
|
||||
@@ -69,7 +69,7 @@ extern int rtems_leon_open_eth_driver_attach(
|
||||
extern int rtems_smc91111_driver_attach_leon2(
|
||||
struct rtems_bsdnet_ifconfig *config
|
||||
);
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "open_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "open_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH \
|
||||
rtems_leon_open_eth_driver_attach
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 \
|
||||
|
||||
@@ -102,49 +102,49 @@ extern "C" {
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
volatile unsigned int Memory_Config_1;
|
||||
volatile unsigned int Memory_Config_2;
|
||||
volatile unsigned int Edac_Control;
|
||||
volatile unsigned int Failed_Address;
|
||||
volatile unsigned int Memory_Status;
|
||||
volatile unsigned int Cache_Control;
|
||||
volatile unsigned int Power_Down;
|
||||
volatile unsigned int Write_Protection_1;
|
||||
volatile unsigned int Write_Protection_2;
|
||||
volatile unsigned int Leon_Configuration;
|
||||
volatile unsigned int dummy2;
|
||||
volatile unsigned int dummy3;
|
||||
volatile unsigned int dummy4;
|
||||
volatile unsigned int dummy5;
|
||||
volatile unsigned int dummy6;
|
||||
volatile unsigned int dummy7;
|
||||
volatile unsigned int Timer_Counter_1;
|
||||
volatile unsigned int Timer_Reload_1;
|
||||
volatile unsigned int Timer_Control_1;
|
||||
volatile unsigned int Watchdog;
|
||||
volatile unsigned int Timer_Counter_2;
|
||||
volatile unsigned int Timer_Reload_2;
|
||||
volatile unsigned int Timer_Control_2;
|
||||
volatile unsigned int dummy8;
|
||||
volatile unsigned int Scaler_Counter;
|
||||
volatile unsigned int Scaler_Reload;
|
||||
volatile unsigned int dummy9;
|
||||
volatile unsigned int dummy10;
|
||||
volatile unsigned int UART_Channel_1;
|
||||
volatile unsigned int UART_Status_1;
|
||||
volatile unsigned int UART_Control_1;
|
||||
volatile unsigned int UART_Scaler_1;
|
||||
volatile unsigned int UART_Channel_2;
|
||||
volatile unsigned int UART_Status_2;
|
||||
volatile unsigned int UART_Control_2;
|
||||
volatile unsigned int UART_Scaler_2;
|
||||
volatile unsigned int Interrupt_Mask;
|
||||
volatile unsigned int Interrupt_Pending;
|
||||
volatile unsigned int Interrupt_Force;
|
||||
volatile unsigned int Interrupt_Clear;
|
||||
volatile unsigned int PIO_Data;
|
||||
volatile unsigned int PIO_Direction;
|
||||
volatile unsigned int PIO_Interrupt;
|
||||
volatile unsigned int Memory_Config_1;
|
||||
volatile unsigned int Memory_Config_2;
|
||||
volatile unsigned int Edac_Control;
|
||||
volatile unsigned int Failed_Address;
|
||||
volatile unsigned int Memory_Status;
|
||||
volatile unsigned int Cache_Control;
|
||||
volatile unsigned int Power_Down;
|
||||
volatile unsigned int Write_Protection_1;
|
||||
volatile unsigned int Write_Protection_2;
|
||||
volatile unsigned int Leon_Configuration;
|
||||
volatile unsigned int dummy2;
|
||||
volatile unsigned int dummy3;
|
||||
volatile unsigned int dummy4;
|
||||
volatile unsigned int dummy5;
|
||||
volatile unsigned int dummy6;
|
||||
volatile unsigned int dummy7;
|
||||
volatile unsigned int Timer_Counter_1;
|
||||
volatile unsigned int Timer_Reload_1;
|
||||
volatile unsigned int Timer_Control_1;
|
||||
volatile unsigned int Watchdog;
|
||||
volatile unsigned int Timer_Counter_2;
|
||||
volatile unsigned int Timer_Reload_2;
|
||||
volatile unsigned int Timer_Control_2;
|
||||
volatile unsigned int dummy8;
|
||||
volatile unsigned int Scaler_Counter;
|
||||
volatile unsigned int Scaler_Reload;
|
||||
volatile unsigned int dummy9;
|
||||
volatile unsigned int dummy10;
|
||||
volatile unsigned int UART_Channel_1;
|
||||
volatile unsigned int UART_Status_1;
|
||||
volatile unsigned int UART_Control_1;
|
||||
volatile unsigned int UART_Scaler_1;
|
||||
volatile unsigned int UART_Channel_2;
|
||||
volatile unsigned int UART_Status_2;
|
||||
volatile unsigned int UART_Control_2;
|
||||
volatile unsigned int UART_Scaler_2;
|
||||
volatile unsigned int Interrupt_Mask;
|
||||
volatile unsigned int Interrupt_Pending;
|
||||
volatile unsigned int Interrupt_Force;
|
||||
volatile unsigned int Interrupt_Clear;
|
||||
volatile unsigned int PIO_Data;
|
||||
volatile unsigned int PIO_Direction;
|
||||
volatile unsigned int PIO_Interrupt;
|
||||
} LEON_Register_Map;
|
||||
|
||||
#endif
|
||||
@@ -396,9 +396,9 @@ static __inline__ int bsp_irq_fixup(int irq)
|
||||
/* Load 32-bit word by forcing a cache-miss */
|
||||
static inline unsigned int leon_r32_no_cache(uintptr_t addr)
|
||||
{
|
||||
unsigned int tmp;
|
||||
__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
|
||||
return tmp;
|
||||
unsigned int tmp;
|
||||
__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#endif /* !ASM */
|
||||
|
||||
@@ -100,18 +100,18 @@ struct uart_reg {
|
||||
|
||||
|
||||
void uart_register(unsigned int baseaddr);
|
||||
rtems_device_driver uart_initialize(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_driver uart_initialize(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_driver uart_open(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_driver uart_close(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_driver uart_read(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_driver uart_write(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_driver uart_control(rtems_device_major_number major,
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
rtems_device_minor_number minor, void *arg);
|
||||
|
||||
|
||||
struct gpio_reg {
|
||||
|
||||
@@ -345,7 +345,7 @@ int rasta_register(void)
|
||||
/*brm_register(bar0 + BRM_OFFSET, bar1);*/
|
||||
/* register the BRM RASTA driver, use 128k on RASTA SRAM... */
|
||||
b1553brm_rasta_int_reg=rasta_interrrupt_register;
|
||||
if ( b1553brm_rasta_register(&abus,2,0,3,bar1,0x40000000) ){
|
||||
if ( b1553brm_rasta_register(&abus,2,0,3,bar1,0x40000000) ){
|
||||
printk("Failed to register BRM RASTA driver\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -148,8 +148,8 @@ void bsp_spurious_initialize()
|
||||
*/
|
||||
|
||||
if (( trap == 5 || trap == 6 ) ||
|
||||
(( trap >= 0x11 ) && ( trap <= 0x1f )) ||
|
||||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
|
||||
(( trap >= 0x11 ) && ( trap <= 0x1f )) ||
|
||||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
|
||||
continue;
|
||||
|
||||
set_vector(
|
||||
|
||||
@@ -79,13 +79,13 @@ extern int rtems_leon_greth_driver_attach(
|
||||
int attach
|
||||
);
|
||||
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_OPENETH "open_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH \
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_OPENETH "open_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH \
|
||||
rtems_leon_open_eth_driver_attach
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_SMC91111 "smc_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_SMC91111 "smc_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 \
|
||||
rtems_smc91111_driver_attach_leon3
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_GRETH "gr_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_GRETH "gr_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_GRETH \
|
||||
rtems_leon_greth_driver_attach
|
||||
|
||||
|
||||
@@ -287,9 +287,9 @@ extern rtems_interrupt_lock LEON3_IrqCtrl_Lock;
|
||||
/* Load 32-bit word by forcing a cache-miss */
|
||||
static inline unsigned int leon_r32_no_cache(uintptr_t addr)
|
||||
{
|
||||
unsigned int tmp;
|
||||
__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
|
||||
return tmp;
|
||||
unsigned int tmp;
|
||||
__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/* Let user override which on-chip APBUART will be debug UART
|
||||
|
||||
@@ -36,7 +36,7 @@ scmv91111_configuration_t leon_scmv91111_configuration = {
|
||||
*/
|
||||
int
|
||||
rtems_smc91111_driver_attach_leon3 (struct rtems_bsdnet_ifconfig *config,
|
||||
int attach)
|
||||
int attach)
|
||||
{
|
||||
unsigned long addr_mctrl = 0;
|
||||
struct grgpio_regs *io;
|
||||
@@ -70,10 +70,8 @@ rtems_smc91111_driver_attach_leon3 (struct rtems_bsdnet_ifconfig *config,
|
||||
addr_mctrl = (unsigned long) apbmctrl.start;
|
||||
io = (struct grgpio_regs *) apbpio.start;
|
||||
|
||||
printk(
|
||||
"Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
|
||||
(unsigned int)io,
|
||||
(unsigned int)addr_mctrl);
|
||||
printk("Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
|
||||
(unsigned int)io, (unsigned int)addr_mctrl);
|
||||
|
||||
/* Setup PIO IRQ */
|
||||
io->imask |= (1 << leon_scmv91111_configuration.pio);
|
||||
@@ -83,7 +81,7 @@ rtems_smc91111_driver_attach_leon3 (struct rtems_bsdnet_ifconfig *config,
|
||||
|
||||
/* Setup memory controller I/O waitstates */
|
||||
*((volatile unsigned int *) addr_mctrl) |=
|
||||
0x10f80000; /* enable I/O area access */
|
||||
0x10f80000; /* enable I/O area access */
|
||||
|
||||
return _rtems_smc91111_driver_attach(config, &leon_scmv91111_configuration);
|
||||
};
|
||||
|
||||
@@ -44,9 +44,9 @@ extern unsigned int LEON3_Atomic_Swap(uint32_t value, uint32_t *address);
|
||||
__asm__ (
|
||||
".text\n"
|
||||
".align 4\n"
|
||||
"LEON3_Atomic_Swap:\n"
|
||||
" retl\n"
|
||||
" swapa [%o1] 1, %o0\n"
|
||||
"LEON3_Atomic_Swap:\n"
|
||||
" retl\n"
|
||||
" swapa [%o1] 1, %o0\n"
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -152,8 +152,8 @@ void bsp_spurious_initialize()
|
||||
*/
|
||||
|
||||
if (( trap == 5 || trap == 6 ) ||
|
||||
(( trap >= 0x11 ) && ( trap <= 0x1f )) ||
|
||||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
|
||||
(( trap >= 0x11 ) && ( trap <= 0x1f )) ||
|
||||
(( trap >= 0x70 ) && ( trap <= 0x83 )))
|
||||
continue;
|
||||
|
||||
set_vector(
|
||||
|
||||
Reference in New Issue
Block a user