If you own a device like the Xiaomi Redmi Note 4 (mido), Mi A1 (tissot), or Motorola Moto Z Play, the highest quality drivers are found in mature custom ROMs.
struct msm_dev
struct device *dev;
void __iomem *mmio;
struct regulator *vdd;
struct clk *core_clk;
;
static int msm_probe(struct platform_device *pdev)
struct msm_dev *m;
struct resource *res;
int ret;
m = devm_kzalloc(&pdev->dev, sizeof(*m), GFP_KERNEL);
if (!m)
return -ENOMEM;
m->dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
m->mmio = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(m->mmio))
return PTR_ERR(m->mmio);
m->vdd = devm_regulator_get(&pdev->dev, "vdd");
if (IS_ERR(m->vdd))
dev_err(&pdev->dev, "missing vdd regulator\n");
return PTR_ERR(m->vdd);
m->core_clk = devm_clk_get(&pdev->dev, "core");
if (IS_ERR(m->core_clk))
return PTR_ERR(m->core_clk);
ret = clk_prepare_enable(m->core_clk);
if (ret)
return ret;
platform_set_drvdata(pdev, m);
return 0;
static irqreturn_t msm_irq_thread(int irq, void *dev_id)
struct msm_dev *m = dev_id;
/* longer processing here; top half already acknowledged the IRQ */
mutex_lock(&m->lock);
/* handle event, schedule work, update state */
mutex_unlock(&m->lock);
return IRQ_HANDLED;
/* request threaded IRQ in probe */
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, msm_irq_thread,
IRQF_ONESHOT | IRQF_SHARED,
dev_name(&pdev->dev), m);
dma_addr_t dma_handle;
void *cpu_ptr;
size_t size = PAGE_ALIGN(buf_size);
cpu_ptr = dmam_alloc_coherent(m->dev->dev, size, &dma_handle, GFP_KERNEL);
if (!cpu_ptr)
return -ENOMEM;
/* CPU writes to cpu_ptr, device uses dma_handle */
cat /sys/kernel/debug/iommu/msm_smmu/contexts/*/faults msm8953 for arm64 driver high quality
The MSM8953 relies on proprietary "blobs" (firmware files for modem, DSP, GPU). High quality does not necessarily mean open source—it means compatible and well-matched. If you own a device like the Xiaomi
Low-quality drivers (blobs from binary drops, poorly backported patches, or mismatched kernel versions) lead to a cascade of issues: A high-quality driver set
A high-quality driver set, conversely, ensures:
High-quality driver coverage for MSM8953 must include the following subsystems, each with ARM64 nuances.
export CROSS_COMPILE=aarch64-linux-gnu-
export ARCH=arm64
make defconfig msm8953_defconfig
make -j$(nproc) Image.gz dtbs