Re: Choosing a MACH_TYPE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dave Strauss wrote:
> My questions have to do with how many MACH_TYPEs we need.
... SNIP ...
> Looking at the current list of mach_types it's not at all clear
> to me what logic, if any, is behind the selection.  In some cases
> the MACH_TYPE appears to be specific to a board; in other cases it
> appears to be specific to a processor (family?).  Is there
> a preferred way to do this?
>   
The ARM kernel layout has evolved a lot since I've been looking at it 
(about 4 years), so that's why it might not make much sense. It also 
depends on the whims of each manufacturer.

You need to create a new machine type if you need:

(a) a new /arch/arm/mach-xxx/board-xxxx.c file,

The board file is responsible for setting up the built-in devices on a 
particular PCB build and is useful for setting up all the devices that 
are standard to a particular CPU. e.g i2c, SPI, ethernet, etc).  
Although, I think this could be done in an external module?


(b) to dynamically distinguish between machines in a device driver.
e.g.
if (machine_is_blah123() )
    do_stuff()
else if ( machine_is_frob42() )
    do_things()
else
    do_nothing()


I don't know about your products, but if you copy'n'paste the same basic 
digital block in to a new PCB but you don't change the physical 
interface, then you can usually use the same machine type. From the 
kernel's point of view, the API to the outside world hasn't changed, so 
there's no need for a new machine type.
 
Aras 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter