public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Josh Wu <josh.wu@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: atmel: switch to usb ehci for sama5d3 boards
Date: Tue, 19 May 2015 19:08:54 +0800	[thread overview]
Message-ID: <555B19C6.20908@atmel.com> (raw)
In-Reply-To: <555B1734.5080300@redhat.com>

Hi, Hans

On 5/19/2015 6:57 PM, Hans de Goede wrote:
> Hi,
>
> On 19-05-15 12:54, Josh Wu wrote:
>> From: Bo Shen <voice.shen@atmel.com>
>>
>> As the cache coherence issue in OHCI HCD, when enable I/D cache
>> for sama5d3 SoC, the OHCI can not work properly. So, switch to
>> EHCI, then the USB can work well.
>>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> [rebase to mainline]
>> Signed-off-by: Josh Wu <josh.wu@atmel.com>
>
> I'm confused now, with the patch you just send the ohci code should
> work, right? 
Right. I forget to amend the commit message. Sorry.

> And this way usb-1 devices like keyboards will not
> work, otoh you will get faster usb storage support.
I didn't test the keyboard yet. Good to know this. thanks.

>
> What you should really do is convert the atmel usb glue to support
> the u-boot driver model and move to that, then you can build in
> both the ohci and ehci drivers and get the best of both worlds.
Ok, that sounds nice.

>
> I've already done so for sunxi, ironing out all the handover
> bugs in the usb core and ehci code, paving the way for you :)

Indeed, it seems convert to DM is the right way.
Ok, I will do it. Thanks again.

Best Regards,
Josh Wu

>
> Regards,
>
> Hans
>
>
>
>> ---
>>
>>   include/configs/sama5d3_xplained.h | 21 +++------------------
>>   include/configs/sama5d3xek.h       | 21 +++------------------
>>   2 files changed, 6 insertions(+), 36 deletions(-)
>>
>> diff --git a/include/configs/sama5d3_xplained.h 
>> b/include/configs/sama5d3_xplained.h
>> index bfd8aa7..0dab15d 100644
>> --- a/include/configs/sama5d3_xplained.h
>> +++ b/include/configs/sama5d3_xplained.h
>> @@ -20,17 +20,6 @@
>>   #define CONFIG_USART_BASE        ATMEL_BASE_DBGU
>>   #define CONFIG_USART_ID            ATMEL_ID_DBGU
>>
>> -/*
>> - * This needs to be defined for the OHCI code to work but it is 
>> defined as
>> - * ATMEL_ID_UHPHS in the CPU specific header files.
>> - */
>> -#define ATMEL_ID_UHP            ATMEL_ID_UHPHS
>> -
>> -/*
>> - * Specify the clock enable bit in the PMC_SCER register.
>> - */
>> -#define ATMEL_PMC_UHP            AT91SAM926x_PMC_UHP
>> -
>>   /* SDRAM */
>>   #define CONFIG_NR_DRAM_BANKS        1
>>   #define CONFIG_SYS_SDRAM_BASE           ATMEL_BASE_DDRCS
>> @@ -95,13 +84,9 @@
>>   #define CONFIG_CMD_USB
>>
>>   #ifdef CONFIG_CMD_USB
>> -#define CONFIG_USB_ATMEL
>> -#define CONFIG_USB_ATMEL_CLK_SEL_UPLL
>> -#define CONFIG_USB_OHCI_NEW
>> -#define CONFIG_SYS_USB_OHCI_CPU_INIT
>> -#define CONFIG_SYS_USB_OHCI_REGS_BASE        ATMEL_BASE_OHCI
>> -#define CONFIG_SYS_USB_OHCI_SLOT_NAME        "SAMA5D3 Xplained"
>> -#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS    2
>> +#define CONFIG_USB_EHCI
>> +#define CONFIG_USB_EHCI_ATMEL
>> +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS    3
>>   #define CONFIG_DOS_PARTITION
>>   #define CONFIG_USB_STORAGE
>>   #endif
>> diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
>> index d933a9e..d3ab6e4 100644
>> --- a/include/configs/sama5d3xek.h
>> +++ b/include/configs/sama5d3xek.h
>> @@ -24,17 +24,6 @@
>>   #define CONFIG_USART_BASE        ATMEL_BASE_DBGU
>>   #define    CONFIG_USART_ID            ATMEL_ID_DBGU
>>
>> -/*
>> - * This needs to be defined for the OHCI code to work but it is 
>> defined as
>> - * ATMEL_ID_UHPHS in the CPU specific header files.
>> - */
>> -#define ATMEL_ID_UHP            ATMEL_ID_UHPHS
>> -
>> -/*
>> - * Specify the clock enable bit in the PMC_SCER register.
>> - */
>> -#define ATMEL_PMC_UHP            AT91SAM926x_PMC_UHP
>> -
>>   /* LCD */
>>   #define CONFIG_LCD
>>   #define LCD_BPP                LCD_COLOR16
>> @@ -128,13 +117,9 @@
>>   #define CONFIG_CMD_USB
>>
>>   #ifdef CONFIG_CMD_USB
>> -#define CONFIG_USB_ATMEL
>> -#define CONFIG_USB_ATMEL_CLK_SEL_UPLL
>> -#define CONFIG_USB_OHCI_NEW
>> -#define CONFIG_SYS_USB_OHCI_CPU_INIT
>> -#define CONFIG_SYS_USB_OHCI_REGS_BASE        ATMEL_BASE_OHCI
>> -#define CONFIG_SYS_USB_OHCI_SLOT_NAME        "sama5d3"
>> -#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS    3
>> +#define CONFIG_USB_EHCI
>> +#define CONFIG_USB_EHCI_ATMEL
>> +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS    3
>>   #define CONFIG_DOS_PARTITION
>>   #define CONFIG_USB_STORAGE
>>   #endif
>>

  reply	other threads:[~2015-05-19 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 10:54 [U-Boot] [PATCH] ARM: atmel: switch to usb ehci for sama5d3 boards Josh Wu
2015-05-19 10:57 ` Hans de Goede
2015-05-19 11:08   ` Josh Wu [this message]
2015-08-18 11:46 ` [U-Boot] " Andreas Bießmann
2015-08-18 13:04   ` Andreas Bießmann
2015-08-19  2:10     ` Josh Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555B19C6.20908@atmel.com \
    --to=josh.wu@atmel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox