Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Flash support for OMAP1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #include <linux/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #include <linux/mtd/mtd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/mtd/map.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <mach/tc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include "flash.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <mach/hardware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) void omap1_set_vpp(struct platform_device *pdev, int enable)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	u32 l;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	l = omap_readl(EMIFS_CONFIG);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	if (enable)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 		l |= OMAP_EMIFS_CONFIG_WP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 		l &= ~OMAP_EMIFS_CONFIG_WP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	omap_writel(l, EMIFS_CONFIG);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) }