]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Malta: Probe pflash via DT
authorPaul Burton <paul.burton@imgtec.com>
Mon, 19 Sep 2016 21:21:27 +0000 (22:21 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Oct 2016 15:31:01 +0000 (17:31 +0200)
Add the DT nodes required to probe the CFI compatible parallel monitor
flash found on the Malta development board, and remove the platform
code that was previously doing it. Delete the now-empty malta-platform.c
file. Adjust the Malta defconfigs that enable MTD & the pflash/CFI
driver to enable CONFIG_MTD_PHYSMAP_OF rather than CONFIG_MTD_PHYSMAP in
order to preserve their behaviour.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14278/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/boot/dts/mti/malta.dts
arch/mips/configs/malta_defconfig
arch/mips/configs/malta_kvm_defconfig
arch/mips/configs/malta_kvm_guest_defconfig
arch/mips/configs/maltaup_xpa_defconfig
arch/mips/mti-malta/malta-platform.c

index fecbca8ca691036e918b657844c43b7c8550a671..48783b13f88911bb956b793d3fbe87c184bd89d6 100644 (file)
                interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
        };
 
+       flash@1e000000 {
+               compatible = "intel,dt28f160", "cfi-flash";
+               reg = <0x1e000000 0x400000>;
+               bank-width = <4>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       yamon@0 {
+                               label = "YAMON";
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       user-fs@100000 {
+                               label = "User FS";
+                               reg = <0x100000 0x2e0000>;
+                       };
+
+                       board-config@3e0000 {
+                               label = "Board Config";
+                               reg = <0x3e0000 0x20000>;
+                               read-only;
+                       };
+               };
+       };
+
        isa {
                compatible = "isa";
                #address-cells = <2>;
index 5afb4840aec75c3d41fb7a4fd08b8322d0437904..d5d4816a1dd80e1825a43de124640fa861a3d6b5 100644 (file)
@@ -230,7 +230,7 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_UBI=m
 CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_BLK_DEV_FD=m
index 98f13879bb8fda832e3e73355f96af7defdcbc23..ef6ef24c6213da043824de451676e133e64ee41c 100644 (file)
@@ -235,7 +235,7 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_UBI=m
 CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_BLK_DEV_FD=m
index 3b5d5913f548cddaf65f457da86ae245dee9f06d..3a49a770eb413e7609a9e457a212dca9ab2232bd 100644 (file)
@@ -234,7 +234,7 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_UBI=m
 CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_BLK_DEV_FD=m
index 73221573275166e1ae7d044b1bad8dfa1b1f6d65..62e05eb3bb54a7f4cc9a12f9aa21c419b0d5deb4 100644 (file)
@@ -231,7 +231,7 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_UBI=m
 CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_BLK_DEV_FD=m
index 4e003b900fa2ee91f0f2eadb75066cca67be7fda..516e1233d771cb3cd87cde8e73ef6f4d296e861b 100644 (file)
 #include <linux/serial_8250.h>
 #include <linux/module.h>
 #include <linux/irq.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
 #include <asm/mips-boards/maltaint.h>
-#include <mtd/mtd-abi.h>
 
 #define SMC_PORT(base, int)                                            \
 {                                                                      \
@@ -67,49 +64,8 @@ static struct platform_device malta_uart8250_device = {
        },
 };
 
-static struct mtd_partition malta_mtd_partitions[] = {
-       {
-               .name =         "YAMON",
-               .offset =       0x0,
-               .size =         0x100000,
-               .mask_flags =   MTD_WRITEABLE
-       }, {
-               .name =         "User FS",
-               .offset =       0x100000,
-               .size =         0x2e0000
-       }, {
-               .name =         "Board Config",
-               .offset =       0x3e0000,
-               .size =         0x020000,
-               .mask_flags =   MTD_WRITEABLE
-       }
-};
-
-static struct physmap_flash_data malta_flash_data = {
-       .width          = 4,
-       .nr_parts       = ARRAY_SIZE(malta_mtd_partitions),
-       .parts          = malta_mtd_partitions
-};
-
-static struct resource malta_flash_resource = {
-       .start          = 0x1e000000,
-       .end            = 0x1e3fffff,
-       .flags          = IORESOURCE_MEM
-};
-
-static struct platform_device malta_flash_device = {
-       .name           = "physmap-flash",
-       .id             = 0,
-       .dev            = {
-               .platform_data  = &malta_flash_data,
-       },
-       .num_resources  = 1,
-       .resource       = &malta_flash_resource,
-};
-
 static struct platform_device *malta_devices[] __initdata = {
        &malta_uart8250_device,
-       &malta_flash_device,
 };
 
 static int __init malta_add_devices(void)