[U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board
Wolfgang Denk
wd at denx.de
Wed Jun 3 12:05:34 CEST 2009
Dear "kevin.morfitt at fearnside-systems.co.uk",
In message <4A263923.2030703 at fearnside-systems.co.uk> you wrote:
>
> >> +#define BWSCON 0x48000000
> >> +
> >> +#define DW8 (0x0)
> >> +#define DW16 (0x1)
> >> +#define DW32 (0x2)
> >> +#define WAIT (0x1 << 2)
> >> +#define UBLB (0x1 << 3)
> >>
> > what is all theses macro? for what use?
> >
> They make setting the fields of the memory controller registers more
> readable. For example BSWCON is
> the Bus Width and Wait Control Register, DW32 sets a Data Width value
> bit-field in BWSCON to 8-bit
> etc. They're used later in the patch to configure the memory controller
> registers. The names are the same
> as those used in the S3C2440 data sheet.
Please make sure to use C structs to descrive device register layout,
and use proper I/O accessor functions for the actual access.
> >> + gpio->GPBCON = 0x00055555;
> >> + gpio->GPBUP = 0x000007FF;
> >> + gpio->GPBDAT = 0x000001C0; /* Switch on LED1. */
> >> + gpio->GPCCON = 0xAAAAAAAA;
> >> + gpio->GPCUP = 0x0000FFFF;
> >> + gpio->GPDCON = 0xAAAAAAAA;
Such code will not be accepted. Please use C structs and I/O accessor
functions.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Consistency requires you to be as ignorant today as you were a year
ago." - Bernard Berenson
More information about the U-Boot
mailing list