linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: Allocate pram dynamically.
@ 2011-08-23 12:38 Joakim Tjernlund
  2011-08-23 13:02 ` Anton Vorontsov
  0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2011-08-23 12:38 UTC (permalink / raw)
  To: Anton Vorontsov, linuxppc-dev

MPC832x does not have enough MURAM to do fixed MURAM allocation.
Change to dynamic allocation.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 drivers/usb/host/fhci-hcd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index c7c8392..98adbe8 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -622,12 +622,15 @@ static int __devinit of_fhci_probe(struct of_device *ofdev,
 		goto err_pram;
 	}
 
-	pram_addr = cpm_muram_alloc_fixed(iprop[2], FHCI_PRAM_SIZE);
+	pram_addr = cpm_muram_alloc(FHCI_PRAM_SIZE, 64);
 	if (IS_ERR_VALUE(pram_addr)) {
 		dev_err(dev, "failed to allocate usb pram\n");
 		ret = -ENOMEM;
 		goto err_pram;
 	}
+
+	qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, QE_CR_SUBBLOCK_USB,
+		     QE_CR_PROTOCOL_UNSPECIFIED, pram_addr);
 	fhci->pram = cpm_muram_addr(pram_addr);
 
 	/* GPIOs and pins */
-- 
1.7.3.4

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

* Re: [PATCH] usb: Allocate pram dynamically.
  2011-08-23 12:38 [PATCH] usb: Allocate pram dynamically Joakim Tjernlund
@ 2011-08-23 13:02 ` Anton Vorontsov
  2011-08-23 13:23   ` Joakim Tjernlund
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Vorontsov @ 2011-08-23 13:02 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: linuxppc-dev

On Tue, Aug 23, 2011 at 02:38:41PM +0200, Joakim Tjernlund wrote:
> MPC832x does not have enough MURAM to do fixed MURAM allocation.
> Change to dynamic allocation.
> 
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Thanks!

p.s. You probably want to send this to Greg KH, + Cc linux-usb
mailing list.

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

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

* Re: [PATCH] usb: Allocate pram dynamically.
  2011-08-23 13:02 ` Anton Vorontsov
@ 2011-08-23 13:23   ` Joakim Tjernlund
  0 siblings, 0 replies; 3+ messages in thread
From: Joakim Tjernlund @ 2011-08-23 13:23 UTC (permalink / raw)
  To: Anton Vorontsov, Greg Kroah-Hartman; +Cc: linux-usb, linuxppc-dev

Anton Vorontsov <cbouatmailru@gmail.com> wrote on 2011/08/23 15:02:53:

> From: Anton Vorontsov <cbouatmailru@gmail.com>
> To: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> Cc: linuxppc-dev@lists.ozlabs.org
> Date: 2011/08/23 15:02
> Subject: Re: [PATCH] usb: Allocate pram dynamically.
>
> On Tue, Aug 23, 2011 at 02:38:41PM +0200, Joakim Tjernlund wrote:
> > MPC832x does not have enough MURAM to do fixed MURAM allocation.
> > Change to dynamic allocation.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
>
> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
>
> Thanks!
>
> p.s. You probably want to send this to Greg KH, + Cc linux-usb
> mailing list.

Added linux-usb and Greg KH per Antons suggestion.

 Jocke

>From 587137e365ac1ba7e333a09962b3e4b68c587808 Mon Sep 17 00:00:00 2001
From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date: Tue, 23 Aug 2011 11:04:24 +0200
Subject: [PATCH] usb: Allocate pram dynamically.

MPC832x does not have enough MURAM to do fixed MURAM allocation.
Change to dynamic allocation.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 drivers/usb/host/fhci-hcd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index c7c8392..98adbe8 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -622,12 +622,15 @@ static int __devinit of_fhci_probe(struct of_device *ofdev,
 		goto err_pram;
 	}

-	pram_addr = cpm_muram_alloc_fixed(iprop[2], FHCI_PRAM_SIZE);
+	pram_addr = cpm_muram_alloc(FHCI_PRAM_SIZE, 64);
 	if (IS_ERR_VALUE(pram_addr)) {
 		dev_err(dev, "failed to allocate usb pram\n");
 		ret = -ENOMEM;
 		goto err_pram;
 	}
+
+	qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, QE_CR_SUBBLOCK_USB,
+		     QE_CR_PROTOCOL_UNSPECIFIED, pram_addr);
 	fhci->pram = cpm_muram_addr(pram_addr);

 	/* GPIOs and pins */
--
1.7.3.4

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

end of thread, other threads:[~2011-08-23 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23 12:38 [PATCH] usb: Allocate pram dynamically Joakim Tjernlund
2011-08-23 13:02 ` Anton Vorontsov
2011-08-23 13:23   ` Joakim Tjernlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).