Merge branch 'imx/devel' into imx/imx6q

Conflicts:
	arch/arm/plat-mxc/include/mach/memory.h
This commit is contained in:
Arnd Bergmann 2011-10-31 14:24:28 +01:00
commit 7e0cac630c
137 changed files with 4010 additions and 5258 deletions

View File

@ -413,6 +413,7 @@ config ARCH_MXC
select CLKSRC_MMIO select CLKSRC_MMIO
select GENERIC_IRQ_CHIP select GENERIC_IRQ_CHIP
select HAVE_SCHED_CLOCK select HAVE_SCHED_CLOCK
select MULTI_IRQ_HANDLER
help help
Support for Freescale MXC/iMX-based family of processors Support for Freescale MXC/iMX-based family of processors

View File

@ -157,9 +157,7 @@ machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx
machine-$(CONFIG_ARCH_MMP) := mmp machine-$(CONFIG_ARCH_MMP) := mmp
machine-$(CONFIG_ARCH_MSM) := msm machine-$(CONFIG_ARCH_MSM) := msm
machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
machine-$(CONFIG_ARCH_MX1) := imx machine-$(CONFIG_ARCH_IMX_V4_V5) := imx
machine-$(CONFIG_ARCH_MX2) := imx
machine-$(CONFIG_ARCH_MX25) := imx
machine-$(CONFIG_ARCH_MX3) := imx machine-$(CONFIG_ARCH_MX3) := imx
machine-$(CONFIG_ARCH_MX5) := mx5 machine-$(CONFIG_ARCH_MX5) := mx5
machine-$(CONFIG_ARCH_MXS) := mxs machine-$(CONFIG_ARCH_MXS) := mxs

View File

@ -3,9 +3,7 @@ CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EXPERT=y CONFIG_EXPERT=y
CONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y CONFIG_SLAB=y
CONFIG_PROFILING=y CONFIG_PROFILING=y
@ -17,8 +15,12 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set # CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_MXC=y CONFIG_ARCH_MXC=y
CONFIG_ARCH_MX2=y CONFIG_ARCH_IMX_V4_V5=y
CONFIG_MACH_MX27=y CONFIG_ARCH_MX1ADS=y
CONFIG_MACH_SCB9328=y
CONFIG_MACH_MX21ADS=y
CONFIG_MACH_MX25_3DS=y
CONFIG_MACH_EUKREA_CPUIMX25=y
CONFIG_MACH_MX27ADS=y CONFIG_MACH_MX27ADS=y
CONFIG_MACH_PCM038=y CONFIG_MACH_PCM038=y
CONFIG_MACH_CPUIMX27=y CONFIG_MACH_CPUIMX27=y
@ -29,6 +31,7 @@ CONFIG_MACH_IMX27_VISSTRIM_M10=y
CONFIG_MACH_IMX27LITE=y CONFIG_MACH_IMX27LITE=y
CONFIG_MACH_PCA100=y CONFIG_MACH_PCA100=y
CONFIG_MACH_MXT_TD60=y CONFIG_MACH_MXT_TD60=y
CONFIG_MACH_IMX27IPCAM=y
CONFIG_MXC_IRQ_PRIOR=y CONFIG_MXC_IRQ_PRIOR=y
CONFIG_MXC_PWM=y CONFIG_MXC_PWM=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
@ -39,7 +42,6 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_FPE_NWFPE=y CONFIG_FPE_NWFPE=y
CONFIG_FPE_NWFPE_XP=y CONFIG_FPE_NWFPE_XP=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y CONFIG_PM_DEBUG=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
@ -55,8 +57,9 @@ CONFIG_IP_PNP_DHCP=y
# CONFIG_INET_DIAG is not set # CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set # CONFIG_IPV6 is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
@ -69,12 +72,15 @@ CONFIG_MTD_CFI_GEOMETRY=y
CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_NAND=y CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_MXC=y
CONFIG_MTD_UBI=y CONFIG_MTD_UBI=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=y
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
CONFIG_FEC=y CONFIG_SMC91X=y
CONFIG_DM9000=y
CONFIG_SMC911X=y
# CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set # CONFIG_NETDEV_10000 is not set
# CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_MOUSEDEV is not set
@ -84,10 +90,10 @@ CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_TOUCHSCREEN=y CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ADS7846=m CONFIG_TOUCHSCREEN_ADS7846=m
# CONFIG_SERIO is not set # CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_8250=m CONFIG_SERIAL_8250=m
CONFIG_SERIAL_IMX=y CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set # CONFIG_HW_RANDOM is not set
CONFIG_I2C=y CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y CONFIG_I2C_CHARDEV=y
@ -98,19 +104,56 @@ CONFIG_W1=y
CONFIG_W1_MASTER_MXC=y CONFIG_W1_MASTER_MXC=y
CONFIG_W1_SLAVE_THERM=y CONFIG_W1_SLAVE_THERM=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_IMX2_WDT=y
CONFIG_MFD_MC13XXX=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_MC13783=y
CONFIG_REGULATOR_MC13892=y
CONFIG_FB=y CONFIG_FB=y
CONFIG_FB_IMX=y CONFIG_FB_IMX=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONTS=y CONFIG_FONTS=y
CONFIG_FONT_8x8=y CONFIG_FONT_8x8=y
# CONFIG_HID_SUPPORT is not set CONFIG_LOGO=y
CONFIG_USB=m CONFIG_SOUND=y
CONFIG_SND=y
# CONFIG_SND_ARM is not set
# CONFIG_SND_SPI is not set
CONFIG_SND_SOC=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_MX27VIS_AIC32X4=y
CONFIG_SND_SOC_PHYCORE_AC97=y
CONFIG_SND_SOC_EUKREA_TLV320=y
CONFIG_USB_HID=m
CONFIG_USB=y
# CONFIG_USB_DEVICE_CLASS is not set # CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MXC=y
CONFIG_USB_ULPI=y CONFIG_USB_ULPI=y
CONFIG_MMC=y CONFIG_MMC=y
CONFIG_MMC_MXC=y CONFIG_MMC_MXC=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_MC13783=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_RTC_CLASS=y CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_DRV_PCF8563=y
CONFIG_RTC_DRV_IMXDI=y
CONFIG_RTC_MXC=y
CONFIG_DMADEVICES=y
CONFIG_IMX_SDMA=y
CONFIG_IMX_DMA=y
# CONFIG_IOMMU_SUPPORT is not set
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
# CONFIG_PROC_PAGE_MONITOR is not set # CONFIG_PROC_PAGE_MONITOR is not set
CONFIG_TMPFS=y CONFIG_TMPFS=y
@ -119,12 +162,9 @@ CONFIG_UBIFS_FS=y
CONFIG_NFS_FS=y CONFIG_NFS_FS=y
CONFIG_NFS_V3=y CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y CONFIG_ROOT_NFS=y
CONFIG_NLS=y
CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_CODEPAGE_850=m CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=m CONFIG_NLS_ISO8859_15=m
CONFIG_DEBUG_FS=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set

View File

@ -1,91 +0,0 @@
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_EXPERT=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_MXC=y
CONFIG_ARCH_MX1=y
CONFIG_ARCH_MX1ADS=y
CONFIG_MACH_SCB9328=y
CONFIG_MACH_APF9328=y
CONFIG_MXC_IRQ_PRIOR=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off"
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_FW_LOADER=m
CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_PHYSMAP=y
# CONFIG_BLK_DEV is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_NETDEVICES=y
CONFIG_PHYLIB=y
CONFIG_SMSC_PHY=y
CONFIG_NET_ETHERNET=y
CONFIG_DM9000=y
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_INPUT is not set
# CONFIG_SERIO is not set
# CONFIG_VT is not set
CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_IMX=y
CONFIG_W1=y
CONFIG_W1_MASTER_MXC=y
CONFIG_W1_SLAVE_THERM=y
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_IMX=y
CONFIG_USB_ETH=m
CONFIG_MMC=y
CONFIG_MMC_MXC=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY=y
CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set

View File

@ -1,97 +0,0 @@
CONFIG_EXPERIMENTAL=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EXPERT=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_MXC=y
CONFIG_ARCH_MX2=y
CONFIG_MACH_MX21ADS=y
CONFIG_MXC_PWM=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_NET=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_FW_LOADER is not set
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=3
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_GEOMETRY=y
# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_MXC=y
CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_INPUT_MOUSEDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_SERIO is not set
# CONFIG_CONSOLE_TRANSLATIONS is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=1
CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_IMX=y
CONFIG_SPI=y
# CONFIG_HWMON is not set
CONFIG_FB=y
CONFIG_FB_IMX=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_LOGO=y
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
CONFIG_MMC_MXC=y
# CONFIG_DNOTIFY is not set
CONFIG_MSDOS_FS=y
CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set

View File

@ -1,5 +1,6 @@
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
# CONFIG_LOCALVERSION_AUTO is not set # CONFIG_LOCALVERSION_AUTO is not set
CONFIG_KERNEL_LZO=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_BUF_SHIFT=18
CONFIG_RELAY=y CONFIG_RELAY=y
@ -13,21 +14,29 @@ CONFIG_MODULE_SRCVERSION_ALL=y
# CONFIG_LBDAF is not set # CONFIG_LBDAF is not set
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_MXC=y CONFIG_ARCH_MXC=y
CONFIG_ARCH_MX51=y CONFIG_ARCH_MX5=y
CONFIG_MACH_MX51_BABBAGE=y CONFIG_MACH_MX51_BABBAGE=y
CONFIG_MACH_MX51_3DS=y CONFIG_MACH_MX51_3DS=y
CONFIG_MACH_EUKREA_CPUIMX51=y CONFIG_MACH_EUKREA_CPUIMX51=y
CONFIG_MACH_EUKREA_CPUIMX51SD=y
CONFIG_MACH_MX51_EFIKAMX=y
CONFIG_MACH_MX51_EFIKASB=y
CONFIG_MACH_MX53_EVK=y
CONFIG_MACH_MX53_SMD=y
CONFIG_MACH_MX53_LOCO=y
CONFIG_MACH_MX53_ARD=y
CONFIG_MXC_PWM=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_VMSPLIT_2G=y
CONFIG_PREEMPT_VOLUNTARY=y CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_AEABI=y CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set # CONFIG_OABI_COMPAT is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.0.101:/shared/nfs ip=dhcp" CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
CONFIG_VFP=y CONFIG_VFP=y
CONFIG_NEON=y CONFIG_NEON=y
CONFIG_BINFMT_MISC=m CONFIG_BINFMT_MISC=m
CONFIG_PM=y
CONFIG_PM_DEBUG=y CONFIG_PM_DEBUG=y
CONFIG_PM_TEST_SUSPEND=y CONFIG_PM_TEST_SUSPEND=y
CONFIG_NET=y CONFIG_NET=y
@ -42,13 +51,13 @@ CONFIG_IP_PNP_DHCP=y
# CONFIG_INET_LRO is not set # CONFIG_INET_LRO is not set
# CONFIG_IPV6 is not set # CONFIG_IPV6 is not set
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set # CONFIG_STANDALONE is not set
CONFIG_CONNECTOR=y CONFIG_CONNECTOR=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_RAM_SIZE=65536
# CONFIG_MISC_DEVICES is not set
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set # CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_MULTI_LUN=y CONFIG_SCSI_MULTI_LUN=y
@ -56,8 +65,10 @@ CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y CONFIG_SCSI_SCAN_ASYNC=y
# CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_LOWLEVEL is not set
CONFIG_ATA=m CONFIG_ATA=y
CONFIG_PATA_IMX=y
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_MII=m
CONFIG_MARVELL_PHY=y CONFIG_MARVELL_PHY=y
CONFIG_DAVICOM_PHY=y CONFIG_DAVICOM_PHY=y
CONFIG_QSEMI_PHY=y CONFIG_QSEMI_PHY=y
@ -71,49 +82,57 @@ CONFIG_REALTEK_PHY=y
CONFIG_NATIONAL_PHY=y CONFIG_NATIONAL_PHY=y
CONFIG_STE10XP=y CONFIG_STE10XP=y
CONFIG_LSI_ET1011C_PHY=y CONFIG_LSI_ET1011C_PHY=y
CONFIG_MDIO_BITBANG=y CONFIG_MICREL_PHY=y
CONFIG_MDIO_GPIO=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
CONFIG_MII=m
CONFIG_FEC=y
# CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set # CONFIG_NETDEV_10000 is not set
# CONFIG_WLAN is not set # CONFIG_WLAN is not set
CONFIG_INPUT_FF_MEMLESS=m
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set # CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_EVDEV=y CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_INPUT_EVBUG=m CONFIG_INPUT_EVBUG=m
CONFIG_KEYBOARD_GPIO=y
CONFIG_MOUSE_PS2=m CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_MMA8450=y
CONFIG_SERIO_SERPORT=m CONFIG_SERIO_SERPORT=m
CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_DEVKMEM is not set # CONFIG_DEVKMEM is not set
CONFIG_SERIAL_IMX=y CONFIG_SERIAL_IMX=y
CONFIG_SERIAL_IMX_CONSOLE=y CONFIG_SERIAL_IMX_CONSOLE=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM=y
CONFIG_I2C=y CONFIG_I2C=y
# CONFIG_I2C_COMPAT is not set # CONFIG_I2C_COMPAT is not set
CONFIG_I2C_CHARDEV=m CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set # CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_ALGOBIT=m CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m CONFIG_I2C_ALGOPCA=m
CONFIG_I2C_IMX=y
CONFIG_SPI=y
CONFIG_SPI_IMX=y
CONFIG_GPIO_SYSFS=y CONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
# CONFIG_HID_SUPPORT is not set CONFIG_WATCHDOG=y
CONFIG_IMX2_WDT=y
CONFIG_MFD_MC13XXX=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_MC13892=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MXC=y CONFIG_USB_EHCI_MXC=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_MMC=y CONFIG_MMC=y
CONFIG_MMC_BLOCK=m CONFIG_MMC_BLOCK=m
CONFIG_MMC_SDHCI=m CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_ESDHC_IMX=y
CONFIG_NEW_LEDS=y CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS=y
CONFIG_RTC_CLASS=y CONFIG_RTC_CLASS=y
CONFIG_RTC_INTF_DEV_UIE_EMUL=y CONFIG_RTC_INTF_DEV_UIE_EMUL=y
CONFIG_RTC_MXC=y
CONFIG_EXT2_FS=y CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT2_FS_POSIX_ACL=y
@ -127,7 +146,6 @@ CONFIG_EXT4_FS_SECURITY=y
CONFIG_QUOTA=y CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set # CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_AUTOFS_FS=y
CONFIG_AUTOFS4_FS=y CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y CONFIG_FUSE_FS=y
CONFIG_ISO9660_FS=m CONFIG_ISO9660_FS=m
@ -151,17 +169,13 @@ CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_UTF8=y CONFIG_NLS_UTF8=y
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_SCHED_DEBUG is not set # CONFIG_SCHED_DEBUG is not set
# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_FTRACE is not set # CONFIG_FTRACE is not set
# CONFIG_ARM_UNWIND is not set # CONFIG_ARM_UNWIND is not set
CONFIG_DEBUG_LL=y
CONFIG_EARLY_PRINTK=y
CONFIG_SECURITYFS=y CONFIG_SECURITYFS=y
CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_LZO=m
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not set # CONFIG_CRYPTO_HW is not set
CONFIG_CRC_CCITT=m CONFIG_CRC_CCITT=m

View File

@ -26,6 +26,7 @@ CONFIG_MACH_MX23EVK=y
CONFIG_MACH_MX28EVK=y CONFIG_MACH_MX28EVK=y
CONFIG_MACH_STMP378X_DEVB=y CONFIG_MACH_STMP378X_DEVB=y
CONFIG_MACH_TX28=y CONFIG_MACH_TX28=y
CONFIG_MACH_M28EVK=y
# CONFIG_ARM_THUMB is not set # CONFIG_ARM_THUMB is not set
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y

View File

@ -5,6 +5,18 @@ config IMX_HAVE_DMA_V1
# Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2.
# To easily distinguish good and reviewed from unreviewed usages new (and IMHO # To easily distinguish good and reviewed from unreviewed usages new (and IMHO
# more sensible) names are used: SOC_IMX31 and SOC_IMX35 # more sensible) names are used: SOC_IMX31 and SOC_IMX35
config ARCH_MX1
bool
config MACH_MX21
bool
config ARCH_MX25
bool
config MACH_MX27
bool
config ARCH_MX31 config ARCH_MX31
bool bool
@ -13,6 +25,7 @@ config ARCH_MX35
config SOC_IMX1 config SOC_IMX1
bool bool
select ARCH_MX1
select CPU_ARM920T select CPU_ARM920T
select IMX_HAVE_DMA_V1 select IMX_HAVE_DMA_V1
select IMX_HAVE_IOMUX_V1 select IMX_HAVE_IOMUX_V1
@ -20,6 +33,7 @@ config SOC_IMX1
config SOC_IMX21 config SOC_IMX21
bool bool
select MACH_MX21
select CPU_ARM926T select CPU_ARM926T
select ARCH_MXC_AUDMUX_V1 select ARCH_MXC_AUDMUX_V1
select IMX_HAVE_DMA_V1 select IMX_HAVE_DMA_V1
@ -28,6 +42,7 @@ config SOC_IMX21
config SOC_IMX25 config SOC_IMX25
bool bool
select ARCH_MX25
select CPU_ARM926T select CPU_ARM926T
select ARCH_MXC_AUDMUX_V2 select ARCH_MXC_AUDMUX_V2
select ARCH_MXC_IOMUX_V3 select ARCH_MXC_IOMUX_V3
@ -35,6 +50,7 @@ config SOC_IMX25
config SOC_IMX27 config SOC_IMX27
bool bool
select MACH_MX27
select CPU_ARM926T select CPU_ARM926T
select ARCH_MXC_AUDMUX_V1 select ARCH_MXC_AUDMUX_V1
select IMX_HAVE_DMA_V1 select IMX_HAVE_DMA_V1
@ -59,7 +75,7 @@ config SOC_IMX35
select MXC_AVIC select MXC_AVIC
if ARCH_MX1 if ARCH_IMX_V4_V5
comment "MX1 platforms:" comment "MX1 platforms:"
config MACH_MXLADS config MACH_MXLADS
@ -87,30 +103,6 @@ config MACH_APF9328
help help
Say Yes here if you are using the Armadeus APF9328 development board Say Yes here if you are using the Armadeus APF9328 development board
endif
if ARCH_MX2
choice
prompt "CPUs:"
default MACH_MX21
config MACH_MX21
bool "i.MX21 support"
help
This enables support for Freescale's MX2 based i.MX21 processor.
config MACH_MX27
bool "i.MX27 support"
help
This enables support for Freescale's MX2 based i.MX27 processor.
endchoice
endif
if MACH_MX21
comment "MX21 platforms:" comment "MX21 platforms:"
config MACH_MX21ADS config MACH_MX21ADS
@ -124,15 +116,12 @@ config MACH_MX21ADS
Include support for MX21ADS platform. This includes specific Include support for MX21ADS platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
endif
if ARCH_MX25
comment "MX25 platforms:" comment "MX25 platforms:"
config MACH_MX25_3DS config MACH_MX25_3DS
bool "Support MX25PDK (3DS) Platform" bool "Support MX25PDK (3DS) Platform"
select SOC_IMX25 select SOC_IMX25
select IMX_HAVE_PLATFORM_FLEXCAN
select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMXDI_RTC select IMX_HAVE_PLATFORM_IMXDI_RTC
@ -174,10 +163,6 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD
endchoice endchoice
endif
if MACH_MX27
comment "MX27 platforms:" comment "MX27 platforms:"
config MACH_MX27ADS config MACH_MX27ADS
@ -485,6 +470,7 @@ config MACH_QONG
bool "Support Dave/DENX QongEVB-LITE platform" bool "Support Dave/DENX QongEVB-LITE platform"
select SOC_IMX31 select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX2_WDT
help help
Include support for Dave/DENX QongEVB-LITE platform. This includes Include support for Dave/DENX QongEVB-LITE platform. This includes
specific configurations for the board and its peripherals. specific configurations for the board and its peripherals.

View File

@ -1,16 +1,15 @@
obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o
obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o
obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o
obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o
obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
obj-$(CONFIG_SOC_IMX31) += mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35) += mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
# Support for CMOS sensor interface # Support for CMOS sensor interface
obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o

View File

@ -1,56 +0,0 @@
/*
* Copyright (C) 2009-2010 Pengutronix
* Sascha Hauer <s.hauer@pengutronix.de>
* Juergen Beisert <j.beisert@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/hardware.h>
static int mxc_init_l2x0(void)
{
void __iomem *l2x0_base;
void __iomem *clkctl_base;
if (!cpu_is_mx31() && !cpu_is_mx35())
return 0;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096);
if (clkctl_base != NULL) {
writel(0x00000515, clkctl_base + L2_MEM_VAL);
iounmap(clkctl_base);
} else {
pr_err("L2 cache: Cannot fix timing. Trying to continue without\n");
}
l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096);
if (IS_ERR(l2x0_base)) {
printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
PTR_ERR(l2x0_base));
return 0;
}
l2x0_init(l2x0_base, 0x00030024, 0x00000000);
return 0;
}
arch_initcall(mxc_init_l2x0);

View File

@ -263,6 +263,7 @@ DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL);
DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk);
DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL);
DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL); DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL);
DEFINE_CLOCK(iim_clk, 0, CCM_CGCR1, 26, NULL, NULL, NULL);
#define _REGISTER_CLOCK(d, n, c) \ #define _REGISTER_CLOCK(d, n, c) \
{ \ { \
@ -310,6 +311,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("flexcan.1", NULL, can2_clk) _REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
/* i.mx25 has the i.mx35 type sdma */ /* i.mx25 has the i.mx35 type sdma */
_REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk) _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk)
_REGISTER_CLOCK(NULL, "iim", iim_clk)
}; };
int __init mx25_clocks_init(void) int __init mx25_clocks_init(void)
@ -334,6 +336,10 @@ int __init mx25_clocks_init(void)
/* Clock source for gpt is ahb_div */ /* Clock source for gpt is ahb_div */
__raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64); __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64);
clk_enable(&iim_clk);
imx_print_silicon_rev("i.MX25", mx25_revision());
clk_disable(&iim_clk);
mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
return 0; return 0;

View File

@ -583,7 +583,7 @@ DEFINE_CLOCK(emi_clk, 0, PCCR1, 19, NULL, NULL, &ahb_clk);
DEFINE_CLOCK(dma_clk1, 0, PCCR1, 20, NULL, NULL, &ahb_clk); DEFINE_CLOCK(dma_clk1, 0, PCCR1, 20, NULL, NULL, &ahb_clk);
DEFINE_CLOCK(csi_clk1, 0, PCCR1, 21, NULL, NULL, &ahb_clk); DEFINE_CLOCK(csi_clk1, 0, PCCR1, 21, NULL, NULL, &ahb_clk);
DEFINE_CLOCK(brom_clk, 0, PCCR1, 22, NULL, NULL, &ahb_clk); DEFINE_CLOCK(brom_clk, 0, PCCR1, 22, NULL, NULL, &ahb_clk);
DEFINE_CLOCK(ata_clk, 0, PCCR1, 23, NULL, NULL, &ahb_clk); DEFINE_CLOCK(pata_clk, 0, PCCR1, 23, NULL, NULL, &ahb_clk);
DEFINE_CLOCK(wdog_clk, 0, PCCR1, 24, NULL, NULL, &ipg_clk); DEFINE_CLOCK(wdog_clk, 0, PCCR1, 24, NULL, NULL, &ipg_clk);
DEFINE_CLOCK(usb_clk, 0, PCCR1, 25, get_rate_usb, &usb_clk1, &spll_clk); DEFINE_CLOCK(usb_clk, 0, PCCR1, 25, get_rate_usb, &usb_clk1, &spll_clk);
DEFINE_CLOCK(uart6_clk1, 0, PCCR1, 26, NULL, NULL, &ipg_clk); DEFINE_CLOCK(uart6_clk1, 0, PCCR1, 26, NULL, NULL, &ipg_clk);
@ -666,7 +666,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk)
_REGISTER_CLOCK(NULL, "emi", emi_clk) _REGISTER_CLOCK(NULL, "emi", emi_clk)
_REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk)
_REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
_REGISTER_CLOCK(NULL, "mstick", mstick_clk) _REGISTER_CLOCK(NULL, "mstick", mstick_clk)
_REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk) _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
_REGISTER_CLOCK(NULL, "gpio", gpio_clk) _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
@ -751,6 +751,8 @@ int __init mx27_clocks_init(unsigned long fref)
clk_enable(&gpio_clk); clk_enable(&gpio_clk);
clk_enable(&emi_clk); clk_enable(&emi_clk);
clk_enable(&iim_clk); clk_enable(&iim_clk);
imx_print_silicon_rev("i.MX27", mx27_revision());
clk_disable(&iim_clk);
#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
clk_enable(&uart1_clk); clk_enable(&uart1_clk);

View File

@ -476,7 +476,7 @@ DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CGR0, 4, NULL, NULL, &perclk_clk);
DEFINE_CLOCK(epit1_clk, 0, MXC_CCM_CGR0, 6, NULL, NULL, &perclk_clk); DEFINE_CLOCK(epit1_clk, 0, MXC_CCM_CGR0, 6, NULL, NULL, &perclk_clk);
DEFINE_CLOCK(epit2_clk, 1, MXC_CCM_CGR0, 8, NULL, NULL, &perclk_clk); DEFINE_CLOCK(epit2_clk, 1, MXC_CCM_CGR0, 8, NULL, NULL, &perclk_clk);
DEFINE_CLOCK(iim_clk, 0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk); DEFINE_CLOCK(iim_clk, 0, MXC_CCM_CGR0, 10, NULL, NULL, &ipg_clk);
DEFINE_CLOCK(ata_clk, 0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk); DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CGR0, 12, NULL, NULL, &ipg_clk);
DEFINE_CLOCK(sdma_clk1, 0, MXC_CCM_CGR0, 14, NULL, NULL, &ahb_clk); DEFINE_CLOCK(sdma_clk1, 0, MXC_CCM_CGR0, 14, NULL, NULL, &ahb_clk);
DEFINE_CLOCK(cspi3_clk, 2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk); DEFINE_CLOCK(cspi3_clk, 2, MXC_CCM_CGR0, 16, NULL, NULL, &ipg_clk);
DEFINE_CLOCK(rng_clk, 0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk); DEFINE_CLOCK(rng_clk, 0, MXC_CCM_CGR0, 18, NULL, NULL, &ipg_clk);
@ -562,7 +562,7 @@ static struct clk_lookup lookups[] = {
_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)
_REGISTER_CLOCK(NULL, "firi", firi_clk) _REGISTER_CLOCK(NULL, "firi", firi_clk)
_REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
_REGISTER_CLOCK(NULL, "rtic", rtic_clk) _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
_REGISTER_CLOCK(NULL, "rng", rng_clk) _REGISTER_CLOCK(NULL, "rng", rng_clk)
_REGISTER_CLOCK("imx31-sdma", NULL, sdma_clk1) _REGISTER_CLOCK("imx31-sdma", NULL, sdma_clk1)
@ -611,11 +611,11 @@ int __init mx31_clocks_init(unsigned long fref)
clk_enable(&gpt_clk); clk_enable(&gpt_clk);
clk_enable(&emi_clk); clk_enable(&emi_clk);
clk_enable(&iim_clk); clk_enable(&iim_clk);
mx31_revision();
clk_disable(&iim_clk);
clk_enable(&serial_pll_clk); clk_enable(&serial_pll_clk);
mx31_read_cpu_rev();
if (mx31_revision() >= IMX_CHIP_REVISION_2_0) { if (mx31_revision() >= IMX_CHIP_REVISION_2_0) {
reg = __raw_readl(MXC_CCM_PMCR1); reg = __raw_readl(MXC_CCM_PMCR1);
/* No PLL restart on DVFS switch; enable auto EMI handshake */ /* No PLL restart on DVFS switch; enable auto EMI handshake */

View File

@ -354,7 +354,7 @@ static void clk_cgr_disable(struct clk *clk)
} }
DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL); DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL);
DEFINE_CLOCK(ata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL); DEFINE_CLOCK(pata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL);
/* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */ /* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */
DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL); DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL);
DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL); DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL);
@ -447,7 +447,7 @@ static struct clk nfc_clk = {
static struct clk_lookup lookups[] = { static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "asrc", asrc_clk) _REGISTER_CLOCK(NULL, "asrc", asrc_clk)
_REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
_REGISTER_CLOCK("flexcan.0", NULL, can1_clk) _REGISTER_CLOCK("flexcan.0", NULL, can1_clk)
_REGISTER_CLOCK("flexcan.1", NULL, can2_clk) _REGISTER_CLOCK("flexcan.1", NULL, can2_clk)
_REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk) _REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk)
@ -537,7 +537,8 @@ int __init mx35_clocks_init()
__raw_writel(cgr3, CCM_BASE + CCM_CGR3); __raw_writel(cgr3, CCM_BASE + CCM_CGR3);
clk_enable(&iim_clk); clk_enable(&iim_clk);
mx35_read_cpu_rev(); imx_print_silicon_rev("i.MX35", mx35_revision());
clk_disable(&iim_clk);
#ifdef CONFIG_MXC_USE_EPIT #ifdef CONFIG_MXC_USE_EPIT
epit_timer_init(&epit1_clk, epit_timer_init(&epit1_clk,

View File

@ -0,0 +1,41 @@
/*
* MX25 CPU type detection
*
* Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
* 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.
*/
#include <linux/module.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/iim.h>
static int mx25_cpu_rev = -1;
static int mx25_read_cpu_rev(void)
{
u32 rev;
rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV));
switch (rev) {
case 0x00:
return IMX_CHIP_REVISION_1_0;
case 0x01:
return IMX_CHIP_REVISION_1_1;
default:
return IMX_CHIP_REVISION_UNKNOWN;
}
}
int mx25_revision(void)
{
if (mx25_cpu_rev == -1)
mx25_cpu_rev = mx25_read_cpu_rev();
return mx25_cpu_rev;
}
EXPORT_SYMBOL(mx25_revision);

View File

@ -26,12 +26,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
static int cpu_silicon_rev = -1; static int mx27_cpu_rev = -1;
static int cpu_partnumber; static int mx27_cpu_partnumber;
#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */
static void query_silicon_parameter(void) static int mx27_read_cpu_rev(void)
{ {
u32 val; u32 val;
/* /*
@ -42,20 +42,18 @@ static void query_silicon_parameter(void)
val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR
+ SYS_CHIP_ID)); + SYS_CHIP_ID));
mx27_cpu_partnumber = (int)((val >> 12) & 0xFFFF);
switch (val >> 28) { switch (val >> 28) {
case 0: case 0:
cpu_silicon_rev = IMX_CHIP_REVISION_1_0; return IMX_CHIP_REVISION_1_0;
break;
case 1: case 1:
cpu_silicon_rev = IMX_CHIP_REVISION_2_0; return IMX_CHIP_REVISION_2_0;
break;
case 2: case 2:
cpu_silicon_rev = IMX_CHIP_REVISION_2_1; return IMX_CHIP_REVISION_2_1;
break;
default: default:
cpu_silicon_rev = IMX_CHIP_REVISION_UNKNOWN; return IMX_CHIP_REVISION_UNKNOWN;
} }
cpu_partnumber = (int)((val >> 12) & 0xFFFF);
} }
/* /*
@ -65,12 +63,12 @@ static void query_silicon_parameter(void)
*/ */
int mx27_revision(void) int mx27_revision(void)
{ {
if (cpu_silicon_rev == -1) if (mx27_cpu_rev == -1)
query_silicon_parameter(); mx27_cpu_rev = mx27_read_cpu_rev();
if (cpu_partnumber != 0x8821) if (mx27_cpu_partnumber != 0x8821)
return -EINVAL; return -EINVAL;
return cpu_silicon_rev; return mx27_cpu_rev;
} }
EXPORT_SYMBOL(mx27_revision); EXPORT_SYMBOL(mx27_revision);

View File

@ -13,45 +13,50 @@
#include <linux/io.h> #include <linux/io.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iim.h> #include <mach/iim.h>
#include <mach/common.h>
unsigned int mx31_cpu_rev; static int mx31_cpu_rev = -1;
EXPORT_SYMBOL(mx31_cpu_rev);
static struct { static struct {
u8 srev; u8 srev;
const char *name; const char *name;
const char *v;
unsigned int rev; unsigned int rev;
} mx31_cpu_type[] __initdata = { } mx31_cpu_type[] = {
{ .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 }, { .srev = 0x00, .name = "i.MX31(L)", .rev = IMX_CHIP_REVISION_1_0 },
{ .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, { .srev = 0x10, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 },
{ .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, { .srev = 0x11, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 },
{ .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, { .srev = 0x12, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 },
{ .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, { .srev = 0x13, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 },
{ .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, { .srev = 0x14, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_2 },
{ .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, { .srev = 0x15, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_2 },
{ .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, { .srev = 0x28, .name = "i.MX31", .rev = IMX_CHIP_REVISION_2_0 },
{ .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, { .srev = 0x29, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_2_0 },
}; };
void __init mx31_read_cpu_rev(void) static int mx31_read_cpu_rev(void)
{ {
u32 i, srev; u32 i, srev;
/* read SREV register from IIM module */ /* read SREV register from IIM module */
srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV));
srev &= 0xff;
for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
if (srev == mx31_cpu_type[i].srev) { if (srev == mx31_cpu_type[i].srev) {
printk(KERN_INFO imx_print_silicon_rev(mx31_cpu_type[i].name,
"CPU identified as %s, silicon rev %s\n", mx31_cpu_type[i].rev);
mx31_cpu_type[i].name, mx31_cpu_type[i].v); return mx31_cpu_type[i].rev;
mx31_cpu_rev = mx31_cpu_type[i].rev;
return;
} }
mx31_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; imx_print_silicon_rev("i.MX31", IMX_CHIP_REVISION_UNKNOWN);
return IMX_CHIP_REVISION_UNKNOWN;
printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev);
} }
int mx31_revision(void)
{
if (mx31_cpu_rev == -1)
mx31_cpu_rev = mx31_read_cpu_rev();
return mx31_cpu_rev;
}
EXPORT_SYMBOL(mx31_revision);

View File

@ -13,32 +13,30 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iim.h> #include <mach/iim.h>
unsigned int mx35_cpu_rev; static int mx35_cpu_rev = -1;
EXPORT_SYMBOL(mx35_cpu_rev);
void __init mx35_read_cpu_rev(void) static int mx35_read_cpu_rev(void)
{ {
u32 rev; u32 rev;
char *srev;
rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV));
switch (rev) { switch (rev) {
case 0x00: case 0x00:
mx35_cpu_rev = IMX_CHIP_REVISION_1_0; return IMX_CHIP_REVISION_1_0;
srev = "1.0";
break;
case 0x10: case 0x10:
mx35_cpu_rev = IMX_CHIP_REVISION_2_0; return IMX_CHIP_REVISION_2_0;
srev = "2.0";
break;
case 0x11: case 0x11:
mx35_cpu_rev = IMX_CHIP_REVISION_2_1; return IMX_CHIP_REVISION_2_1;
srev = "2.1";
break;
default: default:
mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; return IMX_CHIP_REVISION_UNKNOWN;
srev = "unknown";
} }
printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev);
} }
int mx35_revision(void)
{
if (mx35_cpu_rev == -1)
mx35_cpu_rev = mx35_read_cpu_rev();
return mx35_cpu_rev;
}
EXPORT_SYMBOL(mx35_revision);

View File

@ -76,3 +76,7 @@ extern const struct imx_spi_imx_data imx27_cspi_data[];
#define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) #define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata)
#define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata) #define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata)
#define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata) #define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata)
extern const struct imx_pata_imx_data imx27_pata_imx_data;
#define imx27_add_pata_imx() \
imx_add_pata_imx(&imx27_pata_imx_data)

View File

@ -78,3 +78,7 @@ extern const struct imx_spi_imx_data imx31_cspi_data[];
#define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata) #define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata)
#define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata) #define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata)
#define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata) #define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata)
extern const struct imx_pata_imx_data imx31_pata_imx_data;
#define imx31_add_pata_imx() \
imx_add_pata_imx(&imx31_pata_imx_data)

View File

@ -81,3 +81,7 @@ extern const struct imx_spi_imx_data imx35_cspi_data[];
imx_add_spi_imx(&imx35_cspi_data[id], pdata) imx_add_spi_imx(&imx35_cspi_data[id], pdata)
#define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata)
#define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) #define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata)
extern const struct imx_pata_imx_data imx35_pata_imx_data;
#define imx35_add_pata_imx() \
imx_add_pata_imx(&imx35_pata_imx_data)

View File

@ -136,6 +136,7 @@ MACHINE_START(APF9328, "Armadeus APF9328")
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early, .init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.handle_irq = imx1_handle_irq,
.timer = &apf9328_timer, .timer = &apf9328_timer,
.init_machine = apf9328_init, .init_machine = apf9328_init,
MACHINE_END MACHINE_END

View File

@ -314,25 +314,19 @@ static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
}, },
}; };
static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { static const struct physmap_flash_data
armadillo5x0_nor_flash_pdata __initconst = {
.width = 2, .width = 2,
.parts = armadillo5x0_nor_flash_partitions, .parts = armadillo5x0_nor_flash_partitions,
.nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
}; };
static struct resource armadillo5x0_nor_flash_resource = { static const struct resource armadillo5x0_nor_flash_resource __initconst = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
.start = MX31_CS0_BASE_ADDR, .start = MX31_CS0_BASE_ADDR,
.end = MX31_CS0_BASE_ADDR + SZ_64M - 1, .end = MX31_CS0_BASE_ADDR + SZ_64M - 1,
}; };
static struct platform_device armadillo5x0_nor_flash = {
.name = "physmap-flash",
.id = -1,
.num_resources = 1,
.resource = &armadillo5x0_nor_flash_resource,
};
/* /*
* FB support * FB support
*/ */
@ -514,8 +508,10 @@ static void __init armadillo5x0_init(void)
imx31_add_mx3_sdc_fb(&mx3fb_pdata); imx31_add_mx3_sdc_fb(&mx3fb_pdata);
/* Register NOR Flash */ /* Register NOR Flash */
mxc_register_device(&armadillo5x0_nor_flash, platform_device_register_resndata(NULL, "physmap-flash", -1,
&armadillo5x0_nor_flash_pdata); &armadillo5x0_nor_flash_resource, 1,
&armadillo5x0_nor_flash_pdata,
sizeof(armadillo5x0_nor_flash_pdata));
/* Register NAND Flash */ /* Register NAND Flash */
imx31_add_mxc_nand(&armadillo5x0_nand_board_info); imx31_add_mxc_nand(&armadillo5x0_nand_board_info);
@ -562,6 +558,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &armadillo5x0_timer, .timer = &armadillo5x0_timer,
.init_machine = armadillo5x0_init, .init_machine = armadillo5x0_init,
MACHINE_END MACHINE_END

View File

@ -62,6 +62,7 @@ MACHINE_START(BUG, "BugLabs BUGBase")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &bug_timer, .timer = &bug_timer,
.init_machine = bug_board_init, .init_machine = bug_board_init,
MACHINE_END MACHINE_END

View File

@ -315,6 +315,7 @@ MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &eukrea_cpuimx27_timer, .timer = &eukrea_cpuimx27_timer,
.init_machine = eukrea_cpuimx27_init, .init_machine = eukrea_cpuimx27_init,
MACHINE_END MACHINE_END

View File

@ -66,7 +66,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x48), I2C_BOARD_INFO("tsc2007", 0x48),
.type = "tsc2007", .type = "tsc2007",
.platform_data = &tsc2007_info, .platform_data = &tsc2007_info,
.irq = gpio_to_irq(TSC2007_IRQGPIO), .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
}, },
}; };
@ -198,6 +198,7 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early, .init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.handle_irq = imx35_handle_irq,
.timer = &eukrea_cpuimx35_timer, .timer = &eukrea_cpuimx35_timer,
.init_machine = eukrea_cpuimx35_init, .init_machine = eukrea_cpuimx35_init,
MACHINE_END MACHINE_END

View File

@ -167,6 +167,7 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
.map_io = mx25_map_io, .map_io = mx25_map_io,
.init_early = imx25_init_early, .init_early = imx25_init_early,
.init_irq = mx25_init_irq, .init_irq = mx25_init_irq,
.handle_irq = imx25_handle_irq,
.timer = &eukrea_cpuimx25_timer, .timer = &eukrea_cpuimx25_timer,
.init_machine = eukrea_cpuimx25_init, .init_machine = eukrea_cpuimx25_init,
MACHINE_END MACHINE_END

View File

@ -279,6 +279,7 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &visstrim_m10_timer, .timer = &visstrim_m10_timer,
.init_machine = visstrim_m10_board_init, .init_machine = visstrim_m10_board_init,
MACHINE_END MACHINE_END

View File

@ -75,6 +75,7 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &mx27ipcam_timer, .timer = &mx27ipcam_timer,
.init_machine = mx27ipcam_init, .init_machine = mx27ipcam_init,
MACHINE_END MACHINE_END

View File

@ -81,6 +81,7 @@ MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &mx27lite_timer, .timer = &mx27lite_timer,
.init_machine = mx27lite_init, .init_machine = mx27lite_init,
MACHINE_END MACHINE_END

View File

@ -275,6 +275,7 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
.map_io = kzm_map_io, .map_io = kzm_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &kzm_timer, .timer = &kzm_timer,
.init_machine = kzm_board_init, .init_machine = kzm_board_init,
MACHINE_END MACHINE_END

View File

@ -68,23 +68,16 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
* Physmap flash * Physmap flash
*/ */
static struct physmap_flash_data mx1ads_flash_data = { static const struct physmap_flash_data mx1ads_flash_data __initconst = {
.width = 4, /* bankwidth in bytes */ .width = 4, /* bankwidth in bytes */
}; };
static struct resource flash_resource = { static const struct resource flash_resource __initconst = {
.start = MX1_CS0_PHYS, .start = MX1_CS0_PHYS,
.end = MX1_CS0_PHYS + SZ_32M - 1, .end = MX1_CS0_PHYS + SZ_32M - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
static struct platform_device flash_device = {
.name = "physmap-flash",
.id = 0,
.resource = &flash_resource,
.num_resources = 1,
};
/* /*
* I2C * I2C
*/ */
@ -125,7 +118,9 @@ static void __init mx1ads_init(void)
imx1_add_imx_uart1(&uart1_pdata); imx1_add_imx_uart1(&uart1_pdata);
/* Physmap flash */ /* Physmap flash */
mxc_register_device(&flash_device, &mx1ads_flash_data); platform_device_register_resndata(NULL, "physmap-flash", 0,
&flash_resource, 1,
&mx1ads_flash_data, sizeof(mx1ads_flash_data));
/* I2C */ /* I2C */
i2c_register_board_info(0, mx1ads_i2c_devices, i2c_register_board_info(0, mx1ads_i2c_devices,
@ -149,6 +144,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early, .init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.handle_irq = imx1_handle_irq,
.timer = &mx1ads_timer, .timer = &mx1ads_timer,
.init_machine = mx1ads_init, .init_machine = mx1ads_init,
MACHINE_END MACHINE_END
@ -158,6 +154,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early, .init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.handle_irq = imx1_handle_irq,
.timer = &mx1ads_timer, .timer = &mx1ads_timer,
.init_machine = mx1ads_init, .init_machine = mx1ads_init,
MACHINE_END MACHINE_END

View File

@ -309,6 +309,7 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
.map_io = mx21ads_map_io, .map_io = mx21ads_map_io,
.init_early = imx21_init_early, .init_early = imx21_init_early,
.init_irq = mx21_init_irq, .init_irq = mx21_init_irq,
.handle_irq = imx21_handle_irq,
.timer = &mx21ads_timer, .timer = &mx21ads_timer,
.init_machine = mx21ads_board_init, .init_machine = mx21ads_board_init,
MACHINE_END MACHINE_END

View File

@ -43,6 +43,8 @@
#include "devices-imx25.h" #include "devices-imx25.h"
#define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6)
static const struct imxuart_platform_data uart_pdata __initconst = { static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
@ -108,6 +110,11 @@ static iomux_v3_cfg_t mx25pdk_pads[] = {
/* I2C1 */ /* I2C1 */
MX25_PAD_I2C1_CLK__I2C1_CLK, MX25_PAD_I2C1_CLK__I2C1_CLK,
MX25_PAD_I2C1_DAT__I2C1_DAT, MX25_PAD_I2C1_DAT__I2C1_DAT,
/* CAN1 */
MX25_PAD_GPIO_A__CAN1_TX,
MX25_PAD_GPIO_B__CAN1_RX,
MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */
}; };
static const struct fec_platform_data mx25_fec_pdata __initconst = { static const struct fec_platform_data mx25_fec_pdata __initconst = {
@ -240,6 +247,9 @@ static void __init mx25pdk_init(void)
imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
imx25_add_flexcan0(NULL);
} }
static void __init mx25pdk_timer_init(void) static void __init mx25pdk_timer_init(void)
@ -257,6 +267,7 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
.map_io = mx25_map_io, .map_io = mx25_map_io,
.init_early = imx25_init_early, .init_early = imx25_init_early,
.init_irq = mx25_init_irq, .init_irq = mx25_init_irq,
.handle_irq = imx25_handle_irq,
.timer = &mx25pdk_timer, .timer = &mx25pdk_timer,
.init_machine = mx25pdk_init, .init_machine = mx25pdk_init,
MACHINE_END MACHINE_END

View File

@ -359,7 +359,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
.bus_num = 1, .bus_num = 1,
.chip_select = 0, /* SS0 */ .chip_select = 0, /* SS0 */
.platform_data = &mc13783_pdata, .platform_data = &mc13783_pdata,
.irq = gpio_to_irq(PMIC_INT), .irq = IMX_GPIO_TO_IRQ(PMIC_INT),
.mode = SPI_CS_HIGH, .mode = SPI_CS_HIGH,
}, { }, {
.modalias = "l4f00242t03", .modalias = "l4f00242t03",
@ -425,6 +425,7 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &mx27pdk_timer, .timer = &mx27pdk_timer,
.init_machine = mx27pdk_init, .init_machine = mx27pdk_init,
MACHINE_END MACHINE_END

View File

@ -349,6 +349,7 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
.map_io = mx27ads_map_io, .map_io = mx27ads_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &mx27ads_timer, .timer = &mx27ads_timer,
.init_machine = mx27ads_board_init, .init_machine = mx27ads_board_init,
MACHINE_END MACHINE_END

View File

@ -768,6 +768,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &mx31_3ds_timer, .timer = &mx31_3ds_timer,
.init_machine = mx31_3ds_init, .init_machine = mx31_3ds_init,
.reserve = mx31_3ds_reserve, .reserve = mx31_3ds_reserve,

View File

@ -539,6 +539,7 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
.map_io = mx31ads_map_io, .map_io = mx31ads_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31ads_init_irq, .init_irq = mx31ads_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &mx31ads_timer, .timer = &mx31ads_timer,
.init_machine = mx31ads_init, .init_machine = mx31ads_init,
MACHINE_END MACHINE_END

View File

@ -299,6 +299,7 @@ MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &mx31lilly_timer, .timer = &mx31lilly_timer,
.init_machine = mx31lilly_board_init, .init_machine = mx31lilly_board_init,
MACHINE_END MACHINE_END

View File

@ -284,6 +284,7 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
.map_io = mx31lite_map_io, .map_io = mx31lite_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &mx31lite_timer, .timer = &mx31lite_timer,
.init_machine = mx31lite_init, .init_machine = mx31lite_init,
MACHINE_END MACHINE_END

View File

@ -28,6 +28,9 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
@ -490,6 +493,18 @@ err:
} }
static void mx31moboard_poweroff(void)
{
struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
clk_enable(clk);
mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);
__raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
}
static int mx31moboard_baseboard; static int mx31moboard_baseboard;
core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
@ -528,6 +543,8 @@ static void __init mx31moboard_init(void)
moboard_usbh2_init(); moboard_usbh2_init();
pm_power_off = mx31moboard_poweroff;
switch (mx31moboard_baseboard) { switch (mx31moboard_baseboard) {
case MX31NOBOARD: case MX31NOBOARD:
break; break;
@ -572,6 +589,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &mx31moboard_timer, .timer = &mx31moboard_timer,
.init_machine = mx31moboard_init, .init_machine = mx31moboard_init,
MACHINE_END MACHINE_END

View File

@ -221,6 +221,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early, .init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.handle_irq = imx35_handle_irq,
.timer = &mx35pdk_timer, .timer = &mx35pdk_timer,
.init_machine = mx35_3ds_init, .init_machine = mx35_3ds_init,
MACHINE_END MACHINE_END

View File

@ -271,6 +271,7 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &mxt_td60_timer, .timer = &mxt_td60_timer,
.init_machine = mxt_td60_board_init, .init_machine = mxt_td60_board_init,
MACHINE_END MACHINE_END

View File

@ -439,6 +439,7 @@ MACHINE_START(PCA100, "phyCARD-i.MX27")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.init_machine = pca100_init, .init_machine = pca100_init,
.timer = &pca100_timer, .timer = &pca100_timer,
MACHINE_END MACHINE_END

View File

@ -693,6 +693,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &pcm037_timer, .timer = &pcm037_timer,
.init_machine = pcm037_init, .init_machine = pcm037_init,
MACHINE_END MACHINE_END

View File

@ -353,6 +353,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
.init_irq = mx27_init_irq, .init_irq = mx27_init_irq,
.handle_irq = imx27_handle_irq,
.timer = &pcm038_timer, .timer = &pcm038_timer,
.init_machine = pcm038_init, .init_machine = pcm038_init,
MACHINE_END MACHINE_END

View File

@ -422,6 +422,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early, .init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.handle_irq = imx35_handle_irq,
.timer = &pcm043_timer, .timer = &pcm043_timer,
.init_machine = pcm043_init, .init_machine = pcm043_init,
MACHINE_END MACHINE_END

View File

@ -249,6 +249,7 @@ static void __init qong_init(void)
mxc_init_imx_uart(); mxc_init_imx_uart();
qong_init_nor_mtd(); qong_init_nor_mtd();
qong_init_fpga(); qong_init_fpga();
imx31_add_imx2_wdt(NULL);
} }
static void __init qong_timer_init(void) static void __init qong_timer_init(void)
@ -266,6 +267,7 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
.map_io = mx31_map_io, .map_io = mx31_map_io,
.init_early = imx31_init_early, .init_early = imx31_init_early,
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.handle_irq = imx31_handle_irq,
.timer = &qong_timer, .timer = &qong_timer,
.init_machine = qong_init, .init_machine = qong_init,
MACHINE_END MACHINE_END

View File

@ -141,6 +141,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
.map_io = mx1_map_io, .map_io = mx1_map_io,
.init_early = imx1_init_early, .init_early = imx1_init_early,
.init_irq = mx1_init_irq, .init_irq = mx1_init_irq,
.handle_irq = imx1_handle_irq,
.timer = &scb9328_timer, .timer = &scb9328_timer,
.init_machine = scb9328_init, .init_machine = scb9328_init,
MACHINE_END MACHINE_END

View File

@ -162,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = {
}, { }, {
I2C_BOARD_INFO("mc13892", 0x08), I2C_BOARD_INFO("mc13892", 0x08),
.platform_data = &vpr200_pmic, .platform_data = &vpr200_pmic,
.irq = gpio_to_irq(GPIO_PMIC_INT), .irq = IMX_GPIO_TO_IRQ(GPIO_PMIC_INT),
} }
}; };
@ -319,6 +319,7 @@ MACHINE_START(VPR200, "VPR200")
.map_io = mx35_map_io, .map_io = mx35_map_io,
.init_early = imx35_init_early, .init_early = imx35_init_early,
.init_irq = mx35_init_irq, .init_irq = mx35_init_irq,
.handle_irq = imx35_handle_irq,
.timer = &vpr200_timer, .timer = &vpr200_timer,
.init_machine = vpr200_board_init, .init_machine = vpr200_board_init,
MACHINE_END MACHINE_END

256
arch/arm/mach-imx/mm-imx3.c Normal file
View File

@ -0,0 +1,256 @@
/*
* Copyright (C) 1999,2000 Arm Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
* Copyright (C) 2002 Shane Nay (shane@minirl.com)
* Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* - add MX31 specific definitions
*
* 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.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/devices-common.h>
#include <mach/hardware.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
static void imx3_idle(void)
{
unsigned long reg = 0;
__asm__ __volatile__(
/* disable I and D cache */
"mrc p15, 0, %0, c1, c0, 0\n"
"bic %0, %0, #0x00001000\n"
"bic %0, %0, #0x00000004\n"
"mcr p15, 0, %0, c1, c0, 0\n"
/* invalidate I cache */
"mov %0, #0\n"
"mcr p15, 0, %0, c7, c5, 0\n"
/* clear and invalidate D cache */
"mov %0, #0\n"
"mcr p15, 0, %0, c7, c14, 0\n"
/* WFI */
"mov %0, #0\n"
"mcr p15, 0, %0, c7, c0, 4\n"
"nop\n" "nop\n" "nop\n" "nop\n"
"nop\n" "nop\n" "nop\n"
/* enable I and D cache */
"mrc p15, 0, %0, c1, c0, 0\n"
"orr %0, %0, #0x00001000\n"
"orr %0, %0, #0x00000004\n"
"mcr p15, 0, %0, c1, c0, 0\n"
: "=r" (reg));
}
static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
unsigned int mtype)
{
if (mtype == MT_DEVICE) {
/*
* Access all peripherals below 0x80000000 as nonshared device
* on mx3, but leave l2cc alone. Otherwise cache corruptions
* can occur.
*/
if (phys_addr < 0x80000000 &&
!addr_in_module(phys_addr, MX3x_L2CC))
mtype = MT_DEVICE_NONSHARED;
}
return __arm_ioremap(phys_addr, size, mtype);
}
void imx3_init_l2x0(void)
{
void __iomem *l2x0_base;
void __iomem *clkctl_base;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096);
if (clkctl_base != NULL) {
writel(0x00000515, clkctl_base + L2_MEM_VAL);
iounmap(clkctl_base);
} else {
pr_err("L2 cache: Cannot fix timing. Trying to continue without\n");
}
l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096);
if (IS_ERR(l2x0_base)) {
printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
PTR_ERR(l2x0_base));
return;
}
l2x0_init(l2x0_base, 0x00030024, 0x00000000);
}
static struct map_desc mx31_io_desc[] __initdata = {
imx_map_entry(MX31, X_MEMC, MT_DEVICE),
imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx31_map_io(void)
{
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
static struct map_desc mx35_io_desc[] __initdata = {
imx_map_entry(MX35, X_MEMC, MT_DEVICE),
imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
};
void __init mx35_map_io(void)
{
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
}
void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
imx_idle = imx3_idle;
imx_ioremap = imx3_ioremap;
}
void __init imx35_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
imx_idle = imx3_idle;
imx_ioremap = imx3_ioremap;
}
void __init mx31_init_irq(void)
{
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
}
void __init mx35_init_irq(void)
{
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
}
static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = {
.per_2_per_addr = 1677,
};
static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = {
.ap_2_ap_addr = 423,
.ap_2_bp_addr = 829,
.bp_2_ap_addr = 1029,
};
static struct sdma_platform_data imx31_sdma_pdata __initdata = {
.fw_name = "sdma-imx31-to2.bin",
.script_addrs = &imx31_to2_sdma_script,
};
void __init imx31_soc_init(void)
{
int to_version = mx31_revision() >> 4;
imx3_init_l2x0();
mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
if (to_version == 1) {
strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin",
strlen(imx31_sdma_pdata.fw_name));
imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script;
}
imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
}
static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = {
.ap_2_ap_addr = 642,
.uart_2_mcu_addr = 817,
.mcu_2_app_addr = 747,
.uartsh_2_mcu_addr = 1183,
.per_2_shp_addr = 1033,
.mcu_2_shp_addr = 961,
.ata_2_mcu_addr = 1333,
.mcu_2_ata_addr = 1252,
.app_2_mcu_addr = 683,
.shp_2_per_addr = 1111,
.shp_2_mcu_addr = 892,
};
static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = {
.ap_2_ap_addr = 729,
.uart_2_mcu_addr = 904,
.per_2_app_addr = 1597,
.mcu_2_app_addr = 834,
.uartsh_2_mcu_addr = 1270,
.per_2_shp_addr = 1120,
.mcu_2_shp_addr = 1048,
.ata_2_mcu_addr = 1429,
.mcu_2_ata_addr = 1339,
.app_2_per_addr = 1531,
.app_2_mcu_addr = 770,
.shp_2_per_addr = 1198,
.shp_2_mcu_addr = 979,
};
static struct sdma_platform_data imx35_sdma_pdata __initdata = {
.fw_name = "sdma-imx35-to2.bin",
.script_addrs = &imx35_to2_sdma_script,
};
void __init imx35_soc_init(void)
{
int to_version = mx35_revision() >> 4;
imx3_init_l2x0();
/* i.mx35 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
if (to_version == 1) {
strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin",
strlen(imx35_sdma_pdata.fw_name));
imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script;
}
imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata);
}

View File

@ -1,91 +0,0 @@
/*
* Copyright (C) 1999,2000 Arm Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
* Copyright (C) 2002 Shane Nay (shane@minirl.com)
* Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* - add MX31 specific definitions
*
* 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.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/devices-common.h>
#include <mach/hardware.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
static struct map_desc mx31_io_desc[] __initdata = {
imx_map_entry(MX31, X_MEMC, MT_DEVICE),
imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx31_map_io(void)
{
iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc));
}
void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
}
void __init mx31_init_irq(void)
{
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
}
static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = {
.per_2_per_addr = 1677,
};
static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = {
.ap_2_ap_addr = 423,
.ap_2_bp_addr = 829,
.bp_2_ap_addr = 1029,
};
static struct sdma_platform_data imx31_sdma_pdata __initdata = {
.fw_name = "sdma-imx31-to2.bin",
.script_addrs = &imx31_to2_sdma_script,
};
void __init imx31_soc_init(void)
{
int to_version = mx31_revision() >> 4;
mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
if (to_version == 1) {
strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin",
strlen(imx31_sdma_pdata.fw_name));
imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script;
}
imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
}

View File

@ -1,109 +0,0 @@
/*
* Copyright (C) 1999,2000 Arm Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
* Copyright (C) 2002 Shane Nay (shane@minirl.com)
* Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* - add MX31 specific definitions
*
* 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.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/common.h>
#include <mach/devices-common.h>
#include <mach/hardware.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
static struct map_desc mx35_io_desc[] __initdata = {
imx_map_entry(MX35, X_MEMC, MT_DEVICE),
imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
};
void __init mx35_map_io(void)
{
iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc));
}
void __init imx35_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
}
void __init mx35_init_irq(void)
{
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
}
static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = {
.ap_2_ap_addr = 642,
.uart_2_mcu_addr = 817,
.mcu_2_app_addr = 747,
.uartsh_2_mcu_addr = 1183,
.per_2_shp_addr = 1033,
.mcu_2_shp_addr = 961,
.ata_2_mcu_addr = 1333,
.mcu_2_ata_addr = 1252,
.app_2_mcu_addr = 683,
.shp_2_per_addr = 1111,
.shp_2_mcu_addr = 892,
};
static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = {
.ap_2_ap_addr = 729,
.uart_2_mcu_addr = 904,
.per_2_app_addr = 1597,
.mcu_2_app_addr = 834,
.uartsh_2_mcu_addr = 1270,
.per_2_shp_addr = 1120,
.mcu_2_shp_addr = 1048,
.ata_2_mcu_addr = 1429,
.mcu_2_ata_addr = 1339,
.app_2_per_addr = 1531,
.app_2_mcu_addr = 770,
.shp_2_per_addr = 1198,
.shp_2_mcu_addr = 979,
};
static struct sdma_platform_data imx35_sdma_pdata __initdata = {
.fw_name = "sdma-imx35-to2.bin",
.script_addrs = &imx35_to2_sdma_script,
};
void __init imx35_soc_init(void)
{
int to_version = mx35_revision() >> 4;
/* i.mx35 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0);
mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
if (to_version == 1) {
strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin",
strlen(imx35_sdma_pdata.fw_name));
imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script;
}
imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata);
}

View File

@ -11,7 +11,7 @@
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/system.h> #include <mach/system.h>
#include <mach/mx27.h> #include <mach/hardware.h>
static int mx27_suspend_enter(suspend_state_t state) static int mx27_suspend_enter(suspend_state_t state)
{ {

View File

@ -1,8 +1,9 @@
if ARCH_MX503 || ARCH_MX51 if ARCH_MX5
# ARCH_MX5/50/53 are left to mark places where prevent multi-soc in single # ARCH_MX5/50/53 are left to mark places where prevent multi-soc in single
# image. So for most time, SOC_IMX50/51/53 should be used. # image. So for most time, SOC_IMX50/51/53 should be used.
config ARCH_MX5 config ARCH_MX51
bool bool
config ARCH_MX50 config ARCH_MX50
@ -19,7 +20,6 @@ config SOC_IMX50
select ARCH_MXC_IOMUX_V3 select ARCH_MXC_IOMUX_V3
select ARCH_MXC_AUDMUX_V2 select ARCH_MXC_AUDMUX_V2
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select ARCH_MX5
select ARCH_MX50 select ARCH_MX50
config SOC_IMX51 config SOC_IMX51
@ -30,7 +30,7 @@ config SOC_IMX51
select ARCH_MXC_IOMUX_V3 select ARCH_MXC_IOMUX_V3
select ARCH_MXC_AUDMUX_V2 select ARCH_MXC_AUDMUX_V2
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select ARCH_MX5 select ARCH_MX51
config SOC_IMX53 config SOC_IMX53
bool bool
@ -38,10 +38,8 @@ config SOC_IMX53
select ARM_L1_CACHE_SHIFT_6 select ARM_L1_CACHE_SHIFT_6
select MXC_TZIC select MXC_TZIC
select ARCH_MXC_IOMUX_V3 select ARCH_MXC_IOMUX_V3
select ARCH_MX5
select ARCH_MX53 select ARCH_MX53
if ARCH_MX50_SUPPORTED
#comment "i.MX50 machines:" #comment "i.MX50 machines:"
config MACH_MX50_RDP config MACH_MX50_RDP
@ -52,22 +50,20 @@ config MACH_MX50_RDP
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
select IMX_HAVE_PLATFORM_FEC
help help
Include support for MX50 reference design platform (RDP) board. This Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals. includes specific configurations for the board and its peripherals.
endif # ARCH_MX50_SUPPORTED
if ARCH_MX51
comment "i.MX51 machines:" comment "i.MX51 machines:"
config MACH_MX51_BABBAGE config MACH_MX51_BABBAGE
bool "Support MX51 BABBAGE platforms" bool "Support MX51 BABBAGE platforms"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
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
help help
@ -91,8 +87,10 @@ config MACH_MX51_3DS
config MACH_EUKREA_CPUIMX51 config MACH_EUKREA_CPUIMX51
bool "Support Eukrea CPUIMX51 module" bool "Support Eukrea CPUIMX51 module"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX select IMX_HAVE_PLATFORM_SPI_IMX
help help
@ -119,10 +117,12 @@ endchoice
config MACH_EUKREA_CPUIMX51SD config MACH_EUKREA_CPUIMX51SD
bool "Support Eukrea CPUIMX51SD module" bool "Support Eukrea CPUIMX51SD module"
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
help help
Include support for Eukrea CPUIMX51SD platform. This includes Include support for Eukrea CPUIMX51SD platform. This includes
specific configurations for the module and its peripherals. specific configurations for the module and its peripherals.
@ -147,6 +147,8 @@ config MX51_EFIKA_COMMON
bool bool
select SOC_IMX51 select SOC_IMX51
select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_PATA_IMX
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
select MXC_ULPI if USB_ULPI select MXC_ULPI if USB_ULPI
@ -167,9 +169,6 @@ config MACH_MX51_EFIKASB
Include support for Genesi Efika Smartbook. This includes specific Include support for Genesi Efika Smartbook. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
endif # ARCH_MX51
if ARCH_MX53_SUPPORTED
comment "i.MX53 machines:" comment "i.MX53 machines:"
config MACH_MX53_EVK config MACH_MX53_EVK
@ -221,6 +220,4 @@ config MACH_MX53_ARD
Include support for MX53 ARD platform. This includes specific Include support for MX53 ARD platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
endif # ARCH_MX53_SUPPORTED
endif endif

View File

@ -3,8 +3,7 @@
# #
# Object file lists. # Object file lists.
obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o obj-y := cpu.o mm.o clock-mx51-mx53.o ehci.o system.o
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
obj-$(CONFIG_PM) += pm-imx5.o obj-$(CONFIG_PM) += pm-imx5.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o

View File

@ -22,21 +22,18 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <mach/eukrea-baseboards.h> #include <mach/eukrea-baseboards.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27) #define CPUIMX51_USBH1_STP IMX_GPIO_NR(1, 27)
#define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28) #define CPUIMX51_QUARTA_GPIO IMX_GPIO_NR(3, 28)
@ -57,7 +54,7 @@
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
.irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTA_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -65,7 +62,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000),
.irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTB_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -73,7 +70,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000),
.irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTC_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -81,7 +78,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
.irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO), .irq = IMX_GPIO_TO_IRQ(CPUIMX51_QUARTD_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
@ -167,7 +164,7 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@ -190,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@ -206,17 +203,17 @@ static int initialize_usbh1_port(struct platform_device *pdev)
MXC_EHCI_ITC_NO_THRESHOLD); MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
}; };
static struct mxc_usbh_platform_data usbh1_config = { static const struct mxc_usbh_platform_data usbh1_config __initconst = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
@ -270,12 +267,12 @@ static void __init eukrea_cpuimx51_init(void)
ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); ARRAY_SIZE(eukrea_cpuimx51_i2c_devices));
if (otg_mode_host) if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
else { else {
initialize_otg_port(NULL); initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); imx51_add_fsl_usb2_udc(&usb_pdata);
} }
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
#ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD #ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD
eukrea_mbimx51_baseboard_init(); eukrea_mbimx51_baseboard_init();
@ -297,6 +294,7 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.timer = &mxc_timer, .timer = &mxc_timer,
.init_machine = eukrea_cpuimx51_init, .init_machine = eukrea_cpuimx51_init,
MACHINE_END MACHINE_END

View File

@ -22,7 +22,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/can/platform/mcp251x.h> #include <linux/can/platform/mcp251x.h>
@ -32,14 +31,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "cpu_op-mx51.h" #include "cpu_op-mx51.h"
#define USBH1_RST IMX_GPIO_NR(2, 28) #define USBH1_RST IMX_GPIO_NR(2, 28)
@ -108,7 +105,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {
/* Touchscreen */ /* Touchscreen */
/* IRQ */ /* IRQ */
_MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
}; };
@ -129,7 +126,7 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
I2C_BOARD_INFO("tsc2007", 0x49), I2C_BOARD_INFO("tsc2007", 0x49),
.type = "tsc2007", .type = "tsc2007",
.platform_data = &tsc2007_info, .platform_data = &tsc2007_info,
.irq = gpio_to_irq(TSC2007_IRQGPIO), .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
}, },
}; };
@ -149,7 +146,7 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@ -172,7 +169,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@ -189,17 +186,17 @@ static int initialize_usbh1_port(struct platform_device *pdev)
MXC_EHCI_ITC_NO_THRESHOLD); MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
}; };
static struct mxc_usbh_platform_data usbh1_config = { static const struct mxc_usbh_platform_data usbh1_config __initconst = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
@ -245,7 +242,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
.chip_select = 0, .chip_select = 0,
.platform_data = &mcp251x_info, .platform_data = &mcp251x_info,
.irq = gpio_to_irq(CAN_IRQGPIO) .irq = IMX_GPIO_TO_IRQ(CAN_IRQGPIO)
}, },
}; };
@ -303,17 +300,17 @@ static void __init eukrea_cpuimx51sd_init(void)
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
if (otg_mode_host) if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
else { else {
initialize_otg_port(NULL); initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); imx51_add_fsl_usb2_udc(&usb_pdata);
} }
gpio_request(USBH1_RST, "usb_rst"); gpio_request(USBH1_RST, "usb_rst");
gpio_direction_output(USBH1_RST, 0); gpio_direction_output(USBH1_RST, 0);
msleep(20); msleep(20);
gpio_set_value(USBH1_RST, 1); gpio_set_value(USBH1_RST, 1);
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
#ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD
eukrea_mbimxsd51_baseboard_init(); eukrea_mbimxsd51_baseboard_init();
@ -335,6 +332,7 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.timer = &mxc_timer, .timer = &mxc_timer,
.init_machine = eukrea_cpuimx51sd_init, .init_machine = eukrea_cpuimx51sd_init,
MACHINE_END MACHINE_END

View File

@ -219,6 +219,7 @@ MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
.map_io = mx50_map_io, .map_io = mx50_map_io,
.init_early = imx50_init_early, .init_early = imx50_init_early,
.init_irq = mx50_init_irq, .init_irq = mx50_init_irq,
.handle_irq = imx50_handle_irq,
.timer = &mx50_rdp_timer, .timer = &mx50_rdp_timer,
.init_machine = mx50_rdp_board_init, .init_machine = mx50_rdp_board_init,
MACHINE_END MACHINE_END

View File

@ -25,7 +25,6 @@
#include <mach/3ds_debugboard.h> #include <mach/3ds_debugboard.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6))
#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28)
@ -173,6 +172,7 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.timer = &mx51_3ds_timer, .timer = &mx51_3ds_timer,
.init_machine = mx51_3ds_init, .init_machine = mx51_3ds_init,
MACHINE_END MACHINE_END

View File

@ -24,14 +24,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "cpu_op-mx51.h" #include "cpu_op-mx51.h"
#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
@ -176,7 +174,7 @@ static const struct imxi2c_platform_data babbage_i2c_data __initconst = {
.bitrate = 100000, .bitrate = 100000,
}; };
static struct imxi2c_platform_data babbage_hsi2c_data = { static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = {
.bitrate = 400000, .bitrate = 400000,
}; };
@ -249,7 +247,7 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@ -272,7 +270,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
@ -288,17 +286,17 @@ static int initialize_usbh1_port(struct platform_device *pdev)
MXC_EHCI_ITC_NO_THRESHOLD); MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
static struct fsl_usb2_platform_data usb_pdata = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
.operating_mode = FSL_USB2_DR_DEVICE, .operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI_WIDE, .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
}; };
static struct mxc_usbh_platform_data usbh1_config = { static const struct mxc_usbh_platform_data usbh1_config __initconst = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
@ -357,8 +355,8 @@ static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = {
static void __init mx51_babbage_init(void) static void __init mx51_babbage_init(void)
{ {
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP); PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);
imx51_soc_init(); imx51_soc_init();
@ -381,17 +379,17 @@ static void __init mx51_babbage_init(void)
imx51_add_imx_i2c(0, &babbage_i2c_data); imx51_add_imx_i2c(0, &babbage_i2c_data);
imx51_add_imx_i2c(1, &babbage_i2c_data); imx51_add_imx_i2c(1, &babbage_i2c_data);
mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); imx51_add_hsi2c(&babbage_hsi2c_data);
if (otg_mode_host) if (otg_mode_host)
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
else { else {
initialize_otg_port(NULL); initialize_otg_port(NULL);
mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); imx51_add_fsl_usb2_udc(&usb_pdata);
} }
gpio_usbh1_active(); gpio_usbh1_active();
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
/* setback USBH1_STP to be function */ /* setback USBH1_STP to be function */
mxc_iomux_v3_setup_pad(usbh1stp); mxc_iomux_v3_setup_pad(usbh1stp);
babbage_usbhub_reset(); babbage_usbhub_reset();
@ -420,6 +418,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.timer = &mx51_babbage_timer, .timer = &mx51_babbage_timer,
.init_machine = mx51_babbage_init, .init_machine = mx51_babbage_init,
MACHINE_END MACHINE_END

View File

@ -32,14 +32,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "efika.h" #include "efika.h"
#define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16) #define EFIKAMX_PCBID0 IMX_GPIO_NR(3, 16)
@ -163,6 +161,11 @@ static const struct gpio_led_platform_data
.num_leds = ARRAY_SIZE(mx51_efikamx_leds), .num_leds = ARRAY_SIZE(mx51_efikamx_leds),
}; };
static struct esdhc_platform_data sd_pdata = {
.cd_type = ESDHC_CD_CONTROLLER,
.wp_type = ESDHC_WP_CONTROLLER,
};
static struct gpio_keys_button mx51_efikamx_powerkey[] = { static struct gpio_keys_button mx51_efikamx_powerkey[] = {
{ {
.code = KEY_POWER, .code = KEY_POWER,
@ -239,9 +242,11 @@ static void __init mx51_efikamx_init(void)
/* on < 1.2 boards both SD controllers are used */ /* on < 1.2 boards both SD controllers are used */
if (system_rev < 0x12) { if (system_rev < 0x12) {
imx51_add_sdhci_esdhc_imx(1, NULL); imx51_add_sdhci_esdhc_imx(0, NULL);
imx51_add_sdhci_esdhc_imx(1, &sd_pdata);
mx51_efikamx_leds[2].default_trigger = "mmc1"; mx51_efikamx_leds[2].default_trigger = "mmc1";
} } else
imx51_add_sdhci_esdhc_imx(0, &sd_pdata);
gpio_led_register_device(-1, &mx51_efikamx_leds_data); gpio_led_register_device(-1, &mx51_efikamx_leds_data);
imx_add_gpio_keys(&mx51_efikamx_powerkey_data); imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
@ -284,6 +289,7 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.timer = &mx51_efikamx_timer, .timer = &mx51_efikamx_timer,
.init_machine = mx51_efikamx_init, .init_machine = mx51_efikamx_init,
MACHINE_END MACHINE_END

View File

@ -35,14 +35,12 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/iomux-mx51.h> #include <mach/iomux-mx51.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "efika.h" #include "efika.h"
#define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20) #define EFIKASB_USBH2_STP IMX_GPIO_NR(2, 20)
@ -56,6 +54,7 @@
#define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1)
#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)
#define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL)
static iomux_v3_cfg_t mx51efikasb_pads[] = { static iomux_v3_cfg_t mx51efikasb_pads[] = {
/* USB HOST2 */ /* USB HOST2 */
@ -97,6 +96,8 @@ static iomux_v3_cfg_t mx51efikasb_pads[] = {
/* BT */ /* BT */
MX51_PAD_EIM_A17__GPIO2_11, MX51_PAD_EIM_A17__GPIO2_11,
MX51_PAD_SD1_CD,
}; };
static int initialize_usbh2_port(struct platform_device *pdev) static int initialize_usbh2_port(struct platform_device *pdev)
@ -119,7 +120,7 @@ static int initialize_usbh2_port(struct platform_device *pdev)
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data usbh2_config = { static struct mxc_usbh_platform_data usbh2_config __initdata = {
.init = initialize_usbh2_port, .init = initialize_usbh2_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
@ -129,7 +130,7 @@ static void __init mx51_efikasb_usb(void)
usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | usbh2_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
if (usbh2_config.otg) if (usbh2_config.otg)
mxc_register_device(&mxc_usbh2_device, &usbh2_config); imx51_add_mxc_ehci_hs(2, &usbh2_config);
} }
static const struct gpio_led mx51_efikasb_leds[] __initconst = { static const struct gpio_led mx51_efikasb_leds[] __initconst = {
@ -182,6 +183,18 @@ static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst =
.nbuttons = ARRAY_SIZE(mx51_efikasb_keys), .nbuttons = ARRAY_SIZE(mx51_efikasb_keys),
}; };
static struct esdhc_platform_data sd0_pdata = {
#define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27)
.cd_gpio = EFIKASB_SD1_CD,
.cd_type = ESDHC_CD_GPIO,
.wp_type = ESDHC_WP_CONTROLLER,
};
static struct esdhc_platform_data sd1_pdata = {
.cd_type = ESDHC_CD_CONTROLLER,
.wp_type = ESDHC_WP_CONTROLLER,
};
static struct regulator *pwgt1, *pwgt2; static struct regulator *pwgt1, *pwgt2;
static void mx51_efikasb_power_off(void) static void mx51_efikasb_power_off(void)
@ -250,7 +263,8 @@ static void __init efikasb_board_init(void)
mx51_efikasb_board_id(); mx51_efikasb_board_id();
mx51_efikasb_usb(); mx51_efikasb_usb();
imx51_add_sdhci_esdhc_imx(1, NULL); imx51_add_sdhci_esdhc_imx(0, &sd0_pdata);
imx51_add_sdhci_esdhc_imx(1, &sd1_pdata);
gpio_led_register_device(-1, &mx51_efikasb_leds_data); gpio_led_register_device(-1, &mx51_efikasb_leds_data);
imx_add_gpio_keys(&mx51_efikasb_keys_data); imx_add_gpio_keys(&mx51_efikasb_keys_data);
@ -270,6 +284,7 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
.map_io = mx51_map_io, .map_io = mx51_map_io,
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = mx51_init_irq, .init_irq = mx51_init_irq,
.handle_irq = imx51_handle_irq,
.init_machine = efikasb_board_init, .init_machine = efikasb_board_init,
.timer = &mx51_efikasb_timer, .timer = &mx51_efikasb_timer,
MACHINE_END MACHINE_END

View File

@ -134,8 +134,8 @@ static struct resource ard_smsc911x_resources[] = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
{ {
.start = gpio_to_irq(ARD_ETHERNET_INT_B), .start = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
.end = gpio_to_irq(ARD_ETHERNET_INT_B), .end = IMX_GPIO_TO_IRQ(ARD_ETHERNET_INT_B),
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
@ -234,6 +234,7 @@ static void __init mx53_ard_board_init(void)
imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); imx53_add_imx_i2c(1, &mx53_ard_i2c2_data);
imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); imx53_add_imx_i2c(2, &mx53_ard_i2c3_data);
imx_add_gpio_keys(&ard_button_data); imx_add_gpio_keys(&ard_button_data);
imx53_add_ahci_imx();
} }
static void __init mx53_ard_timer_init(void) static void __init mx53_ard_timer_init(void)
@ -249,6 +250,7 @@ MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early, .init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.handle_irq = imx53_handle_irq,
.timer = &mx53_ard_timer, .timer = &mx53_ard_timer,
.init_machine = mx53_ard_board_init, .init_machine = mx53_ard_board_init,
MACHINE_END MACHINE_END

View File

@ -167,6 +167,7 @@ MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early, .init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.handle_irq = imx53_handle_irq,
.timer = &mx53_evk_timer, .timer = &mx53_evk_timer,
.init_machine = mx53_evk_board_init, .init_machine = mx53_evk_board_init,
MACHINE_END MACHINE_END

View File

@ -22,6 +22,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/i2c.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/hardware.h> #include <mach/hardware.h>
@ -42,6 +43,7 @@
#define LOCO_SD3_CD IMX_GPIO_NR(3, 11) #define LOCO_SD3_CD IMX_GPIO_NR(3, 11)
#define LOCO_SD3_WP IMX_GPIO_NR(3, 12) #define LOCO_SD3_WP IMX_GPIO_NR(3, 12)
#define LOCO_SD1_CD IMX_GPIO_NR(3, 13) #define LOCO_SD1_CD IMX_GPIO_NR(3, 13)
#define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14)
static iomux_v3_cfg_t mx53_loco_pads[] = { static iomux_v3_cfg_t mx53_loco_pads[] = {
/* FEC */ /* FEC */
@ -64,6 +66,10 @@ static iomux_v3_cfg_t mx53_loco_pads[] = {
MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD,
MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS,
MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD,
/* I2C1 */
MX53_PAD_CSI0_DAT8__I2C1_SDA,
MX53_PAD_CSI0_DAT9__I2C1_SCL,
MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */
/* I2C2 */ /* I2C2 */
MX53_PAD_KEY_COL3__I2C2_SCL, MX53_PAD_KEY_COL3__I2C2_SCL,
MX53_PAD_KEY_ROW3__I2C2_SDA, MX53_PAD_KEY_ROW3__I2C2_SDA,
@ -257,8 +263,15 @@ static const struct gpio_led_platform_data mx53loco_leds_data __initconst = {
.num_leds = ARRAY_SIZE(mx53loco_leds), .num_leds = ARRAY_SIZE(mx53loco_leds),
}; };
static struct i2c_board_info mx53loco_i2c_devices[] = {
{
I2C_BOARD_INFO("mma8450", 0x1C),
},
};
static void __init mx53_loco_board_init(void) static void __init mx53_loco_board_init(void)
{ {
int ret;
imx53_soc_init(); imx53_soc_init();
mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
@ -267,12 +280,20 @@ static void __init mx53_loco_board_init(void)
mx53_loco_fec_reset(); mx53_loco_fec_reset();
imx53_add_fec(&mx53_loco_fec_data); imx53_add_fec(&mx53_loco_fec_data);
imx53_add_imx2_wdt(0, NULL); imx53_add_imx2_wdt(0, NULL);
ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en");
if (ret)
pr_err("Cannot request ACCEL_EN pin: %d\n", ret);
i2c_register_board_info(0, mx53loco_i2c_devices,
ARRAY_SIZE(mx53loco_i2c_devices));
imx53_add_imx_i2c(0, &mx53_loco_i2c_data); imx53_add_imx_i2c(0, &mx53_loco_i2c_data);
imx53_add_imx_i2c(1, &mx53_loco_i2c_data); imx53_add_imx_i2c(1, &mx53_loco_i2c_data);
imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data);
imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data);
imx_add_gpio_keys(&loco_button_data); imx_add_gpio_keys(&loco_button_data);
gpio_led_register_device(-1, &mx53loco_leds_data); gpio_led_register_device(-1, &mx53loco_leds_data);
imx53_add_ahci_imx();
} }
static void __init mx53_loco_timer_init(void) static void __init mx53_loco_timer_init(void)
@ -288,6 +309,7 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early, .init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.handle_irq = imx53_handle_irq,
.timer = &mx53_loco_timer, .timer = &mx53_loco_timer,
.init_machine = mx53_loco_board_init, .init_machine = mx53_loco_board_init,
MACHINE_END MACHINE_END

View File

@ -35,6 +35,7 @@
#include "devices-imx53.h" #include "devices-imx53.h"
#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
#define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3)
static iomux_v3_cfg_t mx53_smd_pads[] = { static iomux_v3_cfg_t mx53_smd_pads[] = {
MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, MX53_PAD_CSI0_DAT10__UART1_TXD_MUX,
@ -111,6 +112,19 @@ static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = {
.bitrate = 100000, .bitrate = 100000,
}; };
static inline void mx53_smd_ahci_pwr_on(void)
{
int ret;
/* Enable SATA PWR */
ret = gpio_request_one(MX53_SMD_SATA_PWR_EN,
GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "ahci-sata-pwr");
if (ret) {
pr_err("failed to enable SATA_PWR_EN: %d\n", ret);
return;
}
}
static void __init mx53_smd_board_init(void) static void __init mx53_smd_board_init(void)
{ {
imx53_soc_init(); imx53_soc_init();
@ -125,6 +139,8 @@ static void __init mx53_smd_board_init(void)
imx53_add_sdhci_esdhc_imx(0, NULL); imx53_add_sdhci_esdhc_imx(0, NULL);
imx53_add_sdhci_esdhc_imx(1, NULL); imx53_add_sdhci_esdhc_imx(1, NULL);
imx53_add_sdhci_esdhc_imx(2, NULL); imx53_add_sdhci_esdhc_imx(2, NULL);
mx53_smd_ahci_pwr_on();
imx53_add_ahci_imx();
} }
static void __init mx53_smd_timer_init(void) static void __init mx53_smd_timer_init(void)
@ -140,6 +156,7 @@ MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board")
.map_io = mx53_map_io, .map_io = mx53_map_io,
.init_early = imx53_init_early, .init_early = imx53_init_early,
.init_irq = mx53_init_irq, .init_irq = mx53_init_irq,
.handle_irq = imx53_handle_irq,
.timer = &mx53_smd_timer, .timer = &mx53_smd_timer,
.init_machine = mx53_smd_board_init, .init_machine = mx53_smd_board_init,
MACHINE_END MACHINE_END

View File

@ -1401,6 +1401,22 @@ static struct clk esdhc4_mx53_clk = {
.secondary = &esdhc4_ipg_clk, .secondary = &esdhc4_ipg_clk,
}; };
static struct clk sata_clk = {
.parent = &ipg_clk,
.enable = _clk_max_enable,
.enable_reg = MXC_CCM_CCGR4,
.enable_shift = MXC_CCM_CCGRx_CG1_OFFSET,
.disable = _clk_max_disable,
};
static struct clk ahci_phy_clk = {
.parent = &usb_phy1_clk,
};
static struct clk ahci_dma_clk = {
.parent = &ahb_clk,
};
DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk); DEFINE_CLOCK(mipi_esc_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG5_OFFSET, NULL, NULL, NULL, &pll2_sw_clk);
DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk); DEFINE_CLOCK(mipi_hsc2_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG4_OFFSET, NULL, NULL, &mipi_esc_clk, &pll2_sw_clk);
DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk); DEFINE_CLOCK(mipi_hsc1_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG3_OFFSET, NULL, NULL, &mipi_hsc2_clk, &pll2_sw_clk);
@ -1418,6 +1434,10 @@ DEFINE_CLOCK(ipu_di0_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG5_OFFSET,
DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET, DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET,
NULL, NULL, &pll3_sw_clk, NULL); NULL, NULL, &pll3_sw_clk, NULL);
/* PATA */
DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG0_OFFSET,
NULL, NULL, &ipg_clk, &spba_clk);
#define _REGISTER_CLOCK(d, n, c) \ #define _REGISTER_CLOCK(d, n, c) \
{ \ { \
.dev_id = d, \ .dev_id = d, \
@ -1474,6 +1494,7 @@ static struct clk_lookup mx51_lookups[] = {
_REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk)
_REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk)
_REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk) _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk)
_REGISTER_CLOCK("pata_imx", NULL, pata_clk)
}; };
static struct clk_lookup mx53_lookups[] = { static struct clk_lookup mx53_lookups[] = {
@ -1507,6 +1528,10 @@ static struct clk_lookup mx53_lookups[] = {
_REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
_REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk) _REGISTER_CLOCK("imx-ssi.2", NULL, ssi3_clk)
_REGISTER_CLOCK("imx-keypad", NULL, dummy_clk) _REGISTER_CLOCK("imx-keypad", NULL, dummy_clk)
_REGISTER_CLOCK("pata_imx", NULL, pata_clk)
_REGISTER_CLOCK("imx53-ahci.0", "ahci", sata_clk)
_REGISTER_CLOCK("imx53-ahci.0", "ahci_phy", ahci_phy_clk)
_REGISTER_CLOCK("imx53-ahci.0", "ahci_dma", ahci_dma_clk)
}; };
static void clk_tree_init(void) static void clk_tree_init(void)
@ -1548,9 +1573,8 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
clk_enable(&main_bus_clk); clk_enable(&main_bus_clk);
clk_enable(&iim_clk); clk_enable(&iim_clk);
mx51_revision(); imx_print_silicon_rev("i.MX51", mx51_revision());
clk_disable(&iim_clk); clk_disable(&iim_clk);
mx51_display_revision();
/* move usb_phy_clk to 24MHz */ /* move usb_phy_clk to 24MHz */
clk_set_parent(&usb_phy1_clk, &osc_clk); clk_set_parent(&usb_phy1_clk, &osc_clk);
@ -1568,7 +1592,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
/* System timer */ /* System timer */
mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR),
MX51_MXC_INT_GPT); MX51_INT_GPT);
return 0; return 0;
} }
@ -1592,9 +1616,8 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
clk_enable(&main_bus_clk); clk_enable(&main_bus_clk);
clk_enable(&iim_clk); clk_enable(&iim_clk);
mx53_revision(); imx_print_silicon_rev("i.MX53", mx53_revision());
clk_disable(&iim_clk); clk_disable(&iim_clk);
mx53_display_revision();
/* Set SDHC parents to be PLL2 */ /* Set SDHC parents to be PLL2 */
clk_set_parent(&esdhc1_clk, &pll2_sw_clk); clk_set_parent(&esdhc1_clk, &pll2_sw_clk);

View File

@ -18,7 +18,7 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/io.h> #include <asm/io.h>
static int cpu_silicon_rev = -1; static int mx5_cpu_rev = -1;
#define IIM_SREV 0x24 #define IIM_SREV 0x24
#define MX50_HW_ADADIG_DIGPROG 0xB0 #define MX50_HW_ADADIG_DIGPROG 0xB0
@ -28,11 +28,14 @@ static int get_mx51_srev(void)
void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR); void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR);
u32 rev = readl(iim_base + IIM_SREV) & 0xff; u32 rev = readl(iim_base + IIM_SREV) & 0xff;
if (rev == 0x0) switch (rev) {
case 0x0:
return IMX_CHIP_REVISION_2_0; return IMX_CHIP_REVISION_2_0;
else if (rev == 0x10) case 0x10:
return IMX_CHIP_REVISION_3_0; return IMX_CHIP_REVISION_3_0;
return 0; default:
return IMX_CHIP_REVISION_UNKNOWN;
}
} }
/* /*
@ -45,33 +48,13 @@ int mx51_revision(void)
if (!cpu_is_mx51()) if (!cpu_is_mx51())
return -EINVAL; return -EINVAL;
if (cpu_silicon_rev == -1) if (mx5_cpu_rev == -1)
cpu_silicon_rev = get_mx51_srev(); mx5_cpu_rev = get_mx51_srev();
return cpu_silicon_rev; return mx5_cpu_rev;
} }
EXPORT_SYMBOL(mx51_revision); EXPORT_SYMBOL(mx51_revision);
void mx51_display_revision(void)
{
int rev;
char *srev;
rev = mx51_revision();
switch (rev) {
case IMX_CHIP_REVISION_2_0:
srev = IMX_CHIP_REVISION_2_0_STRING;
break;
case IMX_CHIP_REVISION_3_0:
srev = IMX_CHIP_REVISION_3_0_STRING;
break;
default:
srev = IMX_CHIP_REVISION_UNKNOWN_STRING;
}
printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev);
}
EXPORT_SYMBOL(mx51_display_revision);
#ifdef CONFIG_NEON #ifdef CONFIG_NEON
/* /*
@ -121,10 +104,10 @@ int mx53_revision(void)
if (!cpu_is_mx53()) if (!cpu_is_mx53())
return -EINVAL; return -EINVAL;
if (cpu_silicon_rev == -1) if (mx5_cpu_rev == -1)
cpu_silicon_rev = get_mx53_srev(); mx5_cpu_rev = get_mx53_srev();
return cpu_silicon_rev; return mx5_cpu_rev;
} }
EXPORT_SYMBOL(mx53_revision); EXPORT_SYMBOL(mx53_revision);
@ -134,7 +117,7 @@ static int get_mx50_srev(void)
u32 rev; u32 rev;
if (!anatop) { if (!anatop) {
cpu_silicon_rev = -EINVAL; mx5_cpu_rev = -EINVAL;
return 0; return 0;
} }
@ -159,36 +142,13 @@ int mx50_revision(void)
if (!cpu_is_mx50()) if (!cpu_is_mx50())
return -EINVAL; return -EINVAL;
if (cpu_silicon_rev == -1) if (mx5_cpu_rev == -1)
cpu_silicon_rev = get_mx50_srev(); mx5_cpu_rev = get_mx50_srev();
return cpu_silicon_rev; return mx5_cpu_rev;
} }
EXPORT_SYMBOL(mx50_revision); EXPORT_SYMBOL(mx50_revision);
void mx53_display_revision(void)
{
int rev;
char *srev;
rev = mx53_revision();
switch (rev) {
case IMX_CHIP_REVISION_1_0:
srev = IMX_CHIP_REVISION_1_0_STRING;
break;
case IMX_CHIP_REVISION_2_0:
srev = IMX_CHIP_REVISION_2_0_STRING;
break;
case IMX_CHIP_REVISION_2_1:
srev = IMX_CHIP_REVISION_2_1_STRING;
break;
default:
srev = IMX_CHIP_REVISION_UNKNOWN_STRING;
}
printk(KERN_INFO "CPU identified as i.MX53, silicon rev %s\n", srev);
}
EXPORT_SYMBOL(mx53_display_revision);
static int __init post_cpu_init(void) static int __init post_cpu_init(void)
{ {
unsigned int reg; unsigned int reg;

View File

@ -13,9 +13,15 @@ extern const struct imx_fec_data imx51_fec_data;
#define imx51_add_fec(pdata) \ #define imx51_add_fec(pdata) \
imx_add_fec(&imx51_fec_data, pdata) imx_add_fec(&imx51_fec_data, pdata)
extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data;
#define imx51_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata)
extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; extern const struct imx_imx_i2c_data imx51_imx_i2c_data[];
#define imx51_add_imx_i2c(id, pdata) \ #define imx51_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
#define imx51_add_hsi2c(pdata) \
imx51_add_imx_i2c(2, pdata)
extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; extern const struct imx_imx_ssi_data imx51_imx_ssi_data[];
#define imx51_add_imx_ssi(id, pdata) \ #define imx51_add_imx_ssi(id, pdata) \
@ -25,6 +31,13 @@ extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[];
#define imx51_add_imx_uart(id, pdata) \ #define imx51_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata)
extern const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data;
#define imx51_add_mxc_ehci_otg(pdata) \
imx_add_mxc_ehci(&imx51_mxc_ehci_otg_data, pdata)
extern const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[];
#define imx51_add_mxc_ehci_hs(id, pdata) \
imx_add_mxc_ehci(&imx51_mxc_ehci_hs_data[id - 1], pdata)
extern const struct imx_mxc_nand_data imx51_mxc_nand_data; extern const struct imx_mxc_nand_data imx51_mxc_nand_data;
#define imx51_add_mxc_nand(pdata) \ #define imx51_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) imx_add_mxc_nand(&imx51_mxc_nand_data, pdata)
@ -52,3 +65,7 @@ extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[];
extern const struct imx_imx_keypad_data imx51_imx_keypad_data; extern const struct imx_imx_keypad_data imx51_imx_keypad_data;
#define imx51_add_imx_keypad(pdata) \ #define imx51_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
extern const struct imx_pata_imx_data imx51_pata_imx_data;
#define imx51_add_pata_imx() \
imx_add_pata_imx(&imx51_pata_imx_data)

View File

@ -40,3 +40,9 @@ extern const struct imx_imx_ssi_data imx53_imx_ssi_data[];
extern const struct imx_imx_keypad_data imx53_imx_keypad_data; extern const struct imx_imx_keypad_data imx53_imx_keypad_data;
#define imx53_add_imx_keypad(pdata) \ #define imx53_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx53_imx_keypad_data, pdata) imx_add_imx_keypad(&imx53_imx_keypad_data, pdata)
extern const struct imx_pata_imx_data imx53_pata_imx_data;
#define imx53_add_pata_imx() \
imx_add_pata_imx(&imx53_pata_imx_data)
extern struct platform_device *__init imx53_add_ahci_imx(void);

View File

@ -1,120 +0,0 @@
/*
* Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com>
* Copyright (C) 2010 Freescale Semiconductor, Inc.
*
* 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/platform_device.h>
#include <linux/dma-mapping.h>
#include <mach/hardware.h>
#include <mach/imx-uart.h>
#include <mach/irqs.h>
static struct resource mxc_hsi2c_resources[] = {
{
.start = MX51_HSI2C_DMA_BASE_ADDR,
.end = MX51_HSI2C_DMA_BASE_ADDR + SZ_16K - 1,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_HS_I2C,
.end = MX51_MXC_INT_HS_I2C,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mxc_hsi2c_device = {
.name = "imx-i2c",
.id = 2,
.num_resources = ARRAY_SIZE(mxc_hsi2c_resources),
.resource = mxc_hsi2c_resources
};
static u64 usb_dma_mask = DMA_BIT_MASK(32);
static struct resource usbotg_resources[] = {
{
.start = MX51_OTG_BASE_ADDR,
.end = MX51_OTG_BASE_ADDR + 0x1ff,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_USB_OTG,
.flags = IORESOURCE_IRQ,
},
};
/* OTG gadget device */
struct platform_device mxc_usbdr_udc_device = {
.name = "fsl-usb2-udc",
.id = -1,
.num_resources = ARRAY_SIZE(usbotg_resources),
.resource = usbotg_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
struct platform_device mxc_usbdr_host_device = {
.name = "mxc-ehci",
.id = 0,
.num_resources = ARRAY_SIZE(usbotg_resources),
.resource = usbotg_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource usbh1_resources[] = {
{
.start = MX51_OTG_BASE_ADDR + 0x200,
.end = MX51_OTG_BASE_ADDR + 0x200 + 0x1ff,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_USB_H1,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mxc_usbh1_device = {
.name = "mxc-ehci",
.id = 1,
.num_resources = ARRAY_SIZE(usbh1_resources),
.resource = usbh1_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource usbh2_resources[] = {
{
.start = MX51_OTG_BASE_ADDR + 0x400,
.end = MX51_OTG_BASE_ADDR + 0x400 + 0x1ff,
.flags = IORESOURCE_MEM,
},
{
.start = MX51_MXC_INT_USB_H2,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device mxc_usbh2_device = {
.name = "mxc-ehci",
.id = 2,
.num_resources = ARRAY_SIZE(usbh2_resources),
.resource = usbh2_resources,
.dev = {
.dma_mask = &usb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};

View File

@ -1,5 +0,0 @@
extern struct platform_device mxc_usbdr_host_device;
extern struct platform_device mxc_usbh1_device;
extern struct platform_device mxc_usbh2_device;
extern struct platform_device mxc_usbdr_udc_device;
extern struct platform_device mxc_hsi2c_device;

View File

@ -52,7 +52,7 @@ int mx51_initialize_usb_hw(int port, unsigned int flags)
void __iomem *usbother_base; void __iomem *usbother_base;
int ret = 0; int ret = 0;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) { if (!usb_base) {
printk(KERN_ERR "%s(): ioremap failed\n", __func__); printk(KERN_ERR "%s(): ioremap failed\n", __func__);
return -ENOMEM; return -ENOMEM;

View File

@ -28,7 +28,6 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30)
#define MBIMX51_LED0 IMX_GPIO_NR(3, 5) #define MBIMX51_LED0 IMX_GPIO_NR(3, 5)
@ -160,7 +159,7 @@ struct tsc2007_platform_data tsc2007_data = {
static struct i2c_board_info mbimx51_i2c_devices[] = { static struct i2c_board_info mbimx51_i2c_devices[] = {
{ {
I2C_BOARD_INFO("tsc2007", 0x49), I2C_BOARD_INFO("tsc2007", 0x49),
.irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), .irq = IMX_GPIO_TO_IRQ(MBIMX51_TSC2007_GPIO),
.platform_data = &tsc2007_data, .platform_data = &tsc2007_data,
}, { }, {
I2C_BOARD_INFO("tlv320aic23", 0x1a), I2C_BOARD_INFO("tlv320aic23", 0x1a),

View File

@ -24,7 +24,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/input.h> #include <linux/input.h>
@ -41,13 +40,12 @@
#include <mach/audmux.h> #include <mach/audmux.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
/* LED */ /* LED */
MX51_PAD_NANDF_D10__GPIO3_30, MX51_PAD_NANDF_D10__GPIO3_30,
/* SWITCH */ /* SWITCH */
_MX51_PAD_NANDF_D9__GPIO3_31 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | NEW_PAD_CTRL(MX51_PAD_NANDF_D9__GPIO3_31, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
/* UART2 */ /* UART2 */
@ -66,7 +64,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
MX51_PAD_SD1_DATA2__SD1_DATA2, MX51_PAD_SD1_DATA2__SD1_DATA2,
MX51_PAD_SD1_DATA3__SD1_DATA3, MX51_PAD_SD1_DATA3__SD1_DATA3,
/* SD1 CD */ /* SD1 CD */
_MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | NEW_PAD_CTRL(MX51_PAD_GPIO1_0__SD1_CD, PAD_CTL_PUS_22K_UP |
PAD_CTL_PKE | PAD_CTL_SRE_FAST | PAD_CTL_PKE | PAD_CTL_SRE_FAST |
PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
}; };

View File

@ -1,72 +0,0 @@
/*
* 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.
*
* Create static mapping between physical to virtual memory.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/mach/map.h>
#include <mach/hardware.h>
#include <mach/common.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.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),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx50_map_io(void)
{
iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_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));
}
void __init mx50_init_irq(void)
{
tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
}
void __init imx50_soc_init(void)
{
/* i.mx50 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
mxc_register_gpio("imx31-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
mxc_register_gpio("imx31-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH);
mxc_register_gpio("imx31-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH);
mxc_register_gpio("imx31-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH);
mxc_register_gpio("imx31-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH);
}

View File

@ -21,12 +21,27 @@
#include <mach/devices-common.h> #include <mach/devices-common.h>
#include <mach/iomux-v3.h> #include <mach/iomux-v3.h>
static void imx5_idle(void)
{
mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
}
/*
* 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.
*/ */
static struct map_desc mx51_io_desc[] __initdata = { static struct map_desc mx51_io_desc[] __initdata = {
imx_map_entry(MX51, TZIC, MT_DEVICE),
imx_map_entry(MX51, IRAM, MT_DEVICE), imx_map_entry(MX51, IRAM, MT_DEVICE),
imx_map_entry(MX51, DEBUG, MT_DEVICE),
imx_map_entry(MX51, AIPS1, MT_DEVICE), imx_map_entry(MX51, AIPS1, MT_DEVICE),
imx_map_entry(MX51, SPBA0, MT_DEVICE), imx_map_entry(MX51, SPBA0, MT_DEVICE),
imx_map_entry(MX51, AIPS2, MT_DEVICE), imx_map_entry(MX51, AIPS2, MT_DEVICE),
@ -36,6 +51,7 @@ static struct map_desc mx51_io_desc[] __initdata = {
* Define the MX53 memory map. * Define the MX53 memory map.
*/ */
static struct map_desc mx53_io_desc[] __initdata = { static struct map_desc mx53_io_desc[] __initdata = {
imx_map_entry(MX53, TZIC, MT_DEVICE),
imx_map_entry(MX53, AIPS1, MT_DEVICE), imx_map_entry(MX53, AIPS1, MT_DEVICE),
imx_map_entry(MX53, SPBA0, MT_DEVICE), imx_map_entry(MX53, SPBA0, MT_DEVICE),
imx_map_entry(MX53, AIPS2, MT_DEVICE), imx_map_entry(MX53, AIPS2, MT_DEVICE),
@ -46,21 +62,34 @@ 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));
} }
void __init mx53_map_io(void)
{
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));
}
void __init imx51_init_early(void) void __init imx51_init_early(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX51); mxc_set_cpu_type(MXC_CPU_MX51);
mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
} imx_idle = imx5_idle;
void __init mx53_map_io(void)
{
iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
} }
void __init imx53_init_early(void) void __init imx53_init_early(void)
@ -70,35 +99,19 @@ 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)
{ {
unsigned long tzic_addr; tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR));
void __iomem *tzic_virt;
if (mx51_revision() < IMX_CHIP_REVISION_2_0)
tzic_addr = MX51_TZIC_BASE_ADDR_TO1;
else
tzic_addr = MX51_TZIC_BASE_ADDR;
tzic_virt = ioremap(tzic_addr, SZ_16K);
if (!tzic_virt)
panic("unable to map TZIC interrupt controller\n");
tzic_init_irq(tzic_virt);
} }
void __init mx53_init_irq(void) void __init mx53_init_irq(void)
{ {
unsigned long tzic_addr; tzic_init_irq(MX53_IO_ADDRESS(MX53_TZIC_BASE_ADDR));
void __iomem *tzic_virt;
tzic_addr = MX53_TZIC_BASE_ADDR;
tzic_virt = ioremap(tzic_addr, SZ_16K);
if (!tzic_virt)
panic("unable to map TZIC interrupt controller\n");
tzic_init_irq(tzic_virt);
} }
static struct sdma_script_start_addrs imx51_sdma_script __initdata = { static struct sdma_script_start_addrs imx51_sdma_script __initdata = {
@ -138,13 +151,24 @@ static struct sdma_platform_data imx53_sdma_pdata __initdata = {
.script_addrs = &imx53_sdma_script, .script_addrs = &imx53_sdma_script,
}; };
void __init imx50_soc_init(void)
{
/* i.mx50 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
mxc_register_gpio("imx31-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
mxc_register_gpio("imx31-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH);
mxc_register_gpio("imx31-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH);
mxc_register_gpio("imx31-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH);
mxc_register_gpio("imx31-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH);
}
void __init imx51_soc_init(void) void __init imx51_soc_init(void)
{ {
/* i.mx51 has the i.mx31 type gpio */ /* i.mx51 has the i.mx31 type gpio */
mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO1_LOW, MX51_MXC_INT_GPIO1_HIGH); mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH);
mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO2_LOW, MX51_MXC_INT_GPIO2_HIGH); mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH);
mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO3_LOW, MX51_MXC_INT_GPIO3_HIGH); mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH);
mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO4_LOW, MX51_MXC_INT_GPIO4_HIGH); mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH);
/* i.mx51 has the i.mx35 type sdma */ /* i.mx51 has the i.mx35 type sdma */
imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata);

