qcom platform 子系统(4)

/*************************************************************/
/*-subsystem的创建: 哪里调用了对应的subsys_register-*/
/*************************************************************/
1. wifi:子系统,
kernel/drivers/net/wireless/cnss/cnss.c
penv->subsysdesc.name = "AR6320";
penv->subsysdesc.owner = THIS_MODULE;
penv->subsysdesc.shutdown = cnss_shutdown;
penv->subsysdesc.powerup = cnss_powerup;
penv->subsysdesc.ramdump = cnss_ramdump;
penv->subsysdesc.crash_shutdown = cnss_crash_shutdown;
penv->subsysdesc.dev = &pdev->dev;
penv->subsys = subsys_register(&penv->subsysdesc);


2. modem:子系统
kernel/drivers/soc/qcom/pil-q6v5-mss.c
static int pil_subsys_init(struct modem_data *drv,
struct platform_device *pdev)
{
int ret;


drv->subsys_desc.name = "modem";
drv->subsys_desc.dev = &pdev->dev;
drv->subsys_desc.owner = THIS_MODULE;
drv->subsys_desc.shutdown = modem_shutdown;
drv->subsys_desc.powerup = modem_powerup;
drv->subsys_desc.ramdump = modem_ramdump;
drv->subsys_desc.crash_shutdown = modem_crash_shutdown;
drv->subsys_desc.err_fatal_handler = modem_err_fatal_intr_handler;
drv->subsys_desc.stop_ack_handler = modem_stop_ack_intr_handler;
drv->subsys_desc.wdog_bite_handler = modem_wdog_bite_intr_handler;


drv->q6->desc.modem_ssr = false;
drv->subsys = subsys_register(&drv->subsys_desc);
}


3. adsp, venus, slpi and a530_zap
/*通过device tree:matched -> probe*/
kernel/arch/arm/boot/dts/qcom/msm8996.dtsi
qcom,lpass@9300000 {
compatible = "qcom,pil-tz-generic";
reg = <0x9300000 0x00100>;
interrupts = <0 162 1>;
qcom,firmware-name = "adsp";
}


qcom,venus@ce0000 {
compatible = "qcom,pil-tz-generic";
reg = <0xce0000 0x4000>;


vdd-supply = <&gdsc_venus>;
qcom,proxy-reg-names = "vdd";
qcom,firmware-name = "venus";
}


qcom,ssc@1c00000 {
compatible = "qcom,pil-tz-generic";
reg = <0x1c00000 0x4000>;
interrupts = <0 390 1>;
qcom,firmware-name = "slpi";
}


pil_gpu: qcom,kgsl-hyp {
compatible = "qcom,pil-tz-generic";
qcom,pas-id = <13>;
qcom,firmware-name = "a530_zap";
memory-region = <&peripheral_mem>;
};


kernel/drivers/soc/qcom/subsys-pil-tz.c
static int pil_tz_driver_probe(struct platform_device *pdev)
{
d->subsys_desc.name = d->desc.name;
d->subsys_desc.owner = THIS_MODULE;
d->subsys_desc.dev = &pdev->dev;
d->subsys_desc.shutdown = subsys_shutdown;
d->subsys_desc.powerup = subsys_powerup;
d->subsys_desc.ramdump = subsys_ramdump;
d->subsys_desc.free_memory = subsys_free_memory;
d->subsys_desc.crash_shutdown = subsys_crash_shutdown;
d->subsys_desc.err_fatal_handler = subsys_err_fatal_intr_handler;
d->subsys_desc.wdog_bite_handler = subsys_wdog_bite_irq_handler;
d->subsys_desc.stop_ack_handler = subsys_stop_ack_intr_handler;
}

你可能感兴趣的:(kernel)