+ avr32-move-spi-device-definitions-into-main-board.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     AVR32: Move spi device definitions into main board  setup file
has been added to the -mm tree.  Its filename is
     avr32-move-spi-device-definitions-into-main-board.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: AVR32: Move spi device definitions into main board  setup file
From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>

There's no point in having a separate file just to set up the board- specific
data for spi.  By moving it into the rest of the board- specific setup code,
we can also make sure that the data is registered before we register the spi
master controller.

This patch also records the GPIO pin to use as chip select in the
controller_data member of the spi_board_info data for each device.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>
Cc: David Brownell <david-b@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/avr32/boards/atstk1000/Makefile    |    2 -
 arch/avr32/boards/atstk1000/atstk1002.c |   15 ++++++++++++
 arch/avr32/boards/atstk1000/spi.c       |   27 ----------------------
 3 files changed, 16 insertions(+), 28 deletions(-)

diff -puN arch/avr32/boards/atstk1000/Makefile~avr32-move-spi-device-definitions-into-main-board arch/avr32/boards/atstk1000/Makefile
--- a/arch/avr32/boards/atstk1000/Makefile~avr32-move-spi-device-definitions-into-main-board
+++ a/arch/avr32/boards/atstk1000/Makefile
@@ -1,2 +1,2 @@
-obj-y				+= setup.o spi.o flash.o
+obj-y				+= setup.o flash.o
 obj-$(CONFIG_BOARD_ATSTK1002)	+= atstk1002.o
diff -puN arch/avr32/boards/atstk1000/atstk1002.c~avr32-move-spi-device-definitions-into-main-board arch/avr32/boards/atstk1000/atstk1002.c
--- a/arch/avr32/boards/atstk1000/atstk1002.c~avr32-move-spi-device-definitions-into-main-board
+++ a/arch/avr32/boards/atstk1000/atstk1002.c
@@ -7,11 +7,24 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/device.h>
 #include <linux/init.h>
+#include <linux/spi/spi.h>
 
+#include <asm/arch/at32ap7000.h>
 #include <asm/arch/board.h>
 #include <asm/arch/init.h>
 
+static struct spi_board_info spi_board_info[] __initdata = {
+	{
+		.modalias       = "ltv350qv",
+		.controller_data = (void *)GPIO_PIN_PA4,
+		.max_speed_hz   = 16000000,
+		.bus_num        = 0,
+		.chip_select    = 1,
+	},
+};
+
 struct eth_platform_data __initdata eth0_data = {
 	.valid		= 1,
 	.mii_phy_addr	= 0x10,
@@ -39,6 +52,8 @@ static int __init atstk1002_init(void)
 	at32_add_device_usart(2);
 
 	at32_add_device_eth(0, &eth0_data);
+
+	spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
 	at32_add_device_spi(0);
 	at32_add_device_lcdc(0, &atstk1000_fb0_data);
 
diff -puN arch/avr32/boards/atstk1000/spi.c~avr32-move-spi-device-definitions-into-main-board /dev/null
--- a/arch/avr32/boards/atstk1000/spi.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ATSTK1000 SPI devices
- *
- * Copyright (C) 2005 Atmel Norway
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/device.h>
-#include <linux/spi/spi.h>
-
-static struct spi_board_info spi_board_info[] __initdata = {
-	{
-		.modalias	= "ltv350qv",
-		.max_speed_hz	= 16000000,
-		.bus_num	= 0,
-		.chip_select	= 1,
-	},
-};
-
-static int board_init_spi(void)
-{
-	spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
-	return 0;
-}
-arch_initcall(board_init_spi);
_

Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are

origin.patch
fix-x86_64-mm-i386-reloc-kallsyms.patch
gpio-framework-for-avr32.patch
avr32-spi-ethernet-platform_device-update.patch
avr32-move-spi-device-definitions-into-main-board.patch
atmel-spi-driver.patch
atmel-spi-driver-maintainers-entry.patch
generic-ioremap_page_range-mips-conversion.patch
generic-ioremap_page_range-parisc-conversion.patch
generic-ioremap_page_range-s390-conversion.patch
generic-ioremap_page_range-sh-conversion.patch
generic-ioremap_page_range-sh64-conversion.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux