Skip to content

Commit

Permalink
OMAP: control: move plat-omap/control.h to mach-omap2/control.h
Browse files Browse the repository at this point in the history
Only OMAP2+ platforms have the System Control Module (SCM) IP block.
In the past, we've kept the SCM header file in plat-omap.  This has
led to abuse - device drivers including it; includes being added that
create implicit dependencies on OMAP2+ builds; etc.

In response, move the SCM headers into mach-omap2/.

As part of this, remove the direct SCM access from the OMAP UDC
driver.  It was clearly broken.  The UDC code needs an indepth review for
use on OMAP2+ chips.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Cory Maccarrone <darkstar6262@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
  • Loading branch information
Paul Walmsley committed Oct 8, 2010
1 parent aa218da commit 4814ced
Show file tree
Hide file tree
Showing 31 changed files with 48 additions and 59 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-3430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
#include <plat/gpmc.h>
#include <plat/display.h>

#include <plat/control.h>
#include <plat/gpmc-smc91x.h>

#include "board-flash.h"
#include "mux.h"
#include "sdram-qimonda-hyb18m512160af-6.h"
#include "hsmmc.h"
#include "pm.h"
#include "control.h"

#define CONFIG_DISABLE_HFCLK 1

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@

#include <plat/board.h>
#include <plat/common.h>
#include <plat/control.h>
#include <plat/usb.h>
#include <plat/mmc.h>

#include "hsmmc.h"
#include "timer-gp.h"
#include "control.h"

#define ETH_KS8851_IRQ 34
#define ETH_KS8851_POWER_ON 48
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-am3517evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

#include <plat/board.h>
#include <plat/common.h>
#include <plat/control.h>
#include <plat/usb.h>
#include <plat/display.h>

#include "mux.h"
#include "control.h"

#define AM35XX_EVM_PHY_MASK (0xF)
#define AM35XX_EVM_MDIO_FREQUENCY (1000000)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-apollon.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
#include <plat/board.h>
#include <plat/common.h>
#include <plat/gpmc.h>
#include <plat/control.h>

#include "mux.h"
#include "control.h"

/* LED & Switch macros */
#define LED0_GPIO13 13
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-cm-t3517.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@

#include <plat/board.h>
#include <plat/common.h>
#include <plat/control.h>
#include <plat/usb.h>
#include <plat/nand.h>
#include <plat/gpmc.h>

#include <mach/am35xx.h>

#include "mux.h"
#include "control.h"

#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
static struct gpio_led cm_t3517_leds[] = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

#include <plat/control.h>
#include <mach/gpio.h>
#include <plat/usb.h>
#include <plat/board.h>
Expand All @@ -42,6 +41,7 @@
#include <plat/gpmc.h>

#include "mux.h"
#include "control.h"

#define H4_FLASH_CS 0
#define H4_SMC91X_CS 1
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
#include <mach/board-zoom.h>

#include <asm/delay.h>
#include <plat/control.h>
#include <plat/usb.h>

#include "board-flash.h"
#include "mux.h"
#include "hsmmc.h"
#include "control.h"

#define LDP_SMSC911X_CS 1
#define LDP_SMSC911X_GPIO 152
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
#include "mux.h"
#include "hsmmc.h"
#include "timer-gp.h"
#include "control.h"

#include <plat/mux.h>
#include <plat/board.h>
#include <plat/common.h>
#include <plat/gpmc-smsc911x.h>
#include <plat/gpmc.h>
#include <plat/sdrc.h>
#include <plat/control.h>

#define OMAP3LOGIC_SMSC911X_CS 1

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@

#include <plat/board.h>
#include <plat/common.h>
#include <plat/control.h>
#include <plat/usb.h>
#include <plat/mmc.h>
#include "hsmmc.h"
#include "timer-gp.h"

#include "hsmmc.h"
#include "control.h"

static struct gpio_led gpio_leds[] = {
{
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clock2420_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/list.h>

#include <plat/clkdev_omap.h>
#include <plat/control.h>

#include "clock.h"
#include "clock2xxx.h"
Expand All @@ -28,6 +27,7 @@
#include "prm-regbits-24xx.h"
#include "cm-regbits-24xx.h"
#include "sdrc.h"
#include "control.h"

#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clock2430_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/list.h>

#include <plat/clkdev_omap.h>
#include <plat/control.h>

#include "clock.h"
#include "clock2xxx.h"
Expand All @@ -28,6 +27,7 @@
#include "prm-regbits-24xx.h"
#include "cm-regbits-24xx.h"
#include "sdrc.h"
#include "control.h"

#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clock3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/clk.h>
#include <linux/list.h>

#include <plat/control.h>
#include <plat/clkdev_omap.h>

#include "clock.h"
Expand All @@ -33,6 +32,7 @@
#include "cm-regbits-34xx.h"
#include "prm.h"
#include "prm-regbits-34xx.h"
#include "control.h"

/*
* clocks
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clock44xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/clk.h>
#include <plat/control.h>
#include <plat/clkdev_omap.h>

#include "clock.h"
Expand All @@ -35,6 +34,7 @@
#include "cm-regbits-44xx.h"
#include "prm.h"
#include "prm-regbits-44xx.h"
#include "control.h"

/* Root clocks */

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

#include <plat/common.h>
#include <plat/board.h>
#include <plat/control.h>
#include <plat/mux.h>

#include <plat/clock.h>

#include "sdrc.h"
#include "control.h"

/* Global address base setup code */

Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-omap2/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
#include <linux/io.h>

#include <plat/common.h>
#include <plat/control.h>
#include <plat/sdrc.h>

#include "cm-regbits-34xx.h"
#include "prm-regbits-34xx.h"
#include "cm.h"
#include "prm.h"
#include "sdrc.h"
#include "pm.h"
#include "control.h"

static void __iomem *omap2_ctrl_base;
static void __iomem *omap4_ctrl_pad_base;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* arch/arm/plat-omap/include/mach/control.h
* arch/arm/mach-omap2/control.h
*
* OMAP2/3/4 System Control Module definitions
*
* Copyright (C) 2007-2009 Texas Instruments, Inc.
* Copyright (C) 2007-2008 Nokia Corporation
* Copyright (C) 2007-2010 Texas Instruments, Inc.
* Copyright (C) 2007-2008, 2010 Nokia Corporation
*
* Written by Paul Walmsley
*
Expand All @@ -13,8 +13,8 @@
* the Free Software Foundation.
*/

#ifndef __ASM_ARCH_CONTROL_H
#define __ASM_ARCH_CONTROL_H
#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H
#define __ARCH_ARM_MACH_OMAP2_CONTROL_H

#include <mach/io.h>
#include <mach/ctrl_module_core_44xx.h>
Expand Down Expand Up @@ -321,12 +321,12 @@
#define FEAT_L2CACHE_256KB 3

#define OMAP3_ISP_SHIFT 5
#define OMAP3_ISP_MASK (1<< OMAP3_ISP_SHIFT)
#define OMAP3_ISP_MASK (1 << OMAP3_ISP_SHIFT)
#define FEAT_ISP 0
#define FEAT_ISP_NONE 1

#define OMAP3_NEON_SHIFT 4
#define OMAP3_NEON_MASK (1<< OMAP3_NEON_SHIFT)
#define OMAP3_NEON_MASK (1 << OMAP3_NEON_SHIFT)
#define FEAT_NEON 0
#define FEAT_NEON_NONE 1

Expand Down Expand Up @@ -364,5 +364,5 @@ extern void omap3_control_restore_context(void);
#endif
#endif /* __ASSEMBLY__ */

#endif /* __ASM_ARCH_CONTROL_H */
#endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */

2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/cpuidle34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#include <plat/irqs.h>
#include <plat/powerdomain.h>
#include <plat/clockdomain.h>
#include <plat/control.h>
#include <plat/serial.h>

#include "pm.h"
#include "control.h"

#ifdef CONFIG_CPU_IDLE

Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* (at your option) any later version.
*/

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
Expand All @@ -23,7 +22,6 @@
#include <asm/mach/map.h>
#include <asm/pmu.h>

#include <plat/control.h>
#include <plat/tc.h>
#include <plat/board.h>
#include <mach/gpio.h>
Expand All @@ -33,6 +31,7 @@
#include <plat/omap_device.h>

#include "mux.h"
#include "control.h"

#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#include <linux/string.h>
#include <linux/delay.h>
#include <mach/hardware.h>
#include <plat/control.h>
#include <plat/mmc.h>
#include <plat/omap-pm.h>

#include "hsmmc.h"
#include "control.h"

#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)

Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-omap2/id.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
#include <asm/cputype.h>

#include <plat/common.h>
#include <plat/control.h>
#include <plat/cpu.h>

#include <mach/id.h>

#include "control.h"

static struct omap_chip_id omap_chip;
static unsigned int omap_revision;

Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-omap2/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <plat/dma.h>
#include <plat/cpu.h>
#include <plat/mcbsp.h>
#include <plat/control.h>

#include "control.h"


/* McBSP internal signal muxing functions */

Expand Down
8 changes: 3 additions & 5 deletions arch/arm/mach-omap2/mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/uaccess.h>

#include <asm/system.h>

#include <plat/control.h>

#include "control.h"
#include "mux.h"

#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/pm24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <mach/irqs.h>
#include <plat/clock.h>
#include <plat/sram.h>
#include <plat/control.h>
#include <plat/dma.h>
#include <plat/board.h>

Expand All @@ -48,6 +47,7 @@
#include "cm-regbits-24xx.h"
#include "sdrc.h"
#include "pm.h"
#include "control.h"

#include <plat/powerdomain.h>
#include <plat/clockdomain.h>
Expand Down
Loading

0 comments on commit 4814ced

Please sign in to comment.