* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
@ 2008-01-11 1:35 ` Paul Mundt
2008-01-20 0:16 ` Kristoffer Ericson
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Paul Mundt @ 2008-01-11 1:35 UTC (permalink / raw)
To: linux-sh
On Thu, Jan 10, 2008 at 09:08:26PM +0900, Yoshihiro Shimoda wrote:
> add resource of USB for SH7720.
>
> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
2008-01-11 1:35 ` Paul Mundt
@ 2008-01-20 0:16 ` Kristoffer Ericson
2008-01-21 7:00 ` Manuel Lauss
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kristoffer Ericson @ 2008-01-20 0:16 UTC (permalink / raw)
To: linux-sh
Greetings,
Without looking to heavily in the hd64465 datasheet, you think this would work for hd64465+SH7729 platform? It contains an OHCI based usb host.
Best wishes
Kristoffer
On Thu, 10 Jan 2008 21:08:26 +0900
Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> wrote:
> add resource of USB for SH7720.
>
> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
> ---
> arch/sh/kernel/cpu/sh3/setup-sh7720.c | 53 ++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff -uprN a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
> --- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c 2008-01-08 20:41:40.000000000 +0900
> +++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c 2008-01-10 15:13:37.000000000 +0900
> @@ -85,9 +85,62 @@ static struct platform_device sci_device
> },
> };
>
> +static struct resource usb_ohci_resources[] = {
> + [0] = {
> + .start = 0xA4428000,
> + .end = 0xA44280FF,
> + .flags = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start = 67,
> + .end = 67,
> + .flags = IORESOURCE_IRQ,
> + },
> +};
> +
> +static u64 usb_ohci_dma_mask = 0xffffffffUL;
> +static struct platform_device usb_ohci_device = {
> + .name = "sh_ohci",
> + .id = -1,
> + .dev = {
> + .dma_mask = &usb_ohci_dma_mask,
> + .coherent_dma_mask = 0xffffffff,
> + },
> + .num_resources = ARRAY_SIZE(usb_ohci_resources),
> + .resource = usb_ohci_resources,
> +};
> +
> +static struct resource usbf_resources[] = {
> + [0] = {
> + .name = "sh_udc",
> + .start = 0xA4420000,
> + .end = 0xA44200FF,
> + .flags = IORESOURCE_MEM,
> + },
> + [1] = {
> + .name = "sh_udc",
> + .start = 65,
> + .end = 65,
> + .flags = IORESOURCE_IRQ,
> + },
> +};
> +
> +static struct platform_device usbf_device = {
> + .name = "sh_udc",
> + .id = -1,
> + .dev = {
> + .dma_mask = NULL,
> + .coherent_dma_mask = 0xffffffff,
> + },
> + .num_resources = ARRAY_SIZE(usbf_resources),
> + .resource = usbf_resources,
> +};
> +
> static struct platform_device *sh7720_devices[] __initdata = {
> &rtc_device,
> &sci_device,
> + &usb_ohci_device,
> + &usbf_device,
> };
>
> static int __init sh7720_devices_setup(void)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Kristoffer Ericson <Kristoffer.Ericson@Gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
2008-01-11 1:35 ` Paul Mundt
2008-01-20 0:16 ` Kristoffer Ericson
@ 2008-01-21 7:00 ` Manuel Lauss
2008-01-21 7:05 ` Paul Mundt
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Manuel Lauss @ 2008-01-21 7:00 UTC (permalink / raw)
To: linux-sh
On Sun, Jan 20, 2008 at 01:15:16AM -0800, Kristoffer Ericson wrote:
> Greetings,
>
> Without looking to heavily in the hd64465 datasheet, you think this would work for hd64465+SH7729 platform? It contains an OHCI based usb host.
Not without some additional changes to the OHCI stack.
The HD64465 OHCI (and the SH7760 OHCI too) can only do transfers
from/to its internal SRAM; the Linux OHCI stack simply assumes
that the HC can read all Transfer Descriptors (TD) and data
from main memory.
Also, SRAM is rather small (8kB IIRC) so you can forget about
USB mass storage outright (and bluetooth dongles too), only
keyboards and mice work right.
Finally, the SRAM has different addresses, depending on who's
accessing it (HC or CPU), making it necessary to go over the
TDs and adjust the data pointers to 'HC-view' before transfer
and 'CPU-view' after they're done.
In short: the hardware sucks... ;-)
Manuel Lauss
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
` (2 preceding siblings ...)
2008-01-21 7:00 ` Manuel Lauss
@ 2008-01-21 7:05 ` Paul Mundt
2008-01-21 7:09 ` Manuel Lauss
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Paul Mundt @ 2008-01-21 7:05 UTC (permalink / raw)
To: linux-sh
On Mon, Jan 21, 2008 at 08:00:33AM +0100, Manuel Lauss wrote:
> On Sun, Jan 20, 2008 at 01:15:16AM -0800, Kristoffer Ericson wrote:
> > Greetings,
> >
> > Without looking to heavily in the hd64465 datasheet, you think this
> > would work for hd64465+SH7729 platform? It contains an OHCI based usb
> > host.
>
> Not without some additional changes to the OHCI stack.
> The HD64465 OHCI (and the SH7760 OHCI too) can only do transfers
> from/to its internal SRAM; the Linux OHCI stack simply assumes
> that the HC can read all Transfer Descriptors (TD) and data
> from main memory.
> Also, SRAM is rather small (8kB IIRC) so you can forget about
> USB mass storage outright (and bluetooth dongles too), only
> keyboards and mice work right.
> Finally, the SRAM has different addresses, depending on who's
> accessing it (HC or CPU), making it necessary to go over the
> TDs and adjust the data pointers to 'HC-view' before transfer
> and 'CPU-view' after they're done.
>
> In short: the hardware sucks... ;-)
>
http://marc.info/?l=linux-usb-devel&m\x120027668329758&w=2
http://marc.info/?l=linux-usb-devel&m\x120055283608988&w=2
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
` (3 preceding siblings ...)
2008-01-21 7:05 ` Paul Mundt
@ 2008-01-21 7:09 ` Manuel Lauss
2008-01-21 12:10 ` Yutaro Ebihara
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Manuel Lauss @ 2008-01-21 7:09 UTC (permalink / raw)
To: linux-sh
On Mon, Jan 21, 2008 at 04:05:53PM +0900, Paul Mundt wrote:
> On Mon, Jan 21, 2008 at 08:00:33AM +0100, Manuel Lauss wrote:
> > On Sun, Jan 20, 2008 at 01:15:16AM -0800, Kristoffer Ericson wrote:
> > > Greetings,
> > >
> > > Without looking to heavily in the hd64465 datasheet, you think this
> > > would work for hd64465+SH7729 platform? It contains an OHCI based usb
> > > host.
> >
> > Not without some additional changes to the OHCI stack.
> > The HD64465 OHCI (and the SH7760 OHCI too) can only do transfers
> > from/to its internal SRAM; the Linux OHCI stack simply assumes
> > that the HC can read all Transfer Descriptors (TD) and data
> > from main memory.
> > Also, SRAM is rather small (8kB IIRC) so you can forget about
> > USB mass storage outright (and bluetooth dongles too), only
> > keyboards and mice work right.
> > Finally, the SRAM has different addresses, depending on who's
> > accessing it (HC or CPU), making it necessary to go over the
> > TDs and adjust the data pointers to 'HC-view' before transfer
> > and 'CPU-view' after they're done.
> >
> > In short: the hardware sucks... ;-)
> >
> http://marc.info/?l=linux-usb-devel&m\x120027668329758&w=2
> http://marc.info/?l=linux-usb-devel&m\x120055283608988&w=2
Oooh, interesting, thanks!
--
Manuel Lauss
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
` (4 preceding siblings ...)
2008-01-21 7:09 ` Manuel Lauss
@ 2008-01-21 12:10 ` Yutaro Ebihara
2008-01-21 14:40 ` Kristoffer Ericson
2008-01-22 0:46 ` Paul Mundt
7 siblings, 0 replies; 9+ messages in thread
From: Yutaro Ebihara @ 2008-01-21 12:10 UTC (permalink / raw)
To: linux-sh
hello all.
this is Yutaro from Japan.
>> > In short: the hardware sucks... ;-)
i've written SH7760 sucks on-chip-memory-malloc for 2.6.15.
and it runs well.
today i also try to use SH7760 in 2.6.24.
>> http://marc.info/?l=linux-usb-devel&m\x120027668329758&w=2
>> http://marc.info/?l=linux-usb-devel&m\x120055283608988&w=2
>
>Oooh, interesting, thanks!
this is good news. thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
` (5 preceding siblings ...)
2008-01-21 12:10 ` Yutaro Ebihara
@ 2008-01-21 14:40 ` Kristoffer Ericson
2008-01-22 0:46 ` Paul Mundt
7 siblings, 0 replies; 9+ messages in thread
From: Kristoffer Ericson @ 2008-01-21 14:40 UTC (permalink / raw)
To: linux-sh
Anyone willing to give a quick explanation for usb-newbie :)
On Mon, 21 Jan 2008 16:05:53 +0900
Paul Mundt <lethal@linux-sh.org> wrote:
> On Mon, Jan 21, 2008 at 08:00:33AM +0100, Manuel Lauss wrote:
> > On Sun, Jan 20, 2008 at 01:15:16AM -0800, Kristoffer Ericson wrote:
> > > Greetings,
> > >
> > > Without looking to heavily in the hd64465 datasheet, you think this
> > > would work for hd64465+SH7729 platform? It contains an OHCI based usb
> > > host.
> >
> > Not without some additional changes to the OHCI stack.
> > The HD64465 OHCI (and the SH7760 OHCI too) can only do transfers
> > from/to its internal SRAM; the Linux OHCI stack simply assumes
> > that the HC can read all Transfer Descriptors (TD) and data
> > from main memory.
> > Also, SRAM is rather small (8kB IIRC) so you can forget about
> > USB mass storage outright (and bluetooth dongles too), only
> > keyboards and mice work right.
> > Finally, the SRAM has different addresses, depending on who's
> > accessing it (HC or CPU), making it necessary to go over the
> > TDs and adjust the data pointers to 'HC-view' before transfer
> > and 'CPU-view' after they're done.
> >
> > In short: the hardware sucks... ;-)
> >
> http://marc.info/?l=linux-usb-devel&m\x120027668329758&w=2
> http://marc.info/?l=linux-usb-devel&m\x120055283608988&w=2
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] sh: add resource of USB for SH7720
2008-01-10 12:08 [PATCH] sh: add resource of USB for SH7720 Yoshihiro Shimoda
` (6 preceding siblings ...)
2008-01-21 14:40 ` Kristoffer Ericson
@ 2008-01-22 0:46 ` Paul Mundt
7 siblings, 0 replies; 9+ messages in thread
From: Paul Mundt @ 2008-01-22 0:46 UTC (permalink / raw)
To: linux-sh
On Mon, Jan 21, 2008 at 03:40:10PM +0100, Kristoffer Ericson wrote:
> Anyone willing to give a quick explanation for usb-newbie :)
>
What Manuel said was already pretty self-explanatory, if you don't
understand the problem, you will probably want to wait until SH7760 OHCI
drivers have been written and merged, and then see about writing an
HD64465 driver modelled on top of that.
In summary, patches are in progress that should finally let us handle
SH7760 OHCI (and the other crippled OHCI implementations), SM501 is just
where most of that has been prototyped.
Finally, do not top post, ever.
^ permalink raw reply [flat|nested] 9+ messages in thread