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]
Message-ID: <20150311165559.29d6cfe4@gavidov-lnx.qualcomm.com>
Date:	Wed, 11 Mar 2015 16:55:59 -0600
From:	Gilad Avidov <gavidov@...eaurora.org>
To:	"Ivan T. Ivanov" <iivanov@...sol.com>
Cc:	sdharia@...eaurora.org, mlocke@...eaurora.org,
	linux-arm-msm@...r.kernel.org, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org, galak@...eaurora.org,
	agross@...eaurora.org
Subject: Re: [PATCH V4 2/2] spmi: pmic_arb: add support for hw version 2

Hi Ivan,

On Mon, 23 Feb 2015 18:06:10 +0200
"Ivan T. Ivanov" <iivanov@...sol.com> wrote:

> 
> Hi Gilad, 
> 
> On Thu, 2015-02-19 at 15:54 -0700, Gilad Avidov wrote:
> 
> > 
> > +
> > +static u32 pmic_arb_fmt_cmd_v1(u8 opc, u8 sid, u16 addr, u8 bc)
> > +{
> > +       return (opc << 27) | ((sid & 0xf) << 20) | (addr << 4) |
> > (bc & 0x7); +}
> > +
> > +static u32 pmic_arb_fmt_cmd_v2(u8 opc, u8 sid, u16 addr, u8 bc)
> > +{
> > +       return (opc << 27) | ((addr & 0xff) << 4) | (bc & 0x7);
> 
> This one is looking suspicious. Address could be only 8 bits? Slave
> ID is not used?
> 
> Is this correct?

Yes it is correct.
On HW v2 we are writing the command directly to a channel which is
specific (already configured) to an SID and the upper 8 bits of the
address. 
This is how we get the channel:
u32 offset = pmic_arb->ver_ops->offset(pmic_arb, sid, addr);

The lower 8 bits of the address is all that we need to have the
entire 20bits of SPMI addressing.

Thanks,
Gilad

> 
> Ivan
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-arm-msm" in the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
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