Skip to content

Commit b544b01

Browse files
kapilkedawatespressif-bot
authored andcommitted
fix(esp_hosted_ng): Remove chip specific compilation for SDIO
1 parent 3adfccc commit b544b01

File tree

4 files changed

+11
-47
lines changed

4 files changed

+11
-47
lines changed

esp_hosted_ng/host/Makefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
CONFIG_ENABLE_MONITOR_PROCESS = n
2-
# In case of SDIO as transport, one of slave chipset used,
3-
# CONFIG_TARGET_ESP32 OR
4-
# CONFIG_TARGET_ESP32C6
5-
# need to be added depending upon slave in use
6-
# rpi_init.sh will add that flag using ESP_SLAVE
7-
ESP_SLAVE := ""
82

93
# Toolchain Path
104
CROSS_COMPILE :=
@@ -54,10 +48,6 @@ ifeq ($(MODULE_NAME), esp32_spi)
5448
module_objects += spi/esp_spi.o
5549
endif
5650

57-
ifneq ($(ESP_SLAVE), "")
58-
EXTRA_CFLAGS += -D$(ESP_SLAVE)
59-
endif
60-
6151
PWD := $(shell pwd)
6252

6353
obj-m := $(MODULE_NAME).o

esp_hosted_ng/host/rpi_init.sh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ BT_UART_INIT="0"
2020
RAW_TP_MODE="0"
2121
IF_TYPE="sdio"
2222
MODULE_NAME="esp32_${IF_TYPE}.ko"
23-
ESP_SLAVE_CHIPSET=""
24-
#For sdio ESP_SLAVE_CHIPSET can esp32 or esp32c6
2523
RPI_RESETPIN=6
2624

2725
bringup_network_interface()
@@ -157,36 +155,12 @@ parse_arguments()
157155
done
158156
}
159157

160-
select_esp_slave()
161-
{
162-
case $ESP_SLAVE_CHIPSET in
163-
[Ee][Ss][Pp]32)
164-
echo "Building for esp32"
165-
ESP_SLAVE='CONFIG_TARGET_ESP32=y'
166-
;;
167-
[Ee][Ss][Pp]32-[Cc]6)
168-
echo "Building for esp32c6"
169-
ESP_SLAVE='CONFIG_TARGET_ESP32C6=y'
170-
;;
171-
*)
172-
echo "***** Err: Please set expected ESP slave chipset ****"
173-
exit 1
174-
;;
175-
esac
176-
177-
}
178-
179-
180158
parse_arguments $*
181159
if [ "$IF_TYPE" = "" ] ; then
182160
echo "Error: No protocol selected"
183161
usage
184162
exit 1
185163
else
186-
if [ "$IF_TYPE" = "sdio" ] ; then
187-
# SDIO Kernel driver registration varies for ESP32 and ESP32-C6 slave chipsets
188-
select_esp_slave
189-
fi
190164
echo "Building for $IF_TYPE protocol"
191165
MODULE_NAME=esp32_${IF_TYPE}.ko
192166
fi

esp_hosted_ng/host/sdio/esp_sdio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ static int write_packet(struct esp_adapter *adapter, struct sk_buff *skb);
4848
/*int deinit_context(struct esp_adapter *adapter);*/
4949

5050
static const struct sdio_device_id esp_devices[] = {
51-
{ SDIO_DEVICE(ESP_VENDOR_ID, ESP_DEVICE_ID_1) },
52-
{ SDIO_DEVICE(ESP_VENDOR_ID, ESP_DEVICE_ID_2) },
51+
{ SDIO_DEVICE(ESP_VENDOR_ID_1, ESP_DEVICE_ID_ESP32_1) },
52+
{ SDIO_DEVICE(ESP_VENDOR_ID_1, ESP_DEVICE_ID_ESP32_2) },
53+
{ SDIO_DEVICE(ESP_VENDOR_ID_2, ESP_DEVICE_ID_ESP32C6_1) },
54+
{ SDIO_DEVICE(ESP_VENDOR_ID_2, ESP_DEVICE_ID_ESP32C6_2) },
5355
{}
5456
};
5557

esp_hosted_ng/host/sdio/esp_sdio_decl.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@
6565

6666
#define ESP_ADDRESS_MASK 0x3FF
6767

68-
#if defined(CONFIG_TARGET_ESP32)
69-
#define ESP_VENDOR_ID 0x6666
70-
#define ESP_DEVICE_ID_1 0x2222
71-
#define ESP_DEVICE_ID_2 0x3333
72-
#elif defined(CONFIG_TARGET_ESP32C6)
73-
#define ESP_VENDOR_ID 0x0092
74-
#define ESP_DEVICE_ID_1 0x6666
75-
#define ESP_DEVICE_ID_2 0x7777
76-
#endif
68+
#define ESP_VENDOR_ID_1 0x6666
69+
#define ESP_DEVICE_ID_ESP32_1 0x2222
70+
#define ESP_DEVICE_ID_ESP32_2 0x3333
71+
72+
#define ESP_VENDOR_ID_2 0x0092
73+
#define ESP_DEVICE_ID_ESP32C6_1 0x6666
74+
#define ESP_DEVICE_ID_ESP32C6_2 0x7777
7775

7876
enum context_state {
7977
ESP_CONTEXT_DISABLED = 0,

0 commit comments

Comments
 (0)