public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ftsmc020: enhance for features and asm support.
@ 2011-03-25  8:33 macpaul at andestech.com
  2011-03-25  9:03 ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: macpaul at andestech.com @ 2011-03-25  8:33 UTC (permalink / raw)
  To: u-boot

Hi Wolfgnag 

> In message 
> <1300965924-20508-1-git-send-email-macpaul@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.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [U-Boot] [PATCH] ftsmc020: enhance for features and asm support.
@ 2011-03-24 11:25 Macpaul Lin
  2011-03-24 13:21 ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Macpaul Lin @ 2011-03-24 11:25 UTC (permalink / raw)
  To: u-boot

1. Enhance ftsmc020 according to datasheets.
2. Add assembly register offsets for support lowlevel_init.S.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
---
Note:
  This patch should be applied after patch
  "[U-Boot,v2,4/4] ftsmc020: move ftsmc020 static mem controller to 
driver/mtd"
  (/patch/87862/) is applied.

 include/faraday/ftsmc020.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/include/faraday/ftsmc020.h b/include/faraday/ftsmc020.h
index 95d9500..a980c1c 100644
--- a/include/faraday/ftsmc020.h
+++ b/include/faraday/ftsmc020.h
@@ -46,6 +46,10 @@ void ftsmc020_init(void);

 #define FTSMC020_BANK_WPROT	(1 << 11)

+#define FTSMC020_BANK_TYPE1	(1 << 10)
+#define FTSMC020_BANK_TYPE2	(1 << 9)
+#define FTSMC020_BANK_TYPE3	(1 << 8)
+
 #define FTSMC020_BANK_SIZE_32K	(0xb << 4)
 #define FTSMC020_BANK_SIZE_64K	(0xc << 4)
 #define FTSMC020_BANK_SIZE_128K	(0xd << 4)
@@ -57,6 +61,7 @@ void ftsmc020_init(void);
 #define FTSMC020_BANK_SIZE_8M	(0x3 << 4)
 #define FTSMC020_BANK_SIZE_16M	(0x4 << 4)
 #define FTSMC020_BANK_SIZE_32M	(0x5 << 4)
+#define FTSMC020_BANK_SIZE_64M	(0x6 << 4)

 #define FTSMC020_BANK_MBW_8	(0x0 << 0)
 #define FTSMC020_BANK_MBW_16	(0x1 << 0)
@@ -76,4 +81,27 @@ void ftsmc020_init(void);
 #define FTSMC020_TPR_AHT(x)	(((x) & 0x3) << 4)
 #define FTSMC020_TPR_TRNA(x)	(((x) & 0xf) << 0)

+/*
+ * CONFIG and TIME Registers Offsets in ASSEMBLY
+ */
+#ifdef __ASSEMBLY__
+#define FTSMC020_CONFIG0		0x00
+#define FTSMC020_TIME0			0x04
+#define FTSMC020_CONFIG1		0x08
+#define FTSMC020_TIME1			0x0C
+#define FTSMC020_CONFIG2		0x10
+#define FTSMC020_TIME2			0x14
+#define FTSMC020_CONFIG3		0x18
+#define FTSMC020_TIME3			0x1C
+#define FTSMC020_CONFIG4		0x20
+#define FTSMC020_TIME4			0x24
+#define FTSMC020_CONFIG5		0x28
+#define FTSMC020_TIME5			0x2C
+#define FTSMC020_CONFIG6		0x30
+#define FTSMC020_TIME6			0x34
+#define FTSMC020_CONFIG7		0x38
+#define FTSMC020_TIME7			0x3C
+#define FTSMC020_SHADOW			0x40
+#endif /* __ASSEMBLY__ */
+
 #endif	/* __FTSMC020_H */
-- 
1.7.3.5



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.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-04-01  7:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25  8:33 [U-Boot] [PATCH] ftsmc020: enhance for features and asm support macpaul at andestech.com
2011-03-25  9:03 ` Wolfgang Denk
2011-03-31  2:38   ` Macpaul Lin
2011-03-31  6:48     ` Wolfgang Denk
2011-03-31  8:12       ` Macpaul Lin
2011-03-31  8:24         ` Wolfgang Denk
     [not found]           ` <AANLkTinYJhoGrA7ZAVUQxwByrkWNqomCBFWiJG_+3+0e@mail.gmail.com>
2011-03-31  9:02             ` Wolfgang Denk
2011-04-01  7:58               ` Macpaul Lin
  -- strict thread matches above, loose matches on Subject: below --
2011-03-24 11:25 Macpaul Lin
2011-03-24 13:21 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox