源码目录与模块索引

源码目录与模块索引

1. 规模

本目录共65个文件,包含顶层单文件驱动及两个主要子目录:

  • mhi/:Host和Endpoint MHI;
  • fsl-mc/:NXP DPAA2 Management Complex。

2. 顶层驱动

文件 平台/功能
arm-cci.c ARM CCI-400/500/550 cache-coherent interconnect
arm-integrator-lm.c ARM Integrator Logic Module bus
brcmstb_gisb.c Broadcom GISB timeout/abort/error decode
bt1-apb.cbt1-axi.c Baikal-T1总线错误处理
da8xx-mstpri.c TI DA8xx master priority
hisi_lpc.c HiSilicon LPC间接PIO
imx-weim.c i.MX external memory interface
intel-ixp4xx-eb.c IXP4xx expansion bus
mips_cdmm.c MIPS每CPU CDMM bus type
moxtet.c Turris MOX模块SPI配置总线
mvebu-mbus.c Marvell地址解码window
omap_l3_smx.comap_l3_noc.c OMAP L3互连错误
omap-ocp2scp.c OMAP协议桥及子PHY
qcom-ebi2.c Qualcomm外部总线
qcom-ssc-block-bus.c Snapdragon Sensor Core总线初始化
simple-pm-bus.c 通用power-managed OF bus
sun50i-de2.c Allwinner DE2访问域
sunxi-rsb.c Allwinner Reduced Serial Bus
tegra-aconnect.c Tegra APE内部总线
tegra-gmi.c Tegra通用memory interface
ti-pwmss.c TI PWM subsystem容器
ti-sysc.c TI interconnect target module
ts-nbus.c TS-4600 FPGA NBUS
uniphier-system-bus.c UniPhier外部system bus
vexpress-config.c Versatile Express config bus

3. MHI Host

文件 职责
host/init.c bus/controller/device/driver注册与配置解析
host/main.c channel/event/command ring、transfer API和IRQ
host/pm.c M0/M1/M2/M3、EE、SYS_ERR和电源转换
host/boot.c BHI/BHIE固件与RDDM下载
host/debugfs.c controller/channel/event调试
host/pci_generic.c Qualcomm/Quectel/Foxconn/Sierra/Telit等PCI modem glue
host/internal.hmhi/common.h ring、context、状态及寄存器内部定义

构建:

1
2
mhi.ko = init + main + pm + boot [+ debugfs]
mhi_pci_generic.ko = pci_generic

4. MHI Endpoint

文件 职责
ep/main.c endpoint bus、device/driver、channel及IRQ work
ep/mmio.c endpoint寄存器、host context访问
ep/ring.c host-owned ring读取与元素推进
ep/sm.c endpoint MHI状态机
ep/internal.h 私有对象

构建为mhi_ep.ko

5. FSL-MC

文件组 职责
fsl-mc-bus.c bus type、root MC、设备枚举
dprc*.c container命令与DPRC driver
mc-io.cmc-sys.c portal command I/O
obj-api.cdpbp.cdpcon.cdpmcp.c MC对象协议
fsl-mc-allocator.c resource pool
fsl-mc-msi.c MSI domain
fsl-mc-uapi.c userspace portal

6. Kconfig平台限制

绝大多数选项依赖具体ARCH_*,不能仅因ARM64而启用。典型例:

  • TI_SYSC依赖ARCH_OMAP2PLUS
  • TEGRA_*依赖ARCH_TEGRA
  • SUNXI_RSB依赖ARCH_SUNXI
  • QCOM_*依赖ARCH_QCOM
  • FSL_MC_BUS依赖Layerscape;
  • MHI_BUS本身无SoC依赖,但具体controller需PCI或其它transport。

7. 注册方式

  • 普通platform driver:module_platform_driver()
  • 必须早于children的驱动:postcore_initcall_sync()builtin_platform_driver()
  • 自定义总线:bus_register()后再注册controller;
  • MHI/FSL-MC使用postcore_initcall()建立bus type;
  • simple-pm-bus随OF构建但仍按compatible匹配。

8. 不是RK3588驱动索引

文件名中的ARM、AXI、APB、NoC描述的是协议或其它SoC,并不表示RK3588适用。判断依据必须是Kconfig、compatible、PCI ID和最终.config

文章互动

阅读 --

留言

0 条留言

正在加载留言…