You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
This commit is contained in:
+2
-2
@@ -150,8 +150,8 @@ machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx
|
||||
machine-$(CONFIG_ARCH_MMP) := mmp
|
||||
machine-$(CONFIG_ARCH_MSM) := msm
|
||||
machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
|
||||
machine-$(CONFIG_ARCH_MX1) := mx1
|
||||
machine-$(CONFIG_ARCH_MX2) := mx2
|
||||
machine-$(CONFIG_ARCH_MX1) := imx
|
||||
machine-$(CONFIG_ARCH_MX2) := imx
|
||||
machine-$(CONFIG_ARCH_MX25) := mx25
|
||||
machine-$(CONFIG_ARCH_MX3) := mx3
|
||||
machine-$(CONFIG_ARCH_MX5) := mx5
|
||||
|
||||
@@ -1,42 +1,103 @@
|
||||
config IMX_HAVE_DMA_V1
|
||||
bool
|
||||
|
||||
if ARCH_MX1
|
||||
|
||||
config SOC_IMX1
|
||||
select CPU_ARM920T
|
||||
select IMX_HAVE_DMA_V1
|
||||
select IMX_HAVE_IOMUX_V1
|
||||
bool
|
||||
|
||||
comment "MX1 platforms:"
|
||||
config MACH_MXLADS
|
||||
bool
|
||||
|
||||
config ARCH_MX1ADS
|
||||
bool "MX1ADS platform"
|
||||
select MACH_MXLADS
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
help
|
||||
Say Y here if you are using Motorola MX1ADS/MXLADS boards
|
||||
|
||||
config MACH_SCB9328
|
||||
bool "Synertronixx scb9328"
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
help
|
||||
Say Y here if you are using a Synertronixx scb9328 board
|
||||
|
||||
endif
|
||||
|
||||
if ARCH_MX2
|
||||
|
||||
config SOC_IMX21
|
||||
select CPU_ARM926T
|
||||
select ARCH_MXC_AUDMUX_V1
|
||||
select IMX_HAVE_DMA_V1
|
||||
select IMX_HAVE_IOMUX_V1
|
||||
bool
|
||||
|
||||
config SOC_IMX27
|
||||
select CPU_ARM926T
|
||||
select ARCH_MXC_AUDMUX_V1
|
||||
select IMX_HAVE_DMA_V1
|
||||
select IMX_HAVE_IOMUX_V1
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "CPUs:"
|
||||
default MACH_MX21
|
||||
|
||||
config MACH_MX21
|
||||
bool "i.MX21 support"
|
||||
select ARCH_MXC_AUDMUX_V1
|
||||
select SOC_IMX21
|
||||
help
|
||||
This enables support for Freescale's MX2 based i.MX21 processor.
|
||||
|
||||
config MACH_MX27
|
||||
bool "i.MX27 support"
|
||||
select ARCH_MXC_AUDMUX_V1
|
||||
select SOC_IMX27
|
||||
help
|
||||
This enables support for Freescale's MX2 based i.MX27 processor.
|
||||
|
||||
endchoice
|
||||
|
||||
comment "MX2 platforms:"
|
||||
endif
|
||||
|
||||
if MACH_MX21
|
||||
|
||||
comment "MX21 platforms:"
|
||||
|
||||
config MACH_MX21ADS
|
||||
bool "MX21ADS platform"
|
||||
depends on MACH_MX21
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
help
|
||||
Include support for MX21ADS platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
endif
|
||||
|
||||
if MACH_MX27
|
||||
|
||||
comment "MX27 platforms:"
|
||||
|
||||
config MACH_MX27ADS
|
||||
bool "MX27ADS platform"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
help
|
||||
Include support for MX27ADS platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_PCM038
|
||||
bool "Phytec phyCORE-i.MX27 CPU module (pcm038)"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
select IMX_HAVE_PLATFORM_SPI_IMX
|
||||
select MXC_ULPI if USB_ULPI
|
||||
help
|
||||
Include support for phyCORE-i.MX27 (aka pcm038) platform. This
|
||||
@@ -58,7 +119,9 @@ endchoice
|
||||
|
||||
config MACH_CPUIMX27
|
||||
bool "Eukrea CPUIMX27 module"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
help
|
||||
Include support for Eukrea CPUIMX27 platform. This includes
|
||||
specific configurations for the module and its peripherals.
|
||||
@@ -67,9 +130,16 @@ config MACH_EUKREA_CPUIMX27_USESDHC2
|
||||
bool "CPUIMX27 integrates SDHC2 module"
|
||||
depends on MACH_CPUIMX27
|
||||
help
|
||||
This adds support for the internal SDHC2 used on CPUIMX27 used
|
||||
This adds support for the internal SDHC2 used on CPUIMX27
|
||||
for wifi or eMMC.
|
||||
|
||||
config MACH_EUKREA_CPUIMX27_USEUART4
|
||||
bool "CPUIMX27 integrates UART4 module"
|
||||
depends on MACH_CPUIMX27
|
||||
help
|
||||
This adds support for the internal UART4 used on CPUIMX27
|
||||
for bluetooth.
|
||||
|
||||
choice
|
||||
prompt "Baseboard"
|
||||
depends on MACH_CPUIMX27
|
||||
@@ -78,6 +148,8 @@ choice
|
||||
config MACH_EUKREA_MBIMX27_BASEBOARD
|
||||
prompt "Eukrea MBIMX27 development board"
|
||||
bool
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_SPI_IMX
|
||||
help
|
||||
This adds board specific devices that can be found on Eukrea's
|
||||
MBIMX27 evaluation board.
|
||||
@@ -86,21 +158,24 @@ endchoice
|
||||
|
||||
config MACH_MX27_3DS
|
||||
bool "MX27PDK platform"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
help
|
||||
Include support for MX27PDK platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_IMX27LITE
|
||||
bool "LogicPD MX27 LITEKIT platform"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
help
|
||||
Include support for MX27 LITEKIT platform. This includes specific
|
||||
configurations for the board and its peripherals.
|
||||
|
||||
config MACH_PCA100
|
||||
bool "Phytec phyCARD-s (pca100)"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
select IMX_HAVE_PLATFORM_SPI_IMX
|
||||
select MXC_ULPI if USB_ULPI
|
||||
help
|
||||
Include support for phyCARD-s (aka pca100) platform. This
|
||||
@@ -108,7 +183,9 @@ config MACH_PCA100
|
||||
|
||||
config MACH_MXT_TD60
|
||||
bool "Maxtrack i-MXT TD60"
|
||||
depends on MACH_MX27
|
||||
select IMX_HAVE_PLATFORM_IMX_I2C
|
||||
select IMX_HAVE_PLATFORM_IMX_UART
|
||||
select IMX_HAVE_PLATFORM_MXC_NAND
|
||||
help
|
||||
Include support for i-MXT (aka td60) platform. This
|
||||
includes specific configurations for the module and its peripherals.
|
||||
@@ -4,14 +4,24 @@
|
||||
|
||||
# Object file lists.
|
||||
|
||||
obj-y := devices.o serial.o
|
||||
obj-y := devices.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX21) += clock_imx21.o mm-imx21.o
|
||||
obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX27) += cpu_imx27.o
|
||||
obj-$(CONFIG_MACH_MX27) += clock_imx27.o mm-imx27.o
|
||||
obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o
|
||||
obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o
|
||||
obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o
|
||||
|
||||
# Support for CMOS sensor interface
|
||||
obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
|
||||
|
||||
obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
|
||||
obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o
|
||||
|
||||
obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
|
||||
obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o
|
||||
obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
|
||||
@@ -1,3 +1,7 @@
|
||||
zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000
|
||||
params_phys-$(CONFIG_ARCH_MX1) := 0x08000100
|
||||
initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000
|
||||
|
||||
zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000
|
||||
params_phys-$(CONFIG_MACH_MX21) := 0xC0000100
|
||||
initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000
|
||||
@@ -2,18 +2,17 @@
|
||||
* Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
|
||||
*
|
||||
* 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.
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* 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 St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
@@ -29,7 +28,41 @@
|
||||
#include <mach/clock.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include "crm_regs.h"
|
||||
|
||||
#define IO_ADDR_CCM(off) (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off)))
|
||||
|
||||
/* CCM register addresses */
|
||||
#define CCM_CSCR IO_ADDR_CCM(0x0)
|
||||
#define CCM_MPCTL0 IO_ADDR_CCM(0x4)
|
||||
#define CCM_SPCTL0 IO_ADDR_CCM(0xc)
|
||||
#define CCM_PCDR IO_ADDR_CCM(0x20)
|
||||
|
||||
#define CCM_CSCR_CLKO_OFFSET 29
|
||||
#define CCM_CSCR_CLKO_MASK (0x7 << 29)
|
||||
#define CCM_CSCR_USB_OFFSET 26
|
||||
#define CCM_CSCR_USB_MASK (0x7 << 26)
|
||||
#define CCM_CSCR_OSC_EN_SHIFT 17
|
||||
#define CCM_CSCR_SYSTEM_SEL (1 << 16)
|
||||
#define CCM_CSCR_BCLK_OFFSET 10
|
||||
#define CCM_CSCR_BCLK_MASK (0xf << 10)
|
||||
#define CCM_CSCR_PRESC (1 << 15)
|
||||
|
||||
#define CCM_PCDR_PCLK3_OFFSET 16
|
||||
#define CCM_PCDR_PCLK3_MASK (0x7f << 16)
|
||||
#define CCM_PCDR_PCLK2_OFFSET 4
|
||||
#define CCM_PCDR_PCLK2_MASK (0xf << 4)
|
||||
#define CCM_PCDR_PCLK1_OFFSET 0
|
||||
#define CCM_PCDR_PCLK1_MASK 0xf
|
||||
|
||||
#define IO_ADDR_SCM(off) (MX1_IO_ADDRESS(MX1_SCM_BASE_ADDR + (off)))
|
||||
|
||||
/* SCM register addresses */
|
||||
#define SCM_GCCR IO_ADDR_SCM(0xc)
|
||||
|
||||
#define SCM_GCCR_DMA_CLK_EN_OFFSET 3
|
||||
#define SCM_GCCR_CSI_CLK_EN_OFFSET 2
|
||||
#define SCM_GCCR_MMA_CLK_EN_OFFSET 1
|
||||
#define SCM_GCCR_USBD_CLK_EN_OFFSET 0
|
||||
|
||||
static int _clk_enable(struct clk *clk)
|
||||
{
|
||||
@@ -596,7 +629,8 @@ int __init mx1_clocks_init(unsigned long fref)
|
||||
clk_enable(&hclk);
|
||||
clk_enable(&fclk);
|
||||
|
||||
mxc_timer_init(&gpt_clk, IO_ADDRESS(TIM1_BASE_ADDR), TIM1_INT);
|
||||
mxc_timer_init(&gpt_clk, MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR),
|
||||
MX1_TIM1_INT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -644,7 +644,7 @@ static struct clk_lookup lookups[] = {
|
||||
_REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk)
|
||||
_REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk)
|
||||
_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
|
||||
_REGISTER_CLOCK(NULL, "csi", csi_clk)
|
||||
_REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk)
|
||||
_REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk)
|
||||
_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk1)
|
||||
_REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk)
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Pengutronix
|
||||
* Uwe Kleine-Koenig <u.kleine-koenig@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 <mach/mx1.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
#define imx1_add_i2c_imx(pdata) \
|
||||
imx_add_imx_i2c(0, MX1_I2C_BASE_ADDR, SZ_4K, MX1_INT_I2C, pdata)
|
||||
|
||||
#define imx1_add_imx_uart0(pdata) \
|
||||
imx_add_imx_uart_3irq(0, MX1_UART1_BASE_ADDR, 0xd0, MX1_INT_UART1RX, MX1_INT_UART1TX, MX1_INT_UART1RTS, pdata)
|
||||
#define imx1_add_imx_uart1(pdata) \
|
||||
imx_add_imx_uart_3irq(0, MX1_UART2_BASE_ADDR, 0xd0, MX1_INT_UART2RX, MX1_INT_UART2TX, MX1_INT_UART2RTS, pdata)
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Pengutronix
|
||||
* Uwe Kleine-Koenig <u.kleine-koenig@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 <mach/mx21.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
#define imx21_add_i2c_imx(pdata) \
|
||||
imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata)
|
||||
|
||||
#define imx21_add_imx_uart0(pdata) \
|
||||
imx_add_imx_uart_1irq(0, MX21_UART1_BASE_ADDR, SZ_4K, MX21_INT_UART1, pdata)
|
||||
#define imx21_add_imx_uart1(pdata) \
|
||||
imx_add_imx_uart_1irq(1, MX21_UART2_BASE_ADDR, SZ_4K, MX21_INT_UART2, pdata)
|
||||
#define imx21_add_imx_uart2(pdata) \
|
||||
imx_add_imx_uart_1irq(2, MX21_UART3_BASE_ADDR, SZ_4K, MX21_INT_UART3, pdata)
|
||||
#define imx21_add_imx_uart3(pdata) \
|
||||
imx_add_imx_uart_1irq(3, MX21_UART4_BASE_ADDR, SZ_4K, MX21_INT_UART4, pdata)
|
||||
|
||||
#define imx21_add_mxc_nand(pdata) \
|
||||
imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata)
|
||||
|
||||
#define imx21_add_spi_imx0(pdata) \
|
||||
imx_add_spi_imx(0, MX21_CSPI1_BASE_ADDR, SZ_4K, MX21_INT_CSPI1, pdata)
|
||||
#define imx21_add_spi_imx1(pdata) \
|
||||
imx_add_spi_imx(1, MX21_CSPI2_BASE_ADDR, SZ_4K, MX21_INT_CSPI2, pdata)
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Pengutronix
|
||||
* Uwe Kleine-Koenig <u.kleine-koenig@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 <mach/mx27.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
||||
#define imx27_add_i2c_imx0(pdata) \
|
||||
imx_add_imx_i2c(0, MX27_I2C1_BASE_ADDR, SZ_4K, MX27_INT_I2C1, pdata)
|
||||
#define imx27_add_i2c_imx1(pdata) \
|
||||
imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata)
|
||||
|
||||
#define imx27_add_imx_uart0(pdata) \
|
||||
imx_add_imx_uart_1irq(0, MX27_UART1_BASE_ADDR, SZ_4K, MX27_INT_UART1, pdata)
|
||||
#define imx27_add_imx_uart1(pdata) \
|
||||
imx_add_imx_uart_1irq(1, MX27_UART2_BASE_ADDR, SZ_4K, MX27_INT_UART2, pdata)
|
||||
#define imx27_add_imx_uart2(pdata) \
|
||||
imx_add_imx_uart_1irq(2, MX27_UART3_BASE_ADDR, SZ_4K, MX27_INT_UART3, pdata)
|
||||
#define imx27_add_imx_uart3(pdata) \
|
||||
imx_add_imx_uart_1irq(3, MX27_UART4_BASE_ADDR, SZ_4K, MX27_INT_UART4, pdata)
|
||||
#define imx27_add_imx_uart4(pdata) \
|
||||
imx_add_imx_uart_1irq(4, MX27_UART5_BASE_ADDR, SZ_4K, MX27_INT_UART5, pdata)
|
||||
#define imx27_add_imx_uart5(pdata) \
|
||||
imx_add_imx_uart_1irq(5, MX27_UART6_BASE_ADDR, SZ_4K, MX27_INT_UART6, pdata)
|
||||
|
||||
#define imx27_add_mxc_nand(pdata) \
|
||||
imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata)
|
||||
|
||||
#define imx27_add_spi_imx0(pdata) \
|
||||
imx_add_spi_imx(0, MX27_CSPI1_BASE_ADDR, SZ_4K, MX27_INT_CSPI1, pdata)
|
||||
#define imx27_add_spi_imx1(pdata) \
|
||||
imx_add_spi_imx(1, MX27_CSPI2_BASE_ADDR, SZ_4K, MX27_INT_CSPI2, pdata)
|
||||
#define imx27_add_spi_imx2(pdata) \
|
||||
imx_add_spi_imx(2, MX27_CSPI3_BASE_ADDR, SZ_4K, MX27_INT_CSPI3, pdata)
|
||||
@@ -11,6 +11,9 @@
|
||||
*
|
||||
* Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
* Copyright 2008 Juergen Beisert, kernel@pengutronix.de
|
||||
* Copyright 2008 Sascha Hauer, kernel@pengutronix.de
|
||||
* Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
|
||||
* Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -32,6 +35,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/serial.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/hardware.h>
|
||||
@@ -40,38 +44,179 @@
|
||||
|
||||
#include "devices.h"
|
||||
|
||||
/*
|
||||
* SPI master controller
|
||||
*
|
||||
* - i.MX1: 2 channel (slighly different register setting)
|
||||
* - i.MX21: 2 channel
|
||||
* - i.MX27: 3 channel
|
||||
*/
|
||||
#define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \
|
||||
static struct resource mxc_spi_resources ## n[] = { \
|
||||
{ \
|
||||
.start = baseaddr, \
|
||||
.end = baseaddr + SZ_4K - 1, \
|
||||
.flags = IORESOURCE_MEM, \
|
||||
}, { \
|
||||
.start = irq, \
|
||||
.end = irq, \
|
||||
.flags = IORESOURCE_IRQ, \
|
||||
}, \
|
||||
}; \
|
||||
\
|
||||
struct platform_device mxc_spi_device ## n = { \
|
||||
.name = "spi_imx", \
|
||||
.id = n, \
|
||||
.num_resources = ARRAY_SIZE(mxc_spi_resources ## n), \
|
||||
.resource = mxc_spi_resources ## n, \
|
||||
}
|
||||
#if defined(CONFIG_ARCH_MX1)
|
||||
static struct resource imx1_camera_resources[] = {
|
||||
{
|
||||
.start = 0x00224000,
|
||||
.end = 0x00224010,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = MX1_CSI_INT,
|
||||
.end = MX1_CSI_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
DEFINE_IMX_SPI_DEVICE(0, MX2x_CSPI1_BASE_ADDR, MX2x_INT_CSPI1);
|
||||
DEFINE_IMX_SPI_DEVICE(1, MX2x_CSPI2_BASE_ADDR, MX2x_INT_CSPI2);
|
||||
static u64 imx1_camera_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device imx1_camera_device = {
|
||||
.name = "mx1-camera",
|
||||
.id = 0, /* This is used to put cameras on this interface */
|
||||
.dev = {
|
||||
.dma_mask = &imx1_camera_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
.resource = imx1_camera_resources,
|
||||
.num_resources = ARRAY_SIZE(imx1_camera_resources),
|
||||
};
|
||||
|
||||
static struct resource imx_rtc_resources[] = {
|
||||
{
|
||||
.start = 0x00204000,
|
||||
.end = 0x00204024,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = MX1_RTC_INT,
|
||||
.end = MX1_RTC_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_RTC_SAMINT,
|
||||
.end = MX1_RTC_SAMINT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device imx_rtc_device = {
|
||||
.name = "rtc-imx",
|
||||
.id = 0,
|
||||
.resource = imx_rtc_resources,
|
||||
.num_resources = ARRAY_SIZE(imx_rtc_resources),
|
||||
};
|
||||
|
||||
static struct resource imx_wdt_resources[] = {
|
||||
{
|
||||
.start = 0x00201000,
|
||||
.end = 0x00201008,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = MX1_WDT_INT,
|
||||
.end = MX1_WDT_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device imx_wdt_device = {
|
||||
.name = "imx-wdt",
|
||||
.id = 0,
|
||||
.resource = imx_wdt_resources,
|
||||
.num_resources = ARRAY_SIZE(imx_wdt_resources),
|
||||
};
|
||||
|
||||
static struct resource imx_usb_resources[] = {
|
||||
{
|
||||
.start = 0x00212000,
|
||||
.end = 0x00212148,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = MX1_USBD_INT0,
|
||||
.end = MX1_USBD_INT0,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_USBD_INT1,
|
||||
.end = MX1_USBD_INT1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_USBD_INT2,
|
||||
.end = MX1_USBD_INT2,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_USBD_INT3,
|
||||
.end = MX1_USBD_INT3,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_USBD_INT4,
|
||||
.end = MX1_USBD_INT4,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_USBD_INT5,
|
||||
.end = MX1_USBD_INT5,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = MX1_USBD_INT6,
|
||||
.end = MX1_USBD_INT6,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device imx_usb_device = {
|
||||
.name = "imx_udc",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(imx_usb_resources),
|
||||
.resource = imx_usb_resources,
|
||||
};
|
||||
|
||||
/* GPIO port description */
|
||||
static struct mxc_gpio_port imx_gpio_ports[] = {
|
||||
{
|
||||
.chip.label = "gpio-0",
|
||||
.base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR),
|
||||
.irq = MX1_GPIO_INT_PORTA,
|
||||
.virtual_irq_start = MXC_GPIO_IRQ_START,
|
||||
}, {
|
||||
.chip.label = "gpio-1",
|
||||
.base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100),
|
||||
.irq = MX1_GPIO_INT_PORTB,
|
||||
.virtual_irq_start = MXC_GPIO_IRQ_START + 32,
|
||||
}, {
|
||||
.chip.label = "gpio-2",
|
||||
.base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200),
|
||||
.irq = MX1_GPIO_INT_PORTC,
|
||||
.virtual_irq_start = MXC_GPIO_IRQ_START + 64,
|
||||
}, {
|
||||
.chip.label = "gpio-3",
|
||||
.base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300),
|
||||
.irq = MX1_GPIO_INT_PORTD,
|
||||
.virtual_irq_start = MXC_GPIO_IRQ_START + 96,
|
||||
}
|
||||
};
|
||||
|
||||
int __init imx1_register_gpios(void)
|
||||
{
|
||||
return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
|
||||
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
DEFINE_IMX_SPI_DEVICE(2, MX27_CSPI3_BASE_ADDR, MX27_INT_CSPI3);
|
||||
static struct resource mx27_camera_resources[] = {
|
||||
{
|
||||
.start = MX27_CSI_BASE_ADDR,
|
||||
.end = MX27_CSI_BASE_ADDR + 0x1f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = MX27_EMMA_PRP_BASE_ADDR,
|
||||
.end = MX27_EMMA_PRP_BASE_ADDR + 0x1f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = MX27_INT_CSI,
|
||||
.end = MX27_INT_CSI,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},{
|
||||
.start = MX27_INT_EMMAPRP,
|
||||
.end = MX27_INT_EMMAPRP,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
struct platform_device mx27_camera_device = {
|
||||
.name = "mx2-camera",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(mx27_camera_resources),
|
||||
.resource = mx27_camera_resources,
|
||||
.dev = {
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -140,34 +285,6 @@ struct platform_device mxc_w1_master_device = {
|
||||
.resource = mxc_w1_master_resources,
|
||||
};
|
||||
|
||||
#define DEFINE_MXC_NAND_DEVICE(pfx, baseaddr, irq) \
|
||||
static struct resource pfx ## _nand_resources[] = { \
|
||||
{ \
|
||||
.start = baseaddr, \
|
||||
.end = baseaddr + SZ_4K - 1, \
|
||||
.flags = IORESOURCE_MEM, \
|
||||
}, { \
|
||||
.start = irq, \
|
||||
.end = irq, \
|
||||
.flags = IORESOURCE_IRQ, \
|
||||
}, \
|
||||
}; \
|
||||
\
|
||||
struct platform_device pfx ## _nand_device = { \
|
||||
.name = "mxc_nand", \
|
||||
.id = 0, \
|
||||
.num_resources = ARRAY_SIZE(pfx ## _nand_resources), \
|
||||
.resource = pfx ## _nand_resources, \
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MACH_MX21
|
||||
DEFINE_MXC_NAND_DEVICE(imx21, MX21_NFC_BASE_ADDR, MX21_INT_NANDFC);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* lcdc:
|
||||
* - i.MX1: the basic controller
|
||||
@@ -218,32 +335,6 @@ struct platform_device mxc_fec_device = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \
|
||||
static struct resource mxc_i2c_resources ## n[] = { \
|
||||
{ \
|
||||
.start = baseaddr, \
|
||||
.end = baseaddr + SZ_4K - 1, \
|
||||
.flags = IORESOURCE_MEM, \
|
||||
}, { \
|
||||
.start = irq, \
|
||||
.end = irq, \
|
||||
.flags = IORESOURCE_IRQ, \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
struct platform_device mxc_i2c_device ## n = { \
|
||||
.name = "imx-i2c", \
|
||||
.id = n, \
|
||||
.num_resources = ARRAY_SIZE(mxc_i2c_resources ## n), \
|
||||
.resource = mxc_i2c_resources ## n, \
|
||||
}
|
||||
|
||||
DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C);
|
||||
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2);
|
||||
#endif
|
||||
|
||||
static struct resource mxc_pwm_resources[] = {
|
||||
{
|
||||
.start = MX2x_PWM_BASE_ADDR,
|
||||
@@ -454,26 +545,21 @@ DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1);
|
||||
|
||||
#ifdef CONFIG_MACH_MX21
|
||||
DEFINE_MXC_GPIO_PORTS(MX21, imx21);
|
||||
|
||||
int __init imx21_register_gpios(void)
|
||||
{
|
||||
return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
DEFINE_MXC_GPIO_PORTS(MX27, imx27);
|
||||
#endif
|
||||
|
||||
int __init mxc_register_gpios(void)
|
||||
int __init imx27_register_gpios(void)
|
||||
{
|
||||
#ifdef CONFIG_MACH_MX21
|
||||
if (cpu_is_mx21())
|
||||
return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports));
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
if (cpu_is_mx27())
|
||||
return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports));
|
||||
else
|
||||
#endif
|
||||
return 0;
|
||||
return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_MX21
|
||||
static struct resource mx21_usbhc_resources[] = {
|
||||
@@ -501,3 +587,23 @@ struct platform_device mx21_usbhc_device = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct resource imx_kpp_resources[] = {
|
||||
{
|
||||
.start = MX2x_KPP_BASE_ADDR,
|
||||
.end = MX2x_KPP_BASE_ADDR + 0xf,
|
||||
.flags = IORESOURCE_MEM
|
||||
}, {
|
||||
.start = MX2x_INT_KPP,
|
||||
.end = MX2x_INT_KPP,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device imx_kpp_device = {
|
||||
.name = "imx-keypad",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(imx_kpp_resources),
|
||||
.resource = imx_kpp_resources,
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,11 @@
|
||||
#ifdef CONFIG_ARCH_MX1
|
||||
extern struct platform_device imx1_camera_device;
|
||||
extern struct platform_device imx_rtc_device;
|
||||
extern struct platform_device imx_wdt_device;
|
||||
extern struct platform_device imx_usb_device;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
|
||||
extern struct platform_device mxc_gpt1;
|
||||
extern struct platform_device mxc_gpt2;
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
@@ -6,37 +14,19 @@ extern struct platform_device mxc_gpt4;
|
||||
extern struct platform_device mxc_gpt5;
|
||||
#endif
|
||||
extern struct platform_device mxc_wdt;
|
||||
extern struct platform_device mxc_uart_device0;
|
||||
extern struct platform_device mxc_uart_device1;
|
||||
extern struct platform_device mxc_uart_device2;
|
||||
extern struct platform_device mxc_uart_device3;
|
||||
extern struct platform_device mxc_uart_device4;
|
||||
extern struct platform_device mxc_uart_device5;
|
||||
extern struct platform_device mxc_w1_master_device;
|
||||
#ifdef CONFIG_MACH_MX21
|
||||
extern struct platform_device imx21_nand_device;
|
||||
#endif
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
extern struct platform_device imx27_nand_device;
|
||||
#endif
|
||||
extern struct platform_device mxc_fb_device;
|
||||
extern struct platform_device mxc_fec_device;
|
||||
extern struct platform_device mxc_pwm_device;
|
||||
extern struct platform_device mxc_i2c_device0;
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
extern struct platform_device mxc_i2c_device1;
|
||||
#endif
|
||||
extern struct platform_device mxc_sdhc_device0;
|
||||
extern struct platform_device mxc_sdhc_device1;
|
||||
extern struct platform_device mxc_otg_udc_device;
|
||||
extern struct platform_device mx27_camera_device;
|
||||
extern struct platform_device mxc_otg_host;
|
||||
extern struct platform_device mxc_usbh1;
|
||||
extern struct platform_device mxc_usbh2;
|
||||
extern struct platform_device mxc_spi_device0;
|
||||
extern struct platform_device mxc_spi_device1;
|
||||
#ifdef CONFIG_MACH_MX27
|
||||
extern struct platform_device mxc_spi_device2;
|
||||
#endif
|
||||
extern struct platform_device mx21_usbhc_device;
|
||||
extern struct platform_device imx_ssi_device0;
|
||||
extern struct platform_device imx_ssi_device1;
|
||||
extern struct platform_device imx_kpp_device;
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* linux/arch/arm/plat-mxc/dma-mx1-mx2.c
|
||||
* linux/arch/arm/plat-mxc/dma-v1.c
|
||||
*
|
||||
* i.MX DMA registration and IRQ dispatching
|
||||
*
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <asm/system.h>
|
||||
#include <asm/irq.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/dma-mx1-mx2.h>
|
||||
#include <mach/dma-v1.h>
|
||||
|
||||
#define DMA_DCR 0x00 /* Control Register */
|
||||
#define DMA_DISR 0x04 /* Interrupt status Register */
|
||||
+170
-27
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Eric Benard - eric@eukrea.com
|
||||
* Copyright (C) 2009-2010 Eric Benard - eric@eukrea.com
|
||||
*
|
||||
* Based on pcm970-baseboard.c which is :
|
||||
* Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
|
||||
@@ -24,6 +24,9 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
#include <linux/backlight.h>
|
||||
#include <video/platform_lcd.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
@@ -32,8 +35,11 @@
|
||||
#include <mach/imxfb.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/imx-uart.h>
|
||||
#include <mach/spi.h>
|
||||
#include <mach/ssi.h>
|
||||
#include <mach/audmux.h>
|
||||
|
||||
#include "devices-imx27.h"
|
||||
#include "devices.h"
|
||||
|
||||
static int eukrea_mbimx27_pins[] = {
|
||||
@@ -48,10 +54,12 @@ static int eukrea_mbimx27_pins[] = {
|
||||
PE10_PF_UART3_CTS,
|
||||
PE11_PF_UART3_RTS,
|
||||
/* UART4 */
|
||||
#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
|
||||
PB26_AF_UART4_RTS,
|
||||
PB28_AF_UART4_TXD,
|
||||
PB29_AF_UART4_CTS,
|
||||
PB31_AF_UART4_RXD,
|
||||
#endif
|
||||
/* SDHC1*/
|
||||
PE18_PF_SD1_D0,
|
||||
PE19_PF_SD1_D1,
|
||||
@@ -84,10 +92,29 @@ static int eukrea_mbimx27_pins[] = {
|
||||
PA30_PF_CONTRAST,
|
||||
PA31_PF_OE_ACD,
|
||||
/* SPI1 */
|
||||
PD28_PF_CSPI1_SS0,
|
||||
PD29_PF_CSPI1_SCLK,
|
||||
PD30_PF_CSPI1_MISO,
|
||||
PD31_PF_CSPI1_MOSI,
|
||||
/* SSI4 */
|
||||
#if defined(CONFIG_SND_SOC_EUKREA_TLV320) \
|
||||
|| defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE)
|
||||
PC16_PF_SSI4_FS,
|
||||
PC17_PF_SSI4_RXD | GPIO_PUEN,
|
||||
PC18_PF_SSI4_TXD | GPIO_PUEN,
|
||||
PC19_PF_SSI4_CLK,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const uint32_t eukrea_mbimx27_keymap[] = {
|
||||
KEY(0, 0, KEY_UP),
|
||||
KEY(0, 1, KEY_DOWN),
|
||||
KEY(1, 0, KEY_RIGHT),
|
||||
KEY(1, 1, KEY_LEFT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data eukrea_mbimx27_keymap_data = {
|
||||
.keymap = eukrea_mbimx27_keymap,
|
||||
.keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap),
|
||||
};
|
||||
|
||||
static struct gpio_led gpio_leds[] = {
|
||||
@@ -103,12 +130,6 @@ static struct gpio_led gpio_leds[] = {
|
||||
.active_low = 1,
|
||||
.gpio = GPIO_PORTF | 19,
|
||||
},
|
||||
{
|
||||
.name = "backlight",
|
||||
.default_trigger = "backlight",
|
||||
.active_low = 0,
|
||||
.gpio = GPIO_PORTE | 5,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data gpio_led_info = {
|
||||
@@ -127,7 +148,7 @@ static struct platform_device leds_gpio = {
|
||||
static struct imx_fb_videomode eukrea_mbimx27_modes[] = {
|
||||
{
|
||||
.mode = {
|
||||
.name = "CMO-QGVA",
|
||||
.name = "CMO-QVGA",
|
||||
.refresh = 60,
|
||||
.xres = 320,
|
||||
.yres = 240,
|
||||
@@ -141,6 +162,38 @@ static struct imx_fb_videomode eukrea_mbimx27_modes[] = {
|
||||
},
|
||||
.pcr = 0xFAD08B80,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.mode = {
|
||||
.name = "DVI-VGA",
|
||||
.refresh = 60,
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.pixclock = 32000,
|
||||
.hsync_len = 1,
|
||||
.left_margin = 35,
|
||||
.right_margin = 0,
|
||||
.vsync_len = 1,
|
||||
.upper_margin = 7,
|
||||
.lower_margin = 0,
|
||||
},
|
||||
.pcr = 0xFA208B80,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.mode = {
|
||||
.name = "DVI-SVGA",
|
||||
.refresh = 60,
|
||||
.xres = 800,
|
||||
.yres = 600,
|
||||
.pixclock = 25000,
|
||||
.hsync_len = 1,
|
||||
.left_margin = 35,
|
||||
.right_margin = 0,
|
||||
.vsync_len = 1,
|
||||
.upper_margin = 7,
|
||||
.lower_margin = 0,
|
||||
},
|
||||
.pcr = 0xFA208B80,
|
||||
.bpp = 16,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -153,16 +206,52 @@ static struct imx_fb_platform_data eukrea_mbimx27_fb_data = {
|
||||
.dmacr = 0x00040060,
|
||||
};
|
||||
|
||||
static struct imxuart_platform_data uart_pdata[] = {
|
||||
{
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
},
|
||||
{
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
static void eukrea_mbimx27_bl_set_intensity(int intensity)
|
||||
{
|
||||
if (intensity)
|
||||
gpio_direction_output(GPIO_PORTE | 5, 1);
|
||||
else
|
||||
gpio_direction_output(GPIO_PORTE | 5, 0);
|
||||
}
|
||||
|
||||
static struct generic_bl_info eukrea_mbimx27_bl_info = {
|
||||
.name = "eukrea_mbimx27-bl",
|
||||
.max_intensity = 0xff,
|
||||
.default_intensity = 0xff,
|
||||
.set_bl_intensity = eukrea_mbimx27_bl_set_intensity,
|
||||
};
|
||||
|
||||
static struct platform_device eukrea_mbimx27_bl_dev = {
|
||||
.name = "generic-bl",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &eukrea_mbimx27_bl_info,
|
||||
},
|
||||
};
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846)
|
||||
static void eukrea_mbimx27_lcd_power_set(struct plat_lcd_data *pd,
|
||||
unsigned int power)
|
||||
{
|
||||
if (power)
|
||||
gpio_direction_output(GPIO_PORTA | 25, 1);
|
||||
else
|
||||
gpio_direction_output(GPIO_PORTA | 25, 0);
|
||||
}
|
||||
|
||||
static struct plat_lcd_data eukrea_mbimx27_lcd_power_data = {
|
||||
.set_power = eukrea_mbimx27_lcd_power_set,
|
||||
};
|
||||
|
||||
static struct platform_device eukrea_mbimx27_lcd_powerdev = {
|
||||
.name = "platform-lcd",
|
||||
.dev.platform_data = &eukrea_mbimx27_lcd_power_data,
|
||||
};
|
||||
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
|
||||
|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
|
||||
#define ADS7846_PENDOWN (GPIO_PORTD | 25)
|
||||
@@ -173,7 +262,6 @@ static void ads7846_dev_init(void)
|
||||
printk(KERN_ERR "can't get ads746 pen down GPIO\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_direction_input(ADS7846_PENDOWN);
|
||||
}
|
||||
|
||||
@@ -186,7 +274,9 @@ static struct ads7846_platform_data ads7846_config __initdata = {
|
||||
.get_pendown_state = ads7846_get_pendown_state,
|
||||
.keep_vref_on = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
|
||||
[0] = {
|
||||
.modalias = "ads7846",
|
||||
@@ -201,16 +291,30 @@ static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
|
||||
|
||||
static int eukrea_mbimx27_spi_cs[] = {GPIO_PORTD | 28};
|
||||
|
||||
static struct spi_imx_master eukrea_mbimx27_spi_0_data = {
|
||||
static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = {
|
||||
.chipselect = eukrea_mbimx27_spi_cs,
|
||||
.num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs),
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("tlv320aic23", 0x1a),
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *platform_devices[] __initdata = {
|
||||
&leds_gpio,
|
||||
};
|
||||
|
||||
static struct imxmmc_platform_data sdhc_pdata = {
|
||||
.dat3_card_detect = 1,
|
||||
};
|
||||
|
||||
struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata = {
|
||||
.flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE,
|
||||
};
|
||||
|
||||
/*
|
||||
* system init for baseboard usage. Will be called by cpuimx27 init.
|
||||
*
|
||||
@@ -222,21 +326,52 @@ void __init eukrea_mbimx27_baseboard_init(void)
|
||||
mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins,
|
||||
ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27");
|
||||
|
||||
mxc_register_device(&mxc_uart_device1, &uart_pdata[0]);
|
||||
mxc_register_device(&mxc_uart_device2, &uart_pdata[1]);
|
||||
#if defined(CONFIG_SND_SOC_EUKREA_TLV320) \
|
||||
|| defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE)
|
||||
/* SSI unit master I2S codec connected to SSI_PINS_4*/
|
||||
mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
|
||||
MXC_AUDMUX_V1_PCR_SYN |
|
||||
MXC_AUDMUX_V1_PCR_TFSDIR |
|
||||
MXC_AUDMUX_V1_PCR_TCLKDIR |
|
||||
MXC_AUDMUX_V1_PCR_RFSDIR |
|
||||
MXC_AUDMUX_V1_PCR_RCLKDIR |
|
||||
MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) |
|
||||
MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) |
|
||||
MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4)
|
||||
);
|
||||
mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4,
|
||||
MXC_AUDMUX_V1_PCR_SYN |
|
||||
MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0)
|
||||
);
|
||||
#endif
|
||||
|
||||
imx27_add_imx_uart1(&uart_pdata);
|
||||
imx27_add_imx_uart2(&uart_pdata);
|
||||
#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
|
||||
imx27_add_imx_uart3(&uart_pdata);
|
||||
#endif
|
||||
|
||||
mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data);
|
||||
mxc_register_device(&mxc_sdhc_device0, NULL);
|
||||
mxc_register_device(&mxc_sdhc_device0, &sdhc_pdata);
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846)
|
||||
i2c_register_board_info(0, eukrea_mbimx27_i2c_devices,
|
||||
ARRAY_SIZE(eukrea_mbimx27_i2c_devices));
|
||||
|
||||
mxc_register_device(&imx_ssi_device0, &eukrea_mbimx27_ssi_pdata);
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
|
||||
|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
/* SPI and ADS7846 Touchscreen controler init */
|
||||
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
|
||||
/* ADS7846 Touchscreen controller init */
|
||||
mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN);
|
||||
mxc_register_device(&mxc_spi_device0, &eukrea_mbimx27_spi_0_data);
|
||||
ads7846_dev_init();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
|
||||
/* SPI_CS0 init */
|
||||
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
|
||||
imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
|
||||
spi_register_board_info(eukrea_mbimx27_spi_board_info,
|
||||
ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
|
||||
ads7846_dev_init();
|
||||
#endif
|
||||
|
||||
/* Leds configuration */
|
||||
@@ -244,6 +379,14 @@ void __init eukrea_mbimx27_baseboard_init(void)
|
||||
mxc_gpio_mode(GPIO_PORTF | 19 | GPIO_GPIO | GPIO_OUT);
|
||||
/* Backlight */
|
||||
mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT);
|
||||
gpio_request(GPIO_PORTE | 5, "backlight");
|
||||
platform_device_register(&eukrea_mbimx27_bl_dev);
|
||||
/* LCD Reset */
|
||||
mxc_gpio_mode(GPIO_PORTA | 25 | GPIO_GPIO | GPIO_OUT);
|
||||
gpio_request(GPIO_PORTA | 25, "lcd_enable");
|
||||
platform_device_register(&eukrea_mbimx27_lcd_powerdev);
|
||||
|
||||
mxc_register_device(&imx_kpp_device, &eukrea_mbimx27_keymap_data);
|
||||
|
||||
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef __MACH_DMA_MX1_MX2_H__
|
||||
#define __MACH_DMA_MX1_MX2_H__
|
||||
/*
|
||||
* Don't use this header in new code, it will go away when all users are
|
||||
* converted to mach/dma-v1.h
|
||||
*/
|
||||
|
||||
#include <mach/dma-v1.h>
|
||||
|
||||
#endif /* ifndef __MACH_DMA_MX1_MX2_H__ */
|
||||
+6
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* linux/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
|
||||
* linux/arch/arm/mach-imx/include/mach/dma-v1.h
|
||||
*
|
||||
* i.MX DMA registration and IRQ dispatching
|
||||
*
|
||||
@@ -22,8 +22,10 @@
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_MXC_DMA_H
|
||||
#define __ASM_ARCH_MXC_DMA_H
|
||||
#ifndef __MACH_DMA_V1_H__
|
||||
#define __MACH_DMA_V1_H__
|
||||
|
||||
#define imx_has_dma_v1() (cpu_is_mx1() || cpu_is_mx21() || cpu_is_mx27())
|
||||
|
||||
#define IMX_DMA_CHANNELS 16
|
||||
|
||||
@@ -102,4 +104,4 @@ enum imx_dma_prio {
|
||||
|
||||
int imx_dma_request_by_prio(const char *name, enum imx_dma_prio prio);
|
||||
|
||||
#endif /* _ASM_ARCH_MXC_DMA_H */
|
||||
#endif /* __MACH_DMA_V1_H__ */
|
||||
@@ -26,20 +26,24 @@
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/ulpi.h>
|
||||
#include <linux/fsl_devices.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/board-eukrea_cpuimx27.h>
|
||||
#include <mach/eukrea-baseboards.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/iomux-mx27.h>
|
||||
#include <mach/imx-uart.h>
|
||||
#include <mach/mxc_nand.h>
|
||||
#include <mach/mxc_ehci.h>
|
||||
#include <mach/ulpi.h>
|
||||
|
||||
#include "devices-imx27.h"
|
||||
#include "devices.h"
|
||||
|
||||
static int eukrea_cpuimx27_pins[] = {
|
||||
@@ -49,10 +53,12 @@ static int eukrea_cpuimx27_pins[] = {
|
||||
PE14_PF_UART1_CTS,
|
||||
PE15_PF_UART1_RTS,
|
||||
/* UART4 */
|
||||
#if defined(MACH_EUKREA_CPUIMX27_USEUART4)
|
||||
PB26_AF_UART4_RTS,
|
||||
PB28_AF_UART4_TXD,
|
||||
PB29_AF_UART4_CTS,
|
||||
PB31_AF_UART4_RXD,
|
||||
#endif
|
||||
/* FEC */
|
||||
PD0_AIN_FEC_TXD0,
|
||||
PD1_AIN_FEC_TXD1,
|
||||
@@ -76,19 +82,47 @@ static int eukrea_cpuimx27_pins[] = {
|
||||
PD17_PF_I2C_DATA,
|
||||
PD18_PF_I2C_CLK,
|
||||
/* SDHC2 */
|
||||
#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
|
||||
PB4_PF_SD2_D0,
|
||||
PB5_PF_SD2_D1,
|
||||
PB6_PF_SD2_D2,
|
||||
PB7_PF_SD2_D3,
|
||||
PB8_PF_SD2_CMD,
|
||||
PB9_PF_SD2_CLK,
|
||||
#endif
|
||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||
/* Quad UART's IRQ */
|
||||
GPIO_PORTD | 22 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTD | 23 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTD | 30 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTB | 22 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTB | 27 | GPIO_GPIO | GPIO_IN,
|
||||
GPIO_PORTB | 30 | GPIO_GPIO | GPIO_IN,
|
||||
#endif
|
||||
/* OTG */
|
||||
PC7_PF_USBOTG_DATA5,
|
||||
PC8_PF_USBOTG_DATA6,
|
||||
PC9_PF_USBOTG_DATA0,
|
||||
PC10_PF_USBOTG_DATA2,
|
||||
PC11_PF_USBOTG_DATA1,
|
||||
PC12_PF_USBOTG_DATA4,
|
||||
PC13_PF_USBOTG_DATA3,
|
||||
PE0_PF_USBOTG_NXT,
|
||||
PE1_PF_USBOTG_STP,
|
||||
PE2_PF_USBOTG_DIR,
|
||||
PE24_PF_USBOTG_CLK,
|
||||
PE25_PF_USBOTG_DATA7,
|
||||
/* USBH2 */
|
||||
PA0_PF_USBH2_CLK,
|
||||
PA1_PF_USBH2_DIR,
|
||||
PA2_PF_USBH2_DATA7,
|
||||
PA3_PF_USBH2_NXT,
|
||||
PA4_PF_USBH2_STP,
|
||||
PD19_AF_USBH2_DATA4,
|
||||
PD20_AF_USBH2_DATA3,
|
||||
PD21_AF_USBH2_DATA6,
|
||||
PD22_AF_USBH2_DATA0,
|
||||
PD23_AF_USBH2_DATA2,
|
||||
PD24_AF_USBH2_DATA1,
|
||||
PD26_AF_USBH2_DATA5,
|
||||
};
|
||||
|
||||
static struct physmap_flash_data eukrea_cpuimx27_flash_data = {
|
||||
@@ -111,15 +145,12 @@ static struct platform_device eukrea_cpuimx27_nor_mtd_device = {
|
||||
.resource = &eukrea_cpuimx27_flash_resource,
|
||||
};
|
||||
|
||||
static struct imxuart_platform_data uart_pdata[] = {
|
||||
{
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
}, {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
},
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static struct mxc_nand_platform_data eukrea_cpuimx27_nand_board_info = {
|
||||
static const struct mxc_nand_platform_data
|
||||
cpuimx27_nand_board_info __initconst = {
|
||||
.width = 1,
|
||||
.hw_ecc = 1,
|
||||
};
|
||||
@@ -127,9 +158,11 @@ static struct mxc_nand_platform_data eukrea_cpuimx27_nand_board_info = {
|
||||
static struct platform_device *platform_devices[] __initdata = {
|
||||
&eukrea_cpuimx27_nor_mtd_device,
|
||||
&mxc_fec_device,
|
||||
&mxc_wdt,
|
||||
&mxc_w1_master_device,
|
||||
};
|
||||
|
||||
static struct imxi2c_platform_data eukrea_cpuimx27_i2c_1_data = {
|
||||
static const struct imxi2c_platform_data cpuimx27_i2c1_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
@@ -182,34 +215,83 @@ static struct platform_device serial_device = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
static struct mxc_usbh_platform_data otg_pdata = {
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
|
||||
static struct mxc_usbh_platform_data usbh2_pdata = {
|
||||
.portsc = MXC_EHCI_MODE_ULPI,
|
||||
.flags = MXC_EHCI_INTERFACE_DIFF_UNI,
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct fsl_usb2_platform_data otg_device_pdata = {
|
||||
.operating_mode = FSL_USB2_DR_DEVICE,
|
||||
.phy_mode = FSL_USB2_PHY_ULPI,
|
||||
};
|
||||
|
||||
static int otg_mode_host;
|
||||
|
||||
static int __init eukrea_cpuimx27_otg_mode(char *options)
|
||||
{
|
||||
if (!strcmp(options, "host"))
|
||||
otg_mode_host = 1;
|
||||
else if (!strcmp(options, "device"))
|
||||
otg_mode_host = 0;
|
||||
else
|
||||
pr_info("otg_mode neither \"host\" nor \"device\". "
|
||||
"Defaulting to device\n");
|
||||
return 0;
|
||||
}
|
||||
__setup("otg_mode=", eukrea_cpuimx27_otg_mode);
|
||||
|
||||
static void __init eukrea_cpuimx27_init(void)
|
||||
{
|
||||
mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins,
|
||||
ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27");
|
||||
|
||||
mxc_register_device(&mxc_uart_device0, &uart_pdata[0]);
|
||||
imx27_add_imx_uart0(&uart_pdata);
|
||||
|
||||
mxc_register_device(&imx27_nand_device,
|
||||
&eukrea_cpuimx27_nand_board_info);
|
||||
imx27_add_mxc_nand(&cpuimx27_nand_board_info);
|
||||
|
||||
i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices,
|
||||
ARRAY_SIZE(eukrea_cpuimx27_i2c_devices));
|
||||
|
||||
mxc_register_device(&mxc_i2c_device0, &eukrea_cpuimx27_i2c_1_data);
|
||||
imx27_add_i2c_imx1(&cpuimx27_i2c1_data);
|
||||
|
||||
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
|
||||
|
||||
#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
|
||||
/* SDHC2 can be used for Wifi */
|
||||
mxc_register_device(&mxc_sdhc_device1, NULL);
|
||||
#endif
|
||||
#if defined(MACH_EUKREA_CPUIMX27_USEUART4)
|
||||
/* in which case UART4 is also used for Bluetooth */
|
||||
mxc_register_device(&mxc_uart_device3, &uart_pdata[1]);
|
||||
imx27_add_imx_uart3(&uart_pdata);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
|
||||
platform_device_register(&serial_device);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_ULPI)
|
||||
if (otg_mode_host) {
|
||||
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
|
||||
|
||||
mxc_register_device(&mxc_otg_host, &otg_pdata);
|
||||
}
|
||||
|
||||
usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
|
||||
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
|
||||
|
||||
mxc_register_device(&mxc_usbh2, &usbh2_pdata);
|
||||
#endif
|
||||
if (!otg_mode_host)
|
||||
mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
|
||||
|
||||
#ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD
|
||||
eukrea_mbimx27_baseboard_init();
|
||||
#endif
|
||||
@@ -12,10 +12,6 @@
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
@@ -26,10 +22,9 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/imx-uart.h>
|
||||
#include <mach/iomux-mx27.h>
|
||||
#include <mach/board-mx27lite.h>
|
||||
|
||||
#include "devices-imx27.h"
|
||||
#include "devices.h"
|
||||
|
||||
static unsigned int mx27lite_pins[] = {
|
||||
@@ -59,7 +54,7 @@ static unsigned int mx27lite_pins[] = {
|
||||
PF23_AIN_FEC_TX_EN,
|
||||
};
|
||||
|
||||
static struct imxuart_platform_data uart_pdata = {
|
||||
static const struct imxuart_platform_data uart_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
@@ -71,7 +66,7 @@ static void __init mx27lite_init(void)
|
||||
{
|
||||
mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins),
|
||||
"imx27lite");
|
||||
mxc_register_device(&mxc_uart_device0, &uart_pdata);
|
||||
imx27_add_imx_uart0(&uart_pdata);
|
||||
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#include <mach/common.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/imx-uart.h>
|
||||
#include <mach/iomux-mx1.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#include "devices-imx1.h"
|
||||
#include "devices.h"
|
||||
|
||||
static int mx1ads_pins[] = {
|
||||
@@ -58,12 +58,12 @@ static int mx1ads_pins[] = {
|
||||
* UARTs platform data
|
||||
*/
|
||||
|
||||
static struct imxuart_platform_data uart_pdata[] = {
|
||||
{
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
}, {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
},
|
||||
static const struct imxuart_platform_data uart0_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
static const struct imxuart_platform_data uart1_pdata __initconst = {
|
||||
.flags = IMXUART_HAVE_RTSCTS,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -75,8 +75,8 @@ static struct physmap_flash_data mx1ads_flash_data = {
|
||||
};
|
||||
|
||||
static struct resource flash_resource = {
|
||||
.start = IMX_CS0_PHYS,
|
||||
.end = IMX_CS0_PHYS + SZ_32M - 1,
|
||||
.start = MX1_CS0_PHYS,
|
||||
.end = MX1_CS0_PHYS + SZ_32M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@ static struct pcf857x_platform_data pcf857x_data[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct imxi2c_platform_data mx1ads_i2c_data = {
|
||||
static const struct imxi2c_platform_data mx1ads_i2c_data __initconst = {
|
||||
.bitrate = 100000,
|
||||
};
|
||||
|
||||
@@ -121,8 +121,8 @@ static void __init mx1ads_init(void)
|
||||
ARRAY_SIZE(mx1ads_pins), "mx1ads");
|
||||
|
||||
/* UART */
|
||||
mxc_register_device(&imx_uart1_device, &uart_pdata[0]);
|
||||
mxc_register_device(&imx_uart2_device, &uart_pdata[1]);
|
||||
imx1_add_imx_uart0(&uart0_pdata);
|
||||
imx1_add_imx_uart1(&uart1_pdata);
|
||||
|
||||
/* Physmap flash */
|
||||
mxc_register_device(&flash_device, &mx1ads_flash_data);
|
||||
@@ -131,7 +131,7 @@ static void __init mx1ads_init(void)
|
||||
i2c_register_board_info(0, mx1ads_i2c_devices,
|
||||
ARRAY_SIZE(mx1ads_i2c_devices));
|
||||
|
||||
mxc_register_device(&imx_i2c_device, &mx1ads_i2c_data);
|
||||
imx1_add_i2c_imx(&mx1ads_i2c_data);
|
||||
}
|
||||
|
||||
static void __init mx1ads_timer_init(void)
|
||||
@@ -145,8 +145,8 @@ struct sys_timer mx1ads_timer = {
|
||||
|
||||
MACHINE_START(MX1ADS, "Freescale MX1ADS")
|
||||
/* Maintainer: Sascha Hauer, Pengutronix */
|
||||
.phys_io = IMX_IO_PHYS,
|
||||
.io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc,
|
||||
.phys_io = MX1_IO_BASE_ADDR,
|
||||
.io_pg_offst = (MX1_IO_BASE_ADDR_VIRT >> 18) & 0xfffc,
|
||||
.boot_params = MX1_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_irq = mx1_init_irq,
|
||||
@@ -155,8 +155,8 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(MXLADS, "Freescale MXLADS")
|
||||
.phys_io = IMX_IO_PHYS,
|
||||
.io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc,
|
||||
.phys_io = MX1_IO_BASE_ADDR,
|
||||
.io_pg_offst = (MX1_IO_BASE_ADDR_VIRT >> 18) & 0xfffc,
|
||||
.boot_params = MX1_PHYS_OFFSET + 0x100,
|
||||
.map_io = mx1_map_io,
|
||||
.init_irq = mx1_init_irq,
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user