Commit 37439a0f authored by Sascha Hauer's avatar Sascha Hauer

Merge branch 'imx' of git://git.pengutronix.de/git/ukl/linux-2.6 into mxc-master

parents becc670a a8dfb646
This diff is collapsed.
...@@ -200,7 +200,7 @@ CONFIG_MACH_MX27ADS=y ...@@ -200,7 +200,7 @@ CONFIG_MACH_MX27ADS=y
CONFIG_MACH_PCM038=y CONFIG_MACH_PCM038=y
CONFIG_MACH_PCM970_BASEBOARD=y CONFIG_MACH_PCM970_BASEBOARD=y
CONFIG_MACH_MX27_3DS=y CONFIG_MACH_MX27_3DS=y
CONFIG_MACH_MX27LITE=y CONFIG_MACH_IMX27LITE=y
CONFIG_MXC_IRQ_PRIOR=y CONFIG_MXC_IRQ_PRIOR=y
CONFIG_MXC_PWM=y CONFIG_MXC_PWM=y
......
...@@ -10,5 +10,5 @@ obj-y += generic.o clock.o devices.o ...@@ -10,5 +10,5 @@ obj-y += generic.o clock.o devices.o
obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o
# Specific board support # Specific board support
obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
obj-$(CONFIG_MACH_SCB9328) += scb9328.o obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
\ No newline at end of file
/* /*
* arch/arm/mach-imx/mx1ads.c * arch/arm/mach-imx/mach-mx1ads.c
* *
* Initially based on: * Initially based on:
* linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c
......
/* /*
* linux/arch/arm/mach-mx1/scb9328.c * linux/arch/arm/mach-mx1/mach-scb9328.c
* *
* Copyright (c) 2004 Sascha Hauer <saschahauer@web.de> * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de>
* Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net> * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net>
......
...@@ -55,7 +55,7 @@ config MACH_PCM970_BASEBOARD ...@@ -55,7 +55,7 @@ config MACH_PCM970_BASEBOARD
endchoice endchoice
config MACH_EUKREA_CPUIMX27 config MACH_CPUIMX27
bool "Eukrea CPUIMX27 module" bool "Eukrea CPUIMX27 module"
depends on MACH_MX27 depends on MACH_MX27
help help
...@@ -64,14 +64,14 @@ config MACH_EUKREA_CPUIMX27 ...@@ -64,14 +64,14 @@ config MACH_EUKREA_CPUIMX27
config MACH_EUKREA_CPUIMX27_USESDHC2 config MACH_EUKREA_CPUIMX27_USESDHC2
bool "CPUIMX27 integrates SDHC2 module" bool "CPUIMX27 integrates SDHC2 module"
depends on MACH_EUKREA_CPUIMX27 depends on MACH_CPUIMX27
help help
This adds support for the internal SDHC2 used on CPUIMX27 used This adds support for the internal SDHC2 used on CPUIMX27 used
for wifi or eMMC. for wifi or eMMC.
choice choice
prompt "Baseboard" prompt "Baseboard"
depends on MACH_EUKREA_CPUIMX27 depends on MACH_CPUIMX27
default MACH_EUKREA_MBIMX27_BASEBOARD default MACH_EUKREA_MBIMX27_BASEBOARD
config MACH_EUKREA_MBIMX27_BASEBOARD config MACH_EUKREA_MBIMX27_BASEBOARD
...@@ -90,7 +90,7 @@ config MACH_MX27_3DS ...@@ -90,7 +90,7 @@ config MACH_MX27_3DS
Include support for MX27PDK platform. This includes specific Include support for MX27PDK platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
config MACH_MX27LITE config MACH_IMX27LITE
bool "LogicPD MX27 LITEKIT platform" bool "LogicPD MX27 LITEKIT platform"
depends on MACH_MX27 depends on MACH_MX27
help help
......
...@@ -5,20 +5,22 @@ ...@@ -5,20 +5,22 @@
# Object file lists. # Object file lists.
obj-y := generic.o devices.o serial.o obj-y := generic.o devices.o serial.o
CFLAGS_generic.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
CFLAGS_devices.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
CFLAGS_serial.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
obj-$(CONFIG_MACH_MX21) += clock_imx21.o obj-$(CONFIG_MACH_MX21) += clock_imx21.o
obj-$(CONFIG_MACH_MX27) += cpu_imx27.o obj-$(CONFIG_MACH_MX27) += cpu_imx27.o
obj-$(CONFIG_MACH_MX27) += clock_imx27.o obj-$(CONFIG_MACH_MX27) += clock_imx27.o
obj-$(CONFIG_MACH_MX21ADS) += mx21ads.o obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o
obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
obj-$(CONFIG_MACH_PCM038) += pcm038.o obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o
obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
obj-$(CONFIG_MACH_MX27_3DS) += mx27pdk.o obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o
obj-$(CONFIG_MACH_MX27LITE) += mx27lite.o obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX27) += eukrea_cpuimx27.o obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o
obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
obj-$(CONFIG_MACH_PCA100) += pca100.o obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
obj-$(CONFIG_MACH_MXT_TD60) += mxt_td60.o obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o
...@@ -23,11 +23,242 @@ ...@@ -23,11 +23,242 @@
#include <linux/module.h> #include <linux/module.h>
#include <mach/clock.h> #include <mach/clock.h>
#include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#include <asm/clkdev.h> #include <asm/clkdev.h>
#include <asm/div64.h> #include <asm/div64.h>
#include "crm_regs.h" #define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off)))
/* Register offsets */
#define CCM_CSCR IO_ADDR_CCM(0x0)
#define CCM_MPCTL0 IO_ADDR_CCM(0x4)
#define CCM_MPCTL1 IO_ADDR_CCM(0x8)
#define CCM_SPCTL0 IO_ADDR_CCM(0xc)
#define CCM_SPCTL1 IO_ADDR_CCM(0x10)
#define CCM_OSC26MCTL IO_ADDR_CCM(0x14)
#define CCM_PCDR0 IO_ADDR_CCM(0x18)
#define CCM_PCDR1 IO_ADDR_CCM(0x1c)
#define CCM_PCCR0 IO_ADDR_CCM(0x20)
#define CCM_PCCR1 IO_ADDR_CCM(0x24)
#define CCM_CCSR IO_ADDR_CCM(0x28)
#define CCM_PMCTL IO_ADDR_CCM(0x2c)
#define CCM_PMCOUNT IO_ADDR_CCM(0x30)
#define CCM_WKGDCTL IO_ADDR_CCM(0x34)
#define CCM_CSCR_PRESC_OFFSET 29
#define CCM_CSCR_PRESC_MASK (0x7 << CCM_CSCR_PRESC_OFFSET)
#define CCM_CSCR_USB_OFFSET 26
#define CCM_CSCR_USB_MASK (0x7 << CCM_CSCR_USB_OFFSET)
#define CCM_CSCR_SD_OFFSET 24
#define CCM_CSCR_SD_MASK (0x3 << CCM_CSCR_SD_OFFSET)
#define CCM_CSCR_SPLLRES (1 << 22)
#define CCM_CSCR_MPLLRES (1 << 21)
#define CCM_CSCR_SSI2_OFFSET 20
#define CCM_CSCR_SSI2 (1 << CCM_CSCR_SSI2_OFFSET)
#define CCM_CSCR_SSI1_OFFSET 19
#define CCM_CSCR_SSI1 (1 << CCM_CSCR_SSI1_OFFSET)
#define CCM_CSCR_FIR_OFFSET 18
#define CCM_CSCR_FIR (1 << CCM_CSCR_FIR_OFFSET)
#define CCM_CSCR_SP (1 << 17)
#define CCM_CSCR_MCU (1 << 16)
#define CCM_CSCR_BCLK_OFFSET 10
#define CCM_CSCR_BCLK_MASK (0xf << CCM_CSCR_BCLK_OFFSET)
#define CCM_CSCR_IPDIV_OFFSET 9
#define CCM_CSCR_IPDIV (1 << CCM_CSCR_IPDIV_OFFSET)
#define CCM_CSCR_OSC26MDIV (1 << 4)
#define CCM_CSCR_OSC26M (1 << 3)
#define CCM_CSCR_FPM (1 << 2)
#define CCM_CSCR_SPEN (1 << 1)
#define CCM_CSCR_MPEN 1
#define CCM_MPCTL0_CPLM (1 << 31)
#define CCM_MPCTL0_PD_OFFSET 26
#define CCM_MPCTL0_PD_MASK (0xf << 26)
#define CCM_MPCTL0_MFD_OFFSET 16
#define CCM_MPCTL0_MFD_MASK (0x3ff << 16)
#define CCM_MPCTL0_MFI_OFFSET 10
#define CCM_MPCTL0_MFI_MASK (0xf << 10)
#define CCM_MPCTL0_MFN_OFFSET 0
#define CCM_MPCTL0_MFN_MASK 0x3ff
#define CCM_MPCTL1_LF (1 << 15)
#define CCM_MPCTL1_BRMO (1 << 6)
#define CCM_SPCTL0_CPLM (1 << 31)
#define CCM_SPCTL0_PD_OFFSET 26
#define CCM_SPCTL0_PD_MASK (0xf << 26)
#define CCM_SPCTL0_MFD_OFFSET 16
#define CCM_SPCTL0_MFD_MASK (0x3ff << 16)
#define CCM_SPCTL0_MFI_OFFSET 10
#define CCM_SPCTL0_MFI_MASK (0xf << 10)
#define CCM_SPCTL0_MFN_OFFSET 0
#define CCM_SPCTL0_MFN_MASK 0x3ff
#define CCM_SPCTL1_LF (1 << 15)
#define CCM_SPCTL1_BRMO (1 << 6)
#define CCM_OSC26MCTL_PEAK_OFFSET 16
#define CCM_OSC26MCTL_PEAK_MASK (0x3 << 16)
#define CCM_OSC26MCTL_AGC_OFFSET 8
#define CCM_OSC26MCTL_AGC_MASK (0x3f << 8)
#define CCM_OSC26MCTL_ANATEST_OFFSET 0
#define CCM_OSC26MCTL_ANATEST_MASK 0x3f
#define CCM_PCDR0_SSI2BAUDDIV_OFFSET 26
#define CCM_PCDR0_SSI2BAUDDIV_MASK (0x3f << 26)
#define CCM_PCDR0_SSI1BAUDDIV_OFFSET 16
#define CCM_PCDR0_SSI1BAUDDIV_MASK (0x3f << 16)
#define CCM_PCDR0_NFCDIV_OFFSET 12
#define CCM_PCDR0_NFCDIV_MASK (0xf << 12)
#define CCM_PCDR0_48MDIV_OFFSET 5
#define CCM_PCDR0_48MDIV_MASK (0x7 << CCM_PCDR0_48MDIV_OFFSET)
#define CCM_PCDR0_FIRIDIV_OFFSET 0
#define CCM_PCDR0_FIRIDIV_MASK 0x1f
#define CCM_PCDR1_PERDIV4_OFFSET 24
#define CCM_PCDR1_PERDIV4_MASK (0x3f << 24)
#define CCM_PCDR1_PERDIV3_OFFSET 16
#define CCM_PCDR1_PERDIV3_MASK (0x3f << 16)
#define CCM_PCDR1_PERDIV2_OFFSET 8
#define CCM_PCDR1_PERDIV2_MASK (0x3f << 8)
#define CCM_PCDR1_PERDIV1_OFFSET 0
#define CCM_PCDR1_PERDIV1_MASK 0x3f
#define CCM_PCCR_HCLK_CSI_OFFSET 31
#define CCM_PCCR_HCLK_CSI_REG CCM_PCCR0
#define CCM_PCCR_HCLK_DMA_OFFSET 30
#define CCM_PCCR_HCLK_DMA_REG CCM_PCCR0
#define CCM_PCCR_HCLK_BROM_OFFSET 28
#define CCM_PCCR_HCLK_BROM_REG CCM_PCCR0
#define CCM_PCCR_HCLK_EMMA_OFFSET 27
#define CCM_PCCR_HCLK_EMMA_REG CCM_PCCR0
#define CCM_PCCR_HCLK_LCDC_OFFSET 26
#define CCM_PCCR_HCLK_LCDC_REG CCM_PCCR0
#define CCM_PCCR_HCLK_SLCDC_OFFSET 25
#define CCM_PCCR_HCLK_SLCDC_REG CCM_PCCR0
#define CCM_PCCR_HCLK_USBOTG_OFFSET 24
#define CCM_PCCR_HCLK_USBOTG_REG CCM_PCCR0
#define CCM_PCCR_HCLK_BMI_OFFSET 23
#define CCM_PCCR_BMI_MASK (1 << CCM_PCCR_BMI_MASK)
#define CCM_PCCR_HCLK_BMI_REG CCM_PCCR0
#define CCM_PCCR_PERCLK4_OFFSET 22
#define CCM_PCCR_PERCLK4_REG CCM_PCCR0
#define CCM_PCCR_SLCDC_OFFSET 21
#define CCM_PCCR_SLCDC_REG CCM_PCCR0
#define CCM_PCCR_FIRI_BAUD_OFFSET 20
#define CCM_PCCR_FIRI_BAUD_MASK (1 << CCM_PCCR_FIRI_BAUD_MASK)
#define CCM_PCCR_FIRI_BAUD_REG CCM_PCCR0
#define CCM_PCCR_NFC_OFFSET 19
#define CCM_PCCR_NFC_REG CCM_PCCR0
#define CCM_PCCR_LCDC_OFFSET 18
#define CCM_PCCR_LCDC_REG CCM_PCCR0
#define CCM_PCCR_SSI1_BAUD_OFFSET 17
#define CCM_PCCR_SSI1_BAUD_REG CCM_PCCR0
#define CCM_PCCR_SSI2_BAUD_OFFSET 16
#define CCM_PCCR_SSI2_BAUD_REG CCM_PCCR0
#define CCM_PCCR_EMMA_OFFSET 15
#define CCM_PCCR_EMMA_REG CCM_PCCR0
#define CCM_PCCR_USBOTG_OFFSET 14
#define CCM_PCCR_USBOTG_REG CCM_PCCR0
#define CCM_PCCR_DMA_OFFSET 13
#define CCM_PCCR_DMA_REG CCM_PCCR0
#define CCM_PCCR_I2C1_OFFSET 12
#define CCM_PCCR_I2C1_REG CCM_PCCR0
#define CCM_PCCR_GPIO_OFFSET 11
#define CCM_PCCR_GPIO_REG CCM_PCCR0
#define CCM_PCCR_SDHC2_OFFSET 10
#define CCM_PCCR_SDHC2_REG CCM_PCCR0
#define CCM_PCCR_SDHC1_OFFSET 9
#define CCM_PCCR_SDHC1_REG CCM_PCCR0
#define CCM_PCCR_FIRI_OFFSET 8
#define CCM_PCCR_FIRI_MASK (1 << CCM_PCCR_BAUD_MASK)
#define CCM_PCCR_FIRI_REG CCM_PCCR0
#define CCM_PCCR_SSI2_IPG_OFFSET 7
#define CCM_PCCR_SSI2_REG CCM_PCCR0
#define CCM_PCCR_SSI1_IPG_OFFSET 6
#define CCM_PCCR_SSI1_REG CCM_PCCR0
#define CCM_PCCR_CSPI2_OFFSET 5
#define CCM_PCCR_CSPI2_REG CCM_PCCR0
#define CCM_PCCR_CSPI1_OFFSET 4
#define CCM_PCCR_CSPI1_REG CCM_PCCR0
#define CCM_PCCR_UART4_OFFSET 3
#define CCM_PCCR_UART4_REG CCM_PCCR0
#define CCM_PCCR_UART3_OFFSET 2
#define CCM_PCCR_UART3_REG CCM_PCCR0
#define CCM_PCCR_UART2_OFFSET 1
#define CCM_PCCR_UART2_REG CCM_PCCR0
#define CCM_PCCR_UART1_OFFSET 0
#define CCM_PCCR_UART1_REG CCM_PCCR0
#define CCM_PCCR_OWIRE_OFFSET 31
#define CCM_PCCR_OWIRE_REG CCM_PCCR1
#define CCM_PCCR_KPP_OFFSET 30
#define CCM_PCCR_KPP_REG CCM_PCCR1
#define CCM_PCCR_RTC_OFFSET 29
#define CCM_PCCR_RTC_REG CCM_PCCR1
#define CCM_PCCR_PWM_OFFSET 28
#define CCM_PCCR_PWM_REG CCM_PCCR1
#define CCM_PCCR_GPT3_OFFSET 27
#define CCM_PCCR_GPT3_REG CCM_PCCR1
#define CCM_PCCR_GPT2_OFFSET 26
#define CCM_PCCR_GPT2_REG CCM_PCCR1
#define CCM_PCCR_GPT1_OFFSET 25
#define CCM_PCCR_GPT1_REG CCM_PCCR1
#define CCM_PCCR_WDT_OFFSET 24
#define CCM_PCCR_WDT_REG CCM_PCCR1
#define CCM_PCCR_CSPI3_OFFSET 23
#define CCM_PCCR_CSPI3_REG CCM_PCCR1
#define CCM_PCCR_CSPI1_MASK (1 << CCM_PCCR_CSPI1_OFFSET)
#define CCM_PCCR_CSPI2_MASK (1 << CCM_PCCR_CSPI2_OFFSET)
#define CCM_PCCR_CSPI3_MASK (1 << CCM_PCCR_CSPI3_OFFSET)
#define CCM_PCCR_DMA_MASK (1 << CCM_PCCR_DMA_OFFSET)
#define CCM_PCCR_EMMA_MASK (1 << CCM_PCCR_EMMA_OFFSET)
#define CCM_PCCR_GPIO_MASK (1 << CCM_PCCR_GPIO_OFFSET)
#define CCM_PCCR_GPT1_MASK (1 << CCM_PCCR_GPT1_OFFSET)
#define CCM_PCCR_GPT2_MASK (1 << CCM_PCCR_GPT2_OFFSET)
#define CCM_PCCR_GPT3_MASK (1 << CCM_PCCR_GPT3_OFFSET)
#define CCM_PCCR_HCLK_BROM_MASK (1 << CCM_PCCR_HCLK_BROM_OFFSET)
#define CCM_PCCR_HCLK_CSI_MASK (1 << CCM_PCCR_HCLK_CSI_OFFSET)
#define CCM_PCCR_HCLK_DMA_MASK (1 << CCM_PCCR_HCLK_DMA_OFFSET)
#define CCM_PCCR_HCLK_EMMA_MASK (1 << CCM_PCCR_HCLK_EMMA_OFFSET)
#define CCM_PCCR_HCLK_LCDC_MASK (1 << CCM_PCCR_HCLK_LCDC_OFFSET)
#define CCM_PCCR_HCLK_SLCDC_MASK (1 << CCM_PCCR_HCLK_SLCDC_OFFSET)
#define CCM_PCCR_HCLK_USBOTG_MASK (1 << CCM_PCCR_HCLK_USBOTG_OFFSET)
#define CCM_PCCR_I2C1_MASK (1 << CCM_PCCR_I2C1_OFFSET)
#define CCM_PCCR_KPP_MASK (1 << CCM_PCCR_KPP_OFFSET)
#define CCM_PCCR_LCDC_MASK (1 << CCM_PCCR_LCDC_OFFSET)
#define CCM_PCCR_NFC_MASK (1 << CCM_PCCR_NFC_OFFSET)
#define CCM_PCCR_OWIRE_MASK (1 << CCM_PCCR_OWIRE_OFFSET)
#define CCM_PCCR_PERCLK4_MASK (1 << CCM_PCCR_PERCLK4_OFFSET)
#define CCM_PCCR_PWM_MASK (1 << CCM_PCCR_PWM_OFFSET)
#define CCM_PCCR_RTC_MASK (1 << CCM_PCCR_RTC_OFFSET)
#define CCM_PCCR_SDHC1_MASK (1 << CCM_PCCR_SDHC1_OFFSET)
#define CCM_PCCR_SDHC2_MASK (1 << CCM_PCCR_SDHC2_OFFSET)
#define CCM_PCCR_SLCDC_MASK (1 << CCM_PCCR_SLCDC_OFFSET)
#define CCM_PCCR_SSI1_BAUD_MASK (1 << CCM_PCCR_SSI1_BAUD_OFFSET)
#define CCM_PCCR_SSI1_IPG_MASK (1 << CCM_PCCR_SSI1_IPG_OFFSET)
#define CCM_PCCR_SSI2_BAUD_MASK (1 << CCM_PCCR_SSI2_BAUD_OFFSET)
#define CCM_PCCR_SSI2_IPG_MASK (1 << CCM_PCCR_SSI2_IPG_OFFSET)
#define CCM_PCCR_UART1_MASK (1 << CCM_PCCR_UART1_OFFSET)
#define CCM_PCCR_UART2_MASK (1 << CCM_PCCR_UART2_OFFSET)
#define CCM_PCCR_UART3_MASK (1 << CCM_PCCR_UART3_OFFSET)
#define CCM_PCCR_UART4_MASK (1 << CCM_PCCR_UART4_OFFSET)
#define CCM_PCCR_USBOTG_MASK (1 << CCM_PCCR_USBOTG_OFFSET)
#define CCM_PCCR_WDT_MASK (1 << CCM_PCCR_WDT_OFFSET)
#define CCM_CCSR_32KSR (1 << 15)
#define CCM_CCSR_CLKMODE1 (1 << 9)
#define CCM_CCSR_CLKMODE0 (1 << 8)
#define CCM_CCSR_CLKOSEL_OFFSET 0
#define CCM_CCSR_CLKOSEL_MASK 0x1f
#define SYS_FMCR 0x14 /* Functional Muxing Control Reg */
#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */
static int _clk_enable(struct clk *clk) static int _clk_enable(struct clk *clk)
{ {
...@@ -1004,6 +1235,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) ...@@ -1004,6 +1235,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
clk_enable(&uart_clk[0]); clk_enable(&uart_clk[0]);
#endif #endif
mxc_timer_init(&gpt_clk[0], IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT1); mxc_timer_init(&gpt_clk[0], MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR),
MX21_INT_GPT1);
return 0; return 0;
} }
...@@ -29,21 +29,23 @@ ...@@ -29,21 +29,23 @@
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))
/* Register offsets */ /* Register offsets */
#define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0) #define CCM_CSCR IO_ADDR_CCM(0x0)
#define CCM_MPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4) #define CCM_MPCTL0 IO_ADDR_CCM(0x4)
#define CCM_MPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x8) #define CCM_MPCTL1 IO_ADDR_CCM(0x8)
#define CCM_SPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0xC) #define CCM_SPCTL0 IO_ADDR_CCM(0xc)
#define CCM_SPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10) #define CCM_SPCTL1 IO_ADDR_CCM(0x10)
#define CCM_OSC26MCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x14) #define CCM_OSC26MCTL IO_ADDR_CCM(0x14)
#define CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18) #define CCM_PCDR0 IO_ADDR_CCM(0x18)
#define CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1c) #define CCM_PCDR1 IO_ADDR_CCM(0x1c)
#define CCM_PCCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20) #define CCM_PCCR0 IO_ADDR_CCM(0x20)
#define CCM_PCCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24) #define CCM_PCCR1 IO_ADDR_CCM(0x24)
#define CCM_CCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28) #define CCM_CCSR IO_ADDR_CCM(0x28)
#define CCM_PMCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x2c) #define CCM_PMCTL IO_ADDR_CCM(0x2c)
#define CCM_PMCOUNT (IO_ADDRESS(CCM_BASE_ADDR) + 0x30) #define CCM_PMCOUNT IO_ADDR_CCM(0x30)
#define CCM_WKGDCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x34) #define CCM_WKGDCTL IO_ADDR_CCM(0x34)
#define CCM_CSCR_UPDATE_DIS (1 << 31) #define CCM_CSCR_UPDATE_DIS (1 << 31)
#define CCM_CSCR_SSI2 (1 << 23) #define CCM_CSCR_SSI2 (1 << 23)
...@@ -755,7 +757,8 @@ int __init mx27_clocks_init(unsigned long fref) ...@@ -755,7 +757,8 @@ int __init mx27_clocks_init(unsigned long fref)
clk_enable(&uart1_clk); clk_enable(&uart1_clk);
#endif #endif
mxc_timer_init(&gpt1_clk, IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT1); mxc_timer_init(&gpt1_clk, MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR),
MX27_INT_GPT1);
return 0; return 0;
} }
......
...@@ -39,7 +39,8 @@ static void query_silicon_parameter(void) ...@@ -39,7 +39,8 @@ static void query_silicon_parameter(void)
* the silicon revision very early we read it here to * the silicon revision very early we read it here to
* avoid any further hooks * avoid any further hooks
*/ */
val = __raw_readl(IO_ADDRESS(SYSCTRL_BASE_ADDR) + SYS_CHIP_ID); val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR
+ SYS_CHIP_ID));
cpu_silicon_rev = (int)(val >> 28); cpu_silicon_rev = (int)(val >> 28);
cpu_partnumber = (int)((val >> 12) & 0xFFFF); cpu_partnumber = (int)((val >> 12) & 0xFFFF);
......
This diff is collapsed.
...@@ -142,28 +142,28 @@ static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = { ...@@ -142,28 +142,28 @@ static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = {
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.mapbase = (unsigned long)(CS3_BASE_ADDR + 0x200000), .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000),
.irq = IRQ_GPIOB(23), .irq = IRQ_GPIOB(23),
.uartclk = 14745600, .uartclk = 14745600,
.regshift = 1, .regshift = 1,
.iotype = UPIO_MEM, .iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(CS3_BASE_ADDR + 0x400000), .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000),
.irq = IRQ_GPIOB(22), .irq = IRQ_GPIOB(22),
.uartclk = 14745600, .uartclk = 14745600,
.regshift = 1, .regshift = 1,
.iotype = UPIO_MEM, .iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(CS3_BASE_ADDR + 0x800000), .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000),
.irq = IRQ_GPIOB(27), .irq = IRQ_GPIOB(27),
.uartclk = 14745600, .uartclk = 14745600,
.regshift = 1, .regshift = 1,
.iotype = UPIO_MEM, .iotype = UPIO_MEM,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(CS3_BASE_ADDR + 0x1000000), .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000),
.irq = IRQ_GPIOB(30), .irq = IRQ_GPIOB(30),
.uartclk = 14745600, .uartclk = 14745600,
.regshift = 1, .regshift = 1,
...@@ -224,8 +224,8 @@ static struct sys_timer eukrea_cpuimx27_timer = { ...@@ -224,8 +224,8 @@ static struct sys_timer eukrea_cpuimx27_timer = {
}; };
MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -85,8 +85,8 @@ static struct sys_timer mx27lite_timer = { ...@@ -85,8 +85,8 @@ static struct sys_timer mx27lite_timer = {
}; };
MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -118,8 +118,8 @@ static struct physmap_flash_data mx21ads_flash_data = { ...@@ -118,8 +118,8 @@ static struct physmap_flash_data mx21ads_flash_data = {
}; };
static struct resource mx21ads_flash_resource = { static struct resource mx21ads_flash_resource = {
.start = CS0_BASE_ADDR, .start = MX21_CS0_BASE_ADDR,
.end = CS0_BASE_ADDR + 0x02000000 - 1, .end = MX21_CS0_BASE_ADDR + 0x02000000 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -242,7 +242,7 @@ static struct map_desc mx21ads_io_desc[] __initdata = { ...@@ -242,7 +242,7 @@ static struct map_desc mx21ads_io_desc[] __initdata = {
*/ */
{ {
.virtual = MX21ADS_MMIO_BASE_ADDR, .virtual = MX21ADS_MMIO_BASE_ADDR,
.pfn = __phys_to_pfn(CS1_BASE_ADDR), .pfn = __phys_to_pfn(MX21_CS1_BASE_ADDR),
.length = MX21ADS_MMIO_SIZE, .length = MX21ADS_MMIO_SIZE,
.type = MT_DEVICE, .type = MT_DEVICE,
}, },
...@@ -284,8 +284,8 @@ static struct sys_timer mx21ads_timer = { ...@@ -284,8 +284,8 @@ static struct sys_timer mx21ads_timer = {
MACHINE_START(MX21ADS, "Freescale i.MX21ADS") MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPI_BASE_ADDR, .phys_io = MX21_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX21_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx21ads_map_io, .map_io = mx21ads_map_io,
.init_irq = mx21_init_irq, .init_irq = mx21_init_irq,
......
...@@ -85,8 +85,8 @@ static struct sys_timer mx27pdk_timer = { ...@@ -85,8 +85,8 @@ static struct sys_timer mx27pdk_timer = {
MACHINE_START(MX27_3DS, "Freescale MX27PDK") MACHINE_START(MX27_3DS, "Freescale MX27PDK")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -320,7 +320,7 @@ static struct sys_timer mx27ads_timer = { ...@@ -320,7 +320,7 @@ static struct sys_timer mx27ads_timer = {
static struct map_desc mx27ads_io_desc[] __initdata = { static struct map_desc mx27ads_io_desc[] __initdata = {
{ {
.virtual = PBC_BASE_ADDRESS, .virtual = PBC_BASE_ADDRESS,
.pfn = __phys_to_pfn(CS4_BASE_ADDR), .pfn = __phys_to_pfn(MX27_CS4_BASE_ADDR),
.length = SZ_1M, .length = SZ_1M,
.type = MT_DEVICE, .type = MT_DEVICE,
}, },
...@@ -334,8 +334,8 @@ static void __init mx27ads_map_io(void) ...@@ -334,8 +334,8 @@ static void __init mx27ads_map_io(void)
MACHINE_START(MX27ADS, "Freescale i.MX27ADS") MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
/* maintainer: Freescale Semiconductor, Inc. */ /* maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27ads_map_io, .map_io = mx27ads_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -58,21 +58,6 @@ static unsigned int mxt_td60_pins[] __initdata = { ...@@ -58,21 +58,6 @@ static unsigned int mxt_td60_pins[] __initdata = {
PE9_PF_UART3_RXD, PE9_PF_UART3_RXD,
PE10_PF_UART3_CTS, PE10_PF_UART3_CTS,
PE11_PF_UART3_RTS, PE11_PF_UART3_RTS,
/* UART3 */
PB26_AF_UART4_RTS,
PB28_AF_UART4_TXD,
PB29_AF_UART4_CTS,
PB31_AF_UART4_RXD,
/* UART4 */
PB18_AF_UART5_TXD,
PB19_AF_UART5_RXD,
PB20_AF_UART5_CTS,
PB21_AF_UART5_RTS,
/* UART5 */
PB10_AF_UART6_TXD,
PB12_AF_UART6_CTS,
PB11_AF_UART6_RXD,
PB13_AF_UART6_RTS,
/* FEC */ /* FEC */
PD0_AIN_FEC_TXD0, PD0_AIN_FEC_TXD0,
PD1_AIN_FEC_TXD1, PD1_AIN_FEC_TXD1,
...@@ -261,12 +246,6 @@ static struct imxuart_platform_data uart_pdata[] = { ...@@ -261,12 +246,6 @@ static struct imxuart_platform_data uart_pdata[] = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}, { }, {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}, {
.flags = IMXUART_HAVE_RTSCTS,
}, {
.flags = IMXUART_HAVE_RTSCTS,
}, {
.flags = IMXUART_HAVE_RTSCTS,
}, },
}; };
...@@ -278,9 +257,6 @@ static void __init mxt_td60_board_init(void) ...@@ -278,9 +257,6 @@ static void __init mxt_td60_board_init(void)
mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); mxc_register_device(&mxc_uart_device0, &uart_pdata[0]);
mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); mxc_register_device(&mxc_uart_device1, &uart_pdata[1]);
mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); mxc_register_device(&mxc_uart_device2, &uart_pdata[2]);
mxc_register_device(&mxc_uart_device3, &uart_pdata[3]);
mxc_register_device(&mxc_uart_device4, &uart_pdata[4]);
mxc_register_device(&mxc_uart_device5, &uart_pdata[5]);
mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info); mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info);
i2c_register_board_info(0, mxt_td60_i2c_devices, i2c_register_board_info(0, mxt_td60_i2c_devices,
...@@ -308,8 +284,8 @@ static struct sys_timer mxt_td60_timer = { ...@@ -308,8 +284,8 @@ static struct sys_timer mxt_td60_timer = {
MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
/* maintainer: Maxtrack Industrial */ /* maintainer: Maxtrack Industrial */
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -233,8 +233,8 @@ static struct sys_timer pca100_timer = { ...@@ -233,8 +233,8 @@ static struct sys_timer pca100_timer = {
}; };
MACHINE_START(PCA100, "phyCARD-i.MX27") MACHINE_START(PCA100, "phyCARD-i.MX27")
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -108,8 +108,8 @@ static struct platdata_mtd_ram pcm038_sram_data = { ...@@ -108,8 +108,8 @@ static struct platdata_mtd_ram pcm038_sram_data = {
}; };
static struct resource pcm038_sram_resource = { static struct resource pcm038_sram_resource = {
.start = CS1_BASE_ADDR, .start = MX27_CS1_BASE_ADDR,
.end = CS1_BASE_ADDR + 512 * 1024 - 1, .end = MX27_CS1_BASE_ADDR + 512 * 1024 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -173,9 +173,7 @@ static struct platform_device *platform_devices[] __initdata = { ...@@ -173,9 +173,7 @@ 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)
{ {
__raw_writel(0x0000d843, CSCR_U(1)); mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00);
__raw_writel(0x22252521, CSCR_L(1));
__raw_writel(0x22220a00, CSCR_A(1));
} }
static struct imxi2c_platform_data pcm038_i2c_1_data = { static struct imxi2c_platform_data pcm038_i2c_1_data = {
...@@ -328,8 +326,8 @@ static struct sys_timer pcm038_timer = { ...@@ -328,8 +326,8 @@ static struct sys_timer pcm038_timer = {
}; };
MACHINE_START(PCM038, "phyCORE-i.MX27") MACHINE_START(PCM038, "phyCORE-i.MX27")
.phys_io = AIPI_BASE_ADDR, .phys_io = MX27_AIPI_BASE_ADDR,
.io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
......
...@@ -190,8 +190,8 @@ static struct imx_fb_platform_data pcm038_fb_data = { ...@@ -190,8 +190,8 @@ static struct imx_fb_platform_data pcm038_fb_data = {
static struct resource pcm970_sja1000_resources[] = { static struct resource pcm970_sja1000_resources[] = {
{ {
.start = CS4_BASE_ADDR, .start = MX27_CS4_BASE_ADDR,
.end = CS4_BASE_ADDR + 0x100 - 1, .end = MX27_CS4_BASE_ADDR + 0x100 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IRQ_GPIOE(19), .start = IRQ_GPIOE(19),
......
...@@ -173,6 +173,7 @@ DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL); ...@@ -173,6 +173,7 @@ DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL);
DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL); DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL);
DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL); DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL);
DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL); DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL);
DEFINE_CLOCK(fec_clk, 0, CCM_CGCR0, 23, get_rate_ipg, NULL);
#define _REGISTER_CLOCK(d, n, c) \ #define _REGISTER_CLOCK(d, n, c) \
{ \ { \
...@@ -204,6 +205,7 @@ static struct clk_lookup lookups[] = { ...@@ -204,6 +205,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk)
_REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk)
_REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk)
_REGISTER_CLOCK("fec.0", NULL, fec_clk)
}; };
int __init mx25_clocks_init(unsigned long fref) int __init mx25_clocks_init(unsigned long fref)
......
...@@ -419,3 +419,22 @@ int __init mxc_register_gpios(void) ...@@ -419,3 +419,22 @@ int __init mxc_register_gpios(void)
return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
} }
static struct resource mx25_fec_resources[] = {
{
.start = MX25_FEC_BASE_ADDR,
.end = MX25_FEC_BASE_ADDR + 0xfff,
.flags = IORESOURCE_MEM,
},
{
.start = MX25_INT_FEC,
.end = MX25_INT_FEC,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mx25_fec_device = {
.name = "fec",
.id = 0,
.num_resources = ARRAY_SIZE(mx25_fec_resources),
.resource = mx25_fec_resources,
};
...@@ -17,3 +17,4 @@ extern struct platform_device mxc_keypad_device; ...@@ -17,3 +17,4 @@ extern struct platform_device mxc_keypad_device;
extern struct platform_device mxc_i2c_device0; extern struct platform_device mxc_i2c_device0;
extern struct platform_device mxc_i2c_device1; extern struct platform_device mxc_i2c_device1;
extern struct platform_device mxc_i2c_device2; extern struct platform_device mxc_i2c_device2;
extern struct platform_device mx25_fec_device;
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/delay.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/smsc911x.h> #include <linux/fec.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <mach/hardware.h> #include <mach/hardware.h>
...@@ -35,16 +36,57 @@ ...@@ -35,16 +36,57 @@
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/mxc_nand.h> #include <mach/mxc_nand.h>
#include "devices.h" #include "devices.h"
#include <mach/iomux-v3.h> #include <mach/iomux.h>
static struct imxuart_platform_data uart_pdata = { static struct imxuart_platform_data uart_pdata = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
static struct pad_desc mx25pdk_pads[] = {
MX25_PAD_FEC_MDC__FEC_MDC,
MX25_PAD_FEC_MDIO__FEC_MDIO,
MX25_PAD_FEC_TDATA0__FEC_TDATA0,
MX25_PAD_FEC_TDATA1__FEC_TDATA1,
MX25_PAD_FEC_TX_EN__FEC_TX_EN,
MX25_PAD_FEC_RDATA0__FEC_RDATA0,
MX25_PAD_FEC_RDATA1__FEC_RDATA1,
MX25_PAD_FEC_RX_DV__FEC_RX_DV,
MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */
MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
};
static struct fec_platform_data mx25_fec_pdata = {
.phy = PHY_INTERFACE_MODE_RMII,
};
#define FEC_ENABLE_GPIO 35
#define FEC_RESET_B_GPIO 104
static void __init mx25pdk_fec_reset(void)
{
gpio_request(FEC_ENABLE_GPIO, "FEC PHY enable");
gpio_request(FEC_RESET_B_GPIO, "FEC PHY reset");
gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */
gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */
udelay(2);
/* turn on PHY power and lift reset */
gpio_set_value(FEC_ENABLE_GPIO, 1);
gpio_set_value(FEC_RESET_B_GPIO, 1);
}
static void __init mx25pdk_init(void) static void __init mx25pdk_init(void)
{ {
mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
ARRAY_SIZE(mx25pdk_pads));
mxc_register_device(&mxc_uart_device0, &uart_pdata); mxc_register_device(&mxc_uart_device0, &uart_pdata);
mxc_register_device(&mxc_usbh2, NULL); mxc_register_device(&mxc_usbh2, NULL);
mx25pdk_fec_reset();
mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
} }
static void __init mx25pdk_timer_init(void) static void __init mx25pdk_timer_init(void)
......
...@@ -49,6 +49,7 @@ config MACH_PCM037_EET ...@@ -49,6 +49,7 @@ config MACH_PCM037_EET
config MACH_MX31LITE config MACH_MX31LITE
bool "Support MX31 LITEKIT (LogicPD)" bool "Support MX31 LITEKIT (LogicPD)"
select ARCH_MX31 select ARCH_MX31
select MXC_ULPI if USB_ULPI
help help
Include support for MX31 LITEKIT platform. This includes specific Include support for MX31 LITEKIT platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
...@@ -63,7 +64,7 @@ config MACH_MX31_3DS ...@@ -63,7 +64,7 @@ config MACH_MX31_3DS
config MACH_MX31MOBOARD config MACH_MX31MOBOARD
bool "Support mx31moboard platforms (EPFL Mobots group)" bool "Support mx31moboard platforms (EPFL Mobots group)"
select ARCH_MX31 select ARCH_MX31
select MXC_ULPI select MXC_ULPI if USB_ULPI
help help
Include support for mx31moboard platform. This includes specific Include support for mx31moboard platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
......
...@@ -5,18 +5,22 @@ ...@@ -5,18 +5,22 @@
# Object file lists. # Object file lists.
obj-y := mm.o devices.o cpu.o obj-y := mm.o devices.o cpu.o
obj-$(CONFIG_ARCH_MX31) += clock.o iomux.o CFLAGS_mm.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
CFLAGS_devices.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
CFLAGS_cpu.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
obj-$(CONFIG_ARCH_MX31) += clock-imx31.o iomux-imx31.o
obj-$(CONFIG_ARCH_MX35) += clock-imx35.o obj-$(CONFIG_ARCH_MX35) += clock-imx35.o
obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o
obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o obj-$(CONFIG_MACH_MX31LILLY) += mach-mx31lilly.o mx31lilly-db.o
obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o mx31lite-db.o obj-$(CONFIG_MACH_MX31LITE) += mach-mx31lite.o mx31lite-db.o
obj-$(CONFIG_MACH_PCM037) += pcm037.o obj-$(CONFIG_MACH_PCM037) += mach-pcm037.o
obj-$(CONFIG_MACH_PCM037_EET) += pcm037_eet.o obj-$(CONFIG_MACH_PCM037_EET) += mach-pcm037_eet.o
obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o obj-$(CONFIG_MACH_MX31_3DS) += mach-mx31_3ds.o
obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ CFLAGS_mach-mx31_3ds.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \
mx31moboard-marxbot.o mx31moboard-marxbot.o
obj-$(CONFIG_MACH_QONG) += qong.o obj-$(CONFIG_MACH_QONG) += mach-qong.o
obj-$(CONFIG_MACH_PCM043) += pcm043.o obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o
obj-$(CONFIG_MACH_ARMADILLO5X0) += armadillo5x0.o obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
obj-$(CONFIG_MACH_MX35_3DS) += mx35pdk.o obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35pdk.o
obj-$(CONFIG_MACH_KZM_ARM11_01) += kzmarm11.o obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o
...@@ -618,14 +618,15 @@ int __init mx31_clocks_init(unsigned long fref) ...@@ -618,14 +618,15 @@ int __init mx31_clocks_init(unsigned long fref)
mx31_read_cpu_rev(); mx31_read_cpu_rev();
if (mx31_revision() >= CHIP_REV_2_0) { if (mx31_revision() >= MX31_CHIP_REV_2_0) {
reg = __raw_readl(MXC_CCM_PMCR1); reg = __raw_readl(MXC_CCM_PMCR1);
/* No PLL restart on DVFS switch; enable auto EMI handshake */ /* No PLL restart on DVFS switch; enable auto EMI handshake */
reg |= MXC_CCM_PMCR1_PLLRDIS | MXC_CCM_PMCR1_EMIRQ_EN; reg |= MXC_CCM_PMCR1_PLLRDIS | MXC_CCM_PMCR1_EMIRQ_EN;
__raw_writel(reg, MXC_CCM_PMCR1); __raw_writel(reg, MXC_CCM_PMCR1);
} }
mxc_timer_init(&ipg_clk, IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT); mxc_timer_init(&ipg_clk, MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR),
MX31_INT_GPT);
return 0; return 0;
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h> #include <mach/common.h>
#define CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) #define CCM_BASE MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR)
#define CCM_CCMR 0x00 #define CCM_CCMR 0x00
#define CCM_PDR0 0x04 #define CCM_PDR0 0x04
...@@ -504,7 +504,8 @@ int __init mx35_clocks_init() ...@@ -504,7 +504,8 @@ int __init mx35_clocks_init()
__raw_writel((3 << 26) | ll, CCM_BASE + CCM_CGR2); __raw_writel((3 << 26) | ll, CCM_BASE + CCM_CGR2);
__raw_writel(0, CCM_BASE + CCM_CGR3); __raw_writel(0, CCM_BASE + CCM_CGR3);
mxc_timer_init(&gpt_clk, IO_ADDRESS(GPT1_BASE_ADDR), MXC_INT_GPT); mxc_timer_init(&gpt_clk,
MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT);
return 0; return 0;
} }
......
...@@ -41,7 +41,7 @@ void __init mx31_read_cpu_rev(void) ...@@ -41,7 +41,7 @@ void __init mx31_read_cpu_rev(void)
u32 i, srev; u32 i, srev;
/* read SREV register from IIM module */ /* read SREV register from IIM module */
srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR) + MXC_IIMSREV); srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR + MXC_IIMSREV));
for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
if (srev == mx31_cpu_type[i].srev) { if (srev == mx31_cpu_type[i].srev) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#define CKIH_CLK_FREQ_27MHZ 27000000 #define CKIH_CLK_FREQ_27MHZ 27000000
#define CKIL_CLK_FREQ 32768 #define CKIL_CLK_FREQ 32768
#define MXC_CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) #define MXC_CCM_BASE MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR)
/* Register addresses */ /* Register addresses */
#define MXC_CCM_CCMR (MXC_CCM_BASE + 0x00) #define MXC_CCM_CCMR (MXC_CCM_BASE + 0x00)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/* /*
* IOMUX register (base) addresses * IOMUX register (base) addresses
*/ */
#define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR) #define IOMUX_BASE MX31_IO_ADDRESS(MX31_IOMUXC_BASE_ADDR)
#define IOMUXINT_OBS1 (IOMUX_BASE + 0x000) #define IOMUXINT_OBS1 (IOMUX_BASE + 0x000)
#define IOMUXINT_OBS2 (IOMUX_BASE + 0x004) #define IOMUXINT_OBS2 (IOMUX_BASE + 0x004)
#define IOMUXGPR (IOMUX_BASE + 0x008) #define IOMUXGPR (IOMUX_BASE + 0x008)
......
...@@ -182,8 +182,8 @@ static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { ...@@ -182,8 +182,8 @@ static struct physmap_flash_data armadillo5x0_nor_flash_pdata = {
static struct resource armadillo5x0_nor_flash_resource = { static struct resource armadillo5x0_nor_flash_resource = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
.start = CS0_BASE_ADDR, .start = MX31_CS0_BASE_ADDR,
.end = CS0_BASE_ADDR + SZ_64M - 1, .end = MX31_CS0_BASE_ADDR + SZ_64M - 1,
}; };
static struct platform_device armadillo5x0_nor_flash = { static struct platform_device armadillo5x0_nor_flash = {
...@@ -311,8 +311,8 @@ static struct imxmmc_platform_data sdhc_pdata = { ...@@ -311,8 +311,8 @@ static struct imxmmc_platform_data sdhc_pdata = {
*/ */
static struct resource armadillo5x0_smc911x_resources[] = { static struct resource armadillo5x0_smc911x_resources[] = {
{ {
.start = CS3_BASE_ADDR, .start = MX31_CS3_BASE_ADDR,
.end = CS3_BASE_ADDR + SZ_32M - 1, .end = MX31_CS3_BASE_ADDR + SZ_32M - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0),
...@@ -406,8 +406,8 @@ static struct sys_timer armadillo5x0_timer = { ...@@ -406,8 +406,8 @@ static struct sys_timer armadillo5x0_timer = {
MACHINE_START(ARMADILLO5X0, "Armadillo-500") MACHINE_START(ARMADILLO5X0, "Armadillo-500")
/* Maintainer: Alberto Panizzo */ /* Maintainer: Alberto Panizzo */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PHYS_OFFSET + 0x00000100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -46,13 +46,18 @@ ...@@ -46,13 +46,18 @@
#include "devices.h" #include "devices.h"
#define KZM_ARM11_IO_ADDRESS(x) ( \
IMX_IO_ADDRESS(x, MX31_CS4) ?: \
IMX_IO_ADDRESS(x, MX31_CS5) ?: \
MX31_IO_ADDRESS(x))
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
/* /*
* KZM-ARM11-01 has an external UART on FPGA * KZM-ARM11-01 has an external UART on FPGA
*/ */
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.membase = IO_ADDRESS(KZM_ARM11_16550), .membase = KZM_ARM11_IO_ADDRESS(KZM_ARM11_16550),
.mapbase = KZM_ARM11_16550, .mapbase = KZM_ARM11_16550,
.irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1),
.irqflags = IRQ_TYPE_EDGE_RISING, .irqflags = IRQ_TYPE_EDGE_RISING,
...@@ -102,9 +107,9 @@ static int __init kzm_init_ext_uart(void) ...@@ -102,9 +107,9 @@ static int __init kzm_init_ext_uart(void)
/* /*
* Unmask UART interrupt * Unmask UART interrupt
*/ */
tmp = __raw_readb(IO_ADDRESS(KZM_ARM11_CTL1)); tmp = __raw_readb(KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1));
tmp |= 0x2; tmp |= 0x2;
__raw_writeb(tmp, IO_ADDRESS(KZM_ARM11_CTL1)); __raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1));
return platform_device_register(&serial_device); return platform_device_register(&serial_device);
} }
...@@ -128,8 +133,8 @@ static struct smsc911x_platform_config kzm_smsc9118_config = { ...@@ -128,8 +133,8 @@ static struct smsc911x_platform_config kzm_smsc9118_config = {
static struct resource kzm_smsc9118_resources[] = { static struct resource kzm_smsc9118_resources[] = {
{ {
.start = CS5_BASE_ADDR, .start = MX31_CS5_BASE_ADDR,
.end = CS5_BASE_ADDR + SZ_128K - 1, .end = MX31_CS5_BASE_ADDR + SZ_128K - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
{ {
...@@ -222,15 +227,15 @@ static void __init kzm_board_init(void) ...@@ -222,15 +227,15 @@ static void __init kzm_board_init(void)
*/ */
static struct map_desc kzm_io_desc[] __initdata = { static struct map_desc kzm_io_desc[] __initdata = {
{ {
.virtual = CS4_BASE_ADDR_VIRT, .virtual = MX31_CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS4_BASE_ADDR), .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR),
.length = CS4_SIZE, .length = MX31_CS4_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
{ {
.virtual = CS5_BASE_ADDR_VIRT, .virtual = MX31_CS5_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS5_BASE_ADDR), .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR),
.length = CS5_SIZE, .length = MX31_CS5_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
}; };
...@@ -258,8 +263,8 @@ static struct sys_timer kzm_timer = { ...@@ -258,8 +263,8 @@ static struct sys_timer kzm_timer = {
* initialize __mach_desc_KZM_ARM11_01 data structure. * initialize __mach_desc_KZM_ARM11_01 data structure.
*/ */
MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = kzm_map_io, .map_io = kzm_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -211,14 +211,9 @@ static int __init mx31pdk_init_expio(void) ...@@ -211,14 +211,9 @@ static int __init mx31pdk_init_expio(void)
*/ */
static struct map_desc mx31pdk_io_desc[] __initdata = { static struct map_desc mx31pdk_io_desc[] __initdata = {
{ {
.virtual = SPBA0_BASE_ADDR_VIRT, .virtual = MX31_CS5_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR), .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR),
.length = SPBA0_SIZE, .length = MX31_CS5_SIZE,
.type = MT_DEVICE_NONSHARED,
}, {
.virtual = CS5_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS5_BASE_ADDR),
.length = CS5_SIZE,
.type = MT_DEVICE, .type = MT_DEVICE,
}, },
}; };
...@@ -261,8 +256,8 @@ static struct sys_timer mx31pdk_timer = { ...@@ -261,8 +256,8 @@ static struct sys_timer mx31pdk_timer = {
*/ */
MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31pdk_map_io, .map_io = mx31pdk_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA),
.mapbase = (unsigned long)(CS4_BASE_ADDR + PBC_SC16C652_UARTA), .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTA),
.irq = EXPIO_INT_XUART_INTA, .irq = EXPIO_INT_XUART_INTA,
.uartclk = 14745600, .uartclk = 14745600,
.regshift = 0, .regshift = 0,
...@@ -68,7 +68,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -68,7 +68,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ,
}, { }, {
.membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB),
.mapbase = (unsigned long)(CS4_BASE_ADDR + PBC_SC16C652_UARTB), .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTB),
.irq = EXPIO_INT_XUART_INTB, .irq = EXPIO_INT_XUART_INTB,
.uartclk = 14745600, .uartclk = 14745600,
.regshift = 0, .regshift = 0,
...@@ -486,14 +486,9 @@ static void mxc_init_i2c(void) ...@@ -486,14 +486,9 @@ static void mxc_init_i2c(void)
*/ */
static struct map_desc mx31ads_io_desc[] __initdata = { static struct map_desc mx31ads_io_desc[] __initdata = {
{ {
.virtual = SPBA0_BASE_ADDR_VIRT, .virtual = MX31_CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR), .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR),
.length = SPBA0_SIZE, .length = MX31_CS4_SIZE / 2,
.type = MT_DEVICE_NONSHARED
}, {
.virtual = CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS4_BASE_ADDR),
.length = CS4_SIZE / 2,
.type = MT_DEVICE .type = MT_DEVICE
}, },
}; };
...@@ -538,8 +533,8 @@ static struct sys_timer mx31ads_timer = { ...@@ -538,8 +533,8 @@ static struct sys_timer mx31ads_timer = {
*/ */
MACHINE_START(MX31ADS, "Freescale MX31ADS") MACHINE_START(MX31ADS, "Freescale MX31ADS")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31ads_map_io, .map_io = mx31ads_map_io,
.init_irq = mx31ads_init_irq, .init_irq = mx31ads_init_irq,
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
static struct resource smsc91x_resources[] = { static struct resource smsc91x_resources[] = {
{ {
.start = CS4_BASE_ADDR, .start = MX31_CS4_BASE_ADDR,
.end = CS4_BASE_ADDR + 0xffff, .end = MX31_CS4_BASE_ADDR + 0xffff,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
{ {
...@@ -195,8 +195,8 @@ static struct sys_timer mx31lilly_timer = { ...@@ -195,8 +195,8 @@ static struct sys_timer mx31lilly_timer = {
}; };
MACHINE_START(LILLY1131, "INCO startec LILLY-1131") MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -82,8 +82,8 @@ static struct smsc911x_platform_config smsc911x_config = { ...@@ -82,8 +82,8 @@ static struct smsc911x_platform_config smsc911x_config = {
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
{ {
.start = CS4_BASE_ADDR, .start = MX31_CS4_BASE_ADDR,
.end = CS4_BASE_ADDR + 0x100, .end = MX31_CS4_BASE_ADDR + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IOMUX_TO_IRQ(MX31_PIN_SFS6), .start = IOMUX_TO_IRQ(MX31_PIN_SFS6),
...@@ -135,6 +135,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = { ...@@ -135,6 +135,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = {
* USB * USB
*/ */
#if defined(CONFIG_USB_ULPI)
#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
...@@ -180,6 +181,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = { ...@@ -180,6 +181,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
.flags = MXC_EHCI_POWER_PINS_ENABLED, .flags = MXC_EHCI_POWER_PINS_ENABLED,
}; };
#endif
/* /*
* NOR flash * NOR flash
...@@ -212,14 +214,9 @@ static struct platform_device physmap_flash_device = { ...@@ -212,14 +214,9 @@ static struct platform_device physmap_flash_device = {
*/ */
static struct map_desc mx31lite_io_desc[] __initdata = { static struct map_desc mx31lite_io_desc[] __initdata = {
{ {
.virtual = SPBA0_BASE_ADDR_VIRT, .virtual = MX31_CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR), .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR),
.length = SPBA0_SIZE, .length = MX31_CS4_SIZE,
.type = MT_DEVICE_NONSHARED
}, {
.virtual = CS4_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(CS4_BASE_ADDR),
.length = CS4_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
} }
}; };
...@@ -261,11 +258,13 @@ static void __init mxc_board_init(void) ...@@ -261,11 +258,13 @@ static void __init mxc_board_init(void)
mxc_register_device(&mxc_spi_device1, &spi1_pdata); mxc_register_device(&mxc_spi_device1, &spi1_pdata);
spi_register_board_info(&mc13783_spi_dev, 1); spi_register_board_info(&mc13783_spi_dev, 1);
#if defined(CONFIG_USB_ULPI)
/* USB */ /* USB */
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
mxc_register_device(&mxc_usbh2, &usbh2_pdata); mxc_register_device(&mxc_usbh2, &usbh2_pdata);
#endif
/* SMSC9117 IRQ pin */ /* SMSC9117 IRQ pin */
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
...@@ -288,8 +287,8 @@ struct sys_timer mx31lite_timer = { ...@@ -288,8 +287,8 @@ struct sys_timer mx31lite_timer = {
MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
/* Maintainer: Freescale Semiconductor, Inc. */ /* Maintainer: Freescale Semiconductor, Inc. */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31lite_map_io, .map_io = mx31lite_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -346,6 +346,8 @@ static struct fsl_usb2_platform_data usb_pdata = { ...@@ -346,6 +346,8 @@ static struct fsl_usb2_platform_data usb_pdata = {
.phy_mode = FSL_USB2_PHY_ULPI, .phy_mode = FSL_USB2_PHY_ULPI,
}; };
#if defined(CONFIG_USB_ULPI)
#define USBH2_EN_B IOMUX_TO_GPIO(MX31_PIN_SCK6) #define USBH2_EN_B IOMUX_TO_GPIO(MX31_PIN_SCK6)
static int moboard_usbh2_hw_init(struct platform_device *pdev) static int moboard_usbh2_hw_init(struct platform_device *pdev)
...@@ -392,8 +394,11 @@ static int __init moboard_usbh2_init(void) ...@@ -392,8 +394,11 @@ static int __init moboard_usbh2_init(void)
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
return mxc_register_device(&mx31_usbh2, &usbh2_pdata); return mxc_register_device(&mxc_usbh2, &usbh2_pdata);
} }
#else
static inline int moboard_usbh2_init(void) { return 0; }
#endif
static struct gpio_led mx31moboard_leds[] = { static struct gpio_led mx31moboard_leds[] = {
...@@ -564,8 +569,8 @@ struct sys_timer mx31moboard_timer = { ...@@ -564,8 +569,8 @@ struct sys_timer mx31moboard_timer = {
MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
/* Maintainer: Valentin Longchamp, EPFL Mobots group */ /* Maintainer: Valentin Longchamp, EPFL Mobots group */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -106,8 +106,8 @@ struct sys_timer mx35pdk_timer = { ...@@ -106,8 +106,8 @@ struct sys_timer mx35pdk_timer = {
MACHINE_START(MX35_3DS, "Freescale MX35PDK") MACHINE_START(MX35_3DS, "Freescale MX35PDK")
/* Maintainer: Freescale Semiconductor, Inc */ /* Maintainer: Freescale Semiconductor, Inc */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX35_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
......
...@@ -248,8 +248,8 @@ static struct imxuart_platform_data uart_pdata = { ...@@ -248,8 +248,8 @@ static struct imxuart_platform_data uart_pdata = {
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
{ {
.start = CS1_BASE_ADDR + 0x300, .start = MX31_CS1_BASE_ADDR + 0x300,
.end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
...@@ -281,8 +281,8 @@ static struct platdata_mtd_ram pcm038_sram_data = { ...@@ -281,8 +281,8 @@ static struct platdata_mtd_ram pcm038_sram_data = {
}; };
static struct resource pcm038_sram_resource = { static struct resource pcm038_sram_resource = {
.start = CS4_BASE_ADDR, .start = MX31_CS4_BASE_ADDR,
.end = CS4_BASE_ADDR + 512 * 1024 - 1, .end = MX31_CS4_BASE_ADDR + 512 * 1024 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -322,16 +322,25 @@ static int pcm037_camera_power(struct device *dev, int on) ...@@ -322,16 +322,25 @@ static int pcm037_camera_power(struct device *dev, int on)
return 0; return 0;
} }
static struct i2c_board_info pcm037_i2c_2_devices[] = { static struct i2c_board_info pcm037_i2c_camera[] = {
{ {
I2C_BOARD_INFO("mt9t031", 0x5d), I2C_BOARD_INFO("mt9t031", 0x5d),
}, {
I2C_BOARD_INFO("mt9v022", 0x48),
}, },
}; };
static struct soc_camera_link iclink = { static struct soc_camera_link iclink_mt9v022 = {
.bus_id = 0, /* Must match with the camera ID */
.board_info = &pcm037_i2c_camera[1],
.i2c_adapter_id = 2,
.module_name = "mt9v022",
};
static struct soc_camera_link iclink_mt9t031 = {
.bus_id = 0, /* Must match with the camera ID */ .bus_id = 0, /* Must match with the camera ID */
.power = pcm037_camera_power, .power = pcm037_camera_power,
.board_info = &pcm037_i2c_2_devices[0], .board_info = &pcm037_i2c_camera[0],
.i2c_adapter_id = 2, .i2c_adapter_id = 2,
.module_name = "mt9t031", .module_name = "mt9t031",
}; };
...@@ -345,11 +354,19 @@ static struct i2c_board_info pcm037_i2c_devices[] = { ...@@ -345,11 +354,19 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
} }
}; };
static struct platform_device pcm037_camera = { static struct platform_device pcm037_mt9t031 = {
.name = "soc-camera-pdrv", .name = "soc-camera-pdrv",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &iclink, .platform_data = &iclink_mt9t031,
},
};
static struct platform_device pcm037_mt9v022 = {
.name = "soc-camera-pdrv",
.id = 1,
.dev = {
.platform_data = &iclink_mt9v022,
}, },
}; };
...@@ -449,7 +466,8 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size) ...@@ -449,7 +466,8 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size)
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&pcm037_flash, &pcm037_flash,
&pcm037_sram_device, &pcm037_sram_device,
&pcm037_camera, &pcm037_mt9t031,
&pcm037_mt9v022,
}; };
static struct ipu_platform_data mx3_ipu_data = { static struct ipu_platform_data mx3_ipu_data = {
...@@ -518,8 +536,8 @@ static struct mx3fb_platform_data mx3fb_pdata = { ...@@ -518,8 +536,8 @@ static struct mx3fb_platform_data mx3fb_pdata = {
static struct resource pcm970_sja1000_resources[] = { static struct resource pcm970_sja1000_resources[] = {
{ {
.start = CS5_BASE_ADDR, .start = MX31_CS5_BASE_ADDR,
.end = CS5_BASE_ADDR + 0x100 - 1, .end = MX31_CS5_BASE_ADDR + 0x100 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, { }, {
.start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)),
...@@ -599,7 +617,7 @@ static void __init mxc_board_init(void) ...@@ -599,7 +617,7 @@ static void __init mxc_board_init(void)
if (!ret) if (!ret)
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1);
else else
iclink.power = NULL; iclink_mt9t031.power = NULL;
if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) if (!pcm037_camera_alloc_dma(4 * 1024 * 1024))
mxc_register_device(&mx3_camera, &camera_pdata); mxc_register_device(&mx3_camera, &camera_pdata);
...@@ -618,8 +636,8 @@ struct sys_timer pcm037_timer = { ...@@ -618,8 +636,8 @@ struct sys_timer pcm037_timer = {
MACHINE_START(PCM037, "Phytec Phycore pcm037") MACHINE_START(PCM037, "Phytec Phycore pcm037")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -248,8 +248,8 @@ struct sys_timer pcm043_timer = { ...@@ -248,8 +248,8 @@ struct sys_timer pcm043_timer = {
MACHINE_START(PCM043, "Phytec Phycore pcm043") MACHINE_START(PCM043, "Phytec Phycore pcm043")
/* Maintainer: Pengutronix */ /* Maintainer: Pengutronix */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX35_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#define QONG_FPGA_VERSION(major, minor, rev) \ #define QONG_FPGA_VERSION(major, minor, rev) \
(((major & 0xF) << 12) | ((minor & 0xF) << 8) | (rev & 0xFF)) (((major & 0xF) << 12) | ((minor & 0xF) << 8) | (rev & 0xFF))
#define QONG_FPGA_BASEADDR CS1_BASE_ADDR #define QONG_FPGA_BASEADDR MX31_CS1_BASE_ADDR
#define QONG_FPGA_PERIPH_SIZE (1 << 24) #define QONG_FPGA_PERIPH_SIZE (1 << 24)
#define QONG_FPGA_CTRL_BASEADDR QONG_FPGA_BASEADDR #define QONG_FPGA_CTRL_BASEADDR QONG_FPGA_BASEADDR
...@@ -115,8 +115,8 @@ static struct physmap_flash_data qong_flash_data = { ...@@ -115,8 +115,8 @@ static struct physmap_flash_data qong_flash_data = {
}; };
static struct resource qong_flash_resource = { static struct resource qong_flash_resource = {
.start = CS0_BASE_ADDR, .start = MX31_CS0_BASE_ADDR,
.end = CS0_BASE_ADDR + QONG_NOR_SIZE - 1, .end = MX31_CS0_BASE_ADDR + QONG_NOR_SIZE - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -180,8 +180,8 @@ static struct platform_nand_data qong_nand_data = { ...@@ -180,8 +180,8 @@ static struct platform_nand_data qong_nand_data = {
}; };
static struct resource qong_nand_resource = { static struct resource qong_nand_resource = {
.start = CS3_BASE_ADDR, .start = MX31_CS3_BASE_ADDR,
.end = CS3_BASE_ADDR + SZ_32M - 1, .end = MX31_CS3_BASE_ADDR + SZ_32M - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -198,9 +198,7 @@ static struct platform_device qong_nand_device = { ...@@ -198,9 +198,7 @@ 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 */
__raw_writel(0x00004f00, CSCR_U(3)); mx31_setup_weimcs(3, 0x00004f00, 0x20013b31, 0x00020800);
__raw_writel(0x20013b31, CSCR_L(3));
__raw_writel(0x00020800, CSCR_A(3));
mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true);
/* enable pin */ /* enable pin */
...@@ -275,8 +273,8 @@ static struct sys_timer qong_timer = { ...@@ -275,8 +273,8 @@ static struct sys_timer qong_timer = {
MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
/* Maintainer: DENX Software Engineering GmbH */ /* Maintainer: DENX Software Engineering GmbH */
.phys_io = AIPS1_BASE_ADDR, .phys_io = MX31_AIPS1_BASE_ADDR,
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PHYS_OFFSET + 0x100,
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
......
...@@ -65,6 +65,11 @@ static struct map_desc mxc_io_desc[] __initdata = { ...@@ -65,6 +65,11 @@ static struct map_desc mxc_io_desc[] __initdata = {
.pfn = __phys_to_pfn(AIPS2_BASE_ADDR), .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
.length = AIPS2_SIZE, .length = AIPS2_SIZE,
.type = MT_DEVICE_NONSHARED .type = MT_DEVICE_NONSHARED
}, {
.virtual = SPBA0_BASE_ADDR_VIRT,
.pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
.length = SPBA0_SIZE,
.type = MT_DEVICE_NONSHARED
}, },
}; };
......
...@@ -179,7 +179,7 @@ static int __init devboard_usbh1_init(void) ...@@ -179,7 +179,7 @@ static int __init devboard_usbh1_init(void)
usbh1_pdata.otg = otg; usbh1_pdata.otg = otg;
return mxc_register_device(&mx31_usbh1, &usbh1_pdata); return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
} }
/* /*
......
...@@ -294,7 +294,7 @@ static int __init marxbot_usbh1_init(void) ...@@ -294,7 +294,7 @@ static int __init marxbot_usbh1_init(void)
usbh1_pdata.otg = otg; usbh1_pdata.otg = otg;
return mxc_register_device(&mx31_usbh1, &usbh1_pdata); return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
} }
/* /*
......
...@@ -7,9 +7,13 @@ obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o system.o ...@@ -7,9 +7,13 @@ obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o system.o
obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o
obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
CFLAGS_iomux-mx1-mx2.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
CFLAGS_dma-mx1-mx2.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
obj-$(CONFIG_MXC_PWM) += pwm.o obj-$(CONFIG_MXC_PWM) += pwm.o
obj-$(CONFIG_USB_EHCI_MXC) += ehci.o obj-$(CONFIG_USB_EHCI_MXC) += ehci.o
obj-$(CONFIG_MXC_ULPI) += ulpi.o obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o
CFLAGS_audmux-v1.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o
CFLAGS_audmux-v2.o = -DIMX_NEEDS_DEPRECATED_SYMBOLS
...@@ -43,7 +43,7 @@ int mxc_set_usbcontrol(int port, unsigned int flags) ...@@ -43,7 +43,7 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
unsigned int v; unsigned int v;
if (cpu_is_mx31()) { if (cpu_is_mx31()) {
v = readl(IO_ADDRESS(MX31_OTG_BASE_ADDR + v = readl(MX31_IO_ADDRESS(MX31_OTG_BASE_ADDR +
USBCTRL_OTGBASE_OFFSET)); USBCTRL_OTGBASE_OFFSET));
switch (port) { switch (port) {
...@@ -79,7 +79,7 @@ int mxc_set_usbcontrol(int port, unsigned int flags) ...@@ -79,7 +79,7 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
break; break;
} }
writel(v, IO_ADDRESS(MX31_OTG_BASE_ADDR + writel(v, MX31_IO_ADDRESS(MX31_OTG_BASE_ADDR +
USBCTRL_OTGBASE_OFFSET)); USBCTRL_OTGBASE_OFFSET));
return 0; return 0;
} }
......
...@@ -21,19 +21,19 @@ ...@@ -21,19 +21,19 @@
/* /*
* KZM-ARM11-01 Board Control Registers on FPGA * KZM-ARM11-01 Board Control Registers on FPGA
*/ */
#define KZM_ARM11_CTL1 (CS4_BASE_ADDR + 0x1000) #define KZM_ARM11_CTL1 (MX31_CS4_BASE_ADDR + 0x1000)
#define KZM_ARM11_CTL2 (CS4_BASE_ADDR + 0x1001) #define KZM_ARM11_CTL2 (MX31_CS4_BASE_ADDR + 0x1001)
#define KZM_ARM11_RSW1 (CS4_BASE_ADDR + 0x1002) #define KZM_ARM11_RSW1 (MX31_CS4_BASE_ADDR + 0x1002)
#define KZM_ARM11_BACK_LIGHT (CS4_BASE_ADDR + 0x1004) #define KZM_ARM11_BACK_LIGHT (MX31_CS4_BASE_ADDR + 0x1004)
#define KZM_ARM11_FPGA_REV (CS4_BASE_ADDR + 0x1008) #define KZM_ARM11_FPGA_REV (MX31_CS4_BASE_ADDR + 0x1008)
#define KZM_ARM11_7SEG_LED (CS4_BASE_ADDR + 0x1010) #define KZM_ARM11_7SEG_LED (MX31_CS4_BASE_ADDR + 0x1010)
#define KZM_ARM11_LEDS (CS4_BASE_ADDR + 0x1020) #define KZM_ARM11_LEDS (MX31_CS4_BASE_ADDR + 0x1020)
#define KZM_ARM11_DIPSW2 (CS4_BASE_ADDR + 0x1003) #define KZM_ARM11_DIPSW2 (MX31_CS4_BASE_ADDR + 0x1003)
/* /*
* External UART for touch panel on FPGA * External UART for touch panel on FPGA
*/ */
#define KZM_ARM11_16550 (CS4_BASE_ADDR + 0x1050) #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050)
#endif /* __ARM_ARCH_BOARD_KZM_ARM11_H */ #endif /* __ARM_ARCH_BOARD_KZM_ARM11_H */
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
/* Base address of PBC controller */ /* Base address of PBC controller */
#define PBC_BASE_ADDRESS IO_ADDRESS(CS4_BASE_ADDR) #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT
/* Offsets for the PBC Controller register */ /* Offsets for the PBC Controller register */
/* PBC Board status register offset */ /* PBC Board status register offset */
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
#include <asm/sizes.h> #include <asm/sizes.h>
#define IMX_IO_ADDRESS(addr, module) \
((void __force __iomem *) \
(((unsigned long)((addr) - (module ## _BASE_ADDR)) < module ## _SIZE) ?\
(addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0))
#ifdef CONFIG_ARCH_MX3 #ifdef CONFIG_ARCH_MX3
#include <mach/mx3x.h> #include <mach/mx3x.h>
#include <mach/mx31.h> #include <mach/mx31.h>
......
This diff is collapsed.
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#ifndef __ASM_ARCH_MXC_MX1_H__ #ifndef __MACH_MX1_H__
#define __ASM_ARCH_MXC_MX1_H__ #define __MACH_MX1_H__
#include <mach/vmalloc.h> #include <mach/vmalloc.h>
...@@ -161,4 +161,4 @@ ...@@ -161,4 +161,4 @@
#define DMA_REQ_UART1_T 30 #define DMA_REQ_UART1_T 30
#define DMA_REQ_UART1_R 31 #define DMA_REQ_UART1_R 31
#endif /* __ASM_ARCH_MXC_MX1_H__ */ #endif /* ifndef __MACH_MX1_H__ */
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
* MA 02110-1301, USA. * MA 02110-1301, USA.
*/ */
#ifndef __ASM_ARCH_MXC_MX21_H__ #ifndef __MACH_MX21_H__
#define __ASM_ARCH_MXC_MX21_H__ #define __MACH_MX21_H__
#define MX21_AIPI_BASE_ADDR 0x10000000 #define MX21_AIPI_BASE_ADDR 0x10000000
#define MX21_AIPI_BASE_ADDR_VIRT 0xf4000000 #define MX21_AIPI_BASE_ADDR_VIRT 0xf4000000
...@@ -92,6 +92,11 @@ ...@@ -92,6 +92,11 @@
#define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */ #define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */
#define MX21_IO_ADDRESS(x) ( \
IMX_IO_ADDRESS(x, MX21_AIPI) ?: \
IMX_IO_ADDRESS(x, MX21_SAHB1) ?: \
IMX_IO_ADDRESS(x, MX21_X_MEMC))
/* fixed interrupt numbers */ /* fixed interrupt numbers */
#define MX21_INT_CSPI3 6 #define MX21_INT_CSPI3 6
#define MX21_INT_GPIO 8 #define MX21_INT_GPIO 8
...@@ -179,6 +184,7 @@ ...@@ -179,6 +184,7 @@
#define MX21_DMA_REQ_CSI_STAT 30 #define MX21_DMA_REQ_CSI_STAT 30
#define MX21_DMA_REQ_CSI_RX 31 #define MX21_DMA_REQ_CSI_RX 31
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
/* these should go away */ /* these should go away */
#define SDRAM_BASE_ADDR MX21_SDRAM_BASE_ADDR #define SDRAM_BASE_ADDR MX21_SDRAM_BASE_ADDR
#define CSD1_BASE_ADDR MX21_CSD1_BASE_ADDR #define CSD1_BASE_ADDR MX21_CSD1_BASE_ADDR
...@@ -211,5 +217,6 @@ ...@@ -211,5 +217,6 @@
#define DMA_REQ_FIRI_RX MX21_DMA_REQ_FIRI_RX #define DMA_REQ_FIRI_RX MX21_DMA_REQ_FIRI_RX
#define DMA_REQ_BMI_TX MX21_DMA_REQ_BMI_TX #define DMA_REQ_BMI_TX MX21_DMA_REQ_BMI_TX
#define DMA_REQ_BMI_RX MX21_DMA_REQ_BMI_RX #define DMA_REQ_BMI_RX MX21_DMA_REQ_BMI_RX
#endif
#endif /* __ASM_ARCH_MXC_MX21_H__ */ #endif /* ifndef __MACH_MX21_H__ */
...@@ -22,23 +22,16 @@ ...@@ -22,23 +22,16 @@
#define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000) #define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000)
#define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000) #define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000)
#define MX25_AIPS1_IO_ADDRESS(x) \ #define MX25_IO_ADDRESS(x) ( \
(((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT) IMX_IO_ADDRESS(x, MX25_AIPS1) ?: \
#define MX25_AIPS2_IO_ADDRESS(x) \ IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \
(((x) - MX25_AIPS2_BASE_ADDR) + MX25_AIPS2_BASE_ADDR_VIRT) IMX_IO_ADDRESS(x, MX25_AVIC))
#define MX25_AVIC_IO_ADDRESS(x) \
(((x) - MX25_AVIC_BASE_ADDR) + MX25_AVIC_BASE_ADDR_VIRT)
#define __in_range(addr, name) ((addr) >= name##_BASE_ADDR && (addr) < name##_BASE_ADDR + name##_SIZE)
#define MX25_IO_ADDRESS(x) \
(void __force __iomem *) \
(__in_range(x, MX25_AIPS1) ? MX25_AIPS1_IO_ADDRESS(x) : \
__in_range(x, MX25_AIPS2) ? MX25_AIPS2_IO_ADDRESS(x) : \
__in_range(x, MX25_AVIC) ? MX25_AVIC_IO_ADDRESS(x) : \
0xDEADBEEF)
#define UART1_BASE_ADDR 0x43f90000 #define UART1_BASE_ADDR 0x43f90000
#define UART2_BASE_ADDR 0x43f94000 #define UART2_BASE_ADDR 0x43f94000
#endif /* __MACH_MX25_H__ */ #define MX25_FEC_BASE_ADDR 0x50038000
#define MX25_INT_FEC 57
#endif /* ifndef __MACH_MX25_H__ */
...@@ -21,8 +21,12 @@ ...@@ -21,8 +21,12 @@
* MA 02110-1301, USA. * MA 02110-1301, USA.
*/ */
#ifndef __ASM_ARCH_MXC_MX27_H__ #ifndef __MACH_MX27_H__
#define __ASM_ARCH_MXC_MX27_H__ #define __MACH_MX27_H__
#ifndef __ASSEMBLER__
#include <linux/io.h>
#endif
#define MX27_AIPI_BASE_ADDR 0x10000000 #define MX27_AIPI_BASE_ADDR 0x10000000
#define MX27_AIPI_BASE_ADDR_VIRT 0xf4000000 #define MX27_AIPI_BASE_ADDR_VIRT 0xf4000000
...@@ -109,11 +113,31 @@ ...@@ -109,11 +113,31 @@
#define MX27_M3IF_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x3000) #define MX27_M3IF_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x3000)
#define MX27_PCMCIA_CTL_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x4000) #define MX27_PCMCIA_CTL_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x4000)
#define MX27_WEIM_CSCRx_BASE_ADDR(cs) (MX27_WEIM_BASE_ADDR + (cs) * 0x10)
#define MX27_WEIM_CSCRxU(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs))
#define MX27_WEIM_CSCRxL(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x4)
#define MX27_WEIM_CSCRxA(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x8)
#define MX27_PCMCIA_MEM_BASE_ADDR 0xdc000000 #define MX27_PCMCIA_MEM_BASE_ADDR 0xdc000000
/* IRAM */ /* IRAM */
#define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */ #define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */
#define MX27_IO_ADDRESS(x) ( \
IMX_IO_ADDRESS(x, MX27_AIPI) ?: \
IMX_IO_ADDRESS(x, MX27_SAHB1) ?: \
IMX_IO_ADDRESS(x, MX27_X_MEMC))
#ifndef __ASSEMBLER__
static inline void mx27_setup_weimcs(size_t cs,
unsigned upper, unsigned lower, unsigned addional)
{
__raw_writel(upper, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(cs)));
__raw_writel(lower, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(cs)));
__raw_writel(addional, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(cs)));
}
#endif
/* fixed interrupt numbers */ /* fixed interrupt numbers */
#define MX27_INT_I2C2 1 #define MX27_INT_I2C2 1
#define MX27_INT_GPT6 2 #define MX27_INT_GPT6 2
...@@ -225,6 +249,7 @@ ...@@ -225,6 +249,7 @@
extern int mx27_revision(void); extern int mx27_revision(void);
#endif #endif
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
/* these should go away */ /* these should go away */
#define MSHC_BASE_ADDR MX27_MSHC_BASE_ADDR #define MSHC_BASE_ADDR MX27_MSHC_BASE_ADDR
#define GPT5_BASE_ADDR MX27_GPT5_BASE_ADDR #define GPT5_BASE_ADDR MX27_GPT5_BASE_ADDR
...@@ -292,5 +317,6 @@ extern int mx27_revision(void); ...@@ -292,5 +317,6 @@ extern int mx27_revision(void);
#define DMA_REQ_UART6_RX MX27_DMA_REQ_UART6_RX #define DMA_REQ_UART6_RX MX27_DMA_REQ_UART6_RX
#define DMA_REQ_SDHC3 MX27_DMA_REQ_SDHC3 #define DMA_REQ_SDHC3 MX27_DMA_REQ_SDHC3
#define DMA_REQ_NFC MX27_DMA_REQ_NFC #define DMA_REQ_NFC MX27_DMA_REQ_NFC
#endif
#endif /* __ASM_ARCH_MXC_MX27_H__ */ #endif /* ifndef __MACH_MX27_H__ */
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
* MA 02110-1301, USA. * MA 02110-1301, USA.
*/ */
#ifndef __ASM_ARCH_MXC_MX2x_H__ #ifndef __MACH_MX2x_H__
#define __ASM_ARCH_MXC_MX2x_H__ #define __MACH_MX2x_H__
/* The following addresses are common between i.MX21 and i.MX27 */ /* The following addresses are common between i.MX21 and i.MX27 */
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
#define MX2x_DMA_REQ_CSI_STAT 30 #define MX2x_DMA_REQ_CSI_STAT 30
#define MX2x_DMA_REQ_CSI_RX 31 #define MX2x_DMA_REQ_CSI_RX 31
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
/* these should go away */ /* these should go away */
#define AIPI_BASE_ADDR MX2x_AIPI_BASE_ADDR #define AIPI_BASE_ADDR MX2x_AIPI_BASE_ADDR
#define AIPI_BASE_ADDR_VIRT MX2x_AIPI_BASE_ADDR_VIRT #define AIPI_BASE_ADDR_VIRT MX2x_AIPI_BASE_ADDR_VIRT
...@@ -287,5 +288,6 @@ ...@@ -287,5 +288,6 @@
#define DMA_REQ_UART1_TX MX2x_DMA_REQ_UART1_TX #define DMA_REQ_UART1_TX MX2x_DMA_REQ_UART1_TX
#define DMA_REQ_CSI_STAT MX2x_DMA_REQ_CSI_STAT #define DMA_REQ_CSI_STAT MX2x_DMA_REQ_CSI_STAT
#define DMA_REQ_CSI_RX MX2x_DMA_REQ_CSI_RX #define DMA_REQ_CSI_RX MX2x_DMA_REQ_CSI_RX
#endif
#endif /* __ASM_ARCH_MXC_MX2x_H__ */ #endif /* ifndef __MACH_MX2x_H__ */
#ifndef __MACH_MX31_H__
#define __MACH_MX31_H__
#ifndef __ASSEMBLER__
#include <linux/io.h>
#endif
/* /*
* IRAM * IRAM
*/ */
...@@ -107,8 +114,30 @@ ...@@ -107,8 +114,30 @@
#define MX31_EMI_CTL_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x4000) #define MX31_EMI_CTL_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x4000)
#define MX31_PCMCIA_CTL_BASE_ADDR MX31_EMI_CTL_BASE_ADDR #define MX31_PCMCIA_CTL_BASE_ADDR MX31_EMI_CTL_BASE_ADDR
#define MX31_WEIM_CSCRx_BASE_ADDR(cs) (MX31_WEIM_BASE_ADDR + (cs) * 0x10)
#define MX31_WEIM_CSCRxU(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs))
#define MX31_WEIM_CSCRxL(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x4)
#define MX31_WEIM_CSCRxA(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x8)
#define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000 #define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000
#define MX31_IO_ADDRESS(x) ( \
IMX_IO_ADDRESS(x, MX31_AIPS1) ?: \
IMX_IO_ADDRESS(x, MX31_AIPS2) ?: \
IMX_IO_ADDRESS(x, MX31_AVIC) ?: \
IMX_IO_ADDRESS(x, MX31_X_MEMC) ?: \
IMX_IO_ADDRESS(x, MX31_SPBA0))
#ifndef __ASSEMBLER__
static inline void mx31_setup_weimcs(size_t cs,
unsigned upper, unsigned lower, unsigned addional)
{
__raw_writel(upper, MX31_IO_ADDRESS(MX31_WEIM_CSCRxU(cs)));
__raw_writel(lower, MX31_IO_ADDRESS(MX31_WEIM_CSCRxL(cs)));
__raw_writel(addional, MX31_IO_ADDRESS(MX31_WEIM_CSCRxA(cs)));
}
#endif
#define MX31_INT_I2C3 3 #define MX31_INT_I2C3 3
#define MX31_INT_I2C2 4 #define MX31_INT_I2C2 4
#define MX31_INT_MPEG4_ENCODER 5 #define MX31_INT_MPEG4_ENCODER 5
...@@ -186,6 +215,7 @@ ...@@ -186,6 +215,7 @@
#define MX31_SYSTEM_REV_MIN MX31_CHIP_REV_1_0 #define MX31_SYSTEM_REV_MIN MX31_CHIP_REV_1_0
#define MX31_SYSTEM_REV_NUM 3 #define MX31_SYSTEM_REV_NUM 3
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
/* these should go away */ /* these should go away */
#define ATA_BASE_ADDR MX31_ATA_BASE_ADDR #define ATA_BASE_ADDR MX31_ATA_BASE_ADDR
#define UART4_BASE_ADDR MX31_UART4_BASE_ADDR #define UART4_BASE_ADDR MX31_UART4_BASE_ADDR
...@@ -216,3 +246,6 @@ ...@@ -216,3 +246,6 @@
#define MXC_INT_UART5 MX31_INT_UART5 #define MXC_INT_UART5 MX31_INT_UART5
#define MXC_INT_CCM MX31_INT_CCM #define MXC_INT_CCM MX31_INT_CCM
#define MXC_INT_PCMCIA MX31_INT_PCMCIA #define MXC_INT_PCMCIA MX31_INT_PCMCIA
#endif
#endif /* ifndef __MACH_MX31_H__ */
#ifndef __MACH_MX35_H__
#define __MACH_MX35_H__
/* /*
* IRAM * IRAM
*/ */
...@@ -104,6 +106,13 @@ ...@@ -104,6 +106,13 @@
#define MX35_NFC_BASE_ADDR 0xbb000000 #define MX35_NFC_BASE_ADDR 0xbb000000
#define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000 #define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000
#define MX35_IO_ADDRESS(x) ( \
IMX_IO_ADDRESS(x, MX35_AIPS1) ?: \
IMX_IO_ADDRESS(x, MX35_AIPS2) ?: \
IMX_IO_ADDRESS(x, MX35_AVIC) ?: \
IMX_IO_ADDRESS(x, MX35_X_MEMC) ?: \
IMX_IO_ADDRESS(x, MX35_SPBA0))
/* /*
* Interrupt numbers * Interrupt numbers
*/ */
...@@ -180,6 +189,7 @@ ...@@ -180,6 +189,7 @@
#define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0 #define MX35_SYSTEM_REV_MIN MX35_CHIP_REV_1_0
#define MX35_SYSTEM_REV_NUM 3 #define MX35_SYSTEM_REV_NUM 3
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
/* these should go away */ /* these should go away */
#define MXC_FEC_BASE_ADDR MX35_FEC_BASE_ADDR #define MXC_FEC_BASE_ADDR MX35_FEC_BASE_ADDR
#define MXC_INT_OWIRE MX35_INT_OWIRE #define MXC_INT_OWIRE MX35_INT_OWIRE
...@@ -195,3 +205,6 @@ ...@@ -195,3 +205,6 @@
#define MXC_INT_MLB MX35_INT_MLB #define MXC_INT_MLB MX35_INT_MLB
#define MXC_INT_SPDIF MX35_INT_SPDIF #define MXC_INT_SPDIF MX35_INT_SPDIF
#define MXC_INT_FEC MX35_INT_FEC #define MXC_INT_FEC MX35_INT_FEC
#endif
#endif /* ifndef __MACH_MX35_H__ */
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#ifndef __ASM_ARCH_MXC_MX31_H__ #ifndef __MACH_MX3x_H__
#define __ASM_ARCH_MXC_MX31_H__ #define __MACH_MX3x_H__
/* /*
* MX31 memory map: * MX31 memory map:
...@@ -269,6 +269,7 @@ static inline int mx31_revision(void) ...@@ -269,6 +269,7 @@ static inline int mx31_revision(void)
} }
#endif #endif
#ifdef IMX_NEEDS_DEPRECATED_SYMBOLS
/* these should go away */ /* these should go away */
#define L2CC_BASE_ADDR MX3x_L2CC_BASE_ADDR #define L2CC_BASE_ADDR MX3x_L2CC_BASE_ADDR
#define L2CC_SIZE MX3x_L2CC_SIZE #define L2CC_SIZE MX3x_L2CC_SIZE
...@@ -401,5 +402,6 @@ static inline int mx31_revision(void) ...@@ -401,5 +402,6 @@ static inline int mx31_revision(void)
#define CHIP_REV_3_2 MX3x_CHIP_REV_3_2 #define CHIP_REV_3_2 MX3x_CHIP_REV_3_2
#define SYSTEM_REV_MIN MX3x_SYSTEM_REV_MIN #define SYSTEM_REV_MIN MX3x_SYSTEM_REV_MIN
#define SYSTEM_REV_NUM MX3x_SYSTEM_REV_NUM #define SYSTEM_REV_NUM MX3x_SYSTEM_REV_NUM
#endif
#endif /* __ASM_ARCH_MXC_MX31_H__ */ #endif /* ifndef __MACH_MX3x_H__ */
...@@ -121,9 +121,10 @@ extern unsigned int __mxc_cpu_type; ...@@ -121,9 +121,10 @@ extern unsigned int __mxc_cpu_type;
#endif #endif
#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2) #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2)
#define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10) /* These are deprecated, use mx[23][157]_setup_weimcs instead. */
#define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x4) #define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10))
#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8) #define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10 + 0x4))
#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10 + 0x8))
#endif #endif
#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35() || cpu_is_mxc91231()) #define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35() || cpu_is_mxc91231())
......
/* /*
* arch/arm/plat-mxc/include/mach/uncompress.h * arch/arm/plat-mxc/include/mach/uncompress.h
* *
*
*
* Copyright (C) 1999 ARM Limited * Copyright (C) 1999 ARM Limited
* Copyright (C) Shane Nay (shane@minirl.com) * Copyright (C) Shane Nay (shane@minirl.com)
* *
...@@ -25,7 +23,6 @@ ...@@ -25,7 +23,6 @@
#define __MXC_BOOT_UNCOMPRESS #define __MXC_BOOT_UNCOMPRESS
#include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
static unsigned long uart_base; static unsigned long uart_base;
......
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