From: Wolfgang Denk Date: Wed, 03 Jun 2009 12:05:34 +0200 Subject: [U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board In-Reply-To: <4A263923.2030703@fearnside-systems.co.uk> References: <4A175E6A.50805@fearnside-systems.co.uk> <20090602233529.GA15056@game.jcrosoft.org> <4A263923.2030703@fearnside-systems.co.uk> Message-ID: <20090603100534.A5BBC832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "kevin.morfitt at fearnside-systems.co.uk", In message <4A263923.2030703@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