mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] usb ehci: Add resource sizes
@ 2012-05-23 14:13 Sascha Hauer
  2012-05-23 14:13 ` [PATCH 2/2] usb ehci: Use zalloc to allocate ehci structure Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2012-05-23 14:13 UTC (permalink / raw)
  To: barebox

add_usb_ehci_device registers resources with size 0. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/base/resource.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/resource.c b/drivers/base/resource.c
index b31c7d7..347b2f0 100644
--- a/drivers/base/resource.c
+++ b/drivers/base/resource.c
@@ -113,8 +113,10 @@ struct device_d *add_usb_ehci_device(int id, resource_size_t hccr,
 
 	res = xzalloc(sizeof(struct resource) * 2);
 	res[0].start = hccr;
+	res[0].size = 0x40;
 	res[0].flags = IORESOURCE_MEM;
 	res[1].start = hcor;
+	res[1].size = 0xc0;
 	res[1].flags = IORESOURCE_MEM;
 
 	return add_generic_device_res("ehci", id, res, 2, pdata);
-- 
1.7.10


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] usb ehci: Use zalloc to allocate ehci structure
  2012-05-23 14:13 [PATCH 1/2] usb ehci: Add resource sizes Sascha Hauer
@ 2012-05-23 14:13 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-05-23 14:13 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/usb/host/ehci-hcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index ae2b41e..a2473a9 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -858,7 +858,7 @@ static int ehci_probe(struct device_d *dev)
 	uint32_t reg;
 	struct ehci_platform_data *pdata = dev->platform_data;
 
-	ehci = xmalloc(sizeof(struct ehci_priv));
+	ehci = xzalloc(sizeof(struct ehci_priv));
 	host = &ehci->host;
 	dev->priv = ehci;
 
-- 
1.7.10


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-23 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23 14:13 [PATCH 1/2] usb ehci: Add resource sizes Sascha Hauer
2012-05-23 14:13 ` [PATCH 2/2] usb ehci: Use zalloc to allocate ehci structure Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox