Esempio n. 1
0
static void mt_power_gs_compare_pll(void)
{
    if (pll_is_on(MSDCPLL)) {
        printk("MSDCPLL: %s\n", pll_is_on(MSDCPLL) ?  "on" : "off");
    }

    if (subsys_is_on(SYS_MD1)) {
        printk("SYS_MD1: %s\n", subsys_is_on(SYS_MD1) ? "on" : "off");
    }

    if (subsys_is_on(SYS_CONN)) {
        printk("SYS_CONN: %s\n", subsys_is_on(SYS_CONN) ? "on" : "off");
    }

    if (subsys_is_on(SYS_DIS)) {
        printk("SYS_DIS: %s\n", subsys_is_on(SYS_DIS) ? "on" : "off");
    }

    if (subsys_is_on(SYS_MFG)) {
        printk("SYS_MFG: %s\n", subsys_is_on(SYS_MFG) ? "on" : "off");
    }

    if (subsys_is_on(SYS_ISP)) {
        printk("SYS_ISP: %s\n", subsys_is_on(SYS_ISP) ? "on" : "off");
    }

    if (subsys_is_on(SYS_VDE)) {
        printk("SYS_VDE: %s\n", subsys_is_on(SYS_VDE) ? "on" : "off");
    }
}
Esempio n. 2
0
static void mt_power_gs_compare_pll(void)
{
	int i;
	#define ID_NAME(n)	{n, __stringify(n)}

	struct {
		const int id;
		const char *name;
	} plls[NR_PLLS] = {
		ID_NAME(ARMCA15PLL),
		ID_NAME(ARMCA7PLL),
		ID_NAME(MAINPLL),
		ID_NAME(MSDCPLL),
		ID_NAME(UNIVPLL),
		ID_NAME(MMPLL),
		ID_NAME(VENCPLL),
		ID_NAME(TVDPLL),
		ID_NAME(MPLL),
		ID_NAME(VCODECPLL),
		ID_NAME(APLL1),
		ID_NAME(APLL2),
	};

	struct {
		const int id;
		const char *name;
	} subsyss[NR_SYSS] = {
		ID_NAME(SYS_MD1),
		ID_NAME(SYS_DIS),
//		ID_NAME(SYS_MFG_ASYNC),
//		ID_NAME(SYS_MFG_2D),
		ID_NAME(SYS_MFG),
		ID_NAME(SYS_ISP),
		ID_NAME(SYS_VDE),
		ID_NAME(SYS_MJC),
		ID_NAME(SYS_VEN),
		ID_NAME(SYS_AUD),
	};

	for (i = 0; i < NR_PLLS; i++) {
		if (pll_is_on(i))
			printk("%s: on\n", plls[i].name);
	}

	for (i = 0; i < NR_SYSS; i++) {
		if (subsys_is_on(i))
			printk("%s: on\n", subsyss[i].name);
	}
}
static void Golden_Setting_Compare_PLL(void)
{
    if (pll_is_on(MSDCPLL)) {
        clc_notice("MSDCPLL: %s\n", pll_is_on(MSDCPLL) ?  "on" : "off");
    }
    if (pll_is_on(TVDPLL)) {
        clc_notice("TVDPLL: %s\n", pll_is_on(TVDPLL) ? "on" : "off");
    }
    if (pll_is_on(LVDSPLL)) {
        clc_notice("LVDSPLL: %s\n", pll_is_on(LVDSPLL) ? "on" : "off");
    }
    if (pll_is_on(ISPPLL)) {
        clc_notice("ISPPLL: %s\n", pll_is_on(ISPPLL) ? "on" : "off");
    }
    if (subsys_is_on(SYS_MD1)) {
        clc_notice("SYS_MD1: %s\n", subsys_is_on(SYS_MD1) ? "on" : "off");
    }
    if (subsys_is_on(SYS_MD2)) {
        clc_notice("SYS_MD2: %s\n", subsys_is_on(SYS_MD2) ? "on" : "off");
    }
    if (subsys_is_on(SYS_DIS)) {
        clc_notice("SYS_DIS: %s\n", subsys_is_on(SYS_DIS) ? "on" : "off");
    }
    if (subsys_is_on(SYS_MFG)) {
        clc_notice("SYS_MFG: %s\n", subsys_is_on(SYS_MFG) ? "on" : "off");
    }
    if (subsys_is_on(SYS_ISP)) {
        clc_notice("SYS_ISP: %s\n", subsys_is_on(SYS_ISP) ? "on" : "off");
    }
    if (subsys_is_on(SYS_VEN)) {
        clc_notice("SYS_VEN: %s\n", subsys_is_on(SYS_VEN) ? "on" : "off");
    }
    if (subsys_is_on(SYS_VDE)) {
        clc_notice("SYS_VDE: %s\n", subsys_is_on(SYS_VDE) ? "on" : "off");
    }
}
//static int freqhopping_status_proc_read(char *page, char **start, off_t off, int count, int *eof, void *data)
static int freqhopping_status_proc_read(struct seq_file* m, void* v)
{
	int 	i=0;

	FH_MSG("EN: %s",__func__);

	seq_printf(m, "FH status:\r\n");

	seq_printf(m, "===============================================\r\n" );
	seq_printf(m, "id == fh_status == pll_status == setting_id == curr_freq == user_defined ==\r\n" );


	for(i = 0;i < g_drv_pll_count ; ++i) {
		seq_printf(m, "%2d    %8d      %8d",
			i,
			g_fh_drv_pll[i].fh_status,
			g_fh_drv_pll[i].pll_status);
		seq_printf(m, "      %8d     %8d ",
			g_fh_drv_pll[i].setting_id,
			g_fh_drv_pll[i].curr_freq);

		seq_printf(m, "        %d\r\n",
			g_fh_drv_pll[i].user_defined);
	}
	seq_printf(m, "\r\n");

    return 0;

#if 0
	char 	*p = page;
	int 	len = 0;
	int 	i=0;

	FH_MSG("EN: %s",__func__);

	p += sprintf(p, "FH status:\r\n");

	p += sprintf(p, "===============================================\r\n" );
	p += sprintf(p, "id == fh_status == pll_status == setting_id == curr_freq == user_defined ==\r\n" );


	for(i=0;i<g_drv_pll_count ;i++) {
		p += sprintf(p, "%2d    %8d      %8d",
			i,
			g_fh_drv_pll[i].fh_status,
			g_fh_drv_pll[i].pll_status);
		p += sprintf(p, "      %8d     %8d ",
			g_fh_drv_pll[i].setting_id,
			g_fh_drv_pll[i].curr_freq);

		p += sprintf(p, "        %d\r\n",
			g_fh_drv_pll[i].user_defined);
	}
#if 0
	p += sprintf(p, "\r\nPLL status:\r\n");
	for(i=0;i<g_drv_pll_count ;i++) {
		p += sprintf(p, "%d ",pll_is_on(i));
	}
#endif
	p += sprintf(p, "\r\n");

	//TODO: unsigned int mt_get_cpu_freq(void)


	*start = page + off;

	len = p - page;

	if (len > off)
		len -= off;
	else
		len = 0;

	return len < count ? len : count;
#endif
}