[U-Boot] at91: fix a USB problem for AT91SAM9261

This patch corrects the missing PLLB initialization in usb_cpu_init() for AT91SAM9261. Because of the missing PLLB initialization, the USB support for all AT91SAM9261 based boards doesn't work.
Signed-off-by: Ilko Iliev iliev@ronetix.at
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index c35319c..4066820 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -34,7 +34,8 @@ int usb_cpu_init(void) {
#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ - defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) + defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \ + defined(CONFIG_AT91SAM9261) /* Enable PLLB */ at91_sys_write(AT91_CKGR_PLLBR, get_pllb_init()); while ((at91_sys_read(AT91_PMC_SR) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB)

Hello,
2009/5/2 RONETIX - Ilko Iliev iliev@ronetix.at:
This patch corrects the missing PLLB initialization in usb_cpu_init() for AT91SAM9261. Because of the missing PLLB initialization, the USB support for all AT91SAM9261 based boards doesn't work.
Well, the PLLB should be configured correctly by the AT91-bootstrap code (from Atmel). The initialisation of pllb for at91sam9263 was added only because there was a bug in the Atmel bootstrap code that configured it wrong for sam9263 only... The last time I checked it still worked on at91sam9261ek, so what problems do you see?
Kind Regards,
Remy

On 21:27 Sat 02 May , Remy Bohmer wrote:
Hello,
2009/5/2 RONETIX - Ilko Iliev iliev@ronetix.at:
This patch corrects the missing PLLB initialization in usb_cpu_init() for AT91SAM9261. Because of the missing PLLB initialization, the USB support for all AT91SAM9261 based boards doesn't work.
Well, the PLLB should be configured correctly by the AT91-bootstrap code (from Atmel).
no this is the case only if you supposed that you use U-Boot as second stage bootloader which is not the case for the PM9263, PM9261 and other boards (9263ek too for norflash boot as example)
As already agree with Atmel dev, the bootstrap will have to init only what it need to use which is not the case of the USB Host. U-Boot and other binary will have to take care of it's own init.
Best Regards, J.

Hello,
Well, the PLLB should be configured correctly by the AT91-bootstrap code (from Atmel).
no this is the case only if you supposed that you use U-Boot as second stage bootloader which is not the case for the PM9263, PM9261 and other boards (9263ek too for norflash boot as example)
In that case the description is wrong. It states:
the USB support for all AT91SAM9261 based boards doesn't work.
Look at the word 'ALL', that mislead me here...
As already agree with Atmel dev, the bootstrap will have to init only what it need to use which is not the case of the USB Host. U-Boot and other binary will have to take care of it's own init.
I can agree with that.
Kind regards,
Remy

On 22:20 Sat 02 May , Remy Bohmer wrote:
Hello,
Well, the PLLB should be configured correctly by the AT91-bootstrap code (from Atmel).
no this is the case only if you supposed that you use U-Boot as second stage bootloader which is not the case for the PM9263, PM9261 and other boards (9263ek too for norflash boot as example)
In that case the description is wrong. It states:
the USB support for all AT91SAM9261 based boards doesn't work.
Look at the word 'ALL', that mislead me here...
ok I've not tick on the all
why not replace with
the USB support for all AT91SAM9261 based boards will only work if the PLLB will be configured by a precedent bootloader.
Best Regards, J.

Hi,
In that case the description is wrong. It states:
the USB support for all AT91SAM9261 based boards doesn't work.
Look at the word 'ALL', that mislead me here...
ok I've not tick on the all
why not replace with the USB support for all AT91SAM9261 based boards will only work if the PLLB will be configured by a precedent bootloader.
OK
Remy
participants (3)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Remy Bohmer
-
RONETIX - Ilko Iliev