Skip to content

Commit 50bf490

Browse files
authored
Merge pull request #4455 from mysterywolf/raspi
[raspi] auto formatted
2 parents 5c50a87 + 1af9bbc commit 50bf490

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+325
-325
lines changed

bsp/raspberry-pi/raspi2/driver/bcm283x.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#include <rthw.h>
55

6-
#define PER_BASE (0x3F000000)
7-
#define PER_BASE_40000000 (0x40000000)
6+
#define PER_BASE (0x3F000000)
7+
#define PER_BASE_40000000 (0x40000000)
88

99
/*
1010
* GPIO
@@ -50,17 +50,17 @@
5050
/*
5151
* ARM Timer
5252
*/
53-
#define ARM_TIMER_BASE (PER_BASE + 0xB000)
53+
#define ARM_TIMER_BASE (PER_BASE + 0xB000)
5454

55-
#define ARM_TIMER_LOAD HWREG32(ARM_TIMER_BASE + 0x400)
56-
#define ARM_TIMER_VALUE HWREG32(ARM_TIMER_BASE + 0x404)
57-
#define ARM_TIMER_CTRL HWREG32(ARM_TIMER_BASE + 0x408)
58-
#define ARM_TIMER_IRQCLR HWREG32(ARM_TIMER_BASE + 0x40C)
59-
#define ARM_TIMER_RAWIRQ HWREG32(ARM_TIMER_BASE + 0x410)
60-
#define ARM_TIMER_MASKIRQ HWREG32(ARM_TIMER_BASE + 0x414)
61-
#define ARM_TIMER_RELOAD HWREG32(ARM_TIMER_BASE + 0x418)
62-
#define ARM_TIMER_PREDIV HWREG32(ARM_TIMER_BASE + 0x41C)
63-
#define ARM_TIMER_CNTR HWREG32(ARM_TIMER_BASE + 0x420)
55+
#define ARM_TIMER_LOAD HWREG32(ARM_TIMER_BASE + 0x400)
56+
#define ARM_TIMER_VALUE HWREG32(ARM_TIMER_BASE + 0x404)
57+
#define ARM_TIMER_CTRL HWREG32(ARM_TIMER_BASE + 0x408)
58+
#define ARM_TIMER_IRQCLR HWREG32(ARM_TIMER_BASE + 0x40C)
59+
#define ARM_TIMER_RAWIRQ HWREG32(ARM_TIMER_BASE + 0x410)
60+
#define ARM_TIMER_MASKIRQ HWREG32(ARM_TIMER_BASE + 0x414)
61+
#define ARM_TIMER_RELOAD HWREG32(ARM_TIMER_BASE + 0x418)
62+
#define ARM_TIMER_PREDIV HWREG32(ARM_TIMER_BASE + 0x41C)
63+
#define ARM_TIMER_CNTR HWREG32(ARM_TIMER_BASE + 0x420)
6464

