From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] usb-a9263: add spi dataflash support
Date: Sun, 14 Oct 2012 22:49:24 +0200 [thread overview]
Message-ID: <1350247764-18132-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1350247764-18132-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/boards/usb-a926x/init.c | 21 +++++++++++++++++++++
arch/arm/configs/usb_a9263_128mib_defconfig | 3 ++-
arch/arm/configs/usb_a9263_defconfig | 3 ++-
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index 7b946a3..9708aaa 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -39,6 +39,7 @@
#include <mach/at91_rstc.h>
#include <gpio_keys.h>
#include <readkey.h>
+#include <spi/spi.h>
static void usb_a9260_set_board_type(void)
{
@@ -148,6 +149,25 @@ static void usb_a9260_phy_reset(void)
AT91_RSTC_URSTEN);
}
+static const struct spi_board_info usb_a9263_spi_devices[] = {
+ {
+ .name = "mtd_dataflash",
+ .chip_select = 0,
+ .max_speed_hz = 15 * 1000 * 1000,
+ .bus_num = 0,
+ }
+};
+
+static void usb_a9260_add_spi(void)
+{
+ if (!machine_is_usb_a9263())
+ return;
+
+ spi_register_board_info(usb_a9263_spi_devices,
+ ARRAY_SIZE(usb_a9263_spi_devices));
+ at91_add_device_spi(0, NULL);
+}
+
#if defined(CONFIG_MCI_ATMEL)
static struct atmel_mci_platform_data __initdata usb_a9260_mci_data = {
.bus_width = 4,
@@ -314,6 +334,7 @@ static int usb_a9260_devices_init(void)
usb_a9260_phy_reset();
at91_add_device_eth(0, &macb_pdata);
usb_a9260_add_device_mci();
+ usb_a9260_add_spi();
at91_add_device_usbh_ohci(&ek_usbh_data);
ek_add_device_udc();
ek_add_led();
diff --git a/arch/arm/configs/usb_a9263_128mib_defconfig b/arch/arm/configs/usb_a9263_128mib_defconfig
index 87f708f..71774f9 100644
--- a/arch/arm/configs/usb_a9263_128mib_defconfig
+++ b/arch/arm/configs/usb_a9263_128mib_defconfig
@@ -64,9 +64,10 @@ CONFIG_FS_TFTP=y
CONFIG_NET_NETCONSOLE=y
CONFIG_NET_RESOLV=y
CONFIG_DRIVER_NET_MACB=y
-# CONFIG_SPI is not set
+CONFIG_DRIVER_SPI_ATMEL=y
CONFIG_MTD=y
# CONFIG_MTD_OOB_DEVICE is not set
+CONFIG_MTD_DATAFLASH=y
CONFIG_NAND=y
# CONFIG_NAND_ECC_HW is not set
# CONFIG_NAND_ECC_HW_SYNDROME is not set
diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig
index 9bfb7e7..251c654 100644
--- a/arch/arm/configs/usb_a9263_defconfig
+++ b/arch/arm/configs/usb_a9263_defconfig
@@ -63,9 +63,10 @@ CONFIG_FS_TFTP=y
CONFIG_NET_NETCONSOLE=y
CONFIG_NET_RESOLV=y
CONFIG_DRIVER_NET_MACB=y
-# CONFIG_SPI is not set
+CONFIG_DRIVER_SPI_ATMEL=y
CONFIG_MTD=y
# CONFIG_MTD_OOB_DEVICE is not set
+CONFIG_MTD_DATAFLASH=y
CONFIG_NAND=y
# CONFIG_NAND_ECC_HW is not set
# CONFIG_NAND_ECC_HW_SYNDROME is not set
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-10-14 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-14 20:46 [PATCH 0/3] add mtd " Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 20:49 ` [PATCH 1/3] import include/linux/math64.h Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 20:49 ` [PATCH 2/3] mtd: add dataflash support Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 7:08 ` Sascha Hauer
2012-10-15 10:24 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 20:49 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-15 13:32 ` [PATCH 0/3] add mtd " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350247764-18132-3-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox