From: "Matthias Weißer" <weisserm@arcor.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] arm: Add support for MB86R0x SoCs
Date: Mon, 26 Apr 2010 08:55:20 +0200 [thread overview]
Message-ID: <4BD538D8.2040007@arcor.de> (raw)
In-Reply-To: <20100422123412.23511C36DD0@gemini.denx.de>
Am 22.04.2010 14:34, schrieb Wolfgang Denk:
> Dear Matthias Weisser,
>
> In message<1271932257-14618-2-git-send-email-weisserm@arcor.de> you
wrote:
>> This patch adds support for MB86R0x SoCs from Fujitsu
>>
>> Signed-off-by: Matthias Weisser<weisserm@arcor.de>
> ...
>> --- /dev/null
>> +++ b/arch/arm/cpu/arm926ejs/mb86r0x/reset.c
> ...
>> +void reset_cpu(ulong ignored)
>> +{
>> + writel(0x00000002, MB86R0x_CRG_PHYS_BASE + CRG_CRSR);
>
> Please define some symbolic name for the magic constant 0x00000002
>
> Also, we do not accept code based on a "base + offset" notation.
> Please use C structures instead. [Please fix globally.]
I will fix this
>> +#define TIMER_LOAD_VAL 0xffffffff
>> +#define TIMER_BASE MB86R0x_TIMER_PHYS_BASE
>> +
>> +#define TIMER_REG_LOAD (TIMER_BASE + 0)
>> +#define TIMER_REG_VALUE (TIMER_BASE + 4)
>> +#define TIMER_REG_CONTROL (TIMER_BASE + 8)
>
> Create a proper C struct, please!
and this
>> +/*
>> + * Offset definitions for DRAM controller
>> + */
>> +#define DDR2C_DRIC 0x00
>> +#define DDR2C_DRIC1 0x02
>> +#define DDR2C_DRIC2 0x04
>> +#define DDR2C_DRCA 0x06
>> +#define DDR2C_DRCM 0x08
>> +#define DDR2C_DRCST1 0x0a
>> +#define DDR2C_DRCST2 0x0c
>> +#define DDR2C_DRCR 0x0e
>> +#define DDR2C_DRCF 0x20
>> +#define DDR2C_DRASR 0x30
>> +#define DDR2C_DRIMS 0x50
>> +#define DDR2C_DROS 0x60
>> +#define DDR2C_DRIBSLI 0x62
>> +#define DDR2C_DRIBSODT1 0x64
>> +#define DDR2C_DRIBSOCD 0x66
>> +#define DDR2C_DRIBSOCD2 0x68
>> +#define DDR2C_DROABA 0x70
>> +#define DDR2C_DROBV 0x80
>> +#define DDR2C_DROBS 0x84
>> +#define DDR2C_DROBSR1 0x86
>> +#define DDR2C_DROBSR2 0x88
>> +#define DDR2C_DROBSR3 0x8a
>> +#define DDR2C_DROBSR4 0x8c
>> +#define DDR2C_DRIMR1 0x90
>> +#define DDR2C_DRIMR2 0x92
>> +#define DDR2C_DRIMR3 0x94
>> +#define DDR2C_DRIMR4 0x96
>> +#define DDR2C_DROISR1 0x98
>> +#define DDR2C_DROISR2 0x9a
>
> C struct, please.
>
>> +/*
>> + * Offset definitions Chip Control Module
>> + */
>> +#define CCNT_CCID 0x00
>> +#define CCNT_CSRST 0x1c
>> +#define CCNT_CIST 0x20
>> +#define CCNT_CISTM 0x24
>> +#define CCNT_CMUX_MD 0x30
>> +#define CCNT_CDCRC 0xec
>
> Ditto.
>
>> +/*
>> + * Offset definitions clock reset generator
>> + */
>> +#define CRG_CRPR 0x00
>> +#define CRG_CRWR 0x08
>> +#define CRG_CRSR 0x0c
>> +#define CRG_CRDA 0x10
>> +#define CRG_CRDB 0x14
>> +#define CRG_CRHA 0x18
>> +#define CRG_CRPA 0x1c
>> +#define CRG_CRPB 0x20
>> +#define CRG_CRHB 0x24
>> +#define CRG_CRAM 0x28
>
> Ditto.
Well, the above three modules are used in assembler code only
(lowlevel_init.S) and I didn't found a way to use C structs here. What
would be the right approach in this case? Defining all these registers
as absolute addresses?
I have a also a couple of magic values in the mentioned .S file. Do I
have to move them also to some symbolic constants?
Thanks for the quick review.
Regards,
Matthias
next prev parent reply other threads:[~2010-04-26 6:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 10:30 [U-Boot] [PATCH 0/3] Add support for MB86R0x SoCs Matthias Weisser
2010-04-22 10:30 ` [U-Boot] [PATCH 1/3] arm: " Matthias Weisser
2010-04-22 10:30 ` [U-Boot] [PATCH 2/3] video: add support for display controller in " Matthias Weisser
2010-04-22 10:30 ` [U-Boot] [PATCH 3/3] arm: Add support for jadecpu board based on MB86R01 SoC Matthias Weisser
2010-04-22 12:51 ` Wolfgang Denk
2010-04-22 13:17 ` Matthias Weißer
2010-04-22 14:13 ` Wolfgang Denk
2010-05-03 11:38 ` Matthias Weißer
2010-05-03 12:28 ` Wolfgang Denk
2010-04-22 12:41 ` [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs Wolfgang Denk
2010-04-22 13:03 ` Matthias Weißer
2010-05-01 18:51 ` Anatolij Gustschin
2010-05-01 19:05 ` [U-Boot] [PATCH] video: cfb_console: add weak default video_set_lut() Anatolij Gustschin
2010-06-12 8:20 ` [U-Boot] [PATCH v2] " Anatolij Gustschin
2010-06-12 8:35 ` Anatolij Gustschin
2010-04-28 6:29 ` [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs Matthias Weißer
2010-04-28 6:44 ` Wolfgang Denk
2010-04-28 8:08 ` Matthias Weißer
2010-05-01 18:46 ` Anatolij Gustschin
2010-04-22 12:34 ` [U-Boot] [PATCH 1/3] arm: Add support for " Wolfgang Denk
2010-04-26 6:55 ` Matthias Weißer [this message]
2010-05-04 22:18 ` Wolfgang Denk
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=4BD538D8.2040007@arcor.de \
--to=weisserm@arcor.de \
--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