Commit 73c583e4 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'omap-for-linus' of...

Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (47 commits)
  OMAP clock: use debugfs_remove_recursive() for rewinding
  OMAP2/3/4 core: create omap_device layer
  OMAP: omap_hwmod: call omap_hwmod init at boot; create interconnects
  OMAP2/3/4: create omap_hwmod layer
  OMAP2/3 board-*.c files: read bootloader configuration earlier
  OMAP2/3/4 PRCM: add module IDLEST wait code
  OMAP2/3 PM: create the OMAP PM interface and add a default OMAP PM no-op layer
  OMAP3 clock: remove superfluous calls to omap2_init_clk_clkdm
  OMAP clock: associate MPU clocks with the mpu_clkdm
  OMAP3 clock: Fixed processing of bootarg 'mpurate'
  OMAP: SDRC: Add several new register definitions
  OMAP: powerdomain: Fix overflow when doing powerdomain deps lookups.
  OMAP: PM: Added suspend target state control to debugfs for OMAP3
  OMAP: PM debug: Add PRCM register dump support
  OMAP: PM debug: make powerdomains use PM-debug counters
  OMAP: PM: Add pm-debug counters
  OMAP: PM: Add closures to clkdm_for_each and pwrdm_for_each.
  OMAP: PM: Hook into PM counters
  OMAP: PM counter infrastructure.
  OMAP3: PM: fix lockdep warning caused by omap3_pm_init
  ...
parents 5ce00289 1f685b36
The OMAP PM interface
=====================
This document describes the temporary OMAP PM interface. Driver
authors use these functions to communicate minimum latency or
throughput constraints to the kernel power management code.
Over time, the intention is to merge features from the OMAP PM
interface into the Linux PM QoS code.
Drivers need to express PM parameters which:
- support the range of power management parameters present in the TI SRF;
- separate the drivers from the underlying PM parameter
implementation, whether it is the TI SRF or Linux PM QoS or Linux
latency framework or something else;
- specify PM parameters in terms of fundamental units, such as
latency and throughput, rather than units which are specific to OMAP
or to particular OMAP variants;
- allow drivers which are shared with other architectures (e.g.,
DaVinci) to add these constraints in a way which won't affect non-OMAP
systems,
- can be implemented immediately with minimal disruption of other
architectures.
This document proposes the OMAP PM interface, including the following
five power management functions for driver code:
1. Set the maximum MPU wakeup latency:
(*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t)
2. Set the maximum device wakeup latency:
(*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t)
3. Set the maximum system DMA transfer start latency (CORE pwrdm):
(*pdata->set_max_sdma_lat)(struct device *dev, long t)
4. Set the minimum bus throughput needed by a device:
(*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r)
5. Return the number of times the device has lost context
(*pdata->get_dev_context_loss_count)(struct device *dev)
Further documentation for all OMAP PM interface functions can be
found in arch/arm/plat-omap/include/mach/omap-pm.h.
The OMAP PM layer is intended to be temporary
---------------------------------------------
The intention is that eventually the Linux PM QoS layer should support
the range of power management features present in OMAP3. As this
happens, existing drivers using the OMAP PM interface can be modified
to use the Linux PM QoS code; and the OMAP PM interface can disappear.
Driver usage of the OMAP PM functions
-------------------------------------
As the 'pdata' in the above examples indicates, these functions are
exposed to drivers through function pointers in driver .platform_data
structures. The function pointers are initialized by the board-*.c
files to point to the corresponding OMAP PM functions:
.set_max_dev_wakeup_lat will point to
omap_pm_set_max_dev_wakeup_lat(), etc. Other architectures which do
not support these functions should leave these function pointers set
to NULL. Drivers should use the following idiom:
if (pdata->set_max_dev_wakeup_lat)
(*pdata->set_max_dev_wakeup_lat)(dev, t);
The most common usage of these functions will probably be to specify
the maximum time from when an interrupt occurs, to when the device
becomes accessible. To accomplish this, driver writers should use the
set_max_mpu_wakeup_lat() function to to constrain the MPU wakeup
latency, and the set_max_dev_wakeup_lat() function to constrain the
device wakeup latency (from clk_enable() to accessibility). For
example,
/* Limit MPU wakeup latency */
if (pdata->set_max_mpu_wakeup_lat)
(*pdata->set_max_mpu_wakeup_lat)(dev, tc);
/* Limit device powerdomain wakeup latency */
if (pdata->set_max_dev_wakeup_lat)
(*pdata->set_max_dev_wakeup_lat)(dev, td);
/* total wakeup latency in this example: (tc + td) */
The PM parameters can be overwritten by calling the function again
with the new value. The settings can be removed by calling the
function with a t argument of -1 (except in the case of
set_max_bus_tput(), which should be called with an r argument of 0).
The fifth function above, omap_pm_get_dev_context_loss_count(),
is intended as an optimization to allow drivers to determine whether the
device has lost its internal context. If context has been lost, the
driver must restore its internal context before proceeding.
Other specialized interface functions
-------------------------------------
The five functions listed above are intended to be usable by any
device driver. DSPBridge and CPUFreq have a few special requirements.
DSPBridge expresses target DSP performance levels in terms of OPP IDs.
CPUFreq expresses target MPU performance levels in terms of MPU
frequency. The OMAP PM interface contains functions for these
specialized cases to convert that input information (OPPs/MPU
frequency) into the form that the underlying power management
implementation needs:
6. (*pdata->dsp_get_opp_table)(void)
7. (*pdata->dsp_set_min_opp)(u8 opp_id)
8. (*pdata->dsp_get_opp)(void)
9. (*pdata->cpu_get_freq_table)(void)
10. (*pdata->cpu_set_freq)(unsigned long f)
11. (*pdata->cpu_get_freq)(void)
This diff is collapsed.
...@@ -128,6 +128,7 @@ CONFIG_DEFAULT_AS=y ...@@ -128,6 +128,7 @@ CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_NOOP is not set # CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_CLASSIC_RCU=y CONFIG_CLASSIC_RCU=y
CONFIG_FREEZER=y
# #
# System Type # System Type
...@@ -236,6 +237,7 @@ CONFIG_ARM_THUMB=y ...@@ -236,6 +237,7 @@ CONFIG_ARM_THUMB=y
# CONFIG_CPU_BPREDICT_DISABLE is not set # CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_HAS_TLS_REG=y CONFIG_HAS_TLS_REG=y
# CONFIG_OUTER_CACHE is not set # CONFIG_OUTER_CACHE is not set
CONFIG_COMMON_CLKDEV=y
# #
# Bus support # Bus support
...@@ -317,7 +319,12 @@ CONFIG_BINFMT_MISC=y ...@@ -317,7 +319,12 @@ CONFIG_BINFMT_MISC=y
# #
# Power management options # Power management options
# #
# CONFIG_PM is not set CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_APM_EMULATION is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y CONFIG_NET=y
...@@ -713,6 +720,7 @@ CONFIG_GPIOLIB=y ...@@ -713,6 +720,7 @@ CONFIG_GPIOLIB=y
# CONFIG_GPIO_MAX732X is not set # CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set # CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_PCF857X is not set
CONFIG_GPIO_TWL4030=y
# #
# PCI GPIO expanders: # PCI GPIO expanders:
...@@ -741,6 +749,7 @@ CONFIG_SSB_POSSIBLE=y ...@@ -741,6 +749,7 @@ CONFIG_SSB_POSSIBLE=y
# CONFIG_MFD_SM501 is not set # CONFIG_MFD_SM501 is not set
# CONFIG_HTC_EGPIO is not set # CONFIG_HTC_EGPIO is not set
# CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_PASIC3 is not set
CONFIG_TWL4030_CORE=y
# CONFIG_UCB1400_CORE is not set # CONFIG_UCB1400_CORE is not set
# CONFIG_MFD_TMIO is not set # CONFIG_MFD_TMIO is not set
# CONFIG_MFD_T7L66XB is not set # CONFIG_MFD_T7L66XB is not set
...@@ -787,7 +796,7 @@ CONFIG_DUMMY_CONSOLE=y ...@@ -787,7 +796,7 @@ CONFIG_DUMMY_CONSOLE=y
CONFIG_USB_SUPPORT=y CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_OHCI=y
# CONFIG_USB_ARCH_HAS_EHCI is not set CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y CONFIG_USB=y
# CONFIG_USB_DEBUG is not set # CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
...@@ -798,7 +807,8 @@ CONFIG_USB=y ...@@ -798,7 +807,8 @@ CONFIG_USB=y
CONFIG_USB_DEVICEFS=y CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_OTG is not set CONFIG_USB_SUSPEND=y
CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_MON=y CONFIG_USB_MON=y
...@@ -806,6 +816,8 @@ CONFIG_USB_MON=y ...@@ -806,6 +816,8 @@ CONFIG_USB_MON=y
# #
# USB Host Controller Drivers # USB Host Controller Drivers
# #
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_C67X00_HCD is not set # CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set # CONFIG_USB_ISP1760_HCD is not set
...@@ -818,10 +830,10 @@ CONFIG_USB_MUSB_SOC=y ...@@ -818,10 +830,10 @@ CONFIG_USB_MUSB_SOC=y
# #
# OMAP 343x high speed USB support # OMAP 343x high speed USB support
# #
CONFIG_USB_MUSB_HOST=y # CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_PERIPHERAL is not set # CONFIG_USB_MUSB_PERIPHERAL is not set
# CONFIG_USB_MUSB_OTG is not set CONFIG_USB_MUSB_OTG=y
# CONFIG_USB_GADGET_MUSB_HDRC is not set CONFIG_USB_GADGET_MUSB_HDRC=y
CONFIG_USB_MUSB_HDRC_HCD=y CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_MUSB_PIO_ONLY is not set # CONFIG_MUSB_PIO_ONLY is not set
CONFIG_USB_INVENTRA_DMA=y CONFIG_USB_INVENTRA_DMA=y
...@@ -887,8 +899,8 @@ CONFIG_USB_GADGET_SELECTED=y ...@@ -887,8 +899,8 @@ CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_FSL_USB2 is not set # CONFIG_USB_GADGET_FSL_USB2 is not set
# CONFIG_USB_GADGET_NET2280 is not set # CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_PXA25X is not set # CONFIG_USB_GADGET_PXA25X is not set
CONFIG_USB_GADGET_M66592=y # CONFIG_USB_GADGET_M66592 is not set
CONFIG_USB_M66592=y # CONFIG_USB_M66592 is not set
# CONFIG_USB_GADGET_PXA27X is not set # CONFIG_USB_GADGET_PXA27X is not set
# CONFIG_USB_GADGET_GOKU is not set # CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LH7A40X is not set # CONFIG_USB_GADGET_LH7A40X is not set
...@@ -906,6 +918,15 @@ CONFIG_USB_ETH_RNDIS=y ...@@ -906,6 +918,15 @@ CONFIG_USB_ETH_RNDIS=y
# CONFIG_USB_MIDI_GADGET is not set # CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set # CONFIG_USB_G_PRINTER is not set
# CONFIG_USB_CDC_COMPOSITE is not set # CONFIG_USB_CDC_COMPOSITE is not set
#
# OTG and related infrastructure
#
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_ISP1301_OMAP is not set
CONFIG_TWL4030_USB=y
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_MMC=y CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set # CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set # CONFIG_MMC_UNSAFE_RESUME is not set
...@@ -923,6 +944,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y ...@@ -923,6 +944,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
# #
# CONFIG_MMC_SDHCI is not set # CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_OMAP is not set # CONFIG_MMC_OMAP is not set
CONFIG_MMC_OMAP_HS=y
# CONFIG_MEMSTICK is not set # CONFIG_MEMSTICK is not set
# CONFIG_ACCESSIBILITY is not set # CONFIG_ACCESSIBILITY is not set
# CONFIG_NEW_LEDS is not set # CONFIG_NEW_LEDS is not set
...@@ -981,10 +1003,11 @@ CONFIG_RTC_INTF_DEV=y ...@@ -981,10 +1003,11 @@ CONFIG_RTC_INTF_DEV=y
# #
# Voltage and Current regulators # Voltage and Current regulators
# #
# CONFIG_REGULATOR is not set CONFIG_REGULATOR=y
# CONFIG_REGULATOR_FIXED_VOLTAGE is not set # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set # CONFIG_REGULATOR_BQ24022 is not set
CONFIG_REGULATOR_TWL4030=y
# CONFIG_UIO is not set # CONFIG_UIO is not set
# #
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc8 # Linux kernel version: 2.6.30-omap1
# Fri Mar 13 14:17:01 2009 # Tue Jun 23 10:36:45 2009
# #
CONFIG_ARM=y CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
...@@ -197,9 +197,9 @@ CONFIG_OMAP_MCBSP=y ...@@ -197,9 +197,9 @@ CONFIG_OMAP_MCBSP=y
CONFIG_OMAP_32K_TIMER=y CONFIG_OMAP_32K_TIMER=y
CONFIG_OMAP_32K_TIMER_HZ=128 CONFIG_OMAP_32K_TIMER_HZ=128
CONFIG_OMAP_DM_TIMER=y CONFIG_OMAP_DM_TIMER=y
# CONFIG_OMAP_LL_DEBUG_UART1 is not set CONFIG_OMAP_LL_DEBUG_UART1=y
# CONFIG_OMAP_LL_DEBUG_UART2 is not set # CONFIG_OMAP_LL_DEBUG_UART2 is not set
CONFIG_OMAP_LL_DEBUG_UART3=y # CONFIG_OMAP_LL_DEBUG_UART3 is not set
CONFIG_OMAP_SERIAL_WAKE=y CONFIG_OMAP_SERIAL_WAKE=y
CONFIG_ARCH_OMAP34XX=y CONFIG_ARCH_OMAP34XX=y
CONFIG_ARCH_OMAP3430=y CONFIG_ARCH_OMAP3430=y
...@@ -207,10 +207,10 @@ CONFIG_ARCH_OMAP3430=y ...@@ -207,10 +207,10 @@ CONFIG_ARCH_OMAP3430=y
# #
# OMAP Board Type # OMAP Board Type
# #
CONFIG_MACH_OMAP3_BEAGLE=y # CONFIG_MACH_OMAP3_BEAGLE is not set
CONFIG_MACH_OMAP_LDP=y # CONFIG_MACH_OMAP_LDP is not set
CONFIG_MACH_OVERO=y # CONFIG_MACH_OVERO is not set
CONFIG_MACH_OMAP3_PANDORA=y # CONFIG_MACH_OMAP3_PANDORA is not set
CONFIG_MACH_OMAP_3430SDP=y CONFIG_MACH_OMAP_3430SDP=y
# #
...@@ -950,7 +950,7 @@ CONFIG_SPI_OMAP24XX=y ...@@ -950,7 +950,7 @@ CONFIG_SPI_OMAP24XX=y
# CONFIG_SPI_TLE62X0 is not set # CONFIG_SPI_TLE62X0 is not set
CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y CONFIG_GPIOLIB=y
CONFIG_DEBUG_GPIO=y # CONFIG_DEBUG_GPIO is not set
CONFIG_GPIO_SYSFS=y CONFIG_GPIO_SYSFS=y
# #
...@@ -1370,7 +1370,7 @@ CONFIG_SND_OMAP_SOC=y ...@@ -1370,7 +1370,7 @@ CONFIG_SND_OMAP_SOC=y
CONFIG_SND_OMAP_SOC_MCBSP=y CONFIG_SND_OMAP_SOC_MCBSP=y
# CONFIG_SND_OMAP_SOC_OVERO is not set # CONFIG_SND_OMAP_SOC_OVERO is not set
CONFIG_SND_OMAP_SOC_SDP3430=y CONFIG_SND_OMAP_SOC_SDP3430=y
CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=y # CONFIG_SND_OMAP_SOC_OMAP3_PANDORA is not set
CONFIG_SND_SOC_I2C_AND_SPI=y CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_ALL_CODECS is not set # CONFIG_SND_SOC_ALL_CODECS is not set
CONFIG_SND_SOC_TWL4030=y CONFIG_SND_SOC_TWL4030=y
......
This diff is collapsed.
...@@ -1006,6 +1006,7 @@ CONFIG_WATCHDOG=y ...@@ -1006,6 +1006,7 @@ CONFIG_WATCHDOG=y
# #
# CONFIG_SOFT_WATCHDOG is not set # CONFIG_SOFT_WATCHDOG is not set
CONFIG_OMAP_WATCHDOG=m CONFIG_OMAP_WATCHDOG=m
CONFIG_TWL4030_WATCHDOG=m
# #
# USB-based Watchdog Cards # USB-based Watchdog Cards
......
...@@ -15,8 +15,11 @@ ...@@ -15,8 +15,11 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/serial_8250.h>
#include <asm/serial.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -162,10 +165,6 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = { ...@@ -162,10 +165,6 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_uart_config ams_delta_uart_config __initdata = {
.enabled_uarts = 1,
};
static struct omap_usb_config ams_delta_usb_config __initdata = { static struct omap_usb_config ams_delta_usb_config __initdata = {
.register_host = 1, .register_host = 1,
.hmc_mode = 16, .hmc_mode = 16,
...@@ -174,7 +173,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = { ...@@ -174,7 +173,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
static struct omap_board_config_kernel ams_delta_config[] = { static struct omap_board_config_kernel ams_delta_config[] = {
{ OMAP_TAG_LCD, &ams_delta_lcd_config }, { OMAP_TAG_LCD, &ams_delta_lcd_config },
{ OMAP_TAG_UART, &ams_delta_uart_config },
}; };
static struct resource ams_delta_kp_resources[] = { static struct resource ams_delta_kp_resources[] = {
...@@ -235,6 +233,41 @@ static void __init ams_delta_init(void) ...@@ -235,6 +233,41 @@ static void __init ams_delta_init(void)
platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
} }
static struct plat_serial8250_port ams_delta_modem_ports[] = {
{
.membase = (void *) AMS_DELTA_MODEM_VIRT,
.mapbase = AMS_DELTA_MODEM_PHYS,
.irq = -EINVAL, /* changed later */
.flags = UPF_BOOT_AUTOCONF,
.irqflags = IRQF_TRIGGER_RISING,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = BASE_BAUD * 16,
},
{ },
};
static struct platform_device ams_delta_modem_device = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM1,
.dev = {
.platform_data = ams_delta_modem_ports,
},
};
static int __init ams_delta_modem_init(void)
{
omap_cfg_reg(M14_1510_GPIO2);
ams_delta_modem_ports[0].irq = gpio_to_irq(2);
ams_delta_latch2_write(
AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC,
AMS_DELTA_LATCH2_MODEM_NRESET | AMS_DELTA_LATCH2_MODEM_CODEC);
return platform_device_register(&ams_delta_modem_device);
}
arch_initcall(ams_delta_modem_init);
static void __init ams_delta_map_io(void) static void __init ams_delta_map_io(void)
{ {
omap1_map_common_io(); omap1_map_common_io();
......
...@@ -240,16 +240,11 @@ static int nand_dev_ready(struct omap_nand_platform_data *data) ...@@ -240,16 +240,11 @@ static int nand_dev_ready(struct omap_nand_platform_data *data)
return gpio_get_value(P2_NAND_RB_GPIO_PIN); return gpio_get_value(P2_NAND_RB_GPIO_PIN);
} }
static struct omap_uart_config fsample_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1)),
};
static struct omap_lcd_config fsample_lcd_config __initdata = { static struct omap_lcd_config fsample_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_board_config_kernel fsample_config[] = { static struct omap_board_config_kernel fsample_config[] = {
{ OMAP_TAG_UART, &fsample_uart_config },
{ OMAP_TAG_LCD, &fsample_lcd_config }, { OMAP_TAG_LCD, &fsample_lcd_config },
}; };
......
...@@ -57,12 +57,7 @@ static struct omap_usb_config generic1610_usb_config __initdata = { ...@@ -57,12 +57,7 @@ static struct omap_usb_config generic1610_usb_config __initdata = {
}; };
#endif #endif
static struct omap_uart_config generic_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_board_config_kernel generic_config[] __initdata = { static struct omap_board_config_kernel generic_config[] __initdata = {
{ OMAP_TAG_UART, &generic_uart_config },
}; };
static void __init omap_generic_init(void) static void __init omap_generic_init(void)
......
...@@ -360,16 +360,11 @@ static struct omap_usb_config h2_usb_config __initdata = { ...@@ -360,16 +360,11 @@ static struct omap_usb_config h2_usb_config __initdata = {
.pins[1] = 3, .pins[1] = 3,
}; };
static struct omap_uart_config h2_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config h2_lcd_config __initdata = { static struct omap_lcd_config h2_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_board_config_kernel h2_config[] __initdata = { static struct omap_board_config_kernel h2_config[] __initdata = {
{ OMAP_TAG_UART, &h2_uart_config },
{ OMAP_TAG_LCD, &h2_lcd_config }, { OMAP_TAG_LCD, &h2_lcd_config },
}; };
......
...@@ -313,16 +313,11 @@ static struct omap_usb_config h3_usb_config __initdata = { ...@@ -313,16 +313,11 @@ static struct omap_usb_config h3_usb_config __initdata = {
.pins[1] = 3, .pins[1] = 3,
}; };
static struct omap_uart_config h3_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config h3_lcd_config __initdata = { static struct omap_lcd_config h3_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_board_config_kernel h3_config[] __initdata = { static struct omap_board_config_kernel h3_config[] __initdata = {
{ OMAP_TAG_UART, &h3_uart_config },
{ OMAP_TAG_LCD, &h3_lcd_config }, { OMAP_TAG_LCD, &h3_lcd_config },
}; };
......
...@@ -368,13 +368,8 @@ static inline void innovator_mmc_init(void) ...@@ -368,13 +368,8 @@ static inline void innovator_mmc_init(void)
} }
#endif #endif
static struct omap_uart_config innovator_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_board_config_kernel innovator_config[] = { static struct omap_board_config_kernel innovator_config[] = {
{ OMAP_TAG_LCD, NULL }, { OMAP_TAG_LCD, NULL },
{ OMAP_TAG_UART, &innovator_uart_config },
}; };
static void __init innovator_init(void) static void __init innovator_init(void)
......
...@@ -293,10 +293,6 @@ static struct omap_usb_config osk_usb_config __initdata = { ...@@ -293,10 +293,6 @@ static struct omap_usb_config osk_usb_config __initdata = {
.pins[0] = 2, .pins[0] = 2,
}; };
static struct omap_uart_config osk_uart_config __initdata = {
.enabled_uarts = (1 << 0),
};
#ifdef CONFIG_OMAP_OSK_MISTRAL #ifdef CONFIG_OMAP_OSK_MISTRAL
static struct omap_lcd_config osk_lcd_config __initdata = { static struct omap_lcd_config osk_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
...@@ -304,7 +300,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = { ...@@ -304,7 +300,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = {
#endif #endif
static struct omap_board_config_kernel osk_config[] __initdata = { static struct omap_board_config_kernel osk_config[] __initdata = {
{ OMAP_TAG_UART, &osk_uart_config },
#ifdef CONFIG_OMAP_OSK_MISTRAL #ifdef CONFIG_OMAP_OSK_MISTRAL
{ OMAP_TAG_LCD, &osk_lcd_config }, { OMAP_TAG_LCD, &osk_lcd_config },
#endif #endif
......
...@@ -212,10 +212,6 @@ static struct omap_lcd_config palmte_lcd_config __initdata = { ...@@ -212,10 +212,6 @@ static struct omap_lcd_config palmte_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_uart_config palmte_uart_config __initdata = {
.enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
};
#ifdef CONFIG_APM #ifdef CONFIG_APM
/* /*
* Values measured in 10 minute intervals averaged over 10 samples. * Values measured in 10 minute intervals averaged over 10 samples.
...@@ -302,7 +298,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery) ...@@ -302,7 +298,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
static struct omap_board_config_kernel palmte_config[] __initdata = { static struct omap_board_config_kernel palmte_config[] __initdata = {
{ OMAP_TAG_LCD, &palmte_lcd_config }, { OMAP_TAG_LCD, &palmte_lcd_config },
{ OMAP_TAG_UART, &palmte_uart_config },
}; };
static struct spi_board_info palmte_spi_info[] __initdata = { static struct spi_board_info palmte_spi_info[] __initdata = {
......
...@@ -274,13 +274,8 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = { ...@@ -274,13 +274,8 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_uart_config palmtt_uart_config __initdata = {
.enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
};
static struct omap_board_config_kernel palmtt_config[] __initdata = { static struct omap_board_config_kernel palmtt_config[] __initdata = {
{ OMAP_TAG_LCD, &palmtt_lcd_config }, { OMAP_TAG_LCD, &palmtt_lcd_config },
{ OMAP_TAG_UART, &palmtt_uart_config },
}; };
static void __init omap_mpu_wdt_mode(int mode) { static void __init omap_mpu_wdt_mode(int mode) {
......
...@@ -244,13 +244,8 @@ static struct omap_lcd_config palmz71_lcd_config __initdata = { ...@@ -244,13 +244,8 @@ static struct omap_lcd_config palmz71_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_uart_config palmz71_uart_config __initdata = {
.enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
};
static struct omap_board_config_kernel palmz71_config[] __initdata = { static struct omap_board_config_kernel palmz71_config[] __initdata = {
{OMAP_TAG_LCD, &palmz71_lcd_config}, {OMAP_TAG_LCD, &palmz71_lcd_config},
{OMAP_TAG_UART, &palmz71_uart_config},
}; };
static irqreturn_t static irqreturn_t
......
...@@ -208,16 +208,11 @@ static int nand_dev_ready(struct omap_nand_platform_data *data) ...@@ -208,16 +208,11 @@ static int nand_dev_ready(struct omap_nand_platform_data *data)
return gpio_get_value(P2_NAND_RB_GPIO_PIN); return gpio_get_value(P2_NAND_RB_GPIO_PIN);
} }
static struct omap_uart_config perseus2_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1)),
};
static struct omap_lcd_config perseus2_lcd_config __initdata = { static struct omap_lcd_config perseus2_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_board_config_kernel perseus2_config[] __initdata = { static struct omap_board_config_kernel perseus2_config[] __initdata = {
{ OMAP_TAG_UART, &perseus2_uart_config },
{ OMAP_TAG_LCD, &perseus2_lcd_config }, { OMAP_TAG_LCD, &perseus2_lcd_config },
}; };
......
...@@ -369,13 +369,8 @@ static struct platform_device *sx1_devices[] __initdata = { ...@@ -369,13 +369,8 @@ static struct platform_device *sx1_devices[] __initdata = {
}; };
/*-----------------------------------------*/ /*-----------------------------------------*/
static struct omap_uart_config sx1_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_board_config_kernel sx1_config[] __initdata = { static struct omap_board_config_kernel sx1_config[] __initdata = {
{ OMAP_TAG_LCD, &sx1_lcd_config }, { OMAP_TAG_LCD, &sx1_lcd_config },
{ OMAP_TAG_UART, &sx1_uart_config },
}; };
/*-----------------------------------------*/ /*-----------------------------------------*/
......
...@@ -140,12 +140,7 @@ static struct omap_usb_config voiceblue_usb_config __initdata = { ...@@ -140,12 +140,7 @@ static struct omap_usb_config voiceblue_usb_config __initdata = {
.pins[2] = 6, .pins[2] = 6,
}; };
static struct omap_uart_config voiceblue_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_board_config_kernel voiceblue_config[] = { static struct omap_board_config_kernel voiceblue_config[] = {
{ OMAP_TAG_UART, &voiceblue_uart_config },
}; };
static void __init voiceblue_init_irq(void) static void __init voiceblue_init_irq(void)
......
...@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {} ...@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {}
# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1
#endif #endif
#define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) #define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE)
static struct resource mbox_resources[] = { static struct resource mbox_resources[] = {
{ {
......
...@@ -29,9 +29,9 @@ extern void omapfb_reserve_sdram(void); ...@@ -29,9 +29,9 @@ extern void omapfb_reserve_sdram(void);
*/ */
static struct map_desc omap_io_desc[] __initdata = { static struct map_desc omap_io_desc[] __initdata = {
{ {
.virtual = IO_VIRT, .virtual = OMAP1_IO_VIRT,
.pfn = __phys_to_pfn(IO_PHYS), .pfn = __phys_to_pfn(OMAP1_IO_PHYS),
.length = IO_SIZE, .length = OMAP1_IO_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
} }
}; };
......
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
* Register and offset definitions to be used in PM assembler code * Register and offset definitions to be used in PM assembler code
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
#define CLKGEN_REG_ASM_BASE IO_ADDRESS(0xfffece00) #define CLKGEN_REG_ASM_BASE OMAP1_IO_ADDRESS(0xfffece00)
#define ARM_IDLECT1_ASM_OFFSET 0x04 #define ARM_IDLECT1_ASM_OFFSET 0x04
#define ARM_IDLECT2_ASM_OFFSET 0x08 #define ARM_IDLECT2_ASM_OFFSET 0x08
#define TCMIF_ASM_BASE IO_ADDRESS(0xfffecc00) #define TCMIF_ASM_BASE OMAP1_IO_ADDRESS(0xfffecc00)
#define EMIFS_CONFIG_ASM_OFFSET 0x0c #define EMIFS_CONFIG_ASM_OFFSET 0x0c
#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20 #define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20
......
...@@ -64,7 +64,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p) ...@@ -64,7 +64,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.membase = IO_ADDRESS(OMAP_UART1_BASE), .membase = OMAP1_IO_ADDRESS(OMAP_UART1_BASE),
.mapbase = OMAP_UART1_BASE, .mapbase = OMAP_UART1_BASE,
.irq = INT_UART1, .irq = INT_UART1,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
...@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.uartclk = OMAP16XX_BASE_BAUD * 16, .uartclk = OMAP16XX_BASE_BAUD * 16,
}, },
{ {
.membase = IO_ADDRESS(OMAP_UART2_BASE), .membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE),
.mapbase = OMAP_UART2_BASE, .mapbase = OMAP_UART2_BASE,
.irq = INT_UART2, .irq = INT_UART2,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
...@@ -82,7 +82,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -82,7 +82,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.uartclk = OMAP16XX_BASE_BAUD * 16, .uartclk = OMAP16XX_BASE_BAUD * 16,
}, },
{ {
.membase = IO_ADDRESS(OMAP_UART3_BASE), .membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE),
.mapbase = OMAP_UART3_BASE, .mapbase = OMAP_UART3_BASE,
.irq = INT_UART3, .irq = INT_UART3,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
...@@ -109,7 +109,6 @@ static struct platform_device serial_device = { ...@@ -109,7 +109,6 @@ static struct platform_device serial_device = {
void __init omap_serial_init(void) void __init omap_serial_init(void)
{ {
int i; int i;
const struct omap_uart_config *info;
if (cpu_is_omap730()) { if (cpu_is_omap730()) {
serial_platform_data[0].regshift = 0; serial_platform_data[0].regshift = 0;
...@@ -131,19 +130,9 @@ void __init omap_serial_init(void) ...@@ -131,19 +130,9 @@ void __init omap_serial_init(void)
serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16; serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
} }
info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
if (info == NULL)
return;
for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
unsigned char reg; unsigned char reg;
if (!((1 << i) & info->enabled_uarts)) {
serial_platform_data[i].membase = NULL;
serial_platform_data[i].mapbase = 0;
continue;
}
switch (i) { switch (i) {
case 0: case 0:
uart1_ck = clk_get(NULL, "uart1_ck"); uart1_ck = clk_get(NULL, "uart1_ck");
......
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
ENTRY(omap1_sram_reprogram_clock) ENTRY(omap1_sram_reprogram_clock)
stmfd sp!, {r0 - r12, lr} @ save registers on stack stmfd sp!, {r0 - r12, lr} @ save registers on stack
mov r2, #IO_ADDRESS(DPLL_CTL) & 0xff000000 mov r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0xff000000
orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x00ff0000 orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x00ff0000
orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x0000ff00 orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x0000ff00
mov r3, #IO_ADDRESS(ARM_CKCTL) & 0xff000000 mov r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0xff000000
orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x00ff0000 orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x00ff0000
orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x0000ff00 orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x0000ff00
tst r0, #1 << 4 @ want lock mode? tst r0, #1 << 4 @ want lock mode?
beq newck @ nope beq newck @ nope
......
...@@ -63,7 +63,7 @@ typedef struct { ...@@ -63,7 +63,7 @@ typedef struct {
} omap_mpu_timer_regs_t; } omap_mpu_timer_regs_t;
#define omap_mpu_timer_base(n) \ #define omap_mpu_timer_base(n) \
((volatile omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ ((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
(n)*OMAP_MPU_TIMER_OFFSET)) (n)*OMAP_MPU_TIMER_OFFSET))
static inline unsigned long omap_mpu_timer_read(int nr) static inline unsigned long omap_mpu_timer_read(int nr)
......
...@@ -31,6 +31,11 @@ config MACH_OMAP_GENERIC ...@@ -31,6 +31,11 @@ config MACH_OMAP_GENERIC
bool "Generic OMAP board" bool "Generic OMAP board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX depends on ARCH_OMAP2 && ARCH_OMAP24XX
config MACH_OMAP2_TUSB6010
bool
depends on ARCH_OMAP2 && ARCH_OMAP2420
default y if MACH_NOKIA_N8X0
config MACH_OMAP_H4 config MACH_OMAP_H4
bool "OMAP 2420 H4 board" bool "OMAP 2420 H4 board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX depends on ARCH_OMAP2 && ARCH_OMAP24XX
...@@ -68,6 +73,10 @@ config MACH_OMAP_3430SDP ...@@ -68,6 +73,10 @@ config MACH_OMAP_3430SDP
bool "OMAP 3430 SDP board" bool "OMAP 3430 SDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
config MACH_NOKIA_N8X0
bool "Nokia N800/N810"
depends on ARCH_OMAP2420
config MACH_NOKIA_RX51 config MACH_NOKIA_RX51
bool "Nokia RX-51 board" bool "Nokia RX-51 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Common support # Common support
obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o
omap-2-3-common = irq.o sdrc.o omap-2-3-common = irq.o sdrc.o omap_hwmod.o
prcm-common = prcm.o powerdomain.o prcm-common = prcm.o powerdomain.o
clock-common = clock.o clockdomain.o clock-common = clock.o clockdomain.o
...@@ -35,6 +35,11 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o ...@@ -35,6 +35,11 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
obj-$(CONFIG_PM_DEBUG) += pm-debug.o obj-$(CONFIG_PM_DEBUG) += pm-debug.o
endif endif
# PRCM
obj-$(CONFIG_ARCH_OMAP2) += cm.o
obj-$(CONFIG_ARCH_OMAP3) += cm.o
obj-$(CONFIG_ARCH_OMAP4) += cm4xxx.o
# Clock framework # Clock framework
obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o
obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
...@@ -62,7 +67,7 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \ ...@@ -62,7 +67,7 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \
mmc-twl4030.o mmc-twl4030.o
obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \
mmc-twl4030.o mmc-twl4030.o
obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
board-rx51-peripherals.o \ board-rx51-peripherals.o \
mmc-twl4030.o mmc-twl4030.o
...@@ -74,6 +79,7 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o ...@@ -74,6 +79,7 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
# Platform specific device init code # Platform specific device init code
obj-y += usb-musb.o obj-y += usb-musb.o
obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o
obj-y += $(onenand-m) $(onenand-y) obj-y += $(onenand-m) $(onenand-y)
......
...@@ -139,23 +139,19 @@ static inline void board_smc91x_init(void) ...@@ -139,23 +139,19 @@ static inline void board_smc91x_init(void)
#endif #endif
static struct omap_board_config_kernel sdp2430_config[] = {
{OMAP_TAG_LCD, &sdp2430_lcd_config},
};
static void __init omap_2430sdp_init_irq(void) static void __init omap_2430sdp_init_irq(void)
{ {
omap_board_config = sdp2430_config;
omap_board_config_size = ARRAY_SIZE(sdp2430_config);
omap2_init_common_hw(NULL, NULL); omap2_init_common_hw(NULL, NULL);
omap_init_irq(); omap_init_irq();
omap_gpio_init(); omap_gpio_init();
} }
static struct omap_uart_config sdp2430_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_board_config_kernel sdp2430_config[] = {
{OMAP_TAG_UART, &sdp2430_uart_config},
{OMAP_TAG_LCD, &sdp2430_lcd_config},
};
static struct twl4030_gpio_platform_data sdp2430_gpio_data = { static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
.gpio_base = OMAP_MAX_GPIO_LINES, .gpio_base = OMAP_MAX_GPIO_LINES,
.irq_base = TWL4030_GPIO_IRQ_BASE, .irq_base = TWL4030_GPIO_IRQ_BASE,
...@@ -205,8 +201,6 @@ static void __init omap_2430sdp_init(void) ...@@ -205,8 +201,6 @@ static void __init omap_2430sdp_init(void)
omap2430_i2c_init(); omap2430_i2c_init();
platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
omap_board_config = sdp2430_config;
omap_board_config_size = ARRAY_SIZE(sdp2430_config);
omap_serial_init(); omap_serial_init();
twl4030_mmc_init(mmc); twl4030_mmc_init(mmc);
usb_musb_init(); usb_musb_init();
......
...@@ -167,26 +167,23 @@ static struct platform_device *sdp3430_devices[] __initdata = { ...@@ -167,26 +167,23 @@ static struct platform_device *sdp3430_devices[] __initdata = {
&sdp3430_lcd_device, &sdp3430_lcd_device,
}; };
static void __init omap_3430sdp_init_irq(void)
{
omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
omap_init_irq();
omap_gpio_init();
}
static struct omap_uart_config sdp3430_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config sdp3430_lcd_config __initdata = { static struct omap_lcd_config sdp3430_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct omap_board_config_kernel sdp3430_config[] __initdata = { static struct omap_board_config_kernel sdp3430_config[] __initdata = {
{ OMAP_TAG_UART, &sdp3430_uart_config },
{ OMAP_TAG_LCD, &sdp3430_lcd_config }, { OMAP_TAG_LCD, &sdp3430_lcd_config },
}; };
static void __init omap_3430sdp_init_irq(void)
{
omap_board_config = sdp3430_config;
omap_board_config_size = ARRAY_SIZE(sdp3430_config);
omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
omap_init_irq();
omap_gpio_init();
}
static int sdp3430_batt_table[] = { static int sdp3430_batt_table[] = {
/* 0 C*/ /* 0 C*/
30800, 29500, 28300, 27100, 30800, 29500, 28300, 27100,
...@@ -478,12 +475,15 @@ static inline void board_smc91x_init(void) ...@@ -478,12 +475,15 @@ static inline void board_smc91x_init(void)
#endif #endif
static void enable_board_wakeup_source(void)
{
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
}
static void __init omap_3430sdp_init(void) static void __init omap_3430sdp_init(void)
{ {
omap3430_i2c_init(); omap3430_i2c_init();
platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
omap_board_config = sdp3430_config;
omap_board_config_size = ARRAY_SIZE(sdp3430_config);
if (omap_rev() > OMAP3430_REV_ES1_0) if (omap_rev() > OMAP3430_REV_ES1_0)
ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
else else
...@@ -495,6 +495,7 @@ static void __init omap_3430sdp_init(void) ...@@ -495,6 +495,7 @@ static void __init omap_3430sdp_init(void)
omap_serial_init(); omap_serial_init();
usb_musb_init(); usb_musb_init();
board_smc91x_init(); board_smc91x_init();
enable_board_wakeup_source();
} }
static void __init omap_3430sdp_map_io(void) static void __init omap_3430sdp_map_io(void)
......
...@@ -47,14 +47,13 @@ static struct omap_lcd_config sdp4430_lcd_config __initdata = { ...@@ -47,14 +47,13 @@ static struct omap_lcd_config sdp4430_lcd_config __initdata = {
}; };
static struct omap_board_config_kernel sdp4430_config[] __initdata = { static struct omap_board_config_kernel sdp4430_config[] __initdata = {
{ OMAP_TAG_UART, &sdp4430_uart_config },
{ OMAP_TAG_LCD, &sdp4430_lcd_config }, { OMAP_TAG_LCD, &sdp4430_lcd_config },
}; };
static void __init gic_init_irq(void) static void __init gic_init_irq(void)
{ {
gic_dist_init(0, IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29); gic_dist_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29);
gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
} }
static void __init omap_4430sdp_init_irq(void) static void __init omap_4430sdp_init_irq(void)
......
...@@ -248,18 +248,6 @@ static inline void __init apollon_init_smc91x(void) ...@@ -248,18 +248,6 @@ static inline void __init apollon_init_smc91x(void)
clk_put(gpmc_fck); clk_put(gpmc_fck);
} }
static void __init omap_apollon_init_irq(void)
{
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
apollon_init_smc91x();
}
static struct omap_uart_config apollon_uart_config __initdata = {
.enabled_uarts = (1 << 0) | (0 << 1) | (0 << 2),
};
static struct omap_usb_config apollon_usb_config __initdata = { static struct omap_usb_config apollon_usb_config __initdata = {
.register_dev = 1, .register_dev = 1,
.hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */ .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */
...@@ -272,10 +260,19 @@ static struct omap_lcd_config apollon_lcd_config __initdata = { ...@@ -272,10 +260,19 @@ static struct omap_lcd_config apollon_lcd_config __initdata = {
}; };
static struct omap_board_config_kernel apollon_config[] = { static struct omap_board_config_kernel apollon_config[] = {
{ OMAP_TAG_UART, &apollon_uart_config },
{ OMAP_TAG_LCD, &apollon_lcd_config }, { OMAP_TAG_LCD, &apollon_lcd_config },
}; };
static void __init omap_apollon_init_irq(void)
{
omap_board_config = apollon_config;
omap_board_config_size = ARRAY_SIZE(apollon_config);
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
apollon_init_smc91x();
}
static void __init apollon_led_init(void) static void __init apollon_led_init(void)
{ {
/* LED0 - AA10 */ /* LED0 - AA10 */
...@@ -324,8 +321,6 @@ static void __init omap_apollon_init(void) ...@@ -324,8 +321,6 @@ static void __init omap_apollon_init(void)
* if not needed. * if not needed.
*/ */
platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
omap_board_config = apollon_config;
omap_board_config_size = ARRAY_SIZE(apollon_config);
omap_serial_init(); omap_serial_init();
} }
......
...@@ -31,24 +31,19 @@ ...@@ -31,24 +31,19 @@
#include <mach/board.h> #include <mach/board.h>
#include <mach/common.h> #include <mach/common.h>
static struct omap_board_config_kernel generic_config[] = {
};
static void __init omap_generic_init_irq(void) static void __init omap_generic_init_irq(void)
{ {
omap_board_config = generic_config;
omap_board_config_size = ARRAY_SIZE(generic_config);
omap2_init_common_hw(NULL, NULL); omap2_init_common_hw(NULL, NULL);
omap_init_irq(); omap_init_irq();
} }
static struct omap_uart_config generic_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_board_config_kernel generic_config[] = {
{ OMAP_TAG_UART, &generic_uart_config },
};
static void __init omap_generic_init(void) static void __init omap_generic_init(void)
{ {
omap_board_config = generic_config;
omap_board_config_size = ARRAY_SIZE(generic_config);
omap_serial_init(); omap_serial_init();
} }
......
...@@ -268,18 +268,6 @@ static void __init h4_init_flash(void) ...@@ -268,18 +268,6 @@ static void __init h4_init_flash(void)
h4_flash_resource.end = base + SZ_64M - 1; h4_flash_resource.end = base + SZ_64M - 1;
} }
static void __init omap_h4_init_irq(void)
{
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
h4_init_flash();
}
static struct omap_uart_config h4_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config h4_lcd_config __initdata = { static struct omap_lcd_config h4_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
...@@ -318,10 +306,19 @@ static struct omap_usb_config h4_usb_config __initdata = { ...@@ -318,10 +306,19 @@ static struct omap_usb_config h4_usb_config __initdata = {
}; };
static struct omap_board_config_kernel h4_config[] = { static struct omap_board_config_kernel h4_config[] = {
{ OMAP_TAG_UART, &h4_uart_config },
{ OMAP_TAG_LCD, &h4_lcd_config }, { OMAP_TAG_LCD, &h4_lcd_config },
}; };
static void __init omap_h4_init_irq(void)
{
omap_board_config = h4_config;
omap_board_config_size = ARRAY_SIZE(h4_config);
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
h4_init_flash();
}
static struct at24_platform_data m24c01 = { static struct at24_platform_data m24c01 = {
.byte_len = SZ_1K / 8, .byte_len = SZ_1K / 8,
.page_size = 16, .page_size = 16,
...@@ -366,8 +363,6 @@ static void __init omap_h4_init(void) ...@@ -366,8 +363,6 @@ static void __init omap_h4_init(void)
ARRAY_SIZE(h4_i2c_board_info)); ARRAY_SIZE(h4_i2c_board_info));
platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
omap_board_config = h4_config;
omap_board_config_size = ARRAY_SIZE(h4_config);
omap_usb_init(&h4_usb_config); omap_usb_init(&h4_usb_config);
omap_serial_init(); omap_serial_init();
} }
......
...@@ -268,18 +268,6 @@ static inline void __init ldp_init_smsc911x(void) ...@@ -268,18 +268,6 @@ static inline void __init ldp_init_smsc911x(void)
gpio_direction_input(eth_gpio); gpio_direction_input(eth_gpio);
} }
static void __init omap_ldp_init_irq(void)
{
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
ldp_init_smsc911x();
}
static struct omap_uart_config ldp_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct platform_device ldp_lcd_device = { static struct platform_device ldp_lcd_device = {
.name = "ldp_lcd", .name = "ldp_lcd",
.id = -1, .id = -1,
...@@ -290,10 +278,19 @@ static struct omap_lcd_config ldp_lcd_config __initdata = { ...@@ -290,10 +278,19 @@ static struct omap_lcd_config ldp_lcd_config __initdata = {
}; };
static struct omap_board_config_kernel ldp_config[] __initdata = { static struct omap_board_config_kernel ldp_config[] __initdata = {
{ OMAP_TAG_UART, &ldp_uart_config },
{ OMAP_TAG_LCD, &ldp_lcd_config }, { OMAP_TAG_LCD, &ldp_lcd_config },
}; };
static void __init omap_ldp_init_irq(void)
{
omap_board_config = ldp_config;
omap_board_config_size = ARRAY_SIZE(ldp_config);
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
ldp_init_smsc911x();
}
static struct twl4030_usb_data ldp_usb_data = { static struct twl4030_usb_data ldp_usb_data = {
.usb_mode = T2_USB_MODE_ULPI, .usb_mode = T2_USB_MODE_ULPI,
}; };
...@@ -377,8 +374,6 @@ static void __init omap_ldp_init(void) ...@@ -377,8 +374,6 @@ static void __init omap_ldp_init(void)
{ {
omap_i2c_init(); omap_i2c_init();
platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
omap_board_config = ldp_config;
omap_board_config_size = ARRAY_SIZE(ldp_config);
ts_gpio = 54; ts_gpio = 54;
ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio); ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
spi_register_board_info(ldp_spi_board_info, spi_register_board_info(ldp_spi_board_info,
......
/*
* linux/arch/arm/mach-omap2/board-n8x0.c
*
* Copyright (C) 2005-2009 Nokia Corporation
* Author: Juha Yrjola <juha.yrjola@nokia.com>
*
* Modified from mach-omap2/board-generic.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/clk.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/stddef.h>
#include <linux/spi/spi.h>
#include <linux/usb/musb.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <mach/board.h>
#include <mach/common.h>
#include <mach/irqs.h>
#include <mach/mcspi.h>
#include <mach/onenand.h>
#include <mach/serial.h>
static struct omap2_mcspi_device_config p54spi_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1,
};
static struct spi_board_info n800_spi_board_info[] __initdata = {
{
.modalias = "p54spi",
.bus_num = 2,
.chip_select = 0,
.max_speed_hz = 48000000,
.controller_data = &p54spi_mcspi_config,
},
};
#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
static struct mtd_partition onenand_partitions[] = {
{
.name = "bootloader",
.offset = 0,
.size = 0x20000,
.mask_flags = MTD_WRITEABLE, /* Force read-only */
},
{
.name = "config",
.offset = MTDPART_OFS_APPEND,
.size = 0x60000,
},
{
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = 0x200000,
},
{
.name = "initfs",
.offset = MTDPART_OFS_APPEND,
.size = 0x400000,
},
{
.name = "rootfs",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};
static struct omap_onenand_platform_data board_onenand_data = {
.cs = 0,
.gpio_irq = 26,
.parts = onenand_partitions,
.nr_parts = ARRAY_SIZE(onenand_partitions),
.flags = ONENAND_SYNC_READ,
};
static void __init n8x0_onenand_init(void)
{
gpmc_onenand_init(&board_onenand_data);
}
#else
static void __init n8x0_onenand_init(void) {}
#endif
static void __init n8x0_map_io(void)
{
omap2_set_globals_242x();
omap2_map_common_io();
}
static void __init n8x0_init_irq(void)
{
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
}
static void __init n8x0_init_machine(void)
{
/* FIXME: add n810 spi devices */
spi_register_board_info(n800_spi_board_info,
ARRAY_SIZE(n800_spi_board_info));
omap_serial_init();
n8x0_onenand_init();
}
MACHINE_START(NOKIA_N800, "Nokia N800")
.phys_io = 0x48000000,
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
.boot_params = 0x80000100,
.map_io = n8x0_map_io,
.init_irq = n8x0_init_irq,
.init_machine = n8x0_init_machine,
.timer = &omap_timer,
MACHINE_END
MACHINE_START(NOKIA_N810, "Nokia N810")
.phys_io = 0x48000000,
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
.boot_params = 0x80000100,
.map_io = n8x0_map_io,
.init_irq = n8x0_init_irq,
.init_machine = n8x0_init_machine,
.timer = &omap_timer,
MACHINE_END
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
.phys_io = 0x48000000,
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
.boot_params = 0x80000100,
.map_io = n8x0_map_io,
.init_irq = n8x0_init_irq,
.init_machine = n8x0_init_machine,
.timer = &omap_timer,
MACHINE_END
...@@ -108,10 +108,6 @@ static struct platform_device omap3beagle_nand_device = { ...@@ -108,10 +108,6 @@ static struct platform_device omap3beagle_nand_device = {
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
static struct omap_uart_config omap3_beagle_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct twl4030_hsmmc_info mmc[] = { static struct twl4030_hsmmc_info mmc[] = {
{ {
.mmc = 1, .mmc = 1,
...@@ -249,11 +245,16 @@ static struct regulator_init_data beagle_vpll2 = { ...@@ -249,11 +245,16 @@ static struct regulator_init_data beagle_vpll2 = {
.consumer_supplies = &beagle_vdvi_supply, .consumer_supplies = &beagle_vdvi_supply,
}; };
static struct twl4030_usb_data beagle_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_platform_data beagle_twldata = { static struct twl4030_platform_data beagle_twldata = {
.irq_base = TWL4030_IRQ_BASE, .irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END, .irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.usb = &beagle_usb_data,
.gpio = &beagle_gpio_data, .gpio = &beagle_gpio_data,
.vmmc1 = &beagle_vmmc1, .vmmc1 = &beagle_vmmc1,
.vsim = &beagle_vsim, .vsim = &beagle_vsim,
...@@ -280,17 +281,6 @@ static int __init omap3_beagle_i2c_init(void) ...@@ -280,17 +281,6 @@ static int __init omap3_beagle_i2c_init(void)
return 0; return 0;
} }
static void __init omap3_beagle_init_irq(void)
{
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_init_irq();
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(12);
#endif
omap_gpio_init();
}
static struct gpio_led gpio_leds[] = { static struct gpio_led gpio_leds[] = {
{ {
.name = "beagleboard::usr0", .name = "beagleboard::usr0",
...@@ -345,10 +335,22 @@ static struct platform_device keys_gpio = { ...@@ -345,10 +335,22 @@ static struct platform_device keys_gpio = {
}; };
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = { static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
{ OMAP_TAG_UART, &omap3_beagle_uart_config },
{ OMAP_TAG_LCD, &omap3_beagle_lcd_config }, { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
}; };
static void __init omap3_beagle_init_irq(void)
{
omap_board_config = omap3_beagle_config;
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_init_irq();
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(12);
#endif
omap_gpio_init();
}
static struct platform_device *omap3_beagle_devices[] __initdata = { static struct platform_device *omap3_beagle_devices[] __initdata = {
&omap3_beagle_lcd_device, &omap3_beagle_lcd_device,
&leds_gpio, &leds_gpio,
...@@ -398,8 +400,6 @@ static void __init omap3_beagle_init(void) ...@@ -398,8 +400,6 @@ static void __init omap3_beagle_init(void)
omap3_beagle_i2c_init(); omap3_beagle_i2c_init();
platform_add_devices(omap3_beagle_devices, platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices)); ARRAY_SIZE(omap3_beagle_devices));
omap_board_config = omap3_beagle_config;
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init(); omap_serial_init();
omap_cfg_reg(J25_34XX_GPIO170); omap_cfg_reg(J25_34XX_GPIO170);
......
...@@ -92,10 +92,6 @@ static inline void __init omap3evm_init_smc911x(void) ...@@ -92,10 +92,6 @@ static inline void __init omap3evm_init_smc911x(void)
gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ); gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
} }
static struct omap_uart_config omap3_evm_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct twl4030_hsmmc_info mmc[] = { static struct twl4030_hsmmc_info mmc[] = {
{ {
.mmc = 1, .mmc = 1,
...@@ -278,19 +274,20 @@ struct spi_board_info omap3evm_spi_board_info[] = { ...@@ -278,19 +274,20 @@ struct spi_board_info omap3evm_spi_board_info[] = {
}, },
}; };
static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
{ OMAP_TAG_LCD, &omap3_evm_lcd_config },
};
static void __init omap3_evm_init_irq(void) static void __init omap3_evm_init_irq(void)
{ {
omap_board_config = omap3_evm_config;
omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL); omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
omap_init_irq(); omap_init_irq();
omap_gpio_init(); omap_gpio_init();
omap3evm_init_smc911x(); omap3evm_init_smc911x();
} }
static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
{ OMAP_TAG_UART, &omap3_evm_uart_config },
{ OMAP_TAG_LCD, &omap3_evm_lcd_config },
};
static struct platform_device *omap3_evm_devices[] __initdata = { static struct platform_device *omap3_evm_devices[] __initdata = {
&omap3_evm_lcd_device, &omap3_evm_lcd_device,
&omap3evm_smc911x_device, &omap3evm_smc911x_device,
...@@ -301,8 +298,6 @@ static void __init omap3_evm_init(void) ...@@ -301,8 +298,6 @@ static void __init omap3_evm_init(void)
omap3_evm_i2c_init(); omap3_evm_i2c_init();
platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices)); platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
omap_board_config = omap3_evm_config;
omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
spi_register_board_info(omap3evm_spi_board_info, spi_register_board_info(omap3evm_spi_board_info,
ARRAY_SIZE(omap3evm_spi_board_info)); ARRAY_SIZE(omap3evm_spi_board_info));
......
...@@ -213,10 +213,6 @@ static struct twl4030_hsmmc_info omap3pandora_mmc[] = { ...@@ -213,10 +213,6 @@ static struct twl4030_hsmmc_info omap3pandora_mmc[] = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct omap_uart_config omap3pandora_uart_config __initdata = {
.enabled_uarts = (1 << 2), /* UART3 */
};
static struct regulator_consumer_supply pandora_vmmc1_supply = { static struct regulator_consumer_supply pandora_vmmc1_supply = {
.supply = "vmmc", .supply = "vmmc",
}; };
...@@ -309,14 +305,6 @@ static int __init omap3pandora_i2c_init(void) ...@@ -309,14 +305,6 @@ static int __init omap3pandora_i2c_init(void)
return 0; return 0;
} }
static void __init omap3pandora_init_irq(void)
{
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_init_irq();
omap_gpio_init();
}
static void __init omap3pandora_ads7846_init(void) static void __init omap3pandora_ads7846_init(void)
{ {
int gpio = OMAP3_PANDORA_TS_GPIO; int gpio = OMAP3_PANDORA_TS_GPIO;
...@@ -376,10 +364,19 @@ static struct omap_lcd_config omap3pandora_lcd_config __initdata = { ...@@ -376,10 +364,19 @@ static struct omap_lcd_config omap3pandora_lcd_config __initdata = {
}; };
static struct omap_board_config_kernel omap3pandora_config[] __initdata = { static struct omap_board_config_kernel omap3pandora_config[] __initdata = {
{ OMAP_TAG_UART, &omap3pandora_uart_config },
{ OMAP_TAG_LCD, &omap3pandora_lcd_config }, { OMAP_TAG_LCD, &omap3pandora_lcd_config },
}; };
static void __init omap3pandora_init_irq(void)
{
omap_board_config = omap3pandora_config;
omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_init_irq();
omap_gpio_init();
}
static struct platform_device *omap3pandora_devices[] __initdata = { static struct platform_device *omap3pandora_devices[] __initdata = {
&omap3pandora_lcd_device, &omap3pandora_lcd_device,
&pandora_leds_gpio, &pandora_leds_gpio,
...@@ -391,8 +388,6 @@ static void __init omap3pandora_init(void) ...@@ -391,8 +388,6 @@ static void __init omap3pandora_init(void)
omap3pandora_i2c_init(); omap3pandora_i2c_init();
platform_add_devices(omap3pandora_devices, platform_add_devices(omap3pandora_devices,
ARRAY_SIZE(omap3pandora_devices)); ARRAY_SIZE(omap3pandora_devices));
omap_board_config = omap3pandora_config;
omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
omap_serial_init(); omap_serial_init();
spi_register_board_info(omap3pandora_spi_board_info, spi_register_board_info(omap3pandora_spi_board_info,
ARRAY_SIZE(omap3pandora_spi_board_info)); ARRAY_SIZE(omap3pandora_spi_board_info));
......
...@@ -271,9 +271,6 @@ static void __init overo_flash_init(void) ...@@ -271,9 +271,6 @@ static void __init overo_flash_init(void)
printk(KERN_ERR "Unable to register NAND device\n"); printk(KERN_ERR "Unable to register NAND device\n");
} }
} }
static struct omap_uart_config overo_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct twl4030_hsmmc_info mmc[] = { static struct twl4030_hsmmc_info mmc[] = {
{ {
...@@ -360,14 +357,6 @@ static int __init overo_i2c_init(void) ...@@ -360,14 +357,6 @@ static int __init overo_i2c_init(void)
return 0; return 0;
} }
static void __init overo_init_irq(void)
{
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_init_irq();
omap_gpio_init();
}
static struct platform_device overo_lcd_device = { static struct platform_device overo_lcd_device = {
.name = "overo_lcd", .name = "overo_lcd",
.id = -1, .id = -1,
...@@ -378,10 +367,19 @@ static struct omap_lcd_config overo_lcd_config __initdata = { ...@@ -378,10 +367,19 @@ static struct omap_lcd_config overo_lcd_config __initdata = {
}; };
static struct omap_board_config_kernel overo_config[] __initdata = { static struct omap_board_config_kernel overo_config[] __initdata = {
{ OMAP_TAG_UART, &overo_uart_config },
{ OMAP_TAG_LCD, &overo_lcd_config }, { OMAP_TAG_LCD, &overo_lcd_config },
}; };
static void __init overo_init_irq(void)
{
omap_board_config = overo_config;
omap_board_config_size = ARRAY_SIZE(overo_config);
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_init_irq();
omap_gpio_init();
}
static struct platform_device *overo_devices[] __initdata = { static struct platform_device *overo_devices[] __initdata = {
&overo_lcd_device, &overo_lcd_device,
}; };
...@@ -390,8 +388,6 @@ static void __init overo_init(void) ...@@ -390,8 +388,6 @@ static void __init overo_init(void)
{ {
overo_i2c_init(); overo_i2c_init();
platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
omap_board_config = overo_config;
omap_board_config_size = ARRAY_SIZE(overo_config);
omap_serial_init(); omap_serial_init();
overo_flash_init(); overo_flash_init();
usb_musb_init(); usb_musb_init();
......
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
#include <mach/gpmc.h> #include <mach/gpmc.h>
#include <mach/usb.h> #include <mach/usb.h>
static struct omap_uart_config rx51_uart_config = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};
static struct omap_lcd_config rx51_lcd_config = { static struct omap_lcd_config rx51_lcd_config = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
...@@ -52,7 +48,6 @@ static struct omap_fbmem_config rx51_fbmem2_config = { ...@@ -52,7 +48,6 @@ static struct omap_fbmem_config rx51_fbmem2_config = {
}; };
static struct omap_board_config_kernel rx51_config[] = { static struct omap_board_config_kernel rx51_config[] = {
{ OMAP_TAG_UART, &rx51_uart_config },
{ OMAP_TAG_FBMEM, &rx51_fbmem0_config }, { OMAP_TAG_FBMEM, &rx51_fbmem0_config },
{ OMAP_TAG_FBMEM, &rx51_fbmem1_config }, { OMAP_TAG_FBMEM, &rx51_fbmem1_config },
{ OMAP_TAG_FBMEM, &rx51_fbmem2_config }, { OMAP_TAG_FBMEM, &rx51_fbmem2_config },
...@@ -61,6 +56,8 @@ static struct omap_board_config_kernel rx51_config[] = { ...@@ -61,6 +56,8 @@ static struct omap_board_config_kernel rx51_config[] = {
static void __init rx51_init_irq(void) static void __init rx51_init_irq(void)
{ {
omap_board_config = rx51_config;
omap_board_config_size = ARRAY_SIZE(rx51_config);
omap2_init_common_hw(NULL, NULL); omap2_init_common_hw(NULL, NULL);
omap_init_irq(); omap_init_irq();
omap_gpio_init(); omap_gpio_init();
...@@ -70,8 +67,6 @@ extern void __init rx51_peripherals_init(void); ...@@ -70,8 +67,6 @@ extern void __init rx51_peripherals_init(void);
static void __init rx51_init(void) static void __init rx51_init(void)
{ {
omap_board_config = rx51_config;
omap_board_config_size = ARRAY_SIZE(rx51_config);
omap_serial_init(); omap_serial_init();
usb_musb_init(); usb_musb_init();
rx51_peripherals_init(); rx51_peripherals_init();
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/interrupt.h>
#include <mach/gpmc.h> #include <mach/gpmc.h>
...@@ -84,6 +85,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -84,6 +85,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.mapbase = 0x10000000, .mapbase = 0x10000000,
.irq = OMAP_GPIO_IRQ(102), .irq = OMAP_GPIO_IRQ(102),
.flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ, .flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
.irqflags = IRQF_SHARED | IRQF_TRIGGER_RISING,
.iotype = UPIO_MEM, .iotype = UPIO_MEM,
.regshift = 1, .regshift = 1,
.uartclk = QUART_CLK, .uartclk = QUART_CLK,
...@@ -94,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -94,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
static struct platform_device zoom2_debugboard_serial_device = { static struct platform_device zoom2_debugboard_serial_device = {
.name = "serial8250", .name = "serial8250",
.id = PLAT8250_DEV_PLATFORM1, .id = 3,
.dev = { .dev = {
.platform_data = serial_platform_data, .platform_data = serial_platform_data,
}, },
...@@ -127,6 +129,7 @@ static inline void __init zoom2_init_quaduart(void) ...@@ -127,6 +129,7 @@ static inline void __init zoom2_init_quaduart(void)
static inline int omap_zoom2_debugboard_detect(void) static inline int omap_zoom2_debugboard_detect(void)
{ {
int debug_board_detect = 0; int debug_board_detect = 0;
int ret = 1;
debug_board_detect = ZOOM2_SMSC911X_GPIO; debug_board_detect = ZOOM2_SMSC911X_GPIO;
...@@ -138,10 +141,10 @@ static inline int omap_zoom2_debugboard_detect(void) ...@@ -138,10 +141,10 @@ static inline int omap_zoom2_debugboard_detect(void)
gpio_direction_input(debug_board_detect); gpio_direction_input(debug_board_detect);
if (!gpio_get_value(debug_board_detect)) { if (!gpio_get_value(debug_board_detect)) {
gpio_free(debug_board_detect); ret = 0;
return 0;
} }
return 1; gpio_free(debug_board_detect);
return ret;
} }
static struct platform_device *zoom2_devices[] __initdata = { static struct platform_device *zoom2_devices[] __initdata = {
......
...@@ -12,36 +12,217 @@ ...@@ -12,36 +12,217 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/i2c/twl4030.h> #include <linux/i2c/twl4030.h>
#include <linux/regulator/machine.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/usb.h> #include <mach/usb.h>
#include <mach/keypad.h>
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
static void __init omap_zoom2_init_irq(void) /* Zoom2 has Qwerty keyboard*/
static int zoom2_twl4030_keymap[] = {
KEY(0, 0, KEY_E),
KEY(1, 0, KEY_R),
KEY(2, 0, KEY_T),
KEY(3, 0, KEY_HOME),
KEY(6, 0, KEY_I),
KEY(7, 0, KEY_LEFTSHIFT),
KEY(0, 1, KEY_D),
KEY(1, 1, KEY_F),
KEY(2, 1, KEY_G),
KEY(3, 1, KEY_SEND),
KEY(6, 1, KEY_K),
KEY(7, 1, KEY_ENTER),
KEY(0, 2, KEY_X),
KEY(1, 2, KEY_C),
KEY(2, 2, KEY_V),
KEY(3, 2, KEY_END),
KEY(6, 2, KEY_DOT),
KEY(7, 2, KEY_CAPSLOCK),
KEY(0, 3, KEY_Z),
KEY(1, 3, KEY_KPPLUS),
KEY(2, 3, KEY_B),
KEY(3, 3, KEY_F1),
KEY(6, 3, KEY_O),
KEY(7, 3, KEY_SPACE),
KEY(0, 4, KEY_W),
KEY(1, 4, KEY_Y),
KEY(2, 4, KEY_U),
KEY(3, 4, KEY_F2),
KEY(4, 4, KEY_VOLUMEUP),
KEY(6, 4, KEY_L),
KEY(7, 4, KEY_LEFT),
KEY(0, 5, KEY_S),
KEY(1, 5, KEY_H),
KEY(2, 5, KEY_J),
KEY(3, 5, KEY_F3),
KEY(5, 5, KEY_VOLUMEDOWN),
KEY(6, 5, KEY_M),
KEY(4, 5, KEY_ENTER),
KEY(7, 5, KEY_RIGHT),
KEY(0, 6, KEY_Q),
KEY(1, 6, KEY_A),
KEY(2, 6, KEY_N),
KEY(3, 6, KEY_BACKSPACE),
KEY(6, 6, KEY_P),
KEY(7, 6, KEY_UP),
KEY(6, 7, KEY_SELECT),
KEY(7, 7, KEY_DOWN),
KEY(0, 7, KEY_PROG1), /*MACRO 1 <User defined> */
KEY(1, 7, KEY_PROG2), /*MACRO 2 <User defined> */
KEY(2, 7, KEY_PROG3), /*MACRO 3 <User defined> */
KEY(3, 7, KEY_PROG4), /*MACRO 4 <User defined> */
0
};
static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
.rows = 8,
.cols = 8,
.keymap = zoom2_twl4030_keymap,
.keymapsize = ARRAY_SIZE(zoom2_twl4030_keymap),
.rep = 1,
};
static struct omap_board_config_kernel zoom2_config[] __initdata = {
};
static struct regulator_consumer_supply zoom2_vmmc1_supply = {
.supply = "vmmc",
};
static struct regulator_consumer_supply zoom2_vsim_supply = {
.supply = "vmmc_aux",
};
static struct regulator_consumer_supply zoom2_vmmc2_supply = {
.supply = "vmmc",
};
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
static struct regulator_init_data zoom2_vmmc1 = {
.constraints = {
.min_uV = 1850000,
.max_uV = 3150000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &zoom2_vmmc1_supply,
};
/* VMMC2 for MMC2 card */
static struct regulator_init_data zoom2_vmmc2 = {
.constraints = {
.min_uV = 1850000,
.max_uV = 1850000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &zoom2_vmmc2_supply,
};
/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
static struct regulator_init_data zoom2_vsim = {
.constraints = {
.min_uV = 1800000,
.max_uV = 3000000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &zoom2_vsim_supply,
};
static struct twl4030_hsmmc_info mmc[] __initdata = {
{
.mmc = 1,
.wires = 4,
.gpio_wp = -EINVAL,
},
{
.mmc = 2,
.wires = 4,
.gpio_wp = -EINVAL,
},
{} /* Terminator */
};
static int zoom2_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{ {
omap2_init_common_hw(NULL, NULL); /* gpio + 0 is "mmc0_cd" (input/IRQ),
omap_init_irq(); * gpio + 1 is "mmc1_cd" (input/IRQ)
omap_gpio_init(); */
mmc[0].gpio_cd = gpio + 0;
mmc[1].gpio_cd = gpio + 1;
twl4030_mmc_init(mmc);
/* link regulators to MMC adapters ... we "know" the
* regulators will be set up only *after* we return.
*/
zoom2_vmmc1_supply.dev = mmc[0].dev;
zoom2_vsim_supply.dev = mmc[0].dev;
zoom2_vmmc2_supply.dev = mmc[1].dev;
return 0;
} }
static struct omap_uart_config zoom2_uart_config __initdata = {
.enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), static int zoom2_batt_table[] = {
/* 0 C*/
30800, 29500, 28300, 27100,
26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
4040, 3910, 3790, 3670, 3550
}; };
static struct omap_board_config_kernel zoom2_config[] __initdata = { static struct twl4030_bci_platform_data zoom2_bci_data = {
{ OMAP_TAG_UART, &zoom2_uart_config }, .battery_tmp_tbl = zoom2_batt_table,
.tblsize = ARRAY_SIZE(zoom2_batt_table),
};
static struct twl4030_usb_data zoom2_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
}; };
static void __init omap_zoom2_init_irq(void)
{
omap_board_config = zoom2_config;
omap_board_config_size = ARRAY_SIZE(zoom2_config);
omap2_init_common_hw(NULL, NULL);
omap_init_irq();
omap_gpio_init();
}
static struct twl4030_gpio_platform_data zoom2_gpio_data = { static struct twl4030_gpio_platform_data zoom2_gpio_data = {
.gpio_base = OMAP_MAX_GPIO_LINES, .gpio_base = OMAP_MAX_GPIO_LINES,
.irq_base = TWL4030_GPIO_IRQ_BASE, .irq_base = TWL4030_GPIO_IRQ_BASE,
.irq_end = TWL4030_GPIO_IRQ_END, .irq_end = TWL4030_GPIO_IRQ_END,
.setup = zoom2_twl_gpio_setup,
};
static struct twl4030_madc_platform_data zoom2_madc_data = {
.irq_line = 1,
}; };
static struct twl4030_platform_data zoom2_twldata = { static struct twl4030_platform_data zoom2_twldata = {
...@@ -49,7 +230,15 @@ static struct twl4030_platform_data zoom2_twldata = { ...@@ -49,7 +230,15 @@ static struct twl4030_platform_data zoom2_twldata = {
.irq_end = TWL4030_IRQ_END, .irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.bci = &zoom2_bci_data,
.madc = &zoom2_madc_data,
.usb = &zoom2_usb_data,
.gpio = &zoom2_gpio_data, .gpio = &zoom2_gpio_data,
.keypad = &zoom2_kp_twl4030_data,
.vmmc1 = &zoom2_vmmc1,
.vmmc2 = &zoom2_vmmc2,
.vsim = &zoom2_vsim,
}; };
static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
...@@ -70,26 +259,13 @@ static int __init omap_i2c_init(void) ...@@ -70,26 +259,13 @@ static int __init omap_i2c_init(void)
return 0; return 0;
} }
static struct twl4030_hsmmc_info mmc[] __initdata = {
{
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
.gpio_wp = -EINVAL,
},
{} /* Terminator */
};
extern int __init omap_zoom2_debugboard_init(void); extern int __init omap_zoom2_debugboard_init(void);
static void __init omap_zoom2_init(void) static void __init omap_zoom2_init(void)
{ {
omap_i2c_init(); omap_i2c_init();
omap_board_config = zoom2_config;
omap_board_config_size = ARRAY_SIZE(zoom2_config);
omap_serial_init(); omap_serial_init();
omap_zoom2_debugboard_init(); omap_zoom2_debugboard_init();
twl4030_mmc_init(mmc);
usb_musb_init(); usb_musb_init();
} }
......
...@@ -1043,5 +1043,7 @@ void omap2_clk_disable_unused(struct clk *clk) ...@@ -1043,5 +1043,7 @@ void omap2_clk_disable_unused(struct clk *clk)
omap2_clk_disable(clk); omap2_clk_disable(clk);
} else } else
_omap2_clk_disable(clk); _omap2_clk_disable(clk);
if (clk->clkdm != NULL)
pwrdm_clkdm_state_switch(clk->clkdm);
} }
#endif #endif
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/limits.h> #include <linux/limits.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <mach/cpu.h>
#include <mach/clock.h> #include <mach/clock.h>
#include <mach/sram.h> #include <mach/sram.h>
#include <asm/div64.h> #include <asm/div64.h>
...@@ -1067,17 +1068,17 @@ static int __init omap2_clk_arch_init(void) ...@@ -1067,17 +1068,17 @@ static int __init omap2_clk_arch_init(void)
return -EINVAL; return -EINVAL;
/* REVISIT: not yet ready for 343x */ /* REVISIT: not yet ready for 343x */
#if 0 if (clk_set_rate(&dpll1_ck, mpurate))
if (clk_set_rate(&virt_prcm_set, mpurate)) printk(KERN_ERR "*** Unable to set MPU rate\n");
printk(KERN_ERR "Could not find matching MPU rate\n");
#endif
recalculate_root_clocks(); recalculate_root_clocks();
printk(KERN_INFO "Switched to new clocking rate (Crystal/DPLL3/MPU): " printk(KERN_INFO "Switched to new clocking rate (Crystal/Core/MPU): "
"%ld.%01ld/%ld/%ld MHz\n", "%ld.%01ld/%ld/%ld MHz\n",
(osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10, (osc_sys_ck.rate / 1000000), ((osc_sys_ck.rate / 100000) % 10),
(core_ck.rate / 1000000), (dpll1_fck.rate / 1000000)) ; (core_ck.rate / 1000000), (arm_fck.rate / 1000000)) ;
calibrate_delay();
return 0; return 0;
} }
...@@ -1136,7 +1137,7 @@ int __init omap2_clk_init(void) ...@@ -1136,7 +1137,7 @@ int __init omap2_clk_init(void)
recalculate_root_clocks(); recalculate_root_clocks();
printk(KERN_INFO "Clocking rate (Crystal/DPLL/ARM core): " printk(KERN_INFO "Clocking rate (Crystal/Core/MPU): "
"%ld.%01ld/%ld/%ld MHz\n", "%ld.%01ld/%ld/%ld MHz\n",
(osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10, (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
(core_ck.rate / 1000000), (arm_fck.rate / 1000000)); (core_ck.rate / 1000000), (arm_fck.rate / 1000000));
......
...@@ -1020,6 +1020,7 @@ static struct clk arm_fck = { ...@@ -1020,6 +1020,7 @@ static struct clk arm_fck = {
.clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL), .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
.clksel_mask = OMAP3430_ST_MPU_CLK_MASK, .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
.clksel = arm_fck_clksel, .clksel = arm_fck_clksel,
.clkdm_name = "mpu_clkdm",
.recalc = &omap2_clksel_recalc, .recalc = &omap2_clksel_recalc,
}; };
...@@ -1155,7 +1156,6 @@ static struct clk gfx_cg1_ck = { ...@@ -1155,7 +1156,6 @@ static struct clk gfx_cg1_ck = {
.name = "gfx_cg1_ck", .name = "gfx_cg1_ck",
.ops = &clkops_omap2_dflt_wait, .ops = &clkops_omap2_dflt_wait,
.parent = &gfx_l3_fck, /* REVISIT: correct? */ .parent = &gfx_l3_fck, /* REVISIT: correct? */
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
.enable_bit = OMAP3430ES1_EN_2D_SHIFT, .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
.clkdm_name = "gfx_3430es1_clkdm", .clkdm_name = "gfx_3430es1_clkdm",
...@@ -1166,7 +1166,6 @@ static struct clk gfx_cg2_ck = { ...@@ -1166,7 +1166,6 @@ static struct clk gfx_cg2_ck = {
.name = "gfx_cg2_ck", .name = "gfx_cg2_ck",
.ops = &clkops_omap2_dflt_wait, .ops = &clkops_omap2_dflt_wait,
.parent = &gfx_l3_fck, /* REVISIT: correct? */ .parent = &gfx_l3_fck, /* REVISIT: correct? */
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
.enable_bit = OMAP3430ES1_EN_3D_SHIFT, .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
.clkdm_name = "gfx_3430es1_clkdm", .clkdm_name = "gfx_3430es1_clkdm",
...@@ -1210,7 +1209,6 @@ static struct clk sgx_ick = { ...@@ -1210,7 +1209,6 @@ static struct clk sgx_ick = {
.name = "sgx_ick", .name = "sgx_ick",
.ops = &clkops_omap2_dflt_wait, .ops = &clkops_omap2_dflt_wait,
.parent = &l3_ick, .parent = &l3_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
.enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT, .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
.clkdm_name = "sgx_clkdm", .clkdm_name = "sgx_clkdm",
...@@ -1223,7 +1221,6 @@ static struct clk d2d_26m_fck = { ...@@ -1223,7 +1221,6 @@ static struct clk d2d_26m_fck = {
.name = "d2d_26m_fck", .name = "d2d_26m_fck",
.ops = &clkops_omap2_dflt_wait, .ops = &clkops_omap2_dflt_wait,
.parent = &sys_ck, .parent = &sys_ck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430ES1_EN_D2D_SHIFT, .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
.clkdm_name = "d2d_clkdm", .clkdm_name = "d2d_clkdm",
...@@ -1234,7 +1231,6 @@ static struct clk modem_fck = { ...@@ -1234,7 +1231,6 @@ static struct clk modem_fck = {
.name = "modem_fck", .name = "modem_fck",
.ops = &clkops_omap2_dflt_wait, .ops = &clkops_omap2_dflt_wait,
.parent = &sys_ck, .parent = &sys_ck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MODEM_SHIFT, .enable_bit = OMAP3430_EN_MODEM_SHIFT,
.clkdm_name = "d2d_clkdm", .clkdm_name = "d2d_clkdm",
...@@ -1622,7 +1618,6 @@ static struct clk core_l3_ick = { ...@@ -1622,7 +1618,6 @@ static struct clk core_l3_ick = {
.name = "core_l3_ick", .name = "core_l3_ick",
.ops = &clkops_null, .ops = &clkops_null,
.parent = &l3_ick, .parent = &l3_ick,
.init = &omap2_init_clk_clkdm,
.clkdm_name = "core_l3_clkdm", .clkdm_name = "core_l3_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
}; };
...@@ -1691,7 +1686,6 @@ static struct clk core_l4_ick = { ...@@ -1691,7 +1686,6 @@ static struct clk core_l4_ick = {
.name = "core_l4_ick", .name = "core_l4_ick",
.ops = &clkops_null, .ops = &clkops_null,
.parent = &l4_ick, .parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.clkdm_name = "core_l4_clkdm", .clkdm_name = "core_l4_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
}; };
...@@ -2089,7 +2083,6 @@ static struct clk dss_tv_fck = { ...@@ -2089,7 +2083,6 @@ static struct clk dss_tv_fck = {
.name = "dss_tv_fck", .name = "dss_tv_fck",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &omap_54m_fck, .parent = &omap_54m_fck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_TV_SHIFT, .enable_bit = OMAP3430_EN_TV_SHIFT,
.clkdm_name = "dss_clkdm", .clkdm_name = "dss_clkdm",
...@@ -2100,7 +2093,6 @@ static struct clk dss_96m_fck = { ...@@ -2100,7 +2093,6 @@ static struct clk dss_96m_fck = {
.name = "dss_96m_fck", .name = "dss_96m_fck",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &omap_96m_fck, .parent = &omap_96m_fck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_TV_SHIFT, .enable_bit = OMAP3430_EN_TV_SHIFT,
.clkdm_name = "dss_clkdm", .clkdm_name = "dss_clkdm",
...@@ -2111,7 +2103,6 @@ static struct clk dss2_alwon_fck = { ...@@ -2111,7 +2103,6 @@ static struct clk dss2_alwon_fck = {
.name = "dss2_alwon_fck", .name = "dss2_alwon_fck",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &sys_ck, .parent = &sys_ck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_DSS2_SHIFT, .enable_bit = OMAP3430_EN_DSS2_SHIFT,
.clkdm_name = "dss_clkdm", .clkdm_name = "dss_clkdm",
...@@ -2123,7 +2114,6 @@ static struct clk dss_ick_3430es1 = { ...@@ -2123,7 +2114,6 @@ static struct clk dss_ick_3430es1 = {
.name = "dss_ick", .name = "dss_ick",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &l4_ick, .parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
.enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
.clkdm_name = "dss_clkdm", .clkdm_name = "dss_clkdm",
...@@ -2135,7 +2125,6 @@ static struct clk dss_ick_3430es2 = { ...@@ -2135,7 +2125,6 @@ static struct clk dss_ick_3430es2 = {
.name = "dss_ick", .name = "dss_ick",
.ops = &clkops_omap3430es2_dss_usbhost_wait, .ops = &clkops_omap3430es2_dss_usbhost_wait,
.parent = &l4_ick, .parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
.enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
.clkdm_name = "dss_clkdm", .clkdm_name = "dss_clkdm",
...@@ -2159,7 +2148,6 @@ static struct clk cam_ick = { ...@@ -2159,7 +2148,6 @@ static struct clk cam_ick = {
.name = "cam_ick", .name = "cam_ick",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &l4_ick, .parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
.enable_bit = OMAP3430_EN_CAM_SHIFT, .enable_bit = OMAP3430_EN_CAM_SHIFT,
.clkdm_name = "cam_clkdm", .clkdm_name = "cam_clkdm",
...@@ -2170,7 +2158,6 @@ static struct clk csi2_96m_fck = { ...@@ -2170,7 +2158,6 @@ static struct clk csi2_96m_fck = {
.name = "csi2_96m_fck", .name = "csi2_96m_fck",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &core_96m_fck, .parent = &core_96m_fck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_CSI2_SHIFT, .enable_bit = OMAP3430_EN_CSI2_SHIFT,
.clkdm_name = "cam_clkdm", .clkdm_name = "cam_clkdm",
...@@ -2183,7 +2170,6 @@ static struct clk usbhost_120m_fck = { ...@@ -2183,7 +2170,6 @@ static struct clk usbhost_120m_fck = {
.name = "usbhost_120m_fck", .name = "usbhost_120m_fck",
.ops = &clkops_omap2_dflt, .ops = &clkops_omap2_dflt,
.parent = &dpll5_m2_ck, .parent = &dpll5_m2_ck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
.enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT, .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
.clkdm_name = "usbhost_clkdm", .clkdm_name = "usbhost_clkdm",
...@@ -2194,7 +2180,6 @@ static struct clk usbhost_48m_fck = { ...@@ -2194,7 +2180,6 @@ static struct clk usbhost_48m_fck = {
.name = "usbhost_48m_fck", .name = "usbhost_48m_fck",
.ops = &clkops_omap3430es2_dss_usbhost_wait, .ops = &clkops_omap3430es2_dss_usbhost_wait,
.parent = &omap_48m_fck, .parent = &omap_48m_fck,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
.enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT, .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
.clkdm_name = "usbhost_clkdm", .clkdm_name = "usbhost_clkdm",
...@@ -2206,7 +2191,6 @@ static struct clk usbhost_ick = { ...@@ -2206,7 +2191,6 @@ static struct clk usbhost_ick = {
.name = "usbhost_ick", .name = "usbhost_ick",
.ops = &clkops_omap3430es2_dss_usbhost_wait, .ops = &clkops_omap3430es2_dss_usbhost_wait,
.parent = &l4_ick, .parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN), .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
.enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT, .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
.clkdm_name = "usbhost_clkdm", .clkdm_name = "usbhost_clkdm",
...@@ -2268,7 +2252,6 @@ static struct clk gpt1_fck = { ...@@ -2268,7 +2252,6 @@ static struct clk gpt1_fck = {
static struct clk wkup_32k_fck = { static struct clk wkup_32k_fck = {
.name = "wkup_32k_fck", .name = "wkup_32k_fck",
.ops = &clkops_null, .ops = &clkops_null,
.init = &omap2_init_clk_clkdm,
.parent = &omap_32k_fck, .parent = &omap_32k_fck,
.clkdm_name = "wkup_clkdm", .clkdm_name = "wkup_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
...@@ -2383,7 +2366,6 @@ static struct clk per_96m_fck = { ...@@ -2383,7 +2366,6 @@ static struct clk per_96m_fck = {
.name = "per_96m_fck", .name = "per_96m_fck",
.ops = &clkops_null, .ops = &clkops_null,
.parent = &omap_96m_alwon_fck, .parent = &omap_96m_alwon_fck,
.init = &omap2_init_clk_clkdm,
.clkdm_name = "per_clkdm", .clkdm_name = "per_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
}; };
...@@ -2392,7 +2374,6 @@ static struct clk per_48m_fck = { ...@@ -2392,7 +2374,6 @@ static struct clk per_48m_fck = {
.name = "per_48m_fck", .name = "per_48m_fck",
.ops = &clkops_null, .ops = &clkops_null,
.parent = &omap_48m_fck, .parent = &omap_48m_fck,
.init = &omap2_init_clk_clkdm,
.clkdm_name = "per_clkdm", .clkdm_name = "per_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
}; };
......
...@@ -299,7 +299,8 @@ struct clockdomain *clkdm_lookup(const char *name) ...@@ -299,7 +299,8 @@ struct clockdomain *clkdm_lookup(const char *name)
* anything else to indicate failure; or -EINVAL if the function pointer * anything else to indicate failure; or -EINVAL if the function pointer
* is null. * is null.
*/ */
int clkdm_for_each(int (*fn)(struct clockdomain *clkdm)) int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
void *user)
{ {
struct clockdomain *clkdm; struct clockdomain *clkdm;
int ret = 0; int ret = 0;
...@@ -309,7 +310,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm)) ...@@ -309,7 +310,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm))
mutex_lock(&clkdm_mutex); mutex_lock(&clkdm_mutex);
list_for_each_entry(clkdm, &clkdm_list, node) { list_for_each_entry(clkdm, &clkdm_list, node) {
ret = (*fn)(clkdm); ret = (*fn)(clkdm, user);
if (ret) if (ret)
break; break;
} }
...@@ -484,6 +485,8 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm) ...@@ -484,6 +485,8 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm)
v << __ffs(clkdm->clktrctrl_mask), v << __ffs(clkdm->clktrctrl_mask),
clkdm->pwrdm.ptr->prcm_offs, clkdm->pwrdm.ptr->prcm_offs,
CM_CLKSTCTRL); CM_CLKSTCTRL);
pwrdm_clkdm_state_switch(clkdm);
} }
/** /**
...@@ -572,6 +575,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) ...@@ -572,6 +575,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
omap2_clkdm_wakeup(clkdm); omap2_clkdm_wakeup(clkdm);
pwrdm_wait_transition(clkdm->pwrdm.ptr); pwrdm_wait_transition(clkdm->pwrdm.ptr);
pwrdm_clkdm_state_switch(clkdm);
return 0; return 0;
} }
...@@ -624,6 +628,8 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) ...@@ -624,6 +628,8 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
else else
omap2_clkdm_sleep(clkdm); omap2_clkdm_sleep(clkdm);
pwrdm_clkdm_state_switch(clkdm);
return 0; return 0;
} }
/*
* OMAP2/3 CM module functions
*
* Copyright (C) 2009 Nokia Corporation
* Paul Walmsley
*
* 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/module.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include <asm/atomic.h>
#include "cm.h"
#include "cm-regbits-24xx.h"
#include "cm-regbits-34xx.h"
/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
#define MAX_MODULE_READY_TIME 20000
static const u8 cm_idlest_offs[] = {
CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3
};
/**
* omap2_cm_wait_idlest_ready - wait for a module to leave idle or standby
* @prcm_mod: PRCM module offset
* @idlest_id: CM_IDLESTx register ID (i.e., x = 1, 2, 3)
* @idlest_shift: shift of the bit in the CM_IDLEST* register to check
*
* XXX document
*/
int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
{
int ena = 0, i = 0;
u8 cm_idlest_reg;
u32 mask;
if (!idlest_id || (idlest_id > ARRAY_SIZE(cm_idlest_offs)))
return -EINVAL;
cm_idlest_reg = cm_idlest_offs[idlest_id - 1];
if (cpu_is_omap24xx())
ena = idlest_shift;
else if (cpu_is_omap34xx())
ena = 0;
else
BUG();
mask = 1 << idlest_shift;
/* XXX should be OMAP2 CM */
while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) != ena) &&
(i++ < MAX_MODULE_READY_TIME))
udelay(1);
return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
}
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#include "prcm-common.h" #include "prcm-common.h"
#define OMAP2420_CM_REGADDR(module, reg) \ #define OMAP2420_CM_REGADDR(module, reg) \
IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) OMAP2_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
#define OMAP2430_CM_REGADDR(module, reg) \ #define OMAP2430_CM_REGADDR(module, reg) \
IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) OMAP2_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
#define OMAP34XX_CM_REGADDR(module, reg) \ #define OMAP34XX_CM_REGADDR(module, reg) \
IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) OMAP2_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
/* /*
* Architecture-specific global CM registers * Architecture-specific global CM registers
...@@ -98,6 +98,10 @@ extern u32 cm_read_mod_reg(s16 module, u16 idx); ...@@ -98,6 +98,10 @@ extern u32 cm_read_mod_reg(s16 module, u16 idx);
extern void cm_write_mod_reg(u32 val, s16 module, u16 idx); extern void cm_write_mod_reg(u32 val, s16 module, u16 idx);
extern u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx); extern u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx);
extern int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id,
u8 idlest_shift);
extern int omap4_cm_wait_module_ready(u32 prcm_mod, u8 prcm_dev_offs);
static inline u32 cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) static inline u32 cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx)
{ {
return cm_rmw_mod_reg_bits(bits, bits, module, idx); return cm_rmw_mod_reg_bits(bits, bits, module, idx);
......
/*
* OMAP4 CM module functions
*
* Copyright (C) 2009 Nokia Corporation
* Paul Walmsley
*
* 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/module.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include <asm/atomic.h>
#include "cm.h"
#include "cm-regbits-4xxx.h"
/* XXX move this to cm.h */
/* MAX_MODULE_READY_TIME: max milliseconds for module to leave idle */
#define MAX_MODULE_READY_TIME 20000
/*
* OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK: isolates the IDLEST field in the
* CM_CLKCTRL register.
*/
#define OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK (0x2 << 16)
/*
* OMAP4 prcm_mod u32 fields contain packed data: the CM ID in bit 16 and
* the PRCM module offset address (from the CM module base) in bits 15-0.
*/
#define OMAP4_PRCM_MOD_CM_ID_SHIFT 16
#define OMAP4_PRCM_MOD_OFFS_MASK 0xffff
/**
* omap4_cm_wait_idlest_ready - wait for a module to leave idle or standby
* @prcm_mod: PRCM module offset (XXX example)
* @prcm_dev_offs: PRCM device offset (e.g. MCASP XXX example)
*
* XXX document
*/
int omap4_cm_wait_idlest_ready(u32 prcm_mod, u8 prcm_dev_offs)
{
int i = 0;
u8 cm_id;
u16 prcm_mod_offs;
u32 mask = OMAP4_PRCM_CM_CLKCTRL_IDLEST_MASK;
cm_id = prcm_mod >> OMAP4_PRCM_MOD_CM_ID_SHIFT;
prcm_mod_offs = prcm_mod & OMAP4_PRCM_MOD_OFFS_MASK;
while (((omap4_cm_read_mod_reg(cm_id, prcm_mod_offs, prcm_dev_offs,
OMAP4_CM_CLKCTRL_DREG) & mask) != 0) &&
(i++ < MAX_MODULE_READY_TIME))
udelay(1);
return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
}
...@@ -513,6 +513,47 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, ...@@ -513,6 +513,47 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
} }
} }
if (cpu_is_omap3430()) {
if (controller_nr == 0) {
omap_cfg_reg(N28_3430_MMC1_CLK);
omap_cfg_reg(M27_3430_MMC1_CMD);
omap_cfg_reg(N27_3430_MMC1_DAT0);
if (mmc_controller->slots[0].wires == 4 ||
mmc_controller->slots[0].wires == 8) {
omap_cfg_reg(N26_3430_MMC1_DAT1);
omap_cfg_reg(N25_3430_MMC1_DAT2);
omap_cfg_reg(P28_3430_MMC1_DAT3);
}
if (mmc_controller->slots[0].wires == 8) {
omap_cfg_reg(P27_3430_MMC1_DAT4);
omap_cfg_reg(P26_3430_MMC1_DAT5);
omap_cfg_reg(R27_3430_MMC1_DAT6);
omap_cfg_reg(R25_3430_MMC1_DAT7);
}
}
if (controller_nr == 1) {
/* MMC2 */
omap_cfg_reg(AE2_3430_MMC2_CLK);
omap_cfg_reg(AG5_3430_MMC2_CMD);
omap_cfg_reg(AH5_3430_MMC2_DAT0);
/*
* For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
* in the board-*.c files
*/
if (mmc_controller->slots[0].wires == 4 ||
mmc_controller->slots[0].wires == 8) {
omap_cfg_reg(AH4_3430_MMC2_DAT1);
omap_cfg_reg(AG4_3430_MMC2_DAT2);
omap_cfg_reg(AF4_3430_MMC2_DAT3);
}
}
/*
* For MMC3 the pins need to be muxed in the board-*.c files
*/
}
} }
void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
......
...@@ -32,17 +32,23 @@ ...@@ -32,17 +32,23 @@
#include <mach/sram.h> #include <mach/sram.h>
#include <mach/sdrc.h> #include <mach/sdrc.h>
#include <mach/gpmc.h> #include <mach/gpmc.h>
#include <mach/serial.h>
#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */ #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */
#include "clock.h" #include "clock.h"
#include <mach/omap-pm.h>
#include <mach/powerdomain.h> #include <mach/powerdomain.h>
#include "powerdomains.h" #include "powerdomains.h"
#include <mach/clockdomain.h> #include <mach/clockdomain.h>
#include "clockdomains.h" #include "clockdomains.h"
#endif #endif
#include <mach/omap_hwmod.h>
#include "omap_hwmod_2420.h"
#include "omap_hwmod_2430.h"
#include "omap_hwmod_34xx.h"
/* /*
* The machine specific code may provide the extra mapping besides the * The machine specific code may provide the extra mapping besides the
* default mapping provided here. * default mapping provided here.
...@@ -279,11 +285,26 @@ static int __init _omap2_init_reprogram_sdrc(void) ...@@ -279,11 +285,26 @@ static int __init _omap2_init_reprogram_sdrc(void)
void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1) struct omap_sdrc_params *sdrc_cs1)
{ {
struct omap_hwmod **hwmods = NULL;
if (cpu_is_omap2420())
hwmods = omap2420_hwmods;
else if (cpu_is_omap2430())
hwmods = omap2430_hwmods;
else if (cpu_is_omap34xx())
hwmods = omap34xx_hwmods;
omap_hwmod_init(hwmods);
omap2_mux_init(); omap2_mux_init();
#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */
/* The OPP tables have to be registered before a clk init */
omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
pwrdm_init(powerdomains_omap); pwrdm_init(powerdomains_omap);
clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps); clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
omap2_clk_init(); omap2_clk_init();
omap_serial_early_init();
omap_hwmod_late_init();
omap_pm_if_init();
omap2_sdrc_init(sdrc_cs0, sdrc_cs1); omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
_omap2_init_reprogram_sdrc(); _omap2_init_reprogram_sdrc();
#endif #endif
......
...@@ -217,10 +217,19 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf) ...@@ -217,10 +217,19 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf)
} }
#define pr_reg(name) \ #define pr_reg(name) \
p += sprintf(p, "%20s: %08x\n", \ do { \
__stringify(name), iommu_read_reg(obj, MMU_##name)); ssize_t bytes; \
const char *str = "%20s: %08x\n"; \
static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf) const int maxcol = 32; \
bytes = snprintf(p, maxcol, str, __stringify(name), \
iommu_read_reg(obj, MMU_##name)); \
p += bytes; \
len -= bytes; \
if (len < maxcol) \
goto out; \
} while (0)
static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len)
{ {
char *p = buf; char *p = buf;
...@@ -242,7 +251,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf) ...@@ -242,7 +251,7 @@ static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf)
pr_reg(READ_CAM); pr_reg(READ_CAM);
pr_reg(READ_RAM); pr_reg(READ_RAM);
pr_reg(EMU_FAULT_AD); pr_reg(EMU_FAULT_AD);
out:
return p - buf; return p - buf;
} }
......
...@@ -492,6 +492,61 @@ MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262, ...@@ -492,6 +492,61 @@ MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264, MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
/* MMC1 */
MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
/* MMC2 */
MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
/* MMC3 */
MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0,
OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4,
OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6,
OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8,
OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
/* SYS_NIRQ T2 INT1 */
MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
OMAP34XX_MUX_MODE0)
}; };
#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)
......
...@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* for us: do so * for us: do so
*/ */
gic_cpu_init(0, IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)); gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
......
This diff is collapsed.
/*
* omap_hwmod_2420.h - hardware modules present on the OMAP2420 chips
*
* Copyright (C) 2009 Nokia Corporation
* Paul Walmsley
*
* 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.
*
* XXX handle crossbar/shared link difference for L3?
*
*/
#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2420_H
#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2420_H
#ifdef CONFIG_ARCH_OMAP2420
#include <mach/omap_hwmod.h>
#include <mach/irqs.h>
#include <mach/cpu.h>
#include <mach/dma.h>
#include "prm-regbits-24xx.h"
static struct omap_hwmod omap2420_mpu_hwmod;
static struct omap_hwmod omap2420_l3_hwmod;
static struct omap_hwmod omap2420_l4_core_hwmod;
/* L3 -> L4_CORE interface */
static struct omap_hwmod_ocp_if omap2420_l3__l4_core = {
.master = &omap2420_l3_hwmod,
.slave = &omap2420_l4_core_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* MPU -> L3 interface */
static struct omap_hwmod_ocp_if omap2420_mpu__l3 = {
.master = &omap2420_mpu_hwmod,
.slave = &omap2420_l3_hwmod,
.user = OCP_USER_MPU,
};
/* Slave interfaces on the L3 interconnect */
static struct omap_hwmod_ocp_if *omap2420_l3_slaves[] = {
&omap2420_mpu__l3,
};
/* Master interfaces on the L3 interconnect */
static struct omap_hwmod_ocp_if *omap2420_l3_masters[] = {
&omap2420_l3__l4_core,
};
/* L3 */
static struct omap_hwmod omap2420_l3_hwmod = {
.name = "l3_hwmod",
.masters = omap2420_l3_masters,
.masters_cnt = ARRAY_SIZE(omap2420_l3_masters),
.slaves = omap2420_l3_slaves,
.slaves_cnt = ARRAY_SIZE(omap2420_l3_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
};
static struct omap_hwmod omap2420_l4_wkup_hwmod;
/* L4_CORE -> L4_WKUP interface */
static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
.master = &omap2420_l4_core_hwmod,
.slave = &omap2420_l4_wkup_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
&omap2420_l3__l4_core,
};
/* Master interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
&omap2420_l4_core__l4_wkup,
};
/* L4 CORE */
static struct omap_hwmod omap2420_l4_core_hwmod = {
.name = "l4_core_hwmod",
.masters = omap2420_l4_core_masters,
.masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
.slaves = omap2420_l4_core_slaves,
.slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
};
/* Slave interfaces on the L4_WKUP interconnect */
static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
&omap2420_l4_core__l4_wkup,
};
/* Master interfaces on the L4_WKUP interconnect */
static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
};
/* L4 WKUP */
static struct omap_hwmod omap2420_l4_wkup_hwmod = {
.name = "l4_wkup_hwmod",
.masters = omap2420_l4_wkup_masters,
.masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
.slaves = omap2420_l4_wkup_slaves,
.slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
};
/* Master interfaces on the MPU device */
static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
&omap2420_mpu__l3,
};
/* MPU */
static struct omap_hwmod omap2420_mpu_hwmod = {
.name = "mpu_hwmod",
.clkdev_dev_id = NULL,
.clkdev_con_id = "mpu_ck",
.masters = omap2420_mpu_masters,
.masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
};
static __initdata struct omap_hwmod *omap2420_hwmods[] = {
&omap2420_l3_hwmod,
&omap2420_l4_core_hwmod,
&omap2420_l4_wkup_hwmod,
&omap2420_mpu_hwmod,
NULL,
};
#else
# define omap2420_hwmods 0
#endif
#endif
/*
* omap_hwmod_2430.h - hardware modules present on the OMAP2430 chips
*
* Copyright (C) 2009 Nokia Corporation
* Paul Walmsley
*
* 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.
*
* XXX handle crossbar/shared link difference for L3?
*
*/
#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2430_H
#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2430_H
#ifdef CONFIG_ARCH_OMAP2430
#include <mach/omap_hwmod.h>
#include <mach/irqs.h>
#include <mach/cpu.h>
#include <mach/dma.h>
#include "prm-regbits-24xx.h"
static struct omap_hwmod omap2430_mpu_hwmod;
static struct omap_hwmod omap2430_l3_hwmod;
static struct omap_hwmod omap2430_l4_core_hwmod;
/* L3 -> L4_CORE interface */
static struct omap_hwmod_ocp_if omap2430_l3__l4_core = {
.master = &omap2430_l3_hwmod,
.slave = &omap2430_l4_core_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* MPU -> L3 interface */
static struct omap_hwmod_ocp_if omap2430_mpu__l3 = {
.master = &omap2430_mpu_hwmod,
.slave = &omap2430_l3_hwmod,
.user = OCP_USER_MPU,
};
/* Slave interfaces on the L3 interconnect */
static struct omap_hwmod_ocp_if *omap2430_l3_slaves[] = {
&omap2430_mpu__l3,
};
/* Master interfaces on the L3 interconnect */
static struct omap_hwmod_ocp_if *omap2430_l3_masters[] = {
&omap2430_l3__l4_core,
};
/* L3 */
static struct omap_hwmod omap2430_l3_hwmod = {
.name = "l3_hwmod",
.masters = omap2430_l3_masters,
.masters_cnt = ARRAY_SIZE(omap2430_l3_masters),
.slaves = omap2430_l3_slaves,
.slaves_cnt = ARRAY_SIZE(omap2430_l3_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
};
static struct omap_hwmod omap2430_l4_wkup_hwmod;
static struct omap_hwmod omap2430_mmc1_hwmod;
static struct omap_hwmod omap2430_mmc2_hwmod;
/* L4_CORE -> L4_WKUP interface */
static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
.master = &omap2430_l4_core_hwmod,
.slave = &omap2430_l4_wkup_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
&omap2430_l3__l4_core,
};
/* Master interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
&omap2430_l4_core__l4_wkup,
};
/* L4 CORE */
static struct omap_hwmod omap2430_l4_core_hwmod = {
.name = "l4_core_hwmod",
.masters = omap2430_l4_core_masters,
.masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
.slaves = omap2430_l4_core_slaves,
.slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
};
/* Slave interfaces on the L4_WKUP interconnect */
static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
&omap2430_l4_core__l4_wkup,
};
/* Master interfaces on the L4_WKUP interconnect */
static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
};
/* L4 WKUP */
static struct omap_hwmod omap2430_l4_wkup_hwmod = {
.name = "l4_wkup_hwmod",
.masters = omap2430_l4_wkup_masters,
.masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
.slaves = omap2430_l4_wkup_slaves,
.slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
};
/* Master interfaces on the MPU device */
static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
&omap2430_mpu__l3,
};
/* MPU */
static struct omap_hwmod omap2430_mpu_hwmod = {
.name = "mpu_hwmod",
.clkdev_dev_id = NULL,
.clkdev_con_id = "mpu_ck",
.masters = omap2430_mpu_masters,
.masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
};
static __initdata struct omap_hwmod *omap2430_hwmods[] = {
&omap2430_l3_hwmod,
&omap2430_l4_core_hwmod,
&omap2430_l4_wkup_hwmod,
&omap2430_mpu_hwmod,
NULL,
};
#else
# define omap2430_hwmods 0
#endif
#endif
/*
* omap_hwmod_34xx.h - hardware modules present on the OMAP34xx chips
*
* Copyright (C) 2009 Nokia Corporation
* Paul Walmsley
*
* 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.
*
*/
#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD34XX_H
#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD34XX_H
#ifdef CONFIG_ARCH_OMAP34XX
#include <mach/omap_hwmod.h>
#include <mach/irqs.h>
#include <mach/cpu.h>
#include <mach/dma.h>
#include "prm-regbits-34xx.h"
static struct omap_hwmod omap34xx_mpu_hwmod;
static struct omap_hwmod omap34xx_l3_hwmod;
static struct omap_hwmod omap34xx_l4_core_hwmod;
static struct omap_hwmod omap34xx_l4_per_hwmod;
/* L3 -> L4_CORE interface */
static struct omap_hwmod_ocp_if omap34xx_l3__l4_core = {
.master = &omap34xx_l3_hwmod,
.slave = &omap34xx_l4_core_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* L3 -> L4_PER interface */
static struct omap_hwmod_ocp_if omap34xx_l3__l4_per = {
.master = &omap34xx_l3_hwmod,
.slave = &omap34xx_l4_per_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* MPU -> L3 interface */
static struct omap_hwmod_ocp_if omap34xx_mpu__l3 = {
.master = &omap34xx_mpu_hwmod,
.slave = &omap34xx_l3_hwmod,
.user = OCP_USER_MPU,
};
/* Slave interfaces on the L3 interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l3_slaves[] = {
&omap34xx_mpu__l3,
};
/* Master interfaces on the L3 interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l3_masters[] = {
&omap34xx_l3__l4_core,
&omap34xx_l3__l4_per,
};
/* L3 */
static struct omap_hwmod omap34xx_l3_hwmod = {
.name = "l3_hwmod",
.masters = omap34xx_l3_masters,
.masters_cnt = ARRAY_SIZE(omap34xx_l3_masters),
.slaves = omap34xx_l3_slaves,
.slaves_cnt = ARRAY_SIZE(omap34xx_l3_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
};
static struct omap_hwmod omap34xx_l4_wkup_hwmod;
/* L4_CORE -> L4_WKUP interface */
static struct omap_hwmod_ocp_if omap34xx_l4_core__l4_wkup = {
.master = &omap34xx_l4_core_hwmod,
.slave = &omap34xx_l4_wkup_hwmod,
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l4_core_slaves[] = {
&omap34xx_l3__l4_core,
};
/* Master interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l4_core_masters[] = {
&omap34xx_l4_core__l4_wkup,
};
/* L4 CORE */
static struct omap_hwmod omap34xx_l4_core_hwmod = {
.name = "l4_core_hwmod",
.masters = omap34xx_l4_core_masters,
.masters_cnt = ARRAY_SIZE(omap34xx_l4_core_masters),
.slaves = omap34xx_l4_core_slaves,
.slaves_cnt = ARRAY_SIZE(omap34xx_l4_core_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
};
/* Slave interfaces on the L4_PER interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l4_per_slaves[] = {
&omap34xx_l3__l4_per,
};
/* Master interfaces on the L4_PER interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l4_per_masters[] = {
};
/* L4 PER */
static struct omap_hwmod omap34xx_l4_per_hwmod = {
.name = "l4_per_hwmod",
.masters = omap34xx_l4_per_masters,
.masters_cnt = ARRAY_SIZE(omap34xx_l4_per_masters),
.slaves = omap34xx_l4_per_slaves,
.slaves_cnt = ARRAY_SIZE(omap34xx_l4_per_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
};
/* Slave interfaces on the L4_WKUP interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l4_wkup_slaves[] = {
&omap34xx_l4_core__l4_wkup,
};
/* Master interfaces on the L4_WKUP interconnect */
static struct omap_hwmod_ocp_if *omap34xx_l4_wkup_masters[] = {
};
/* L4 WKUP */
static struct omap_hwmod omap34xx_l4_wkup_hwmod = {
.name = "l4_wkup_hwmod",
.masters = omap34xx_l4_wkup_masters,
.masters_cnt = ARRAY_SIZE(omap34xx_l4_wkup_masters),
.slaves = omap34xx_l4_wkup_slaves,
.slaves_cnt = ARRAY_SIZE(omap34xx_l4_wkup_slaves),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
};
/* Master interfaces on the MPU device */
static struct omap_hwmod_ocp_if *omap34xx_mpu_masters[] = {
&omap34xx_mpu__l3,
};
/* MPU */
static struct omap_hwmod omap34xx_mpu_hwmod = {
.name = "mpu_hwmod",
.clkdev_dev_id = NULL,
.clkdev_con_id = "arm_fck",
.masters = omap34xx_mpu_masters,
.masters_cnt = ARRAY_SIZE(omap34xx_mpu_masters),
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
};
static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
&omap34xx_l3_hwmod,
&omap34xx_l4_core_hwmod,
&omap34xx_l4_per_hwmod,
&omap34xx_l4_wkup_hwmod,
&omap34xx_mpu_hwmod,
NULL,
};
#else
# define omap34xx_hwmods 0
#endif
#endif
This diff is collapsed.
...@@ -11,12 +11,23 @@ ...@@ -11,12 +11,23 @@
#ifndef __ARCH_ARM_MACH_OMAP2_PM_H #ifndef __ARCH_ARM_MACH_OMAP2_PM_H
#define __ARCH_ARM_MACH_OMAP2_PM_H #define __ARCH_ARM_MACH_OMAP2_PM_H
#include <mach/powerdomain.h>
extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
#ifdef CONFIG_PM_DEBUG #ifdef CONFIG_PM_DEBUG
extern void omap2_pm_dump(int mode, int resume, unsigned int us); extern void omap2_pm_dump(int mode, int resume, unsigned int us);
extern int omap2_pm_debug; extern int omap2_pm_debug;
extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
extern int pm_dbg_regset_save(int reg_set);
extern int pm_dbg_regset_init(int reg_set);
#else #else
#define omap2_pm_dump(mode, resume, us) do {} while (0); #define omap2_pm_dump(mode, resume, us) do {} while (0);
#define omap2_pm_debug 0 #define omap2_pm_debug 0
#define pm_dbg_update_time(pwrdm, prev) do {} while (0);
#define pm_dbg_regset_save(reg_set) do {} while (0);
#define pm_dbg_regset_init(reg_set) do {} while (0);
#endif /* CONFIG_PM_DEBUG */ #endif /* CONFIG_PM_DEBUG */
extern void omap24xx_idle_loop_suspend(void); extern void omap24xx_idle_loop_suspend(void);
......
...@@ -333,7 +333,7 @@ static struct platform_suspend_ops omap_pm_ops = { ...@@ -333,7 +333,7 @@ static struct platform_suspend_ops omap_pm_ops = {
.valid = suspend_valid_only_mem, .valid = suspend_valid_only_mem,
}; };
static int _pm_clkdm_enable_hwsup(struct clockdomain *clkdm) static int _pm_clkdm_enable_hwsup(struct clockdomain *clkdm, void *unused)
{ {
omap2_clkdm_allow_idle(clkdm); omap2_clkdm_allow_idle(clkdm);
return 0; return 0;
...@@ -385,7 +385,7 @@ static void __init prcm_setup_regs(void) ...@@ -385,7 +385,7 @@ static void __init prcm_setup_regs(void)
omap2_clkdm_sleep(gfx_clkdm); omap2_clkdm_sleep(gfx_clkdm);
/* Enable clockdomain hardware-supervised control for all clkdms */ /* Enable clockdomain hardware-supervised control for all clkdms */
clkdm_for_each(_pm_clkdm_enable_hwsup); clkdm_for_each(_pm_clkdm_enable_hwsup, NULL);
/* Enable clock autoidle for all domains */ /* Enable clock autoidle for all domains */
cm_write_mod_reg(OMAP24XX_AUTO_CAM | cm_write_mod_reg(OMAP24XX_AUTO_CAM |
......
This diff is collapsed.
This diff is collapsed.
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#include "prcm-common.h" #include "prcm-common.h"
#define OMAP2420_PRM_REGADDR(module, reg) \ #define OMAP2420_PRM_REGADDR(module, reg) \
IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))
#define OMAP2430_PRM_REGADDR(module, reg) \ #define OMAP2430_PRM_REGADDR(module, reg) \
IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))
#define OMAP34XX_PRM_REGADDR(module, reg) \ #define OMAP34XX_PRM_REGADDR(module, reg) \
IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))
/* /*
* Architecture-specific global PRM registers * Architecture-specific global PRM registers
......
...@@ -48,9 +48,9 @@ static inline u32 sms_read_reg(u16 reg) ...@@ -48,9 +48,9 @@ static inline u32 sms_read_reg(u16 reg)
return __raw_readl(OMAP_SMS_REGADDR(reg)); return __raw_readl(OMAP_SMS_REGADDR(reg));
} }
#else #else
#define OMAP242X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) #define OMAP242X_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE + (reg))
#define OMAP243X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) #define OMAP243X_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE + (reg))
#define OMAP34XX_SDRC_REGADDR(reg) IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) #define OMAP34XX_SDRC_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE + (reg))
#endif /* __ASSEMBLER__ */ #endif /* __ASSEMBLER__ */
#endif #endif
This diff is collapsed.
...@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl: ...@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl:
prcm_mask_val: prcm_mask_val:
.word 0xFFFF3FFC .word 0xFFFF3FFC
omap242x_sdi_timer_32ksynct_cr: omap242x_sdi_timer_32ksynct_cr:
.word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) .word OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
ENTRY(omap242x_sram_ddr_init_sz) ENTRY(omap242x_sram_ddr_init_sz)
.word . - omap242x_sram_ddr_init .word . - omap242x_sram_ddr_init
...@@ -224,7 +224,7 @@ omap242x_srs_prcm_voltctrl: ...@@ -224,7 +224,7 @@ omap242x_srs_prcm_voltctrl:
ddr_prcm_mask_val: ddr_prcm_mask_val:
.word 0xFFFF3FFC .word 0xFFFF3FFC
omap242x_srs_timer_32ksynct: omap242x_srs_timer_32ksynct:
.word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) .word OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
ENTRY(omap242x_sram_reprogram_sdrc_sz) ENTRY(omap242x_sram_reprogram_sdrc_sz)
.word . - omap242x_sram_reprogram_sdrc .word . - omap242x_sram_reprogram_sdrc
......
...@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl: ...@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl:
prcm_mask_val: prcm_mask_val:
.word 0xFFFF3FFC .word 0xFFFF3FFC
omap243x_sdi_timer_32ksynct_cr: omap243x_sdi_timer_32ksynct_cr:
.word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
ENTRY(omap243x_sram_ddr_init_sz) ENTRY(omap243x_sram_ddr_init_sz)
.word . - omap243x_sram_ddr_init .word . - omap243x_sram_ddr_init
...@@ -224,7 +224,7 @@ omap243x_srs_prcm_voltctrl: ...@@ -224,7 +224,7 @@ omap243x_srs_prcm_voltctrl:
ddr_prcm_mask_val: ddr_prcm_mask_val:
.word 0xFFFF3FFC .word 0xFFFF3FFC
omap243x_srs_timer_32ksynct: omap243x_srs_timer_32ksynct:
.word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
ENTRY(omap243x_sram_reprogram_sdrc_sz) ENTRY(omap243x_sram_reprogram_sdrc_sz)
.word . - omap243x_sram_reprogram_sdrc .word . - omap243x_sram_reprogram_sdrc
......
...@@ -231,7 +231,7 @@ static void __init omap2_gp_clocksource_init(void) ...@@ -231,7 +231,7 @@ static void __init omap2_gp_clocksource_init(void)
static void __init omap2_gp_timer_init(void) static void __init omap2_gp_timer_init(void)
{ {
#ifdef CONFIG_LOCAL_TIMERS #ifdef CONFIG_LOCAL_TIMERS
twd_base = IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE); twd_base = OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE);
#endif #endif
omap_dm_timer_init(); omap_dm_timer_init();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -488,7 +488,7 @@ static int __init clk_debugfs_init(void) ...@@ -488,7 +488,7 @@ static int __init clk_debugfs_init(void)
} }
return 0; return 0;
err_out: err_out:
debugfs_remove(clk_debugfs_root); /* REVISIT: Cleanup correctly */ debugfs_remove_recursive(clk_debugfs_root);
return err; return err;
} }
late_initcall(clk_debugfs_init); late_initcall(clk_debugfs_init);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment