forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/arch/arm/mach-pxa/balloon3.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-pxa/balloon3.c
34 *
....@@ -7,10 +8,6 @@
78 * Created: June, 2006
89 * Copyright: Toby Churchill Ltd
910 * Derived from mainstone.c, by Nico Pitre
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License version 2 as
13
- * published by the Free Software Foundation.
1411 */
1512
1613 #include <linux/export.h>
....@@ -25,18 +22,17 @@
2522 #include <linux/ioport.h>
2623 #include <linux/ucb1400.h>
2724 #include <linux/mtd/mtd.h>
28
-#include <linux/mtd/partitions.h>
2925 #include <linux/types.h>
3026 #include <linux/platform_data/pcf857x.h>
3127 #include <linux/platform_data/i2c-pxa.h>
32
-#include <linux/mtd/rawnand.h>
28
+#include <linux/mtd/platnand.h>
3329 #include <linux/mtd/physmap.h>
3430 #include <linux/regulator/max1586.h>
3531
3632 #include <asm/setup.h>
3733 #include <asm/mach-types.h>
3834 #include <asm/irq.h>
39
-#include <asm/sizes.h>
35
+#include <linux/sizes.h>
4036
4137 #include <asm/mach/arch.h>
4238 #include <asm/mach/map.h>
....@@ -291,9 +287,6 @@
291287
292288 static struct pxamci_platform_data balloon3_mci_platform_data = {
293289 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
294
- .gpio_card_detect = -1,
295
- .gpio_card_ro = -1,
296
- .gpio_power = -1,
297290 .detect_delay_ms = 200,
298291 };
299292
....@@ -571,9 +564,9 @@
571564 * NAND
572565 ******************************************************************************/
573566 #if defined(CONFIG_MTD_NAND_PLATFORM)||defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
574
-static void balloon3_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
567
+static void balloon3_nand_cmd_ctl(struct nand_chip *this, int cmd,
568
+ unsigned int ctrl)
575569 {
576
- struct nand_chip *this = mtd_to_nand(mtd);
577570 uint8_t balloon3_ctl_set = 0, balloon3_ctl_clr = 0;
578571
579572 if (ctrl & NAND_CTRL_CHANGE) {
....@@ -597,10 +590,10 @@
597590 }
598591
599592 if (cmd != NAND_CMD_NONE)
600
- writeb(cmd, this->IO_ADDR_W);
593
+ writeb(cmd, this->legacy.IO_ADDR_W);
601594 }
602595
603
-static void balloon3_nand_select_chip(struct mtd_info *mtd, int chip)
596
+static void balloon3_nand_select_chip(struct nand_chip *this, int chip)
604597 {
605598 if (chip < 0 || chip > 3)
606599 return;
....@@ -616,7 +609,7 @@
616609 BALLOON3_NAND_CONTROL_REG);
617610 }
618611
619
-static int balloon3_nand_dev_ready(struct mtd_info *mtd)
612
+static int balloon3_nand_dev_ready(struct nand_chip *this)
620613 {
621614 return __raw_readl(BALLOON3_NAND_STAT_REG) & BALLOON3_NAND_STAT_RNB;
622615 }