View File

@ -34,14 +34,12 @@
#include <linux/usb/ulpi.h> #include <linux/usb/ulpi.h>
#include <mach/ulpi.h> #include <mach/ulpi.h>
#include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include "devices-imx51.h" #include "devices-imx51.h"
#include "devices.h"
#include "efika.h" #include "efika.h"
#include "cpu_op-mx51.h" #include "cpu_op-mx51.h"
@ -133,7 +131,7 @@ static int initialize_otg_port(struct platform_device *pdev)
u32 v; u32 v;
void __iomem *usb_base; void __iomem *usb_base;
void __iomem *usbother_base; void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
if (!usb_base) if (!usb_base)
return -ENOMEM; return -ENOMEM;
usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
@ -150,7 +148,7 @@ static int initialize_otg_port(struct platform_device *pdev)
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
} }
static struct mxc_usbh_platform_data dr_utmi_config = { static const struct mxc_usbh_platform_data dr_utmi_config __initconst = {
.init = initialize_otg_port, .init = initialize_otg_port,
.portsc = MXC_EHCI_UTMI_16BIT, .portsc = MXC_EHCI_UTMI_16BIT,
}; };
@ -170,7 +168,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
gpio_set_value(EFIKAMX_USBH1_STP, 1); gpio_set_value(EFIKAMX_USBH1_STP, 1);
msleep(1); msleep(1);
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET); socregs_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
/* The clock for the USBH1 ULPI port will come externally */ /* The clock for the USBH1 ULPI port will come externally */
@ -189,7 +187,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data usbh1_config = { static struct mxc_usbh_platform_data usbh1_config __initdata = {
.init = initialize_usbh1_port, .init = initialize_usbh1_port,
.portsc = MXC_EHCI_MODE_ULPI, .portsc = MXC_EHCI_MODE_ULPI,
}; };
@ -217,9 +215,9 @@ static void __init mx51_efika_usb(void)
usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS | usbh1_config.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND); ULPI_OTG_DRVVBUS_EXT | ULPI_OTG_EXTVBUSIND);
mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); imx51_add_mxc_ehci_otg(&dr_utmi_config);
if (usbh1_config.otg) if (usbh1_config.otg)
mxc_register_device(&mxc_usbh1_device, &usbh1_config); imx51_add_mxc_ehci_hs(1, &usbh1_config);
} }
static struct mtd_partition mx51_efika_spi_nor_partitions[] = { static struct mtd_partition mx51_efika_spi_nor_partitions[] = {
@ -589,7 +587,7 @@ static struct spi_board_info mx51_efika_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = 0, .chip_select = 0,
.platform_data = &mx51_efika_mc13892_data, .platform_data = &mx51_efika_mc13892_data,
.irq = gpio_to_irq(EFIKAMX_PMIC), .irq = IMX_GPIO_TO_IRQ(EFIKAMX_PMIC),
}, },
}; };
@ -609,7 +607,6 @@ void __init efika_board_common_init(void)
ARRAY_SIZE(mx51efika_pads)); ARRAY_SIZE(mx51efika_pads));
imx51_add_imx_uart(0, &uart_pdata); imx51_add_imx_uart(0, &uart_pdata);
mx51_efika_usb(); mx51_efika_usb();
imx51_add_sdhci_esdhc_imx(0, NULL);
/* FIXME: comes from original code. check this. */ /* FIXME: comes from original code. check this. */
if (mx51_revision() < IMX_CHIP_REVISION_2_0) if (mx51_revision() < IMX_CHIP_REVISION_2_0)
@ -627,8 +624,9 @@ void __init efika_board_common_init(void)
ARRAY_SIZE(mx51_efika_spi_board_info)); ARRAY_SIZE(mx51_efika_spi_board_info));
imx51_add_ecspi(0, &mx51_efika_spi_pdata); imx51_add_ecspi(0, &mx51_efika_spi_pdata);
imx51_add_pata_imx();
#if defined(CONFIG_CPU_FREQ_IMX) #if defined(CONFIG_CPU_FREQ_IMX)
get_cpu_op = mx51_get_cpu_op; get_cpu_op = mx51_get_cpu_op;
#endif #endif
} }

View File

@ -14,7 +14,8 @@
#include <linux/err.h> #include <linux/err.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <mach/system.h> #include <mach/common.h>
#include <mach/hardware.h>
#include "crm_regs.h" #include "crm_regs.h"
static struct clk *gpc_dvfs_clk; static struct clk *gpc_dvfs_clk;

View File

@ -13,6 +13,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/common.h>
#include "crm_regs.h" #include "crm_regs.h"
/* set cpu low power mode before WFI instruction. This function is called /* set cpu low power mode before WFI instruction. This function is called

View File

@ -23,6 +23,7 @@ config MACH_STMP378X_DEVB
select MXS_HAVE_AMBA_DUART select MXS_HAVE_AMBA_DUART
select MXS_HAVE_PLATFORM_AUART select MXS_HAVE_PLATFORM_AUART
select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_RTC_STMP3XXX
help help
Include support for STMP378x-devb platform. This includes specific Include support for STMP378x-devb platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
@ -34,6 +35,7 @@ config MACH_MX23EVK
select MXS_HAVE_PLATFORM_AUART select MXS_HAVE_PLATFORM_AUART
select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_MXSFB select MXS_HAVE_PLATFORM_MXSFB
select MXS_HAVE_PLATFORM_RTC_STMP3XXX
help help
Include support for MX23EVK platform. This includes specific Include support for MX23EVK platform. This includes specific
configurations for the board and its peripherals. configurations for the board and its peripherals.
@ -48,6 +50,9 @@ config MACH_MX28EVK
select MXS_HAVE_PLATFORM_FLEXCAN select MXS_HAVE_PLATFORM_FLEXCAN
select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_MXSFB select MXS_HAVE_PLATFORM_MXSFB
select MXS_HAVE_PLATFORM_MXS_SAIF
select MXS_HAVE_PLATFORM_MXS_I2C
select MXS_HAVE_PLATFORM_RTC_STMP3XXX
select MXS_OCOTP select MXS_OCOTP
help help
Include support for MX28EVK platform. This includes specific Include support for MX28EVK platform. This includes specific
@ -63,9 +68,27 @@ config MODULE_TX28
select MXS_HAVE_PLATFORM_MXS_I2C select MXS_HAVE_PLATFORM_MXS_I2C
select MXS_HAVE_PLATFORM_MXS_MMC select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_MXS_PWM select MXS_HAVE_PLATFORM_MXS_PWM
select MXS_HAVE_PLATFORM_RTC_STMP3XXX
config MODULE_M28
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_FLEXCAN
select MXS_HAVE_PLATFORM_MXS_I2C
select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_MXSFB
select MXS_OCOTP
config MACH_TX28 config MACH_TX28
bool "Ka-Ro TX28 module" bool "Ka-Ro TX28 module"
select MODULE_TX28 select MODULE_TX28
config MACH_M28EVK
bool "Support DENX M28EVK Platform"
select MODULE_M28
endif endif

View File

@ -1,15 +1,16 @@
# Common support # Common support
obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o mm.o
obj-$(CONFIG_MXS_OCOTP) += ocotp.o obj-$(CONFIG_MXS_OCOTP) += ocotp.o
obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_SOC_IMX23) += clock-mx23.o mm-mx23.o obj-$(CONFIG_SOC_IMX23) += clock-mx23.o
obj-$(CONFIG_SOC_IMX28) += clock-mx28.o mm-mx28.o obj-$(CONFIG_SOC_IMX28) += clock-mx28.o
obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
obj-$(CONFIG_MACH_M28EVK) += mach-m28evk.o
obj-$(CONFIG_MODULE_TX28) += module-tx28.o obj-$(CONFIG_MODULE_TX28) += module-tx28.o
obj-$(CONFIG_MACH_TX28) += mach-tx28.o obj-$(CONFIG_MACH_TX28) += mach-tx28.o

View File

@ -640,6 +640,8 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "lradc", lradc_clk) _REGISTER_CLOCK(NULL, "lradc", lradc_clk)
_REGISTER_CLOCK(NULL, "spdif", spdif_clk) _REGISTER_CLOCK(NULL, "spdif", spdif_clk)
_REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk) _REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk)
_REGISTER_CLOCK("mxs-saif.0", NULL, saif0_clk)
_REGISTER_CLOCK("mxs-saif.1", NULL, saif1_clk)
}; };
static int clk_misc_init(void) static int clk_misc_init(void)
@ -708,11 +710,11 @@ static int clk_misc_init(void)
/* SAIF has to use frac div for functional operation */ /* SAIF has to use frac div for functional operation */
reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0); reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0);
reg &= ~BM_CLKCTRL_SAIF0_DIV_FRAC_EN; reg |= BM_CLKCTRL_SAIF0_DIV_FRAC_EN;
__raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0); __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF0);
reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1); reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1);
reg &= ~BM_CLKCTRL_SAIF1_DIV_FRAC_EN; reg |= BM_CLKCTRL_SAIF1_DIV_FRAC_EN;
__raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1); __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_SAIF1);
/* /*
@ -738,11 +740,17 @@ static int clk_misc_init(void)
__raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT,
CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET);
/* Extra fec clock setting */ /*
reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); * Extra fec clock setting
reg &= ~BM_CLKCTRL_ENET_SLEEP; * The DENX M28 uses an external clock source
reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; * and the clock output must not be enabled
__raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); */
if (!machine_is_m28evk()) {
reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET);
reg &= ~BM_CLKCTRL_ENET_SLEEP;
reg |= BM_CLKCTRL_ENET_CLK_OUT_EN;
__raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET);
}
/* /*
* 480 MHz seems too high to be ssp clock source directly, * 480 MHz seems too high to be ssp clock source directly,
@ -774,6 +782,8 @@ int __init mx28_clocks_init(void)
clk_enable(&uart_clk); clk_enable(&uart_clk);
clk_set_parent(&lcdif_clk, &ref_pix_clk); clk_set_parent(&lcdif_clk, &ref_pix_clk);
clk_set_parent(&saif0_clk, &pll0_clk);
clk_set_parent(&saif1_clk, &pll0_clk);
clkdev_add_table(lookups, ARRAY_SIZE(lookups)); clkdev_add_table(lookups, ARRAY_SIZE(lookups));

View File

@ -29,3 +29,5 @@ extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst;
struct platform_device *__init mx23_add_mxsfb( struct platform_device *__init mx23_add_mxsfb(
const struct mxsfb_platform_data *pdata); const struct mxsfb_platform_data *pdata);
struct platform_device *__init mx23_add_rtc_stmp3xxx(void);

View File

@ -45,3 +45,8 @@ extern const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst;
struct platform_device *__init mx28_add_mxsfb( struct platform_device *__init mx28_add_mxsfb(
const struct mxsfb_platform_data *pdata); const struct mxsfb_platform_data *pdata);
extern const struct mxs_saif_data mx28_saif_data[] __initconst;
#define mx28_add_saif(id) mxs_add_saif(&mx28_saif_data[id])
struct platform_device *__init mx28_add_rtc_stmp3xxx(void);

View File

@ -23,3 +23,9 @@ config MXS_HAVE_PLATFORM_MXS_PWM
config MXS_HAVE_PLATFORM_MXSFB config MXS_HAVE_PLATFORM_MXSFB
bool bool
config MXS_HAVE_PLATFORM_MXS_SAIF
bool
config MXS_HAVE_PLATFORM_RTC_STMP3XXX
bool

View File

@ -8,3 +8,5 @@ obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_MMC) += platform-mxs-mmc.o
obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o
obj-y += platform-gpio-mxs.o obj-y += platform-gpio-mxs.o
obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o
obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_SAIF) += platform-mxs-saif.o
obj-$(CONFIG_MXS_HAVE_PLATFORM_RTC_STMP3XXX) += platform-rtc-stmp3xxx.o

View File

@ -0,0 +1,60 @@
/*
* Copyright 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 version 2 as published by the
* Free Software Foundation.
*/
#include <linux/compiler.h>
#include <linux/err.h>
#include <linux/init.h>
#include <mach/mx23.h>
#include <mach/mx28.h>
#include <mach/devices-common.h>
#define mxs_saif_data_entry_single(soc, _id) \
{ \
.id = _id, \
.iobase = soc ## _SAIF ## _id ## _BASE_ADDR, \
.irq = soc ## _INT_SAIF ## _id, \
.dma = soc ## _DMA_SAIF ## _id, \
.dmairq = soc ## _INT_SAIF ## _id ##_DMA, \
}
#define mxs_saif_data_entry(soc, _id) \
[_id] = mxs_saif_data_entry_single(soc, _id)
#ifdef CONFIG_SOC_IMX28
const struct mxs_saif_data mx28_saif_data[] __initconst = {
mxs_saif_data_entry(MX28, 0),
mxs_saif_data_entry(MX28, 1),
};
#endif
struct platform_device *__init mxs_add_saif(const struct mxs_saif_data *data)
{
struct resource res[] = {
{
.start = data->iobase,
.end = data->iobase + SZ_4K - 1,
.flags = IORESOURCE_MEM,
}, {
.start = data->irq,
.end = data->irq,
.flags = IORESOURCE_IRQ,
}, {
.start = data->dma,
.end = data->dma,
.flags = IORESOURCE_DMA,
}, {
.start = data->dmairq,
.end = data->dmairq,
.flags = IORESOURCE_IRQ,
},
};
return mxs_add_platform_device("mxs-saif", data->id, res,
ARRAY_SIZE(res), NULL, 0);
}

View File

@ -0,0 +1,51 @@
/*
* Copyright (C) 2011 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <asm/sizes.h>
#include <mach/mx23.h>
#include <mach/mx28.h>
#include <mach/devices-common.h>
#ifdef CONFIG_SOC_IMX23
struct platform_device *__init mx23_add_rtc_stmp3xxx(void)
{
struct resource res[] = {
{
.start = MX23_RTC_BASE_ADDR,
.end = MX23_RTC_BASE_ADDR + SZ_8K - 1,
.flags = IORESOURCE_MEM,
}, {
.start = MX23_INT_RTC_ALARM,
.end = MX23_INT_RTC_ALARM,
.flags = IORESOURCE_IRQ,
},
};
return mxs_add_platform_device("stmp3xxx-rtc", 0, res, ARRAY_SIZE(res),
NULL, 0);
}
#endif /* CONFIG_SOC_IMX23 */
#ifdef CONFIG_SOC_IMX28
struct platform_device *__init mx28_add_rtc_stmp3xxx(void)
{
struct resource res[] = {
{
.start = MX28_RTC_BASE_ADDR,
.end = MX28_RTC_BASE_ADDR + SZ_8K - 1,
.flags = IORESOURCE_MEM,
}, {
.start = MX28_INT_RTC_ALARM,
.end = MX28_INT_RTC_ALARM,
.flags = IORESOURCE_IRQ,
},
};
return mxs_add_platform_device("stmp3xxx-rtc", 0, res, ARRAY_SIZE(res),
NULL, 0);
}
#endif /* CONFIG_SOC_IMX28 */

View File

@ -92,3 +92,15 @@ struct platform_device *__init mxs_add_mxs_mmc(
/* pwm */ /* pwm */
struct platform_device *__init mxs_add_mxs_pwm( struct platform_device *__init mxs_add_mxs_pwm(
resource_size_t iobase, int id); resource_size_t iobase, int id);
/* saif */
struct mxs_saif_data {
int id;
resource_size_t iobase;
resource_size_t irq;
resource_size_t dma;
resource_size_t dmairq;
};
struct platform_device *__init mxs_add_saif(
const struct mxs_saif_data *data);

View File

@ -22,14 +22,10 @@
#include <asm-generic/gpio.h> #include <asm-generic/gpio.h>
#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
/* use gpiolib dispatchers */ /* use gpiolib dispatchers */
#define gpio_get_value __gpio_get_value #define gpio_get_value __gpio_get_value
#define gpio_set_value __gpio_set_value #define gpio_set_value __gpio_set_value
#define gpio_cansleep __gpio_cansleep #define gpio_cansleep __gpio_cansleep
#define gpio_to_irq __gpio_to_irq #define gpio_to_irq __gpio_to_irq
#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
#endif /* __MACH_MXS_GPIO_H__ */ #endif /* __MACH_MXS_GPIO_H__ */

View File

@ -33,6 +33,7 @@
0) 0)
#define cpu_is_mx28() ( \ #define cpu_is_mx28() ( \
machine_is_mx28evk() || \ machine_is_mx28evk() || \
machine_is_m28evk() || \
machine_is_tx28() || \ machine_is_tx28() || \
0) 0)
@ -86,6 +87,8 @@
.type = _type, \ .type = _type, \
} }
#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
#define MXS_SET_ADDR 0x4 #define MXS_SET_ADDR 0x4
#define MXS_CLR_ADDR 0x8 #define MXS_CLR_ADDR 0x8
#define MXS_TOG_ADDR 0xc #define MXS_TOG_ADDR 0xc

