From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28448 invoked by alias); 28 Oct 2003 15:08:04 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 28440 invoked from network); 28 Oct 2003 15:08:03 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sources.redhat.com with SMTP; 28 Oct 2003 15:08:03 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 48) id 127D350D8C7; Tue, 28 Oct 2003 08:08:03 -0700 (MST) Received: from 62.166.230.82 (SquirrelMail authenticated user gdt) by www.chez-thomas.org with HTTP; Tue, 28 Oct 2003 08:08:03 -0700 (MST) Message-ID: <3148.62.166.230.82.1067353683.squirrel@www.chez-thomas.org> In-Reply-To: <200310281454.GAA00597@friend.incoop.net> References: <200310281454.GAA00597@friend.incoop.net> Date: Tue, 28 Oct 2003 15:08:00 -0000 From: "Gary Thomas" To: "Radu Cernea" Cc: ecos-discuss@sources.redhat.com User-Agent: SquirrelMail/1.4.2-1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Subject: [ECOS] Re: X-SW-Source: 2003-10/txt/msg00477.txt.bz2 Radu Cernea said: >>> The difference is in the pin allocation for SMC2: >>> >>> - Port B21 & B20 for MPC860 >>> - Port A9 & A8 for MPC850 >>> >>> The current version of quicc_smc1.c initialize the port pins MPC850-like >>> (function cyg_hal_smcx_init_channel). >>> >>> My question is: >>> How is it better to add the MPC860 initialization version to the eCos sources? >>> Should I create a new file, use a conditional pre-compilation flag, or…? >> >> What version of quicc_smc1.c are you looking at? There is supposed to be > complete >> support already in place for SMC1/SMC2 and SCC1/SCC2/SCC4. If this is not the >> case, we need to fix it *there*, not add new code somewhere else. > Unfortunately I do not have CVS access (the IT department rules…), so I > download snapshots from ecoscentric. In the last one (031026), I’m looking at > the file: > /ecos/packages/hal/powerpc/quicc/current/src/quicc_smc1.c > > There is support for SMC2, but the initialization is not the proper one for > MPC860. Instead of: > 168: eppc->pio_papar |= 0xc0; > 169: eppc->pio_padir &= ~0xc0; > 170: eppc->pio_paodr &= ~0xc0; > > It should be something like: > eppc->pip_pbpar |= 0x00000C00; > eppc->pip_pbdir &= ~0x00000C00; > eppc->pip_pbodr &= ~0x00000C00; > > See, for the reference, the table 34-6 in MPC860UM.pdf Fair enough - please send a proper patch for this, along with the ChangeLog entry. It would also be nice to see the corresponding patch for the interrupt driven serial driber. Note: use something like this: #if defined(CYGHWR_HAL_POWERPC_860) || defined(CYGHWR_HAL_POWERPC_860T) ... your proposed setup #else .. current setup #endif -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss