/* omap_nand_wp - This function enable or disable the Write Protect feature @mtd: MTD device structure @mode: WP ON/OFF  */
static void omap_nand_wp(struct mtd_info *mtd, int mode)
/* omap_nand_wp - This function enable or disable the Write Protect feature @mtd: MTD device structure @mode: WP ON/OFF  */
static void omap_nand_wp(struct mtd_info *mtd, int mode)
{
	struct omap_nand_info *info = container_of(mtd,
						struct omap_nand_info, mtd);
	unsigned long config = __raw_readl(info->gpmc_baseaddr + GPMC_CONFIG);
	if (mode)
		config &= ~(NAND_WP_BIT);
	else
		config |= (NAND_WP_BIT);
	__raw_writel(config, (info->gpmc_baseaddr + GPMC_CONFIG));
}