View File

@ -63,6 +63,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
mxs_duart_base = MX23_DUART_BASE_ADDR; mxs_duart_base = MX23_DUART_BASE_ADDR;
break; break;
case MACH_TYPE_MX28EVK: case MACH_TYPE_MX28EVK:
case MACH_TYPE_M28EVK:
case MACH_TYPE_TX28: case MACH_TYPE_TX28:
mxs_duart_base = MX28_DUART_BASE_ADDR; mxs_duart_base = MX28_DUART_BASE_ADDR;
break; break;

View File

@ -0,0 +1,366 @@
/*
* Copyright (C) 2011
* Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
*
* based on: mach-mx28_evk.c
* Copyright 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.
*/
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/irq.h>
#include <linux/clk.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <mach/common.h>
#include <mach/iomux-mx28.h>
#include "devices-mx28.h"
#define M28EVK_GPIO_USERLED1 MXS_GPIO_NR(3, 16)
#define M28EVK_GPIO_USERLED2 MXS_GPIO_NR(3, 17)
#define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18)
#define M28EVK_LCD_ENABLE MXS_GPIO_NR(3, 28)
#define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12)
#define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28)
static const iomux_cfg_t m28evk_pads[] __initconst = {
/* duart */
MX28_PAD_AUART0_CTS__DUART_RX | MXS_PAD_CTRL,
MX28_PAD_AUART0_RTS__DUART_TX | MXS_PAD_CTRL,
/* auart0 */
MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL,
MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL,
/* auart3 */
MX28_PAD_AUART3_RX__AUART3_RX | MXS_PAD_CTRL,
MX28_PAD_AUART3_TX__AUART3_TX | MXS_PAD_CTRL,
MX28_PAD_AUART3_CTS__AUART3_CTS | MXS_PAD_CTRL,
MX28_PAD_AUART3_RTS__AUART3_RTS | MXS_PAD_CTRL,
#define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP)
/* fec0 */
MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC,
MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC,
MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC,
MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC,
MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC,
MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC,
MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC,
MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC,
MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC,
/* fec1 */
MX28_PAD_ENET0_CRS__ENET1_RX_EN | MXS_PAD_FEC,
MX28_PAD_ENET0_RXD2__ENET1_RXD0 | MXS_PAD_FEC,
MX28_PAD_ENET0_RXD3__ENET1_RXD1 | MXS_PAD_FEC,
MX28_PAD_ENET0_COL__ENET1_TX_EN | MXS_PAD_FEC,
MX28_PAD_ENET0_TXD2__ENET1_TXD0 | MXS_PAD_FEC,
MX28_PAD_ENET0_TXD3__ENET1_TXD1 | MXS_PAD_FEC,
/* flexcan0 */
MX28_PAD_GPMI_RDY2__CAN0_TX,
MX28_PAD_GPMI_RDY3__CAN0_RX,
/* flexcan1 */
MX28_PAD_GPMI_CE2N__CAN1_TX,
MX28_PAD_GPMI_CE3N__CAN1_RX,
/* I2C */
MX28_PAD_I2C0_SCL__I2C0_SCL,
MX28_PAD_I2C0_SDA__I2C0_SDA,
/* mxsfb (lcdif) */
MX28_PAD_LCD_D00__LCD_D0 | MXS_PAD_CTRL,
MX28_PAD_LCD_D01__LCD_D1 | MXS_PAD_CTRL,
MX28_PAD_LCD_D02__LCD_D2 | MXS_PAD_CTRL,
MX28_PAD_LCD_D03__LCD_D3 | MXS_PAD_CTRL,
MX28_PAD_LCD_D04__LCD_D4 | MXS_PAD_CTRL,
MX28_PAD_LCD_D05__LCD_D5 | MXS_PAD_CTRL,
MX28_PAD_LCD_D06__LCD_D6 | MXS_PAD_CTRL,
MX28_PAD_LCD_D07__LCD_D7 | MXS_PAD_CTRL,
MX28_PAD_LCD_D08__LCD_D8 | MXS_PAD_CTRL,
MX28_PAD_LCD_D09__LCD_D9 | MXS_PAD_CTRL,
MX28_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL,
MX28_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL,
MX28_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL,
MX28_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL,
MX28_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL,
MX28_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL,
MX28_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL,
MX28_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL,
MX28_PAD_LCD_D18__LCD_D18 | MXS_PAD_CTRL,
MX28_PAD_LCD_D19__LCD_D19 | MXS_PAD_CTRL,
MX28_PAD_LCD_D20__LCD_D20 | MXS_PAD_CTRL,
MX28_PAD_LCD_D21__LCD_D21 | MXS_PAD_CTRL,
MX28_PAD_LCD_D22__LCD_D22 | MXS_PAD_CTRL,
MX28_PAD_LCD_D23__LCD_D23 | MXS_PAD_CTRL,
MX28_PAD_LCD_ENABLE__LCD_ENABLE | MXS_PAD_CTRL,
MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MXS_PAD_CTRL,
/* mmc0 */
MX28_PAD_SSP0_DATA0__SSP0_D0 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA1__SSP0_D1 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA2__SSP0_D2 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA3__SSP0_D3 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA4__SSP0_D4 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA5__SSP0_D5 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA6__SSP0_D6 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DATA7__SSP0_D7 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_CMD__SSP0_CMD |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
MX28_PAD_SSP0_SCK__SSP0_SCK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
/* mmc1 */
MX28_PAD_GPMI_D00__SSP1_D0 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D01__SSP1_D1 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D02__SSP1_D2 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D03__SSP1_D3 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D04__SSP1_D4 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D05__SSP1_D5 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D06__SSP1_D6 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_D07__SSP1_D7 |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_RDY1__SSP1_CMD |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_WRN__SSP1_SCK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
/* write protect */
MX28_PAD_GPMI_RESETN__GPIO_0_28 |
(MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
/* slot power enable */
MX28_PAD_PWM4__GPIO_3_29 |
(MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
/* led */
MX28_PAD_PWM0__GPIO_3_16 | MXS_PAD_CTRL,
MX28_PAD_PWM1__GPIO_3_17 | MXS_PAD_CTRL,
/* nand */
MX28_PAD_GPMI_D00__GPMI_D0 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D01__GPMI_D1 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D02__GPMI_D2 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D03__GPMI_D3 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D04__GPMI_D4 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D05__GPMI_D5 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D06__GPMI_D6 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_D07__GPMI_D7 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_CE0N__GPMI_CE0N |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_RDY0__GPMI_READY0 |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_NOPULL),
MX28_PAD_GPMI_RDN__GPMI_RDN |
(MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_WRN__GPMI_WRN |
(MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_ALE__GPMI_ALE |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_CLE__GPMI_CLE |
(MXS_PAD_4MA | MXS_PAD_1V8 | MXS_PAD_PULLUP),
MX28_PAD_GPMI_RESETN__GPMI_RESETN |
(MXS_PAD_12MA | MXS_PAD_1V8 | MXS_PAD_PULLUP),
/* Backlight */
MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
};
/* led */
static const struct gpio_led m28evk_leds[] __initconst = {
{
.name = "user-led1",
.default_trigger = "heartbeat",
.gpio = M28EVK_GPIO_USERLED1,
},
{
.name = "user-led2",
.default_trigger = "heartbeat",
.gpio = M28EVK_GPIO_USERLED2,
},
};
static const struct gpio_led_platform_data m28evk_led_data __initconst = {
.leds = m28evk_leds,
.num_leds = ARRAY_SIZE(m28evk_leds),
};
static struct fec_platform_data mx28_fec_pdata[] __initdata = {
{
/* fec0 */
.phy = PHY_INTERFACE_MODE_RMII,
}, {
/* fec1 */
.phy = PHY_INTERFACE_MODE_RMII,
},
};
static int __init m28evk_fec_get_mac(void)
{
int i;
u32 val;
const u32 *ocotp = mxs_get_ocotp();
if (!ocotp) {
pr_err("%s: timeout when reading fec mac from OCOTP\n",
__func__);
return -ETIMEDOUT;
}
/*
* OCOTP only stores the last 4 octets for each mac address,
* so hard-code DENX OUI (C0:E5:4E) here.
*/
for (i = 0; i < 2; i++) {
val = ocotp[i * 4];
mx28_fec_pdata[i].mac[0] = 0xC0;
mx28_fec_pdata[i].mac[1] = 0xE5;
mx28_fec_pdata[i].mac[2] = 0x4E;
mx28_fec_pdata[i].mac[3] = (val >> 16) & 0xff;
mx28_fec_pdata[i].mac[4] = (val >> 8) & 0xff;
mx28_fec_pdata[i].mac[5] = (val >> 0) & 0xff;
}
return 0;
}
/* mxsfb (lcdif) */
static struct fb_videomode m28evk_video_modes[] = {
{
.name = "Ampire AM-800480R2TMQW-T01H",
.refresh = 60,
.xres = 800,
.yres = 480,
.pixclock = 30066, /* picosecond (33.26 MHz) */
.left_margin = 0,
.right_margin = 256,
.upper_margin = 0,
.lower_margin = 45,
.hsync_len = 1,
.vsync_len = 1,
.sync = FB_SYNC_DATA_ENABLE_HIGH_ACT,
},
};
static const struct mxsfb_platform_data m28evk_mxsfb_pdata __initconst = {
.mode_list = m28evk_video_modes,
.mode_count = ARRAY_SIZE(m28evk_video_modes),
.default_bpp = 16,
.ld_intf_width = STMLCDIF_18BIT,
};
static struct at24_platform_data m28evk_eeprom = {
.byte_len = 16384,
.page_size = 32,
.flags = AT24_FLAG_ADDR16,
};
static struct i2c_board_info m28_stk5v3_i2c_boardinfo[] __initdata = {
{
I2C_BOARD_INFO("at24", 0x51), /* E0=1, E1=0, E2=0 */
.platform_data = &m28evk_eeprom,
},
};
static struct mxs_mmc_platform_data m28evk_mmc_pdata[] __initdata = {
{
/* mmc0 */
.wp_gpio = MX28EVK_MMC0_WRITE_PROTECT,
.flags = SLOTF_8_BIT_CAPABLE,
}, {
/* mmc1 */
.wp_gpio = MX28EVK_MMC1_WRITE_PROTECT,
.flags = SLOTF_8_BIT_CAPABLE,
},
};
static void __init m28evk_init(void)
{
mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads));
mx28_add_duart();
mx28_add_auart0();
mx28_add_auart3();
if (!m28evk_fec_get_mac()) {
mx28_add_fec(0, &mx28_fec_pdata[0]);
mx28_add_fec(1, &mx28_fec_pdata[1]);
}
mx28_add_flexcan(0, NULL);
mx28_add_flexcan(1, NULL);
mx28_add_mxsfb(&m28evk_mxsfb_pdata);
mx28_add_mxs_mmc(0, &m28evk_mmc_pdata[0]);
mx28_add_mxs_mmc(1, &m28evk_mmc_pdata[1]);
gpio_led_register_device(0, &m28evk_led_data);
/* I2C */
mx28_add_mxs_i2c(0);
i2c_register_board_info(0, m28_stk5v3_i2c_boardinfo,
ARRAY_SIZE(m28_stk5v3_i2c_boardinfo));
}
static void __init m28evk_timer_init(void)
{
mx28_clocks_init();
}
static struct sys_timer m28evk_timer = {
.init = m28evk_timer_init,
};
MACHINE_START(M28EVK, "DENX M28 EVK")
.map_io = mx28_map_io,
.init_irq = mx28_init_irq,
.init_machine = m28evk_init,
.timer = &m28evk_timer,
MACHINE_END

View File

@ -15,7 +15,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -167,6 +166,7 @@ static void __init mx23evk_init(void)
gpio_set_value(MX23EVK_BL_ENABLE, 1); gpio_set_value(MX23EVK_BL_ENABLE, 1);
mx23_add_mxsfb(&mx23evk_mxsfb_pdata); mx23_add_mxsfb(&mx23evk_mxsfb_pdata);
mx23_add_rtc_stmp3xxx();
} }
static void __init mx23evk_timer_init(void) static void __init mx23evk_timer_init(void)

View File

@ -16,8 +16,10 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/irq.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/i2c.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -183,6 +185,24 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
/* led */ /* led */
MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL, MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL,
/* I2C */
MX28_PAD_I2C0_SCL__I2C0_SCL |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_I2C0_SDA__I2C0_SDA |
(MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
/* saif0 & saif1 */
MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 |
(MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
}; };
/* led */ /* led */
@ -352,6 +372,55 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
}, },
}; };
static struct i2c_board_info mxs_i2c0_board_info[] __initdata = {
{
I2C_BOARD_INFO("sgtl5000", 0x0a),
},
};
#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
static struct regulator_consumer_supply mx28evk_audio_consumer_supplies[] = {
REGULATOR_SUPPLY("VDDA", "0-000a"),
REGULATOR_SUPPLY("VDDIO", "0-000a"),
};
static struct regulator_init_data mx28evk_vdd_reg_init_data = {
.constraints = {
.name = "3V3",
.always_on = 1,
},
.consumer_supplies = mx28evk_audio_consumer_supplies,
.num_consumer_supplies = ARRAY_SIZE(mx28evk_audio_consumer_supplies),
};
static struct fixed_voltage_config mx28evk_vdd_pdata = {
.supply_name = "board-3V3",
.microvolts = 3300000,
.gpio = -EINVAL,
.enabled_at_boot = 1,
.init_data = &mx28evk_vdd_reg_init_data,
};
static struct platform_device mx28evk_voltage_regulator = {
.name = "reg-fixed-voltage",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &mx28evk_vdd_pdata,
},
};
static void __init mx28evk_add_regulators(void)
{
platform_device_register(&mx28evk_voltage_regulator);
}
#else
static void __init mx28evk_add_regulators(void) {}
#endif
static struct gpio mx28evk_lcd_gpios[] = {
{ MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
{ MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
};
static void __init mx28evk_init(void) static void __init mx28evk_init(void)
{ {
int ret; int ret;
@ -378,19 +447,24 @@ static void __init mx28evk_init(void)
mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
} }
ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); ret = gpio_request_array(mx28evk_lcd_gpios,
ARRAY_SIZE(mx28evk_lcd_gpios));
if (ret) if (ret)
pr_warn("failed to request gpio lcd-enable: %d\n", ret); pr_warn("failed to request gpio pins for lcd: %d\n", ret);
else else
gpio_set_value(MX28EVK_LCD_ENABLE, 1); mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable"); mx28_add_saif(0);
if (ret) mx28_add_saif(1);
pr_warn("failed to request gpio bl-enable: %d\n", ret);
else
gpio_set_value(MX28EVK_BL_ENABLE, 1);
mx28_add_mxsfb(&mx28evk_mxsfb_pdata); mx28_add_mxs_i2c(0);
i2c_register_board_info(0, mxs_i2c0_board_info,
ARRAY_SIZE(mxs_i2c0_board_info));
mx28evk_add_regulators();
mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
NULL, 0);
/* power on mmc slot by writing 0 to the gpio */ /* power on mmc slot by writing 0 to the gpio */
ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
@ -403,7 +477,11 @@ static void __init mx28evk_init(void)
"mmc1-slot-power"); "mmc1-slot-power");
if (ret) if (ret)
pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
else
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
mx28_add_rtc_stmp3xxx();
gpio_led_register_device(0, &mx28evk_led_data); gpio_led_register_device(0, &mx28evk_led_data);
} }

View File

@ -19,7 +19,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
@ -91,6 +90,7 @@ static void __init stmp378x_dvb_init(void)
mx23_add_duart(); mx23_add_duart();
mx23_add_auart0(); mx23_add_auart0();
mx23_add_rtc_stmp3xxx();
/* power on mmc slot */ /* power on mmc slot */
ret = gpio_request_one(STMP378X_DEVB_MMC0_SLOT_POWER, ret = gpio_request_one(STMP378X_DEVB_MMC0_SLOT_POWER,

View File

@ -161,6 +161,7 @@ static void __init tx28_stk5v3_init(void)
i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo,
ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo));
mx28_add_mxs_mmc(0, &tx28_mmc0_pdata); mx28_add_mxs_mmc(0, &tx28_mmc0_pdata);
mx28_add_rtc_stmp3xxx();
} }
static void __init tx28_timer_init(void) static void __init tx28_timer_init(void)

View File

@ -1,44 +0,0 @@
/*
* Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*
* 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
*
* Create static mapping between physical to virtual memory.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/mach/map.h>
#include <mach/mx28.h>
#include <mach/common.h>
#include <mach/iomux.h>
/*
* Define the MX28 memory map.
*/
static struct map_desc mx28_io_desc[] __initdata = {
mxs_map_entry(MX28, OCRAM, MT_DEVICE),
mxs_map_entry(MX28, IO, MT_DEVICE),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void __init mx28_map_io(void)
{
iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
}
void __init mx28_init_irq(void)
{
icoll_init_irq();
}

Some files were not shown because too many files have changed in this diff Show More