-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from samueldr-wip/fix/motorola-addison
Reduce size of kernel for motorola-addison + fixups
- Loading branch information
Showing
10 changed files
with
550 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...s/motorola-addison/kernel/0001-Allow-building-WCD9335_CODEC-without-REGMAP_ALLOW_WR.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From adfef6057807b0a5e2bd73de0464c43aa3df6f2c Mon Sep 17 00:00:00 2001 | ||
From: Samuel Dionne-Riel <samuel@dionne-riel.com> | ||
Date: Wed, 4 Dec 2019 02:57:08 -0500 | ||
Subject: [PATCH 1/6] Allow building WCD9335_CODEC without | ||
REGMAP_ALLOW_WRITE_DEBUGFS | ||
|
||
--- | ||
drivers/mfd/Kconfig | 1 - | ||
1 file changed, 1 deletion(-) | ||
|
||
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig | ||
index 0b747ae632b7..15089ab8a9aa 100644 | ||
--- a/drivers/mfd/Kconfig | ||
+++ b/drivers/mfd/Kconfig | ||
@@ -1424,7 +1424,6 @@ config WCD9335_CODEC | ||
depends on SLIMBUS | ||
select SOUNDWIRE_WCD_CTRL | ||
select MFD_CORE | ||
- select REGMAP_ALLOW_WRITE_DEBUGFS | ||
help | ||
Enables the WCD9xxx codec core driver. The core driver provides | ||
read/write capability to registers which are part of the | ||
-- | ||
2.23.0 | ||
|
167 changes: 167 additions & 0 deletions
167
...s/motorola-addison/kernel/0002-Allow-building-qualcomm-audio-without-CONFIG_DEBUG_F.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
From fdc7172e522c9a4c9d16467688a8913b18fb39d3 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Dionne-Riel <samuel@dionne-riel.com> | ||
Date: Wed, 4 Dec 2019 02:57:47 -0500 | ||
Subject: [PATCH 2/6] Allow building qualcomm audio without CONFIG_DEBUG_FS | ||
|
||
--- | ||
drivers/misc/qcom/qdsp6v2/audio_alac.c | 4 ++++ | ||
drivers/misc/qcom/qdsp6v2/audio_ape.c | 4 ++++ | ||
drivers/misc/qcom/qdsp6v2/audio_g711alaw.c | 4 ++++ | ||
drivers/misc/qcom/qdsp6v2/audio_g711mlaw.c | 4 ++++ | ||
sound/soc/codecs/wm_adsp.h | 4 +--- | ||
5 files changed, 17 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/drivers/misc/qcom/qdsp6v2/audio_alac.c b/drivers/misc/qcom/qdsp6v2/audio_alac.c | ||
index 646d37da1ba3..fef5352f58bc 100644 | ||
--- a/drivers/misc/qcom/qdsp6v2/audio_alac.c | ||
+++ b/drivers/misc/qcom/qdsp6v2/audio_alac.c | ||
@@ -19,6 +19,7 @@ | ||
static struct miscdevice audio_alac_misc; | ||
static struct ws_mgr audio_alac_ws_mgr; | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
static const struct file_operations audio_alac_debug_fops = { | ||
.read = audio_aio_debug_read, | ||
.open = audio_aio_debug_open, | ||
@@ -29,6 +30,7 @@ static struct dentry *config_debugfs_create_file(const char *name, void *data) | ||
return debugfs_create_file(name, S_IFREG | S_IRUGO, | ||
NULL, (void *)data, &audio_alac_debug_fops); | ||
} | ||
+#endif | ||
|
||
static int alac_channel_map(u8 *channel_mapping, uint32_t channels); | ||
|
||
@@ -336,11 +338,13 @@ static int audio_open(struct inode *inode, struct file *file) | ||
goto fail; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
snprintf(name, sizeof(name), "msm_alac_%04x", audio->ac->session); | ||
audio->dentry = config_debugfs_create_file(name, (void *)audio); | ||
|
||
if (IS_ERR_OR_NULL(audio->dentry)) | ||
pr_debug("debugfs_create_file failed\n"); | ||
+#endif | ||
pr_debug("%s:alacdec success mode[%d]session[%d]\n", __func__, | ||
audio->feedback, | ||
audio->ac->session); | ||
diff --git a/drivers/misc/qcom/qdsp6v2/audio_ape.c b/drivers/misc/qcom/qdsp6v2/audio_ape.c | ||
index 737151279c27..c824d68569d0 100644 | ||
--- a/drivers/misc/qcom/qdsp6v2/audio_ape.c | ||
+++ b/drivers/misc/qcom/qdsp6v2/audio_ape.c | ||
@@ -19,6 +19,7 @@ | ||
static struct miscdevice audio_ape_misc; | ||
static struct ws_mgr audio_ape_ws_mgr; | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
static const struct file_operations audio_ape_debug_fops = { | ||
.read = audio_aio_debug_read, | ||
.open = audio_aio_debug_open, | ||
@@ -28,6 +29,7 @@ static struct dentry *config_debugfs_create_file(const char *name, void *data) | ||
return debugfs_create_file(name, S_IFREG | S_IRUGO, | ||
NULL, (void *)data, &audio_ape_debug_fops); | ||
} | ||
+#endif | ||
|
||
static long audio_ioctl_shared(struct file *file, unsigned int cmd, | ||
void *arg) | ||
@@ -317,11 +319,13 @@ static int audio_open(struct inode *inode, struct file *file) | ||
goto fail; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
snprintf(name, sizeof(name), "msm_ape_%04x", audio->ac->session); | ||
audio->dentry = config_debugfs_create_file(name, (void *)audio); | ||
|
||
if (IS_ERR_OR_NULL(audio->dentry)) | ||
pr_debug("debugfs_create_file failed\n"); | ||
+#endif | ||
pr_debug("%s:apedec success mode[%d]session[%d]\n", __func__, | ||
audio->feedback, | ||
audio->ac->session); | ||
diff --git a/drivers/misc/qcom/qdsp6v2/audio_g711alaw.c b/drivers/misc/qcom/qdsp6v2/audio_g711alaw.c | ||
index 10df85f50ac1..535395e15a08 100644 | ||
--- a/drivers/misc/qcom/qdsp6v2/audio_g711alaw.c | ||
+++ b/drivers/misc/qcom/qdsp6v2/audio_g711alaw.c | ||
@@ -19,6 +19,7 @@ | ||
static struct miscdevice audio_g711alaw_misc; | ||
static struct ws_mgr audio_g711_ws_mgr; | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
static const struct file_operations audio_g711_debug_fops = { | ||
.read = audio_aio_debug_read, | ||
.open = audio_aio_debug_open, | ||
@@ -29,6 +30,7 @@ static struct dentry *config_debugfs_create_file(const char *name, void *data) | ||
return debugfs_create_file(name, S_IFREG | S_IRUGO, | ||
NULL, (void *)data, &audio_g711_debug_fops); | ||
} | ||
+#endif | ||
|
||
static int g711_channel_map(u8 *channel_mapping, uint32_t channels); | ||
|
||
@@ -286,11 +288,13 @@ static int audio_open(struct inode *inode, struct file *file) | ||
goto fail; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
snprintf(name, sizeof(name), "msm_g711_%04x", audio->ac->session); | ||
audio->dentry = config_debugfs_create_file(name, (void *)audio); | ||
|
||
if (IS_ERR_OR_NULL(audio->dentry)) | ||
pr_debug("%s: debugfs_create_file failed\n", __func__); | ||
+#endif | ||
pr_debug("%s: g711dec success mode[%d]session[%d]\n", __func__, | ||
audio->feedback, | ||
audio->ac->session); | ||
diff --git a/drivers/misc/qcom/qdsp6v2/audio_g711mlaw.c b/drivers/misc/qcom/qdsp6v2/audio_g711mlaw.c | ||
index 33fb3685965e..b6727f9a22cc 100644 | ||
--- a/drivers/misc/qcom/qdsp6v2/audio_g711mlaw.c | ||
+++ b/drivers/misc/qcom/qdsp6v2/audio_g711mlaw.c | ||
@@ -19,6 +19,7 @@ | ||
static struct miscdevice audio_g711mlaw_misc; | ||
static struct ws_mgr audio_g711_ws_mgr; | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
static const struct file_operations audio_g711_debug_fops = { | ||
.read = audio_aio_debug_read, | ||
.open = audio_aio_debug_open, | ||
@@ -29,6 +30,7 @@ static struct dentry *config_debugfs_create_file(const char *name, void *data) | ||
return debugfs_create_file(name, S_IFREG | S_IRUGO, | ||
NULL, (void *)data, &audio_g711_debug_fops); | ||
} | ||
+#endif | ||
|
||
static int g711_channel_map(u8 *channel_mapping, uint32_t channels); | ||
|
||
@@ -285,11 +287,13 @@ static int audio_open(struct inode *inode, struct file *file) | ||
goto fail; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
snprintf(name, sizeof(name), "msm_g711_%04x", audio->ac->session); | ||
audio->dentry = config_debugfs_create_file(name, (void *)audio); | ||
|
||
if (IS_ERR_OR_NULL(audio->dentry)) | ||
pr_debug("%s: debugfs_create_file failed\n", __func__); | ||
+#endif | ||
pr_debug("%s: g711dec success mode[%d]session[%d]\n", __func__, | ||
audio->feedback, | ||
audio->ac->session); | ||
diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h | ||
index b09e4c9c4cc1..3012ed1d5d73 100644 | ||
--- a/sound/soc/codecs/wm_adsp.h | ||
+++ b/sound/soc/codecs/wm_adsp.h | ||
@@ -186,9 +186,7 @@ static inline void wm_adsp_init_debugfs(struct wm_adsp *dsp, | ||
{ | ||
} | ||
|
||
-void wm_adsp_cleanup_debugfs(struct wm_adsp *dsp) | ||
-{ | ||
-} | ||
+void wm_adsp_cleanup_debugfs(struct wm_adsp *dsp); | ||
#endif | ||
|
||
int wm_adsp1_event(struct snd_soc_dapm_widget *w, | ||
-- | ||
2.23.0 | ||
|
143 changes: 143 additions & 0 deletions
143
...s/motorola-addison/kernel/0003-Allow-building-qualcomm-mdss-without-CONFIG_DEBUG_FS.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
From 83f926eaf84c62c3e7a479a10a8fcf5847ae3bac Mon Sep 17 00:00:00 2001 | ||
From: Samuel Dionne-Riel <samuel@dionne-riel.com> | ||
Date: Wed, 4 Dec 2019 02:58:15 -0500 | ||
Subject: [PATCH 3/6] Allow building qualcomm mdss without CONFIG_DEBUG_FS | ||
|
||
--- | ||
drivers/video/msm/mdss/mdss_debug.h | 5 ----- | ||
drivers/video/msm/mdss/mdss_debug_xlog.c | 4 ++++ | ||
drivers/video/msm/mdss/mdss_mdp_debug.c | 2 ++ | ||
drivers/video/msm/mdss/mdss_mdp_overlay.c | 6 ++++++ | ||
drivers/video/msm/mdss/mdss_smmu.c | 2 ++ | ||
5 files changed, 14 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/drivers/video/msm/mdss/mdss_debug.h b/drivers/video/msm/mdss/mdss_debug.h | ||
index dad43ca56678..f41d22f6d18f 100644 | ||
--- a/drivers/video/msm/mdss/mdss_debug.h | ||
+++ b/drivers/video/msm/mdss/mdss_debug.h | ||
@@ -227,11 +227,6 @@ static inline void mdss_xlog(const char *name, int line, int flag, ...) { } | ||
static inline void mdss_dsi_debug_check_te(struct mdss_panel_data *pdata) { } | ||
static inline void mdss_xlog_tout_handler_default(bool is_mmi, bool queue, | ||
const char *name, ...) { } | ||
-u32 get_dump_range(struct dump_offset *range_node, size_t max_offset) | ||
- { return 0; } | ||
-void mdss_dump_reg(const char *dump_name, u32 reg_dump_flag, char *addr, | ||
- int len, u32 **dump_mem, phys_addr_t *regs_phys, bool from_isr) { } | ||
-void mdss_mdp_debug_mid(u32 mid) { } | ||
#endif | ||
|
||
int mdss_dump_misr_data(char **buf, u32 size); | ||
diff --git a/drivers/video/msm/mdss/mdss_debug_xlog.c b/drivers/video/msm/mdss/mdss_debug_xlog.c | ||
index ab4fe9c0b6f2..a74f0485b6bb 100644 | ||
--- a/drivers/video/msm/mdss/mdss_debug_xlog.c | ||
+++ b/drivers/video/msm/mdss/mdss_debug_xlog.c | ||
@@ -227,6 +227,7 @@ static void mdss_xlog_dump_all(void) | ||
mdss_dbg_xlog.xlog_user_buf[off] = '\0'; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
u32 get_dump_range(struct dump_offset *range_node, size_t max_offset) | ||
{ | ||
u32 length = 0; | ||
@@ -241,6 +242,7 @@ u32 get_dump_range(struct dump_offset *range_node, size_t max_offset) | ||
|
||
return length; | ||
} | ||
+#endif | ||
|
||
static void mdss_dump_debug_bus(u32 bus_dump_flag, | ||
u32 **dump_mem) | ||
@@ -427,6 +429,7 @@ static void mdss_dump_vbif_debug_bus(u32 bus_dump_flag, | ||
pr_info("========End VBIF Debug bus=========\n"); | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
void mdss_dump_reg(const char *dump_name, u32 reg_dump_flag, | ||
char *addr, int len, u32 **dump_mem, phys_addr_t *regs_phys, bool from_isr) | ||
{ | ||
@@ -492,6 +495,7 @@ void mdss_dump_reg(const char *dump_name, u32 reg_dump_flag, | ||
if (!from_isr) | ||
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF); | ||
} | ||
+#endif | ||
|
||
static void mdss_dump_reg_by_ranges(struct mdss_debug_base *dbg, | ||
u32 reg_dump_flag) | ||
diff --git a/drivers/video/msm/mdss/mdss_mdp_debug.c b/drivers/video/msm/mdss/mdss_mdp_debug.c | ||
index 0a91925b1249..2fa1338fffef 100644 | ||
--- a/drivers/video/msm/mdss/mdss_mdp_debug.c | ||
+++ b/drivers/video/msm/mdss/mdss_mdp_debug.c | ||
@@ -971,6 +971,7 @@ void mdss_mdp_hw_rev_debug_caps_init(struct mdss_data_type *mdata) | ||
} | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
void mdss_mdp_debug_mid(u32 mid) | ||
{ | ||
struct mdss_data_type *mdata = mdss_mdp_get_mdata(); | ||
@@ -1002,6 +1003,7 @@ void mdss_mdp_debug_mid(u32 mid) | ||
} | ||
} | ||
} | ||
+#endif | ||
|
||
static void __print_time(char *buf, u32 size, u64 ts) | ||
{ | ||
diff --git a/drivers/video/msm/mdss/mdss_mdp_overlay.c b/drivers/video/msm/mdss/mdss_mdp_overlay.c | ||
index b8c43596cdee..8e07fc5e74a0 100644 | ||
--- a/drivers/video/msm/mdss/mdss_mdp_overlay.c | ||
+++ b/drivers/video/msm/mdss/mdss_mdp_overlay.c | ||
@@ -4426,6 +4426,7 @@ static ssize_t mdss_mdp_cmd_autorefresh_store(struct device *dev, | ||
} | ||
|
||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
/* Print the last CRC Value read for batch mode */ | ||
static ssize_t mdss_mdp_misr_show(struct device *dev, | ||
struct device_attribute *attr, char *buf) | ||
@@ -4450,6 +4451,7 @@ static ssize_t mdss_mdp_misr_show(struct device *dev, | ||
|
||
return ret; | ||
} | ||
+#endif | ||
|
||
/* | ||
* Enable crc batch mode. By enabling this mode through sysfs | ||
@@ -4529,8 +4531,10 @@ static ssize_t mdss_mdp_misr_store(struct device *dev, | ||
return len; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
static DEVICE_ATTR(msm_misr_en, S_IRUGO | S_IWUSR, | ||
mdss_mdp_misr_show, mdss_mdp_misr_store); | ||
+#endif | ||
static DEVICE_ATTR(msm_cmd_autorefresh_en, S_IRUGO | S_IWUSR, | ||
mdss_mdp_cmd_autorefresh_show, mdss_mdp_cmd_autorefresh_store); | ||
static DEVICE_ATTR(vsync_event, S_IRUGO, mdss_mdp_vsync_show_event, NULL); | ||
@@ -4552,7 +4556,9 @@ static struct attribute *mdp_overlay_sysfs_attrs[] = { | ||
&dev_attr_lineptr_value.attr, | ||
&dev_attr_ad.attr, | ||
&dev_attr_dyn_pu.attr, | ||
+#ifdef CONFIG_DEBUG_FS | ||
&dev_attr_msm_misr_en.attr, | ||
+#endif | ||
&dev_attr_msm_cmd_autorefresh_en.attr, | ||
&dev_attr_hist_event.attr, | ||
&dev_attr_bl_event.attr, | ||
diff --git a/drivers/video/msm/mdss/mdss_smmu.c b/drivers/video/msm/mdss/mdss_smmu.c | ||
index e0d0579009a1..a0d9c64fbc6c 100644 | ||
--- a/drivers/video/msm/mdss/mdss_smmu.c | ||
+++ b/drivers/video/msm/mdss/mdss_smmu.c | ||
@@ -463,7 +463,9 @@ int mdss_smmu_fault_handler(struct iommu_domain *domain, struct device *dev, | ||
if (i == MDSS_IOMMU_MAX_DOMAIN) | ||
goto end; | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
mdss_mdp_debug_mid(mid); | ||
+#endif | ||
end: | ||
return -ENOSYS; | ||
} | ||
-- | ||
2.23.0 | ||
|
38 changes: 38 additions & 0 deletions
38
...s/motorola-addison/kernel/0004-Allow-building-qualcomm-ipa_mhi-without-CONFIG_DEBUG.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 3ed439ba8d86d7ad50623217f54f88f4562579ea Mon Sep 17 00:00:00 2001 | ||
From: Samuel Dionne-Riel <samuel@dionne-riel.com> | ||
Date: Wed, 4 Dec 2019 02:58:32 -0500 | ||
Subject: [PATCH 4/6] Allow building qualcomm ipa_mhi without CONFIG_DEBUG_FS | ||
|
||
--- | ||
drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c b/drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c | ||
index 2e92a0e2b358..8e25ee0a09c0 100644 | ||
--- a/drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c | ||
+++ b/drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c | ||
@@ -465,6 +465,8 @@ fail: | ||
#else | ||
static void ipa_mhi_debugfs_init(void) {} | ||
static void ipa_mhi_debugfs_destroy(void) {} | ||
+static int ipa_mhi_read_write_host(enum ipa_mhi_dma_dir dir, void *dev_addr, | ||
+ u64 host_addr, int size) {} | ||
#endif /* CONFIG_DEBUG_FS */ | ||
|
||
static union IpaHwMhiDlUlSyncCmdData_t ipa_cached_dl_ul_sync_info; | ||
@@ -2314,10 +2316,12 @@ int ipa_mhi_destroy_all_channels(void) | ||
return 0; | ||
} | ||
|
||
+#ifdef CONFIG_DEBUG_FS | ||
static void ipa_mhi_debugfs_destroy(void) | ||
{ | ||
debugfs_remove_recursive(dent); | ||
} | ||
+#endif | ||
|
||
/** | ||
* ipa_mhi_destroy() - Destroy MHI IPA | ||
-- | ||
2.23.0 | ||
|
Oops, something went wrong.