Skip to content

Commit f191694

Browse files
committed
[ci][action.yml]CI加入龙芯ls2kdev
1 parent 13b0b60 commit f191694

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

.github/workflows/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
- {RTT_BSP: "lpc54114-lite", RTT_TOOL_CHAIN: "sourcery-arm"}
6060
- {RTT_BSP: "ls1bdev", RTT_TOOL_CHAIN: "sourcery-mips"}
6161
- {RTT_BSP: "ls1cdev", RTT_TOOL_CHAIN: "sourcery-mips"}
62+
- {RTT_BSP: "ls2kdev", RTT_TOOL_CHAIN: "sourcery-mips"}
6263
- {RTT_BSP: "mb9bf500r", RTT_TOOL_CHAIN: "sourcery-arm"}
6364
- {RTT_BSP: "mb9bf506r", RTT_TOOL_CHAIN: "sourcery-arm"}
6465
- {RTT_BSP: "mb9bf618s", RTT_TOOL_CHAIN: "sourcery-arm"}

bsp/ls2kdev/.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ CONFIG_RT_LWIP_USING_PING=y
415415
# CONFIG_PKG_USING_AGILE_FTP is not set
416416
# CONFIG_PKG_USING_EMBEDDEDPROTO is not set
417417
# CONFIG_PKG_USING_RT_LINK_HW is not set
418+
# CONFIG_PKG_USING_HM is not set
418419

419420
#
420421
# security packages
@@ -688,4 +689,4 @@ CONFIG_RT_LWIP_USING_PING=y
688689
CONFIG_SOC_LS=y
689690
CONFIG_SOC_LS2K1000=y
690691
CONFIG_RT_USING_UART0=y
691-
CONFIG_RT_USING_UART4=y
692+
# CONFIG_RT_USING_UART4 is not set

bsp/ls2kdev/drivers/drv_spi.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2020, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -8,37 +8,39 @@
88
* 2020-10-28 0xcccccccccccc Initial Version
99
* 2021-01-17 0xcccccccccccc Bug Fixed : clock division cannot been adjusted as expected due to wrong register configuration.
1010
*/
11+
1112
/**
1213
* @addtogroup ls2k
1314
*/
1415
/*@{*/
15-
#include <stdio.h>
16+
1617
#include <stdlib.h>
1718
#include <ctype.h>
19+
#include <stdint.h>
1820
#include <rtthread.h>
1921
#include <drivers/spi.h>
2022
#include "drv_spi.h"
2123

2224
#ifdef RT_USING_SPI
2325
static void spi_init(uint8_t spre_spr, uint8_t copl, uint8_t cpha)
2426
{
25-
SET_SPI(SPSR, 0xc0);
27+
SET_SPI(SPSR, 0xc0);
2628
SET_SPI(PARAM, 0x40);
2729
SET_SPI(PARAM2, 0x01);
2830
SET_SPI(SPER, (spre_spr & 0b00001100) >> 2);
29-
SET_SPI(SPCR, 0x50 | copl << 3 | cpha << 2 | (spre_spr & 0b00000011));
31+
SET_SPI(SPCR, 0x50 | copl << 3 | cpha << 2 | (spre_spr & 0b00000011));
3032
SET_SPI(SOFTCS, 0xff);
3133
}
3234

33-
static void spi_set_csn(uint8_t val)
35+
static void spi_set_csn(uint8_t val)
3436
{
3537
SET_SPI(SOFTCS, val);
3638
}
3739

3840
#ifdef RT_USING_SPI_GPIOCS
3941
#include <drivers/pin.h>
4042
#endif
41-
static void spi_set_cs(unsigned char cs, int new_status)
43+
static void spi_set_cs(unsigned char cs, int new_status)
4244
{
4345
if (cs < 4)
4446
{

bsp/ls2kdev/drivers/drv_spi.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2020, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -14,12 +14,9 @@
1414
#ifndef LS2K_DRV_SPI_H
1515
#define LS2K_DRV_SPI_H
1616

17-
#include <rtthread.h>
18-
#include <rthw.h>
19-
2017
// kseg1 byte operation
21-
#define KSEG1_STORE8(addr,val) *(volatile char *)(0xffffffffa0000000 | addr) = val
22-
#define KSEG1_LOAD8(addr) *(volatile char *)(0xffffffffa0000000 | addr)
18+
#define KSEG1_STORE8(addr,val) *(volatile char *)(0xffffffffa0000000 | addr) = val
19+
#define KSEG1_LOAD8(addr) *(volatile char *)(0xffffffffa0000000 | addr)
2320
// clock configurations
2421
#define APB_MAX_SPEED 125000000U
2522
#define APB_FREQSCALE (((KSEG1_LOAD8(0xffffffffbfe104d2)>>4)&0x7)+1)
@@ -30,7 +27,7 @@
3027
// bit bias
3128
#define SPCR 0x0
3229
#define SPSR 0x1
33-
#define FIFO 0x2
30+
#define FIFO 0x2
3431
#define TXFIFO 0x2
3532
#define RXFIFO 0x2
3633
#define SPER 0x3

bsp/ls2kdev/rtconfig.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,5 @@
253253
#define SOC_LS
254254
#define SOC_LS2K1000
255255
#define RT_USING_UART0
256-
#define RT_USING_UART4
257256

258257
#endif

libcpu/mips/gs264/mmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <rtthread.h>
1313
#include <rthw.h>
1414
#include <board.h>
15+
#include <stddef.h>
1516

1617
#include "cache.h"
1718
#include "mips_mmu.h"

0 commit comments

Comments
 (0)