mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Asen Chavdarov Dimov <dimov@ronetix.at>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] pm9g45: enable USB OHCI host and USB mass storage
Date: Thu,  1 Mar 2012 18:21:29 +0200	[thread overview]
Message-ID: <1330618889-11482-3-git-send-email-dimov@ronetix.at> (raw)
In-Reply-To: <1330618889-11482-1-git-send-email-dimov@ronetix.at>

FIXME: execute the "usb" command twice to create the /dev/disk0 device.

Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
---
 arch/arm/boards/pm9g45/init.c     |   21 ++++++++++++++++++++-
 arch/arm/configs/pm9g45_defconfig |   31 +++++++++++++++----------------
 2 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 257e5e2..b26038e 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -92,6 +92,23 @@ static void add_device_mci(void)
 static void add_device_mci(void) {}
 #endif
 
+/*
+ * USB OHCI Host port
+ */
+#ifdef CONFIG_USB_OHCI_AT91
+static struct at91_usbh_data  __initdata usbh_data = {
+	.ports		= 2,
+	.vbus_pin	= { AT91_PIN_PD0,  0x0 },
+};
+
+static void __init add_device_usbh(void)
+{
+	at91_add_device_usbh_ohci(&usbh_data);
+}
+#else
+static void __init add_device_usbh(void) {}
+#endif
+
 static struct at91_ether_platform_data macb_pdata = {
 	.flags = AT91SAM_ETHER_RMII,
 	.phy_addr = 0,
@@ -123,7 +140,8 @@ static const char *periph_clocks[] __initdata = {
 	"pioB_clk",
 	"pioC_clk",
 	"pioDE_clk",
-	"macb_clk"
+	"macb_clk",
+	"uhphs_clk"
 };
 
 static int pm9g45_devices_init(void)
@@ -140,6 +158,7 @@ static int pm9g45_devices_init(void)
 	add_device_mci();
 	pm_add_device_nand();
 	at91_add_device_eth(&macb_pdata);
+	add_device_usbh();
 
 	devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index 5132ea4..1f3c780 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -197,7 +197,7 @@ CONFIG_CMD_CRC_CMP=y
 #
 # flash                         
 #
-CONFIG_CMD_FLASH=y
+# CONFIG_CMD_FLASH is not set
 CONFIG_CMD_UBI=y
 
 #
@@ -223,15 +223,15 @@ CONFIG_CMD_HELP=y
 CONFIG_CMD_DEVINFO=y
 # CONFIG_CMD_GPIO is not set
 # CONFIG_CMD_UNCOMPRESS is not set
-CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 # CONFIG_NET_NFS is not set
 CONFIG_NET_PING=y
-# CONFIG_NET_TFTP is not set
-# CONFIG_NET_TFTP_PUSH is not set
+CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
 # CONFIG_NET_NETCONSOLE is not set
-# CONFIG_NET_RESOLV is not set
+CONFIG_NET_RESOLV=y
 
 #
 # Drivers                       
@@ -252,17 +252,14 @@ CONFIG_MIIDEV=y
 # CONFIG_DRIVER_NET_SMC911X is not set
 # CONFIG_DRIVER_NET_SMC91111 is not set
 CONFIG_DRIVER_NET_MACB=y
+# CONFIG_NET_USB is not set
 
 #
 # SPI drivers                   
 #
 CONFIG_SPI=y
 CONFIG_DRIVER_SPI_ATMEL=y
-CONFIG_I2C=y
-
-#
-# I2C Hardware Bus support
-#
+# CONFIG_I2C is not set
 
 #
 # flash drivers                 
@@ -298,13 +295,19 @@ CONFIG_DISK_WRITE=y
 #
 # drive types
 #
-# CONFIG_DISK_ATA is not set
+CONFIG_DISK_ATA=y
 
 #
 # interface types
 #
 # CONFIG_DISK_INTF_PLATFORM_IDE is not set
-# CONFIG_USB is not set
+CONFIG_USB=y
+# CONFIG_USB_EHCI is not set
+CONFIG_USB_OHCI=y
+CONFIG_USB_OHCI_AT91=y
+# CONFIG_USB_ISP1504 is not set
+# CONFIG_USB_TWL4030 is not set
+CONFIG_USB_STORAGE=y
 # CONFIG_USB_GADGET is not set
 # CONFIG_VIDEO is not set
 CONFIG_MCI=y
@@ -327,10 +330,6 @@ CONFIG_CLKDEV_LOOKUP=y
 # MFD
 #
 # CONFIG_I2C_MC13892 is not set
-# CONFIG_I2C_MC34704 is not set
-# CONFIG_I2C_MC9SDZ60 is not set
-# CONFIG_I2C_LP3972 is not set
-# CONFIG_I2C_TWL6030 is not set
 # CONFIG_DRIVER_SPI_MC13783 is not set
 # CONFIG_LED is not set
 
-- 
1.7.4.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-03-01 16:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 16:21 [PATCH 1/3] pm9g45: fix Ethernet Asen Chavdarov Dimov
2012-03-01 16:21 ` [PATCH 2/3] pm9g45: enable MCI0 Asen Chavdarov Dimov
2012-03-01 17:10   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-01 16:21 ` Asen Chavdarov Dimov [this message]
2012-03-01 17:12   ` [PATCH 3/3] pm9g45: enable USB OHCI host and USB mass storage Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 15:20     ` RONETIX - Asen Dimov
2012-03-02 17:13       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-01 17:08 ` [PATCH 1/3] pm9g45: fix Ethernet Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 16:55 ` [PATCH v2 1/4] pm9g45: boot from NAND Asen Chavdarov Dimov
2012-03-02 16:55   ` [PATCH v2 2/4] pm9g45: fix Ethernet Asen Chavdarov Dimov
2012-03-02 17:19     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 16:55   ` [PATCH v2 3/4] pm9g45: enable MCI0 Asen Chavdarov Dimov
2012-03-02 17:21     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 16:55   ` [PATCH v2 4/4] pm9g45: enable USB OHCI host and USB mass storage Asen Chavdarov Dimov
2012-03-02 17:22     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 17:18   ` [PATCH v2 1/4] pm9g45: boot from NAND Jean-Christophe PLAGNIOL-VILLARD
2012-03-08 11:37     ` RONETIX - Asen Dimov
2012-03-08 13:05       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-21 16:43         ` RONETIX - Asen Dimov
2012-03-21 16:27 ` [PATCH v3 " Asen Chavdarov Dimov
2012-03-21 16:27   ` [PATCH v3 2/4] pm9g45: fix Ethernet Asen Chavdarov Dimov
2012-03-21 16:27   ` [PATCH v3 3/4] pm9g45: enable MCI0 Asen Chavdarov Dimov
2012-03-22 20:17     ` Sascha Hauer
2012-03-23 12:55       ` RONETIX - Asen Dimov
2012-03-23 15:18         ` Sascha Hauer
2012-03-21 16:27   ` [PATCH v3 4/4] pm9g45: enable USB OHCI host and USB mass storage Asen Chavdarov Dimov

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=1330618889-11482-3-git-send-email-dimov@ronetix.at \
    --to=dimov@ronetix.at \
    --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