Skip to contentSkip to conversation

at91: fix a USB problem for AT91SAM9261

U-Boot RONETIX - Ilko Iliev 3 participants 6 messages May 2, 2009 – May 3, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

drivers/usb/host/ohci-at91.c +2 -1
index c35319c..4066820 100644
@@ -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)

#1 lore raw

Hello,

2009/5/2 RONETIX - Ilko Iliev <[email protected]>:

Quoted 4 lines

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

#2 lore raw
Quoted 10 lines · Remy Bohmer

Hello,

2009/5/2 RONETIX - Ilko Iliev <[email protected]>:

Quoted 4 lines

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.

#3 lore raw

Hello,

Quoted 5 lines
Quoted 2 lines

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:

Quoted 1 line

the USB support for all AT91SAM9261 based boards doesn't work.

Look at the word 'ALL', that mislead me here...

Quoted 3 lines

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

#4 lore raw
Quoted 4 lines · Remy Bohmer

Hello,

Quoted 2 lines
Quoted 2 lines

Well, the PLLB should be configured correctly by the AT91-bootstrap code (from Atmel).

Quoted 8 lines
Quoted 3 lines

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:

Quoted 1 line

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.

#5 lore raw

Hi,

Quoted 8 lines
Quoted 3 lines

In that case the description is wrong. It states:

Quoted 1 line

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