From 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:05:51 +0200 Subject: Adding upstream version 5.10.209. Signed-off-by: Daniel Baumann --- arch/arm/mach-omap1/flash.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 arch/arm/mach-omap1/flash.c (limited to 'arch/arm/mach-omap1/flash.c') diff --git a/arch/arm/mach-omap1/flash.c b/arch/arm/mach-omap1/flash.c new file mode 100644 index 000000000..40e43ce53 --- /dev/null +++ b/arch/arm/mach-omap1/flash.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Flash support for OMAP1 + */ + +#include +#include +#include + +#include +#include "flash.h" + +#include + +void omap1_set_vpp(struct platform_device *pdev, int enable) +{ + u32 l; + + l = omap_readl(EMIFS_CONFIG); + if (enable) + l |= OMAP_EMIFS_CONFIG_WP; + else + l &= ~OMAP_EMIFS_CONFIG_WP; + omap_writel(l, EMIFS_CONFIG); +} -- cgit v1.2.3