Commit 95241450 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc

* 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc: (125 commits)
  ARM: mach-mxs: fix machines' initializers order
  mmc: mxcmmc: explicitly includes mach/hardware.h
  arm/imx: explicitly includes mach/hardware.h in pm-imx27.c
  arm/imx: remove mx27_setup_weimcs() from mx27.h
  arm/imx: explicitly includes mach/hardware.h in mach-kzm_arm11_01.c
  arm/imx: remove mx31_setup_weimcs() from mx31.h
  ARM: tegra: devices.c should include devices.h
  ARM: tegra: cpu-tegra: unexport two functions
  ARM: tegra: cpu-tegra: sparse type fix
  ARM: tegra: dma: staticify some tables and functions
  ARM: tegra: tegra2_clocks: don't export some tables
  ARM: tegra: tegra_powergate_is_powered should be static
  ARM: tegra: tegra_rtc_read_ms should be static
  ARM: tegra: tegra_init_cache should be static
  ARM: tegra: pcie: 0 -> NULL changes
  ARM: tegra: pcie: include board.h
  ARM: tegra: pcie: don't cast __iomem pointers
  ARM: tegra: tegra2_clocks: 0 -> NULL changes
  ARM: tegra: tegra2_clocks: don't cast __iomem pointers
  ARM: tegra: timer: don't cast __iomem pointers
  ...

Fix up trivial conflicts in
  arch/arm/mach-omap2/Makefile,
  arch/arm/mach-u300/{Makefile.boot,core.c}
  arch/arm/plat-{mxc,omap}/devices.c
parents 68e24ba7 3e965b17
...@@ -861,6 +861,7 @@ config ARCH_U300 ...@@ -861,6 +861,7 @@ config ARCH_U300
select HAVE_SCHED_CLOCK select HAVE_SCHED_CLOCK
select HAVE_TCM select HAVE_TCM
select ARM_AMBA select ARM_AMBA
select ARM_PATCH_PHYS_VIRT
select ARM_VIC select ARM_VIC
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
......
...@@ -3,7 +3,6 @@ CONFIG_SYSVIPC=y ...@@ -3,7 +3,6 @@ CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_EXPERT=y CONFIG_EXPERT=y
CONFIG_SLAB=y CONFIG_SLAB=y
CONFIG_MODULES=y CONFIG_MODULES=y
...@@ -13,20 +12,21 @@ CONFIG_MODVERSIONS=y ...@@ -13,20 +12,21 @@ CONFIG_MODVERSIONS=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_MXC=y CONFIG_ARCH_MXC=y
CONFIG_MACH_MX31ADS_WM1133_EV1=y CONFIG_MACH_MX31ADS_WM1133_EV1=y
CONFIG_MACH_MX31LILLY=y
CONFIG_MACH_MX31LITE=y
CONFIG_MACH_PCM037=y CONFIG_MACH_PCM037=y
CONFIG_MACH_PCM037_EET=y CONFIG_MACH_PCM037_EET=y
CONFIG_MACH_MX31LITE=y
CONFIG_MACH_MX31_3DS=y CONFIG_MACH_MX31_3DS=y
CONFIG_MACH_MX31MOBOARD=y CONFIG_MACH_MX31MOBOARD=y
CONFIG_MACH_MX31LILLY=y
CONFIG_MACH_QONG=y CONFIG_MACH_QONG=y
CONFIG_MACH_PCM043=y
CONFIG_MACH_ARMADILLO5X0=y CONFIG_MACH_ARMADILLO5X0=y
CONFIG_MACH_MX35_3DS=y
CONFIG_MACH_KZM_ARM11_01=y CONFIG_MACH_KZM_ARM11_01=y
CONFIG_MACH_PCM043=y
CONFIG_MACH_MX35_3DS=y
CONFIG_MACH_EUKREA_CPUIMX35=y CONFIG_MACH_EUKREA_CPUIMX35=y
CONFIG_MXC_IRQ_PRIOR=y CONFIG_MXC_IRQ_PRIOR=y
CONFIG_MXC_PWM=y CONFIG_MXC_PWM=y
CONFIG_ARM_ERRATA_411920=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
...@@ -35,7 +35,6 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 ...@@ -35,7 +35,6 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off" CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off"
CONFIG_VFP=y CONFIG_VFP=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y CONFIG_PM_DEBUG=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
...@@ -52,7 +51,6 @@ CONFIG_IP_PNP_DHCP=y ...@@ -52,7 +51,6 @@ CONFIG_IP_PNP_DHCP=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_FW_LOADER=m CONFIG_FW_LOADER=m
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
...@@ -62,24 +60,27 @@ CONFIG_MTD_NAND=y ...@@ -62,24 +60,27 @@ CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_MXC=y CONFIG_MTD_NAND_MXC=y
CONFIG_MTD_UBI=y CONFIG_MTD_UBI=y
# CONFIG_BLK_DEV is not set # CONFIG_BLK_DEV is not set
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y CONFIG_EEPROM_AT24=y
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_SMSC_PHY=y CONFIG_SMSC_PHY=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
CONFIG_SMSC911X=y CONFIG_SMSC911X=y
CONFIG_DNET=y CONFIG_DNET=y
CONFIG_FEC=y
# CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set # CONFIG_NETDEV_10000 is not set
# CONFIG_INPUT is not set # CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_IMX=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set # CONFIG_SERIO is not set
# CONFIG_VT is not set # CONFIG_VT is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_8250=m CONFIG_SERIAL_8250=m
CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_IMX=y CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set # CONFIG_HW_RANDOM is not set
CONFIG_I2C=y CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y CONFIG_I2C_CHARDEV=y
...@@ -89,12 +90,15 @@ CONFIG_W1=y ...@@ -89,12 +90,15 @@ CONFIG_W1=y
CONFIG_W1_MASTER_MXC=y CONFIG_W1_MASTER_MXC=y
CONFIG_W1_SLAVE_THERM=y CONFIG_W1_SLAVE_THERM=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_IMX2_WDT=y
CONFIG_MFD_WM8350_I2C=y CONFIG_MFD_WM8350_I2C=y
CONFIG_REGULATOR=y CONFIG_REGULATOR=y
CONFIG_REGULATOR_WM8350=y CONFIG_REGULATOR_WM8350=y
CONFIG_MEDIA_SUPPORT=y CONFIG_MEDIA_SUPPORT=y
CONFIG_VIDEO_DEV=y CONFIG_VIDEO_DEV=y
# CONFIG_VIDEO_ALLOW_V4L1 is not set # CONFIG_RC_CORE is not set
# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
CONFIG_SOC_CAMERA=y CONFIG_SOC_CAMERA=y
CONFIG_SOC_CAMERA_MT9M001=y CONFIG_SOC_CAMERA_MT9M001=y
CONFIG_SOC_CAMERA_MT9M111=y CONFIG_SOC_CAMERA_MT9M111=y
...@@ -105,9 +109,26 @@ CONFIG_SOC_CAMERA_OV772X=y ...@@ -105,9 +109,26 @@ CONFIG_SOC_CAMERA_OV772X=y
CONFIG_VIDEO_MX3=y CONFIG_VIDEO_MX3=y
# CONFIG_RADIO_ADAPTERS is not set # CONFIG_RADIO_ADAPTERS is not set
CONFIG_FB=y CONFIG_FB=y
# CONFIG_USB_SUPPORT is not set CONFIG_SOUND=y
CONFIG_SND=y
# CONFIG_SND_ARM is not set
# CONFIG_SND_SPI is not set
CONFIG_SND_SOC=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_MXC_SOC_WM1133_EV1=y
CONFIG_SND_SOC_PHYCORE_AC97=y
CONFIG_SND_SOC_EUKREA_TLV320=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MXC=y
CONFIG_USB_GADGET=m
CONFIG_USB_FSL_USB2=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_ULPI=y
CONFIG_MMC=y CONFIG_MMC=y
CONFIG_MMC_MXC=y CONFIG_MMC_MXC=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_MXC=y
CONFIG_DMADEVICES=y CONFIG_DMADEVICES=y
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
CONFIG_TMPFS=y CONFIG_TMPFS=y
...@@ -119,6 +140,5 @@ CONFIG_NFS_V4=y ...@@ -119,6 +140,5 @@ CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y CONFIG_ROOT_NFS=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set # CONFIG_ENABLE_MUST_CHECK is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
...@@ -15,7 +15,12 @@ struct dev_archdata { ...@@ -15,7 +15,12 @@ struct dev_archdata {
#endif #endif
}; };
struct omap_device;
struct pdev_archdata { struct pdev_archdata {
#ifdef CONFIG_ARCH_OMAP
struct omap_device *od;
#endif
}; };
#endif #endif
...@@ -136,6 +136,7 @@ static struct edma_soc_info da830_edma_cc0_info = { ...@@ -136,6 +136,7 @@ static struct edma_soc_info da830_edma_cc0_info = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = da8xx_queue_tc_mapping, .queue_tc_mapping = da8xx_queue_tc_mapping,
.queue_priority_mapping = da8xx_queue_priority_mapping, .queue_priority_mapping = da8xx_queue_priority_mapping,
.default_queue = EVENTQ_1,
}; };
static struct edma_soc_info *da830_edma_info[EDMA_MAX_CC] = { static struct edma_soc_info *da830_edma_info[EDMA_MAX_CC] = {
...@@ -151,6 +152,7 @@ static struct edma_soc_info da850_edma_cc_info[] = { ...@@ -151,6 +152,7 @@ static struct edma_soc_info da850_edma_cc_info[] = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = da8xx_queue_tc_mapping, .queue_tc_mapping = da8xx_queue_tc_mapping,
.queue_priority_mapping = da8xx_queue_priority_mapping, .queue_priority_mapping = da8xx_queue_priority_mapping,
.default_queue = EVENTQ_1,
}, },
{ {
.n_channel = 32, .n_channel = 32,
...@@ -160,6 +162,7 @@ static struct edma_soc_info da850_edma_cc_info[] = { ...@@ -160,6 +162,7 @@ static struct edma_soc_info da850_edma_cc_info[] = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = da850_queue_tc_mapping, .queue_tc_mapping = da850_queue_tc_mapping,
.queue_priority_mapping = da850_queue_priority_mapping, .queue_priority_mapping = da850_queue_priority_mapping,
.default_queue = EVENTQ_0,
}, },
}; };
......
...@@ -80,6 +80,7 @@ static struct edma_soc_info edma_cc0_info = { ...@@ -80,6 +80,7 @@ static struct edma_soc_info edma_cc0_info = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = edma_tc_mapping, .queue_tc_mapping = edma_tc_mapping,
.queue_priority_mapping = edma_priority_mapping, .queue_priority_mapping = edma_priority_mapping,
.default_queue = EVENTQ_1,
}; };
static struct edma_soc_info *tnetv107x_edma_info[EDMA_MAX_CC] = { static struct edma_soc_info *tnetv107x_edma_info[EDMA_MAX_CC] = {
......
...@@ -591,6 +591,7 @@ static struct edma_soc_info edma_cc0_info = { ...@@ -591,6 +591,7 @@ static struct edma_soc_info edma_cc0_info = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = queue_tc_mapping, .queue_tc_mapping = queue_tc_mapping,
.queue_priority_mapping = queue_priority_mapping, .queue_priority_mapping = queue_priority_mapping,
.default_queue = EVENTQ_1,
}; };
static struct edma_soc_info *dm355_edma_info[EDMA_MAX_CC] = { static struct edma_soc_info *dm355_edma_info[EDMA_MAX_CC] = {
......
...@@ -514,6 +514,7 @@ static struct edma_soc_info edma_cc0_info = { ...@@ -514,6 +514,7 @@ static struct edma_soc_info edma_cc0_info = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = queue_tc_mapping, .queue_tc_mapping = queue_tc_mapping,
.queue_priority_mapping = queue_priority_mapping, .queue_priority_mapping = queue_priority_mapping,
.default_queue = EVENTQ_1,
}; };
static struct edma_soc_info *dm644x_edma_info[EDMA_MAX_CC] = { static struct edma_soc_info *dm644x_edma_info[EDMA_MAX_CC] = {
......
...@@ -555,6 +555,7 @@ static struct edma_soc_info edma_cc0_info = { ...@@ -555,6 +555,7 @@ static struct edma_soc_info edma_cc0_info = {
.n_cc = 1, .n_cc = 1,
.queue_tc_mapping = dm646x_queue_tc_mapping, .queue_tc_mapping = dm646x_queue_tc_mapping,
.queue_priority_mapping = dm646x_queue_priority_mapping, .queue_priority_mapping = dm646x_queue_priority_mapping,
.default_queue = EVENTQ_1,
}; };
static struct edma_soc_info *dm646x_edma_info[EDMA_MAX_CC] = { static struct edma_soc_info *dm646x_edma_info[EDMA_MAX_CC] = {
......
...@@ -1435,12 +1435,11 @@ static int __init edma_probe(struct platform_device *pdev) ...@@ -1435,12 +1435,11 @@ static int __init edma_probe(struct platform_device *pdev)
goto fail1; goto fail1;
} }
edma_cc[j] = kmalloc(sizeof(struct edma), GFP_KERNEL); edma_cc[j] = kzalloc(sizeof(struct edma), GFP_KERNEL);
if (!edma_cc[j]) { if (!edma_cc[j]) {
status = -ENOMEM; status = -ENOMEM;
goto fail1; goto fail1;
} }
memset(edma_cc[j], 0, sizeof(struct edma));
edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel, edma_cc[j]->num_channels = min_t(unsigned, info[j]->n_channel,
EDMA_MAX_DMACH); EDMA_MAX_DMACH);
...@@ -1450,8 +1449,6 @@ static int __init edma_probe(struct platform_device *pdev) ...@@ -1450,8 +1449,6 @@ static int __init edma_probe(struct platform_device *pdev)
EDMA_MAX_CC); EDMA_MAX_CC);
edma_cc[j]->default_queue = info[j]->default_queue; edma_cc[j]->default_queue = info[j]->default_queue;
if (!edma_cc[j]->default_queue)
edma_cc[j]->default_queue = EVENTQ_1;
dev_dbg(&pdev->dev, "DMA REG BASE ADDR=%p\n", dev_dbg(&pdev->dev, "DMA REG BASE ADDR=%p\n",
edmacc_regs_base[j]); edmacc_regs_base[j]);
......
...@@ -114,22 +114,7 @@ menu "EXYNOS4 Machines" ...@@ -114,22 +114,7 @@ menu "EXYNOS4 Machines"
config MACH_SMDKC210 config MACH_SMDKC210
bool "SMDKC210" bool "SMDKC210"
select CPU_EXYNOS4210 select MACH_SMDKV310
select S5P_DEV_FIMD0
select S3C_DEV_RTC
select S3C_DEV_WDT
select S3C_DEV_I2C1
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_BACKLIGHT
select EXYNOS4_DEV_PD
select EXYNOS4_DEV_SYSMMU
select EXYNOS4_SETUP_FIMD0
select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_SDHCI
help help
Machine support for Samsung SMDKC210 Machine support for Samsung SMDKC210
......
...@@ -25,7 +25,7 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o ...@@ -25,7 +25,7 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
# machine support # machine support
obj-$(CONFIG_MACH_SMDKC210) += mach-smdkc210.o obj-$(CONFIG_MACH_SMDKC210) += mach-smdkv310.o
obj-$(CONFIG_MACH_SMDKV310) += mach-smdkv310.o obj-$(CONFIG_MACH_SMDKV310) += mach-smdkv310.o
obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o
obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
......
/* linux/arch/arm/mach-exynos4/mach-smdkc210.c
*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* 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/serial_core.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/lcd.h>
#include <linux/mmc/host.h>
#include <linux/platform_device.h>
#include <linux/smsc911x.h>
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <video/platform_lcd.h>
#include <plat/regs-serial.h>
#include <plat/regs-srom.h>
#include <plat/regs-fb-v4.h>
#include <plat/exynos4.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/fb.h>
#include <plat/sdhci.h>
#include <plat/iic.h>
#include <plat/pd.h>
#include <plat/gpio-cfg.h>
#include <plat/backlight.h>
#include <mach/map.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
S3C2410_UCON_TXIRQMODE | \
S3C2410_UCON_RXIRQMODE | \
S3C2410_UCON_RXFIFO_TOI | \
S3C2443_UCON_RXERR_IRQEN)
#define SMDKC210_ULCON_DEFAULT S3C2410_LCON_CS8
#define SMDKC210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
S5PV210_UFCON_TXTRIG4 | \
S5PV210_UFCON_RXTRIG4)
static struct s3c2410_uartcfg smdkc210_uartcfgs[] __initdata = {
[0] = {
.hwport = 0,
.flags = 0,
.ucon = SMDKC210_UCON_DEFAULT,
.ulcon = SMDKC210_ULCON_DEFAULT,
.ufcon = SMDKC210_UFCON_DEFAULT,
},
[1] = {
.hwport = 1,
.flags = 0,
.ucon = SMDKC210_UCON_DEFAULT,
.ulcon = SMDKC210_ULCON_DEFAULT,
.ufcon = SMDKC210_UFCON_DEFAULT,
},
[2] = {
.hwport = 2,
.flags = 0,
.ucon = SMDKC210_UCON_DEFAULT,
.ulcon = SMDKC210_ULCON_DEFAULT,
.ufcon = SMDKC210_UFCON_DEFAULT,
},
[3] = {
.hwport = 3,
.flags = 0,
.ucon = SMDKC210_UCON_DEFAULT,
.ulcon = SMDKC210_ULCON_DEFAULT,
.ufcon = SMDKC210_UFCON_DEFAULT,
},
};
static struct s3c_sdhci_platdata smdkc210_hsmmc0_pdata __initdata = {
.cd_type = S3C_SDHCI_CD_GPIO,
.ext_cd_gpio = EXYNOS4_GPK0(2),
.ext_cd_gpio_invert = 1,
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
.max_width = 8,
.host_caps = MMC_CAP_8_BIT_DATA,
#endif
};
static struct s3c_sdhci_platdata smdkc210_hsmmc1_pdata __initdata = {
.cd_type = S3C_SDHCI_CD_GPIO,
.ext_cd_gpio = EXYNOS4_GPK0(2),
.ext_cd_gpio_invert = 1,
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
};
static struct s3c_sdhci_platdata smdkc210_hsmmc2_pdata __initdata = {
.cd_type = S3C_SDHCI_CD_GPIO,
.ext_cd_gpio = EXYNOS4_GPK2(2),
.ext_cd_gpio_invert = 1,
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
.max_width = 8,
.host_caps = MMC_CAP_8_BIT_DATA,
#endif
};
static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
.cd_type = S3C_SDHCI_CD_GPIO,
.ext_cd_gpio = EXYNOS4_GPK2(2),
.ext_cd_gpio_invert = 1,
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
};
static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
unsigned int power)
{
if (power) {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
#endif
/* fire nRESET on power up */
gpio_request(EXYNOS4_GPX0(6), "GPX0");
gpio_direction_output(EXYNOS4_GPX0(6), 1);
mdelay(100);
gpio_set_value(EXYNOS4_GPX0(6), 0);
mdelay(10);
gpio_set_value(EXYNOS4_GPX0(6), 1);
mdelay(10);
gpio_free(EXYNOS4_GPX0(6));
} else {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
#endif
}
}
static struct plat_lcd_data smdkc210_lcd_lte480wv_data = {
.set_power = lcd_lte480wv_set_power,
};
static struct platform_device smdkc210_lcd_lte480wv = {
.name = "platform-lcd",
.dev.parent = &s5p_device_fimd0.dev,
.dev.platform_data = &smdkc210_lcd_lte480wv_data,
};
static struct s3c_fb_pd_win smdkc210_fb_win0 = {
.win_mode = {
.left_margin = 13,
.right_margin = 8,
.upper_margin = 7,
.lower_margin = 5,
.hsync_len = 3,
.vsync_len = 1,
.xres = 800,
.yres = 480,
},
.max_bpp = 32,
.default_bpp = 24,
};
static struct s3c_fb_platdata smdkc210_lcd0_pdata __initdata = {
.win[0] = &smdkc210_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
};
static struct resource smdkc210_smsc911x_resources[] = {
[0] = {
.start = EXYNOS4_PA_SROM_BANK(1),
.end = EXYNOS4_PA_SROM_BANK(1) + SZ_64K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_EINT(5),
.end = IRQ_EINT(5),
.flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
},
};
static struct smsc911x_platform_config smsc9215_config = {
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
.irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
.flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
.phy_interface = PHY_INTERFACE_MODE_MII,
.mac = {0x00, 0x80, 0x00, 0x23, 0x45, 0x67},
};
static struct platform_device smdkc210_smsc911x = {
.name = "smsc911x",
.id = -1,
.num_resources = ARRAY_SIZE(smdkc210_smsc911x_resources),
.resource = smdkc210_smsc911x_resources,
.dev = {
.platform_data = &smsc9215_config,
},
};
static struct i2c_board_info i2c_devs1[] __initdata = {
{I2C_BOARD_INFO("wm8994", 0x1a),},
};
static struct platform_device *smdkc210_devices[] __initdata = {
&s3c_device_hsmmc0,
&s3c_device_hsmmc1,
&s3c_device_hsmmc2,
&s3c_device_hsmmc3,
&s3c_device_i2c1,
&s3c_device_rtc,
&s3c_device_wdt,
&exynos4_device_ac97,
&exynos4_device_i2s0,
&exynos4_device_pd[PD_MFC],
&exynos4_device_pd[PD_G3D],
&exynos4_device_pd[PD_LCD0],
&exynos4_device_pd[PD_LCD1],
&exynos4_device_pd[PD_CAM],
&exynos4_device_pd[PD_TV],
&exynos4_device_pd[PD_GPS],
&exynos4_device_sysmmu,
&samsung_asoc_dma,
&s5p_device_fimd0,
&smdkc210_lcd_lte480wv,
&smdkc210_smsc911x,
};
static void __init smdkc210_smsc911x_init(void)
{
u32 cs1;
/* configure nCS1 width to 16 bits */
cs1 = __raw_readl(S5P_SROM_BW) &
~(S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS1__SHIFT);
cs1 |= ((1 << S5P_SROM_BW__DATAWIDTH__SHIFT) |
(1 << S5P_SROM_BW__WAITENABLE__SHIFT) |
(1 << S5P_SROM_BW__BYTEENABLE__SHIFT)) <<
S5P_SROM_BW__NCS1__SHIFT;
__raw_writel(cs1, S5P_SROM_BW);
/* set timing for nCS1 suitable for ethernet chip */
__raw_writel((0x1 << S5P_SROM_BCX__PMC__SHIFT) |
(0x9 << S5P_SROM_BCX__TACP__SHIFT) |
(0xc << S5P_SROM_BCX__TCAH__SHIFT) |
(0x1 << S5P_SROM_BCX__TCOH__SHIFT) |
(0x6 << S5P_SROM_BCX__TACC__SHIFT) |
(0x1 << S5P_SROM_BCX__TCOS__SHIFT) |
(0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
}
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdkc210_bl_gpio_info = {
.no = EXYNOS4_GPD0(1),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdkc210_bl_data = {
.pwm_id = 1,
.pwm_period_ns = 1000,
};
static void __init smdkc210_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
s3c24xx_init_clocks(24000000);
s3c24xx_init_uarts(smdkc210_uartcfgs, ARRAY_SIZE(smdkc210_uartcfgs));
}
static void __init smdkc210_machine_init(void)
{
s3c_i2c1_set_platdata(NULL);
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
smdkc210_smsc911x_init();
s3c_sdhci0_set_platdata(&smdkc210_hsmmc0_pdata);
s3c_sdhci1_set_platdata(&smdkc210_hsmmc1_pdata);
s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data);
s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
}
MACHINE_START(SMDKC210, "SMDKC210")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
.atag_offset = 0x100,
.init_irq = exynos4_init_irq,
.map_io = smdkc210_map_io,
.init_machine = smdkc210_machine_init,
.timer = &exynos4_timer,
MACHINE_END
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
*/ */
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/delay.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/lcd.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
...@@ -21,11 +23,14 @@ ...@@ -21,11 +23,14 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <video/platform_lcd.h>
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
#include <plat/regs-srom.h> #include <plat/regs-srom.h>
#include <plat/regs-fb-v4.h>
#include <plat/exynos4.h> #include <plat/exynos4.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/fb.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/iic.h> #include <plat/iic.h>
...@@ -112,6 +117,67 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = { ...@@ -112,6 +117,67 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
}; };
static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
unsigned int power)
{
if (power) {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
#endif
/* fire nRESET on power up */
gpio_request(EXYNOS4_GPX0(6), "GPX0");
gpio_direction_output(EXYNOS4_GPX0(6), 1);
mdelay(100);
gpio_set_value(EXYNOS4_GPX0(6), 0);
mdelay(10);
gpio_set_value(EXYNOS4_GPX0(6), 1);
mdelay(10);
gpio_free(EXYNOS4_GPX0(6));
} else {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
gpio_free(EXYNOS4_GPD0(1));
#endif
}
}
static struct plat_lcd_data smdkv310_lcd_lte480wv_data = {
.set_power = lcd_lte480wv_set_power,
};
static struct platform_device smdkv310_lcd_lte480wv = {
.name = "platform-lcd",
.dev.parent = &s5p_device_fimd0.dev,
.dev.platform_data = &smdkv310_lcd_lte480wv_data,
};
static struct s3c_fb_pd_win smdkv310_fb_win0 = {
.win_mode = {
.left_margin = 13,
.right_margin = 8,
.upper_margin = 7,
.lower_margin = 5,
.hsync_len = 3,
.vsync_len = 1,
.xres = 800,
.yres = 480,
},
.max_bpp = 32,
.default_bpp = 24,
};
static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
.win[0] = &smdkv310_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
};
static struct resource smdkv310_smsc911x_resources[] = { static struct resource smdkv310_smsc911x_resources[] = {
[0] = { [0] = {
.start = EXYNOS4_PA_SROM_BANK(1), .start = EXYNOS4_PA_SROM_BANK(1),
...@@ -188,6 +254,8 @@ static struct platform_device *smdkv310_devices[] __initdata = { ...@@ -188,6 +254,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
&exynos4_device_sysmmu, &exynos4_device_sysmmu,
&samsung_asoc_dma, &samsung_asoc_dma,
&samsung_asoc_idma, &samsung_asoc_idma,
&s5p_device_fimd0,
&smdkv310_lcd_lte480wv,
&smdkv310_smsc911x, &smdkv310_smsc911x,
&exynos4_device_ahci, &exynos4_device_ahci,
}; };
...@@ -248,6 +316,7 @@ static void __init smdkv310_machine_init(void) ...@@ -248,6 +316,7 @@ static void __init smdkv310_machine_init(void)
samsung_keypad_set_platdata(&smdkv310_keypad_data); samsung_keypad_set_platdata(&smdkv310_keypad_data);
samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
} }
...@@ -261,3 +330,12 @@ MACHINE_START(SMDKV310, "SMDKV310") ...@@ -261,3 +330,12 @@ MACHINE_START(SMDKV310, "SMDKV310")
.init_machine = smdkv310_machine_init, .init_machine = smdkv310_machine_init,
.timer = &exynos4_timer, .timer = &exynos4_timer,
MACHINE_END MACHINE_END
MACHINE_START(SMDKC210, "SMDKC210")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
.atag_offset = 0x100,
.init_irq = exynos4_init_irq,
.map_io = smdkv310_map_io,
.init_machine = smdkv310_machine_init,
.timer = &exynos4_timer,
MACHINE_END
obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o
obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o
obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
obj-$(CONFIG_SOC_IMX31) += mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35) += mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
# Support for CMOS sensor interface # Support for CMOS sensor interface
obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
......
/*
* Copyright (C) 2009-2010 Pengutronix
* Sascha Hauer <s.hauer@pengutronix.de>
* Juergen Beisert <j.beisert@pengutronix.de>
*
* 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/init.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/hardware.h>
static int mxc_init_l2x0(void)
{
void __iomem *l2x0_base;
void __iomem *clkctl_base;
if (!cpu_is_mx31() && !cpu_is_mx35())
return 0;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096);
if (clkctl_base != NULL) {
writel(0x00000515, clkctl_base + L2_MEM_VAL);
iounmap(clkctl_base);
} else {
pr_err("L2 cache: Cannot fix timing. Trying to continue without\n");
}
l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096);
if (IS_ERR(l2x0_base)) {
printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
PTR_ERR(l2x0_base));
return 0;
}
l2x0_init(l2x0_base, 0x00030024, 0x00000000);
return 0;
}
arch_initcall(mxc_init_l2x0);
...@@ -314,25 +314,19 @@ static struct mtd_partition armadillo5x0_nor_flash_partitions[] = { ...@@ -314,25 +314,19 @@ static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
}, },
}; };
static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { static const struct physmap_flash_data
armadillo5x0_nor_flash_pdata __initconst = {
.width = 2, .width = 2,
.parts = armadillo5x0_nor_flash_partitions, .parts = armadillo5x0_nor_flash_partitions,
.nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
}; };
static struct resource armadillo5x0_nor_flash_resource = { static const struct resource armadillo5x0_nor_flash_resource __initconst = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
.start = MX31_CS0_BASE_ADDR, .start = MX31_CS0_BASE_ADDR,
.end = MX31_CS0_BASE_ADDR + SZ_64M - 1, .end = MX31_CS0_BASE_ADDR + SZ_64M - 1,
}; };
static struct platform_device armadillo5x0_nor_flash = {
.name = "physmap-flash",
.id = -1,
.num_resources = 1,
.resource = &armadillo5x0_nor_flash_resource,
};
/* /*
* FB support * FB support
*/ */
...@@ -514,8 +508,10 @@ static void __init armadillo5x0_init(void) ...@@ -514,8 +508,10 @@ static void __init armadillo5x0_init(void)
imx31_add_mx3_sdc_fb(&mx3fb_pdata); imx31_add_mx3_sdc_fb(&mx3fb_pdata);
/* Register NOR Flash */ /* Register NOR Flash */
mxc_register_device(&armadillo5x0_nor_flash, platform_device_register_resndata(NULL, "physmap-flash", -1,
&armadillo5x0_nor_flash_pdata); &armadillo5x0_nor_flash_resource, 1,
&armadillo5x0_nor_flash_pdata,
sizeof(armadillo5x0_nor_flash_pdata));
/* Register NAND Flash */ /* Register NAND Flash */
imx31_add_mxc_nand(&armadillo5x0_nand_board_info); imx31_add_mxc_nand(&armadillo5x0_nand_board_info);
......
...@@ -66,7 +66,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { ...@@ -66,7 +66,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x48), I2C_BOARD_INFO("tsc2007", 0x48),
.type = "tsc2007", .type = "tsc2007",
.platform_data = &tsc2007_info, .platform_data = &tsc2007_info,
.irq = gpio_to_irq(TSC2007_IRQGPIO), .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
}, },
}; };
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <mach/clock.h> #include <mach/clock.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h>
#include <mach/iomux-mx3.h> #include <mach/iomux-mx3.h>
#include "devices-imx31.h" #include "devices-imx31.h"
......
...@@ -68,23 +68,16 @@ static const struct imxuart_platform_data uart1_pdata __initconst = { ...@@ -68,23 +68,16 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
* Physmap flash * Physmap flash
*/ */
static struct physmap_flash_data mx1ads_flash_data = { static const struct physmap_flash_data mx1ads_flash_data __initconst = {
.width = 4, /* bankwidth in bytes */ .width = 4, /* bankwidth in bytes */
}; };
static struct resource flash_resource = { static const struct resource flash_resource __initconst = {
.start = MX1_CS0_PHYS, .start = MX1_CS0_PHYS,
.end = MX1_CS0_PHYS + SZ_32M - 1, .end = MX1_CS0_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
static struct platform_device flash_device = {
.name = "physmap-flash",
.id = 0,
.resource = &flash_resource,
.num_resources = 1,
};
/* /*
* I2C * I2C
*/ */
...@@ -125,7 +118,9 @@ static void __init mx1ads_init(void) ...@@ -125,7 +118,9 @@ static void __init mx1ads_init(void)
imx1_add_imx_uart1(&uart1_pdata); imx1_add_imx_uart1(&uart1_pdata);
/* Physmap flash */ /* Physmap flash */
mxc_register_device(&flash_device, &mx1ads_flash_data); platform_device_register_resndata(NULL, "physmap-flash", 0,
&flash_resource, 1,
&mx1ads_flash_data, sizeof(mx1ads_flash_data));
/* I2C */ /* I2C */
i2c_register_board_info(0, mx1ads_i2c_devices, i2c_register_board_info(0, mx1ads_i2c_devices,
......
...@@ -357,7 +357,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { ...@@ -357,7 +357,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
.bus_num = 1, .bus_num = 1,
.chip_select = 0, /* SS0 */ .chip_select = 0, /* SS0 */
.platform_data = &mc13783_pdata, .platform_data = &mc13783_pdata,
.irq = gpio_to_irq(PMIC_INT), .irq = IMX_GPIO_TO_IRQ(PMIC_INT),
.mode = SPI_CS_HIGH, .mode = SPI_CS_HIGH,
}, { }, {
.modalias = "l4f00242t03", .modalias = "l4f00242t03",
......
...@@ -176,7 +176,9 @@ static struct platform_device *platform_devices[] __initdata = { ...@@ -176,7 +176,9 @@ static struct platform_device *platform_devices[] __initdata = {
* setup other stuffs to access the sram. */ * setup other stuffs to access the sram. */
static void __init pcm038_init_sram(void) static void __init pcm038_init_sram(void)
{ {
mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); __raw_writel(0x0000d843, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(1)));
__raw_writel(0x22252521, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(1)));
__raw_writel(0x22220a00, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(1)));
} }
static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = {
......
...@@ -190,7 +190,10 @@ static struct platform_device qong_nand_device = { ...@@ -190,7 +190,10 @@ static struct platform_device qong_nand_device = {
static void __init qong_init_nand_mtd(void) static void __init qong_init_nand_mtd(void)
{ {
/* init CS */ /* init CS */
mx31_setup_weimcs(3, 0x00004f00, 0x20013b31, 0x00020800); __raw_writel(0x00004f00, MX31_IO_ADDRESS(MX31_WEIM_CSCRxU(3)));
__raw_writel(0x20013b31, MX31_IO_ADDRESS(MX31_WEIM_CSCRxL(3)));
__raw_writel(0x00020800, MX31_IO_ADDRESS(MX31_WEIM_CSCRxA(3)));
mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true);
/* enable pin */ /* enable pin */
......
...@@ -162,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = { ...@@ -162,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = {
}, { }, {
I2C_BOARD_INFO("mc13892", 0x08), I2C_BOARD_INFO("mc13892", 0x08),
.platform_data = &vpr200_pmic, .platform_data = &vpr200_pmic,
.irq = gpio_to_irq(GPIO_PMIC_INT), .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT),
} }
}; };
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#include <linux/err.h> #include <linux/err.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/mach/map.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/devices-common.h> #include <mach/devices-common.h>
...@@ -30,6 +30,102 @@ ...@@ -30,6 +30,102 @@
#include <mach/iomux-v3.h> #include <mach/iomux-v3.h>
#include <mach/irqs.h> #include <mach/irqs.h>
static void imx3_idle(void)
{
unsigned long reg = 0;
__asm__ __volatile__(
/* disable I and D cache */
"mrc p15, 0, %0, c1, c0, 0\n"
"bic %0, %0, #0x00001000\n"
"bic %0, %0, #0x00000004\n"
"mcr p15, 0, %0, c1, c0, 0\n"
/* invalidate I cache */
"mov %0, #0\n"
"mcr p15, 0, %0, c7, c5, 0\n"
/* clear and invalidate D cache */
"mov %0, #0\n"
"mcr p15, 0, %0, c7, c14, 0\n"
/* WFI */
"mov %0, #0\n"
"mcr p15, 0, %0, c7, c0, 4\n"
"nop\n" "nop\n" "nop\n" "nop\n"
"nop\n" "nop\n" "nop\n"
/* enable I and D cache */
"mrc p15, 0, %0, c1, c0, 0\n"
"orr %0, %0, #0x00001000\n"
"orr %0, %0, #0x00000004\n"
"mcr p15, 0, %0, c1, c0, 0\n"
: "=r" (reg));
}
static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
unsigned int mtype)
{
if (mtype == MT_DEVICE) {
/*
* Access all peripherals below 0x80000000 as nonshared device
* on mx3, but leave l2cc alone. Otherwise cache corruptions
* can occur.
*/
if (phys_addr < 0x80000000 &&
!addr_in_module(phys_addr, MX3x_L2CC))
mtype = MT_DEVICE_NONSHARED;
}
return __arm_ioremap(phys_addr, size, mtype);
}
void imx3_init_l2x0(void)
{
void __iomem *l2x0_base;
void __iomem *clkctl_base;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096);
if (clkctl_base != NULL) {
writel(0x00000515, clkctl_base + L2_MEM_VAL);
iounmap(clkctl_base);
} else {
pr_err("L2 cache: Cannot fix timing. Trying to continue without\n");
}
l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096);
if (IS_ERR(l2x0_base)) {
printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
PTR_ERR(l2x0_base));
return;
}
l2x0_init(l2x0_base, 0x00030024, 0x00000000);
}
static struct map_desc mx31_io_desc[] __initdata = {
imx_map_entry(MX31, X_MEMC, MT_DEVICE),
imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx31_map_io(void)
{
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
static struct map_desc mx35_io_desc[] __initdata = { static struct map_desc mx35_io_desc[] __initdata = {
imx_map_entry(MX35, X_MEMC, MT_DEVICE), imx_map_entry(MX35, X_MEMC, MT_DEVICE),
imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
...@@ -43,11 +139,26 @@ void __init mx35_map_io(void) ...@@ -43,11 +139,26 @@ void __init mx35_map_io(void)
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
} }
void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
imx_idle = imx3_idle;
imx_ioremap = imx3_ioremap;
}
void __init imx35_init_early(void) void __init imx35_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX35); mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
imx_idle = imx3_idle;
imx_ioremap = imx3_ioremap;
}
void __init mx31_init_irq(void)
{
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
} }
void __init mx35_init_irq(void) void __init mx35_init_irq(void)
...@@ -55,6 +166,40 @@ void __init mx35_init_irq(void) ...@@ -55,6 +166,40 @@ void __init mx35_init_irq(void)
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
} }
static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = {
.per_2_per_addr = 1677,
};
static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = {
.ap_2_ap_addr = 423,
.ap_2_bp_addr = 829,
.bp_2_ap_addr = 1029,
};
static struct sdma_platform_data imx31_sdma_pdata __initdata = {
.fw_name = "sdma-imx31-to2.bin",
.script_addrs = &imx31_to2_sdma_script,
};
void __init imx31_soc_init(void)
{
int to_version = mx31_revision() >> 4;
imx3_init_l2x0();
mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
if (to_version == 1) {
strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin",
strlen(imx31_sdma_pdata.fw_name));
imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script;
}
imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
}
static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = {
.ap_2_ap_addr = 642, .ap_2_ap_addr = 642,
.uart_2_mcu_addr = 817, .uart_2_mcu_addr = 817,
...@@ -94,6 +239,8 @@ void __init imx35_soc_init(void) ...@@ -94,6 +239,8 @@ void __init imx35_soc_init(void)
{ {
int to_version = mx35_revision() >> 4; int to_version = mx35_revision() >> 4;
imx3_init_l2x0();
/* i.mx35 has the i.mx31 type gpio */ /* i.mx35 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0); mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
......
/*
* Copyright (C) 1999,2000 Arm Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
* Copyright (C) 2002 Shane Nay (shane@minirl.com)
* Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* - add MX31 specific definitions
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/devices-common.h>
#include <mach/hardware.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
static struct map_desc mx31_io_desc[] __initdata = {
imx_map_entry(MX31, X_MEMC, MT_DEVICE),
imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx31_map_io(void)
{
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
}
void __init mx31_init_irq(void)
{
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
}
static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = {
.per_2_per_addr = 1677,
};
static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = {
.ap_2_ap_addr = 423,
.ap_2_bp_addr = 829,
.bp_2_ap_addr = 1029,
};
static struct sdma_platform_data imx31_sdma_pdata __initdata = {
.fw_name = "sdma-imx31-to2.bin",
.script_addrs = &imx31_to2_sdma_script,
};
void __init imx31_soc_init(void)
{
int to_version = mx31_revision() >> 4;
mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
if (to_version == 1) {
strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin",
strlen(imx31_sdma_pdata.fw_name));
imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script;
}
imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/system.h> #include <mach/system.h>
#include <mach/mx27.h> #include <mach/hardware.h>
static int mx27_suspend_enter(suspend_state_t state) static int mx27_suspend_enter(suspend_state_t state)
{ {
......
...@@ -52,7 +52,6 @@ config MACH_MX50_RDP ...@@ -52,7 +52,6 @@ config MACH_MX50_RDP
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_FEC
help help
Include support for MX50 reference design platform (RDP) board. This Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals. includes specific configurations for the board and its peripherals.
...@@ -65,9 +64,11 @@ comment "i.MX51 machines:" ...@@ -65,9 +64,11 @@ comment "i.MX51 machines:"
config MACH_MX51_BABBAGE config MACH_MX51_BABBAGE
bool "Support MX51 BABBAGE platforms" bool "Support MX51 BABBAGE platforms"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX select IMX_HAVE_PLATFORM_SPI_IMX
help help
...@@ -91,8 +92,10 @@ config MACH_MX51_3DS ...@@ -91,8 +92,10 @@ config MACH_MX51_3DS
config MACH_EUKREA_CPUIMX51 config MACH_EUKREA_CPUIMX51
bool "Support Eukrea CPUIMX51 module" bool "Support Eukrea CPUIMX51 module"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX select IMX_HAVE_PLATFORM_SPI_IMX
help help
...@@ -119,10 +122,12 @@ endchoice ...@@ -119,10 +122,12 @@ endchoice
config MACH_EUKREA_CPUIMX51SD config MACH_EUKREA_CPUIMX51SD
bool "Support Eukrea CPUIMX51SD module" bool "Support Eukrea CPUIMX51SD module"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
help help
Include support for Eukrea CPUIMX51SD platform. This includes Include support for Eukrea CPUIMX51SD platform. This includes
specific configurations for the module and its peripherals. specific configurations for the module and its peripherals.
...@@ -147,6 +152,7 @@ config MX51_EFIKA_COMMON ...@@ -147,6 +152,7 @@ config MX51_EFIKA_COMMON
bool bool
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_ULPI if USB_ULPI select MXC_ULPI if USB_ULPI
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
# #
# Object file lists. # Object file lists.
obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o obj-y := cpu.o mm.o clock-mx51-mx53.o ehci.o system.o
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
obj-$(CONFIG_PM) += pm-imx5.o obj-$(CONFIG_PM) += pm-imx5.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
......
...@@ -22,21 +22,18 @@ ...@@ -22,21 +22,18 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <mach/eukrea-baseboards.h> #include <mach/eukrea-baseboards.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27) #define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27)
#define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28) #define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28)
...@@ -57,7 +54,7 @@ ...@@ -57,7 +54,7 @@
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
.irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
...@@ -65,7 +62,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -65,7 +62,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000),
.irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
...@@ -73,7 +70,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -73,7 +70,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000),
.irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
...@@ -81,7 +78,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -81,7 +78,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
.irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
...@@ -167,7 +164,7 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -167,7 +164,7 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
...@@ -190,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -190,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
...@@ -206,17 +203,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -206,17 +203,17 @@ static int initialize_usbh1_port(struct platform_device *pdev)
MXC_EHCI_ITC_NO_THRESHOLD); MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
}; };
static struct mxc_usbh_platform_data usbh1_config = { static const struct mxc_usbh_platform_data usbh1_config __initconst = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
...@@ -270,12 +267,12 @@ static void __init eukrea_cpuimx51_init(void) ...@@ -270,12 +267,12 @@ static void __init eukrea_cpuimx51_init(void)
ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); ARRAY_SIZE(eukrea_cpuimx51_i2c_devices));
if (otg_mode_host) if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
else { else {
initialize_otg_port(NULL); initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); imx51_add_fsl_usb2_udc(&usb_pdata);
} }
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
#ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD #ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD
eukrea_mbimx51_baseboard_init(); eukrea_mbimx51_baseboard_init();
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/can/platform/mcp251x.h> #include <linux/can/platform/mcp251x.h>
...@@ -32,14 +31,12 @@ ...@@ -32,14 +31,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "cpu_op-mx51.h" #include "cpu_op-mx51.h"
#define USBH1_RST IMX_GPIO_NR(2, 28) #define USBH1_RST IMX_GPIO_NR(2, 28)
...@@ -108,7 +105,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { ...@@ -108,7 +105,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {
/* Touchscreen */ /* Touchscreen */
/* IRQ */ /* IRQ */
_MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
}; };
...@@ -129,7 +126,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { ...@@ -129,7 +126,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x49), I2C_BOARD_INFO("tsc2007", 0x49),
.type = "tsc2007", .type = "tsc2007",
.platform_data = &tsc2007_info, .platform_data = &tsc2007_info,
.irq = gpio_to_irq(TSC2007_IRQGPIO), .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
}, },
}; };
...@@ -149,7 +146,7 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -149,7 +146,7 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
...@@ -172,7 +169,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -172,7 +169,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
...@@ -189,17 +186,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -189,17 +186,17 @@ static int initialize_usbh1_port(struct platform_device *pdev)
MXC_EHCI_ITC_NO_THRESHOLD); MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
}; };
static struct mxc_usbh_platform_data usbh1_config = { static const struct mxc_usbh_platform_data usbh1_config __initconst = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
...@@ -245,7 +242,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = { ...@@ -245,7 +242,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
.chip_select = 0, .chip_select = 0,
.platform_data = &mcp251x_info, .platform_data = &mcp251x_info,
.irq = gpio_to_irq(CAN_IRQGPIO) .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO)
}, },
}; };
...@@ -303,17 +300,17 @@ static void __init eukrea_cpuimx51sd_init(void) ...@@ -303,17 +300,17 @@ static void __init eukrea_cpuimx51sd_init(void)
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
if (otg_mode_host) if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
else { else {
initialize_otg_port(NULL); initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); imx51_add_fsl_usb2_udc(&usb_pdata);
} }
gpio_request(USBH1_RST, "usb_rst"); gpio_request(USBH1_RST, "usb_rst");
gpio_direction_output(USBH1_RST, 0); gpio_direction_output(USBH1_RST, 0);
msleep(20); msleep(20);
gpio_set_value(USBH1_RST, 1); gpio_set_value(USBH1_RST, 1);
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
#ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD
eukrea_mbimxsd51_baseboard_init(); eukrea_mbimxsd51_baseboard_init();
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <mach/3ds_debugboard.h> #include <mach/3ds_debugboard.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6))
#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28)
......
...@@ -24,14 +24,12 @@ ...@@ -24,14 +24,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "cpu_op-mx51.h" #include "cpu_op-mx51.h"
#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
...@@ -176,7 +174,7 @@ static const struct imxi2c_platform_data babbage_i2c_data __initconst = { ...@@ -176,7 +174,7 @@ static const struct imxi2c_platform_data babbage_i2c_data __initconst = {
.bitrate = 100000, .bitrate = 100000,
}; };
static struct imxi2c_platform_data babbage_hsi2c_data = { static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = {
.bitrate = 400000, .bitrate = 400000,
}; };
...@@ -249,7 +247,7 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -249,7 +247,7 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
...@@ -272,7 +270,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -272,7 +270,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
...@@ -288,17 +286,17 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -288,17 +286,17 @@ static int initialize_usbh1_port(struct platform_device *pdev)
MXC_EHCI_ITC_NO_THRESHOLD); MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
}; };
static struct mxc_usbh_platform_data usbh1_config = { static const struct mxc_usbh_platform_data usbh1_config __initconst = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
...@@ -357,8 +355,8 @@ static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = { ...@@ -357,8 +355,8 @@ static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = {
static void __init mx51_babbage_init(void) static void __init mx51_babbage_init(void)
{ {
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
imx51_soc_init(); imx51_soc_init();
...@@ -381,17 +379,17 @@ static void __init mx51_babbage_init(void) ...@@ -381,17 +379,17 @@ static void __init mx51_babbage_init(void)
imx51_add_imx_i2c(0, &babbage_i2c_data); imx51_add_imx_i2c(0, &babbage_i2c_data);
imx51_add_imx_i2c(1, &babbage_i2c_data); imx51_add_imx_i2c(1, &babbage_i2c_data);
mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); imx51_add_hsi2c(&babbage_hsi2c_data);
if (otg_mode_host) if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
else { else {
initialize_otg_port(NULL); initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); imx51_add_fsl_usb2_udc(&usb_pdata);
} }
gpio_usbh1_active(); gpio_usbh1_active();
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
/* setback USBH1_STP to be function */ /* setback USBH1_STP to be function */
mxc_iomux_v3_setup_pad(usbh1stp); mxc_iomux_v3_setup_pad(usbh1stp);
babbage_usbhub_reset(); babbage_usbhub_reset();
......
...@@ -32,14 +32,12 @@ ...@@ -32,14 +32,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "efika.h" #include "efika.h"
#define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16) #define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16)
......
...@@ -35,14 +35,12 @@ ...@@ -35,14 +35,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "efika.h" #include "efika.h"
#define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20) #define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20)
...@@ -119,7 +117,7 @@ static int initialize_usbh2_port(struct platform_device *pdev) ...@@ -119,7 +117,7 @@ static int initialize_usbh2_port(struct platform_device *pdev)
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data usbh2_config = { static struct mxc_usbh_platform_data usbh2_config __initdata = {
.init = initialize_usbh2_port, .init = initialize_usbh2_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
...@@ -129,7 +127,7 @@ static void __init mx51_efikasb_usb(void) ...@@ -129,7 +127,7 @@ static void __init mx51_efikasb_usb(void)
usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
if (usbh2_config.otg) if (usbh2_config.otg)
mxc_register_device(&mxc_usbh2_device, &usbh2_config); imx51_add_mxc_ehci_hs(2, &usbh2_config);
} }
static const struct gpio_led mx51_efikasb_leds[] __initconst = { static const struct gpio_led mx51_efikasb_leds[] __initconst = {
......
...@@ -134,8 +134,8 @@ static struct resource ard_smsc911x_resources[] = { ...@@ -134,8 +134,8 @@ static struct resource ard_smsc911x_resources[] = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
{ {
.start = gpio_to_irq(ARD_ETHERNET_INT_B), .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
.end = gpio_to_irq(ARD_ETHERNET_INT_B), .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
......
...@@ -1568,7 +1568,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, ...@@ -1568,7 +1568,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
/* System timer */ /* System timer */
mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR),
MX51_MXC_INT_GPT); MX51_INT_GPT);
return 0; return 0;
} }
......
...@@ -13,9 +13,15 @@ extern const struct imx_fec_data imx51_fec_data; ...@@ -13,9 +13,15 @@ extern const struct imx_fec_data imx51_fec_data;
#define imx51_add_fec(pdata) \ #define imx51_add_fec(pdata) \
imx_add_fec(&imx51_fec_data, pdata) imx_add_fec(&imx51_fec_data, pdata)
extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data;
#define imx51_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata)
extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; extern const struct imx_imx_i2c_data imx51_imx_i2c_data[];
#define imx51_add_imx_i2c(id, pdata) \ #define imx51_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
#define imx51_add_hsi2c(pdata) \
imx51_add_imx_i2c(2, pdata)
extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; extern const struct imx_imx_ssi_data imx51_imx_ssi_data[];
#define imx51_add_imx_ssi(id, pdata) \ #define imx51_add_imx_ssi(id, pdata) \
...@@ -25,6 +31,13 @@ extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[]; ...@@ -25,6 +31,13 @@ extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[];
#define imx51_add_imx_uart(id, pdata) \ #define imx51_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata)
extern const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data;
#define imx51_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx51_mxc_ehci_otg_data, pdata)
extern const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[];
#define imx51_add_mxc_ehci_hs(id, pdata) \
imx_add_mxc_ehci(&imx51_mxc_ehci_hs_data[id - 1], pdata)
extern const struct imx_mxc_nand_data imx51_mxc_nand_data; extern const struct imx_mxc_nand_data imx51_mxc_nand_data;
#define imx51_add_mxc_nand(pdata) \ #define imx51_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) imx_add_mxc_nand(&imx51_mxc_nand_data, pdata)
......
/*
* Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com>
* Copyright (C) 2010 Freescale Semiconductor, Inc.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <mach/hardware.h>
#include <mach/imx-uart.h>
#include <mach/irqs.h>
static struct resource mxc_hsi2c_resources[] = {
{
.start = MX51_HSI2C_DMA_BASE_ADDR,
.end = MX51_HSI2C_DMA_BASE_ADDR + SZ_16K - 1,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_HS_I2C,
.end = MX51_MXC_INT_HS_I2C,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mxc_hsi2c_device = {
.name = "imx-i2c",
.id = 2,
.num_resources = ARRAY_SIZE(mxc_hsi2c_resources),
.resource = mxc_hsi2c_resources
};
static u64 usb_dma_mask = DMA_BIT_MASK(32);
static struct resource usbotg_resources[] = {
{
.start = MX51_OTG_BASE_ADDR,
.end = MX51_OTG_BASE_ADDR + 0x1ff,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_USB_OTG,
.flags = IORESOURCE_IRQ,
},
};
/* OTG gadget device */
struct platform_device mxc_usbdr_udc_device = {
.name = "fsl-usb2-udc",
.id = -1,
.num_resources = ARRAY_SIZE(usbotg_resources),
.resource = usbotg_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
struct platform_device mxc_usbdr_host_device = {
.name = "mxc-ehci",
.id = 0,
.num_resources = ARRAY_SIZE(usbotg_resources),
.resource = usbotg_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource usbh1_resources[] = {
{
.start = MX51_OTG_BASE_ADDR + 0x200,
.end = MX51_OTG_BASE_ADDR + 0x200 + 0x1ff,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_USB_H1,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mxc_usbh1_device = {
.name = "mxc-ehci",
.id = 1,
.num_resources = ARRAY_SIZE(usbh1_resources),
.resource = usbh1_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource usbh2_resources[] = {
{
.start = MX51_OTG_BASE_ADDR + 0x400,
.end = MX51_OTG_BASE_ADDR + 0x400 + 0x1ff,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_USB_H2,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mxc_usbh2_device = {
.name = "mxc-ehci",
.id = 2,
.num_resources = ARRAY_SIZE(usbh2_resources),
.resource = usbh2_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
extern struct platform_device mxc_usbdr_host_device;
extern struct platform_device mxc_usbh1_device;
extern struct platform_device mxc_usbh2_device;
extern struct platform_device mxc_usbdr_udc_device;
extern struct platform_device mxc_hsi2c_device;
...@@ -52,7 +52,7 @@ int mx51_initialize_usb_hw(int port, unsigned int flags) ...@@ -52,7 +52,7 @@ int mx51_initialize_usb_hw(int port, unsigned int flags)
void __iomem *usbother_base; void __iomem *usbother_base;
int ret = 0; int ret = 0;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) { if (!usb_base) {
printk(KERN_ERR "%s(): ioremap failed\n", __func__); printk(KERN_ERR "%s(): ioremap failed\n", __func__);
return -ENOMEM; return -ENOMEM;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30)
#define MBIMX51_LED0 IMX_GPIO_NR(3, 5) #define MBIMX51_LED0 IMX_GPIO_NR(3, 5)
...@@ -160,7 +159,7 @@ struct tsc2007_platform_data tsc2007_data = { ...@@ -160,7 +159,7 @@ struct tsc2007_platform_data tsc2007_data = {
static struct i2c_board_info mbimx51_i2c_devices[] = { static struct i2c_board_info mbimx51_i2c_devices[] = {
{ {
I2C_BOARD_INFO("tsc2007", 0x49), I2C_BOARD_INFO("tsc2007", 0x49),
.irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), .irq = IMX_GPIO_TO_IRQ(MBIMX51_TSC2007_GPIO),
.platform_data = &tsc2007_data, .platform_data = &tsc2007_data,
}, { }, {
I2C_BOARD_INFO("tlv320aic23", 0x1a), I2C_BOARD_INFO("tlv320aic23", 0x1a),
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/input.h> #include <linux/input.h>
...@@ -41,13 +40,12 @@ ...@@ -41,13 +40,12 @@
#include <mach/audmux.h> #include <mach/audmux.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
/* LED */ /* LED */
MX51_PAD_NANDF_D10__GPIO3_30, MX51_PAD_NANDF_D10__GPIO3_30,
/* SWITCH */ /* SWITCH */
_MX51_PAD_NANDF_D9__GPIO3_31 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | NEW_PAD_CTRL(MX51_PAD_NANDF_D9__GPIO3_31, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
/* UART2 */ /* UART2 */
...@@ -66,7 +64,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { ...@@ -66,7 +64,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
MX51_PAD_SD1_DATA2__SD1_DATA2, MX51_PAD_SD1_DATA2__SD1_DATA2,
MX51_PAD_SD1_DATA3__SD1_DATA3, MX51_PAD_SD1_DATA3__SD1_DATA3,
/* SD1 CD */ /* SD1 CD */
_MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | NEW_PAD_CTRL(MX51_PAD_GPIO1_0__SD1_CD, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
}; };
......
/*
* Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Create static mapping between physical to virtual memory.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/mach/map.h>
#include <mach/hardware.h>
#include <mach/common.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
/*
* Define the MX50 memory map.
*/
static struct map_desc mx50_io_desc[] __initdata = {
imx_map_entry(MX50, TZIC, MT_DEVICE),
imx_map_entry(MX50, SPBA0, MT_DEVICE),
imx_map_entry(MX50, AIPS1, MT_DEVICE),
imx_map_entry(MX50, AIPS2, MT_DEVICE),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx50_map_io(void)
{
iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc));
}
void __init imx50_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX50);
mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
}
void __init mx50_init_irq(void)
{
tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
}
void __init imx50_soc_init(void)
{
/* i.mx50 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
mxc_register_gpio("imx31-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
mxc_register_gpio("imx31-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH);
mxc_register_gpio("imx31-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH);
mxc_register_gpio("imx31-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH);
mxc_register_gpio("imx31-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH);
}
...@@ -21,12 +21,27 @@ ...@@ -21,12 +21,27 @@
#include <mach/devices-common.h> #include <mach/devices-common.h>
#include <mach/iomux-v3.h> #include <mach/iomux-v3.h>
static void imx5_idle(void)
{
mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
}
/*
* Define the MX50 memory map.
*/
static struct map_desc mx50_io_desc[] __initdata = {
imx_map_entry(MX50, TZIC, MT_DEVICE),
imx_map_entry(MX50, SPBA0, MT_DEVICE),
imx_map_entry(MX50, AIPS1, MT_DEVICE),
imx_map_entry(MX50, AIPS2, MT_DEVICE),
};
/* /*
* Define the MX51 memory map. * Define the MX51 memory map.
*/ */
static struct map_desc mx51_io_desc[] __initdata = { static struct map_desc mx51_io_desc[] __initdata = {
imx_map_entry(MX51, TZIC, MT_DEVICE),
imx_map_entry(MX51, IRAM, MT_DEVICE), imx_map_entry(MX51, IRAM, MT_DEVICE),
imx_map_entry(MX51, DEBUG, MT_DEVICE),
imx_map_entry(MX51, AIPS1, MT_DEVICE), imx_map_entry(MX51, AIPS1, MT_DEVICE),
imx_map_entry(MX51, SPBA0, MT_DEVICE), imx_map_entry(MX51, SPBA0, MT_DEVICE),
imx_map_entry(MX51, AIPS2, MT_DEVICE), imx_map_entry(MX51, AIPS2, MT_DEVICE),
...@@ -36,6 +51,7 @@ static struct map_desc mx51_io_desc[] __initdata = { ...@@ -36,6 +51,7 @@ static struct map_desc mx51_io_desc[] __initdata = {
* Define the MX53 memory map. * Define the MX53 memory map.
*/ */
static struct map_desc mx53_io_desc[] __initdata = { static struct map_desc mx53_io_desc[] __initdata = {
imx_map_entry(MX53, TZIC, MT_DEVICE),
imx_map_entry(MX53, AIPS1, MT_DEVICE), imx_map_entry(MX53, AIPS1, MT_DEVICE),
imx_map_entry(MX53, SPBA0, MT_DEVICE), imx_map_entry(MX53, SPBA0, MT_DEVICE),
imx_map_entry(MX53, AIPS2, MT_DEVICE), imx_map_entry(MX53, AIPS2, MT_DEVICE),
...@@ -46,21 +62,34 @@ static struct map_desc mx53_io_desc[] __initdata = { ...@@ -46,21 +62,34 @@ static struct map_desc mx53_io_desc[] __initdata = {
* system startup to create static physical to virtual memory mappings * system startup to create static physical to virtual memory mappings
* for the IO modules. * for the IO modules.
*/ */
void __init mx50_map_io(void)
{
iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc));
}
void __init mx51_map_io(void) void __init mx51_map_io(void)
{ {
iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc));
} }
void __init mx53_map_io(void)
{
iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
}
void __init imx50_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX50);
mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
}
void __init imx51_init_early(void) void __init imx51_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX51); mxc_set_cpu_type(MXC_CPU_MX51);
mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
} imx_idle = imx5_idle;
void __init mx53_map_io(void)
{
iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
} }
void __init imx53_init_early(void) void __init imx53_init_early(void)
...@@ -70,35 +99,19 @@ void __init imx53_init_early(void) ...@@ -70,35 +99,19 @@ void __init imx53_init_early(void)
mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR));
} }
void __init mx51_init_irq(void) void __init mx50_init_irq(void)
{ {
unsigned long tzic_addr; tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
void __iomem *tzic_virt; }
if (mx51_revision() < IMX_CHIP_REVISION_2_0)
tzic_addr = MX51_TZIC_BASE_ADDR_TO1;
else
tzic_addr = MX51_TZIC_BASE_ADDR;
tzic_virt = ioremap(tzic_addr, SZ_16K);
if (!tzic_virt)
panic("unable to map TZIC interrupt controller\n");
tzic_init_irq(tzic_virt); void __init mx51_init_irq(void)
{
tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR));
} }
void __init mx53_init_irq(void) void __init mx53_init_irq(void)
{ {
unsigned long tzic_addr; tzic_init_irq(MX53_IO_ADDRESS(MX53_TZIC_BASE_ADDR));
void __iomem *tzic_virt;
tzic_addr = MX53_TZIC_BASE_ADDR;
tzic_virt = ioremap(tzic_addr, SZ_16K);
if (!tzic_virt)
panic("unable to map TZIC interrupt controller\n");
tzic_init_irq(tzic_virt);
} }
static struct sdma_script_start_addrs imx51_sdma_script __initdata = { static struct sdma_script_start_addrs imx51_sdma_script __initdata = {
...@@ -138,13 +151,24 @@ static struct sdma_platform_data imx53_sdma_pdata __initdata = { ...@@ -138,13 +151,24 @@ static struct sdma_platform_data imx53_sdma_pdata __initdata = {
.script_addrs = &imx53_sdma_script, .script_addrs = &imx53_sdma_script,
}; };
void __init imx50_soc_init(void)
{
/* i.mx50 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
mxc_register_gpio("imx31-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
mxc_register_gpio("imx31-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH);
mxc_register_gpio("imx31-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH);
mxc_register_gpio("imx31-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH);
mxc_register_gpio("imx31-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH);
}
void __init imx51_soc_init(void) void __init imx51_soc_init(void)
{ {
/* i.mx51 has the i.mx31 type gpio */ /* i.mx51 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO1_LOW, MX51_MXC_INT_GPIO1_HIGH); mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH);
mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO2_LOW, MX51_MXC_INT_GPIO2_HIGH); mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH);
mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO3_LOW, MX51_MXC_INT_GPIO3_HIGH); mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH);
mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO4_LOW, MX51_MXC_INT_GPIO4_HIGH); mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH);
/* i.mx51 has the i.mx35 type sdma */ /* i.mx51 has the i.mx35 type sdma */
imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata);
......
...@@ -34,14 +34,12 @@ ...@@ -34,14 +34,12 @@
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "efika.h" #include "efika.h"
#include "cpu_op-mx51.h" #include "cpu_op-mx51.h"
...@@ -133,7 +131,7 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -133,7 +131,7 @@ static int initialize_otg_port(struct platform_device *pdev)
u32 v; u32 v;
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
...@@ -150,7 +148,7 @@ static int initialize_otg_port(struct platform_device *pdev) ...@@ -150,7 +148,7 @@ static int initialize_otg_port(struct platform_device *pdev)
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
...@@ -170,7 +168,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -170,7 +168,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
gpio_set_value(EFIKAMX_USBH1_STP, 1); gpio_set_value(EFIKAMX_USBH1_STP, 1);
msleep(1); msleep(1);
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
/* The clock for the USBH1 ULPI port will come externally */ /* The clock for the USBH1 ULPI port will come externally */
...@@ -189,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -189,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data usbh1_config = { static struct mxc_usbh_platform_data usbh1_config __initdata = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
...@@ -217,9 +215,9 @@ static void __init mx51_efika_usb(void) ...@@ -217,9 +215,9 @@ static void __init mx51_efika_usb(void)
usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
if (usbh1_config.otg) if (usbh1_config.otg)
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
} }
static struct mtd_partition mx51_efika_spi_nor_partitions[] = { static struct mtd_partition mx51_efika_spi_nor_partitions[] = {
...@@ -589,7 +587,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = { ...@@ -589,7 +587,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = 0, .chip_select = 0,
.platform_data = &mx51_efika_mc13892_data, .platform_data = &mx51_efika_mc13892_data,
.irq = gpio_to_irq(EFIKAMX_PMIC), .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC),
}, },
}; };
...@@ -631,4 +629,3 @@ void __init efika_board_common_init(void) ...@@ -631,4 +629,3 @@ void __init efika_board_common_init(void)
get_cpu_op = mx51_get_cpu_op; get_cpu_op = mx51_get_cpu_op;
#endif #endif
} }
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#include <linux/err.h> #include <linux/err.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <mach/system.h> #include <mach/common.h>
#include <mach/hardware.h>
#include "crm_regs.h" #include "crm_regs.h"
static struct clk *gpc_dvfs_clk; static struct clk *gpc_dvfs_clk;
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h>
#include "crm_regs.h" #include "crm_regs.h"
/* set cpu low power mode before WFI instruction. This function is called /* set cpu low power mode before WFI instruction. This function is called
......
# Common support # Common support
obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o mm.o
obj-$(CONFIG_MXS_OCOTP) += ocotp.o obj-$(CONFIG_MXS_OCOTP) += ocotp.o
obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_SOC_IMX23) += clock-mx23.o mm-mx23.o obj-$(CONFIG_SOC_IMX23) += clock-mx23.o
obj-$(CONFIG_SOC_IMX28) += clock-mx28.o mm-mx28.o obj-$(CONFIG_SOC_IMX28) += clock-mx28.o
obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
......
/* /* empty */
* Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2008 Juergen Beisert, kernel@pengutronix.de
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef __MACH_MXS_GPIO_H__
#define __MACH_MXS_GPIO_H__
#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
#endif /* __MACH_MXS_GPIO_H__ */
...@@ -86,6 +86,8 @@ ...@@ -86,6 +86,8 @@
.type = _type, \ .type = _type, \
} }
#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
#define MXS_SET_ADDR 0x4 #define MXS_SET_ADDR 0x4
#define MXS_CLR_ADDR 0x8 #define MXS_CLR_ADDR 0x8
#define MXS_TOG_ADDR 0xc #define MXS_TOG_ADDR 0xc
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -182,6 +181,6 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK") ...@@ -182,6 +181,6 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.map_io = mx23_map_io, .map_io = mx23_map_io,
.init_irq = mx23_init_irq, .init_irq = mx23_init_irq,
.init_machine = mx23evk_init,
.timer = &mx23evk_timer, .timer = &mx23evk_timer,
.init_machine = mx23evk_init,
MACHINE_END MACHINE_END
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/irq.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -352,6 +351,11 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = { ...@@ -352,6 +351,11 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
}, },
}; };
static struct gpio mx28evk_lcd_gpios[] = {
{ MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
{ MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
};
static void __init mx28evk_init(void) static void __init mx28evk_init(void)
{ {
int ret; int ret;
...@@ -378,18 +382,11 @@ static void __init mx28evk_init(void) ...@@ -378,18 +382,11 @@ static void __init mx28evk_init(void)
mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
} }
ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); ret = gpio_request_array(mx28evk_lcd_gpios,
if (ret) ARRAY_SIZE(mx28evk_lcd_gpios));
pr_warn("failed to request gpio lcd-enable: %d\n", ret);
else
gpio_set_value(MX28EVK_LCD_ENABLE, 1);
ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable");
if (ret) if (ret)
pr_warn("failed to request gpio bl-enable: %d\n", ret); pr_warn("failed to request gpio pins for lcd: %d\n", ret);
else else
gpio_set_value(MX28EVK_BL_ENABLE, 1);
mx28_add_mxsfb(&mx28evk_mxsfb_pdata); mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
/* power on mmc slot by writing 0 to the gpio */ /* power on mmc slot by writing 0 to the gpio */
...@@ -403,6 +400,7 @@ static void __init mx28evk_init(void) ...@@ -403,6 +400,7 @@ static void __init mx28evk_init(void)
"mmc1-slot-power"); "mmc1-slot-power");
if (ret) if (ret)
pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
else
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
gpio_led_register_device(0, &mx28evk_led_data); gpio_led_register_device(0, &mx28evk_led_data);
...@@ -421,6 +419,6 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK") ...@@ -421,6 +419,6 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.map_io = mx28_map_io, .map_io = mx28_map_io,
.init_irq = mx28_init_irq, .init_irq = mx28_init_irq,
.init_machine = mx28evk_init,
.timer = &mx28evk_timer, .timer = &mx28evk_timer,
.init_machine = mx28evk_init,
MACHINE_END MACHINE_END
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -175,6 +175,6 @@ static struct sys_timer tx28_timer = { ...@@ -175,6 +175,6 @@ static struct sys_timer tx28_timer = {
MACHINE_START(TX28, "Ka-Ro electronics TX28 module") MACHINE_START(TX28, "Ka-Ro electronics TX28 module")
.map_io = mx28_map_io, .map_io = mx28_map_io,
.init_irq = mx28_init_irq, .init_irq = mx28_init_irq,
.init_machine = tx28_stk5v3_init,
.timer = &tx28_timer, .timer = &tx28_timer,
.init_machine = tx28_stk5v3_init,
MACHINE_END MACHINE_END
/*
* Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*
* Create static mapping between physical to virtual memory.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/mach/map.h>
#include <mach/mx23.h>
#include <mach/common.h>
#include <mach/iomux.h>
/*
* Define the MX23 memory map.
*/
static struct map_desc mx23_io_desc[] __initdata = {
mxs_map_entry(MX23, OCRAM, MT_DEVICE),
mxs_map_entry(MX23, IO, MT_DEVICE),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx23_map_io(void)
{
iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc));
}
void __init mx23_init_irq(void)
{
icoll_init_irq();
}
...@@ -16,10 +16,19 @@ ...@@ -16,10 +16,19 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/mx23.h>
#include <mach/mx28.h> #include <mach/mx28.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/iomux.h> #include <mach/iomux.h>
/*
* Define the MX23 memory map.
*/
static struct map_desc mx23_io_desc[] __initdata = {
mxs_map_entry(MX23, OCRAM, MT_DEVICE),
mxs_map_entry(MX23, IO, MT_DEVICE),
};
/* /*
* Define the MX28 memory map. * Define the MX28 memory map.
*/ */
...@@ -33,6 +42,16 @@ static struct map_desc mx28_io_desc[] __initdata = { ...@@ -33,6 +42,16 @@ static struct map_desc mx28_io_desc[] __initdata = {
* system startup to create static physical to virtual memory mappings * system startup to create static physical to virtual memory mappings
* for the IO modules. * for the IO modules.
*/ */
void __init mx23_map_io(void)
{
iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc));
}
void __init mx23_init_irq(void)
{
icoll_init_irq();
}
void __init mx28_map_io(void) void __init mx28_map_io(void)
{ {
iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc)); iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
static int dsp_use; static int dsp_use;
static struct clk *api_clk; static struct clk *api_clk;
static struct clk *dsp_clk; static struct clk *dsp_clk;
static struct platform_device **omap_mcbsp_devices;
static void omap1_mcbsp_request(unsigned int id) static void omap1_mcbsp_request(unsigned int id)
{ {
...@@ -78,6 +79,17 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = { ...@@ -78,6 +79,17 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
.free = omap1_mcbsp_free, .free = omap1_mcbsp_free,
}; };
#define OMAP7XX_MCBSP1_BASE 0xfffb1000
#define OMAP7XX_MCBSP2_BASE 0xfffb1800
#define OMAP1510_MCBSP1_BASE 0xe1011800
#define OMAP1510_MCBSP2_BASE 0xfffb1000
#define OMAP1510_MCBSP3_BASE 0xe1017000
#define OMAP1610_MCBSP1_BASE 0xe1011800
#define OMAP1610_MCBSP2_BASE 0xfffb1000
#define OMAP1610_MCBSP3_BASE 0xe1017000
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
struct resource omap7xx_mcbsp_res[][6] = { struct resource omap7xx_mcbsp_res[][6] = {
{ {
...@@ -369,6 +381,39 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { ...@@ -369,6 +381,39 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
#define OMAP16XX_MCBSP_COUNT 0 #define OMAP16XX_MCBSP_COUNT 0
#endif #endif
static void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
struct omap_mcbsp_platform_data *config, int size)
{
int i;
omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *),
GFP_KERNEL);
if (!omap_mcbsp_devices) {
printk(KERN_ERR "Could not register McBSP devices\n");
return;
}
for (i = 0; i < size; i++) {
struct platform_device *new_mcbsp;
int ret;
new_mcbsp = platform_device_alloc("omap-mcbsp", i + 1);
if (!new_mcbsp)
continue;
platform_device_add_resources(new_mcbsp, &res[i * res_count],
res_count);
config[i].reg_size = 2;
config[i].reg_step = 2;
new_mcbsp->dev.platform_data = &config[i];
ret = platform_device_add(new_mcbsp);
if (ret) {
platform_device_put(new_mcbsp);
continue;
}
omap_mcbsp_devices[i] = new_mcbsp;
}
}
static int __init omap1_mcbsp_init(void) static int __init omap1_mcbsp_init(void)
{ {
if (!cpu_class_is_omap1()) if (!cpu_class_is_omap1())
......
...@@ -116,9 +116,12 @@ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ ...@@ -116,9 +116,12 @@ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \
obj-$(CONFIG_ARCH_OMAP2) += clockdomain.o \ obj-$(CONFIG_ARCH_OMAP2) += clockdomain.o \
clockdomain2xxx_3xxx.o \ clockdomain2xxx_3xxx.o \
clockdomains2xxx_3xxx_data.o clockdomains2xxx_3xxx_data.o
obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o
obj-$(CONFIG_ARCH_OMAP3) += clockdomain.o \ obj-$(CONFIG_ARCH_OMAP3) += clockdomain.o \
clockdomain2xxx_3xxx.o \ clockdomain2xxx_3xxx.o \
clockdomains2xxx_3xxx_data.o clockdomains2xxx_3xxx_data.o \
clockdomains3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += clockdomain.o \ obj-$(CONFIG_ARCH_OMAP4) += clockdomain.o \
clockdomain44xx.o \ clockdomain44xx.o \
clockdomains44xx_data.o clockdomains44xx_data.o
...@@ -185,75 +188,62 @@ endif ...@@ -185,75 +188,62 @@ endif
# Specific board support # Specific board support
obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \ obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o
hsmmc.o
obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o
hsmmc.o obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o
obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o \ obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o
hsmmc.o obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o
obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o
board-flash.o \ obj-$(CONFIG_MACH_ENCORE) += board-omap3encore.o
hsmmc.o obj-$(CONFIG_MACH_OVERO) += board-overo.o
obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o \ obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o
hsmmc.o obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o
obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o \ obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o
hsmmc.o
obj-$(CONFIG_MACH_OVERO) += board-overo.o \
hsmmc.o
obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \
hsmmc.o
obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \
hsmmc.o
obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \
hsmmc.o \
board-flash.o
obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o \ obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o \
sdram-nokia.o \ sdram-nokia.o
hsmmc.o
obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
sdram-nokia.o \ sdram-nokia.o \
board-rx51-peripherals.o \ board-rx51-peripherals.o \
board-rx51-video.o \ board-rx51-video.o
hsmmc.o
obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o \ obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o \
board-zoom-peripherals.o \ board-zoom-peripherals.o \
board-zoom-display.o \ board-zoom-display.o \
board-flash.o \
hsmmc.o \
board-zoom-debugboard.o board-zoom-debugboard.o
obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o \ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o \
board-zoom-peripherals.o \ board-zoom-peripherals.o \
board-zoom-display.o \ board-zoom-display.o \
board-flash.o \
hsmmc.o \
board-zoom-debugboard.o board-zoom-debugboard.o
obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \ obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \
board-zoom-peripherals.o \ board-zoom-peripherals.o \
board-zoom-display.o \ board-zoom-display.o
board-flash.o \ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o
hsmmc.o
obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \
hsmmc.o
obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o
obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o
hsmmc.o obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
hsmmc.o obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
hsmmc.o obj-$(CONFIG_MACH_PCM049) += board-omap4pcm049.o
obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \
hsmmc.o
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o
obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \ obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o
hsmmc.o
obj-$(CONFIG_MACH_TI8168EVM) += board-ti8168evm.o obj-$(CONFIG_MACH_TI8168EVM) += board-ti8168evm.o
# Platform specific device init code # Platform specific device init code
omap-flash-$(CONFIG_MTD_NAND_OMAP2) := board-flash.o
omap-flash-$(CONFIG_MTD_ONENAND_OMAP2) := board-flash.o
obj-y += $(omap-flash-y) $(omap-flash-m)
omap-hsmmc-$(CONFIG_MMC_OMAP_HS) := hsmmc.o
obj-y += $(omap-hsmmc-m) $(omap-hsmmc-y)
usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o
obj-y += $(usbfs-m) $(usbfs-y) obj-y += $(usbfs-m) $(usbfs-y)
obj-y += usb-musb.o obj-y += usb-musb.o
......
...@@ -192,12 +192,6 @@ static inline void board_smc91x_init(void) ...@@ -192,12 +192,6 @@ static inline void board_smc91x_init(void)
#endif #endif
static void __init omap_2430sdp_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = { static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
...@@ -284,6 +278,7 @@ static void __init omap_2430sdp_init(void) ...@@ -284,6 +278,7 @@ static void __init omap_2430sdp_init(void)
platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
omap2_usbfs_init(&sdp2430_usb_config); omap2_usbfs_init(&sdp2430_usb_config);
...@@ -299,18 +294,12 @@ static void __init omap_2430sdp_init(void) ...@@ -299,18 +294,12 @@ static void __init omap_2430sdp_init(void)
sdp2430_display_init(); sdp2430_display_init();
} }
static void __init omap_2430sdp_map_io(void)
{
omap2_set_globals_243x();
omap243x_map_common_io();
}
MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
/* Maintainer: Syed Khasim - Texas Instruments Inc */ /* Maintainer: Syed Khasim - Texas Instruments Inc */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_2430sdp_map_io, .map_io = omap243x_map_io,
.init_early = omap_2430sdp_init_early, .init_early = omap2430_init_early,
.init_irq = omap2_init_irq, .init_irq = omap2_init_irq,
.init_machine = omap_2430sdp_init, .init_machine = omap_2430sdp_init,
.timer = &omap2_timer, .timer = &omap2_timer,
......
...@@ -224,12 +224,6 @@ static struct omap_dss_board_info sdp3430_dss_data = { ...@@ -224,12 +224,6 @@ static struct omap_dss_board_info sdp3430_dss_data = {
static struct omap_board_config_kernel sdp3430_config[] __initdata = { static struct omap_board_config_kernel sdp3430_config[] __initdata = {
}; };
static void __init omap_3430sdp_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
}
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
{ {
.mmc = 1, .mmc = 1,
...@@ -718,6 +712,7 @@ static void __init omap_3430sdp_init(void) ...@@ -718,6 +712,7 @@ static void __init omap_3430sdp_init(void)
gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV1; gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV1;
omap_ads7846_init(1, gpio_pendown, 310, NULL); omap_ads7846_init(1, gpio_pendown, 310, NULL);
board_serial_init(); board_serial_init();
omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
usb_musb_init(NULL); usb_musb_init(NULL);
board_smc91x_init(); board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0); board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
...@@ -731,7 +726,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") ...@@ -731,7 +726,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_3430sdp_init_early, .init_early = omap3430_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_3430sdp_init, .init_machine = omap_3430sdp_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -70,13 +70,6 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = { ...@@ -70,13 +70,6 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
static struct omap_board_config_kernel sdp_config[] __initdata = { static struct omap_board_config_kernel sdp_config[] __initdata = {
}; };
static void __init omap_sdp_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
h8mbx00u0mer0em_sdrc_params);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR }, { .reg_offset = OMAP_MUX_TERMINATOR },
...@@ -207,6 +200,8 @@ static void __init omap_sdp_init(void) ...@@ -207,6 +200,8 @@ static void __init omap_sdp_init(void)
omap_board_config = sdp_config; omap_board_config = sdp_config;
omap_board_config_size = ARRAY_SIZE(sdp_config); omap_board_config_size = ARRAY_SIZE(sdp_config);
zoom_peripherals_init(); zoom_peripherals_init();
omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
h8mbx00u0mer0em_sdrc_params);
zoom_display_init(); zoom_display_init();
board_smc91x_init(); board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16); board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
...@@ -218,7 +213,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") ...@@ -218,7 +213,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_sdp_init_early, .init_early = omap3630_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_sdp_init, .init_machine = omap_sdp_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -379,12 +379,6 @@ static struct platform_device *sdp4430_devices[] __initdata = { ...@@ -379,12 +379,6 @@ static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_vbat, &sdp4430_vbat,
}; };
static void __init omap_4430sdp_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static struct omap_musb_board_data musb_board_data = { static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_UTMI, .interface_type = MUSB_INTERFACE_UTMI,
.mode = MUSB_OTG, .mode = MUSB_OTG,
...@@ -961,6 +955,7 @@ static void __init omap_4430sdp_init(void) ...@@ -961,6 +955,7 @@ static void __init omap_4430sdp_init(void)
omap_sfh7741prox_init(); omap_sfh7741prox_init();
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
board_serial_init(); board_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_sdp4430_wifi_init(); omap4_sdp4430_wifi_init();
omap4_twl6030_hsmmc_init(mmc); omap4_twl6030_hsmmc_init(mmc);
...@@ -982,18 +977,12 @@ static void __init omap_4430sdp_init(void) ...@@ -982,18 +977,12 @@ static void __init omap_4430sdp_init(void)
omap_4430sdp_display_init(); omap_4430sdp_display_init();
} }
static void __init omap_4430sdp_map_io(void)
{
omap2_set_globals_443x();
omap44xx_map_common_io();
}
MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_4430sdp_map_io, .map_io = omap4_map_io,
.init_early = omap_4430sdp_init_early, .init_early = omap4430_init_early,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
.init_machine = omap_4430sdp_init, .init_machine = omap_4430sdp_init,
.timer = &omap4_timer, .timer = &omap4_timer,
......
...@@ -47,12 +47,6 @@ static struct omap_board_mux board_mux[] __initdata = { ...@@ -47,12 +47,6 @@ static struct omap_board_mux board_mux[] __initdata = {
}; };
#endif #endif
static void __init am3517_crane_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static struct usbhs_omap_board_data usbhs_bdata __initdata = { static struct usbhs_omap_board_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
...@@ -70,6 +64,7 @@ static void __init am3517_crane_init(void) ...@@ -70,6 +64,7 @@ static void __init am3517_crane_init(void)
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap_board_config = am3517_crane_config; omap_board_config = am3517_crane_config;
omap_board_config_size = ARRAY_SIZE(am3517_crane_config); omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
...@@ -101,7 +96,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") ...@@ -101,7 +96,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = am3517_crane_init_early, .init_early = am35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = am3517_crane_init, .init_machine = am3517_crane_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -362,11 +362,6 @@ static struct omap_dss_board_info am3517_evm_dss_data = { ...@@ -362,11 +362,6 @@ static struct omap_dss_board_info am3517_evm_dss_data = {
/* /*
* Board initialization * Board initialization
*/ */
static void __init am3517_evm_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static struct omap_musb_board_data musb_board_data = { static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI, .interface_type = MUSB_INTERFACE_ULPI,
...@@ -469,6 +464,7 @@ static void __init am3517_evm_init(void) ...@@ -469,6 +464,7 @@ static void __init am3517_evm_init(void)
am3517_evm_i2c_init(); am3517_evm_i2c_init();
omap_display_init(&am3517_evm_dss_data); omap_display_init(&am3517_evm_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
/* Configure GPIO for EHCI port */ /* Configure GPIO for EHCI port */
omap_mux_init_gpio(57, OMAP_PIN_OUTPUT); omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
...@@ -493,7 +489,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") ...@@ -493,7 +489,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = am3517_evm_init_early, .init_early = am35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = am3517_evm_init, .init_machine = am3517_evm_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -284,12 +284,6 @@ static struct omap_dss_board_info apollon_dss_data = { ...@@ -284,12 +284,6 @@ static struct omap_dss_board_info apollon_dss_data = {
.default_device = &apollon_lcd_device, .default_device = &apollon_lcd_device,
}; };
static void __init omap_apollon_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static struct gpio apollon_gpio_leds[] __initdata = { static struct gpio apollon_gpio_leds[] __initdata = {
{ LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */ { LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */
{ LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6 */ { LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6 */
...@@ -349,22 +343,16 @@ static void __init omap_apollon_init(void) ...@@ -349,22 +343,16 @@ static void __init omap_apollon_init(void)
*/ */
platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap_display_init(&apollon_dss_data); omap_display_init(&apollon_dss_data);
} }
static void __init omap_apollon_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}
MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_apollon_map_io, .map_io = omap242x_map_io,
.init_early = omap_apollon_init_early, .init_early = omap2420_init_early,
.init_irq = omap2_init_irq, .init_irq = omap2_init_irq,
.init_machine = omap_apollon_init, .init_machine = omap_apollon_init,
.timer = &omap2_timer, .timer = &omap2_timer,
......
...@@ -471,13 +471,6 @@ static void __init cm_t35_init_i2c(void) ...@@ -471,13 +471,6 @@ static void __init cm_t35_init_i2c(void)
omap3_pmic_init("tps65930", &cm_t35_twldata); omap3_pmic_init("tps65930", &cm_t35_twldata);
} }
static void __init cm_t35_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
/* nCS and IRQ for CM-T35 ethernet */ /* nCS and IRQ for CM-T35 ethernet */
...@@ -610,6 +603,8 @@ static void __init cm_t3x_common_init(void) ...@@ -610,6 +603,8 @@ static void __init cm_t3x_common_init(void)
omap_board_config_size = ARRAY_SIZE(cm_t35_config); omap_board_config_size = ARRAY_SIZE(cm_t35_config);
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
cm_t35_init_i2c(); cm_t35_init_i2c();
omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL); omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
cm_t35_init_ethernet(); cm_t35_init_ethernet();
...@@ -637,7 +632,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35") ...@@ -637,7 +632,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = cm_t35_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = cm_t35_init, .init_machine = cm_t35_init,
.timer = &omap3_timer, .timer = &omap3_timer,
...@@ -647,7 +642,7 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730") ...@@ -647,7 +642,7 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = cm_t35_init_early, .init_early = omap3630_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = cm_t3730_init, .init_machine = cm_t3730_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -251,12 +251,6 @@ static inline void cm_t3517_init_nand(void) {} ...@@ -251,12 +251,6 @@ static inline void cm_t3517_init_nand(void) {}
static struct omap_board_config_kernel cm_t3517_config[] __initdata = { static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
}; };
static void __init cm_t3517_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
/* GPIO186 - Green LED */ /* GPIO186 - Green LED */
...@@ -289,6 +283,7 @@ static void __init cm_t3517_init(void) ...@@ -289,6 +283,7 @@ static void __init cm_t3517_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap_board_config = cm_t3517_config; omap_board_config = cm_t3517_config;
omap_board_config_size = ARRAY_SIZE(cm_t3517_config); omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
cm_t3517_init_leds(); cm_t3517_init_leds();
...@@ -302,7 +297,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") ...@@ -302,7 +297,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = cm_t3517_init_early, .init_early = am35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = cm_t3517_init, .init_machine = cm_t3517_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -397,19 +397,6 @@ static struct platform_device keys_gpio = { ...@@ -397,19 +397,6 @@ static struct platform_device keys_gpio = {
}, },
}; };
static void __init devkit8000_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
}
static void __init devkit8000_init_irq(void)
{
omap3_init_irq();
}
#define OMAP_DM9000_BASE 0x2c000000 #define OMAP_DM9000_BASE 0x2c000000
static struct resource omap_dm9000_resources[] = { static struct resource omap_dm9000_resources[] = {
...@@ -645,6 +632,8 @@ static void __init devkit8000_init(void) ...@@ -645,6 +632,8 @@ static void __init devkit8000_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_dm9000_init(); omap_dm9000_init();
...@@ -670,8 +659,8 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") ...@@ -670,8 +659,8 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = devkit8000_init_early, .init_early = omap35xx_init_early,
.init_irq = devkit8000_init_irq, .init_irq = omap3_init_irq,
.init_machine = devkit8000_init, .init_machine = devkit8000_init,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -148,11 +148,6 @@ __init board_nand_init(struct mtd_partition *nand_parts, ...@@ -148,11 +148,6 @@ __init board_nand_init(struct mtd_partition *nand_parts,
board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs; board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
gpmc_nand_init(&board_nand_data); gpmc_nand_init(&board_nand_data);
} }
#else
void
__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, int nand_type)
{
}
#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
/** /**
......
...@@ -24,7 +24,26 @@ struct flash_partitions { ...@@ -24,7 +24,26 @@ struct flash_partitions {
int nr_parts; int nr_parts;
}; };
#if defined(CONFIG_MTD_NAND_OMAP2) || \
defined(CONFIG_MTD_NAND_OMAP2_MODULE) || \
defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
extern void board_flash_init(struct flash_partitions [], extern void board_flash_init(struct flash_partitions [],
char chip_sel[][GPMC_CS_NUM], int nand_type); char chip_sel[][GPMC_CS_NUM], int nand_type);
#else
static inline void board_flash_init(struct flash_partitions part[],
char chip_sel[][GPMC_CS_NUM], int nand_type)
{
}
#endif
#if defined(CONFIG_MTD_NAND_OMAP2) || \
defined(CONFIG_MTD_NAND_OMAP2_MODULE)
extern void board_nand_init(struct mtd_partition *nand_parts, extern void board_nand_init(struct mtd_partition *nand_parts,
u8 nr_parts, u8 cs, int nand_type); u8 nr_parts, u8 cs, int nand_type);
#else
static inline void board_nand_init(struct mtd_partition *nand_parts,
u8 nr_parts, u8 cs, int nand_type)
{
}
#endif
...@@ -35,12 +35,12 @@ static struct omap_board_config_kernel generic_config[] = { ...@@ -35,12 +35,12 @@ static struct omap_board_config_kernel generic_config[] = {
static void __init omap_generic_init_early(void) static void __init omap_generic_init_early(void)
{ {
omap2_init_common_infrastructure(); omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
} }
static void __init omap_generic_init(void) static void __init omap_generic_init(void)
{ {
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap_board_config = generic_config; omap_board_config = generic_config;
omap_board_config_size = ARRAY_SIZE(generic_config); omap_board_config_size = ARRAY_SIZE(generic_config);
} }
......
...@@ -300,17 +300,6 @@ static struct omap_usb_config h4_usb_config __initdata = { ...@@ -300,17 +300,6 @@ static struct omap_usb_config h4_usb_config __initdata = {
.hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
}; };
static void __init omap_h4_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static void __init omap_h4_init_irq(void)
{
omap2_init_irq();
}
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,
...@@ -378,24 +367,19 @@ static void __init omap_h4_init(void) ...@@ -378,24 +367,19 @@ static void __init omap_h4_init(void)
platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
omap2_usbfs_init(&h4_usb_config); omap2_usbfs_init(&h4_usb_config);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
h4_init_flash(); h4_init_flash();
omap_display_init(&h4_dss_data); omap_display_init(&h4_dss_data);
} }
static void __init omap_h4_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}
MACHINE_START(OMAP_H4, "OMAP2420 H4 board") MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_h4_map_io, .map_io = omap242x_map_io,
.init_early = omap_h4_init_early, .init_early = omap2420_init_early,
.init_irq = omap_h4_init_irq, .init_irq = omap2_init_irq,
.init_machine = omap_h4_init, .init_machine = omap_h4_init,
.timer = &omap2_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
...@@ -491,13 +491,6 @@ static struct platform_device *igep_devices[] __initdata = { ...@@ -491,13 +491,6 @@ static struct platform_device *igep_devices[] __initdata = {
&igep_vwlan_device, &igep_vwlan_device,
}; };
static void __init igep_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(m65kxxxxam_sdrc_params,
m65kxxxxam_sdrc_params);
}
static int igep2_keymap[] = { static int igep2_keymap[] = {
KEY(0, 0, KEY_LEFT), KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT), KEY(0, 1, KEY_RIGHT),
...@@ -650,6 +643,8 @@ static void __init igep_init(void) ...@@ -650,6 +643,8 @@ static void __init igep_init(void)
igep_i2c_init(); igep_i2c_init();
platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices)); platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
omap_serial_init(); omap_serial_init();
omap_sdrc_init(m65kxxxxam_sdrc_params,
m65kxxxxam_sdrc_params);
usb_musb_init(NULL); usb_musb_init(NULL);
igep_flash_init(); igep_flash_init();
...@@ -675,7 +670,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board") ...@@ -675,7 +670,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = igep_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = igep_init, .init_machine = igep_init,
.timer = &omap3_timer, .timer = &omap3_timer,
...@@ -685,7 +680,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") ...@@ -685,7 +680,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = igep_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = igep_init, .init_machine = igep_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -251,12 +251,6 @@ static void __init ldp_display_init(void) ...@@ -251,12 +251,6 @@ static void __init ldp_display_init(void)
omap_display_init(&ldp_dss_data); omap_display_init(&ldp_dss_data);
} }
static void __init omap_ldp_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
{ {
int r; int r;
...@@ -425,6 +419,7 @@ static void __init omap_ldp_init(void) ...@@ -425,6 +419,7 @@ static void __init omap_ldp_init(void)
platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
omap_ads7846_init(1, 54, 310, NULL); omap_ads7846_init(1, 54, 310, NULL);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
usb_musb_init(NULL); usb_musb_init(NULL);
board_nand_init(ldp_nand_partitions, board_nand_init(ldp_nand_partitions,
ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
...@@ -437,7 +432,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") ...@@ -437,7 +432,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_ldp_init_early, .init_early = omap3430_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_ldp_init, .init_machine = omap_ldp_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -616,18 +616,6 @@ static struct i2c_board_info n810_i2c_board_info_2[] __initdata = { ...@@ -616,18 +616,6 @@ static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
}, },
}; };
static void __init n8x0_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}
static void __init n8x0_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
/* I2S codec port pins for McBSP block */ /* I2S codec port pins for McBSP block */
...@@ -689,6 +677,7 @@ static void __init n8x0_init_machine(void) ...@@ -689,6 +677,7 @@ static void __init n8x0_init_machine(void)
i2c_register_board_info(2, n810_i2c_board_info_2, i2c_register_board_info(2, n810_i2c_board_info_2,
ARRAY_SIZE(n810_i2c_board_info_2)); ARRAY_SIZE(n810_i2c_board_info_2));
board_serial_init(); board_serial_init();
omap_sdrc_init(NULL, NULL);
gpmc_onenand_init(board_onenand_data); gpmc_onenand_init(board_onenand_data);
n8x0_mmc_init(); n8x0_mmc_init();
n8x0_usb_init(); n8x0_usb_init();
...@@ -697,8 +686,8 @@ static void __init n8x0_init_machine(void) ...@@ -697,8 +686,8 @@ static void __init n8x0_init_machine(void)
MACHINE_START(NOKIA_N800, "Nokia N800") MACHINE_START(NOKIA_N800, "Nokia N800")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = n8x0_map_io, .map_io = omap242x_map_io,
.init_early = n8x0_init_early, .init_early = omap2420_init_early,
.init_irq = omap2_init_irq, .init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.timer = &omap2_timer, .timer = &omap2_timer,
...@@ -707,8 +696,8 @@ MACHINE_END ...@@ -707,8 +696,8 @@ MACHINE_END
MACHINE_START(NOKIA_N810, "Nokia N810") MACHINE_START(NOKIA_N810, "Nokia N810")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = n8x0_map_io, .map_io = omap242x_map_io,
.init_early = n8x0_init_early, .init_early = omap2420_init_early,
.init_irq = omap2_init_irq, .init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.timer = &omap2_timer, .timer = &omap2_timer,
...@@ -717,8 +706,8 @@ MACHINE_END ...@@ -717,8 +706,8 @@ MACHINE_END
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = n8x0_map_io, .map_io = omap242x_map_io,
.init_early = n8x0_init_early, .init_early = omap2420_init_early,
.init_irq = omap2_init_irq, .init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.timer = &omap2_timer, .timer = &omap2_timer,
......
...@@ -447,13 +447,6 @@ static struct platform_device keys_gpio = { ...@@ -447,13 +447,6 @@ static struct platform_device keys_gpio = {
static void __init omap3_beagle_init_early(void) static void __init omap3_beagle_init_early(void)
{ {
omap2_init_common_infrastructure(); omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
}
static void __init omap3_beagle_init_irq(void)
{
omap3_init_irq();
} }
static struct platform_device *omap3_beagle_devices[] __initdata = { static struct platform_device *omap3_beagle_devices[] __initdata = {
...@@ -534,6 +527,8 @@ static void __init omap3_beagle_init(void) ...@@ -534,6 +527,8 @@ static void __init omap3_beagle_init(void)
ARRAY_SIZE(omap3_beagle_devices)); ARRAY_SIZE(omap3_beagle_devices));
omap_display_init(&beagle_dss_data); omap_display_init(&beagle_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_mux_init_gpio(170, OMAP_PIN_INPUT); omap_mux_init_gpio(170, OMAP_PIN_INPUT);
/* REVISIT leave DVI powered down until it's needed ... */ /* REVISIT leave DVI powered down until it's needed ... */
...@@ -561,7 +556,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") ...@@ -561,7 +556,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3_beagle_init_early, .init_early = omap3_beagle_init_early,
.init_irq = omap3_beagle_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3_beagle_init, .init_machine = omap3_beagle_init,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -519,12 +519,6 @@ static int __init omap3_evm_i2c_init(void) ...@@ -519,12 +519,6 @@ static int __init omap3_evm_i2c_init(void)
static struct omap_board_config_kernel omap3_evm_config[] __initdata = { static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
}; };
static void __init omap3_evm_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
}
static struct usbhs_omap_board_data usbhs_bdata __initdata = { static struct usbhs_omap_board_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
...@@ -639,6 +633,7 @@ static void __init omap3_evm_init(void) ...@@ -639,6 +633,7 @@ static void __init omap3_evm_init(void)
omap_display_init(&omap3_evm_dss_data); omap_display_init(&omap3_evm_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */ /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
usb_nop_xceiv_register(); usb_nop_xceiv_register();
...@@ -683,7 +678,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") ...@@ -683,7 +678,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3_evm_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3_evm_init, .init_machine = omap3_evm_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -182,12 +182,6 @@ static inline void __init board_smsc911x_init(void) ...@@ -182,12 +182,6 @@ static inline void __init board_smsc911x_init(void)
gpmc_smsc911x_init(&board_smsc911x_data); gpmc_smsc911x_init(&board_smsc911x_data);
} }
static void __init omap3logic_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR }, { .reg_offset = OMAP_MUX_TERMINATOR },
...@@ -200,6 +194,7 @@ static void __init omap3logic_init(void) ...@@ -200,6 +194,7 @@ static void __init omap3logic_init(void)
omap3torpedo_fix_pbias_voltage(); omap3torpedo_fix_pbias_voltage();
omap3logic_i2c_init(); omap3logic_i2c_init();
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
board_mmc_init(); board_mmc_init();
board_smsc911x_init(); board_smsc911x_init();
...@@ -211,7 +206,7 @@ static void __init omap3logic_init(void) ...@@ -211,7 +206,7 @@ static void __init omap3logic_init(void)
MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3logic_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3logic_init, .init_machine = omap3logic_init,
.timer = &omap3_timer, .timer = &omap3_timer,
...@@ -220,7 +215,7 @@ MACHINE_END ...@@ -220,7 +215,7 @@ MACHINE_END
MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3logic_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3logic_init, .init_machine = omap3logic_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -525,13 +525,6 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { ...@@ -525,13 +525,6 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
} }
}; };
static void __init omap3pandora_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
}
static void __init pandora_wl1251_init(void) static void __init pandora_wl1251_init(void)
{ {
struct wl12xx_platform_data pandora_wl1251_pdata; struct wl12xx_platform_data pandora_wl1251_pdata;
...@@ -593,6 +586,8 @@ static void __init omap3pandora_init(void) ...@@ -593,6 +586,8 @@ static void __init omap3pandora_init(void)
ARRAY_SIZE(omap3pandora_devices)); ARRAY_SIZE(omap3pandora_devices));
omap_display_init(&pandora_dss_data); omap_display_init(&pandora_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
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));
omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL); omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
...@@ -609,7 +604,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") ...@@ -609,7 +604,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3pandora_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3pandora_init, .init_machine = omap3pandora_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -394,17 +394,6 @@ static int __init omap3_stalker_i2c_init(void) ...@@ -394,17 +394,6 @@ static int __init omap3_stalker_i2c_init(void)
static struct omap_board_config_kernel omap3_stalker_config[] __initdata = { static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
}; };
static void __init omap3_stalker_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
}
static void __init omap3_stalker_init_irq(void)
{
omap3_init_irq();
}
static struct platform_device *omap3_stalker_devices[] __initdata = { static struct platform_device *omap3_stalker_devices[] __initdata = {
&keys_gpio, &keys_gpio,
}; };
...@@ -444,6 +433,7 @@ static void __init omap3_stalker_init(void) ...@@ -444,6 +433,7 @@ static void __init omap3_stalker_init(void)
omap_display_init(&omap3_stalker_dss_data); omap_display_init(&omap3_stalker_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
usb_musb_init(NULL); usb_musb_init(NULL);
usbhs_init(&usbhs_bdata); usbhs_init(&usbhs_bdata);
omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL); omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
...@@ -462,8 +452,8 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") ...@@ -462,8 +452,8 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
/* Maintainer: Jason Lam -lzg@ema-tech.com */ /* Maintainer: Jason Lam -lzg@ema-tech.com */
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3_stalker_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_stalker_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3_stalker_init, .init_machine = omap3_stalker_init,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -311,18 +311,6 @@ static struct omap_board_mux board_mux[] __initdata = { ...@@ -311,18 +311,6 @@ static struct omap_board_mux board_mux[] __initdata = {
}; };
#endif #endif
static void __init omap3_touchbook_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
}
static void __init omap3_touchbook_init_irq(void)
{
omap3_init_irq();
}
static struct platform_device *omap3_touchbook_devices[] __initdata = { static struct platform_device *omap3_touchbook_devices[] __initdata = {
&leds_gpio, &leds_gpio,
&keys_gpio, &keys_gpio,
...@@ -367,6 +355,8 @@ static void __init omap3_touchbook_init(void) ...@@ -367,6 +355,8 @@ static void __init omap3_touchbook_init(void)
platform_add_devices(omap3_touchbook_devices, platform_add_devices(omap3_touchbook_devices,
ARRAY_SIZE(omap3_touchbook_devices)); ARRAY_SIZE(omap3_touchbook_devices));
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_mux_init_gpio(170, OMAP_PIN_INPUT); omap_mux_init_gpio(170, OMAP_PIN_INPUT);
/* REVISIT leave DVI powered down until it's needed ... */ /* REVISIT leave DVI powered down until it's needed ... */
...@@ -389,8 +379,8 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") ...@@ -389,8 +379,8 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3_touchbook_init_early, .init_early = omap3430_init_early,
.init_irq = omap3_touchbook_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3_touchbook_init, .init_machine = omap3_touchbook_init,
.timer = &omap3_secure_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -95,12 +95,6 @@ static struct platform_device *panda_devices[] __initdata = { ...@@ -95,12 +95,6 @@ static struct platform_device *panda_devices[] __initdata = {
&wl1271_device, &wl1271_device,
}; };
static void __init omap4_panda_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static const struct usbhs_omap_board_data usbhs_bdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
...@@ -569,24 +563,19 @@ static void __init omap4_panda_init(void) ...@@ -569,24 +563,19 @@ static void __init omap4_panda_init(void)
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
platform_device_register(&omap_vwlan_device); platform_device_register(&omap_vwlan_device);
board_serial_init(); board_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc); omap4_twl6030_hsmmc_init(mmc);
omap4_ehci_init(); omap4_ehci_init();
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
omap4_panda_display_init(); omap4_panda_display_init();
} }
static void __init omap4_panda_map_io(void)
{
omap2_set_globals_443x();
omap44xx_map_common_io();
}
MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
/* Maintainer: David Anders - Texas Instruments Inc */ /* Maintainer: David Anders - Texas Instruments Inc */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap4_panda_map_io, .map_io = omap4_map_io,
.init_early = omap4_panda_init_early, .init_early = omap4430_init_early,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
.init_machine = omap4_panda_init, .init_machine = omap4_panda_init,
.timer = &omap4_timer, .timer = &omap4_timer,
......
...@@ -479,13 +479,6 @@ static int __init overo_spi_init(void) ...@@ -479,13 +479,6 @@ static int __init overo_spi_init(void)
return 0; return 0;
} }
static void __init overo_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
}
static const struct usbhs_omap_board_data usbhs_bdata __initconst = { static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
...@@ -515,6 +508,8 @@ static void __init overo_init(void) ...@@ -515,6 +508,8 @@ static void __init overo_init(void)
overo_i2c_init(); overo_i2c_init();
omap_display_init(&overo_dss_data); omap_display_init(&overo_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
omap_nand_flash_init(0, overo_nand_partitions, omap_nand_flash_init(0, overo_nand_partitions,
ARRAY_SIZE(overo_nand_partitions)); ARRAY_SIZE(overo_nand_partitions));
usb_musb_init(NULL); usb_musb_init(NULL);
...@@ -565,7 +560,7 @@ MACHINE_START(OVERO, "Gumstix Overo") ...@@ -565,7 +560,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = overo_init_early, .init_early = omap35xx_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = overo_init, .init_machine = overo_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -123,15 +123,6 @@ static void __init rm680_peripherals_init(void) ...@@ -123,15 +123,6 @@ static void __init rm680_peripherals_init(void)
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
} }
static void __init rm680_init_early(void)
{
struct omap_sdrc_params *sdrc_params;
omap2_init_common_infrastructure();
sdrc_params = nokia_get_sdram_timings();
omap2_init_common_devices(sdrc_params, sdrc_params);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR }, { .reg_offset = OMAP_MUX_TERMINATOR },
...@@ -140,23 +131,23 @@ static struct omap_board_mux board_mux[] __initdata = { ...@@ -140,23 +131,23 @@ static struct omap_board_mux board_mux[] __initdata = {
static void __init rm680_init(void) static void __init rm680_init(void)
{ {
struct omap_sdrc_params *sdrc_params;
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_serial_init(); omap_serial_init();
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
usb_musb_init(NULL); usb_musb_init(NULL);
rm680_peripherals_init(); rm680_peripherals_init();
} }
static void __init rm680_map_io(void)
{
omap2_set_globals_3xxx();
omap34xx_map_common_io();
}
MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = rm680_map_io, .map_io = omap3_map_io,
.init_early = rm680_init_early, .init_early = omap3630_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = rm680_init, .init_machine = rm680_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -79,15 +79,6 @@ static struct cpuidle_params rx51_cpuidle_params[] = { ...@@ -79,15 +79,6 @@ static struct cpuidle_params rx51_cpuidle_params[] = {
{7505 + 15274, 484329, 1}, {7505 + 15274, 484329, 1},
}; };
static void __init rx51_init_early(void)
{
struct omap_sdrc_params *sdrc_params;
omap2_init_common_infrastructure();
sdrc_params = nokia_get_sdram_timings();
omap2_init_common_devices(sdrc_params, sdrc_params);
}
extern void __init rx51_peripherals_init(void); extern void __init rx51_peripherals_init(void);
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
...@@ -104,9 +95,15 @@ static struct omap_musb_board_data musb_board_data = { ...@@ -104,9 +95,15 @@ static struct omap_musb_board_data musb_board_data = {
static void __init rx51_init(void) static void __init rx51_init(void)
{ {
struct omap_sdrc_params *sdrc_params;
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_pm_init_cpuidle(rx51_cpuidle_params); omap3_pm_init_cpuidle(rx51_cpuidle_params);
omap_serial_init(); omap_serial_init();
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
rx51_peripherals_init(); rx51_peripherals_init();
...@@ -117,12 +114,6 @@ static void __init rx51_init(void) ...@@ -117,12 +114,6 @@ static void __init rx51_init(void)
platform_device_register(&leds_gpio); platform_device_register(&leds_gpio);
} }
static void __init rx51_map_io(void)
{
omap2_set_globals_3xxx();
omap34xx_map_common_io();
}
static void __init rx51_reserve(void) static void __init rx51_reserve(void)
{ {
rx51_video_mem_init(); rx51_video_mem_init();
...@@ -133,8 +124,8 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") ...@@ -133,8 +124,8 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
/* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = rx51_reserve, .reserve = rx51_reserve,
.map_io = rx51_map_io, .map_io = omap3_map_io,
.init_early = rx51_init_early, .init_early = omap3430_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = rx51_init, .init_machine = rx51_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -27,15 +27,10 @@ ...@@ -27,15 +27,10 @@
static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
}; };
static void __init ti8168_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
}
static void __init ti8168_evm_init(void) static void __init ti8168_evm_init(void)
{ {
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap_board_config = ti8168_evm_config; omap_board_config = ti8168_evm_config;
omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
} }
...@@ -50,7 +45,7 @@ MACHINE_START(TI8168EVM, "ti8168evm") ...@@ -50,7 +45,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
/* Maintainer: Texas Instruments */ /* Maintainer: Texas Instruments */
.atag_offset = 0x100, .atag_offset = 0x100,
.map_io = ti8168_evm_map_io, .map_io = ti8168_evm_map_io,
.init_early = ti8168_init_early, .init_early = ti816x_init_early,
.init_irq = ti816x_init_irq, .init_irq = ti816x_init_irq,
.timer = &omap3_timer, .timer = &omap3_timer,
.init_machine = ti8168_evm_init, .init_machine = ti8168_evm_init,
......
...@@ -34,17 +34,6 @@ ...@@ -34,17 +34,6 @@
#define ZOOM3_EHCI_RESET_GPIO 64 #define ZOOM3_EHCI_RESET_GPIO 64
static void __init omap_zoom_init_early(void)
{
omap2_init_common_infrastructure();
if (machine_is_omap_zoom2())
omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
else if (machine_is_omap_zoom3())
omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
h8mbx00u0mer0em_sdrc_params);
}
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = { static struct omap_board_mux board_mux[] __initdata = {
/* WLAN IRQ - GPIO 162 */ /* WLAN IRQ - GPIO 162 */
...@@ -129,6 +118,14 @@ static void __init omap_zoom_init(void) ...@@ -129,6 +118,14 @@ static void __init omap_zoom_init(void)
ZOOM_NAND_CS, NAND_BUSWIDTH_16); ZOOM_NAND_CS, NAND_BUSWIDTH_16);
zoom_debugboard_init(); zoom_debugboard_init();
zoom_peripherals_init(); zoom_peripherals_init();
if (machine_is_omap_zoom2())
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
else if (machine_is_omap_zoom3())
omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
h8mbx00u0mer0em_sdrc_params);
zoom_display_init(); zoom_display_init();
} }
...@@ -136,7 +133,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") ...@@ -136,7 +133,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_zoom_init_early, .init_early = omap3430_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_zoom_init, .init_machine = omap_zoom_init,
.timer = &omap3_timer, .timer = &omap3_timer,
...@@ -146,7 +143,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") ...@@ -146,7 +143,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
.atag_offset = 0x100, .atag_offset = 0x100,
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_zoom_init_early, .init_early = omap3630_init_early,
.init_irq = omap3_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_zoom_init, .init_machine = omap_zoom_init,
.timer = &omap3_timer, .timer = &omap3_timer,
......
...@@ -3472,7 +3472,16 @@ int __init omap3xxx_clk_init(void) ...@@ -3472,7 +3472,16 @@ int __init omap3xxx_clk_init(void)
struct omap_clk *c; struct omap_clk *c;
u32 cpu_clkflg = 0; u32 cpu_clkflg = 0;
if (cpu_is_omap3517()) { /*
* 3505 must be tested before 3517, since 3517 returns true
* for both AM3517 chips and AM3517 family chips, which
* includes 3505. Unfortunately there's no obvious family
* test for 3517/3505 :-(
*/
if (cpu_is_omap3505()) {
cpu_mask = RATE_IN_34XX;
cpu_clkflg = CK_3505;
} else if (cpu_is_omap3517()) {
cpu_mask = RATE_IN_34XX; cpu_mask = RATE_IN_34XX;
cpu_clkflg = CK_3517; cpu_clkflg = CK_3517;
} else if (cpu_is_omap3505()) { } else if (cpu_is_omap3505()) {
......
...@@ -73,9 +73,6 @@ static int _clkdm_register(struct clockdomain *clkdm) ...@@ -73,9 +73,6 @@ static int _clkdm_register(struct clockdomain *clkdm)
if (!clkdm || !clkdm->name) if (!clkdm || !clkdm->name)
return -EINVAL; return -EINVAL;
if (!omap_chip_is(clkdm->omap_chip))
return -EINVAL;
pwrdm = pwrdm_lookup(clkdm->pwrdm.name); pwrdm = pwrdm_lookup(clkdm->pwrdm.name);
if (!pwrdm) { if (!pwrdm) {
pr_err("clockdomain: %s: powerdomain %s does not exist\n", pr_err("clockdomain: %s: powerdomain %s does not exist\n",
...@@ -105,13 +102,10 @@ static struct clkdm_dep *_clkdm_deps_lookup(struct clockdomain *clkdm, ...@@ -105,13 +102,10 @@ static struct clkdm_dep *_clkdm_deps_lookup(struct clockdomain *clkdm,
{ {
struct clkdm_dep *cd; struct clkdm_dep *cd;
if (!clkdm || !deps || !omap_chip_is(clkdm->omap_chip)) if (!clkdm || !deps)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
for (cd = deps; cd->clkdm_name; cd++) { for (cd = deps; cd->clkdm_name; cd++) {
if (!omap_chip_is(cd->omap_chip))
continue;
if (!cd->clkdm && cd->clkdm_name) if (!cd->clkdm && cd->clkdm_name)
cd->clkdm = _clkdm_lookup(cd->clkdm_name); cd->clkdm = _clkdm_lookup(cd->clkdm_name);
...@@ -148,9 +142,6 @@ static void _autodep_lookup(struct clkdm_autodep *autodep) ...@@ -148,9 +142,6 @@ static void _autodep_lookup(struct clkdm_autodep *autodep)
if (!autodep) if (!autodep)
return; return;
if (!omap_chip_is(autodep->omap_chip))
return;
clkdm = clkdm_lookup(autodep->clkdm.name); clkdm = clkdm_lookup(autodep->clkdm.name);
if (!clkdm) { if (!clkdm) {
pr_err("clockdomain: autodeps: clockdomain %s does not exist\n", pr_err("clockdomain: autodeps: clockdomain %s does not exist\n",
...@@ -182,9 +173,6 @@ void _clkdm_add_autodeps(struct clockdomain *clkdm) ...@@ -182,9 +173,6 @@ void _clkdm_add_autodeps(struct clockdomain *clkdm)
if (IS_ERR(autodep->clkdm.ptr)) if (IS_ERR(autodep->clkdm.ptr))
continue; continue;
if (!omap_chip_is(autodep->omap_chip))
continue;
pr_debug("clockdomain: adding %s sleepdep/wkdep for " pr_debug("clockdomain: adding %s sleepdep/wkdep for "
"clkdm %s\n", autodep->clkdm.ptr->name, "clkdm %s\n", autodep->clkdm.ptr->name,
clkdm->name); clkdm->name);
...@@ -216,9 +204,6 @@ void _clkdm_del_autodeps(struct clockdomain *clkdm) ...@@ -216,9 +204,6 @@ void _clkdm_del_autodeps(struct clockdomain *clkdm)
if (IS_ERR(autodep->clkdm.ptr)) if (IS_ERR(autodep->clkdm.ptr))
continue; continue;
if (!omap_chip_is(autodep->omap_chip))
continue;
pr_debug("clockdomain: removing %s sleepdep/wkdep for " pr_debug("clockdomain: removing %s sleepdep/wkdep for "
"clkdm %s\n", autodep->clkdm.ptr->name, "clkdm %s\n", autodep->clkdm.ptr->name,
clkdm->name); clkdm->name);
...@@ -243,8 +228,6 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm, ...@@ -243,8 +228,6 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm,
struct clkdm_dep *cd; struct clkdm_dep *cd;
for (cd = clkdm_deps; cd && cd->clkdm_name; cd++) { for (cd = clkdm_deps; cd && cd->clkdm_name; cd++) {
if (!omap_chip_is(cd->omap_chip))
continue;
if (cd->clkdm) if (cd->clkdm)
continue; continue;
cd->clkdm = _clkdm_lookup(cd->clkdm_name); cd->clkdm = _clkdm_lookup(cd->clkdm_name);
...@@ -257,43 +240,113 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm, ...@@ -257,43 +240,113 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm,
/* Public functions */ /* Public functions */
/** /**
* clkdm_init - set up the clockdomain layer * clkdm_register_platform_funcs - register clockdomain implementation fns
* @clkdms: optional pointer to an array of clockdomains to register * @co: func pointers for arch specific implementations
* @init_autodeps: optional pointer to an array of autodeps to register
* @custom_funcs: func pointers for arch specific implementations
* *
* Set up internal state. If a pointer to an array of clockdomains * Register the list of function pointers used to implement the
* @clkdms was supplied, loop through the list of clockdomains, * clockdomain functions on different OMAP SoCs. Should be called
* register all that are available on the current platform. Similarly, * before any other clkdm_register*() function. Returns -EINVAL if
* if a pointer to an array of clockdomain autodependencies * @co is null, -EEXIST if platform functions have already been
* @init_autodeps was provided, register those. No return value. * registered, or 0 upon success.
*/ */
void clkdm_init(struct clockdomain **clkdms, int clkdm_register_platform_funcs(struct clkdm_ops *co)
struct clkdm_autodep *init_autodeps, {
struct clkdm_ops *custom_funcs) if (!co)
return -EINVAL;
if (arch_clkdm)
return -EEXIST;
arch_clkdm = co;
return 0;
};
/**
* clkdm_register_clkdms - register SoC clockdomains
* @cs: pointer to an array of struct clockdomain to register
*
* Register the clockdomains available on a particular OMAP SoC. Must
* be called after clkdm_register_platform_funcs(). May be called
* multiple times. Returns -EACCES if called before
* clkdm_register_platform_funcs(); -EINVAL if the argument @cs is
* null; or 0 upon success.
*/
int clkdm_register_clkdms(struct clockdomain **cs)
{ {
struct clockdomain **c = NULL; struct clockdomain **c = NULL;
struct clockdomain *clkdm;
struct clkdm_autodep *autodep = NULL;
if (!custom_funcs) if (!arch_clkdm)
WARN(1, "No custom clkdm functions registered\n"); return -EACCES;
else
arch_clkdm = custom_funcs; if (!cs)
return -EINVAL;
if (clkdms) for (c = cs; *c; c++)
for (c = clkdms; *c; c++)
_clkdm_register(*c); _clkdm_register(*c);
autodeps = init_autodeps; return 0;
}
/**
* clkdm_register_autodeps - register autodeps (if required)
* @ia: pointer to a static array of struct clkdm_autodep to register
*
* Register clockdomain "automatic dependencies." These are
* clockdomain wakeup and sleep dependencies that are automatically
* added whenever the first clock inside a clockdomain is enabled, and
* removed whenever the last clock inside a clockdomain is disabled.
* These are currently only used on OMAP3 devices, and are deprecated,
* since they waste energy. However, until the OMAP2/3 IP block
* enable/disable sequence can be converted to match the OMAP4
* sequence, they are needed.
*
* Must be called only after all of the SoC clockdomains are
* registered, since the function will resolve autodep clockdomain
* names into clockdomain pointers.
*
* The struct clkdm_autodep @ia array must be static, as this function
* does not copy the array elements.
*
* Returns -EACCES if called before any clockdomains have been
* registered, -EINVAL if called with a null @ia argument, -EEXIST if
* autodeps have already been registered, or 0 upon success.
*/
int clkdm_register_autodeps(struct clkdm_autodep *ia)
{
struct clkdm_autodep *a = NULL;
if (list_empty(&clkdm_list))
return -EACCES;
if (!ia)
return -EINVAL;
if (autodeps) if (autodeps)
for (autodep = autodeps; autodep->clkdm.ptr; autodep++) return -EEXIST;
_autodep_lookup(autodep);
/* autodeps = ia;
* Put all clockdomains into software-supervised mode; PM code for (a = autodeps; a->clkdm.ptr; a++)
* should later enable hardware-supervised mode as appropriate _autodep_lookup(a);
return 0;
}
/**
* clkdm_complete_init - set up the clockdomain layer
*
* Put all clockdomains into software-supervised mode; PM code should
* later enable hardware-supervised mode as appropriate. Must be
* called after clkdm_register_clkdms(). Returns -EACCES if called
* before clkdm_register_clkdms(), or 0 upon success.
*/ */
int clkdm_complete_init(void)
{
struct clockdomain *clkdm;
if (list_empty(&clkdm_list))
return -EACCES;
list_for_each_entry(clkdm, &clkdm_list, node) { list_for_each_entry(clkdm, &clkdm_list, node) {
if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
clkdm_wakeup(clkdm); clkdm_wakeup(clkdm);
...@@ -306,6 +359,8 @@ void clkdm_init(struct clockdomain **clkdms, ...@@ -306,6 +359,8 @@ void clkdm_init(struct clockdomain **clkdms,
_resolve_clkdm_deps(clkdm, clkdm->sleepdep_srcs); _resolve_clkdm_deps(clkdm, clkdm->sleepdep_srcs);
clkdm_clear_all_sleepdeps(clkdm); clkdm_clear_all_sleepdeps(clkdm);
} }
return 0;
} }
/** /**
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
/** /**
* struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode * struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode
* @clkdm: clockdomain to add wkdep+sleepdep on - set name member only * @clkdm: clockdomain to add wkdep+sleepdep on - set name member only
* @omap_chip: OMAP chip types that this autodep is valid on
* *
* A clockdomain that should have wkdeps and sleepdeps added when a * A clockdomain that should have wkdeps and sleepdeps added when a
* clockdomain should stay active in hwsup mode; and conversely, * clockdomain should stay active in hwsup mode; and conversely,
...@@ -60,14 +59,12 @@ struct clkdm_autodep { ...@@ -60,14 +59,12 @@ struct clkdm_autodep {
const char *name; const char *name;
struct clockdomain *ptr; struct clockdomain *ptr;
} clkdm; } clkdm;
const struct omap_chip_id omap_chip;
}; };
/** /**
* struct clkdm_dep - encode dependencies between clockdomains * struct clkdm_dep - encode dependencies between clockdomains
* @clkdm_name: clockdomain name * @clkdm_name: clockdomain name
* @clkdm: pointer to the struct clockdomain of @clkdm_name * @clkdm: pointer to the struct clockdomain of @clkdm_name
* @omap_chip: OMAP chip types that this dependency is valid on
* @wkdep_usecount: Number of wakeup dependencies causing this clkdm to wake * @wkdep_usecount: Number of wakeup dependencies causing this clkdm to wake
* @sleepdep_usecount: Number of sleep deps that could prevent clkdm from idle * @sleepdep_usecount: Number of sleep deps that could prevent clkdm from idle
* *
...@@ -81,7 +78,6 @@ struct clkdm_dep { ...@@ -81,7 +78,6 @@ struct clkdm_dep {
struct clockdomain *clkdm; struct clockdomain *clkdm;
atomic_t wkdep_usecount; atomic_t wkdep_usecount;
atomic_t sleepdep_usecount; atomic_t sleepdep_usecount;
const struct omap_chip_id omap_chip;
}; };
/* Possible flags for struct clockdomain._flags */ /* Possible flags for struct clockdomain._flags */
...@@ -101,7 +97,6 @@ struct clkdm_dep { ...@@ -101,7 +97,6 @@ struct clkdm_dep {
* @clkdm_offs: (OMAP4 only) CM clockdomain register offset * @clkdm_offs: (OMAP4 only) CM clockdomain register offset
* @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up
* @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact
* @omap_chip: OMAP chip types that this clockdomain is valid on
* @usecount: Usecount tracking * @usecount: Usecount tracking
* @node: list_head to link all clockdomains together * @node: list_head to link all clockdomains together
* *
...@@ -126,7 +121,6 @@ struct clockdomain { ...@@ -126,7 +121,6 @@ struct clockdomain {
const u16 clkdm_offs; const u16 clkdm_offs;
struct clkdm_dep *wkdep_srcs; struct clkdm_dep *wkdep_srcs;
struct clkdm_dep *sleepdep_srcs; struct clkdm_dep *sleepdep_srcs;
const struct omap_chip_id omap_chip;
atomic_t usecount; atomic_t usecount;
struct list_head node; struct list_head node;
spinlock_t lock; spinlock_t lock;
...@@ -166,8 +160,11 @@ struct clkdm_ops { ...@@ -166,8 +160,11 @@ struct clkdm_ops {
int (*clkdm_clk_disable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm);
}; };
void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps, int clkdm_register_platform_funcs(struct clkdm_ops *co);
struct clkdm_ops *custom_funcs); int clkdm_register_autodeps(struct clkdm_autodep *ia);
int clkdm_register_clkdms(struct clockdomain **c);
int clkdm_complete_init(void);
struct clockdomain *clkdm_lookup(const char *name); struct clockdomain *clkdm_lookup(const char *name);
int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
...@@ -195,7 +192,8 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); ...@@ -195,7 +192,8 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh);
int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh);
extern void __init omap2xxx_clockdomains_init(void); extern void __init omap242x_clockdomains_init(void);
extern void __init omap243x_clockdomains_init(void);
extern void __init omap3xxx_clockdomains_init(void); extern void __init omap3xxx_clockdomains_init(void);
extern void __init omap44xx_clockdomains_init(void); extern void __init omap44xx_clockdomains_init(void);
extern void _clkdm_add_autodeps(struct clockdomain *clkdm); extern void _clkdm_add_autodeps(struct clockdomain *clkdm);
...@@ -205,4 +203,10 @@ extern struct clkdm_ops omap2_clkdm_operations; ...@@ -205,4 +203,10 @@ extern struct clkdm_ops omap2_clkdm_operations;
extern struct clkdm_ops omap3_clkdm_operations; extern struct clkdm_ops omap3_clkdm_operations;
extern struct clkdm_ops omap4_clkdm_operations; extern struct clkdm_ops omap4_clkdm_operations;
extern struct clkdm_dep gfx_24xx_wkdeps[];
extern struct clkdm_dep dsp_24xx_wkdeps[];
extern struct clockdomain wkup_common_clkdm;
extern struct clockdomain prm_common_clkdm;
extern struct clockdomain cm_common_clkdm;
#endif #endif
...@@ -52,8 +52,6 @@ static int omap2_clkdm_clear_all_wkdeps(struct clockdomain *clkdm) ...@@ -52,8 +52,6 @@ static int omap2_clkdm_clear_all_wkdeps(struct clockdomain *clkdm)
u32 mask = 0; u32 mask = 0;
for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) {
if (!omap_chip_is(cd->omap_chip))
continue;
if (!cd->clkdm) if (!cd->clkdm)
continue; /* only happens if data is erroneous */ continue; /* only happens if data is erroneous */
...@@ -98,8 +96,6 @@ static int omap3_clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) ...@@ -98,8 +96,6 @@ static int omap3_clkdm_clear_all_sleepdeps(struct clockdomain *clkdm)
u32 mask = 0; u32 mask = 0;
for (cd = clkdm->sleepdep_srcs; cd && cd->clkdm_name; cd++) { for (cd = clkdm->sleepdep_srcs; cd && cd->clkdm_name; cd++) {
if (!omap_chip_is(cd->omap_chip))
continue;
if (!cd->clkdm) if (!cd->clkdm)
continue; /* only happens if data is erroneous */ continue; /* only happens if data is erroneous */
......
...@@ -52,8 +52,6 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm) ...@@ -52,8 +52,6 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm)
u32 mask = 0; u32 mask = 0;
for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) {
if (!omap_chip_is(cd->omap_chip))
continue;
if (!cd->clkdm) if (!cd->clkdm)
continue; /* only happens if data is erroneous */ continue; /* only happens if data is erroneous */
......
/*
* OMAP2420 clockdomains
*
* Copyright (C) 2008-2011 Texas Instruments, Inc.
* Copyright (C) 2008-2010 Nokia Corporation
*
* Paul Walmsley, Jouni Högander
*
* This file contains clockdomains and clockdomain wakeup dependencies
* for OMAP2420 chips. Some notes:
*
* A useful validation rule for struct clockdomain: Any clockdomain
* referenced by a wkdep_srcs must have a dep_bit assigned. So
* wkdep_srcs are really just software-controllable dependencies.
* Non-software-controllable dependencies do exist, but they are not
* encoded below (yet).
*
* 24xx does not support programmable sleep dependencies (SLEEPDEP)
*
* The overly-specific dep_bit names are due to a bit name collision
* with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift
* value are the same for all powerdomains: 2
*
* XXX should dep_bit be a mask, so we can test to see if it is 0 as a
* sanity check?
* XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE
*/
/*
* To-Do List
* -> Port the Sleep/Wakeup dependencies for the domains
* from the Power domain framework
*/
#include <linux/kernel.h>
#include <linux/io.h>
#include "clockdomain.h"
#include "prm2xxx_3xxx.h"
#include "cm2xxx_3xxx.h"
#include "cm-regbits-24xx.h"
#include "prm-regbits-24xx.h"
/*
* Clockdomain dependencies for wkdeps
*
* XXX Hardware dependencies (e.g., dependencies that cannot be
* changed in software) are not included here yet, but should be.
*/
/* Wakeup dependency source arrays */
/* 2420-specific possible wakeup dependencies */
/* 2420 PM_WKDEP_MPU: CORE, DSP, WKUP */
static struct clkdm_dep mpu_2420_wkdeps[] = {
{ .clkdm_name = "core_l3_clkdm" },
{ .clkdm_name = "core_l4_clkdm" },
{ .clkdm_name = "dsp_clkdm" },
{ .clkdm_name = "wkup_clkdm" },
{ NULL },
};
/* 2420 PM_WKDEP_CORE: DSP, GFX, MPU, WKUP */
static struct clkdm_dep core_2420_wkdeps[] = {
{ .clkdm_name = "dsp_clkdm" },
{ .clkdm_name = "gfx_clkdm" },
{ .clkdm_name = "mpu_clkdm" },
{ .clkdm_name = "wkup_clkdm" },
{ NULL },
};
/*
* 2420-only clockdomains
*/
static struct clockdomain mpu_2420_clkdm = {
.name = "mpu_clkdm",
.pwrdm = { .name = "mpu_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.wkdep_srcs = mpu_2420_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_MPU_MASK,
};
static struct clockdomain iva1_2420_clkdm = {
.name = "iva1_clkdm",
.pwrdm = { .name = "dsp_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.dep_bit = OMAP24XX_PM_WKDEP_MPU_EN_DSP_SHIFT,
.wkdep_srcs = dsp_24xx_wkdeps,
.clktrctrl_mask = OMAP2420_AUTOSTATE_IVA_MASK,
};
static struct clockdomain dsp_2420_clkdm = {
.name = "dsp_clkdm",
.pwrdm = { .name = "dsp_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_DSP_MASK,
};
static struct clockdomain gfx_2420_clkdm = {
.name = "gfx_clkdm",
.pwrdm = { .name = "gfx_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.wkdep_srcs = gfx_24xx_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_GFX_MASK,
};
static struct clockdomain core_l3_2420_clkdm = {
.name = "core_l3_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.wkdep_srcs = core_2420_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_L3_MASK,
};
static struct clockdomain core_l4_2420_clkdm = {
.name = "core_l4_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.wkdep_srcs = core_2420_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_L4_MASK,
};
static struct clockdomain dss_2420_clkdm = {
.name = "dss_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_DSS_MASK,
};
static struct clockdomain *clockdomains_omap242x[] __initdata = {
&wkup_common_clkdm,
&cm_common_clkdm,
&prm_common_clkdm,
&mpu_2420_clkdm,
&iva1_2420_clkdm,
&dsp_2420_clkdm,
&gfx_2420_clkdm,
&core_l3_2420_clkdm,
&core_l4_2420_clkdm,
&dss_2420_clkdm,
NULL,
};
void __init omap242x_clockdomains_init(void)
{
if (!cpu_is_omap242x())
return;
clkdm_register_platform_funcs(&omap2_clkdm_operations);
clkdm_register_clkdms(clockdomains_omap242x);
clkdm_complete_init();
}
/*
* OMAP2xxx clockdomains
*
* Copyright (C) 2008-2009 Texas Instruments, Inc.
* Copyright (C) 2008-2010 Nokia Corporation
*
* Paul Walmsley, Jouni Högander
*
* This file contains clockdomains and clockdomain wakeup dependencies
* for OMAP2xxx chips. Some notes:
*
* A useful validation rule for struct clockdomain: Any clockdomain
* referenced by a wkdep_srcs must have a dep_bit assigned. So
* wkdep_srcs are really just software-controllable dependencies.
* Non-software-controllable dependencies do exist, but they are not
* encoded below (yet).
*
* 24xx does not support programmable sleep dependencies (SLEEPDEP)
*
* The overly-specific dep_bit names are due to a bit name collision
* with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift
* value are the same for all powerdomains: 2
*
* XXX should dep_bit be a mask, so we can test to see if it is 0 as a
* sanity check?
* XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE
*/
/*
* To-Do List
* -> Port the Sleep/Wakeup dependencies for the domains
* from the Power domain framework
*/
#include <linux/kernel.h>
#include <linux/io.h>
#include "clockdomain.h"
#include "prm2xxx_3xxx.h"
#include "cm2xxx_3xxx.h"
#include "cm-regbits-24xx.h"
#include "prm-regbits-24xx.h"
/*
* Clockdomain dependencies for wkdeps
*
* XXX Hardware dependencies (e.g., dependencies that cannot be
* changed in software) are not included here yet, but should be.
*/
/* Wakeup dependency source arrays */
/* 2430-specific possible wakeup dependencies */
/* 2430 PM_WKDEP_CORE: DSP, GFX, MPU, WKUP, MDM */
static struct clkdm_dep core_2430_wkdeps[] = {
{ .clkdm_name = "dsp_clkdm" },
{ .clkdm_name = "gfx_clkdm" },
{ .clkdm_name = "mpu_clkdm" },
{ .clkdm_name = "wkup_clkdm" },
{ .clkdm_name = "mdm_clkdm" },
{ NULL },
};
/* 2430 PM_WKDEP_MPU: CORE, DSP, WKUP, MDM */
static struct clkdm_dep mpu_2430_wkdeps[] = {
{ .clkdm_name = "core_l3_clkdm" },
{ .clkdm_name = "core_l4_clkdm" },
{ .clkdm_name = "dsp_clkdm" },
{ .clkdm_name = "wkup_clkdm" },
{ .clkdm_name = "mdm_clkdm" },
{ NULL },
};
/* 2430 PM_WKDEP_MDM: CORE, MPU, WKUP */
static struct clkdm_dep mdm_2430_wkdeps[] = {
{ .clkdm_name = "core_l3_clkdm" },
{ .clkdm_name = "core_l4_clkdm" },
{ .clkdm_name = "mpu_clkdm" },
{ .clkdm_name = "wkup_clkdm" },
{ NULL },
};
/*
* 2430-only clockdomains
*/
static struct clockdomain mpu_2430_clkdm = {
.name = "mpu_clkdm",
.pwrdm = { .name = "mpu_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.wkdep_srcs = mpu_2430_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_MPU_MASK,
};
/* Another case of bit name collisions between several registers: EN_MDM */
static struct clockdomain mdm_clkdm = {
.name = "mdm_clkdm",
.pwrdm = { .name = "mdm_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.dep_bit = OMAP2430_PM_WKDEP_MPU_EN_MDM_SHIFT,
.wkdep_srcs = mdm_2430_wkdeps,
.clktrctrl_mask = OMAP2430_AUTOSTATE_MDM_MASK,
};
static struct clockdomain dsp_2430_clkdm = {
.name = "dsp_clkdm",
.pwrdm = { .name = "dsp_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.dep_bit = OMAP24XX_PM_WKDEP_MPU_EN_DSP_SHIFT,
.wkdep_srcs = dsp_24xx_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_DSP_MASK,
};
static struct clockdomain gfx_2430_clkdm = {
.name = "gfx_clkdm",
.pwrdm = { .name = "gfx_pwrdm" },
.flags = CLKDM_CAN_HWSUP_SWSUP,
.wkdep_srcs = gfx_24xx_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_GFX_MASK,
};
/*
* XXX add usecounting for clkdm dependencies, otherwise the presence
* of a single dep bit for core_l3_24xx_clkdm and core_l4_24xx_clkdm
* could cause trouble
*/
static struct clockdomain core_l3_2430_clkdm = {
.name = "core_l3_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.dep_bit = OMAP24XX_EN_CORE_SHIFT,
.wkdep_srcs = core_2430_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_L3_MASK,
};
/*
* XXX add usecounting for clkdm dependencies, otherwise the presence
* of a single dep bit for core_l3_24xx_clkdm and core_l4_24xx_clkdm
* could cause trouble
*/
static struct clockdomain core_l4_2430_clkdm = {
.name = "core_l4_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.dep_bit = OMAP24XX_EN_CORE_SHIFT,
.wkdep_srcs = core_2430_wkdeps,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_L4_MASK,
};
static struct clockdomain dss_2430_clkdm = {
.name = "dss_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.flags = CLKDM_CAN_HWSUP,
.clktrctrl_mask = OMAP24XX_AUTOSTATE_DSS_MASK,
};
static struct clockdomain *clockdomains_omap243x[] __initdata = {
&wkup_common_clkdm,
&cm_common_clkdm,
&prm_common_clkdm,
&mpu_2430_clkdm,
&mdm_clkdm,
&dsp_2430_clkdm,
&gfx_2430_clkdm,
&core_l3_2430_clkdm,
&core_l4_2430_clkdm,
&dss_2430_clkdm,
NULL,
};
void __init omap243x_clockdomains_init(void)
{
if (!cpu_is_omap243x())
return;
clkdm_register_platform_funcs(&omap2_clkdm_operations);
clkdm_register_clkdms(clockdomains_omap243x);
clkdm_complete_init();
}
This diff is collapsed.
This diff is collapsed.
...@@ -56,6 +56,12 @@ void __init omap2_set_globals_242x(void) ...@@ -56,6 +56,12 @@ void __init omap2_set_globals_242x(void)
{ {
__omap2_set_globals(&omap242x_globals); __omap2_set_globals(&omap242x_globals);
} }
void __init omap242x_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}
#endif #endif
#if defined(CONFIG_SOC_OMAP2430) #if defined(CONFIG_SOC_OMAP2430)
...@@ -74,6 +80,12 @@ void __init omap2_set_globals_243x(void) ...@@ -74,6 +80,12 @@ void __init omap2_set_globals_243x(void)
{ {
__omap2_set_globals(&omap243x_globals); __omap2_set_globals(&omap243x_globals);
} }
void __init omap243x_map_io(void)
{
omap2_set_globals_243x();
omap243x_map_common_io();
}
#endif #endif
#if defined(CONFIG_ARCH_OMAP3) #if defined(CONFIG_ARCH_OMAP3)
...@@ -138,5 +150,11 @@ void __init omap2_set_globals_443x(void) ...@@ -138,5 +150,11 @@ void __init omap2_set_globals_443x(void)
omap2_set_globals_control(&omap4_globals); omap2_set_globals_control(&omap4_globals);
omap2_set_globals_prcm(&omap4_globals); omap2_set_globals_prcm(&omap4_globals);
} }
void __init omap4_map_io(void)
{
omap2_set_globals_443x();
omap44xx_map_common_io();
}
#endif #endif
This diff is collapsed.
...@@ -127,7 +127,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -127,7 +127,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
{ {
int r = 0; int r = 0;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
int i, oh_count; int i, oh_count;
struct omap_display_platform_data pdata; struct omap_display_platform_data pdata;
const struct omap_dss_hwmod_data *curr_dss_hwmod; const struct omap_dss_hwmod_data *curr_dss_hwmod;
...@@ -162,13 +162,13 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -162,13 +162,13 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
return -ENODEV; return -ENODEV;
} }
od = omap_device_build(curr_dss_hwmod[i].dev_name, pdev = omap_device_build(curr_dss_hwmod[i].dev_name,
curr_dss_hwmod[i].id, oh, &pdata, curr_dss_hwmod[i].id, oh, &pdata,
sizeof(struct omap_display_platform_data), sizeof(struct omap_display_platform_data),
omap_dss_latency, omap_dss_latency,
ARRAY_SIZE(omap_dss_latency), 0); ARRAY_SIZE(omap_dss_latency), 0);
if (WARN((IS_ERR(od)), "Could not build omap_device for %s\n", if (WARN((IS_ERR(pdev)), "Could not build omap_device for %s\n",
curr_dss_hwmod[i].oh_name)) curr_dss_hwmod[i].oh_name))
return -ENODEV; return -ENODEV;
} }
......
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.
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.
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.
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.
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