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>] [day] [month] [year] [list]
Date:	Sat, 15 Jun 2013 21:48:25 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	xulinuxkernel <xulinuxkernel@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Re: pinctrl:when two device use the same pin

On Sat, Jun 15, 2013 at 2:10 PM, xulinuxkernel <xulinuxkernel@...il.com> wrote:

> In my company,on the chip, the spi nor flash and nand flash use the same
> four pins.In this case,it must be different devices and different drivers.
> In the "Runtime pinmuxing", I think it is one device has two different
> state.

This does not sound like runtime pin muxing.

This sounds like you have *either* a NOT flash *or* a NAND
flash connected to your chip, not both NOR and NAND at the
same time.

Just do not register the device nor add the pinctrl tables
for the one that is not used on a certain target system.
Atleast do not add the pinctrl tables for NOR when using
NAND and vice versa.

> when spi flash use the pin.then nand request the pin it will fail,I just add
> the current(nand) process in an wait queue,after the spi flash pinctl_put,
> spi will wake_up the wait queue.
>
> when nand use the pin,if spi request fail, I add the spi process on the same
> wait queue,when nand release the pin,nand will wake up the wait queue.
> Is that ok?

This sounds like a horribly complicated hack to do something
very simple. Look at the problem from a higher level.

Why do you do this? Obviously you have either NOR or NAND
connected? Don't you know from the system board file or
device tree which one it is?

Yours,
Linus Walleij
--
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