[U-Boot] [PATCH] ftsmc020: enhance for features and asm support.

macpaul at andestech.com macpaul at andestech.com
Fri Mar 25 09:33:19 CET 2011


Hi Wolfgnag 

> In message 
> <1300965924-20508-1-git-send-email-macpaul at andestech.com> you wrote:
> > 1. Enhance ftsmc020 according to datasheets.
> > 2. Add assembly register offsets for support lowlevel_init.S.
> 
> NAK. Such register offsets should be automatically generated from the
> respective C structs using make-asm-offsets; see the
> generic-asm-offsets.h / asm-offsets.s build rules in the top level
> Makefile.
> 

Neither I ran the command

"tools/scripts/make-asm-offsets include/faraday/ftsmc020.h include/faraday/ftsmc020-genasm.h"
nor I ran
sed -ne "/^->/{s:->#\(.*\):/* \1 */:; \
s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define \1 (\2) /* \3 */:; \
s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
s:->::; p;}" include/faraday/ftsmc020-genasm.h could be work.

I also tested file faraday/ftpmu010.h.
It get the same output with output 'sed: -e expression #1, char 47: unknown command: `['.'
Did I execute the script in wrong method? Is there a problem about this script?

Moreover, the structure of ftsmc020 was nested like
struct ftsmc020 {
        struct {
                unsigned int    cr;     /* 0x00, 0x08, 0x10, 0x18 */
                unsigned int    tpr;    /* 0x04, 0x0c, 0x14, 0x1c */
        } bank[4];
        unsigned int    pad[8]; /* 0x20 - 0x3c */
        unsigned int    ssr;    /* 0x40 */
};

I didn't see the sed script could support this kind of nested structure declaration.
I guess the sed script could be applied to plain structure declareation.
Maybe I have a diffcult here.
If the script is needed to be rewrote to adapt nested declaration,
It might need have some complicaticity about parse difference kind of nested structure and array.

It seems I need to rewrite the structure to be adaptable to the sed script.

Any suggestion?

Best regards,
Macpaul Lin


CONFIDENTIALITY NOTICE:

This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation.

Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved.


More information about the U-Boot mailing list