lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Nov 2013 10:59:02 +0800
From:	micky <micky_ching@...lsil.com.cn>
To:	Lee Jones <lee.jones@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <sameo@...ux.intel.com>
CC:	<linus.walleij@...aro.org>
Subject: Re: [PATCH 2/4] mfd: rtsx: Generify the switch voltage routine

Hi Lee

Thank you for your work.

Switch output voltage may have some problem here.
1. modify params of function in pcr_ops may affect other chips, like
rts52xx, and we may add other registers or value in the future, just
add params may not enough to handle this case. So I think different
chip should use a different function here, and modify the function
will not affect others.

2. rtl8402 has another difference with 8411 here, it doesn't use
  BPP_ASIC_1V8, but use BPP_ASIC_2V0.

so, I will send another patch to fix this problem.

> -static int rtl8411_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
> +static int rtl84xx_switch_output_voltage(struct rtsx_pcr *pcr,
> +					 u8 voltage, int shift)
>   {
>   	u8 mask, val;
>   	int err;
>   
> -	mask = (BPP_REG_TUNED18 << BPP_TUNED18_SHIFT_8411) | BPP_PAD_MASK;
> +	mask = (BPP_REG_TUNED18 << shift) | BPP_PAD_MASK;
>   	if (voltage == OUTPUT_3V3) {
>   		err = rtsx_pci_write_register(pcr,
>   				SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_3v3);
>   		if (err < 0)
>   			return err;
> -		val = (BPP_ASIC_3V3 << BPP_TUNED18_SHIFT_8411) | BPP_PAD_3V3;
> +		val = (BPP_ASIC_3V3 << shift) | BPP_PAD_3V3;
>   	} else if (voltage == OUTPUT_1V8) {
>   		err = rtsx_pci_write_register(pcr,
>   				SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_1v8);
>   		if (err < 0)
>   			return err;
> -		val = (BPP_ASIC_1V8 << BPP_TUNED18_SHIFT_8411) | BPP_PAD_1V8;
> +		val = (BPP_ASIC_1V8 << shift) | BPP_PAD_1V8;
>   	} else {
>   		return -EINVAL;
>   	}


-- 
Best Regards
Micky.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