Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d052e161 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge branch 'mxs/boards' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/boards

* 'mxs/boards' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: mxs: Add initial support for Bluegiga APX4 Development Kit
  ARM: mxs: read correct values when setting up MAC
  ARM: mx28evk: Simplify GPIO requests
  ARM: mx28: Remove duplicate OCOTP error message
  ARM: mxs: detect SoC by checking CHIPID register
parents a5f17d1f 79ce72aa
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -83,6 +83,18 @@ config MODULE_M28
	select MXS_HAVE_PLATFORM_MXSFB
	select MXS_OCOTP

config MODULE_APX4
	bool
	select SOC_IMX28
	select LEDS_GPIO_REGISTER
	select MXS_HAVE_AMBA_DUART
	select MXS_HAVE_PLATFORM_AUART
	select MXS_HAVE_PLATFORM_FEC
	select MXS_HAVE_PLATFORM_MXS_I2C
	select MXS_HAVE_PLATFORM_MXS_MMC
	select MXS_HAVE_PLATFORM_MXS_SAIF
	select MXS_OCOTP

config MACH_TX28
	bool "Ka-Ro TX28 module"
	select MODULE_TX28
@@ -91,4 +103,8 @@ config MACH_M28EVK
	bool "Support DENX M28EVK Platform"
	select MODULE_M28

config MACH_APX4DEVKIT
	bool "Support Bluegiga APX4 Development Kit"
	select MODULE_APX4

endif
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
obj-$(CONFIG_MACH_M28EVK)    += mach-m28evk.o
obj-$(CONFIG_MACH_APX4DEVKIT) += mach-apx4devkit.o
obj-$(CONFIG_MODULE_TX28) += module-tx28.o
obj-$(CONFIG_MACH_TX28)    += mach-tx28.o

+1 −0
Original line number Diff line number Diff line
@@ -18,4 +18,5 @@
#define HW_DIGCTL_CTRL			0x0
#define  BP_DIGCTL_CTRL_SAIF_CLKMUX	10
#define  BM_DIGCTL_CTRL_SAIF_CLKMUX	(0x3 << 10)
#define HW_DIGCTL_CHIPID		0x310
#endif
+16 −13
Original line number Diff line number Diff line
@@ -23,21 +23,9 @@
#include <linux/io.h>
#endif
#include <asm/mach-types.h>
#include <mach/digctl.h>
#include <mach/hardware.h>

/*
 * MXS CPU types
 */
#define cpu_is_mx23()		(					\
		machine_is_mx23evk() ||					\
		machine_is_stmp378x() ||				\
		0)
#define cpu_is_mx28()		(					\
		machine_is_mx28evk() ||					\
		machine_is_m28evk() ||					\
		machine_is_tx28() ||					\
		0)

/*
 * IO addresses common to MXS-based
 */
@@ -109,6 +97,21 @@ static inline void __mxs_togl(u32 mask, void __iomem *reg)
{
	__raw_writel(mask, reg + MXS_TOG_ADDR);
}

/*
 * MXS CPU types
 */
#define MXS_CHIPID (MXS_IO_ADDRESS(MXS_DIGCTL_BASE_ADDR) + HW_DIGCTL_CHIPID)

static inline int cpu_is_mx23(void)
{
	return ((__raw_readl(MXS_CHIPID) >> 16) == 0x3780);
}

static inline int cpu_is_mx28(void)
{
	return ((__raw_readl(MXS_CHIPID) >> 16) == 0x2800);
}
#endif

#endif /* __MACH_MXS_H__ */
+6 −7
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@
#ifndef __MACH_MXS_UNCOMPRESS_H__
#define __MACH_MXS_UNCOMPRESS_H__

#include <asm/mach-types.h>

unsigned long mxs_duart_base;

#define MXS_DUART(x)	(*(volatile unsigned long *)(mxs_duart_base + (x)))
@@ -55,16 +53,17 @@ static inline void flush(void)

#define MX23_DUART_BASE_ADDR	0x80070000
#define MX28_DUART_BASE_ADDR	0x80074000
#define MXS_DIGCTL_CHIPID	0x8001c310

static inline void __arch_decomp_setup(unsigned long arch_id)
{
	switch (arch_id) {
	case MACH_TYPE_MX23EVK:
	u16 chipid = (*(volatile unsigned long *) MXS_DIGCTL_CHIPID) >> 16;

	switch (chipid) {
	case 0x3780:
		mxs_duart_base = MX23_DUART_BASE_ADDR;
		break;
	case MACH_TYPE_MX28EVK:
	case MACH_TYPE_M28EVK:
	case MACH_TYPE_TX28:
	case 0x2800:
		mxs_duart_base = MX28_DUART_BASE_ADDR;
		break;
	default:
Loading