diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-08-23 12:06:16 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-08-23 12:06:16 -0700 |
commit | d519049cb17b63604149431496460ff9cf00845d (patch) | |
tree | eeb85b3a4d0d9508e0f9ad360e43c0367001c9d5 | |
parent | 334b0f0913a1a980d3167c3bc4415a788225125f (diff) | |
parent | 7543360721cfdce687c4b53a03f08f5ba21d4745 (diff) | |
download | blackbird-op-linux-d519049cb17b63604149431496460ff9cf00845d.tar.gz blackbird-op-linux-d519049cb17b63604149431496460ff9cf00845d.zip |
Merge tag 'mxs-soc-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/soc
From Shawn Guo:
It contains mxs soc changes for 3.12.
- Run savedefconfig on mxs_defconfig to clean it up
- Fix on mxs_restart() routine for interrupt context calling
- A few other random updates and cleanups
* tag 'mxs-soc-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6:
ARM: mxs: pm: Include "pm.h"
ARM: mxs: Simplify detection of CrystalFontz boards
ARM: mach-mxs: Remove "TO" string from revision field
ARM: mxs: Fix BUG() when invoking mxs_restart() from interrupt context
ARM: mxs: Allow DT clock providers
ARM: mxs_defconfig: Cleanup mxs_defconfig
-rw-r--r-- | arch/arm/configs/mxs_defconfig | 19 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 62 | ||||
-rw-r--r-- | arch/arm/mach-mxs/pm.c | 1 |
3 files changed, 44 insertions, 38 deletions
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index 1d6d8fb7f4a1..4555c025629a 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig @@ -1,4 +1,3 @@ -CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y @@ -27,7 +26,6 @@ CONFIG_ARCH_MXS=y # CONFIG_ARM_THUMB is not set CONFIG_PREEMPT_VOLUNTARY=y CONFIG_AEABI=y -CONFIG_AUTO_ZRELADDR=y CONFIG_FPE_NWFPE=y CONFIG_NET=y CONFIG_PACKET=y @@ -43,8 +41,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_DIAG is not set # CONFIG_IPV6 is not set CONFIG_CAN=m -CONFIG_CAN_RAW=m -CONFIG_CAN_BCM=m CONFIG_CAN_FLEXCAN=m # CONFIG_WIRELESS is not set CONFIG_DEVTMPFS=y @@ -52,7 +48,6 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y CONFIG_MTD_DATAFLASH=y CONFIG_MTD_M25P80=y @@ -67,12 +62,12 @@ CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y CONFIG_ENC28J60=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC95XX=y CONFIG_SMSC_PHY=y CONFIG_ICPLUS_PHY=y CONFIG_REALTEK_PHY=y CONFIG_MICREL_PHY=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y # CONFIG_WLAN is not set # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_EVDEV=y @@ -110,7 +105,6 @@ CONFIG_LCD_CLASS_DEVICE=y CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_BACKLIGHT_PWM=y CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y CONFIG_LOGO=y CONFIG_SOUND=y CONFIG_SND=y @@ -119,9 +113,9 @@ CONFIG_SND_MXS_SOC=y CONFIG_SND_SOC_MXS_SGTL5000=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_STORAGE=y CONFIG_USB_PHY=y CONFIG_USB_MXS_PHY=y CONFIG_MMC=y @@ -143,9 +137,9 @@ CONFIG_DMADEVICES=y CONFIG_MXS_DMA=y CONFIG_STAGING=y CONFIG_MXS_LRADC=y -CONFIG_IIO_SYSFS_TRIGGER=y CONFIG_COMMON_CLK_DEBUG=y CONFIG_IIO=y +CONFIG_IIO_SYSFS_TRIGGER=y CONFIG_PWM=y CONFIG_PWM_MXS=y CONFIG_EXT2_FS=y @@ -173,14 +167,14 @@ CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=y CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_INFO=y CONFIG_FRAME_WARN=2048 -CONFIG_MAGIC_SYSRQ=y CONFIG_UNUSED_SYMBOLS=y +CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y CONFIG_LOCKUP_DETECTOR=y CONFIG_TIMER_STATS=y CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_INFO=y CONFIG_BLK_DEV_IO_TRACE=y CONFIG_STRICT_DEVMEM=y CONFIG_DEBUG_USER=y @@ -188,3 +182,4 @@ CONFIG_DEBUG_USER=y # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=m CONFIG_CRC7=m +CONFIG_FONTS=y diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 4ce27b536dc9..98f6e2adb53e 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -14,6 +14,7 @@ #include <linux/clk/mxs.h> #include <linux/clkdev.h> #include <linux/clocksource.h> +#include <linux/clk-provider.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/gpio.h> @@ -61,6 +62,8 @@ static u32 chipid; static u32 socid; +static void __iomem *reset_addr; + static inline void __mxs_setl(u32 mask, void __iomem *reg) { __raw_writel(mask, reg + MXS_SET_ADDR); @@ -393,12 +396,33 @@ static const char __init *mxs_get_revision(void) u32 rev = mxs_get_cpu_rev(); if (rev != MXS_CHIP_REV_UNKNOWN) - return kasprintf(GFP_KERNEL, "TO%d.%d", (rev >> 4) & 0xf, + return kasprintf(GFP_KERNEL, "%d.%d", (rev >> 4) & 0xf, rev & 0xf); else return kasprintf(GFP_KERNEL, "%s", "Unknown"); } +#define MX23_CLKCTRL_RESET_OFFSET 0x120 +#define MX28_CLKCTRL_RESET_OFFSET 0x1e0 + +static int __init mxs_restart_init(void) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "fsl,clkctrl"); + reset_addr = of_iomap(np, 0); + if (!reset_addr) + return -ENODEV; + + if (of_device_is_compatible(np, "fsl,imx23-clkctrl")) + reset_addr += MX23_CLKCTRL_RESET_OFFSET; + else + reset_addr += MX28_CLKCTRL_RESET_OFFSET; + of_node_put(np); + + return 0; +} + static void __init mxs_machine_init(void) { struct device_node *root; @@ -433,21 +457,18 @@ static void __init mxs_machine_init(void) imx28_evk_init(); else if (of_machine_is_compatible("bluegiga,apx4devkit")) apx4devkit_init(); - else if (of_machine_is_compatible("crystalfontz,cfa10037") || - of_machine_is_compatible("crystalfontz,cfa10049") || - of_machine_is_compatible("crystalfontz,cfa10055") || - of_machine_is_compatible("crystalfontz,cfa10057")) + else if (of_machine_is_compatible("crystalfontz,cfa10036")) crystalfontz_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); + mxs_restart_init(); + if (of_machine_is_compatible("karo,tx28")) tx28_post_init(); } -#define MX23_CLKCTRL_RESET_OFFSET 0x120 -#define MX28_CLKCTRL_RESET_OFFSET 0x1e0 #define MXS_CLKCTRL_RESET_CHIP (1 << 1) /* @@ -455,28 +476,16 @@ static void __init mxs_machine_init(void) */ static void mxs_restart(enum reboot_mode mode, const char *cmd) { - struct device_node *np; - void __iomem *reset_addr; + if (reset_addr) { + /* reset the chip */ + __mxs_setl(MXS_CLKCTRL_RESET_CHIP, reset_addr); - np = of_find_compatible_node(NULL, NULL, "fsl,clkctrl"); - reset_addr = of_iomap(np, 0); - if (!reset_addr) - goto soft; + pr_err("Failed to assert the chip reset\n"); - if (of_device_is_compatible(np, "fsl,imx23-clkctrl")) - reset_addr += MX23_CLKCTRL_RESET_OFFSET; - else - reset_addr += MX28_CLKCTRL_RESET_OFFSET; - - /* reset the chip */ - __mxs_setl(MXS_CLKCTRL_RESET_CHIP, reset_addr); - - pr_err("Failed to assert the chip reset\n"); - - /* Delay to allow the serial port to show the message */ - mdelay(50); + /* Delay to allow the serial port to show the message */ + mdelay(50); + } -soft: /* We'll take a jump through zero as a poor second */ soft_restart(0); } @@ -487,6 +496,7 @@ static void __init mxs_timer_init(void) mx23_clocks_init(); else mx28_clocks_init(); + of_clk_init(NULL); clocksource_of_init(); } diff --git a/arch/arm/mach-mxs/pm.c b/arch/arm/mach-mxs/pm.c index b2494d2db2c4..0170e99fd70f 100644 --- a/arch/arm/mach-mxs/pm.c +++ b/arch/arm/mach-mxs/pm.c @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/suspend.h> #include <linux/io.h> +#include "pm.h" static int mxs_suspend_enter(suspend_state_t state) { |