Commit 4a9226a3 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge branch 'imx/cpuidle' into late/dt

This resolves one non-obvious merge conflict between the imx cpuidle
patches and the imx DT changes for 3.9.

Conflicts:
	arch/arm/mach-imx/mach-imx6q.c
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 7839c281 e5f9dec8
...@@ -219,12 +219,12 @@ choice ...@@ -219,12 +219,12 @@ choice
Say Y here if you want kernel low-level debugging support Say Y here if you want kernel low-level debugging support
on i.MX51. on i.MX51.
config DEBUG_IMX50_IMX53_UART config DEBUG_IMX53_UART
bool "i.MX50 and i.MX53 Debug UART" bool "i.MX53 Debug UART"
depends on SOC_IMX50 || SOC_IMX53 depends on SOC_IMX53
help help
Say Y here if you want kernel low-level debugging support Say Y here if you want kernel low-level debugging support
on i.MX50 or i.MX53. on i.MX53.
config DEBUG_IMX6Q_UART config DEBUG_IMX6Q_UART
bool "i.MX6Q Debug UART" bool "i.MX6Q Debug UART"
...@@ -497,7 +497,7 @@ config DEBUG_LL_INCLUDE ...@@ -497,7 +497,7 @@ config DEBUG_LL_INCLUDE
DEBUG_IMX21_IMX27_UART || \ DEBUG_IMX21_IMX27_UART || \
DEBUG_IMX31_IMX35_UART || \ DEBUG_IMX31_IMX35_UART || \
DEBUG_IMX51_UART || \ DEBUG_IMX51_UART || \
DEBUG_IMX50_IMX53_UART ||\ DEBUG_IMX53_UART ||\
DEBUG_IMX6Q_UART DEBUG_IMX6Q_UART
default "debug/highbank.S" if DEBUG_HIGHBANK_UART default "debug/highbank.S" if DEBUG_HIGHBANK_UART
default "debug/mvebu.S" if DEBUG_MVEBU_UART default "debug/mvebu.S" if DEBUG_MVEBU_UART
......
...@@ -32,7 +32,6 @@ CONFIG_MACH_PCM043=y ...@@ -32,7 +32,6 @@ CONFIG_MACH_PCM043=y
CONFIG_MACH_MX35_3DS=y CONFIG_MACH_MX35_3DS=y
CONFIG_MACH_VPR200=y CONFIG_MACH_VPR200=y
CONFIG_MACH_IMX51_DT=y CONFIG_MACH_IMX51_DT=y
CONFIG_MACH_MX51_3DS=y
CONFIG_MACH_EUKREA_CPUIMX51SD=y CONFIG_MACH_EUKREA_CPUIMX51SD=y
CONFIG_SOC_IMX53=y CONFIG_SOC_IMX53=y
CONFIG_SOC_IMX6Q=y CONFIG_SOC_IMX6Q=y
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define UART_PADDR 0x43f90000 #define UART_PADDR 0x43f90000
#elif defined (CONFIG_DEBUG_IMX51_UART) #elif defined (CONFIG_DEBUG_IMX51_UART)
#define UART_PADDR 0x73fbc000 #define UART_PADDR 0x73fbc000
#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) #elif defined (CONFIG_DEBUG_IMX53_UART)
#define UART_PADDR 0x53fbc000 #define UART_PADDR 0x53fbc000
#elif defined (CONFIG_DEBUG_IMX6Q_UART) #elif defined (CONFIG_DEBUG_IMX6Q_UART)
#define UART_PADDR IMX6Q_DEBUG_UART_BASE #define UART_PADDR IMX6Q_DEBUG_UART_BASE
......
...@@ -95,9 +95,6 @@ config MACH_MX27 ...@@ -95,9 +95,6 @@ config MACH_MX27
config ARCH_MX5 config ARCH_MX5
bool bool
config ARCH_MX50
bool
config ARCH_MX51 config ARCH_MX51
bool bool
...@@ -164,11 +161,6 @@ config SOC_IMX5 ...@@ -164,11 +161,6 @@ config SOC_IMX5
select CPU_V7 select CPU_V7
select MXC_TZIC select MXC_TZIC
config SOC_IMX50
bool
select ARCH_MX50
select SOC_IMX5
config SOC_IMX51 config SOC_IMX51
bool bool
select ARCH_MX5 select ARCH_MX5
...@@ -738,25 +730,10 @@ endif ...@@ -738,25 +730,10 @@ endif
if ARCH_MULTI_V7 if ARCH_MULTI_V7
comment "i.MX5 platforms:"
config MACH_MX50_RDP
bool "Support MX50 reference design platform"
depends on BROKEN
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX
select SOC_IMX50
help
Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals.
comment "i.MX51 machines:" comment "i.MX51 machines:"
config MACH_IMX51_DT config MACH_IMX51_DT
bool "Support i.MX51 platforms from device tree" bool "Support i.MX51 platforms from device tree"
select MACH_MX51_BABBAGE
select SOC_IMX51 select SOC_IMX51
help help
Include support for Freescale i.MX51 based platforms Include support for Freescale i.MX51 based platforms
...@@ -777,19 +754,6 @@ config MACH_MX51_BABBAGE ...@@ -777,19 +754,6 @@ config MACH_MX51_BABBAGE
u-boot. This includes specific configurations for the board and its u-boot. This includes specific configurations for the board and its
peripherals. peripherals.
config MACH_MX51_3DS
bool "Support MX51PDK (3DS)"
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_DEBUG_BOARD
select SOC_IMX51
help
Include support for MX51PDK (3DS) platform. This includes specific
configurations for the board and its peripherals.
config MACH_EUKREA_CPUIMX51SD config MACH_EUKREA_CPUIMX51SD
bool "Support Eukrea CPUIMX51SD module" bool "Support Eukrea CPUIMX51SD module"
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
......
...@@ -28,7 +28,11 @@ obj-$(CONFIG_MXC_ULPI) += ulpi.o ...@@ -28,7 +28,11 @@ obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o
obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
ifeq ($(CONFIG_CPU_IDLE),y)
obj-y += cpuidle.o
obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o
endif
ifdef CONFIG_SND_IMX_SOC ifdef CONFIG_SND_IMX_SOC
obj-y += ssi-fiq.o obj-y += ssi-fiq.o
...@@ -88,7 +92,6 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o ...@@ -88,7 +92,6 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
obj-$(CONFIG_DEBUG_LL) += lluart.o
obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
obj-$(CONFIG_HAVE_IMX_SRC) += src.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o
...@@ -103,10 +106,8 @@ endif ...@@ -103,10 +106,8 @@ endif
# i.MX5 based machines # i.MX5 based machines
obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o
obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
obj-$(CONFIG_SOC_IMX53) += mach-imx53.o obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
......
...@@ -22,10 +22,6 @@ zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000 ...@@ -22,10 +22,6 @@ zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000
params_phys-$(CONFIG_SOC_IMX35) := 0x80000100 params_phys-$(CONFIG_SOC_IMX35) := 0x80000100
initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000 initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000
zreladdr-$(CONFIG_SOC_IMX50) += 0x70008000
params_phys-$(CONFIG_SOC_IMX50) := 0x70000100
initrd_phys-$(CONFIG_SOC_IMX50) := 0x70800000
zreladdr-$(CONFIG_SOC_IMX51) += 0x90008000 zreladdr-$(CONFIG_SOC_IMX51) += 0x90008000
params_phys-$(CONFIG_SOC_IMX51) := 0x90000100 params_phys-$(CONFIG_SOC_IMX51) := 0x90000100
initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000 initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000
......
...@@ -54,9 +54,18 @@ ...@@ -54,9 +54,18 @@
#define BM_CLPCR_MASK_SCU_IDLE (0x1 << 26) #define BM_CLPCR_MASK_SCU_IDLE (0x1 << 26)
#define BM_CLPCR_MASK_L2CC_IDLE (0x1 << 27) #define BM_CLPCR_MASK_L2CC_IDLE (0x1 << 27)
#define CGPR 0x64
#define BM_CGPR_CHICKEN_BIT (0x1 << 17)
static void __iomem *ccm_base; static void __iomem *ccm_base;
void __init imx6q_clock_map_io(void) { } void imx6q_set_chicken_bit(void)
{
u32 val = readl_relaxed(ccm_base + CGPR);
val |= BM_CGPR_CHICKEN_BIT;
writel_relaxed(val, ccm_base + CGPR);
}
int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
{ {
...@@ -68,6 +77,7 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) ...@@ -68,6 +77,7 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
break; break;
case WAIT_UNCLOCKED: case WAIT_UNCLOCKED:
val |= 0x1 << BP_CLPCR_LPM; val |= 0x1 << BP_CLPCR_LPM;
val |= BM_CLPCR_ARM_CLK_DIS_ON_LPM;
break; break;
case STOP_POWER_ON: case STOP_POWER_ON:
val |= 0x2 << BP_CLPCR_LPM; val |= 0x2 << BP_CLPCR_LPM;
......
...@@ -21,7 +21,6 @@ extern void mx25_map_io(void); ...@@ -21,7 +21,6 @@ extern void mx25_map_io(void);
extern void mx27_map_io(void); extern void mx27_map_io(void);
extern void mx31_map_io(void); extern void mx31_map_io(void);
extern void mx35_map_io(void); extern void mx35_map_io(void);
extern void mx50_map_io(void);
extern void mx51_map_io(void); extern void mx51_map_io(void);
extern void mx53_map_io(void); extern void mx53_map_io(void);
extern void imx1_init_early(void); extern void imx1_init_early(void);
...@@ -30,7 +29,6 @@ extern void imx25_init_early(void); ...@@ -30,7 +29,6 @@ extern void imx25_init_early(void);
extern void imx27_init_early(void); extern void imx27_init_early(void);
extern void imx31_init_early(void); extern void imx31_init_early(void);
extern void imx35_init_early(void); extern void imx35_init_early(void);
extern void imx50_init_early(void);
extern void imx51_init_early(void); extern void imx51_init_early(void);
extern void imx53_init_early(void); extern void imx53_init_early(void);
extern void mxc_init_irq(void __iomem *); extern void mxc_init_irq(void __iomem *);
...@@ -41,7 +39,6 @@ extern void mx25_init_irq(void); ...@@ -41,7 +39,6 @@ extern void mx25_init_irq(void);
extern void mx27_init_irq(void); extern void mx27_init_irq(void);
extern void mx31_init_irq(void); extern void mx31_init_irq(void);
extern void mx35_init_irq(void); extern void mx35_init_irq(void);
extern void mx50_init_irq(void);
extern void mx51_init_irq(void); extern void mx51_init_irq(void);
extern void mx53_init_irq(void); extern void mx53_init_irq(void);
extern void imx1_soc_init(void); extern void imx1_soc_init(void);
...@@ -50,7 +47,6 @@ extern void imx25_soc_init(void); ...@@ -50,7 +47,6 @@ extern void imx25_soc_init(void);
extern void imx27_soc_init(void); extern void imx27_soc_init(void);
extern void imx31_soc_init(void); extern void imx31_soc_init(void);
extern void imx35_soc_init(void); extern void imx35_soc_init(void);
extern void imx50_soc_init(void);
extern void imx51_soc_init(void); extern void imx51_soc_init(void);
extern void imx51_init_late(void); extern void imx51_init_late(void);
extern void imx53_init_late(void); extern void imx53_init_late(void);
...@@ -109,27 +105,23 @@ void tzic_handle_irq(struct pt_regs *); ...@@ -109,27 +105,23 @@ void tzic_handle_irq(struct pt_regs *);
#define imx27_handle_irq avic_handle_irq #define imx27_handle_irq avic_handle_irq
#define imx31_handle_irq avic_handle_irq #define imx31_handle_irq avic_handle_irq
#define imx35_handle_irq avic_handle_irq #define imx35_handle_irq avic_handle_irq
#define imx50_handle_irq tzic_handle_irq
#define imx51_handle_irq tzic_handle_irq #define imx51_handle_irq tzic_handle_irq
#define imx53_handle_irq tzic_handle_irq #define imx53_handle_irq tzic_handle_irq
#define imx6q_handle_irq gic_handle_irq #define imx6q_handle_irq gic_handle_irq
extern void imx_enable_cpu(int cpu, bool enable); extern void imx_enable_cpu(int cpu, bool enable);
extern void imx_set_cpu_jump(int cpu, void *jump_addr); extern void imx_set_cpu_jump(int cpu, void *jump_addr);
#ifdef CONFIG_DEBUG_LL
extern void imx_lluart_map_io(void);
#else
static inline void imx_lluart_map_io(void) {}
#endif
extern void v7_cpu_resume(void); extern void v7_cpu_resume(void);
extern u32 *pl310_get_save_ptr(void); extern u32 *pl310_get_save_ptr(void);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern void v7_secondary_startup(void); extern void v7_secondary_startup(void);
extern void imx_scu_map_io(void); extern void imx_scu_map_io(void);
extern void imx_smp_prepare(void); extern void imx_smp_prepare(void);
extern void imx_scu_standby_enable(void);
#else #else
static inline void imx_scu_map_io(void) {} static inline void imx_scu_map_io(void) {}
static inline void imx_smp_prepare(void) {} static inline void imx_smp_prepare(void) {}
static inline void imx_scu_standby_enable(void) {}
#endif #endif
extern void imx_enable_cpu(int cpu, bool enable); extern void imx_enable_cpu(int cpu, bool enable);
extern void imx_set_cpu_jump(int cpu, void *jump_addr); extern void imx_set_cpu_jump(int cpu, void *jump_addr);
...@@ -139,7 +131,7 @@ extern void imx_gpc_init(void); ...@@ -139,7 +131,7 @@ extern void imx_gpc_init(void);
extern void imx_gpc_pre_suspend(void); extern void imx_gpc_pre_suspend(void);
extern void imx_gpc_post_resume(void); extern void imx_gpc_post_resume(void);
extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
extern void imx6q_clock_map_io(void); extern void imx6q_set_chicken_bit(void);
extern void imx_cpu_die(unsigned int cpu); extern void imx_cpu_die(unsigned int cpu);
extern int imx_cpu_kill(unsigned int cpu); extern int imx_cpu_kill(unsigned int cpu);
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
static int mx5_cpu_rev = -1; static int mx5_cpu_rev = -1;
#define IIM_SREV 0x24 #define IIM_SREV 0x24
#define MX50_HW_ADADIG_DIGPROG 0xB0
static int get_mx51_srev(void) static int get_mx51_srev(void)
{ {
...@@ -108,41 +107,3 @@ int mx53_revision(void) ...@@ -108,41 +107,3 @@ int mx53_revision(void)
return mx5_cpu_rev; return mx5_cpu_rev;
} }
EXPORT_SYMBOL(mx53_revision); EXPORT_SYMBOL(mx53_revision);
static int get_mx50_srev(void)
{
void __iomem *anatop = ioremap(MX50_ANATOP_BASE_ADDR, SZ_8K);
u32 rev;
if (!anatop) {
mx5_cpu_rev = -EINVAL;
return 0;
}
rev = readl(anatop + MX50_HW_ADADIG_DIGPROG);
rev &= 0xff;
iounmap(anatop);
if (rev == 0x0)
return IMX_CHIP_REVISION_1_0;
else if (rev == 0x1)
return IMX_CHIP_REVISION_1_1;
return 0;
}
/*
* Returns:
* the silicon revision of the cpu
* -EINVAL - not a mx50
*/
int mx50_revision(void)
{
if (!cpu_is_mx50())
return -EINVAL;
if (mx5_cpu_rev == -1)
mx5_cpu_rev = get_mx50_srev();
return mx5_cpu_rev;
}
EXPORT_SYMBOL(mx50_revision);
/*
* Copyright (C) 2012 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/clockchips.h>
#include <linux/cpuidle.h>
#include <linux/module.h>
#include <asm/cpuidle.h>
#include <asm/proc-fns.h>
#include "common.h"
#include "cpuidle.h"
static atomic_t master = ATOMIC_INIT(0);
static DEFINE_SPINLOCK(master_lock);
static int imx6q_enter_wait(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
int cpu = dev->cpu;
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
if (atomic_inc_return(&master) == num_online_cpus()) {
/*
* With this lock, we prevent other cpu to exit and enter
* this function again and become the master.
*/
if (!spin_trylock(&master_lock))
goto idle;
imx6q_set_lpm(WAIT_UNCLOCKED);
cpu_do_idle();
imx6q_set_lpm(WAIT_CLOCKED);
spin_unlock(&master_lock);
goto done;
}
idle:
cpu_do_idle();
done:
atomic_dec(&master);
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
return index;
}
/*
* For each cpu, setup the broadcast timer because local timer
* stops for the states other than WFI.
*/
static void imx6q_setup_broadcast_timer(void *arg)
{
int cpu = smp_processor_id();
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
}
static struct cpuidle_driver imx6q_cpuidle_driver = {
.name = "imx6q_cpuidle",
.owner = THIS_MODULE,
.en_core_tk_irqen = 1,
.states = {
/* WFI */
ARM_CPUIDLE_WFI_STATE,
/* WAIT */
{
.exit_latency = 50,
.target_residency = 75,
.flags = CPUIDLE_FLAG_TIME_VALID,
.enter = imx6q_enter_wait,
.name = "WAIT",
.desc = "Clock off",
},
},
.state_count = 2,
.safe_state_index = 0,
};
int __init imx6q_cpuidle_init(void)
{
/* Need to enable SCU standby for entering WAIT modes */
imx_scu_standby_enable();
/* Set chicken bit to get a reliable WAIT mode support */
imx6q_set_chicken_bit();
/* Configure the broadcast timer on each cpu */
on_each_cpu(imx6q_setup_broadcast_timer, NULL, 1);
return imx_cpuidle_init(&imx6q_cpuidle_driver);
}
...@@ -14,9 +14,14 @@ ...@@ -14,9 +14,14 @@
#ifdef CONFIG_CPU_IDLE #ifdef CONFIG_CPU_IDLE
extern int imx_cpuidle_init(struct cpuidle_driver *drv); extern int imx_cpuidle_init(struct cpuidle_driver *drv);
extern int imx6q_cpuidle_init(void);
#else #else
static inline int imx_cpuidle_init(struct cpuidle_driver *drv) static inline int imx_cpuidle_init(struct cpuidle_driver *drv)
{ {
return -ENODEV; return -ENODEV;
} }
static inline int imx6q_cpuidle_init(void)
{
return -ENODEV;
}
#endif #endif
/*
* Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "devices/devices-common.h"
extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[];
#define imx50_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata)
extern const struct imx_fec_data imx50_fec_data;
#define imx50_add_fec(pdata) \
imx_add_fec(&imx50_fec_data, pdata)
extern const struct imx_imx_i2c_data imx50_imx_i2c_data[];
#define imx50_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx50_imx_i2c_data[id], pdata)
config IMX_HAVE_PLATFORM_FEC config IMX_HAVE_PLATFORM_FEC
bool bool
default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
config IMX_HAVE_PLATFORM_FLEXCAN config IMX_HAVE_PLATFORM_FLEXCAN
bool bool
......
...@@ -35,12 +35,6 @@ const struct imx_fec_data imx35_fec_data __initconst = ...@@ -35,12 +35,6 @@ const struct imx_fec_data imx35_fec_data __initconst =
imx_fec_data_entry_single(MX35, "imx27-fec"); imx_fec_data_entry_single(MX35, "imx27-fec");
#endif #endif
#ifdef CONFIG_SOC_IMX50
/* i.mx50 has the i.mx25 type fec */
const struct imx_fec_data imx50_fec_data __initconst =
imx_fec_data_entry_single(MX50, "imx25-fec");
#endif
#ifdef CONFIG_SOC_IMX51 #ifdef CONFIG_SOC_IMX51
/* i.mx51 has the i.mx27 type fec */ /* i.mx51 has the i.mx27 type fec */
const struct imx_fec_data imx51_fec_data __initconst = const struct imx_fec_data imx51_fec_data __initconst =
......
...@@ -70,16 +70,6 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { ...@@ -70,16 +70,6 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
}; };
#endif /* ifdef CONFIG_SOC_IMX35 */ #endif /* ifdef CONFIG_SOC_IMX35 */
#ifdef CONFIG_SOC_IMX50
const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
#define imx50_imx_i2c_data_entry(_id, _hwid) \
imx_imx_i2c_data_entry(MX50, "imx21-i2c", _id, _hwid, SZ_4K)
imx50_imx_i2c_data_entry(0, 1),
imx50_imx_i2c_data_entry(1, 2),
imx50_imx_i2c_data_entry(2, 3),
};
#endif /* ifdef CONFIG_SOC_IMX51 */
#ifdef CONFIG_SOC_IMX51 #ifdef CONFIG_SOC_IMX51
const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
#define imx51_imx_i2c_data_entry(_id, _hwid) \ #define imx51_imx_i2c_data_entry(_id, _hwid) \
......
...@@ -94,18 +94,6 @@ const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = { ...@@ -94,18 +94,6 @@ const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = {
}; };
#endif /* ifdef CONFIG_SOC_IMX35 */ #endif /* ifdef CONFIG_SOC_IMX35 */
#ifdef CONFIG_SOC_IMX50
const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst = {
#define imx50_imx_uart_data_entry(_id, _hwid) \
imx_imx_uart_1irq_data_entry(MX50, _id, _hwid, SZ_4K)
imx50_imx_uart_data_entry(0, 1),
imx50_imx_uart_data_entry(1, 2),
imx50_imx_uart_data_entry(2, 3),
imx50_imx_uart_data_entry(3, 4),
imx50_imx_uart_data_entry(4, 5),
};
#endif /* ifdef CONFIG_SOC_IMX50 */
#ifdef CONFIG_SOC_IMX51 #ifdef CONFIG_SOC_IMX51
const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = {
#define imx51_imx_uart_data_entry(_id, _hwid) \ #define imx51_imx_uart_data_entry(_id, _hwid) \
......
...@@ -101,11 +101,16 @@ static void imx_gpc_irq_mask(struct irq_data *d) ...@@ -101,11 +101,16 @@ static void imx_gpc_irq_mask(struct irq_data *d)
void __init imx_gpc_init(void) void __init imx_gpc_init(void)
{ {
struct device_node *np; struct device_node *np;
int i;
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc"); np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc");
gpc_base = of_iomap(np, 0); gpc_base = of_iomap(np, 0);
WARN_ON(!gpc_base); WARN_ON(!gpc_base);
/* Initially mask all interrupts */
for (i = 0; i < IMR_NUM; i++)
writel_relaxed(~0, gpc_base + GPC_IMR1 + i * 4);
/* Register GPC as the secondary interrupt controller behind GIC */ /* Register GPC as the secondary interrupt controller behind GIC */
gic_arch_extn.irq_mask = imx_gpc_irq_mask; gic_arch_extn.irq_mask = imx_gpc_irq_mask;
gic_arch_extn.irq_unmask = imx_gpc_irq_unmask; gic_arch_extn.irq_unmask = imx_gpc_irq_unmask;
......
...@@ -72,11 +72,6 @@ ...@@ -72,11 +72,6 @@
* AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000
* X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000 * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000
* SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000
* mx50:
* TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000
* AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000
* SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000
* AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000
* mx51: * mx51:
* TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000
* IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000 * IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000
...@@ -108,7 +103,6 @@ ...@@ -108,7 +103,6 @@
#include "mxc.h" #include "mxc.h"
#include "mx6q.h" #include "mx6q.h"
#include "mx50.h"
#include "mx51.h" #include "mx51.h"
#include "mx53.h" #include "mx53.h"
#include "mx3x.h" #include "mx3x.h"
......
This diff is collapsed.
/*
* Copyright 2011 Freescale Semiconductor, Inc.
* Copyright 2011 Linaro Ltd.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
#include <linux/init.h>
#include <asm/page.h>
#include <asm/sizes.h>
#include <asm/mach/map.h>
#include "hardware.h"
#define IMX6Q_UART1_BASE_ADDR 0x02020000
#define IMX6Q_UART2_BASE_ADDR 0x021e8000
#define IMX6Q_UART3_BASE_ADDR 0x021ec000
#define IMX6Q_UART4_BASE_ADDR 0x021f0000
#define IMX6Q_UART5_BASE_ADDR 0x021f4000
/*
* IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion
* of IMX6Q_UART##n##_BASE_ADDR.
*/
#define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR
#define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n)
#define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT)
static struct map_desc imx_lluart_desc = {
#ifdef CONFIG_DEBUG_IMX6Q_UART
.virtual = IMX_IO_P2V(IMX6Q_DEBUG_UART_BASE),
.pfn = __phys_to_pfn(IMX6Q_DEBUG_UART_BASE),
.length = 0x4000,
.type = MT_DEVICE,
#endif
};
void __init imx_lluart_map_io(void)
{
if (imx_lluart_desc.virtual)
iotable_init(&imx_lluart_desc, 1);
}
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/cpuidle.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -28,11 +27,11 @@ ...@@ -28,11 +27,11 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/micrel_phy.h> #include <linux/micrel_phy.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <asm/cpuidle.h>
#include <asm/smp_twd.h> #include <asm/smp_twd.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
...@@ -203,14 +202,6 @@ static void __init imx6q_init_machine(void) ...@@ -203,14 +202,6 @@ static void __init imx6q_init_machine(void)
imx6q_1588_init(); imx6q_1588_init();
} }
static struct cpuidle_driver imx6q_cpuidle_driver = {
.name = "imx6q_cpuidle",
.owner = THIS_MODULE,
.en_core_tk_irqen = 1,
.states[0] = ARM_CPUIDLE_WFI_STATE,
.state_count = 1,
};
#define OCOTP_CFG3 0x440 #define OCOTP_CFG3 0x440
#define OCOTP_CFG3_SPEED_SHIFT 16 #define OCOTP_CFG3_SPEED_SHIFT 16
#define OCOTP_CFG3_SPEED_1P2GHZ 0x3 #define OCOTP_CFG3_SPEED_1P2GHZ 0x3
...@@ -271,7 +262,12 @@ struct platform_device imx6q_cpufreq_pdev = { ...@@ -271,7 +262,12 @@ struct platform_device imx6q_cpufreq_pdev = {
static void __init imx6q_init_late(void) static void __init imx6q_init_late(void)
{ {
imx_cpuidle_init(&imx6q_cpuidle_driver); /*
* WAIT mode is broken on TO 1.0 and 1.1, so there is no point
* to run cpuidle on them.
*/
if (imx6q_revision() > IMX_CHIP_REVISION_1_1)
imx6q_cpuidle_init();
if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
imx6q_opp_init(&imx6q_cpufreq_pdev.dev); imx6q_opp_init(&imx6q_cpufreq_pdev.dev);
...@@ -281,9 +277,8 @@ static void __init imx6q_init_late(void) ...@@ -281,9 +277,8 @@ static void __init imx6q_init_late(void)
static void __init imx6q_map_io(void) static void __init imx6q_map_io(void)
{ {
imx_lluart_map_io(); debug_ll_io_init();
imx_scu_map_io(); imx_scu_map_io();
imx6q_clock_map_io();
} }
static const struct of_device_id imx6q_irq_match[] __initconst = { static const struct of_device_id imx6q_irq_match[] __initconst = {
......
/*
* Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <asm/irq.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include "common.h"
#include "devices-imx50.h"
#include "hardware.h"
#include "iomux-mx50.h"
#define FEC_EN IMX_GPIO_NR(6, 23)
#define FEC_RESET_B IMX_GPIO_NR(4, 12)
static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
/* SD1 */
MX50_PAD_ECSPI2_SS0__GPIO_4_19,
MX50_PAD_EIM_CRE__GPIO_1_27,
MX50_PAD_SD1_CMD__SD1_CMD,
MX50_PAD_SD1_CLK__SD1_CLK,
MX50_PAD_SD1_D0__SD1_D0,
MX50_PAD_SD1_D1__SD1_D1,
MX50_PAD_SD1_D2__SD1_D2,
MX50_PAD_SD1_D3__SD1_D3,
/* SD2 */
MX50_PAD_SD2_CD__GPIO_5_17,
MX50_PAD_SD2_WP__GPIO_5_16,
MX50_PAD_SD2_CMD__SD2_CMD,
MX50_PAD_SD2_CLK__SD2_CLK,
MX50_PAD_SD2_D0__SD2_D0,
MX50_PAD_SD2_D1__SD2_D1,
MX50_PAD_SD2_D2__SD2_D2,
MX50_PAD_SD2_D3__SD2_D3,
MX50_PAD_SD2_D4__SD2_D4,
MX50_PAD_SD2_D5__SD2_D5,
MX50_PAD_SD2_D6__SD2_D6,
MX50_PAD_SD2_D7__SD2_D7,
/* SD3 */
MX50_PAD_SD3_CMD__SD3_CMD,
MX50_PAD_SD3_CLK__SD3_CLK,
MX50_PAD_SD3_D0__SD3_D0,
MX50_PAD_SD3_D1__SD3_D1,
MX50_PAD_SD3_D2__SD3_D2,
MX50_PAD_SD3_D3__SD3_D3,
MX50_PAD_SD3_D4__SD3_D4,
MX50_PAD_SD3_D5__SD3_D5,
MX50_PAD_SD3_D6__SD3_D6,
MX50_PAD_SD3_D7__SD3_D7,
/* PWR_INT */
MX50_PAD_ECSPI2_MISO__GPIO_4_18,
/* UART pad setting */
MX50_PAD_UART1_TXD__UART1_TXD,
MX50_PAD_UART1_RXD__UART1_RXD,
MX50_PAD_UART1_RTS__UART1_RTS,
MX50_PAD_UART2_TXD__UART2_TXD,
MX50_PAD_UART2_RXD__UART2_RXD,
MX50_PAD_UART2_CTS__UART2_CTS,
MX50_PAD_UART2_RTS__UART2_RTS,
MX50_PAD_I2C1_SCL__I2C1_SCL,
MX50_PAD_I2C1_SDA__I2C1_SDA,
MX50_PAD_I2C2_SCL__I2C2_SCL,
MX50_PAD_I2C2_SDA__I2C2_SDA,
MX50_PAD_EPITO__USBH1_PWR,
/* Need to comment below line if
* one needs to debug owire.
*/
MX50_PAD_OWIRE__USBH1_OC,
/* using gpio to control otg pwr */
MX50_PAD_PWM2__GPIO_6_25,
MX50_PAD_I2C3_SCL__USBOTG_OC,
MX50_PAD_SSI_RXC__FEC_MDIO,
MX50_PAD_SSI_RXFS__FEC_MDC,
MX50_PAD_DISP_D0__FEC_TXCLK,
MX50_PAD_DISP_D1__FEC_RX_ER,
MX50_PAD_DISP_D2__FEC_RX_DV,
MX50_PAD_DISP_D3__FEC_RXD1,
MX50_PAD_DISP_D4__FEC_RXD0,
MX50_PAD_DISP_D5__FEC_TX_EN,
MX50_PAD_DISP_D6__FEC_TXD1,
MX50_PAD_DISP_D7__FEC_TXD0,
MX50_PAD_I2C3_SDA__GPIO_6_23,
MX50_PAD_ECSPI1_SCLK__GPIO_4_12,
MX50_PAD_CSPI_SS0__CSPI_SS0,
MX50_PAD_ECSPI1_MOSI__CSPI_SS1,
MX50_PAD_CSPI_MOSI__CSPI_MOSI,
MX50_PAD_CSPI_MISO__CSPI_MISO,
/* SGTL500_OSC_EN */
MX50_PAD_UART1_CTS__GPIO_6_8,
/* SGTL_AMP_SHDN */
MX50_PAD_UART3_RXD__GPIO_6_15,
/* Keypad */
MX50_PAD_KEY_COL0__KEY_COL0,
MX50_PAD_KEY_ROW0__KEY_ROW0,
MX50_PAD_KEY_COL1__KEY_COL1,
MX50_PAD_KEY_ROW1__KEY_ROW1,
MX50_PAD_KEY_COL2__KEY_COL2,
MX50_PAD_KEY_ROW2__KEY_ROW2,
MX50_PAD_KEY_COL3__KEY_COL3,
MX50_PAD_KEY_ROW3__KEY_ROW3,
MX50_PAD_EIM_DA0__KEY_COL4,
MX50_PAD_EIM_DA1__KEY_ROW4,
MX50_PAD_EIM_DA2__KEY_COL5,
MX50_PAD_EIM_DA3__KEY_ROW5,
MX50_PAD_EIM_DA4__KEY_COL6,
MX50_PAD_EIM_DA5__KEY_ROW6,
MX50_PAD_EIM_DA6__KEY_COL7,
MX50_PAD_EIM_DA7__KEY_ROW7,
/*EIM pads */
MX50_PAD_EIM_DA8__GPIO_1_8,
MX50_PAD_EIM_DA9__GPIO_1_9,
MX50_PAD_EIM_DA10__GPIO_1_10,
MX50_PAD_EIM_DA11__GPIO_1_11,
MX50_PAD_EIM_DA12__GPIO_1_12,
MX50_PAD_EIM_DA13__GPIO_1_13,
MX50_PAD_EIM_DA14__GPIO_1_14,
MX50_PAD_EIM_DA15__GPIO_1_15,
MX50_PAD_EIM_CS2__GPIO_1_16,
MX50_PAD_EIM_CS1__GPIO_1_17,
MX50_PAD_EIM_CS0__GPIO_1_18,
MX50_PAD_EIM_EB0__GPIO_1_19,
MX50_PAD_EIM_EB1__GPIO_1_20,
MX50_PAD_EIM_WAIT__GPIO_1_21,
MX50_PAD_EIM_BCLK__GPIO_1_22,
MX50_PAD_EIM_RDY__GPIO_1_23,
MX50_PAD_EIM_OE__GPIO_1_24,
};
/* Serial ports */
static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
static const struct fec_platform_data fec_data __initconst = {
.phy = PHY_INTERFACE_MODE_RMII,
};
static inline void mx50_rdp_fec_reset(void)
{
gpio_request(FEC_EN, "fec-en");
gpio_direction_output(FEC_EN, 0);
gpio_request(FEC_RESET_B, "fec-reset_b");
gpio_direction_output(FEC_RESET_B, 0);
msleep(1);
gpio_set_value(FEC_RESET_B, 1);
}
static const struct imxi2c_platform_data i2c_data __initconst = {
.bitrate = 100000,
};
/*
* Board specific initialization.
*/
static void __init mx50_rdp_board_init(void)
{
imx50_soc_init();
mxc_iomux_v3_setup_multiple_pads(mx50_rdp_pads,
ARRAY_SIZE(mx50_rdp_pads));
imx50_add_imx_uart(0, &uart_pdata);
imx50_add_imx_uart(1, &uart_pdata);
mx50_rdp_fec_reset();
imx50_add_fec(&fec_data);
imx50_add_imx_i2c(0, &i2c_data);
imx50_add_imx_i2c(1, &i2c_data);
imx50_add_imx_i2c(2, &i2c_data);
}
static void __init mx50_rdp_timer_init(void)
{
mx50_clocks_init(32768, 24000000, 22579200);
}
static struct sys_timer mx50_rdp_timer = {
.init = mx50_rdp_timer_init,
};
MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
.map_io = mx50_map_io,
.init_early = imx50_init_early,
.init_irq = mx50_init_irq,
.handle_irq = imx50_handle_irq,
.timer = &mx50_rdp_timer,
.init_machine = mx50_rdp_board_init,
.restart = mxc_restart,
MACHINE_END
/*
* Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com>
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include "3ds_debugboard.h"
#include "common.h"
#include "devices-imx51.h"
#include "hardware.h"
#include "iomux-mx51.h"
#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28)
static iomux_v3_cfg_t mx51_3ds_pads[] = {
/* UART1 */
MX51_PAD_UART1_RXD__UART1_RXD,
MX51_PAD_UART1_TXD__UART1_TXD,
MX51_PAD_UART1_RTS__UART1_RTS,
MX51_PAD_UART1_CTS__UART1_CTS,
/* UART2 */
MX51_PAD_UART2_RXD__UART2_RXD,
MX51_PAD_UART2_TXD__UART2_TXD,
MX51_PAD_EIM_D25__UART2_CTS,
MX51_PAD_EIM_D26__UART2_RTS,
/* UART3 */
MX51_PAD_UART3_RXD__UART3_RXD,
MX51_PAD_UART3_TXD__UART3_TXD,
MX51_PAD_EIM_D24__UART3_CTS,
MX51_PAD_EIM_D27__UART3_RTS,
/* CPLD PARENT IRQ PIN */
MX51_PAD_GPIO1_6__GPIO1_6,
/* KPP */
MX51_PAD_KEY_ROW0__KEY_ROW0,
MX51_PAD_KEY_ROW1__KEY_ROW1,
MX51_PAD_KEY_ROW2__KEY_ROW2,
MX51_PAD_KEY_ROW3__KEY_ROW3,
MX51_PAD_KEY_COL0__KEY_COL0,
MX51_PAD_KEY_COL1__KEY_COL1,
MX51_PAD_KEY_COL2__KEY_COL2,
MX51_PAD_KEY_COL3__KEY_COL3,
MX51_PAD_KEY_COL4__KEY_COL4,
MX51_PAD_KEY_COL5__KEY_COL5,
/* eCSPI2 */
MX51_PAD_NANDF_RB2__ECSPI2_SCLK,
MX51_PAD_NANDF_RB3__ECSPI2_MISO,
MX51_PAD_NANDF_D15__ECSPI2_MOSI,
MX51_PAD_NANDF_D12__GPIO3_28,
};
/* Serial ports */
static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
static int mx51_3ds_board_keymap[] = {
KEY(0, 0, KEY_1),
KEY(0, 1, KEY_2),
KEY(0, 2, KEY_3),
KEY(0, 3, KEY_F1),
KEY(0, 4, KEY_UP),
KEY(0, 5, KEY_F2),
KEY(1, 0, KEY_4),
KEY(1, 1, KEY_5),
KEY(1, 2, KEY_6),
KEY(1, 3, KEY_LEFT),
KEY(1, 4, KEY_SELECT),
KEY(1, 5, KEY_RIGHT),
KEY(2, 0, KEY_7),
KEY(2, 1, KEY_8),
KEY(2, 2, KEY_9),
KEY(2, 3, KEY_F3),
KEY(2, 4, KEY_DOWN),
KEY(2, 5, KEY_F4),
KEY(3, 0, KEY_0),
KEY(3, 1, KEY_OK),
KEY(3, 2, KEY_ESC),
KEY(3, 3, KEY_ENTER),
KEY(3, 4, KEY_MENU),
KEY(3, 5, KEY_BACK)
};
static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
.keymap = mx51_3ds_board_keymap,
.keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap),
};
static int mx51_3ds_spi2_cs[] = {
MXC_SPI_CS(0),
MX51_3DS_ECSPI2_CS,
};
static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = {
.chipselect = mx51_3ds_spi2_cs,
.num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs),
};
static struct spi_board_info mx51_3ds_spi_nor_device[] = {
{
.modalias = "m25p80",
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1,
.chip_select = 1,
.mode = SPI_MODE_0,
.platform_data = NULL,},
};
/*
* Board specific initialization.
*/
static void __init mx51_3ds_init(void)
{
imx51_soc_init();
mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
ARRAY_SIZE(mx51_3ds_pads));
imx51_add_imx_uart(0, &uart_pdata);
imx51_add_imx_uart(1, &uart_pdata);
imx51_add_imx_uart(2, &uart_pdata);
imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
spi_register_board_info(mx51_3ds_spi_nor_device,
ARRAY_SIZE(mx51_3ds_spi_nor_device));
if (mxc_expio_init(MX51_CS5_BASE_ADDR, IMX_GPIO_NR(1, 6)))
printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are unusable.\n");
imx51_add_sdhci_esdhc_imx(0, NULL);
imx51_add_imx_keypad(&mx51_3ds_map_data);
imx51_add_imx2_wdt(0);
}
static void __init mx51_3ds_timer_init(void)
{
mx51_clocks_init(32768, 24000000, 22579200, 0);
}
static struct sys_timer mx51_3ds_timer = {
.init = mx51_3ds_timer_init,
};
MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
/* Maintainer: Freescale Semiconductor, Inc. */
.atag_offset = 0x100,
.map_io = mx51_map_io,
.init_early = imx51_init_early,
.init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.timer = &mx51_3ds_timer,
.init_machine = mx51_3ds_init,
.init_late = imx51_init_late,
.restart = mxc_restart,
MACHINE_END
...@@ -23,16 +23,6 @@ ...@@ -23,16 +23,6 @@
#include "hardware.h" #include "hardware.h"
#include "iomux-v3.h" #include "iomux-v3.h"
/*
* Define the MX50 memory map.
*/
static struct map_desc mx50_io_desc[] __initdata = {
imx_map_entry(MX50, TZIC, MT_DEVICE),
imx_map_entry(MX50, SPBA0, MT_DEVICE),
imx_map_entry(MX50, AIPS1, MT_DEVICE),
imx_map_entry(MX50, AIPS2, MT_DEVICE),
};
/* /*
* Define the MX51 memory map. * Define the MX51 memory map.
*/ */
...@@ -59,11 +49,6 @@ static struct map_desc mx53_io_desc[] __initdata = { ...@@ -59,11 +49,6 @@ static struct map_desc mx53_io_desc[] __initdata = {
* system startup to create static physical to virtual memory mappings * system startup to create static physical to virtual memory mappings
* for the IO modules. * for the IO modules.
*/ */
void __init mx50_map_io(void)
{
iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc));
}
void __init mx51_map_io(void) void __init mx51_map_io(void)
{ {
iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc));
...@@ -74,13 +59,6 @@ void __init mx53_map_io(void) ...@@ -74,13 +59,6 @@ void __init mx53_map_io(void)
iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
} }
void __init imx50_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX50);
mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
}
/* /*
* The MIPI HSC unit has been removed from the i.MX51 Reference Manual by * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
* the Freescale marketing division. However this did not remove the * the Freescale marketing division. However this did not remove the
...@@ -115,11 +93,6 @@ void __init imx53_init_early(void) ...@@ -115,11 +93,6 @@ void __init imx53_init_early(void)
mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR));
} }
void __init mx50_init_irq(void)
{
tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
}
void __init mx51_init_irq(void) void __init mx51_init_irq(void)
{ {
tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR));
...@@ -148,31 +121,10 @@ static struct sdma_platform_data imx51_sdma_pdata __initdata = { ...@@ -148,31 +121,10 @@ static struct sdma_platform_data imx51_sdma_pdata __initdata = {
.script_addrs = &imx51_sdma_script, .script_addrs = &imx51_sdma_script,
}; };
static const struct resource imx50_audmux_res[] __initconst = {
DEFINE_RES_MEM(MX50_AUDMUX_BASE_ADDR, SZ_16K),
};
static const struct resource imx51_audmux_res[] __initconst = { static const struct resource imx51_audmux_res[] __initconst = {
DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K), DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K),
}; };
void __init imx50_soc_init(void)
{
mxc_device_init();
/* i.mx50 has the i.mx35 type gpio */
mxc_register_gpio("imx35-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
mxc_register_gpio("imx35-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
mxc_register_gpio("imx35-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH);
mxc_register_gpio("imx35-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH);
mxc_register_gpio("imx35-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH);
mxc_register_gpio("imx35-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH);
/* i.mx50 has the i.mx31 type audmux */
platform_device_register_simple("imx31-audmux", 0, imx50_audmux_res,
ARRAY_SIZE(imx50_audmux_res));
}
void __init imx51_soc_init(void) void __init imx51_soc_init(void)
{ {
mxc_device_init(); mxc_device_init();
......
This diff is collapsed.
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#define MXC_CPU_MX27 27 #define MXC_CPU_MX27 27
#define MXC_CPU_MX31 31 #define MXC_CPU_MX31 31
#define MXC_CPU_MX35 35 #define MXC_CPU_MX35 35
#define MXC_CPU_MX50 50
#define MXC_CPU_MX51 51 #define MXC_CPU_MX51 51
#define MXC_CPU_MX53 53 #define MXC_CPU_MX53 53
...@@ -126,18 +125,6 @@ extern unsigned int __mxc_cpu_type; ...@@ -126,18 +125,6 @@ extern unsigned int __mxc_cpu_type;
# define cpu_is_mx35() (0) # define cpu_is_mx35() (0)
#endif #endif
#ifdef CONFIG_SOC_IMX50
# ifdef mxc_cpu_type
# undef mxc_cpu_type
# define mxc_cpu_type __mxc_cpu_type
# else
# define mxc_cpu_type MXC_CPU_MX50
# endif
# define cpu_is_mx50() (mxc_cpu_type == MXC_CPU_MX50)
#else
# define cpu_is_mx50() (0)
#endif
#ifdef CONFIG_SOC_IMX51 #ifdef CONFIG_SOC_IMX51
# ifdef mxc_cpu_type # ifdef mxc_cpu_type
# undef mxc_cpu_type # undef mxc_cpu_type
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "common.h" #include "common.h"
#include "hardware.h" #include "hardware.h"
#define SCU_STANDBY_ENABLE (1 << 5)
static void __iomem *scu_base; static void __iomem *scu_base;
static struct map_desc scu_io_desc __initdata = { static struct map_desc scu_io_desc __initdata = {
...@@ -42,6 +44,14 @@ void __init imx_scu_map_io(void) ...@@ -42,6 +44,14 @@ void __init imx_scu_map_io(void)
scu_base = IMX_IO_ADDRESS(base); scu_base = IMX_IO_ADDRESS(base);
} }
void imx_scu_standby_enable(void)
{
u32 val = readl_relaxed(scu_base);
val |= SCU_STANDBY_ENABLE;
writel_relaxed(val, scu_base);
}
static void __cpuinit imx_secondary_init(unsigned int cpu) static void __cpuinit imx_secondary_init(unsigned int cpu)
{ {
/* /*
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/* /*
* set cpu low power mode before WFI instruction. This function is called * set cpu low power mode before WFI instruction. This function is called
* mx5 because it can be used for mx50, mx51, and mx53. * mx5 because it can be used for mx51, and mx53.
*/ */
static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
{ {
...@@ -85,9 +85,6 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) ...@@ -85,9 +85,6 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
__raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC); __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC);
__raw_writel(ccm_clpcr, MXC_CCM_CLPCR); __raw_writel(ccm_clpcr, MXC_CCM_CLPCR);
__raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR); __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR);
/* Enable NEON SRPG for all but MX50TO1.0. */
if (mx50_revision() != IMX_CHIP_REVISION_1_0)
__raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR); __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR);
if (stop_mode) { if (stop_mode) {
......
...@@ -152,7 +152,8 @@ static int v2_set_next_event(unsigned long evt, ...@@ -152,7 +152,8 @@ static int v2_set_next_event(unsigned long evt,
__raw_writel(tcmp, timer_base + V2_TCMP); __raw_writel(tcmp, timer_base + V2_TCMP);
return (int)(tcmp - __raw_readl(timer_base + V2_TCN)) < 0 ? return evt < 0x7fffffff &&
(int)(tcmp - __raw_readl(timer_base + V2_TCN)) < 0 ?
-ETIME : 0; -ETIME : 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment