[U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board 1/7

Remy Bohmer linux at bohmer.net
Sat Jul 11 12:00:30 CEST 2009


Hi Kevin,

2009/7/9 kevin.morfitt at fearnside-systems.co.uk
<kevin.morfitt at fearnside-systems.co.uk>:
> Hi Remy
>
>>> This patch re-formats the code in cpu/arm920t and cpu/arm920t/23c24x0 in
>>> preparation for changes to add support for the Embest SBC2440-II Board.
>>>
>>> The changes are as follows:
>>>
>>> - re-indent the code using Lindent
>>> - make sure register layouts are defined using a C struct, from a
>>>  comment by Wolfgang on 03/06/2009
>>> - replace the upper-case typedef'ed C struct names with lower case
>>>  non-typedef'ed ones, from a comment by Scott on 22/06/2009
>>> - make sure registers are accessed using the proper accessor
>>>  functions, from a comment by Wolfgang on 03/06/2009
>>> - run checkpatch.pl and fix any error reports
>>>
>>> Note that usb_ohci.c still has two lines that exceed 80 characters.
>>> This is because the statements on those lines lose readability when
>>> wrapped - the Linux coding style guidleines allows for this.
>>>
>>> This complete series of patches assumes the following patches have
>>> already been applied:
>>>
>>> - [PATCH-ARM] Bug-fix in drivers mtd nand Makefile, sent 18/06/2009
>>> - [PATCH-ARM] CONFIG_SYS_HZ fix for ARM920T S3C24X0 Boards, sent
>>>  21/06/2009
>>>
>>> Signed-off-by: Kevin Morfitt <kevin.morfitt at fearnside-systems.co.uk>
>>> ---
>>>  cpu/arm920t/s3c24x0/usb_ohci.c | 1268 +++++++++++++++++++++-------------------
>>
>> Why are these files put in the cpu section, and not in the drivers/usb
>> section where it belongs.
>
> This code has always been in the cpu section - this used to contain all

That is no excuse for keeping on doing the bad thing ;-)

> s3c24x0 drivers but all except the usb driver were moved to the drivers
> directories in the last release. I'm not sure why the usb driver wasn't
> moved at the same time though. It could be moved to the drivers directory
> though it would need renaming to make it clear it specific to the s3c24x0
> processors.

Moving it to the drivers section is step 1.
Merging it back to the original ohci code (where it was copied from)
would be step 2.
It is clearly copied code from the code in the drivers section and I
believe it could be merged pretty easy.

> The changes in this patch are only to make the code style meet the u-boot
> format more closely - they don't implement any changes in functionality,
> and the code is also specific to the s3c24x0 processors. The code does

Well, It might contain s3c24x0 specific code, but that does not make
the whole file s3c24x0 specific.

> control a standard OHCI host controller though so it might be possible to
> develop a more generic version that could be used to support other
> processors but I guess we'd need to look at how the USB host drivers of
> other processors work before we could decide if it's feasible. At the
> moment, I just want to make the minimum changes necessary to be able to
> add support for the Embest SBC2440-II Board.

Minimal changes are okay, but I still would really like to see this
file to be moved to the drivers section as well. (it does not have to
be merged though, that can be done later.)

Kind Regards,

Remy


More information about the U-Boot mailing list