6565
/*
6666
* Core Timer

bsp/raspberry-pi/raspi3-32/applications/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

bsp/raspberry-pi/raspi3-32/applications/mnt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

bsp/raspberry-pi/raspi3-32/applications/test_device.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* File : test_driver.h
3-
* Copyright (c) 2006-2018, RT-Thread Development Team
3+
* Copyright (c) 2006-2021, RT-Thread Development Team
44
*
55
* SPDX-License-Identifier: Apache-2.0
66
*
@@ -50,7 +50,7 @@ void test_hdmi()
5050
int i=0;
5151
for (; i < 20; i++) colors[i] = COLOR_RED;
5252
rt_graphix_ops(hdmi) -> blit_line((char *)colors, 20, 20, 20);
53-
53+
5454
#endif
5555
}
5656

@@ -73,8 +73,8 @@ void test_cpusmp(void)
7373
{
7474
rt_kprintf("Hello Test SMP!\n");
7575
#ifdef RT_USING_SMP
76-
int i;
77-
char test_name[RT_NAME_MAX];
76+
int i;
77+
char test_name[RT_NAME_MAX];
7878
for (i = 0; i < _CPUS_NR; i++)
7979
{
8080
rt_sprintf(test_name, "smp%d", i);
@@ -162,17 +162,17 @@ void test_i2c(void)
162162
rt_kprintf("can't find %s device!\n", name);
163163
else
164164
{
165-
read_regs(i2c_bus, 7, buf);
166-
buf[0] = buf[0]&0x7F; //sec
167-
buf[1] = buf[1]&0x7F; //min
168-
buf[2] = buf[2]&0x3F; //hour
169-
buf[3] = buf[3]&0x07; //week
170-
buf[4] = buf[4]&0x3F; //day
171-
buf[5] = buf[5]&0x1F; //mouth
172-
//year/month/day
173-
rt_kprintf("20%02x-%02x-%02x ",buf[6],buf[5],buf[4]);
174-
//hour:minute/second
175-
rt_kprintf("%02x:%02x:%02x \n",buf[2],buf[1],buf[0]);
165+
read_regs(i2c_bus, 7, buf);
166+
buf[0] = buf[0]&0x7F; //sec
167+
buf[1] = buf[1]&0x7F; //min
168+
buf[2] = buf[2]&0x3F; //hour
169+
buf[3] = buf[3]&0x07; //week
170+
buf[4] = buf[4]&0x3F; //day
171+
buf[5] = buf[5]&0x1F; //mouth
172+
//year/month/day
173+
rt_kprintf("20%02x-%02x-%02x ",buf[6],buf[5],buf[4]);
174+
//hour:minute/second
175+
rt_kprintf("%02x:%02x:%02x \n",buf[2],buf[1],buf[0]);
176176
}
177177
#endif
178178
}

bsp/raspberry-pi/raspi3-32/cpu/armv7.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

bsp/raspberry-pi/raspi3-32/cpu/cp15.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -57,7 +57,7 @@ static inline void send_ipi_msg(int cpu, int ipi_vector)
5757

5858
static inline void setup_bootstrap_addr(int cpu, int addr)
5959
{
60-
CORE_MAILBOX3_SET(cpu) = addr;
60+
CORE_MAILBOX3_SET(cpu) = addr;
6161
}
6262

6363
static inline void enable_cpu_ipi_intr(int cpu)
@@ -67,7 +67,7 @@ static inline void enable_cpu_ipi_intr(int cpu)
6767

6868
static inline void enable_cpu_timer_intr(int cpu)
6969
{
70-
CORETIMER_INTCTL(cpu) = 0x8;
70+
CORETIMER_INTCTL(cpu) = 0x8;
7171
}
7272

7373
static inline void enable_cntv(void)

bsp/raspberry-pi/raspi3-32/cpu/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -52,7 +52,7 @@ void rt_hw_spin_lock(rt_hw_spinlock_t *lock)
5252
: "r" (&lock->slock), "I" (1 << 16)
5353
: "cc");
5454

55-
while (lockval.tickets.next != lockval.tickets.owner)
55+
while (lockval.tickets.next != lockval.tickets.owner)
5656
{
5757
__WFE();
5858
lockval.tickets.owner = *(volatile unsigned short *)(&lock->tickets.owner);

bsp/raspberry-pi/raspi3-32/cpu/interrupt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
66
* Change Logs:
77
* Date Author Notes
88
* 2018/5/3 Bernard first version
99
* 2019-07-28 zdzn add smp support
10-
* 2019-08-09 zhangjun fixup the problem of smp startup and scheduling issues,
10+
* 2019-08-09 zhangjun fixup the problem of smp startup and scheduling issues,
1111
* write addr to mailbox3 to startup smp, and we use mailbox0 for ipi
1212
*/
1313

@@ -163,15 +163,15 @@ void rt_hw_ipi_send(int ipi_vector, unsigned int cpu_mask)
163163
}
164164
if (cpu_mask & 0x2)
165165
{
166-
send_ipi_msg(1, ipi_vector);
166+
send_ipi_msg(1, ipi_vector);
167167
}
168168
if (cpu_mask & 0x4)
169169
{
170-
send_ipi_msg(2, ipi_vector);
170+
send_ipi_msg(2, ipi_vector);
171171
}
172172
if (cpu_mask & 0x8)
173173
{
174-
send_ipi_msg(3, ipi_vector);
174+
send_ipi_msg(3, ipi_vector);
175175
}
176176
__DSB();
177177
}

bsp/raspberry-pi/raspi3-32/cpu/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2019, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

bsp/raspberry-pi/raspi3-32/cpu/mmu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
/* normal memory mapping type */
4444
#define NORMAL_MEM (SHARED | AP_RW | DOMAIN0 | MEMWBWA | DESC_SEC)
4545
#define STRONG_ORDER_MEM (SHARED | AP_RO | XN | DESC_SEC)
46-
#define BUS_ADDRESS(phys) (((phys) & ~0xC0000000) | 0xC0000000)
46+
#define BUS_ADDRESS(phys) (((phys) & ~0xC0000000) | 0xC0000000)
4747

4848
void rt_hw_change_mmu_table(rt_uint32_t vaddrStart,
4949
rt_uint32_t size,

0 commit comments

Comments
 (0)