arch: or1k: nxstyle fixes
Nxstyle fixes to pass CI Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
parent
fd512dcc4b
commit
7e2ee8b9bb
|
@ -215,6 +215,7 @@ static inline irqstate_t up_irq_save(void)
|
|||
mfspr(SPR_SYS_SR, flags);
|
||||
|
||||
/* Disable IRQs */
|
||||
|
||||
x = flags & ~(SPR_SR_IEE | SPR_SR_TEE);
|
||||
mtspr(SPR_SYS_SR, x);
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* Terminology. In the flat build (CONFIG_BUILD_FLAT=y), there is only a
|
||||
* single heap access with the standard allocations (malloc/free). This
|
||||
* heap is referred to as the user heap. In the protected build
|
||||
|
@ -86,7 +87,8 @@
|
|||
*
|
||||
* Kernel .data region. Size determined at link time.
|
||||
* Kernel .bss region Size determined at link time.
|
||||
* Kernel IDLE thread stack. Size determined by CONFIG_IDLETHREAD_STACKSIZE.
|
||||
* Kernel IDLE thread stack. Size determined by
|
||||
* CONFIG_IDLETHREAD_STACKSIZE.
|
||||
* Padding for alignment
|
||||
* User .data region. Size determined at link time.
|
||||
* User .bss region Size determined at link time.
|
||||
|
@ -107,7 +109,8 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||
* of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment).
|
||||
*/
|
||||
|
||||
uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + CONFIG_MM_KERNEL_HEAPSIZE;
|
||||
uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend +
|
||||
CONFIG_MM_KERNEL_HEAPSIZE;
|
||||
size_t usize = CONFIG_RAM_END - ubase;
|
||||
|
||||
DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END);
|
||||
|
@ -147,7 +150,8 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
|||
* of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment).
|
||||
*/
|
||||
|
||||
uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + CONFIG_MM_KERNEL_HEAPSIZE;
|
||||
uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend +
|
||||
CONFIG_MM_KERNEL_HEAPSIZE;
|
||||
DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END);
|
||||
|
||||
/* Return the kernel heap settings (i.e., the part of the heap region
|
||||
|
|
|
@ -68,8 +68,10 @@ int or1k_print_cpuinfo(void)
|
|||
if ((vr & SPR_VR_UVRP) != 0)
|
||||
{
|
||||
mfspr(SPR_SYS_VR2, vr2);
|
||||
syslog(LOG_INFO, " CPUID: %d\n", (vr2 & SPR_VR2_CPUID_MASK) >> SPR_VR2_CPUID_SHIFT);
|
||||
syslog(LOG_INFO, " V2.VER: 0x%x\n", (vr2 & SPR_VR2_VER_MASK) >> SPR_VR2_VER_SHIFT);
|
||||
syslog(LOG_INFO, " CPUID: %d\n",
|
||||
(vr2 & SPR_VR2_CPUID_MASK) >> SPR_VR2_CPUID_SHIFT);
|
||||
syslog(LOG_INFO, " V2.VER: 0x%x\n",
|
||||
(vr2 & SPR_VR2_VER_MASK) >> SPR_VR2_VER_SHIFT);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, " AVR/VR2: %s\n",
|
||||
|
|
|
@ -148,14 +148,14 @@ EXTERN uint32_t g_intstackalloc; /* Allocated stack base */
|
|||
EXTERN uint32_t g_intstackbase; /* Initial top of interrupt stack */
|
||||
#endif
|
||||
|
||||
/* These 'addresses' of these values are setup by the linker script. They are
|
||||
* not actual uint32_t storage locations! They are only used meaningfully in the
|
||||
* following way:
|
||||
/* These 'addresses' of these values are setup by the linker script. They
|
||||
* are not actual uint32_t storage locations! They are only used meaningfully
|
||||
* in the following way:
|
||||
*
|
||||
* - The linker script defines, for example, the symbol_sdata.
|
||||
* - The declareion extern uint32_t _sdata; makes C happy. C will believe
|
||||
* that the value _sdata is the address of a uint32_t variable _data (it is
|
||||
* not!).
|
||||
* that the value _sdata is the address of a uint32_t variable _data
|
||||
* (it is not!).
|
||||
* - We can recoved the linker value then by simply taking the address of
|
||||
* of _data. like: uint32_t *pdata = &_sdata;
|
||||
*/
|
||||
|
@ -168,9 +168,9 @@ EXTERN uint32_t _edata; /* End+1 of .data */
|
|||
EXTERN uint32_t _sbss; /* Start of .bss */
|
||||
EXTERN uint32_t _ebss; /* End+1 of .bss */
|
||||
|
||||
/* Sometimes, functions must be executed from RAM. In this case, the following
|
||||
* macro may be used (with GCC!) to specify a function that will execute from
|
||||
* RAM. For example,
|
||||
/* Sometimes, functions must be executed from RAM. In this case, the
|
||||
* following macro may be used (with GCC!) to specify a function that will
|
||||
* execute from RAM. For example,
|
||||
*
|
||||
* int __ramfunc__ foo (void);
|
||||
* int __ramfunc__ foo (void) { return bar; }
|
||||
|
@ -210,12 +210,12 @@ EXTERN uint32_t _eramfuncs; /* Copy destination end address in RAM */
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
* Public Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Low level initialization provided by board-level logic ******************/
|
||||
/* Low level initialization provided by board-level logic *******************/
|
||||
|
||||
void or1k_boot(void);
|
||||
int or1k_print_cpuinfo(void);
|
||||
|
@ -308,10 +308,10 @@ void up_wdtinit(void);
|
|||
|
||||
/* Networking ***************************************************************/
|
||||
|
||||
/* Defined in board/xyz_network.c for board-specific Ethernet implementations,
|
||||
* or chip/xyx_ethernet.c for chip-specific Ethernet implementations, or
|
||||
* common/up_etherstub.c for a corner case where the network is enabled yet
|
||||
* there is no Ethernet driver to be initialized.
|
||||
/* Defined in board/xyz_network.c for board-specific Ethernet
|
||||
* implementations, or chip/xyx_ethernet.c for chip-specific Ethernet
|
||||
* implementations, or common/up_etherstub.c for a corner case where the
|
||||
* network is enabled yet there is no Ethernet driver to be initialized.
|
||||
*
|
||||
* Use of common/up_etherstub.c is deprecated. The preferred mechanism is to
|
||||
* use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in
|
||||
|
|
|
@ -73,7 +73,9 @@
|
|||
static int or1k_timer_isr(int irq, uint32_t *regs, void *arg)
|
||||
{
|
||||
uint32_t ttmr = TTMR_LOAD;
|
||||
|
||||
/* Clear the TTMR interrupt */
|
||||
|
||||
mtspr(SPR_TICK_TTMR, ttmr);
|
||||
|
||||
nxsched_process_timer();
|
||||
|
|
|
@ -88,7 +88,7 @@ void up_earlyserialinit(void)
|
|||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
/* Mark the serial console (if any) */
|
||||
|
||||
//CONSOLE_DEV.isconsole = true;
|
||||
/* CONSOLE_DEV.isconsole = true; */
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -139,10 +139,11 @@ int up_putc(int ch)
|
|||
{
|
||||
/* Add CR */
|
||||
|
||||
//or1k_lowputc('\r');
|
||||
/* or1k_lowputc('\r'); */
|
||||
}
|
||||
|
||||
//or1k_lowputc(ch);
|
||||
/* or1k_lowputc(ch); */
|
||||
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
return ch;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
* Public Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -145,7 +145,8 @@ void up_ack_irq(int irq)
|
|||
{
|
||||
if (irq <= 31)
|
||||
{
|
||||
//uint32_t sr = (1 << irq);
|
||||
/* uint32_t sr = (1 << irq); */
|
||||
|
||||
uint32_t sr = 0;
|
||||
mtspr(SPR_PIC_SR, sr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue