Re: [PATCH 02/05] ARM: OMAP3: Add minimal Beagle board support

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

 



On Fri, Oct 03, 2008 at 03:09:36PM +0300, Tony Lindgren wrote:
> diff --git a/arch/arm/plat-omap/include/mach/board-omap3beagle.h b/arch/arm/plat-omap/include/mach/board-omap3beagle.h
> new file mode 100644
> index 0000000..3080d52
> --- /dev/null
> +++ b/arch/arm/plat-omap/include/mach/board-omap3beagle.h
> @@ -0,0 +1,33 @@
> +/*
> + * arch/arm/plat-omap/include/mach/board-omap3beagle.h
> + *
> + * Hardware definitions for TI OMAP3 BEAGLE.
> + *
> + * Initial creation by Syed Mohammed Khasim <khasim@xxxxxx>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + *
> + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
> + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
> + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
> + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
> + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
> + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
> + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with this program; if not, write to the Free Software Foundation, Inc.,
> + * 675 Mass Ave, Cambridge, MA 02139, USA.
> + */
> +
> +#ifndef __ASM_ARCH_OMAP3_BEAGLE_H
> +#define __ASM_ARCH_OMAP3_BEAGLE_H
> +
> +#endif /* __ASM_ARCH_OMAP3_BEAGLE_H */
> +
> diff --git a/arch/arm/plat-omap/include/mach/hardware.h b/arch/arm/plat-omap/include/mach/hardware.h
> index 29c849f..80f6d7e 100644
> --- a/arch/arm/plat-omap/include/mach/hardware.h
> +++ b/arch/arm/plat-omap/include/mach/hardware.h
> @@ -322,6 +322,10 @@
>  #include "board-2430sdp.h"
>  #endif
>  
> +#ifdef CONFIG_MACH_OMAP3_BEAGLE
> +#include "board-omap3beagle.h"
> +#endif
> +
>  #ifdef CONFIG_MACH_OMAP_APOLLON
>  #include "board-apollon.h"
>  #endif

I really think you need to reconsider whether including board specific
support files into mach/hardware.h is a good idea, or whether having
all the machine specifics in the relevent board.c file should be the
way to go.

That's certainly possible, and is done by others like PXA very
successfully, and avoids any chance of board specific definitions
ever clashing with each other.  It also cuts down on the dependencies,
and the number of files that need to be rebuilt when one of these
header files are touched.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux