Skip to content

Commit bae7358

Browse files
committed
Rename ec to soc
Use the more generic descriptor as the directory name for microcontroller support, as is used in other firmware-related projects. SoC vendor name, which is used to add the correct subdirectory, is now determined in the general SoC Makefile instead of per-board. Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent 39f1a9e commit bae7358

File tree

184 files changed

+400
-435
lines changed

Some content is hidden

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

184 files changed

+400
-435
lines changed

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,10 @@ include $(BOARD_DIR)/Makefile.mk
4343
SRC += $(foreach src, $(board-y), $(BOARD_DIR)/$(src))
4444
SRC += $(foreach src, $(keyboard-y), $(KEYBOARD_DIR)/$(src))
4545

46-
# The board will define the embedded controller
47-
# Include the embedded controller's source
48-
EC_DIR=src/ec/$(EC)
49-
INCLUDE += $(EC_DIR)/Makefile.mk
50-
CFLAGS+=-I$(EC_DIR)/include
51-
include $(EC_DIR)/Makefile.mk
52-
SRC += $(foreach src, $(ec-y), $(EC_DIR)/$(src))
53-
54-
# The EC will define the architecture
46+
# The board will define the SoC
47+
include src/soc/Makefile.mk
48+
49+
# The SoC will define the architecture
5550
# Include the architecture's source
5651
ARCH_DIR=src/arch/$(ARCH)
5752
INCLUDE += $(ARCH_DIR)/Makefile.mk

src/app/main/battery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ uint16_t battery_charger_input_current = CHARGER_INPUT_CURRENT;
1515
#define BATTERY_END_DEFAULT 100
1616

1717
// Flash address to save charging thresholds to
18-
static const uint32_t BAT_CFG_ADDR = CONFIG_EC_FLASH_SIZE - (2 * 1024);
18+
static const uint32_t BAT_CFG_ADDR = CONFIG_SOC_FLASH_SIZE - (2 * 1024);
1919
static const uint16_t BAT_CFG_MAGIC = 0x4254;
2020

2121
struct battery_config {

src/app/main/dgpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <board/gpio.h>
66
#include <common/debug.h>
77
#include <common/macro.h>
8-
#include <ec/i2c.h>
8+
#include <soc/i2c.h>
99

1010
int16_t dgpu_temp = 0;
1111

src/app/main/espi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#include <arch/delay.h>
77
#include <common/debug.h>
88
#include <common/macro.h>
9-
#include <ec/ecpm.h>
10-
#include <ec/gctrl.h>
11-
#include <ec/gpio.h>
9+
#include <soc/ecpm.h>
10+
#include <soc/gctrl.h>
11+
#include <soc/gpio.h>
1212

1313
#include <8051.h>
1414
#include <stdint.h>

src/app/main/fan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <app/power.h>
66
#include <common/debug.h>
77
#include <common/macro.h>
8-
#include <ec/pwm.h>
8+
#include <soc/pwm.h>
99

1010
#if CONFIG_PLATFORM_INTEL
1111
#include <app/peci.h>

src/app/main/flash/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void flash_write_enable(void);
4646
void flash_entry(uint32_t addr, uint8_t *data, uint32_t length,
4747
uint8_t command) __reentrant __critical {
4848
// Only allow access from 64 KiB to the end of flash.
49-
if ((addr < 0x10000) || (length > 0x10000) || ((addr + length) > CONFIG_EC_FLASH_SIZE))
49+
if ((addr < 0x10000) || (length > 0x10000) || ((addr + length) > CONFIG_SOC_FLASH_SIZE))
5050
return;
5151

5252
if (command == FLASH_COMMAND_READ) {

src/app/main/flash/wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-FileCopyrightText: Copyright (C) 2020 Evan Lojewski
33

44
#include <app/flash.h>
5-
#include <ec/scratch.h>
5+
#include <soc/scratch.h>
66
#include "include/flash/entry.h"
77
#include <stdint.h>
88
#include <stddef.h>

src/app/main/include/app/ecpm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef _APP_ECPM_H
44
#define _APP_ECPM_H
55

6-
#include <ec/ecpm.h>
6+
#include <soc/ecpm.h>
77

88
void ecpm_init(void);
99

src/app/main/include/app/espi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <stdbool.h>
77

8-
#include <ec/espi.h>
8+
#include <soc/espi.h>
99

1010
extern bool espi_host_reset;
1111

src/app/main/include/app/gctrl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef _APP_GCTRL_H
44
#define _APP_GCTRL_H
55

6-
#include <ec/gctrl.h>
6+
#include <soc/gctrl.h>
77

88
void gctrl_init(void);
99

0 commit comments

Comments
 (0)