u-boot-brain/drivers
Masahiro Yamada 1c193c0c6e mtd: rawnand: denali: deassert write protect pin
[ Linux commit 9afbe7c0140f663586edb6e823b616bd7076c00a ]

If the write protect signal from this IP is connected to the NAND
device, this IP can handle the WP# pin via the WRITE_PROTECT
register.

The Denali NAND Flash Memory Controller User's Guide describes
this register like follows:

  When the controller is in reset, the WP# pin is always asserted
  to the device. Once the reset is removed, the WP# is de-asserted.
  The software will then have to come and program this bit to
  assert/de-assert the same.

    1 - Write protect de-assert
    0 - Write protect assert

The default value is 1, so the write protect is de-asserted after
the reset is removed. The driver can write to the device unless
someone has explicitly cleared register before booting the kernel.

The boot ROM of some UniPhier SoCs (LD4, Pro4, sLD8, Pro5) is the
case; the boot ROM clears the WRITE_PROTECT register when the system
is booting from the NAND device, so the NAND device becomes read-only.

Set it to 1 in the driver in order to allow the write access to the
device.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2020-05-22 11:21:06 +09:00
..
adc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ata common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
axi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bios_emulator common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
block common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
board common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cache common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
clk common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
core common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
cpu common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
crypto drivers: crypto: mod_exp_sw: Re-add DM_FLAG_PRE_RELOC 2020-05-19 14:01:47 -04:00
ddr common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
demo common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dma common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fastboot common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
firmware common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fpga common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
gpio common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
hwspinlock common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
i2c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
input common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
led common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mailbox common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mmc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtd mtd: rawnand: denali: deassert write protect pin 2020-05-22 11:21:06 +09:00
net Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq 2020-05-20 08:46:56 -04:00
nvme common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pch common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pci_endpoint common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
phy common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pinctrl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
power common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pwm common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
qe common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ram common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
remoteproc common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
reset common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rng common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rtc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
scsi common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
smem common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
soc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sound common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spmi dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sysreset common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tee common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
thermal common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
timer common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tpm common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ufs common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
usb common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
video common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
virtio common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
w1 common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
w1-eeprom common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
watchdog common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig dm: rng: Add random number generator(rng) uclass 2020-01-07 18:08:21 +01:00
Makefile drivers: Descend to drivers/soc unconditionally 2020-03-03 13:08:13 +05:30