Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0a831cec
Commit
0a831cec
authored
Jan 14, 2011
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-rmk' of
git://git.pengutronix.de/git/imx/linux-2.6
into devel-stable
parents
5b88128f
b9214b97
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
567 additions
and
77 deletions
+567
-77
arch/arm/Kconfig
arch/arm/Kconfig
+1
-1
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Kconfig
+1
-0
arch/arm/mach-imx/mach-mx27_3ds.c
arch/arm/mach-imx/mach-mx27_3ds.c
+8
-2
arch/arm/mach-mx3/mach-mx31_3ds.c
arch/arm/mach-mx3/mach-mx31_3ds.c
+2
-2
arch/arm/mach-mx5/Kconfig
arch/arm/mach-mx5/Kconfig
+20
-0
arch/arm/mach-mx5/Makefile
arch/arm/mach-mx5/Makefile
+2
-0
arch/arm/mach-mx5/board-mx51_3ds.c
arch/arm/mach-mx5/board-mx51_3ds.c
+2
-3
arch/arm/mach-mx5/board-mx53_evk.c
arch/arm/mach-mx5/board-mx53_evk.c
+74
-0
arch/arm/mach-mx5/board-mx53_loco.c
arch/arm/mach-mx5/board-mx53_loco.c
+111
-0
arch/arm/mach-mx5/board-mx53_smd.c
arch/arm/mach-mx5/board-mx53_smd.c
+111
-0
arch/arm/mach-mx5/clock-mx51-mx53.c
arch/arm/mach-mx5/clock-mx51-mx53.c
+16
-2
arch/arm/mach-mx5/devices-imx51.h
arch/arm/mach-mx5/devices-imx51.h
+8
-0
arch/arm/mach-mx5/devices-imx53.h
arch/arm/mach-mx5/devices-imx53.h
+18
-0
arch/arm/mach-mx5/devices.c
arch/arm/mach-mx5/devices.c
+0
-19
arch/arm/mach-mx5/devices.h
arch/arm/mach-mx5/devices.h
+0
-1
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
+2
-3
arch/arm/mach-mxs/Kconfig
arch/arm/mach-mxs/Kconfig
+2
-2
arch/arm/mach-mxs/clock-mx23.c
arch/arm/mach-mxs/clock-mx23.c
+11
-2
arch/arm/mach-mxs/clock-mx28.c
arch/arm/mach-mxs/clock-mx28.c
+13
-1
arch/arm/mach-mxs/devices-mx23.h
arch/arm/mach-mxs/devices-mx23.h
+2
-2
arch/arm/mach-mxs/devices-mx28.h
arch/arm/mach-mxs/devices-mx28.h
+2
-2
arch/arm/mach-mxs/devices.c
arch/arm/mach-mxs/devices.c
+15
-2
arch/arm/mach-mxs/devices/Kconfig
arch/arm/mach-mxs/devices/Kconfig
+2
-1
arch/arm/mach-mxs/devices/Makefile
arch/arm/mach-mxs/devices/Makefile
+1
-1
arch/arm/mach-mxs/devices/amba-duart.c
arch/arm/mach-mxs/devices/amba-duart.c
+40
-0
arch/arm/mach-mxs/devices/platform-fec.c
arch/arm/mach-mxs/devices/platform-fec.c
+1
-1
arch/arm/mach-mxs/include/mach/devices-common.h
arch/arm/mach-mxs/include/mach/devices-common.h
+4
-7
arch/arm/mach-mxs/mach-mx28evk.c
arch/arm/mach-mxs/mach-mx28evk.c
+23
-3
arch/arm/plat-mxc/devices/Kconfig
arch/arm/plat-mxc/devices/Kconfig
+1
-1
arch/arm/plat-mxc/devices/platform-fec.c
arch/arm/plat-mxc/devices/platform-fec.c
+5
-0
arch/arm/plat-mxc/devices/platform-imx-i2c.c
arch/arm/plat-mxc/devices/platform-imx-i2c.c
+9
-0
arch/arm/plat-mxc/devices/platform-imx-keypad.c
arch/arm/plat-mxc/devices/platform-imx-keypad.c
+5
-0
arch/arm/plat-mxc/devices/platform-mxc_pwm.c
arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+9
-0
arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
+12
-0
arch/arm/plat-mxc/devices/platform-spi_imx.c
arch/arm/plat-mxc/devices/platform-spi_imx.c
+12
-0
arch/arm/plat-mxc/include/mach/iomux-mx53.h
arch/arm/plat-mxc/include/mach/iomux-mx53.h
+3
-1
arch/arm/plat-mxc/include/mach/iomux-v3.h
arch/arm/plat-mxc/include/mach/iomux-v3.h
+1
-0
arch/arm/plat-mxc/include/mach/mx51.h
arch/arm/plat-mxc/include/mach/mx51.h
+3
-3
arch/arm/plat-mxc/include/mach/mx53.h
arch/arm/plat-mxc/include/mach/mx53.h
+14
-14
arch/arm/plat-mxc/pwm.c
arch/arm/plat-mxc/pwm.c
+1
-1
No files found.
arch/arm/Kconfig
View file @
0a831cec
...
@@ -363,7 +363,7 @@ config ARCH_MXS
...
@@ -363,7 +363,7 @@ config ARCH_MXS
bool "Freescale MXS-based"
bool "Freescale MXS-based"
select GENERIC_CLOCKEVENTS
select GENERIC_CLOCKEVENTS
select ARCH_REQUIRE_GPIOLIB
select ARCH_REQUIRE_GPIOLIB
select C
OMMON_CLKDEV
select C
LKDEV_LOOKUP
help
help
Support for Freescale MXS-based family of processors
Support for Freescale MXS-based family of processors
...
...
arch/arm/mach-imx/Kconfig
View file @
0a831cec
...
@@ -243,6 +243,7 @@ config MACH_MX27_3DS
...
@@ -243,6 +243,7 @@ config MACH_MX27_3DS
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_DEBUG_BOARD
select MXC_ULPI if USB_ULPI
select MXC_ULPI if USB_ULPI
help
help
Include support for MX27PDK platform. This includes specific
Include support for MX27PDK platform. This includes specific
...
...
arch/arm/mach-imx/mach-mx27_3ds.c
View file @
0a831cec
...
@@ -37,12 +37,15 @@
...
@@ -37,12 +37,15 @@
#include <mach/common.h>
#include <mach/common.h>
#include <mach/iomux-mx27.h>
#include <mach/iomux-mx27.h>
#include <mach/ulpi.h>
#include <mach/ulpi.h>
#include <mach/irqs.h>
#include <mach/3ds_debugboard.h>
#include "devices-imx27.h"
#include "devices-imx27.h"
#define SD1_EN_GPIO (GPIO_PORTB + 25)
#define SD1_EN_GPIO (GPIO_PORTB + 25)
#define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23)
#define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23)
#define SPI2_SS0 (GPIO_PORTD + 21)
#define SPI2_SS0 (GPIO_PORTD + 21)
#define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTC + 28)
static
const
int
mx27pdk_pins
[]
__initconst
=
{
static
const
int
mx27pdk_pins
[]
__initconst
=
{
/* UART1 */
/* UART1 */
...
@@ -215,10 +218,10 @@ static struct regulator_init_data vgen_init = {
...
@@ -215,10 +218,10 @@ static struct regulator_init_data vgen_init = {
static
struct
mc13783_regulator_init_data
mx27_3ds_regulators
[]
=
{
static
struct
mc13783_regulator_init_data
mx27_3ds_regulators
[]
=
{
{
{
.
id
=
MC13783_REG
U
_VMMC1
,
.
id
=
MC13783_REG_VMMC1
,
.
init_data
=
&
vmmc1_init
,
.
init_data
=
&
vmmc1_init
,
},
{
},
{
.
id
=
MC13783_REG
U
_VGEN
,
.
id
=
MC13783_REG_VGEN
,
.
init_data
=
&
vgen_init
,
.
init_data
=
&
vgen_init
,
},
},
};
};
...
@@ -276,6 +279,9 @@ static void __init mx27pdk_init(void)
...
@@ -276,6 +279,9 @@ static void __init mx27pdk_init(void)
imx27_add_spi_imx1
(
&
spi2_pdata
);
imx27_add_spi_imx1
(
&
spi2_pdata
);
spi_register_board_info
(
mx27_3ds_spi_devs
,
spi_register_board_info
(
mx27_3ds_spi_devs
,
ARRAY_SIZE
(
mx27_3ds_spi_devs
));
ARRAY_SIZE
(
mx27_3ds_spi_devs
));
if
(
mxc_expio_init
(
MX27_CS5_BASE_ADDR
,
EXPIO_PARENT_INT
))
pr_warn
(
"Init of the debugboard failed, all devices on the debugboard are unusable.
\n
"
);
}
}
static
void
__init
mx27pdk_timer_init
(
void
)
static
void
__init
mx27pdk_timer_init
(
void
)
...
...
arch/arm/mach-mx3/mach-mx31_3ds.c
View file @
0a831cec
...
@@ -147,10 +147,10 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
...
@@ -147,10 +147,10 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
.
init_data
=
&
pwgtx_init
,
.
init_data
=
&
pwgtx_init
,
},
{
},
{
.
id
=
MC13783_REG
U
_GPO1
,
/* Turn on 1.8V */
.
id
=
MC13783_REG_GPO1
,
/* Turn on 1.8V */
.
init_data
=
&
gpo_init
,
.
init_data
=
&
gpo_init
,
},
{
},
{
.
id
=
MC13783_REG
U
_GPO3
,
/* Turn on 3.3V */
.
id
=
MC13783_REG_GPO3
,
/* Turn on 3.3V */
.
init_data
=
&
gpo_init
,
.
init_data
=
&
gpo_init
,
},
},
};
};
...
...
arch/arm/mach-mx5/Kconfig
View file @
0a831cec
...
@@ -50,6 +50,7 @@ config MACH_MX51_BABBAGE
...
@@ -50,6 +50,7 @@ config MACH_MX51_BABBAGE
config MACH_MX51_3DS
config MACH_MX51_3DS
bool "Support MX51PDK (3DS)"
bool "Support MX51PDK (3DS)"
select SOC_IMX51
select SOC_IMX51
select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_SPI_IMX
...
@@ -77,6 +78,7 @@ choice
...
@@ -77,6 +78,7 @@ choice
config MACH_EUKREA_MBIMX51_BASEBOARD
config MACH_EUKREA_MBIMX51_BASEBOARD
prompt "Eukrea MBIMX51 development board"
prompt "Eukrea MBIMX51 development board"
bool
bool
select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
help
help
This adds board specific devices that can be found on Eukrea's
This adds board specific devices that can be found on Eukrea's
...
@@ -124,10 +126,28 @@ config MACH_MX53_EVK
...
@@ -124,10 +126,28 @@ config MACH_MX53_EVK
bool "Support MX53 EVK platforms"
bool "Support MX53 EVK platforms"
select SOC_IMX53
select SOC_IMX53
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX
help
help
Include support for MX53 EVK platform. This includes specific
Include support for MX53 EVK platform. This includes specific
configurations for the board and its peripherals.
configurations for the board and its peripherals.
config MACH_MX53_SMD
bool "Support MX53 SMD platforms"
select SOC_IMX53
select IMX_HAVE_PLATFORM_IMX_UART
help
Include support for MX53 SMD platform. This includes specific
configurations for the board and its peripherals.
config MACH_MX53_LOCO
bool "Support MX53 LOCO platforms"
select SOC_IMX53
select IMX_HAVE_PLATFORM_IMX_UART
help
Include support for MX53 LOCO platform. This includes specific
configurations for the board and its peripherals.
config MACH_MX50_RDP
config MACH_MX50_RDP
bool "Support MX50 reference design platform"
bool "Support MX50 reference design platform"
...
...
arch/arm/mach-mx5/Makefile
View file @
0a831cec
...
@@ -10,6 +10,8 @@ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
...
@@ -10,6 +10,8 @@ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o
obj-$(CONFIG_MACH_MX51_BABBAGE)
+=
board-mx51_babbage.o
obj-$(CONFIG_MACH_MX51_BABBAGE)
+=
board-mx51_babbage.o
obj-$(CONFIG_MACH_MX51_3DS)
+=
board-mx51_3ds.o
obj-$(CONFIG_MACH_MX51_3DS)
+=
board-mx51_3ds.o
obj-$(CONFIG_MACH_MX53_EVK)
+=
board-mx53_evk.o
obj-$(CONFIG_MACH_MX53_EVK)
+=
board-mx53_evk.o
obj-$(CONFIG_MACH_MX53_SMD)
+=
board-mx53_smd.o
obj-$(CONFIG_MACH_MX53_LOCO)
+=
board-mx53_loco.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51)
+=
board-cpuimx51.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51)
+=
board-cpuimx51.o
obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD)
+=
eukrea_mbimx51-baseboard.o
obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD)
+=
eukrea_mbimx51-baseboard.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD)
+=
board-cpuimx51sd.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD)
+=
board-cpuimx51sd.o
...
...
arch/arm/mach-mx5/board-mx51_3ds.c
View file @
0a831cec
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
#include <linux/irq.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/input/matrix_keypad.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
...
@@ -120,14 +119,14 @@ static int mx51_3ds_board_keymap[] = {
...
@@ -120,14 +119,14 @@ static int mx51_3ds_board_keymap[] = {
KEY
(
3
,
5
,
KEY_BACK
)
KEY
(
3
,
5
,
KEY_BACK
)
};
};
static
struct
matrix_keymap_data
mx51_3ds_map_data
=
{
static
const
struct
matrix_keymap_data
mx51_3ds_map_data
__initconst
=
{
.
keymap
=
mx51_3ds_board_keymap
,
.
keymap
=
mx51_3ds_board_keymap
,
.
keymap_size
=
ARRAY_SIZE
(
mx51_3ds_board_keymap
),
.
keymap_size
=
ARRAY_SIZE
(
mx51_3ds_board_keymap
),
};
};
static
void
mxc_init_keypad
(
void
)
static
void
mxc_init_keypad
(
void
)
{
{
mxc_register_device
(
&
mxc_keypad_device
,
&
mx51_3ds_map_data
);
imx51_add_imx_keypad
(
&
mx51_3ds_map_data
);
}
}
#else
#else
static
inline
void
mxc_init_keypad
(
void
)
static
inline
void
mxc_init_keypad
(
void
)
...
...
arch/arm/mach-mx5/board-mx53_evk.c
View file @
0a831cec
...
@@ -21,6 +21,11 @@
...
@@ -21,6 +21,11 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/fec.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <mach/common.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
...
@@ -29,6 +34,10 @@
...
@@ -29,6 +34,10 @@
#include <mach/imx-uart.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx53.h>
#include <mach/iomux-mx53.h>
#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
#define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30)
#define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19)
#include "crm_regs.h"
#include "crm_regs.h"
#include "devices-imx53.h"
#include "devices-imx53.h"
...
@@ -47,6 +56,14 @@ static iomux_v3_cfg_t mx53_evk_pads[] = {
...
@@ -47,6 +56,14 @@ static iomux_v3_cfg_t mx53_evk_pads[] = {
MX53_PAD_ATA_CS_1__UART3_RXD
,
MX53_PAD_ATA_CS_1__UART3_RXD
,
MX53_PAD_ATA_DA_1__UART3_CTS
,
MX53_PAD_ATA_DA_1__UART3_CTS
,
MX53_PAD_ATA_DA_2__UART3_RTS
,
MX53_PAD_ATA_DA_2__UART3_RTS
,
MX53_PAD_EIM_D16__CSPI1_SCLK
,
MX53_PAD_EIM_D17__CSPI1_MISO
,
MX53_PAD_EIM_D18__CSPI1_MOSI
,
/* ecspi chip select lines */
MX53_PAD_EIM_EB2__GPIO_2_30
,
MX53_PAD_EIM_D19__GPIO_3_19
,
};
};
static
const
struct
imxuart_platform_data
mx53_evk_uart_pdata
__initconst
=
{
static
const
struct
imxuart_platform_data
mx53_evk_uart_pdata
__initconst
=
{
...
@@ -60,11 +77,68 @@ static inline void mx53_evk_init_uart(void)
...
@@ -60,11 +77,68 @@ static inline void mx53_evk_init_uart(void)
imx53_add_imx_uart
(
2
,
&
mx53_evk_uart_pdata
);
imx53_add_imx_uart
(
2
,
&
mx53_evk_uart_pdata
);
}
}
static
const
struct
imxi2c_platform_data
mx53_evk_i2c_data
__initconst
=
{
.
bitrate
=
100000
,
};
static
inline
void
mx53_evk_fec_reset
(
void
)
{
int
ret
;
/* reset FEC PHY */
ret
=
gpio_request
(
SMD_FEC_PHY_RST
,
"fec-phy-reset"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to get GPIO_FEC_PHY_RESET: %d
\n
"
,
ret
);
return
;
}
gpio_direction_output
(
SMD_FEC_PHY_RST
,
0
);
gpio_set_value
(
SMD_FEC_PHY_RST
,
0
);
msleep
(
1
);
gpio_set_value
(
SMD_FEC_PHY_RST
,
1
);
}
static
struct
fec_platform_data
mx53_evk_fec_pdata
=
{
.
phy
=
PHY_INTERFACE_MODE_RMII
,
};
static
struct
spi_board_info
mx53_evk_spi_board_info
[]
__initdata
=
{
{
.
modalias
=
"mtd_dataflash"
,
.
max_speed_hz
=
25000000
,
.
bus_num
=
0
,
.
chip_select
=
1
,
.
mode
=
SPI_MODE_0
,
.
platform_data
=
NULL
,
},
};
static
int
mx53_evk_spi_cs
[]
=
{
EVK_ECSPI1_CS0
,
EVK_ECSPI1_CS1
,
};
static
const
struct
spi_imx_master
mx53_evk_spi_data
__initconst
=
{
.
chipselect
=
mx53_evk_spi_cs
,
.
num_chipselect
=
ARRAY_SIZE
(
mx53_evk_spi_cs
),
};
static
void
__init
mx53_evk_board_init
(
void
)
static
void
__init
mx53_evk_board_init
(
void
)
{
{
mxc_iomux_v3_setup_multiple_pads
(
mx53_evk_pads
,
mxc_iomux_v3_setup_multiple_pads
(
mx53_evk_pads
,
ARRAY_SIZE
(
mx53_evk_pads
));
ARRAY_SIZE
(
mx53_evk_pads
));
mx53_evk_init_uart
();
mx53_evk_init_uart
();
mx53_evk_fec_reset
();
imx53_add_fec
(
&
mx53_evk_fec_pdata
);
imx53_add_imx_i2c
(
0
,
&
mx53_evk_i2c_data
);
imx53_add_imx_i2c
(
1
,
&
mx53_evk_i2c_data
);
imx53_add_sdhci_esdhc_imx
(
0
,
NULL
);
imx53_add_sdhci_esdhc_imx
(
1
,
NULL
);
spi_register_board_info
(
mx53_evk_spi_board_info
,
ARRAY_SIZE
(
mx53_evk_spi_board_info
));
imx53_add_ecspi
(
0
,
&
mx53_evk_spi_data
);
}
}
static
void
__init
mx53_evk_timer_init
(
void
)
static
void
__init
mx53_evk_timer_init
(
void
)
...
...
arch/arm/mach-mx5/board-mx53_loco.c
0 → 100644
View file @
0a831cec
/*
* Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/fec.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx53.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include "crm_regs.h"
#include "devices-imx53.h"
#define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6)
static
iomux_v3_cfg_t
mx53_loco_pads
[]
=
{
MX53_PAD_CSI0_D10__UART1_TXD
,
MX53_PAD_CSI0_D11__UART1_RXD
,
MX53_PAD_ATA_DIOW__UART1_TXD
,
MX53_PAD_ATA_DMACK__UART1_RXD
,
MX53_PAD_ATA_BUFFER_EN__UART2_RXD
,
MX53_PAD_ATA_DMARQ__UART2_TXD
,
MX53_PAD_ATA_DIOR__UART2_RTS
,
MX53_PAD_ATA_INTRQ__UART2_CTS
,
MX53_PAD_ATA_CS_0__UART3_TXD
,
MX53_PAD_ATA_CS_1__UART3_RXD
,
MX53_PAD_ATA_DA_1__UART3_CTS
,
MX53_PAD_ATA_DA_2__UART3_RTS
,
};
static
const
struct
imxuart_platform_data
mx53_loco_uart_data
__initconst
=
{
.
flags
=
IMXUART_HAVE_RTSCTS
,
};
static
inline
void
mx53_loco_init_uart
(
void
)
{
imx53_add_imx_uart
(
0
,
&
mx53_loco_uart_data
);
imx53_add_imx_uart
(
1
,
&
mx53_loco_uart_data
);
imx53_add_imx_uart
(
2
,
&
mx53_loco_uart_data
);
}
static
inline
void
mx53_loco_fec_reset
(
void
)
{
int
ret
;
/* reset FEC PHY */
ret
=
gpio_request
(
LOCO_FEC_PHY_RST
,
"fec-phy-reset"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to get GPIO_FEC_PHY_RESET: %d
\n
"
,
ret
);
return
;
}
gpio_direction_output
(
LOCO_FEC_PHY_RST
,
0
);
msleep
(
1
);
gpio_set_value
(
LOCO_FEC_PHY_RST
,
1
);
}
static
struct
fec_platform_data
mx53_loco_fec_data
=
{
.
phy
=
PHY_INTERFACE_MODE_RMII
,
};
static
void
__init
mx53_loco_board_init
(
void
)
{
mxc_iomux_v3_setup_multiple_pads
(
mx53_loco_pads
,
ARRAY_SIZE
(
mx53_loco_pads
));
mx53_loco_init_uart
();
mx53_loco_fec_reset
();
imx53_add_fec
(
&
mx53_loco_fec_data
);
}
static
void
__init
mx53_loco_timer_init
(
void
)
{
mx53_clocks_init
(
32768
,
24000000
,
0
,
0
);
}
static
struct
sys_timer
mx53_loco_timer
=
{
.
init
=
mx53_loco_timer_init
,
};
MACHINE_START
(
MX53_LOCO
,
"Freescale MX53 LOCO Board"
)
.
map_io
=
mx53_map_io
,
.
init_irq
=
mx53_init_irq
,
.
init_machine
=
mx53_loco_board_init
,
.
timer
=
&
mx53_loco_timer
,
MACHINE_END
arch/arm/mach-mx5/board-mx53_smd.c
0 → 100644
View file @
0a831cec
/*
* Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/fec.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx53.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include "crm_regs.h"
#include "devices-imx53.h"
#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
static
iomux_v3_cfg_t
mx53_smd_pads
[]
=
{
MX53_PAD_CSI0_D10__UART1_TXD
,
MX53_PAD_CSI0_D11__UART1_RXD
,
MX53_PAD_ATA_DIOW__UART1_TXD
,
MX53_PAD_ATA_DMACK__UART1_RXD
,
MX53_PAD_ATA_BUFFER_EN__UART2_RXD
,
MX53_PAD_ATA_DMARQ__UART2_TXD
,
MX53_PAD_ATA_DIOR__UART2_RTS
,
MX53_PAD_ATA_INTRQ__UART2_CTS
,
MX53_PAD_ATA_CS_0__UART3_TXD
,
MX53_PAD_ATA_CS_1__UART3_RXD
,
MX53_PAD_ATA_DA_1__UART3_CTS
,
MX53_PAD_ATA_DA_2__UART3_RTS
,
};
static
const
struct
imxuart_platform_data
mx53_smd_uart_data
__initconst
=
{
.
flags
=
IMXUART_HAVE_RTSCTS
,
};
static
inline
void
mx53_smd_init_uart
(
void
)
{
imx53_add_imx_uart
(
0
,
&
mx53_smd_uart_data
);
imx53_add_imx_uart
(
1
,
&
mx53_smd_uart_data
);
imx53_add_imx_uart
(
2
,
&
mx53_smd_uart_data
);
}
static
inline
void
mx53_smd_fec_reset
(
void
)
{
int
ret
;
/* reset FEC PHY */
ret
=
gpio_request
(
SMD_FEC_PHY_RST
,
"fec-phy-reset"
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to get GPIO_FEC_PHY_RESET: %d
\n
"
,
ret
);
return
;
}
gpio_direction_output
(
SMD_FEC_PHY_RST
,
0
);
msleep
(
1
);
gpio_set_value
(
SMD_FEC_PHY_RST
,
1
);
}
static
struct
fec_platform_data
mx53_smd_fec_data
=
{
.
phy
=
PHY_INTERFACE_MODE_RMII
,
};
static
void
__init
mx53_smd_board_init
(
void
)
{
mxc_iomux_v3_setup_multiple_pads
(
mx53_smd_pads
,
ARRAY_SIZE
(
mx53_smd_pads
));
mx53_smd_init_uart
();
mx53_smd_fec_reset
();
imx53_add_fec
(
&
mx53_smd_fec_data
);
}
static
void
__init
mx53_smd_timer_init
(
void
)
{
mx53_clocks_init
(
32768
,
24000000
,
22579200
,
0
);
}
static
struct
sys_timer
mx53_smd_timer
=
{
.
init
=
mx53_smd_timer_init
,
};
MACHINE_START
(
MX53_SMD
,
"Freescale MX53 SMD Board"
)
.
map_io
=
mx53_map_io
,
.
init_irq
=
mx53_init_irq
,
.
init_machine
=
mx53_smd_board_init
,
.
timer
=
&
mx53_smd_timer
,
MACHINE_END
arch/arm/mach-mx5/clock-mx51-mx53.c
View file @
0a831cec
...
@@ -1191,6 +1191,11 @@ DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET,
...
@@ -1191,6 +1191,11 @@ DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET,
DEFINE_CLOCK
(
gpt_clk
,
0
,
MXC_CCM_CCGR2
,
MXC_CCM_CCGRx_CG9_OFFSET
,
DEFINE_CLOCK
(
gpt_clk
,
0
,
MXC_CCM_CCGR2
,
MXC_CCM_CCGRx_CG9_OFFSET
,
NULL
,
NULL
,
&
ipg_clk
,
&
gpt_ipg_clk
);
NULL
,
NULL
,
&
ipg_clk
,
&
gpt_ipg_clk
);
DEFINE_CLOCK
(
pwm1_clk
,
0
,
MXC_CCM_CCGR2
,
MXC_CCM_CCGRx_CG6_OFFSET
,
NULL
,
NULL
,
&
ipg_clk
,
NULL
);
DEFINE_CLOCK
(
pwm2_clk
,
0
,
MXC_CCM_CCGR2
,
MXC_CCM_CCGRx_CG8_OFFSET
,
NULL
,
NULL
,
&
ipg_clk
,
NULL
);
/* I2C */
/* I2C */
DEFINE_CLOCK
(
i2c1_clk
,
0
,
MXC_CCM_CCGR1
,
MXC_CCM_CCGRx_CG9_OFFSET
,
DEFINE_CLOCK
(
i2c1_clk
,
0
,
MXC_CCM_CCGR1
,
MXC_CCM_CCGRx_CG9_OFFSET
,
NULL
,
NULL
,
&
ipg_clk
,
NULL
);
NULL
,
NULL
,
&
ipg_clk
,
NULL
);
...
@@ -1283,6 +1288,8 @@ static struct clk_lookup mx51_lookups[] = {
...
@@ -1283,6 +1288,8 @@ static struct clk_lookup mx51_lookups[] = {
_REGISTER_CLOCK
(
"imx-uart.2"
,
NULL
,
uart3_clk
)
_REGISTER_CLOCK
(
"imx-uart.2"
,
NULL
,
uart3_clk
)
_REGISTER_CLOCK
(
NULL
,
"gpt"
,
gpt_clk
)
_REGISTER_CLOCK
(
NULL
,
"gpt"
,
gpt_clk
)
_REGISTER_CLOCK
(
"fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"mxc_pwm.0"
,
"pwm"
,
pwm1_clk
)
_REGISTER_CLOCK
(
"mxc_pwm.1"
,
"pwm"
,
pwm2_clk
)
_REGISTER_CLOCK
(
"imx-i2c.0"
,
NULL
,
i2c1_clk
)
_REGISTER_CLOCK
(
"imx-i2c.0"
,
NULL
,
i2c1_clk
)
_REGISTER_CLOCK
(
"imx-i2c.1"
,
NULL
,
i2c2_clk
)
_REGISTER_CLOCK
(
"imx-i2c.1"
,
NULL
,
i2c2_clk
)
_REGISTER_CLOCK
(
"imx-i2c.2"
,
NULL
,
hsi2c_clk
)
_REGISTER_CLOCK
(
"imx-i2c.2"
,
NULL
,
hsi2c_clk
)
...
@@ -1295,7 +1302,7 @@ static struct clk_lookup mx51_lookups[] = {
...
@@ -1295,7 +1302,7 @@ static struct clk_lookup mx51_lookups[] = {
_REGISTER_CLOCK
(
"mxc-ehci.2"
,
"usb_ahb"
,
usb_ahb_clk
)
_REGISTER_CLOCK
(
"mxc-ehci.2"
,
"usb_ahb"
,
usb_ahb_clk
)
_REGISTER_CLOCK
(
"fsl-usb2-udc"
,
"usb"
,
usboh3_clk
)
_REGISTER_CLOCK
(
"fsl-usb2-udc"
,
"usb"
,
usboh3_clk
)
_REGISTER_CLOCK
(
"fsl-usb2-udc"
,
"usb_ahb"
,
ahb_clk
)
_REGISTER_CLOCK
(
"fsl-usb2-udc"
,
"usb_ahb"
,
ahb_clk
)
_REGISTER_CLOCK
(
"imx-keypad
.0
"
,
NULL
,
kpp_clk
)
_REGISTER_CLOCK
(
"imx-keypad"
,
NULL
,
kpp_clk
)
_REGISTER_CLOCK
(
"mxc_nand"
,
NULL
,
nfc_clk
)
_REGISTER_CLOCK
(
"mxc_nand"
,
NULL
,
nfc_clk
)
_REGISTER_CLOCK
(
"imx-ssi.0"
,
NULL
,
ssi1_clk
)
_REGISTER_CLOCK
(
"imx-ssi.0"
,
NULL
,
ssi1_clk
)
_REGISTER_CLOCK
(
"imx-ssi.1"
,
NULL
,
ssi2_clk
)
_REGISTER_CLOCK
(
"imx-ssi.1"
,
NULL
,
ssi2_clk
)
...
@@ -1326,6 +1333,13 @@ static struct clk_lookup mx53_lookups[] = {
...
@@ -1326,6 +1333,13 @@ static struct clk_lookup mx53_lookups[] = {
_REGISTER_CLOCK
(
NULL
,
"gpt"
,
gpt_clk
)
_REGISTER_CLOCK
(
NULL
,
"gpt"
,
gpt_clk
)
_REGISTER_CLOCK
(
"fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
NULL
,
"iim_clk"
,
iim_clk
)
_REGISTER_CLOCK
(
NULL
,
"iim_clk"
,
iim_clk
)
_REGISTER_CLOCK
(
"imx-i2c.0"
,
NULL
,
i2c1_clk
)
_REGISTER_CLOCK
(
"imx-i2c.1"
,
NULL
,
i2c2_clk
)
_REGISTER_CLOCK
(
"sdhci-esdhc-imx.0"
,
NULL
,
esdhc1_clk
)
_REGISTER_CLOCK
(
"sdhci-esdhc-imx.1"
,
NULL
,
esdhc2_clk
)
_REGISTER_CLOCK
(
"imx53-ecspi.0"
,
NULL
,
ecspi1_clk
)
_REGISTER_CLOCK
(
"imx53-ecspi.1"
,
NULL
,
ecspi2_clk
)
_REGISTER_CLOCK
(
"imx53-cspi.0"
,
NULL
,
cspi_clk
)
};
};
static
void
clk_tree_init
(
void
)
static
void
clk_tree_init
(
void
)
...
@@ -1363,7 +1377,6 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
...
@@ -1363,7 +1377,6 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
clk_tree_init
();
clk_tree_init
();
clk_set_parent
(
&
uart_root_clk
,
&
pll3_sw_clk
);
clk_enable
(
&
cpu_clk
);
clk_enable
(
&
cpu_clk
);
clk_enable
(
&
main_bus_clk
);
clk_enable
(
&
main_bus_clk
);
...
@@ -1406,6 +1419,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
...
@@ -1406,6 +1419,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
clk_tree_init
();
clk_tree_init
();
clk_set_parent
(
&
uart_root_clk
,
&
pll3_sw_clk
);
clk_enable
(
&
cpu_clk
);
clk_enable
(
&
cpu_clk
);
clk_enable
(
&
main_bus_clk
);
clk_enable
(
&
main_bus_clk
);
...
...
arch/arm/mach-mx5/devices-imx51.h
View file @
0a831cec
...
@@ -47,3 +47,11 @@ extern const struct imx_spi_imx_data imx51_ecspi_data[] __initconst;
...
@@ -47,3 +47,11 @@ extern const struct imx_spi_imx_data imx51_ecspi_data[] __initconst;
extern
const
struct
imx_imx2_wdt_data
imx51_imx2_wdt_data
[]
__initconst
;
extern
const
struct
imx_imx2_wdt_data
imx51_imx2_wdt_data
[]
__initconst
;
#define imx51_add_imx2_wdt(id, pdata) \
#define imx51_add_imx2_wdt(id, pdata) \
imx_add_imx2_wdt(&imx51_imx2_wdt_data[id])
imx_add_imx2_wdt(&imx51_imx2_wdt_data[id])
extern
const
struct
imx_mxc_pwm_data
imx51_mxc_pwm_data
[]
__initconst
;
#define imx51_add_mxc_pwm(id) \
imx_add_mxc_pwm(&imx51_mxc_pwm_data[id])
extern
const
struct
imx_imx_keypad_data
imx51_imx_keypad_data
__initconst
;
#define imx51_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
arch/arm/mach-mx5/devices-imx53.h
View file @
0a831cec
...
@@ -8,6 +8,24 @@
...
@@ -8,6 +8,24 @@
#include <mach/mx53.h>
#include <mach/mx53.h>
#include <mach/devices-common.h>
#include <mach/devices-common.h>
extern
const
struct
imx_fec_data
imx53_fec_data
__initconst
;
#define imx53_add_fec(pdata) \
imx_add_fec(&imx53_fec_data, pdata)
extern
const
struct
imx_imx_uart_1irq_data
imx53_imx_uart_data
[]
__initconst
;
extern
const
struct
imx_imx_uart_1irq_data
imx53_imx_uart_data
[]
__initconst
;
#define imx53_add_imx_uart(id, pdata) \
#define imx53_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata)
imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata)
extern
const
struct
imx_imx_i2c_data
imx53_imx_i2c_data
[]
__initconst
;
#define imx53_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx53_imx_i2c_data[id], pdata)
extern
const
struct
imx_sdhci_esdhc_imx_data
imx53_sdhci_esdhc_imx_data
[]
__initconst
;
#define imx53_add_sdhci_esdhc_imx(id, pdata) \
imx_add_sdhci_esdhc_imx(&imx53_sdhci_esdhc_imx_data[id], pdata)
extern
const
struct
imx_spi_imx_data
imx53_ecspi_data
[]
__initconst
;
#define imx53_add_ecspi(id, pdata) \
imx_add_spi_imx(&imx53_ecspi_data[id], pdata)
arch/arm/mach-mx5/devices.c
View file @
0a831cec
...
@@ -120,25 +120,6 @@ struct platform_device mxc_usbh2_device = {
...
@@ -120,25 +120,6 @@ struct platform_device mxc_usbh2_device = {
},
},
};
};
static
struct
resource
mxc_kpp_resources
[]
=
{
{
.
start
=
MX51_MXC_INT_KPP
,
.
end
=
MX51_MXC_INT_KPP
,
.
flags
=
IORESOURCE_IRQ
,
}
,
{
.
start
=
MX51_KPP_BASE_ADDR
,
.
end
=
MX51_KPP_BASE_ADDR
+
0x8
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
};
struct
platform_device
mxc_keypad_device
=
{
.
name
=
"imx-keypad"
,
.
id
=
0
,
.
num_resources
=
ARRAY_SIZE
(
mxc_kpp_resources
),
.
resource
=
mxc_kpp_resources
,
};
static
struct
mxc_gpio_port
mxc_gpio_ports
[]
=
{
static
struct
mxc_gpio_port
mxc_gpio_ports
[]
=
{
{
{
.
chip
.
label
=
"gpio-0"
,
.
chip
.
label
=
"gpio-0"
,
...
...
arch/arm/mach-mx5/devices.h
View file @
0a831cec
...
@@ -3,4 +3,3 @@ extern struct platform_device mxc_usbh1_device;
...
@@ -3,4 +3,3 @@ extern struct platform_device mxc_usbh1_device;
extern
struct
platform_device
mxc_usbh2_device
;
extern
struct
platform_device
mxc_usbh2_device
;
extern
struct
platform_device
mxc_usbdr_udc_device
;
extern
struct
platform_device
mxc_usbdr_udc_device
;
extern
struct
platform_device
mxc_hsi2c_device
;
extern
struct
platform_device
mxc_hsi2c_device
;
extern
struct
platform_device
mxc_keypad_device
;
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
View file @
0a831cec
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include <linux/fsl_devices.h>
#include <linux/fsl_devices.h>
#include <linux/i2c/tsc2007.h>
#include <linux/i2c/tsc2007.h>
#include <linux/leds.h>
#include <linux/leds.h>
#include <linux/input/matrix_keypad.h>
#include <mach/common.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/hardware.h>
...
@@ -157,7 +156,7 @@ static int mbimx51_keymap[] = {
...
@@ -157,7 +156,7 @@ static int mbimx51_keymap[] = {
KEY
(
3
,
3
,
KEY_ENTER
),
KEY
(
3
,
3
,
KEY_ENTER
),
};
};
static
struct
matrix_keymap_data
mbimx51_map_data
=
{
static
const
struct
matrix_keymap_data
mbimx51_map_data
__initconst
=
{
.
keymap
=
mbimx51_keymap
,
.
keymap
=
mbimx51_keymap
,
.
keymap_size
=
ARRAY_SIZE
(
mbimx51_keymap
),
.
keymap_size
=
ARRAY_SIZE
(
mbimx51_keymap
),
};
};
...
@@ -209,7 +208,7 @@ void __init eukrea_mbimx51_baseboard_init(void)
...
@@ -209,7 +208,7 @@ void __init eukrea_mbimx51_baseboard_init(void)
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
mxc_register_device
(
&
mxc_keypad_device
,
&
mbimx51_map_data
);
imx51_add_imx_keypad
(
&
mbimx51_map_data
);
gpio_request
(
MBIMX51_TSC2007_GPIO
,
"tsc2007_irq"
);
gpio_request
(
MBIMX51_TSC2007_GPIO
,
"tsc2007_irq"
);
gpio_direction_input
(
MBIMX51_TSC2007_GPIO
);
gpio_direction_input
(
MBIMX51_TSC2007_GPIO
);
...
...
arch/arm/mach-mxs/Kconfig
View file @
0a831cec
...
@@ -15,7 +15,7 @@ comment "MXS platforms:"
...
@@ -15,7 +15,7 @@ comment "MXS platforms:"
config MACH_MX23EVK
config MACH_MX23EVK
bool "Support MX23EVK Platform"
bool "Support MX23EVK Platform"
select SOC_IMX23
select SOC_IMX23
select MXS_HAVE_
PLATFORM
_DUART
select MXS_HAVE_
AMBA
_DUART
default y
default y
help
help
Include support for MX23EVK platform. This includes specific
Include support for MX23EVK platform. This includes specific
...
@@ -24,7 +24,7 @@ config MACH_MX23EVK
...
@@ -24,7 +24,7 @@ config MACH_MX23EVK
config MACH_MX28EVK
config MACH_MX28EVK
bool "Support MX28EVK Platform"
bool "Support MX28EVK Platform"
select SOC_IMX28
select SOC_IMX28
select MXS_HAVE_
PLATFORM
_DUART
select MXS_HAVE_
AMBA
_DUART
select MXS_HAVE_PLATFORM_FEC
select MXS_HAVE_PLATFORM_FEC
default y
default y
help
help
...
...
arch/arm/mach-mxs/clock-mx23.c
View file @
0a831cec
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/jiffies.h>
#include <linux/clkdev.h>
#include <asm/clkdev.h>
#include <asm/clkdev.h>
#include <asm/div64.h>
#include <asm/div64.h>
...
@@ -437,10 +438,12 @@ _DEFINE_CLOCK(clk32k_clk, XTAL, TIMROT_CLK32K_GATE, &ref_xtal_clk);
...
@@ -437,10 +438,12 @@ _DEFINE_CLOCK(clk32k_clk, XTAL, TIMROT_CLK32K_GATE, &ref_xtal_clk);
},
},
static
struct
clk_lookup
lookups
[]
=
{
static
struct
clk_lookup
lookups
[]
=
{
_REGISTER_CLOCK
(
"mxs-duart.0"
,
NULL
,
uart_clk
)
/* for amba bus driver */
_REGISTER_CLOCK
(
"duart"
,
"apb_pclk"
,
xbus_clk
)
/* for amba-pl011 driver */
_REGISTER_CLOCK
(
"duart"
,
NULL
,
uart_clk
)
_REGISTER_CLOCK
(
"rtc"
,
NULL
,
rtc_clk
)
_REGISTER_CLOCK
(
"rtc"
,
NULL
,
rtc_clk
)
_REGISTER_CLOCK
(
NULL
,
"hclk"
,
hbus_clk
)
_REGISTER_CLOCK
(
NULL
,
"hclk"
,
hbus_clk
)
_REGISTER_CLOCK
(
NULL
,
"xclk"
,
xbus_clk
)
_REGISTER_CLOCK
(
NULL
,
"usb"
,
usb_clk
)
_REGISTER_CLOCK
(
NULL
,
"usb"
,
usb_clk
)
_REGISTER_CLOCK
(
NULL
,
"audio"
,
audio_clk
)
_REGISTER_CLOCK
(
NULL
,
"audio"
,
audio_clk
)
_REGISTER_CLOCK
(
NULL
,
"pwm"
,
pwm_clk
)
_REGISTER_CLOCK
(
NULL
,
"pwm"
,
pwm_clk
)
...
@@ -518,6 +521,12 @@ int __init mx23_clocks_init(void)
...
@@ -518,6 +521,12 @@ int __init mx23_clocks_init(void)
{
{
clk_misc_init
();
clk_misc_init
();
clk_enable
(
&
cpu_clk
);
clk_enable
(
&
hbus_clk
);
clk_enable
(
&
xbus_clk
);
clk_enable
(
&
emi_clk
);
clk_enable
(
&
uart_clk
);
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
mxs_timer_init
(
&
clk32k_clk
,
MX23_INT_TIMER0
);
mxs_timer_init
(
&
clk32k_clk
,
MX23_INT_TIMER0
);
...
...
arch/arm/mach-mxs/clock-mx28.c
View file @
0a831cec
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/jiffies.h>
#include <linux/clkdev.h>
#include <asm/clkdev.h>
#include <asm/clkdev.h>
#include <asm/div64.h>
#include <asm/div64.h>
...
@@ -602,7 +603,12 @@ _DEFINE_CLOCK(fec_clk, ENET, DISABLE, &hbus_clk);
...
@@ -602,7 +603,12 @@ _DEFINE_CLOCK(fec_clk, ENET, DISABLE, &hbus_clk);
},
},
static
struct
clk_lookup
lookups
[]
=
{
static
struct
clk_lookup
lookups
[]
=
{
_REGISTER_CLOCK
(
"mxs-duart.0"
,
NULL
,
uart_clk
)
/* for amba bus driver */
_REGISTER_CLOCK
(
"duart"
,
"apb_pclk"
,
xbus_clk
)
/* for amba-pl011 driver */
_REGISTER_CLOCK
(
"duart"
,
NULL
,
uart_clk
)
_REGISTER_CLOCK
(
"imx28-fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"imx28-fec.1"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"fec.0"
,
NULL
,
fec_clk
)
_REGISTER_CLOCK
(
"rtc"
,
NULL
,
rtc_clk
)
_REGISTER_CLOCK
(
"rtc"
,
NULL
,
rtc_clk
)
_REGISTER_CLOCK
(
"pll2"
,
NULL
,
pll2_clk
)
_REGISTER_CLOCK
(
"pll2"
,
NULL
,
pll2_clk
)
...
@@ -726,6 +732,12 @@ int __init mx28_clocks_init(void)
...
@@ -726,6 +732,12 @@ int __init mx28_clocks_init(void)
{
{
clk_misc_init
();
clk_misc_init
();
clk_enable
(
&
cpu_clk
);
clk_enable
(
&
hbus_clk
);
clk_enable
(
&
xbus_clk
);
clk_enable
(
&
emi_clk
);
clk_enable
(
&
uart_clk
);
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
mxs_timer_init
(
&
clk32k_clk
,
MX28_INT_TIMER0
);
mxs_timer_init
(
&
clk32k_clk
,
MX28_INT_TIMER0
);
...
...
arch/arm/mach-mxs/devices-mx23.h
View file @
0a831cec
...
@@ -11,6 +11,6 @@
...
@@ -11,6 +11,6 @@
#include <mach/mx23.h>
#include <mach/mx23.h>
#include <mach/devices-common.h>
#include <mach/devices-common.h>
extern
const
struct
mxs_duart_data
mx23_duart_data
__initconst
;
extern
const
struct
amba_device
mx23_duart_device
__initconst
;
#define mx23_add_duart() \
#define mx23_add_duart() \
mxs_add_duart(&mx23_duart_d
ata
)
mxs_add_duart(&mx23_duart_d
evice
)
arch/arm/mach-mxs/devices-mx28.h
View file @
0a831cec
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
#include <mach/mx28.h>
#include <mach/mx28.h>
#include <mach/devices-common.h>
#include <mach/devices-common.h>
extern
const
struct
mxs_duart_data
mx28_duart_data
__initconst
;
extern
const
struct
amba_device
mx28_duart_device
__initconst
;
#define mx28_add_duart() \
#define mx28_add_duart() \
mxs_add_duart(&mx28_duart_d
ata
)
mxs_add_duart(&mx28_duart_d
evice
)
extern
const
struct
mxs_fec_data
mx28_fec_data
[]
__initconst
;
extern
const
struct
mxs_fec_data
mx28_fec_data
[]
__initconst
;
#define mx28_add_fec(id, pdata) \
#define mx28_add_fec(id, pdata) \
...
...
arch/arm/mach-mxs/devices.c
View file @
0a831cec
...
@@ -19,9 +19,8 @@
...
@@ -19,9 +19,8 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <
mach/common
.h>
#include <
linux/amba/bus
.h>
struct
platform_device
*
__init
mxs_add_platform_device_dmamask
(
struct
platform_device
*
__init
mxs_add_platform_device_dmamask
(
const
char
*
name
,
int
id
,
const
char
*
name
,
int
id
,
...
@@ -73,3 +72,17 @@ struct platform_device *__init mxs_add_platform_device_dmamask(
...
@@ -73,3 +72,17 @@ struct platform_device *__init mxs_add_platform_device_dmamask(
return
pdev
;
return
pdev
;
}
}
int
__init
mxs_add_amba_device
(
const
struct
amba_device
*
dev
)
{
struct
amba_device
*
adev
=
kmalloc
(
sizeof
(
*
adev
),
GFP_KERNEL
);
if
(
!
adev
)
{
pr_err
(
"%s: failed to allocate memory"
,
__func__
);
return
-
ENOMEM
;
}
*
adev
=
*
dev
;
return
amba_device_register
(
adev
,
&
iomem_resource
);
}
arch/arm/mach-mxs/devices/Kconfig
View file @
0a831cec
config MXS_HAVE_
PLATFORM
_DUART
config MXS_HAVE_
AMBA
_DUART
bool
bool
select ARM_AMBA
config MXS_HAVE_PLATFORM_FEC
config MXS_HAVE_PLATFORM_FEC
bool
bool
arch/arm/mach-mxs/devices/Makefile
View file @
0a831cec
obj-$(CONFIG_MXS_HAVE_
PLATFORM_DUART)
+=
platform
-duart.o
obj-$(CONFIG_MXS_HAVE_
AMBA_DUART)
+=
amba
-duart.o
obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC)
+=
platform-fec.o
obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC)
+=
platform-fec.o
arch/arm/mach-mxs/devices/
platform
-duart.c
→
arch/arm/mach-mxs/devices/
amba
-duart.c
View file @
0a831cec
...
@@ -8,41 +8,33 @@
...
@@ -8,41 +8,33 @@
* the terms of the GNU General Public License version 2 as published by the
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
* Free Software Foundation.
*/
*/
#include <asm/irq.h>
#include <mach/mx23.h>
#include <mach/mx23.h>
#include <mach/mx28.h>
#include <mach/mx28.h>
#include <mach/devices-common.h>
#include <mach/devices-common.h>
#define mxs_duart_data_entry(soc) \
#define MXS_AMBA_DUART_DEVICE(name, soc) \
{ \
const struct amba_device name##_device __initconst = { \
.iobase = soc ## _DUART_BASE_ADDR, \
.dev = { \
.irq = soc ## _INT_DUART, \
.init_name = "duart", \
}
}, \
.res = { \
.start = soc ## _DUART_BASE_ADDR, \
.end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \
.flags = IORESOURCE_MEM, \
}, \
.irq = {soc ## _INT_DUART, NO_IRQ}, \
}
#ifdef CONFIG_SOC_IMX23
#ifdef CONFIG_SOC_IMX23
const
struct
mxs_duart_data
mx23_duart_data
__initconst
=
MXS_AMBA_DUART_DEVICE
(
mx23_duart
,
MX23
);
mxs_duart_data_entry
(
MX23
);
#endif
#endif
#ifdef CONFIG_SOC_IMX28
#ifdef CONFIG_SOC_IMX28
const
struct
mxs_duart_data
mx28_duart_data
__initconst
=
MXS_AMBA_DUART_DEVICE
(
mx28_duart
,
MX28
);
mxs_duart_data_entry
(
MX28
);
#endif
#endif
struct
platform_device
*
__init
mxs_add_duart
(
int
__init
mxs_add_duart
(
const
struct
amba_device
*
dev
)
const
struct
mxs_duart_data
*
data
)
{
{
struct
resource
res
[]
=
{
return
mxs_add_amba_device
(
dev
);
{
.
start
=
data
->
iobase
,
.
end
=
data
->
iobase
+
SZ_8K
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
irq
,
.
end
=
data
->
irq
,
.
flags
=
IORESOURCE_IRQ
,
},
};
return
mxs_add_platform_device
(
"mxs-duart"
,
0
,
res
,
ARRAY_SIZE
(
res
),
NULL
,
0
);
}
}
arch/arm/mach-mxs/devices/platform-fec.c
View file @
0a831cec
...
@@ -45,6 +45,6 @@ struct platform_device *__init mxs_add_fec(
...
@@ -45,6 +45,6 @@ struct platform_device *__init mxs_add_fec(
},
},
};
};
return
mxs_add_platform_device
(
"fec"
,
data
->
id
,
return
mxs_add_platform_device
(
"
imx28-
fec"
,
data
->
id
,
res
,
ARRAY_SIZE
(
res
),
pdata
,
sizeof
(
*
pdata
));
res
,
ARRAY_SIZE
(
res
),
pdata
,
sizeof
(
*
pdata
));
}
}
arch/arm/mach-mxs/include/mach/devices-common.h
View file @
0a831cec
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/amba/bus.h>
struct
platform_device
*
mxs_add_platform_device_dmamask
(
struct
platform_device
*
mxs_add_platform_device_dmamask
(
const
char
*
name
,
int
id
,
const
char
*
name
,
int
id
,
...
@@ -24,14 +25,10 @@ static inline struct platform_device *mxs_add_platform_device(
...
@@ -24,14 +25,10 @@ static inline struct platform_device *mxs_add_platform_device(
name
,
id
,
res
,
num_resources
,
data
,
size_data
,
0
);
name
,
id
,
res
,
num_resources
,
data
,
size_data
,
0
);
}
}
int
__init
mxs_add_amba_device
(
const
struct
amba_device
*
dev
);
/* duart */
/* duart */
struct
mxs_duart_data
{
int
__init
mxs_add_duart
(
const
struct
amba_device
*
dev
);
resource_size_t
iobase
;
resource_size_t
iosize
;
resource_size_t
irq
;
};
struct
platform_device
*
__init
mxs_add_duart
(
const
struct
mxs_duart_data
*
data
);
/* fec */
/* fec */
#include <linux/fec.h>
#include <linux/fec.h>
...
...
arch/arm/mach-mxs/mach-mx28evk.c
View file @
0a831cec
...
@@ -57,6 +57,19 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
...
@@ -57,6 +57,19 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
MX28_PAD_ENET_CLK__CLKCTRL_ENET
|
MX28_PAD_ENET_CLK__CLKCTRL_ENET
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
/* fec1 */
MX28_PAD_ENET0_CRS__ENET1_RX_EN
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
MX28_PAD_ENET0_RXD2__ENET1_RXD0
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
MX28_PAD_ENET0_RXD3__ENET1_RXD1
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
MX28_PAD_ENET0_COL__ENET1_TX_EN
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
MX28_PAD_ENET0_TXD2__ENET1_TXD0
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
MX28_PAD_ENET0_TXD3__ENET1_TXD1
|
(
MXS_PAD_8MA
|
MXS_PAD_3V3
|
MXS_PAD_PULLUP
),
/* phy power line */
/* phy power line */
MX28_PAD_SSP1_DATA3__GPIO_2_15
|
MX28_PAD_SSP1_DATA3__GPIO_2_15
|
(
MXS_PAD_4MA
|
MXS_PAD_3V3
|
MXS_PAD_NOPULL
),
(
MXS_PAD_4MA
|
MXS_PAD_3V3
|
MXS_PAD_NOPULL
),
...
@@ -106,8 +119,14 @@ static void __init mx28evk_fec_reset(void)
...
@@ -106,8 +119,14 @@ static void __init mx28evk_fec_reset(void)
gpio_set_value
(
MX28EVK_FEC_PHY_RESET
,
1
);
gpio_set_value
(
MX28EVK_FEC_PHY_RESET
,
1
);
}
}
static
const
struct
fec_platform_data
mx28_fec_pdata
__initconst
=
{
static
struct
fec_platform_data
mx28_fec_pdata
[]
=
{
{
/* fec0 */
.
phy
=
PHY_INTERFACE_MODE_RMII
,
},
{
/* fec1 */
.
phy
=
PHY_INTERFACE_MODE_RMII
,
.
phy
=
PHY_INTERFACE_MODE_RMII
,
},
};
};
static
void
__init
mx28evk_init
(
void
)
static
void
__init
mx28evk_init
(
void
)
...
@@ -117,7 +136,8 @@ static void __init mx28evk_init(void)
...
@@ -117,7 +136,8 @@ static void __init mx28evk_init(void)
mx28_add_duart
();
mx28_add_duart
();
mx28evk_fec_reset
();
mx28evk_fec_reset
();
mx28_add_fec
(
0
,
&
mx28_fec_pdata
);
mx28_add_fec
(
0
,
&
mx28_fec_pdata
[
0
]);
mx28_add_fec
(
1
,
&
mx28_fec_pdata
[
1
]);
}
}
static
void
__init
mx28evk_timer_init
(
void
)
static
void
__init
mx28evk_timer_init
(
void
)
...
...
arch/arm/plat-mxc/devices/Kconfig
View file @
0a831cec
config IMX_HAVE_PLATFORM_FEC
config IMX_HAVE_PLATFORM_FEC
bool
bool
default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51
default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51
|| SOC_IMX53
config IMX_HAVE_PLATFORM_FLEXCAN
config IMX_HAVE_PLATFORM_FLEXCAN
select HAVE_CAN_FLEXCAN if CAN
select HAVE_CAN_FLEXCAN if CAN
...
...
arch/arm/plat-mxc/devices/platform-fec.c
View file @
0a831cec
...
@@ -36,6 +36,11 @@ const struct imx_fec_data imx51_fec_data __initconst =
...
@@ -36,6 +36,11 @@ const struct imx_fec_data imx51_fec_data __initconst =
imx_fec_data_entry_single
(
MX51
);
imx_fec_data_entry_single
(
MX51
);
#endif
#endif
#ifdef CONFIG_SOC_IMX53
const
struct
imx_fec_data
imx53_fec_data
__initconst
=
imx_fec_data_entry_single
(
MX53
);
#endif
struct
platform_device
*
__init
imx_add_fec
(
struct
platform_device
*
__init
imx_add_fec
(
const
struct
imx_fec_data
*
data
,
const
struct
imx_fec_data
*
data
,
const
struct
fec_platform_data
*
pdata
)
const
struct
fec_platform_data
*
pdata
)
...
...
arch/arm/plat-mxc/devices/platform-imx-i2c.c
View file @
0a831cec
...
@@ -78,6 +78,15 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
...
@@ -78,6 +78,15 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
};
};
#endif
/* ifdef CONFIG_SOC_IMX51 */
#endif
/* ifdef CONFIG_SOC_IMX51 */
#ifdef CONFIG_SOC_IMX53
const
struct
imx_imx_i2c_data
imx53_imx_i2c_data
[]
__initconst
=
{
#define imx53_imx_i2c_data_entry(_id, _hwid) \
imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K)
imx53_imx_i2c_data_entry
(
0
,
1
),
imx53_imx_i2c_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_SOC_IMX51 */
struct
platform_device
*
__init
imx_add_imx_i2c
(
struct
platform_device
*
__init
imx_add_imx_i2c
(
const
struct
imx_imx_i2c_data
*
data
,
const
struct
imx_imx_i2c_data
*
data
,
const
struct
imxi2c_platform_data
*
pdata
)
const
struct
imxi2c_platform_data
*
pdata
)
...
...
arch/arm/plat-mxc/devices/platform-imx-keypad.c
View file @
0a831cec
...
@@ -41,6 +41,11 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
...
@@ -41,6 +41,11 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
imx_imx_keypad_data_entry_single
(
MX35
,
SZ_16
);
imx_imx_keypad_data_entry_single
(
MX35
,
SZ_16
);
#endif
/* ifdef CONFIG_SOC_IMX35 */
#endif
/* ifdef CONFIG_SOC_IMX35 */
#ifdef CONFIG_SOC_IMX51
const
struct
imx_imx_keypad_data
imx51_imx_keypad_data
__initconst
=
imx_imx_keypad_data_entry_single
(
MX51
,
SZ_16
);
#endif
/* ifdef CONFIG_SOC_IMX51 */
struct
platform_device
*
__init
imx_add_imx_keypad
(
struct
platform_device
*
__init
imx_add_imx_keypad
(
const
struct
imx_imx_keypad_data
*
data
,
const
struct
imx_imx_keypad_data
*
data
,
const
struct
matrix_keymap_data
*
pdata
)
const
struct
matrix_keymap_data
*
pdata
)
...
...
arch/arm/plat-mxc/devices/platform-mxc_pwm.c
View file @
0a831cec
...
@@ -40,6 +40,15 @@ const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
...
@@ -40,6 +40,15 @@ const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
imx_mxc_pwm_data_entry_single
(
MX27
,
0
,
,
SZ_4K
);
imx_mxc_pwm_data_entry_single
(
MX27
,
0
,
,
SZ_4K
);
#endif
/* ifdef CONFIG_SOC_IMX27 */
#endif
/* ifdef CONFIG_SOC_IMX27 */
#ifdef CONFIG_SOC_IMX51
const
struct
imx_mxc_pwm_data
imx51_mxc_pwm_data
[]
__initconst
=
{
#define imx51_mxc_pwm_data_entry(_id, _hwid) \
imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K)
imx51_mxc_pwm_data_entry
(
0
,
1
),
imx51_mxc_pwm_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_SOC_IMX51 */
struct
platform_device
*
__init
imx_add_mxc_pwm
(
struct
platform_device
*
__init
imx_add_mxc_pwm
(
const
struct
imx_mxc_pwm_data
*
data
)
const
struct
imx_mxc_pwm_data
*
data
)
{
{
...
...
arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
View file @
0a831cec
...
@@ -53,6 +53,18 @@ imx51_sdhci_esdhc_imx_data[] __initconst = {
...
@@ -53,6 +53,18 @@ imx51_sdhci_esdhc_imx_data[] __initconst = {
};
};
#endif
/* ifdef CONFIG_SOC_IMX51 */
#endif
/* ifdef CONFIG_SOC_IMX51 */
#ifdef CONFIG_SOC_IMX53
const
struct
imx_sdhci_esdhc_imx_data
imx53_sdhci_esdhc_imx_data
[]
__initconst
=
{
#define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \
imx_sdhci_esdhc_imx_data_entry(MX53, _id, _hwid)
imx53_sdhci_esdhc_imx_data_entry
(
0
,
1
),
imx53_sdhci_esdhc_imx_data_entry
(
1
,
2
),
imx53_sdhci_esdhc_imx_data_entry
(
2
,
3
),
imx53_sdhci_esdhc_imx_data_entry
(
3
,
4
),
};
#endif
/* ifdef CONFIG_SOC_IMX53 */
struct
platform_device
*
__init
imx_add_sdhci_esdhc_imx
(
struct
platform_device
*
__init
imx_add_sdhci_esdhc_imx
(
const
struct
imx_sdhci_esdhc_imx_data
*
data
,
const
struct
imx_sdhci_esdhc_imx_data
*
data
,
const
struct
esdhc_platform_data
*
pdata
)
const
struct
esdhc_platform_data
*
pdata
)
...
...
arch/arm/plat-mxc/devices/platform-spi_imx.c
View file @
0a831cec
...
@@ -81,6 +81,18 @@ const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
...
@@ -81,6 +81,18 @@ const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
};
};
#endif
/* ifdef CONFIG_SOC_IMX51 */
#endif
/* ifdef CONFIG_SOC_IMX51 */
#ifdef CONFIG_SOC_IMX53
const
struct
imx_spi_imx_data
imx53_cspi_data
__initconst
=
imx_spi_imx_data_entry_single
(
MX53
,
CSPI
,
"imx53-cspi"
,
0
,
,
SZ_4K
);
const
struct
imx_spi_imx_data
imx53_ecspi_data
[]
__initconst
=
{
#define imx53_ecspi_data_entry(_id, _hwid) \
imx_spi_imx_data_entry(MX53, ECSPI, "imx53-ecspi", _id, _hwid, SZ_4K)
imx53_ecspi_data_entry
(
0
,
1
),
imx53_ecspi_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_SOC_IMX53 */
struct
platform_device
*
__init
imx_add_spi_imx
(
struct
platform_device
*
__init
imx_add_spi_imx
(
const
struct
imx_spi_imx_data
*
data
,
const
struct
imx_spi_imx_data
*
data
,
const
struct
spi_imx_master
*
pdata
)
const
struct
spi_imx_master
*
pdata
)
...
...
arch/arm/plat-mxc/include/mach/iomux-mx53.h
View file @
0a831cec
...
@@ -34,7 +34,6 @@ typedef enum iomux_config {
...
@@ -34,7 +34,6 @@ typedef enum iomux_config {
IOMUX_CONFIG_ALT6
,
IOMUX_CONFIG_ALT6
,
IOMUX_CONFIG_ALT7
,
IOMUX_CONFIG_ALT7
,
IOMUX_CONFIG_GPIO
,
/* added to help user use GPIO mode */
IOMUX_CONFIG_GPIO
,
/* added to help user use GPIO mode */
IOMUX_CONFIG_SION
=
0x1
<<
4
,
/* LOOPBACK:MUX SION bit */
}
iomux_pin_cfg_t
;
}
iomux_pin_cfg_t
;
/* These 2 defines are for pins that may not have a mux register, but could
/* These 2 defines are for pins that may not have a mux register, but could
...
@@ -135,6 +134,9 @@ typedef enum iomux_config {
...
@@ -135,6 +134,9 @@ typedef enum iomux_config {
#define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D16__CSPI1_SCLK IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT4, 0x79c, 3, NO_PAD_CTRL)
#define MX53_PAD_EIM_D17__CSPI1_MISO IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT4, 0x7a0, 3, NO_PAD_CTRL)
#define MX53_PAD_EIM_D18__CSPI1_MOSI IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT4, 0x7a4, 3, NO_PAD_CTRL)
#define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
#define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
...
...
arch/arm/plat-mxc/include/mach/iomux-v3.h
View file @
0a831cec
...
@@ -105,6 +105,7 @@ typedef u64 iomux_v3_cfg_t;
...
@@ -105,6 +105,7 @@ typedef u64 iomux_v3_cfg_t;
#define PAD_CTL_SRE_FAST (1 << 0)
#define PAD_CTL_SRE_FAST (1 << 0)
#define PAD_CTL_SRE_SLOW (0 << 0)
#define PAD_CTL_SRE_SLOW (0 << 0)
#define IOMUX_CONFIG_SION (0x1 << 4)
#define MX51_NUM_GPIO_PORT 4
#define MX51_NUM_GPIO_PORT 4
...
...
arch/arm/plat-mxc/include/mach/mx51.h
View file @
0a831cec
...
@@ -301,8 +301,8 @@
...
@@ -301,8 +301,8 @@
#define MX51_MXC_INT_GPIO4_HIGH 57
#define MX51_MXC_INT_GPIO4_HIGH 57
#define MX51_MXC_INT_WDOG1 58
#define MX51_MXC_INT_WDOG1 58
#define MX51_MXC_INT_WDOG2 59
#define MX51_MXC_INT_WDOG2 59
#define MX51_
MXC_INT_KPP
60
#define MX51_
INT_KPP
60
#define MX51_
MXC_INT_PWM1
61
#define MX51_
INT_PWM1
61
#define MX51_INT_I2C1 62
#define MX51_INT_I2C1 62
#define MX51_INT_I2C2 63
#define MX51_INT_I2C2 63
#define MX51_MXC_INT_HS_I2C 64
#define MX51_MXC_INT_HS_I2C 64
...
@@ -335,7 +335,7 @@
...
@@ -335,7 +335,7 @@
#define MX51_MXC_INT_SPDIF 91
#define MX51_MXC_INT_SPDIF 91
#define MX51_MXC_INT_TVE 92
#define MX51_MXC_INT_TVE 92
#define MX51_MXC_INT_FIRI 93
#define MX51_MXC_INT_FIRI 93
#define MX51_
MXC_INT_PWM2
94
#define MX51_
INT_PWM2
94
#define MX51_MXC_INT_SLIM_EXP 95
#define MX51_MXC_INT_SLIM_EXP 95
#define MX51_INT_SSI3 96
#define MX51_INT_SSI3 96
#define MX51_MXC_INT_EMI_BOOT 97
#define MX51_MXC_INT_EMI_BOOT 97
...
...
arch/arm/plat-mxc/include/mach/mx53.h
View file @
0a831cec
...
@@ -53,13 +53,13 @@
...
@@ -53,13 +53,13 @@
#define MX53_SPBA0_BASE_ADDR 0x50000000
#define MX53_SPBA0_BASE_ADDR 0x50000000
#define MX53_SPBA0_SIZE SZ_1M
#define MX53_SPBA0_SIZE SZ_1M
#define MX53_
MMC_
SDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000)
#define MX53_
E
SDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000)
#define MX53_
MMC_
SDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000)
#define MX53_
E
SDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000)
#define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000)
#define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000)
#define MX53_CSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000)
#define MX53_
E
CSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000)
#define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000)
#define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000)
#define MX53_
MMC_
SDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000)
#define MX53_
E
SDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000)
#define MX53_
MMC_
SDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000)
#define MX53_
E
SDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000)
#define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000)
#define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000)
#define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000)
#define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000)
#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000)
#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000)
...
@@ -117,12 +117,12 @@
...
@@ -117,12 +117,12 @@
#define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000)
#define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000)
#define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000)
#define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000)
#define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000)
#define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000)
#define MX53_CSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000)
#define MX53_
E
CSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000)
#define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000)
#define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000)
#define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000)
#define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000)
#define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000)
#define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000)
#define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000)
#define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000)
#define MX53_CSPI
3
_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000)
#define MX53_CSPI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000)
#define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000)
#define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000)
#define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000)
#define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000)
#define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000)
#define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000)
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
#define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000)
#define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000)
#define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000)
#define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000)
#define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000)
#define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000)
#define MX53_
MXC_
FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000)
#define MX53_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000)
#define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000)
#define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000)
#define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000)
#define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000)
#define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000)
#define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000)
...
@@ -229,10 +229,10 @@
...
@@ -229,10 +229,10 @@
* Interrupt numbers
* Interrupt numbers
*/
*/
#define MX53_INT_RESV0 0
#define MX53_INT_RESV0 0
#define MX53_INT_
MMC_
SDHC1 1
#define MX53_INT_
E
SDHC1 1
#define MX53_INT_
MMC_
SDHC2 2
#define MX53_INT_
E
SDHC2 2
#define MX53_INT_
MMC_
SDHC3 3
#define MX53_INT_
E
SDHC3 3
#define MX53_INT_
MMC_
SDHC4 4
#define MX53_INT_
E
SDHC4 4
#define MX53_INT_RESV5 5
#define MX53_INT_RESV5 5
#define MX53_INT_SDMA 6
#define MX53_INT_SDMA 6
#define MX53_INT_IOMUX 7
#define MX53_INT_IOMUX 7
...
@@ -264,8 +264,8 @@
...
@@ -264,8 +264,8 @@
#define MX53_INT_UART3 33
#define MX53_INT_UART3 33
#define MX53_INT_RESV34 34
#define MX53_INT_RESV34 34
#define MX53_INT_RESV35 35
#define MX53_INT_RESV35 35
#define MX53_INT_CSPI1 36
#define MX53_INT_
E
CSPI1 36
#define MX53_INT_CSPI2 37
#define MX53_INT_
E
CSPI2 37
#define MX53_INT_CSPI 38
#define MX53_INT_CSPI 38
#define MX53_INT_GPT 39
#define MX53_INT_GPT 39
#define MX53_INT_EPIT1 40
#define MX53_INT_EPIT1 40
...
...
arch/arm/plat-mxc/pwm.c
View file @
0a831cec
...
@@ -57,7 +57,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
...
@@ -57,7 +57,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
if
(
pwm
==
NULL
||
period_ns
==
0
||
duty_ns
>
period_ns
)
if
(
pwm
==
NULL
||
period_ns
==
0
||
duty_ns
>
period_ns
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
cpu_is_mx27
()
||
cpu_is_mx3
()
||
cpu_is_mx25
())
{
if
(
cpu_is_mx27
()
||
cpu_is_mx3
()
||
cpu_is_mx25
()
||
cpu_is_mx51
()
)
{
unsigned
long
long
c
;
unsigned
long
long
c
;
unsigned
long
period_cycles
,
duty_cycles
,
prescale
;
unsigned
long
period_cycles
,
duty_cycles
,
prescale
;
u32
cr
;
u32
cr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment