zapper: disable hdmitx20 and mbox. [1/1]

PD#SWPL-126879

Problem:
s1a memory optimization.

Solution:
disable hdmitx20 and mbox.

Verify:
s1a.

Test:
s1a.

Change-Id: I317718936fdc14ec3b30faae7672fea66ac4541c
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
This commit is contained in:
Jianxiong Pan
2023-11-01 20:18:45 +08:00
committed by gerrit autosubmit
parent 7385476aee
commit 455d10eff1
15 changed files with 86 additions and 18 deletions
@@ -357,7 +357,6 @@ CONFIG_AMLOGIC_SECMON=y
CONFIG_AMLOGIC_DOLBY_FW=y
CONFIG_AMLOGIC_DRM=y
CONFIG_AMLOGIC_DRM_VPU=y
CONFIG_AMLOGIC_DRM_HDMI=y
CONFIG_AMLOGIC_DRM_CVBS=y
CONFIG_AMLOGIC_DRM_USE_ION=y
CONFIG_AMLOGIC_MEDIA_MODULE=y
@@ -388,7 +387,6 @@ CONFIG_AMLOGIC_VOUT=y
CONFIG_AMLOGIC_VOUT_CLK_SERVE=y
CONFIG_AMLOGIC_VOUT_SERVE=y
CONFIG_AMLOGIC_HDMITX21=y
CONFIG_AMLOGIC_HDMITX=y
CONFIG_AMLOGIC_CVBS_OUTPUT=y
CONFIG_AMLOGIC_WSS=y
CONFIG_AMLOGIC_VDAC=y
@@ -406,7 +404,6 @@ CONFIG_AMLOGIC_MEDIA_VIUIN=y
CONFIG_AMLOGIC_MEDIA_ADC=y
CONFIG_AMLOGIC_CEC=y
CONFIG_AMLOGIC_AO_CEC=y
CONFIG_AMLOGIC_ESM=y
CONFIG_AMLOGIC_MEDIA_MSYNC=y
CONFIG_AMLOGIC_DTV_DEMOD=y
CONFIG_AMLOGIC_DI_V4L=y
@@ -435,7 +432,6 @@ CONFIG_AMLOGIC_SPI_NFC=y
CONFIG_AMLOGIC_TEE=y
CONFIG_AMLOGIC_AMLTEE=y
CONFIG_AMLOGIC_OPTEE=y
CONFIG_AMLOGIC_GKI_TOOL=m
CONFIG_AMLOGIC_PWM_MESON=y
CONFIG_AMLOGIC_MESON_CPUFREQ=y
CONFIG_AMLOGIC_EFUSE_UNIFYKEY=y
+6
View File
@@ -196,6 +196,7 @@ static ssize_t enable_store(struct device *dev,
return count;
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static ssize_t map_tables_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -215,6 +216,7 @@ static ssize_t map_tables_show(struct device *dev,
spin_unlock_irqrestore(&chip->slock, flags);
return len;
}
#endif
static ssize_t led_blink_show(struct device *dev, struct device_attribute *attr,
char *buf)
@@ -367,11 +369,15 @@ DEVICE_ATTR_RW(protocol);
DEVICE_ATTR_RW(keymap);
DEVICE_ATTR_RW(debug_enable);
DEVICE_ATTR_RW(enable);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
DEVICE_ATTR_RO(map_tables);
#endif
static struct attribute *meson_ir_sysfs_attrs[] = {
&dev_attr_protocol.attr,
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
&dev_attr_map_tables.attr,
#endif
&dev_attr_keymap.attr,
&dev_attr_debug_enable.attr,
&dev_attr_enable.attr,
+4
View File
@@ -533,6 +533,7 @@ static int mbox_fifo_remove(struct platform_device *pdev)
return 0;
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
struct mbox_domain sc2_mbox_domains[] = {
[SC2_DSPA2REE0] = MBOX_DOMAIN(SC2_DSPA2REE0, SC2_MBOX_DSPA2REE, 0),
[SC2_REE2DSPA0] = MBOX_DOMAIN(SC2_REE2DSPA0, SC2_MBOX_REE2DSPA, 0),
@@ -657,6 +658,7 @@ static struct mbox_domain_data s5_mbox_domains_data __initdata = {
.mbox_domains = s5_mbox_domains,
.domain_counts = ARRAY_SIZE(s5_mbox_domains),
};
#endif
struct mbox_domain s1a_mbox_domains[] = {
[S1A_AO2REE] = MBOX_DOMAIN(S1A_AO2REE, S1A_MBOX_AO2REE, 0),
@@ -674,6 +676,7 @@ static struct mbox_domain_data s1a_mbox_domains_data __initdata = {
};
static const struct of_device_id mbox_of_match[] = {
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
{
.compatible = "amlogic, t3-mbox-fifo",
.data = &t3_mbox_domains_data,
@@ -702,6 +705,7 @@ static const struct of_device_id mbox_of_match[] = {
.compatible = "amlogic, s5-mbox-fifo",
.data = &s5_mbox_domains_data,
},
#endif
{
.compatible = "amlogic, s1a-mbox-fifo",
.data = &s1a_mbox_domains_data,
@@ -76,7 +76,7 @@ extern u8 ksvlist[10];
int rx_hdmi_tx_notify_handler(struct notifier_block *nb,
unsigned long value, void *p);
#ifdef CONFIG_AMLOGIC_HDMITX
#ifdef CONFIG_AMLOGIC_HDMITX21
u8 hdmitx_reauth_request(u8 hdcp_version);
#else
u8 __weak hdmitx_reauth_request(u8 hdcp_version)
+2
View File
@@ -7,8 +7,10 @@ $(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hdmi_tx_audio.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hdmi_tx_hdcp.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hdmi_tx_scdc.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hdmi_tx_infoframe.o
ifndef CONFIG_AMLOGIC_ZAPPER_CUT
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hdmi_tx_vrr.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hdmi_tx_frl.o
endif
$(MEDIA_MODULE_NAME)-y += vout/hdmitx21/hdmi_tx_ext.o
ccflags-y += -I$(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx_common
@@ -241,6 +241,7 @@ static void hdmitx21_reset_hdcp(struct hdmitx_common *tx_comm)
hdmitx21_audio_mute_op(1, AUDIO_MUTE_PATH_3);
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
/* hdmi21 specific functions disable */
static void hdmitx21_disable_21_work(void)
{
@@ -248,6 +249,7 @@ static void hdmitx21_disable_21_work(void)
hdmitx_vrr_disable();
/* TODO: DSC */
}
#endif
#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND
#include <linux/amlogic/pm.h>
@@ -312,11 +314,15 @@ static int hdmitx_reboot_notifier(struct notifier_block *nb,
struct hdmitx_dev *hdev = container_of(nb, struct hdmitx_dev, nb);
hdev->tx_comm.ready = 0;
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
hdmitx_vrr_disable();
#endif
hdmitx_common_avmute_locked(&hdev->tx_comm, SET_AVMUTE, AVMUTE_PATH_HDMITX);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
frl_tx_stop();
#endif
if (hdev->tx_comm.rxsense_policy)
cancel_delayed_work(&hdev->tx_comm.work_rxsense);
if (hdev->tx_comm.cedst_en)
@@ -2066,6 +2072,7 @@ bool hdmitx_update_latency_info(struct tvin_latency_s *latency_info)
}
EXPORT_SYMBOL(hdmitx_update_latency_info);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static ssize_t vrr_cap_show(struct device *dev,
struct device_attribute *attr,
char *buf)
@@ -2125,6 +2132,7 @@ static ssize_t vrr_mode_store(struct device *dev,
return count;
}
#endif
static ssize_t rxsense_policy_store(struct device *dev,
struct device_attribute *attr,
@@ -2927,8 +2935,10 @@ static ssize_t not_restart_hdcp_store(struct device *dev,
static DEVICE_ATTR_RW(disp_mode);
static DEVICE_ATTR_RW(vid_mute);
static DEVICE_ATTR_WO(config);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static DEVICE_ATTR_RO(vrr_cap);
static DEVICE_ATTR_RW(vrr_mode);
#endif
static DEVICE_ATTR_RW(aud_mute);
static DEVICE_ATTR_RO(lipsync_cap);
static DEVICE_ATTR_RO(hdmi_hdr_status);
@@ -3019,9 +3029,11 @@ static int hdmitx21_post_enable_mode(struct hdmitx_common *tx_comm, struct hdmi_
static int hdmitx21_disable_mode(struct hdmitx_common *tx_comm, struct hdmi_format_para *para)
{
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
struct hdmitx_dev *hdev = get_hdmitx21_device();
hdmitx_unregister_vrr(hdev);
#endif
return 0;
}
@@ -3031,7 +3043,9 @@ static int hdmitx21_init_uboot_mode(enum vmode_e mode)
struct hdmitx_dev *hdev = get_hdmitx21_device();
struct hdmitx_common *tx_comm = &hdev->tx_comm;
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
hdmitx_register_vrr(hdev);
#endif
if (!(mode & VMODE_INIT_BIT_MASK)) {
HDMITX_ERROR("warning, echo /sys/class/display/mode is disabled\n");
} else {
@@ -3077,7 +3091,9 @@ static struct hdmitx_ctrl_ops tx21_ctrl_ops = {
.init_uboot_mode = hdmitx21_init_uboot_mode,
.reset_hdcp = hdmitx21_reset_hdcp,
.clear_pkt = hdmitx21_clear_packets,
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
.disable_21_work = hdmitx21_disable_21_work,
#endif
};
static bool drm_hdmitx_get_vrr_cap(void)
@@ -3662,6 +3678,7 @@ static int amhdmitx_get_dt_info(struct platform_device *pdev, struct hdmitx_dev
return -ENXIO;
}
HDMITX_INFO("hpd irq = %d\n", hdev->irq_hpd);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
tx_vrr_params_init();
hdev->irq_vrr_vsync = platform_get_irq_byname(pdev, "vrr_vsync");
if (hdev->irq_vrr_vsync == -ENXIO) {
@@ -3670,6 +3687,7 @@ static int amhdmitx_get_dt_info(struct platform_device *pdev, struct hdmitx_dev
return -ENXIO;
}
HDMITX_INFO("vrr vsync irq = %d\n", hdev->irq_vrr_vsync);
#endif
ret = of_property_read_u32(pdev->dev.of_node, "arc_rx_en", &val);
if (!ret)
hdev->arc_rx_en = val;
@@ -3860,8 +3878,10 @@ static int amhdmitx_probe(struct platform_device *pdev)
ret = device_create_file(dev, &dev_attr_disp_mode);
ret = device_create_file(dev, &dev_attr_vid_mute);
ret = device_create_file(dev, &dev_attr_config);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
ret = device_create_file(dev, &dev_attr_vrr_cap);
ret = device_create_file(dev, &dev_attr_vrr_mode);
#endif
ret = device_create_file(dev, &dev_attr_lipsync_cap);
ret = device_create_file(dev, &dev_attr_hdmi_hdr_status);
ret = device_create_file(dev, &dev_attr_aud_mute);
@@ -4040,9 +4060,11 @@ static int amhdmitx_remove(struct platform_device *pdev)
device_remove_file(dev, &dev_attr_disp_mode);
device_remove_file(dev, &dev_attr_vid_mute);
device_remove_file(dev, &dev_attr_config);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
device_remove_file(dev, &dev_attr_vrr_cap);
device_remove_file(dev, &dev_attr_vrr_mode);
device_remove_file(dev, &dev_attr_vrr_cap);
#endif
device_remove_file(dev, &dev_attr_ll_mode);
device_remove_file(dev, &dev_attr_ll_user_mode);
device_remove_file(dev, &dev_attr_ready);
@@ -4276,7 +4298,9 @@ static struct meson_hdmitx_dev drm_hdmitx_instance = {
.register_hdcp_notify = drm_hdmitx_register_hdcp_notify,
.get_vrr_cap = drm_hdmitx_get_vrr_cap,
.get_vrr_mode_group = drm_hdmitx_get_vrr_mode_group,
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
.set_vframe_rate_hint = hdmitx_set_fr_hint,
#endif
};
int hdmitx_hook_drm(struct device *device)
+2
View File
@@ -8,7 +8,9 @@ $(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hdmi_tx_ddc.
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hw_clk.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hdmi_tx_dump.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hw_t7.o
ifndef CONFIG_AMLOGIC_ZAPPER_CUT
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hw_s5.o
endif
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hw_s1a.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/hdcp.o
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx21/hw/interrupts.o
@@ -602,6 +602,7 @@ static const struct file_operations dump_audcts_fops = {
.release = single_release,
};
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static int dump_hdmivrr_show(struct seq_file *s, void *p)
{
return hdmitx_dump_vrr_status(s, p);
@@ -617,6 +618,7 @@ static const struct file_operations dump_hdmivrr_fops = {
.read = seq_read,
.release = single_release,
};
#endif
static void dump_clkctrl_regs(struct seq_file *s, const u32 *val)
{
@@ -816,7 +818,9 @@ static struct hdmitx_dbg_files_s hdmitx_dbg_files[] = {
{"hdmi_pkt", S_IFREG | 0444, &dump_hdmipkt_fops},
{"hdmi_ver", S_IFREG | 0444, &dump_hdmiver_fops},
{"aud_cts", S_IFREG | 0444, &dump_audcts_fops},
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
{"hdmi_vrr", S_IFREG | 0444, &dump_hdmivrr_fops},
#endif
{"cts_enc_clk", S_IFREG | 0444, &dump_cts_enc_clk_fops},
{"frl_status", S_IFREG | 0444, &dump_frl_status_fops},
};
@@ -1218,8 +1218,10 @@ static int hdmitx_set_dispmode(struct hdmitx_hw_common *tx_hw)
if (dfm_type == 2)
hdmitx_dfm_cfg(2, 0);
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
if (hdev->tx_comm.rxcap.max_frl_rate)
frl_tx_training_handler(hdev);
#endif
}
return 0;
}
@@ -1881,10 +1883,12 @@ static void hdmitx_debug(struct hdmitx_hw_common *tx_hw, const char *buf)
hdev->tx_comm.fmt_para.vic = value;
hdmitx21_set_clk(hdev);
return;
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
} else if (strncmp(tmpbuf, "frl", 3) == 0) {
hdev->manual_frl_rate = tmpbuf[3] - '0';
frl_tx_training_handler(hdev);
return;
#endif
} else if (strncmp(tmpbuf, "testedid", 8) == 0) {
hdmitx_hw_cntl_ddc(&hdev->tx_hw.base, DDC_RESET_EDID, 0);
hdmitx_hw_cntl_ddc(&hdev->tx_hw.base, DDC_EDID_READ_DATA, 0);
@@ -2451,7 +2455,9 @@ static int hdmitx_cntl_misc(struct hdmitx_hw_common *tx_hw, u32 cmd,
case MISC_IS_FRL_MODE:
return !!(hdmitx21_rd_reg(HDMITX_TOP_BIST_CNTL) & (1 << 19));
case MISC_CLK_DIV_RST:
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
hdmitx21_s5_clk_div_rst(argv);
#endif
break;
case MISC_HPD_MUX_OP:
if (argv == PIN_MUX)
+8 -2
View File
@@ -196,10 +196,10 @@ static void set_hpll_sspll(enum hdmi_vic vic)
struct hdmitx_dev *hdev = get_hdmitx21_device();
switch (hdev->tx_hw.chip_data->chip_type) {
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
case MESON_CPU_ID_T7:
set21_hpll_sspll_t7(vic);
break;
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
case MESON_CPU_ID_S5:
set21_hpll_sspll_s5(vic);
break;
@@ -760,6 +760,7 @@ static struct hw_enc_clk_val_group setting_3dfp_enc_clk_val[] = {
3450000, 1, 2, 2, VID_PLL_DIV_5, 1, 1, 1, 1, 1},
};
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
/* if vsync likes 24000, 30000, ... etc, return 1 */
static bool is_vsync_int(u32 clk)
{
@@ -814,7 +815,6 @@ static u32 check_clock_shift(enum hdmi_vic vic, u32 frac_policy)
return 0;
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static void set_hdmitx_s5_htx_pll(struct hdmitx_dev *hdev)
{
enum hdmi_vic vic = HDMI_0_UNKNOWN;
@@ -1095,6 +1095,7 @@ int likely_frac_rate_mode(const char *m)
return 0;
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static void hdmitx_set_fpll_without_dsc(struct hdmitx_dev *hdev)
{
u32 fpll_vco = 2376000;
@@ -1276,12 +1277,15 @@ void hdmitx_set_gp2pll(struct hdmitx_dev *hdev)
hdmitx_set_s5_gp2pll(gp2pll_vco, div);
}
#endif
void hdmitx_set_clkdiv(struct hdmitx_dev *hdev)
{
switch (hdev->tx_hw.chip_data->chip_type) {
case MESON_CPU_ID_S5:
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
hdmitx_set_s5_clkdiv(hdev);
#endif
break;
default:
break;
@@ -1425,6 +1429,7 @@ void hdmitx21_set_clk(struct hdmitx_dev *hdev)
break;
case MESON_CPU_ID_S5:
default:
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
disable_hdmitx_s5_plls(hdev);
/* typical 3 modes: legacy tmds, FRL w/o DSC, FRL w/ DSC */
set_hdmitx_htx_pll(hdev, &test_clks);
@@ -1433,6 +1438,7 @@ void hdmitx21_set_clk(struct hdmitx_dev *hdev)
if (hdev->dsc_en)
hdmitx_set_gp2pll(hdev);
}
#endif
break;
}
return;
+13 -9
View File
@@ -7,6 +7,7 @@
#include <linux/delay.h>
#include "common.h"
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
#define WAIT_FOR_PLL_LOCKED(_reg) \
do { \
u32 st = 0; \
@@ -318,6 +319,7 @@ void set21_t7_hpll_clk_out(u32 frac_rate, u32 clk)
break;
}
}
#endif
void set21_hpll_od1_t7(u32 div)
{
@@ -382,6 +384,16 @@ void hdmitx21_phy_bandgap_en_t7(void)
hd21_write_reg(ANACTRL_HDMIPHY_CTRL0, 0x0b4242);
}
void hdmitx21_sys_reset_t7(void)
{
/* Refer to system-Registers.docx */
hd21_write_reg(RESETCTRL_RESET0, 1 << 29); /* hdmi_tx */
hd21_write_reg(RESETCTRL_RESET0, 1 << 22); /* hdmitxphy */
hd21_write_reg(RESETCTRL_RESET0, 1 << 19); /* vid_pll_div */
hd21_write_reg(RESETCTRL_RESET0, 1 << 16); /* hdmitx_apb */
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
void set21_phy_by_mode_t7(u32 mode)
{
switch (mode) {
@@ -407,15 +419,6 @@ void set21_phy_by_mode_t7(u32 mode)
}
}
void hdmitx21_sys_reset_t7(void)
{
/* Refer to system-Registers.docx */
hd21_write_reg(RESETCTRL_RESET0, 1 << 29); /* hdmi_tx */
hd21_write_reg(RESETCTRL_RESET0, 1 << 22); /* hdmitxphy */
hd21_write_reg(RESETCTRL_RESET0, 1 << 19); /* vid_pll_div */
hd21_write_reg(RESETCTRL_RESET0, 1 << 16); /* hdmitx_apb */
}
void set21_hpll_sspll_t7(enum hdmi_vic vic)
{
struct hdmitx_dev *hdev = get_hdmitx21_device();
@@ -446,3 +449,4 @@ void set21_hpll_sspll_t7(enum hdmi_vic vic)
break;
}
}
#endif
@@ -270,10 +270,12 @@ RE_ISR:
return IRQ_HANDLED;
}
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static irqreturn_t vrr_vsync_intr_handler(int irq, void *dev)
{
return hdmitx_vrr_vsync_handler((struct hdmitx_dev *)dev);
}
#endif
void hdmitx_setupirqs(struct hdmitx_dev *phdev)
{
@@ -287,9 +289,11 @@ void hdmitx_setupirqs(struct hdmitx_dev *phdev)
IRQF_SHARED, "hdmitx",
(void *)phdev);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
r = request_irq(phdev->irq_vrr_vsync, &vrr_vsync_intr_handler,
IRQF_SHARED, "hdmitx_vrr_vsync",
(void *)phdev);
#endif
if (r != 0)
HDMITX_INFO(SYS "can't request vrr_vsync irq\n");
}
+2 -2
View File
@@ -109,7 +109,7 @@ void *aml_slub_alloc_large(size_t size, gfp_t flags, int order)
p++;
saved++;
}
pr_debug("%s, page:%p, all:%5ld, size:%5ld, save:%5ld, f:%ps\n",
pr_info("%s, page:%p, all:%5ld, size:%5ld, save:%5ld, f:%ps\n",
__func__, page_address(page), total_pages * PAGE_SIZE,
(long)size, saved * PAGE_SIZE, (void *)fun);
return page;
@@ -125,7 +125,7 @@ static void aml_slub_free_large(struct page *page, const void *obj)
__ClearPageHead(page);
ClearPageOwnerPriv1(page);
nr_pages = page->index;
pr_debug("%s, page:%p, pages:%d, obj:%p\n",
pr_info("%s, page:%p, pages:%d, obj:%p\n",
__func__, page_address(page), nr_pages, obj);
for (i = 0; i < nr_pages; i++) {
__free_pages(page, 0);
+4
View File
@@ -238,6 +238,7 @@ static struct notifier_block panic_notifier = {
.notifier_call = panic_notify,
};
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
ssize_t reboot_reason_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -255,6 +256,7 @@ ssize_t reboot_reason_show(struct device *dev,
}
static DEVICE_ATTR_RO(reboot_reason);
#endif
static ssize_t reset_test_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
@@ -344,10 +346,12 @@ static int aml_restart_probe(struct platform_device *pdev)
reboot_reason_vaddr = devm_platform_ioremap_resource(pdev, 0);
if (!IS_ERR(reboot_reason_vaddr)) {
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
ret = device_create_file(&pdev->dev, &dev_attr_reboot_reason);
if (ret != 0)
pr_err("%s, device create file failed, ret = %d!\n",
__func__, ret);
#endif
support_reboot_reason_ext = of_property_read_bool(pdev->dev.of_node,
"extend_reboot_reason");
+6
View File
@@ -84,6 +84,7 @@ static ssize_t power_status_store(struct device *_dev,
}
static DEVICE_ATTR_RW(power_status);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
static ssize_t power_unused_show(struct device *_dev,
struct device_attribute *attr, char *buf)
{
@@ -99,6 +100,7 @@ static ssize_t power_unused_show(struct device *_dev,
return 0;
}
static DEVICE_ATTR_RO(power_unused);
#endif
void pd_dev_create_file(struct device *dev, int cnt_start, int cnt_end,
struct generic_pm_domain **domains)
@@ -110,7 +112,9 @@ void pd_dev_create_file(struct device *dev, int cnt_start, int cnt_end,
WARN_ON(device_create_file(dev, &dev_attr_power_status));
WARN_ON(device_create_file(dev, &dev_attr_power_on));
WARN_ON(device_create_file(dev, &dev_attr_power_off));
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
WARN_ON(device_create_file(dev, &dev_attr_power_unused));
#endif
}
void pd_dev_remove_file(struct device *dev)
@@ -118,5 +122,7 @@ void pd_dev_remove_file(struct device *dev)
device_remove_file(dev, &dev_attr_power_status);
device_remove_file(dev, &dev_attr_power_on);
device_remove_file(dev, &dev_attr_power_off);
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
device_remove_file(dev, &dev_attr_power_unused);
#endif
}