OMAP4: Create board support for OMAP_4430SDP.
Subsystems (3)
(patch is rebased on 2.6.30-rc6. The older version was based on 2.6.30-rc2)
This patch creates the bare minimal board files to support OMAP_4430SDP. Additinaly new omap44xx.h is created which contains the base addresses for OMAP4430. File omap34xx.h is adapted to avoid multiple definitions of common omap base address definitions.
--- arch/arm/mach-omap2/board-4430sdp.c | 94 ++++++++++++++++++++++++++++ arch/arm/plat-omap/include/mach/hardware.h | 1 + arch/arm/plat-omap/include/mach/omap34xx.h | 10 ++-- arch/arm/plat-omap/include/mach/omap44xx.h | 61 ++++++++++++++++++ 4 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 arch/arm/mach-omap2/board-4430sdp.c create mode 100644 arch/arm/plat-omap/include/mach/omap44xx.h
arch/arm/mach-omap2/board-4430sdp.c new file +94 -0
@@ -0,0 +1,94 @@ +/* +* Board support file for OMAP4430 SDP. +* +* Copyright (C) 2009 Texas Instruments +* +* Author: Santosh Shilimkar <[email protected]> +* +* Based on mach-omap2/board-3430sdp.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/gpio.h> + +#include <mach/hardware.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +#include <mach/board.h> +#include <mach/common.h> +#include <mach/control.h> +#include <mach/timer-gp.h> +#include <asm/hardware/gic.h> + +static struct platform_device sdp4430_lcd_device = { + .name ="sdp4430_lcd" , + .id =-1 , +}; + +static struct platform_device *sdp4430_devices[]__initdata = { + &sdp4430_lcd_device, +}; + +static struct omap_uart_config sdp4430_uart_config__initdata = { + .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (1 <<2 ), +}; + +static struct omap_lcd_config sdp4430_lcd_config__initdata = { + .ctrl_name ="internal" , +}; + +static struct omap_board_config_kernel sdp4430_config[]__initdata = { + {OMAP_TAG_UART , &sdp4430_uart_config }, + {OMAP_TAG_LCD , &sdp4430_lcd_config }, +}; + +static void __init gic_init_irq (void ) +{ +gic_dist_init (0 ,IO_ADDRESS (OMAP44XX_GIC_DIST_BASE ),29 ); +gic_cpu_init (0 ,IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); +} + +static void __init omap_4430sdp_init_irq (void ) +{ +omap2_init_common_hw (NULL ); +#ifdef CONFIG_OMAP_32K_TIMER +omap2_gp_clockevent_set_gptimer (1 ); +#endif +gic_init_irq (); +omap_gpio_init (); +} + + +static void __init omap_4430sdp_init (void ) +{ +platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices)); + omap_board_config = sdp4430_config; + omap_board_config_size =ARRAY_SIZE (sdp4430_config); +omap_serial_init (); +} + +static void __init omap_4430sdp_map_io (void ) +{ +omap2_set_globals_443x (); +omap2_map_common_io (); +} + +MACHINE_START (OMAP_4430SDP ,"OMAP4430 4430SDP board" ) +/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ + .phys_io = 0x48000000, + .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .boot_params = 0x80000100, + .map_io = omap_4430sdp_map_io, + .init_irq = omap_4430sdp_init_irq, + .init_machine = omap_4430sdp_init, + .timer = &omap_timer, +MACHINE_END
arch/arm/plat-omap/include/mach/hardware.h +1 -0
@@ -285,5 +285,6 @@#include "omap16xx.h" #include "omap24xx.h" #include "omap34xx.h" +#include "omap44xx.h" #endif /* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/plat-omap/include/mach/omap34xx.h +5 -5
@@ -3,7 +3,7 @@* * This file contains the processor specific definitions of the TI OMAP34XX. * -* Copyright (C) 2007 Texas Instruments. +* Copyright (C) 2007-2009 Texas Instruments. * Copyright (C) 2007 Nokia Corporation. * * This program is free software; you can redistribute it and/or modify
@@ -31,13 +31,9 @@#define L4_34XX_BASE 0x48000000#define L4_WK_34XX_BASE 0x48300000 -#define L4_WK_OMAP_BASE L4_WK_34XX_BASE#define L4_PER_34XX_BASE 0x49000000 -#define L4_PER_OMAP_BASE L4_PER_34XX_BASE#define L4_EMU_34XX_BASE 0x54000000 -#define L4_EMU_BASE L4_EMU_34XX_BASE#define L3_34XX_BASE 0x68000000 -#define L3_OMAP_BASE L3_34XX_BASE#define OMAP3430_32KSYNCT_BASE 0x48320000#define OMAP3430_CM_BASE 0x48004800
@@ -85,6 +81,10 @@#if defined(CONFIG_ARCH_OMAP3430 ) +#define L4_WK_OMAP_BASE L4_WK_34XX_BASE +#define L4_PER_OMAP_BASE L4_PER_34XX_BASE +#define L4_EMU_BASE L4_EMU_34XX_BASE +#define L3_OMAP_BASE L3_34XX_BASE#define OMAP2_32KSYNCT_BASE OMAP3430_32KSYNCT_BASE#define OMAP2_CM_BASE OMAP3430_CM_BASE#define OMAP2_PRM_BASE OMAP3430_PRM_BASE
arch/arm/plat-omap/include/mach/omap44xx.h new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.5.4.7
Tony Lindgren
maintainerRe: [PATCH 2/7] OMAP4: Create board support for OMAP_4430SDP, v3
Hi,
I rebased these patches on top of the for-next branch in linux-omap tree, some comments and the updated patch below.
Quoted 8 lines · Santosh Shilimkar
(patch is rebased on 2.6.30-rc6. The older version was based on 2.6.30-rc2)
This patch creates the bare minimal board files to support
OMAP_4430SDP. Additinaly newomap44xx.his created which contains the base addresses for OMAP4430. Fileomap34xx.his adapted to avoid multiple definitions of common omap base address definitions.Signed-off-by Santosh Shilimkar <[email protected]>
Quoted 8 lines
--- arch/arm/mach-omap2/board-4430sdp.c | 94 ++++++++++++++++++++++++++++ arch/arm/plat-omap/include/mach/hardware.h | 1 + arch/arm/plat-omap/include/mach/omap34xx.h | 10 ++-- arch/arm/plat-omap/include/mach/omap44xx.h | 61 ++++++++++++++++++ 4 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 arch/arm/mach-omap2/board-4430sdp.c create mode 100644 arch/arm/plat-omap/include/mach/omap44xx.h
In general, considering this whole series is less than 750 lines of changes, I suggest collapsing them into following three patches:
1. Add minimal support for omap4
This patch would be everything in your series, except what's in patches two and three below.
2. Add support for 4430 SDP
This patch would be just the board-4430sdp.c the changes to mach-omap2/Makefile and mach-omap2/Kconfig.
3. Add defconfig for 4430 SDP
This patch would just contain the defconfig.
To make things easy, I rebased two of your patches on top of the for-next branch in the linux-omap tree. Some comments and the updated patch below.
Please do any more changes on top of this version so we can get things queued up nicely for Russell.
Quoted 28 lines
arch/arm/plat-omap/include/mach/omap34xx.h +1
-5@@ -3,7 +3,7 @@* * This file contains the processor specific definitions of the TI OMAP34XX. * -* Copyright (C) 2007 Texas Instruments. +* Copyright (C) 2007-2009 Texas Instruments. * Copyright (C) 2007 Nokia Corporation. * * This program is free software; you can redistribute it and/or modify @@ -31,13 +31,9 @@#define L4_34XX_BASE 0x48000000#define L4_WK_34XX_BASE 0x48300000 -#define L4_WK_OMAP_BASE L4_WK_34XX_BASE#define L4_PER_34XX_BASE 0x49000000 -#define L4_PER_OMAP_BASE L4_PER_34XX_BASE#define L4_EMU_34XX_BASE 0x54000000 -#define L4_EMU_BASE L4_EMU_34XX_BASE#define L3_34XX_BASE 0x68000000 -#define L3_OMAP_BASE L3_34XX_BASE#define OMAP3430_32KSYNCT_BASE 0x48320000#define OMAP3430_CM_BASE 0x48004800
arch/arm/plat-omap/include/mach/omap34xx.h line 90
Quoted 10 lines
arch/arm/plat-omap/include/mach/omap34xx.h +4
-0@@ -85,6 +81,10 @@#if defined(CONFIG_ARCH_OMAP3430 ) +#define L4_WK_OMAP_BASE L4_WK_34XX_BASE +#define L4_PER_OMAP_BASE L4_PER_34XX_BASE +#define L4_EMU_BASE L4_EMU_34XX_BASE +#define L3_OMAP_BASE L3_34XX_BASE#define OMAP2_32KSYNCT_BASE OMAP3430_32KSYNCT_BASE#define OMAP2_CM_BASE OMAP3430_CM_BASE#define OMAP2_PRM_BASE OMAP3430_PRM_BASE
The part above can be left out now when rebased on top of the earlier header clean-up.
Quoted 12 lines
arch/arm/plat-omap/include/mach/omap44xx.h new file +6
-0+ +/* Common macros between OMAPs */ + +#if defined(CONFIG_ARCH_OMAP4 ) + +#define L4_WK_OMAP_BASE L4_WK_44XX_BASE
arch/arm/plat-omap/include/mach/omap44xx.h
Quoted 10 lines
arch/arm/plat-omap/include/mach/omap44xx.h new file +10
-0+#define L4_PER_OMAP_BASE L4_PER_44XX_BASE +#define L4_EMU_BASE L4_EMU_44XX_BASE +#define L3_OMAP_BASE L3_44XX_BASE +#define OMAP2_32KSYNCT_BASE OMAP4430_32KSYNCT_BASE +#define OMAP2_CM_BASE OMAP4430_CM_BASE +#define OMAP2_PRM_BASE OMAP4430_PRM_BASE +#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP44XX_IC_BASE) + +#endif +
And this part too can now be left out. See the related changes to plat-omap/common.c for the timer, I've only compile tested it :)
Regards,
Tony
Quoted 1 line
From
b053e3239892fa088339db2eb0f33dbaa803f61dMon Sep 17 00:00:00 2001
From: Santosh Shilimkar <[email protected]>
Date: Tue, 19 May 2009 13:51:45 -0700
Subject: [PATCH] ARM: OMAP4: Create board support for OMAP_4430SDP, v3
This patch creates the bare minimal board files to support OMAP_4430SDP. Additinaly new omap44xx.h is created which contains the base addresses for OMAP4430. File omap34xx.h is adapted to avoid multiple definitions of common omap base address definitions.
arch/arm/mach-omap2/board-4430sdp.c new file +94 -0
@@ -0,0 +1,94 @@ +/* +* Board support file for OMAP4430 SDP. +* +* Copyright (C) 2009 Texas Instruments +* +* Author: Santosh Shilimkar <[email protected]> +* +* Based on mach-omap2/board-3430sdp.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/gpio.h> + +#include <mach/hardware.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +#include <mach/board.h> +#include <mach/common.h> +#include <mach/control.h> +#include <mach/timer-gp.h> +#include <asm/hardware/gic.h> + +static struct platform_device sdp4430_lcd_device = { + .name ="sdp4430_lcd" , + .id =-1 , +}; + +static struct platform_device *sdp4430_devices[]__initdata = { + &sdp4430_lcd_device, +}; + +static struct omap_uart_config sdp4430_uart_config__initdata = { + .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (1 <<2 ), +}; + +static struct omap_lcd_config sdp4430_lcd_config__initdata = { + .ctrl_name ="internal" , +}; + +static struct omap_board_config_kernel sdp4430_config[]__initdata = { + {OMAP_TAG_UART , &sdp4430_uart_config }, + {OMAP_TAG_LCD , &sdp4430_lcd_config }, +}; + +static void __init gic_init_irq (void ) +{ +gic_dist_init (0 ,IO_ADDRESS (OMAP44XX_GIC_DIST_BASE ),29 ); +gic_cpu_init (0 ,IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); +} + +static void __init omap_4430sdp_init_irq (void ) +{ +omap2_init_common_hw (NULL ); +#ifdef CONFIG_OMAP_32K_TIMER +omap2_gp_clockevent_set_gptimer (1 ); +#endif +gic_init_irq (); +omap_gpio_init (); +} + + +static void __init omap_4430sdp_init (void ) +{ +platform_add_devices (sdp4430_devices,ARRAY_SIZE (sdp4430_devices)); + omap_board_config = sdp4430_config; + omap_board_config_size =ARRAY_SIZE (sdp4430_config); +omap_serial_init (); +} + +static void __init omap_4430sdp_map_io (void ) +{ +omap2_set_globals_443x (); +omap2_map_common_io (); +} + +MACHINE_START (OMAP_4430SDP ,"OMAP4430 4430SDP board" ) +/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ + .phys_io = 0x48000000, + .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .boot_params = 0x80000100, + .map_io = omap_4430sdp_map_io, + .init_irq = omap_4430sdp_init_irq, + .init_machine = omap_4430sdp_init, + .timer = &omap_timer, +MACHINE_END
arch/arm/plat-omap/common.c +11 -0
@@ -217,6 +217,15 @@ static cycle_t omap34xx_32k_read(struct clocksource *cs)#define omap34xx_32k_read NULL#endif +#ifdef CONFIG_ARCH_OMAP4 +static cycle_t omap44xx_32k_read (struct clocksource *cs) +{ +return omap_readl (OMAP4430_32KSYNCT_BASE +0x10 ); +} +#else +#define omap44xx_32k_read NULL +#endif +/* * Kernel assumes that sched_clock can be called early but may not have * things ready yet.
@@ -264,6 +273,8 @@ static int __init omap_init_clocksource_32k(void) clocksource_32k.read = omap2430_32k_read; else if (cpu_is_omap34xx()) clocksource_32k.read = omap34xx_32k_read; + else if (cpu_is_omap44xx()) + clocksource_32k.read = omap44xx_32k_read; else return -ENODEV;
arch/arm/plat-omap/include/mach/hardware.h +1 -0
@@ -285,5 +285,6 @@#include "omap16xx.h" #include "omap24xx.h" #include "omap34xx.h" +#include "omap44xx.h" #endif /* __ASM_ARCH_OMAP_HARDWARE_H */
arch/arm/plat-omap/include/mach/omap34xx.h +1 -1
@@ -3,7 +3,7 @@* * This file contains the processor specific definitions of the TI OMAP34XX. * -* Copyright (C) 2007 Texas Instruments. +* Copyright (C) 2007-2009 Texas Instruments. * Copyright (C) 2007 Nokia Corporation. * * This program is free software; you can redistribute it and/or modify
arch/arm/plat-omap/include/mach/omap44xx.h new file +46 -0
46 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2/3: Remove unused L4_WK_OMAP_BASE, L4_PER_OMAP_BASE, L4_EMU_BASE, L3_OMAP_BASE (Re: [PATCH 2/7] OMAP4: Create board support for OMAP_4430SDP, v3)
Quoted 4 lines · Tony Lindgren
Hi,
I rebased these patches on top of the for-next branch in linux-omap tree, some comments and the updated patch below.
We can now get rid of these old defines too BTW.
Tony
Quoted 1 line
From
a64bb3a0bf0128ee4ae1d540c7482c186aff326bMon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Tue, 19 May 2009 13:51:44 -0700
Subject: [PATCH] ARM: OMAP2/3: Remove unused L4_WK_OMAP_BASE, L4_PER_OMAP_BASE, L4_EMU_BASE, L3_OMAP_BASE
These are not being used right now, and the processor specific defines should be used instead by any code accessing these registers.
arch/arm/plat-omap/include/mach/omap34xx.h +0 -4
@@ -31,13 +31,9 @@#define L4_34XX_BASE 0x48000000#define L4_WK_34XX_BASE 0x48300000 -#define L4_WK_OMAP_BASE L4_WK_34XX_BASE#define L4_PER_34XX_BASE 0x49000000 -#define L4_PER_OMAP_BASE L4_PER_34XX_BASE#define L4_EMU_34XX_BASE 0x54000000 -#define L4_EMU_BASE L4_EMU_34XX_BASE#define L3_34XX_BASE 0x68000000 -#define L3_OMAP_BASE L3_34XX_BASE#define OMAP3430_32KSYNCT_BASE 0x48320000#define OMAP3430_CM_BASE 0x48004800
RE: [PATCH 2/7] OMAP4: Create board support for OMAP_4430SDP, v3
In reply to Tony LindgrenQuoted 55 lines
-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Wednesday, May 20, 2009 2:48 AM
To: Shilimkar, Santosh
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 2/7] OMAP4: Create board support forOMAP_4430SDP, v3Hi,
I rebased these patches on top of the for-next branch in linux-omap tree, some comments and the updated patch below.
Quoted 1 line · Santosh Shilimkar
(patch is rebased on 2.6.30-rc6. The older version was
based on 2.6.30-rc2)
Quoted 9 lines
This patch creates the bare minimal board files to support
OMAP_4430SDP. Additinaly newomap44xx.his created which contains the base addresses for OMAP4430. Fileomap34xx.his adapted to avoid multiple definitions of common omap base address definitions.Signed-off-by Santosh Shilimkar <[email protected]>--- arch/arm/mach-omap2/board-4430sdp.c | 94++++++++++++++++++++++++++++
Quoted 3 lines
arch/arm/plat-omap/include/mach/hardware.h | 1 + arch/arm/plat-omap/include/mach/omap34xx.h | 10 ++-- arch/arm/plat-omap/include/mach/omap44xx.h | 61++++++++++++++++++
Quoted 3 lines
4 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 arch/arm/mach-omap2/board-4430sdp.c create mode 100644 arch/arm/plat-omap/include/mach/omap44xx.hIn general, considering this whole series is less than 750 lines of changes,
I suggest collapsing them into following three patches:1. Add minimal support for omap4
This patch would be everything in your series, except what's in patches
two and three below.2. Add support for 4430 SDP
This patch would be just the
board-4430sdp.cthe changes to mach-omap2/Makefile
and mach-omap2/Kconfig.3. Add defconfig for 4430 SDP
This patch would just contain the defconfig.
Quoted 7 lines
To make things easy, I rebased two of your patches on top of the for-next
branch in the linux-omap tree. Some comments and the updated patch below.Please do any more changes on top of this version so we can get things queued up nicely for Russell.
Cool :)
I am fine with merging the patches but the clock stub patch should be kept separate. This patch should be reverted once clkdev is ready and in that case it would be easy to remove it. Series would be like this
1. Add minimal support for omap4
2. Add support for 4430 SDP
3. Clock stubs
4. Add defconfig for 4430 SDP
I will rebase on 'for-next branch' on linux-omap and test it.
Tony Lindgren
maintainerRe: [PATCH 2/7] OMAP4: Create board support for OMAP_4430SDP, v3
Quoted 71 lines · Shilimkar, Santosh
Quoted 55 lines
-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Wednesday, May 20, 2009 2:48 AM
To: Shilimkar, Santosh
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 2/7] OMAP4: Create board support forOMAP_4430SDP, v3Hi,
I rebased these patches on top of the for-next branch in linux-omap tree, some comments and the updated patch below.
Quoted 1 line · Santosh Shilimkar
(patch is rebased on 2.6.30-rc6. The older version was
based on 2.6.30-rc2)
Quoted 9 lines
This patch creates the bare minimal board files to support
OMAP_4430SDP. Additinaly newomap44xx.his created which contains the base addresses for OMAP4430. Fileomap34xx.his adapted to avoid multiple definitions of common omap base address definitions.Signed-off-by Santosh Shilimkar <[email protected]>--- arch/arm/mach-omap2/board-4430sdp.c | 94++++++++++++++++++++++++++++
Quoted 3 lines
arch/arm/plat-omap/include/mach/hardware.h | 1 + arch/arm/plat-omap/include/mach/omap34xx.h | 10 ++-- arch/arm/plat-omap/include/mach/omap44xx.h | 61++++++++++++++++++
Quoted 3 lines
4 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 arch/arm/mach-omap2/board-4430sdp.c create mode 100644 arch/arm/plat-omap/include/mach/omap44xx.hIn general, considering this whole series is less than 750 lines of changes,
I suggest collapsing them into following three patches:1. Add minimal support for omap4
This patch would be everything in your series, except what's in patches
two and three below.2. Add support for 4430 SDP
This patch would be just the
board-4430sdp.cthe changes to mach-omap2/Makefile
and mach-omap2/Kconfig.3. Add defconfig for 4430 SDP
This patch would just contain the defconfig.
Quoted 7 lines
To make things easy, I rebased two of your patches on top of the for-next
branch in the linux-omap tree. Some comments and the updated patch below.Please do any more changes on top of this version so we can get things queued up nicely for Russell.
Cool :)
I am fine with merging the patches but the clock stub patch should be kept separate. This patch should be reverted once clkdev is ready and in that case it would be easy to remove it. Series would be like this
1. Add minimal support for omap4
2. Add support for 4430 SDP
3. Clock stubs
4. Add defconfig for 4430 SDP
Quoted 1 line
I will rebase on 'for-next branch' on linux-omap and test it.
OK, sounds good to me!
Tony