From: Wolfgang Denk Date: Mon, 15 Mar 2004 11:07:15 +0100 Subject: [U-Boot-Users] Re: Patch: Support for PQ27e (8247/48/71/72) chips and MPC8272ADS board In-Reply-To: Your message of "Mon, 15 Mar 2004 11:45:53 +0200." <16469.31569.535909.246506@gargle.gargle.HOWL> Message-ID: <20040315100720.58A9DC0655@atlas.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 In message <16469.31569.535909.246506@gargle.gargle.HOWL> you wrote: > > Wolfgang> -#undef CPM_DATAONLY_SIZE > Wolfgang> -#define CPM_DATAONLY_SIZE ((uint)(8 * 1024) - CPM_DATAONLY_BASE) > > Wolfgang> Are you 100% sure this does not break any existing boards? > > I checked it on four different boards with different PQ2 chips. In fact, > for older (pre-PQ27e) chips this patch does not change memory map so > they aren't affected in any way. Am I missing anything? I don't know. I just want to understand the consequences. > Wolfgang> + gd->CPM_DATAONLY_SIZE; > Wolfgang> + if (is_pq27e()) > Wolfgang> + gd->dp_alloc_top = gd->dp_alloc_base > Wolfgang> + gd->PQ27E_DATAONLY_SIZE; > Wolfgang> + else > Wolfgang> + gd->dp_alloc_top = gd->dp_alloc_base > Wolfgang> + gd->CPM_DATAONLY_SIZE; First, ther is at least one redundand "gd->CPM_DATAONLY_SIZE;" here. > Wolfgang> Please do not add a board-specific #define > Wolfgang> PQ27E_DATAONLY_SIZE when we already have a > Wolfgang> CPM_DATAONLY_SIZE which could be used. > > There should be some misunderstanding here. PQ27E_DATAONLY_SIZE is NOT > board-specific (I won't add board-specific things into common > files). PQ27e is the common name for the 8247/8248/8271/8272 (the `e' Sorry for chosing a poor description. > stands for `encryption'). These chips have got much less internal memory > (DPRAM) and at different addresses so they must have separate > #defines. CPM_DATAONLY_SIZE is just incorrect for PQ27e. PQ27e have got > only 4K of "data only" RAM and not 8K (and at different base, BTW). Why do you need a separate #define then? Isn't it sufficient to #define a correct value for CPM_DATAONLY_SIZE then? > Wolfgang> PQ27E_FCC_SPECIAL_BASE vs. CPM_FCC_SPECIAL_BASE > > It's for the same reason. PQ27e have not got RAM at 0xB000, other PQ2s So why not just #define a correct value? > After the explanations, what changes would you suggest? Use the existing variables and just assign correct values? Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de When the bosses talk about improving productivity, they are never talking about themselves.