Part Number: TDA4VEN-Q1
Tool/software:
Tool/software:
Hi, experts
I added a piece of code to the kernel source code ti-processor-sdk-linux-adas-j722s-evm-10_00_00_08/board-support/ti-linux-kernel-6.6.32+git-ti/init/main.c as follows
#define MMC1_CTL_REG 0x0FA00024
/* return 1 use sd card file system */
static int use_sdcard_filesystem(void)
{
int ret;
void __iomem *mmc1_ctl_reg;
unsigned int val;
mmc1_ctl_reg = ioremap(MMC1_CTL_REG, 4);
val = readl(mmc1_ctl_reg);
ret = val & CARD_DETECT;
iounmap(mmc1_ctl_reg);
return ret;
}
The function of this code is to detect whether the sd card is inserted or not.
The strange thing is that I compiled that code into a module using insmod to load the module and no panic occurs, what is the reason for that?
board: custom board
sdk: 10_00_00_08
Best Regards,
Bing