]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Xilinx: ARM: move SPI from BSP to device tree for DC1
authorJohn Linn <john.linn@xilinx.com>
Fri, 3 Aug 2012 16:12:17 +0000 (09:12 -0700)
committerJohn Linn <john.linn@xilinx.com>
Fri, 3 Aug 2012 16:16:28 +0000 (09:16 -0700)
This is the last platform data being moved to the device
tree for DC1 on ZC770 (XM010).

Signed-off-by: John Linn <john.linn@xilinx.com>
arch/arm/boot/dts/zynq-zc770-xm010.dts
arch/arm/mach-zynq/Makefile
arch/arm/mach-zynq/board_zc770.c
arch/arm/mach-zynq/board_zc770_xm010.c [deleted file]

index 905fba4e43faf37b8ee892d5459457e9a2f96b3a..609f9166ddd447ec34f8833e15de49daade776c9 100644 (file)
                        speed-hz = <166666700>;
                        bus-num = <0>;
                        num-chip-select = <4>;
-               };
 
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       flash@0 {
+                               compatible = "sst25wf080";
+                               reg = <1>;
+                               spi-max-frequency = <1000000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               partition@test {
+                                       label = "spi-test";
+                                       reg = <0x0 0x100000>;
+                               };
+                       };
+
+
+               };
                qspi0: spi@e000d000 {
                        compatible = "xlnx,ps7-qspi-1.00.a";
                        reg = <0xE000D000 0x1000>;
                                };
                        };
                };
-
                devcfg@f8007000 {
                        compatible = "xlnx,ps7-dev-cfg-1.00.a";
                        reg = <0xf8007000 0x1000>;
index 0ddb54e500e94cb6607a9c686bceaed31a6442b1..0eaef74affe9edf7d78b7e5472f4a94d2903b0c8 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y                          := common.o timer.o slcr.o scu_gtimer.o board_ep107.o board_zc702.o board_zc770.o board_zc770_xm010.o board_zc770_xm013.o pl330.o platform_devices.o
+obj-y                          := common.o timer.o slcr.o scu_gtimer.o board_ep107.o board_zc702.o board_zc770.o board_zc770_xm013.o pl330.o platform_devices.o
 
 obj-$(CONFIG_HOTPLUG_CPU)      += hotplug.o
 obj-$(CONFIG_SMP)              += platsmp.o
index ce5b15515327b7f058c86169be27c147dc1b9955..6f5cc10f668f62cf69354fd14bca8400362ba6ae 100644 (file)
@@ -35,6 +35,7 @@ static void __init board_zc770_init(void)
 
 static const char *xilinx_dt_match[] = {
        "xlnx,zynq-zc770",
+       "xlnx,zynq-zc770-xm010",
        NULL
 };
 
diff --git a/arch/arm/mach-zynq/board_zc770_xm010.c b/arch/arm/mach-zynq/board_zc770_xm010.c
deleted file mode 100644 (file)
index bb81a9d..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  Copyright (C) 2011 Xilinx
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/of_platform.h>
-
-#include <linux/spi/spi.h>
-#include <linux/spi/eeprom.h>
-#include <linux/platform_device.h>
-#include <linux/device.h>
-#include <linux/spi/spi.h>
-#include <linux/mtd/physmap.h>
-#include <linux/spi/flash.h>
-#include <linux/xilinx_devices.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include <asm/hardware/gic.h>
-#include "common.h"
-
-#define IRQ_QSPI0              51
-#define IRQ_SPI1               81
-
-#ifdef CONFIG_SPI_SPIDEV
-
-static struct xspi_platform_data spi_0_pdata = {
-       .speed_hz = 75000000,
-       .bus_num = 0,
-       .num_chipselect = 1
-};
-
-#endif
-
-#ifdef CONFIG_MTD_M25P80
-
-static struct mtd_partition spi_flash_partitions[] = {
-       {
-               .name           = "spi-flash",
-               .size           = 0x100000,
-               .offset         = 0,
-       },
-};
-
-static struct flash_platform_data spi_flash_pdata = {
-       .name                   = "serial_flash",
-       .parts                  = spi_flash_partitions,
-       .nr_parts               = ARRAY_SIZE(spi_flash_partitions),
-       .type                   = "sst25wf080"  
-};
-
-#endif
-
-#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_MTD_M25P80)
-
-static struct spi_board_info __initdata xilinx_spipss_0_boardinfo[] = {
-       {
-#ifdef CONFIG_SPI_SPIDEV
-               .modalias               = "spidev",
-               .platform_data          = &spi_0_pdata,
-#else 
-               .modalias               = "m25p80",
-               .platform_data          = &spi_flash_pdata,
-#endif
-               .irq                    = IRQ_SPI1,
-               .max_speed_hz           = 40000000, /* max sample rate at 3V */
-               .bus_num                = 0,
-               .chip_select            = 1,
-       },
-};
-
-#endif
-
-extern struct sys_timer xttcpss_sys_timer;
-
-static void __init board_zc770_xm010_init(void)
-{
-
-       /* initialize the xilinx common code before the board
-        * specific
-        */
-       xilinx_init_machine();
-
-#if    defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_MTD_M25P80)
-       spi_register_board_info(&xilinx_spipss_0_boardinfo[0], 
-               ARRAY_SIZE(xilinx_spipss_0_boardinfo));
-#endif
-}
-
-static const char *xilinx_dt_match[] = {
-       "xlnx,zynq-zc770-xm010",
-       NULL
-};
-
-MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
-       .map_io         = xilinx_map_io,
-       .init_irq       = xilinx_irq_init,
-       .handle_irq     = gic_handle_irq,
-       .init_machine   = board_zc770_xm010_init,
-       .timer          = &xttcpss_sys_timer,
-       .dt_compat      = xilinx_dt_match,
-       .reserve        = xilinx_memory_init,
-MACHINE_END