From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: Rafael Rodríguez Velilla Cc: ecos Subject: Re: [ECOS] Drivers and related... Date: Thu, 01 Feb 2001 11:22:00 -0000 Message-id: <3A79B787.E6B8C93@redhat.com> References: <3A79AE27.B1F8F45A@tid.es> X-SW-Source: 2001-02/msg00008.html Rafael Rodríguez Velilla wrote: > > I'm porting eCos for a SOC with an embedded ARM. Everything is going > quite right but now I find the following problem with eCos philosophy. > My problem is quite simple: > 1 My SOC has a lot of devices embedded (such as UARTS, display > controller, keyboard controller, interrupts controller, and so on) > 2 My SOC is in a platform with some peripherals such as the display > itself, the 3volt to 5 volt converter and so on. > > I want to integrate the drivers in eCos so that the user can configure > the platform in the same way as in the rest of the operating system, > that is, with cdl. > > Where should I put all these drivers? under hal/MICROPP/arch o under > hal/MICROPP/tema, a mix of both or even as an independent package ? > (tema is the name of the platform and MICROPP the name of the SOC) It depends on the driver. Things like interrupt controllers need to be dealt with in the HAL; things like serial drivers should be under devs/serial at the top level. Given there is no formal infrastructure for the other devices (keyboard, display) you say about, integrating them into the platform HAL (i.e. tema) may be sufficient. > I have created a new architecture, it has an embedded ARM but I > considered that it can be considered a new architecture because of all > the extra components that are indefectibly together. Do you consider > this a correct assumption? Whether a CPU has peripherals on-chip or off-chip makes little difference on the operating system level. So treating it as a platform, not an architecture, would be better. Generally peripherals are macrocells, so you could easily find them again on a different CPU, so in this case putting the drivers into separate packages would ease code reuse if code reuse is likely. Jifl -- Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062 Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine