Loading Documentation/devicetree/bindings/dma/sps/sps.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ Peripheral-to-Memory (a.k.a. BAM-System) mode. SPS includes BAM (Bus Access Module) hardware block, BAM DMA peripheral, and pipe memory. Required property: - compatible: should be "qcom,msm_sps" - compatible: should be "qcom,msm_sps" or "qcom,msm_sps_4k" Optional properties: - reg: offset and size for the memory mapping, including maps for Loading arch/arm/boot/dts/qcom/msm8916.dtsi +1 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ }; qcom,sps { compatible = "qcom,msm_sps"; compatible = "qcom,msm_sps_4k"; qcom,device-type = <3>; qcom,pipe-attr-ee; }; Loading drivers/platform/msm/sps/sps.c +26 −7 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -27,6 +27,7 @@ #include <linux/debugfs.h> #include <linux/uaccess.h> #include <linux/of.h> #include <linux/of_device.h> #include "sps_bam.h" #include "spsi.h" Loading Loading @@ -81,6 +82,8 @@ static struct sps_drv *sps; u32 d_type; bool enhd_pipe; bool imem; enum sps_bam_type bam_type; enum sps_bam_type bam_types[] = {SPS_BAM_LEGACY, SPS_BAM_NDP, SPS_BAM_NDP_4K}; static void sps_device_de_init(void); Loading Loading @@ -2497,6 +2500,16 @@ static int get_device_tree_data(struct platform_device *pdev) return 0; } static struct of_device_id msm_sps_match[] = { { .compatible = "qcom,msm_sps", .data = &bam_types[SPS_BAM_NDP] }, { .compatible = "qcom,msm_sps_4k", .data = &bam_types[SPS_BAM_NDP_4K] }, {} }; static int msm_sps_probe(struct platform_device *pdev) { int ret = -ENODEV; Loading @@ -2504,11 +2517,22 @@ static int msm_sps_probe(struct platform_device *pdev) SPS_DBG2("sps:%s.", __func__); if (pdev->dev.of_node) { const struct of_device_id *match; if (get_device_tree_data(pdev)) { SPS_ERR("sps:Fail to get data from device tree."); return -ENODEV; } else SPS_DBG("sps:get data from device tree."); match = of_match_device(msm_sps_match, &pdev->dev); if (match) { bam_type = *((enum sps_bam_type *)(match->data)); SPS_DBG("sps:BAM type is:%d\n", bam_type); } else { bam_type = SPS_BAM_NDP; SPS_DBG("sps:use default BAM type:%d\n", bam_type); } } else { d_type = 0; if (get_platform_data(pdev)) { Loading @@ -2516,6 +2540,7 @@ static int msm_sps_probe(struct platform_device *pdev) return -ENODEV; } else SPS_DBG("sps:get platform data."); bam_type = SPS_BAM_LEGACY; } /* Create Device */ Loading Loading @@ -2652,12 +2677,6 @@ static int msm_sps_remove(struct platform_device *pdev) return 0; } static struct of_device_id msm_sps_match[] = { { .compatible = "qcom,msm_sps", }, {} }; static struct platform_driver msm_sps_driver = { .probe = msm_sps_probe, .driver = { Loading drivers/platform/msm/sps/spsi.h +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -53,6 +53,7 @@ extern u32 d_type; extern bool enhd_pipe; extern bool imem; extern enum sps_bam_type bam_type; #ifdef CONFIG_DEBUG_FS extern u8 debugfs_record_enabled; Loading Loading @@ -196,6 +197,12 @@ struct sps_mem_stats { u32 max_bytes_used; }; enum sps_bam_type { SPS_BAM_LEGACY, SPS_BAM_NDP, SPS_BAM_NDP_4K }; #ifdef CONFIG_DEBUG_FS /* record debug info for debugfs */ void sps_debugfs_record(const char *); Loading Loading
Documentation/devicetree/bindings/dma/sps/sps.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ Peripheral-to-Memory (a.k.a. BAM-System) mode. SPS includes BAM (Bus Access Module) hardware block, BAM DMA peripheral, and pipe memory. Required property: - compatible: should be "qcom,msm_sps" - compatible: should be "qcom,msm_sps" or "qcom,msm_sps_4k" Optional properties: - reg: offset and size for the memory mapping, including maps for Loading
arch/arm/boot/dts/qcom/msm8916.dtsi +1 −1 Original line number Diff line number Diff line Loading @@ -254,7 +254,7 @@ }; qcom,sps { compatible = "qcom,msm_sps"; compatible = "qcom,msm_sps_4k"; qcom,device-type = <3>; qcom,pipe-attr-ee; }; Loading
drivers/platform/msm/sps/sps.c +26 −7 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -27,6 +27,7 @@ #include <linux/debugfs.h> #include <linux/uaccess.h> #include <linux/of.h> #include <linux/of_device.h> #include "sps_bam.h" #include "spsi.h" Loading Loading @@ -81,6 +82,8 @@ static struct sps_drv *sps; u32 d_type; bool enhd_pipe; bool imem; enum sps_bam_type bam_type; enum sps_bam_type bam_types[] = {SPS_BAM_LEGACY, SPS_BAM_NDP, SPS_BAM_NDP_4K}; static void sps_device_de_init(void); Loading Loading @@ -2497,6 +2500,16 @@ static int get_device_tree_data(struct platform_device *pdev) return 0; } static struct of_device_id msm_sps_match[] = { { .compatible = "qcom,msm_sps", .data = &bam_types[SPS_BAM_NDP] }, { .compatible = "qcom,msm_sps_4k", .data = &bam_types[SPS_BAM_NDP_4K] }, {} }; static int msm_sps_probe(struct platform_device *pdev) { int ret = -ENODEV; Loading @@ -2504,11 +2517,22 @@ static int msm_sps_probe(struct platform_device *pdev) SPS_DBG2("sps:%s.", __func__); if (pdev->dev.of_node) { const struct of_device_id *match; if (get_device_tree_data(pdev)) { SPS_ERR("sps:Fail to get data from device tree."); return -ENODEV; } else SPS_DBG("sps:get data from device tree."); match = of_match_device(msm_sps_match, &pdev->dev); if (match) { bam_type = *((enum sps_bam_type *)(match->data)); SPS_DBG("sps:BAM type is:%d\n", bam_type); } else { bam_type = SPS_BAM_NDP; SPS_DBG("sps:use default BAM type:%d\n", bam_type); } } else { d_type = 0; if (get_platform_data(pdev)) { Loading @@ -2516,6 +2540,7 @@ static int msm_sps_probe(struct platform_device *pdev) return -ENODEV; } else SPS_DBG("sps:get platform data."); bam_type = SPS_BAM_LEGACY; } /* Create Device */ Loading Loading @@ -2652,12 +2677,6 @@ static int msm_sps_remove(struct platform_device *pdev) return 0; } static struct of_device_id msm_sps_match[] = { { .compatible = "qcom,msm_sps", }, {} }; static struct platform_driver msm_sps_driver = { .probe = msm_sps_probe, .driver = { Loading
drivers/platform/msm/sps/spsi.h +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -53,6 +53,7 @@ extern u32 d_type; extern bool enhd_pipe; extern bool imem; extern enum sps_bam_type bam_type; #ifdef CONFIG_DEBUG_FS extern u8 debugfs_record_enabled; Loading Loading @@ -196,6 +197,12 @@ struct sps_mem_stats { u32 max_bytes_used; }; enum sps_bam_type { SPS_BAM_LEGACY, SPS_BAM_NDP, SPS_BAM_NDP_4K }; #ifdef CONFIG_DEBUG_FS /* record debug info for debugfs */ void sps_debugfs_record(const char *); Loading