mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-30 23:30:48 +00:00
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (149 commits) arm: omap: Add omap3_defconfig AM35xx: Defconfig for AM3517 EVM board AM35xx: Add support for AM3517 EVM board omap: 3630sdp: defconfig creation omap: 3630sdp: introduce 3630 sdp board support omap3: Add defconfig for IGEP v2 board omap3: Add minimal IGEP v2 support omap3: Add CompuLab CM-T35 defconfig omap3: Add CompuLab CM-T35 board support omap3: rx51: Add wl1251 wlan driver support omap3: rx51: Add SDRAM init omap1: Add default kernel configuration for Herald omap1: Add board support and LCD for HTC Herald omap: zoom2: update defconfig for LL_DEBUG_NONE omap: zoom3: defconfig creation omap3: zoom: Introduce zoom3 board support omap3: zoom: Drop i2c-1 speed to 2400 omap3: zoom: rename zoom2 name to generic zoom omap3: zoom: split board file for software reuse omap3evm: MIgrate to smsc911x ethernet driver ... Fix trivial conflict (two unrelated config options added next to each other) in arch/arm/mach-omap2/Makefile
This commit is contained in:
commit
1c496784a0
1207
arch/arm/configs/am3517_evm_defconfig
Normal file
1207
arch/arm/configs/am3517_evm_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
1733
arch/arm/configs/cm_t35_defconfig
Normal file
1733
arch/arm/configs/cm_t35_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
1142
arch/arm/configs/htcherald_defconfig
Normal file
1142
arch/arm/configs/htcherald_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
1554
arch/arm/configs/igep0020_defconfig
Normal file
1554
arch/arm/configs/igep0020_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -52,8 +52,8 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
|
2119
arch/arm/configs/omap3_defconfig
Normal file
2119
arch/arm/configs/omap3_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -59,8 +59,8 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
@ -617,8 +617,8 @@ CONFIG_MII=y
|
||||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_ENC28J60 is not set
|
||||
# CONFIG_ETHOC is not set
|
||||
CONFIG_SMC911X=y
|
||||
# CONFIG_SMSC911X is not set
|
||||
# CONFIG_SMC911X is not set
|
||||
CONFIG_SMSC911X=y
|
||||
# CONFIG_DNET is not set
|
||||
# CONFIG_IBM_NEW_EMAC_ZMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
@ -676,13 +676,19 @@ CONFIG_INPUT_EVDEV=y
|
||||
# Input Device Drivers
|
||||
#
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
# CONFIG_KEYBOARD_ADP5588 is not set
|
||||
# CONFIG_KEYBOARD_ATKBD is not set
|
||||
# CONFIG_KEYBOARD_SUNKBD is not set
|
||||
# CONFIG_QT2160 is not set
|
||||
# CONFIG_KEYBOARD_LKKBD is not set
|
||||
# CONFIG_KEYBOARD_XTKBD is not set
|
||||
# CONFIG_KEYBOARD_NEWTON is not set
|
||||
# CONFIG_KEYBOARD_STOWAWAY is not set
|
||||
# CONFIG_KEYBOARD_GPIO is not set
|
||||
# CONFIG_KEYBOARD_MATRIX is not set
|
||||
# CONFIG_KEYBOARD_MAX7359 is not set
|
||||
# CONFIG_KEYBOARD_NEWTON is not set
|
||||
# CONFIG_KEYBOARD_OPENCORES is not set
|
||||
# CONFIG_KEYBOARD_STOWAWAY is not set
|
||||
# CONFIG_KEYBOARD_SUNKBD is not set
|
||||
CONFIG_KEYBOARD_TWL4030=y
|
||||
# CONFIG_KEYBOARD_XTKBD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
@ -1126,7 +1132,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
|
||||
#
|
||||
# CONFIG_MMC_SDHCI is not set
|
||||
# CONFIG_MMC_OMAP is not set
|
||||
CONFIG_MMC_OMAP_HS=m
|
||||
CONFIG_MMC_OMAP_HS=y
|
||||
# CONFIG_MMC_SPI is not set
|
||||
# CONFIG_MEMSTICK is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
|
@ -51,8 +51,9 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
|
File diff suppressed because it is too large
Load Diff
1611
arch/arm/configs/omap_3630sdp_defconfig
Normal file
1611
arch/arm/configs/omap_3630sdp_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -52,8 +52,8 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
|
@ -49,8 +49,8 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
|
@ -59,8 +59,8 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
@ -202,7 +202,8 @@ CONFIG_OMAP_32K_TIMER_HZ=128
|
||||
CONFIG_OMAP_DM_TIMER=y
|
||||
# CONFIG_OMAP_LL_DEBUG_UART1 is not set
|
||||
# CONFIG_OMAP_LL_DEBUG_UART2 is not set
|
||||
CONFIG_OMAP_LL_DEBUG_UART3=y
|
||||
# CONFIG_OMAP_LL_DEBUG_UART3 is not set
|
||||
CONFIG_OMAP_LL_DEBUG_NONE=y
|
||||
CONFIG_ARCH_OMAP34XX=y
|
||||
CONFIG_ARCH_OMAP3430=y
|
||||
|
||||
|
1610
arch/arm/configs/omap_zoom3_defconfig
Normal file
1610
arch/arm/configs/omap_zoom3_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -54,8 +54,8 @@ CONFIG_FAIR_GROUP_SCHED=y
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_SYSFS_DEPRECATED=y is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2=y is not set
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
|
@ -784,7 +784,7 @@ CONFIG_INPUT_KEYBOARD=y
|
||||
# CONFIG_KEYBOARD_XTKBD is not set
|
||||
# CONFIG_KEYBOARD_NEWTON is not set
|
||||
# CONFIG_KEYBOARD_STOWAWAY is not set
|
||||
# CONFIG_KEYBOARD_GPIO is not set
|
||||
CONFIG_KEYBOARD_GPIO=m
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
|
@ -11,6 +11,7 @@ config ARCH_OMAP850
|
||||
depends on ARCH_OMAP1
|
||||
bool "OMAP850 Based System"
|
||||
select CPU_ARM926T
|
||||
select ARCH_OMAP_OTG
|
||||
|
||||
config ARCH_OMAP15XX
|
||||
depends on ARCH_OMAP1
|
||||
@ -56,6 +57,12 @@ config MACH_OMAP_HTCWIZARD
|
||||
help
|
||||
HTC Wizard smartphone support (AKA QTEK 9100, ...)
|
||||
|
||||
config MACH_HERALD
|
||||
bool "HTC Herald"
|
||||
depends on ARCH_OMAP850
|
||||
help
|
||||
HTC Herald smartphone support (AKA T-Mobile Wing, ...)
|
||||
|
||||
config MACH_OMAP_OSK
|
||||
bool "TI OSK Support"
|
||||
depends on ARCH_OMAP1 && ARCH_OMAP16XX
|
||||
|
@ -34,6 +34,7 @@ obj-$(CONFIG_MACH_OMAP_PALMTT) += board-palmtt.o
|
||||
obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o
|
||||
obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o
|
||||
obj-$(CONFIG_MACH_SX1) += board-sx1.o board-sx1-mmc.o
|
||||
obj-$(CONFIG_MACH_HERALD) += board-htcherald.o
|
||||
|
||||
ifeq ($(CONFIG_ARCH_OMAP15XX),y)
|
||||
# Innovator-1510 FPGA
|
||||
|
@ -25,13 +25,13 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/board-ams-delta.h>
|
||||
#include <plat/board-ams-delta.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
static u8 ams_delta_latch1_reg;
|
||||
static u16 ams_delta_latch2_reg;
|
||||
|
@ -26,14 +26,14 @@
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/tc.h>
|
||||
#include <plat/tc.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/fpga.h>
|
||||
#include <mach/nand.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/board.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/board.h>
|
||||
|
||||
/* fsample is pretty close to p2-sample */
|
||||
|
||||
@ -107,7 +107,7 @@ static struct resource smc91x_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = INT_730_MPU_EXT_NIRQ,
|
||||
.start = INT_7XX_MPU_EXT_NIRQ,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
},
|
||||
@ -196,8 +196,8 @@ static struct platform_device smc91x_device = {
|
||||
|
||||
static struct resource kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_730_MPUIO_KEYPAD,
|
||||
.end = INT_730_MPUIO_KEYPAD,
|
||||
.start = INT_7XX_MPUIO_KEYPAD,
|
||||
.end = INT_7XX_MPUIO_KEYPAD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@ -309,7 +309,7 @@ static void __init omap_fsample_map_io(void)
|
||||
/*
|
||||
* Hold GSM Reset until needed
|
||||
*/
|
||||
omap_writew(omap_readw(OMAP730_DSP_M_CTL) & ~1, OMAP730_DSP_M_CTL);
|
||||
omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);
|
||||
|
||||
/*
|
||||
* UARTs -> done automagically by 8250 driver
|
||||
@ -320,21 +320,21 @@ static void __init omap_fsample_map_io(void)
|
||||
*/
|
||||
|
||||
/* Flash: CS0 timings setup */
|
||||
omap_writel(0x0000fff3, OMAP730_FLASH_CFG_0);
|
||||
omap_writel(0x00000088, OMAP730_FLASH_ACFG_0);
|
||||
omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
|
||||
omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);
|
||||
|
||||
/*
|
||||
* Ethernet support through the debug board
|
||||
* CS1 timings setup
|
||||
*/
|
||||
omap_writel(0x0000fff3, OMAP730_FLASH_CFG_1);
|
||||
omap_writel(0x00000000, OMAP730_FLASH_ACFG_1);
|
||||
omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
|
||||
omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);
|
||||
|
||||
/*
|
||||
* Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
|
||||
* It is used as the Ethernet controller interrupt
|
||||
*/
|
||||
omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9);
|
||||
omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
|
||||
|
@ -23,10 +23,10 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
static void __init omap_generic_init_irq(void)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <linux/i2c/tps65010.h>
|
||||
|
||||
#include <mach/mmc.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
#include "board-h2.h"
|
||||
|
@ -37,14 +37,14 @@
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/nand.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/irda.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
#include "board-h2.h"
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <linux/i2c/tps65010.h>
|
||||
|
||||
#include <mach/mmc.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
#include "board-h3.h"
|
||||
|
@ -40,13 +40,13 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/nand.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
#include "board-h3.h"
|
||||
|
||||
|
247
arch/arm/mach-omap1/board-htcherald.c
Normal file
247
arch/arm/mach-omap1/board-htcherald.c
Normal file
@ -0,0 +1,247 @@
|
||||
/*
|
||||
* HTC Herald board configuration
|
||||
* Copyright (C) 2009 Cory Maccarrone <darkstar6262@gmail.com>
|
||||
* Copyright (C) 2009 Wing Linux
|
||||
*
|
||||
* Based on the board-htcwizard.c file from the linwizard project:
|
||||
* Copyright (C) 2006 Unai Uribarri
|
||||
* Copyright (C) 2008 linwizard.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <plat/omap7xx.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/keypad.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
/* LCD register definition */
|
||||
#define OMAP_LCDC_CONTROL (0xfffec000 + 0x00)
|
||||
#define OMAP_LCDC_STATUS (0xfffec000 + 0x10)
|
||||
#define OMAP_DMA_LCD_CCR (0xfffee300 + 0xc2)
|
||||
#define OMAP_DMA_LCD_CTRL (0xfffee300 + 0xc4)
|
||||
#define OMAP_LCDC_CTRL_LCD_EN (1 << 0)
|
||||
#define OMAP_LCDC_STAT_DONE (1 << 0)
|
||||
|
||||
static struct omap_lcd_config htcherald_lcd_config __initdata = {
|
||||
.ctrl_name = "internal",
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel htcherald_config[] __initdata = {
|
||||
{ OMAP_TAG_LCD, &htcherald_lcd_config },
|
||||
};
|
||||
|
||||
/* Keyboard definition */
|
||||
|
||||
static int htc_herald_keymap[] = {
|
||||
KEY(0, 0, KEY_RECORD), /* Mail button */
|
||||
KEY(0, 1, KEY_CAMERA), /* Camera */
|
||||
KEY(0, 2, KEY_PHONE), /* Send key */
|
||||
KEY(0, 3, KEY_VOLUMEUP), /* Volume up */
|
||||
KEY(0, 4, KEY_F2), /* Right bar (landscape) */
|
||||
KEY(0, 5, KEY_MAIL), /* Win key (portrait) */
|
||||
KEY(0, 6, KEY_DIRECTORY), /* Right bar (protrait) */
|
||||
KEY(1, 0, KEY_LEFTCTRL), /* Windows key */
|
||||
KEY(1, 1, KEY_COMMA),
|
||||
KEY(1, 2, KEY_M),
|
||||
KEY(1, 3, KEY_K),
|
||||
KEY(1, 4, KEY_SLASH), /* OK key */
|
||||
KEY(1, 5, KEY_I),
|
||||
KEY(1, 6, KEY_U),
|
||||
KEY(2, 0, KEY_LEFTALT),
|
||||
KEY(2, 1, KEY_TAB),
|
||||
KEY(2, 2, KEY_N),
|
||||
KEY(2, 3, KEY_J),
|
||||
KEY(2, 4, KEY_ENTER),
|
||||
KEY(2, 5, KEY_H),
|
||||
KEY(2, 6, KEY_Y),
|
||||
KEY(3, 0, KEY_SPACE),
|
||||
KEY(3, 1, KEY_L),
|
||||
KEY(3, 2, KEY_B),
|
||||
KEY(3, 3, KEY_V),
|
||||
KEY(3, 4, KEY_BACKSPACE),
|
||||
KEY(3, 5, KEY_G),
|
||||
KEY(3, 6, KEY_T),
|
||||
KEY(4, 0, KEY_CAPSLOCK), /* Shift */
|
||||
KEY(4, 1, KEY_C),
|
||||
KEY(4, 2, KEY_F),
|
||||
KEY(4, 3, KEY_R),
|
||||
KEY(4, 4, KEY_O),
|
||||
KEY(4, 5, KEY_E),
|
||||
KEY(4, 6, KEY_D),
|
||||
KEY(5, 0, KEY_X),
|
||||
KEY(5, 1, KEY_Z),
|
||||
KEY(5, 2, KEY_S),
|
||||
KEY(5, 3, KEY_W),
|
||||
KEY(5, 4, KEY_P),
|
||||
KEY(5, 5, KEY_Q),
|
||||
KEY(5, 6, KEY_A),
|
||||
KEY(6, 0, KEY_CONNECT), /* Voice button */
|
||||
KEY(6, 2, KEY_CANCEL), /* End key */
|
||||
KEY(6, 3, KEY_VOLUMEDOWN), /* Volume down */
|
||||
KEY(6, 4, KEY_F1), /* Left bar (landscape) */
|
||||
KEY(6, 5, KEY_WWW), /* OK button (portrait) */
|
||||
KEY(6, 6, KEY_CALENDAR), /* Left bar (portrait) */
|
||||
0
|
||||
};
|
||||
|
||||
struct omap_kp_platform_data htcherald_kp_data = {
|
||||
.rows = 7,
|
||||
.cols = 7,
|
||||
.delay = 20,
|
||||
.rep = 1,
|
||||
.keymap = htc_herald_keymap,
|
||||
};
|
||||
|
||||
static struct resource kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_7XX_MPUIO_KEYPAD,
|
||||
.end = INT_7XX_MPUIO_KEYPAD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device kp_device = {
|
||||
.name = "omap-keypad",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &htcherald_kp_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(kp_resources),
|
||||
.resource = kp_resources,
|
||||
};
|
||||
|
||||
/* LCD Device resources */
|
||||
static struct platform_device lcd_device = {
|
||||
.name = "lcd_htcherald",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
&kp_device,
|
||||
&lcd_device,
|
||||
};
|
||||
|
||||
/*
|
||||
* Init functions from here on
|
||||
*/
|
||||
|
||||
static void __init htcherald_lcd_init(void)
|
||||
{
|
||||
u32 reg;
|
||||
unsigned int tries = 200;
|
||||
|
||||
/* disable controller if active */
|
||||
reg = omap_readl(OMAP_LCDC_CONTROL);
|
||||
if (reg & OMAP_LCDC_CTRL_LCD_EN) {
|
||||
reg &= ~OMAP_LCDC_CTRL_LCD_EN;
|
||||
omap_writel(reg, OMAP_LCDC_CONTROL);
|
||||
|
||||
/* wait for end of frame */
|
||||
while (!(omap_readl(OMAP_LCDC_STATUS) & OMAP_LCDC_STAT_DONE)) {
|
||||
tries--;
|
||||
if (!tries)
|
||||
break;
|
||||
}
|
||||
if (!tries)
|
||||
printk(KERN_WARNING "Timeout waiting for end of frame "
|
||||
"-- LCD may not be available\n");
|
||||
|
||||
/* turn off DMA */
|
||||
reg = omap_readw(OMAP_DMA_LCD_CCR);
|
||||
reg &= ~(1 << 7);
|
||||
omap_writew(reg, OMAP_DMA_LCD_CCR);
|
||||
|
||||
reg = omap_readw(OMAP_DMA_LCD_CTRL);
|
||||
reg &= ~(1 << 8);
|
||||
omap_writew(reg, OMAP_DMA_LCD_CTRL);
|
||||
}
|
||||
}
|
||||
|
||||
static void __init htcherald_map_io(void)
|
||||
{
|
||||
omap1_map_common_io();
|
||||
|
||||
/*
|
||||
* The LCD panel must be disabled and DMA turned off here, as doing
|
||||
* it later causes the LCD never to reinitialize.
|
||||
*/
|
||||
htcherald_lcd_init();
|
||||
|
||||
printk(KERN_INFO "htcherald_map_io done.\n");
|
||||
}
|
||||
|
||||
static void __init htcherald_disable_watchdog(void)
|
||||
{
|
||||
/* Disable watchdog if running */
|
||||
if (omap_readl(OMAP_WDT_TIMER_MODE) & 0x8000) {
|
||||
/*
|
||||
* disable a potentially running watchdog timer before
|
||||
* it kills us.
|
||||
*/
|
||||
printk(KERN_WARNING "OMAP850 Watchdog seems to be activated, disabling it for now.\n");
|
||||
omap_writel(0xF5, OMAP_WDT_TIMER_MODE);
|
||||
omap_writel(0xA0, OMAP_WDT_TIMER_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
static void __init htcherald_init(void)
|
||||
{
|
||||
printk(KERN_INFO "HTC Herald init.\n");
|
||||
|
||||
omap_gpio_init();
|
||||
|
||||
omap_board_config = htcherald_config;
|
||||
omap_board_config_size = ARRAY_SIZE(htcherald_config);
|
||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
|
||||
htcherald_disable_watchdog();
|
||||
}
|
||||
|
||||
static void __init htcherald_init_irq(void)
|
||||
{
|
||||
printk(KERN_INFO "htcherald_init_irq.\n");
|
||||
omap1_init_common_hw();
|
||||
omap_init_irq();
|
||||
}
|
||||
|
||||
MACHINE_START(HERALD, "HTC Herald")
|
||||
/* Maintainer: Cory Maccarrone <darkstar6262@gmail.com> */
|
||||
/* Maintainer: wing-linux.sourceforge.net */
|
||||
.phys_io = 0xfff00000,
|
||||
.io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x10000100,
|
||||
.map_io = htcherald_map_io,
|
||||
.init_irq = htcherald_init_irq,
|
||||
.init_machine = htcherald_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -30,14 +30,14 @@
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <mach/fpga.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/mmc.h>
|
||||
|
||||
/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
|
||||
#define INNOVATOR1610_ETHR_START 0x04000300
|
||||
|
@ -26,17 +26,17 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/dsp_common.h>
|
||||
#include <mach/omapfb.h>
|
||||
#include <mach/hwa742.h>
|
||||
#include <mach/lcd_mipid.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/clock.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/dsp_common.h>
|
||||
#include <plat/omapfb.h>
|
||||
#include <plat/hwa742.h>
|
||||
#include <plat/lcd_mipid.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <plat/clock.h>
|
||||
|
||||
#define ADS7846_PENDOWN_GPIO 15
|
||||
|
||||
|
@ -47,10 +47,10 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/usb.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
|
||||
#define OMAP_OSK_ETHR_START 0x04800300
|
||||
@ -312,7 +312,7 @@ static struct omap_board_config_kernel osk_config[] __initdata = {
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
||||
#include <mach/keypad.h>
|
||||
#include <plat/keypad.h>
|
||||
|
||||
static struct at24_platform_data at24c04 = {
|
||||
.byte_len = SZ_4K / 8,
|
||||
|
@ -34,14 +34,14 @@
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/irda.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
#define PALMTE_USBDETECT_GPIO 0
|
||||
#define PALMTE_USB_OR_DC_GPIO 1
|
||||
|
@ -29,16 +29,16 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/led.h>
|
||||
#include <plat/led.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/irda.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
@ -33,15 +33,15 @@
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/omap-alsa.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/irda.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/omap-alsa.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
@ -26,14 +26,14 @@
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/tc.h>
|
||||
#include <plat/tc.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/fpga.h>
|
||||
#include <mach/nand.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/board.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/board.h>
|
||||
|
||||
static int p2_keymap[] = {
|
||||
KEY(0,0,KEY_UP),
|
||||
@ -74,7 +74,7 @@ static struct resource smc91x_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = INT_730_MPU_EXT_NIRQ,
|
||||
.start = INT_7XX_MPU_EXT_NIRQ,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
|
||||
},
|
||||
@ -163,8 +163,8 @@ static struct platform_device smc91x_device = {
|
||||
|
||||
static struct resource kp_resources[] = {
|
||||
[0] = {
|
||||
.start = INT_730_MPUIO_KEYPAD,
|
||||
.end = INT_730_MPUIO_KEYPAD,
|
||||
.start = INT_7XX_MPUIO_KEYPAD,
|
||||
.end = INT_7XX_MPUIO_KEYPAD,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@ -270,7 +270,7 @@ static void __init omap_perseus2_map_io(void)
|
||||
/*
|
||||
* Hold GSM Reset until needed
|
||||
*/
|
||||
omap_writew(omap_readw(OMAP730_DSP_M_CTL) & ~1, OMAP730_DSP_M_CTL);
|
||||
omap_writew(omap_readw(OMAP7XX_DSP_M_CTL) & ~1, OMAP7XX_DSP_M_CTL);
|
||||
|
||||
/*
|
||||
* UARTs -> done automagically by 8250 driver
|
||||
@ -281,21 +281,21 @@ static void __init omap_perseus2_map_io(void)
|
||||
*/
|
||||
|
||||
/* Flash: CS0 timings setup */
|
||||
omap_writel(0x0000fff3, OMAP730_FLASH_CFG_0);
|
||||
omap_writel(0x00000088, OMAP730_FLASH_ACFG_0);
|
||||
omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_0);
|
||||
omap_writel(0x00000088, OMAP7XX_FLASH_ACFG_0);
|
||||
|
||||
/*
|
||||
* Ethernet support through the debug board
|
||||
* CS1 timings setup
|
||||
*/
|
||||
omap_writel(0x0000fff3, OMAP730_FLASH_CFG_1);
|
||||
omap_writel(0x00000000, OMAP730_FLASH_ACFG_1);
|
||||
omap_writel(0x0000fff3, OMAP7XX_FLASH_CFG_1);
|
||||
omap_writel(0x00000000, OMAP7XX_FLASH_ACFG_1);
|
||||
|
||||
/*
|
||||
* Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
|
||||
* It is used as the Ethernet controller interrupt
|
||||
*/
|
||||
omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9);
|
||||
omap_writel(omap_readl(OMAP7XX_IO_CONF_9) & 0x1FFFFFFF, OMAP7XX_IO_CONF_9);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
|
||||
|
@ -15,9 +15,9 @@
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/board-sx1.h>
|
||||
#include <plat/board-sx1.h>
|
||||
|
||||
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
||||
|
||||
|
@ -33,15 +33,15 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/irda.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/board-sx1.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/irda.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/board-sx1.h>
|
||||
|
||||
/* Write to I2C device */
|
||||
int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
|
||||
|
@ -29,11 +29,11 @@
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <plat/common.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/usb.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
static struct plat_serial8250_port voiceblue_ports[] = {
|
||||
{
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/clkdev.h>
|
||||
|
||||
#include <mach/cpu.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/sram.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/sram.h>
|
||||
|
||||
static const struct clkops clkops_generic;
|
||||
static const struct clkops clkops_uart;
|
||||
@ -69,13 +69,13 @@ struct omap_clk {
|
||||
}
|
||||
|
||||
#define CK_310 (1 << 0)
|
||||
#define CK_730 (1 << 1)
|
||||
#define CK_7XX (1 << 1)
|
||||
#define CK_1510 (1 << 2)
|
||||
#define CK_16XX (1 << 3)
|
||||
|
||||
static struct omap_clk omap_clks[] = {
|
||||
/* non-ULPD clocks */
|
||||
CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310),
|
||||
CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX),
|
||||
CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310),
|
||||
/* CK_GEN1 clocks */
|
||||
CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX),
|
||||
@ -83,7 +83,7 @@ static struct omap_clk omap_clks[] = {
|
||||
CLK(NULL, "arm_ck", &arm_ck, CK_16XX | CK_1510 | CK_310),
|
||||
CLK(NULL, "armper_ck", &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
|
||||
CLK(NULL, "arm_gpio_ck", &arm_gpio_ck, CK_1510 | CK_310),
|
||||
CLK(NULL, "armxor_ck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
|
||||
CLK(NULL, "armxor_ck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
|
||||
CLK(NULL, "armtim_ck", &armtim_ck.clk, CK_16XX | CK_1510 | CK_310),
|
||||
CLK("omap_wdt", "fck", &armwdt_ck.clk, CK_16XX | CK_1510 | CK_310),
|
||||
CLK("omap_wdt", "ick", &armper_ck.clk, CK_16XX),
|
||||
@ -97,9 +97,9 @@ static struct omap_clk omap_clks[] = {
|
||||
CLK(NULL, "dspxor_ck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
|
||||
CLK(NULL, "dsptim_ck", &dsptim_ck, CK_16XX | CK_1510 | CK_310),
|
||||
/* CK_GEN3 clocks */
|
||||
CLK(NULL, "tc_ck", &tc_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_730),
|
||||
CLK(NULL, "tc_ck", &tc_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
|
||||
CLK(NULL, "tipb_ck", &tipb_ck, CK_1510 | CK_310),
|
||||
CLK(NULL, "l3_ocpi_ck", &l3_ocpi_ck, CK_16XX),
|
||||
CLK(NULL, "l3_ocpi_ck", &l3_ocpi_ck, CK_16XX | CK_7XX),
|
||||
CLK(NULL, "tc1_ck", &tc1_ck, CK_16XX),
|
||||
CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX),
|
||||
CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310),
|
||||
@ -108,7 +108,7 @@ static struct omap_clk omap_clks[] = {
|
||||
CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310),
|
||||
CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX),
|
||||
CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX),
|
||||
CLK(NULL, "lcd_ck", &lcd_ck_16xx, CK_16XX | CK_730),
|
||||
CLK(NULL, "lcd_ck", &lcd_ck_16xx, CK_16XX | CK_7XX),
|
||||
CLK(NULL, "lcd_ck", &lcd_ck_1510.clk, CK_1510 | CK_310),
|
||||
/* ULPD clocks */
|
||||
CLK(NULL, "uart1_ck", &uart1_1510, CK_1510 | CK_310),
|
||||
@ -120,12 +120,14 @@ static struct omap_clk omap_clks[] = {
|
||||
CLK(NULL, "usb_hhc_ck", &usb_hhc_ck1510, CK_1510 | CK_310),
|
||||
CLK(NULL, "usb_hhc_ck", &usb_hhc_ck16xx, CK_16XX),
|
||||
CLK(NULL, "usb_dc_ck", &usb_dc_ck, CK_16XX),
|
||||
CLK(NULL, "usb_dc_ck", &usb_dc_ck7xx, CK_7XX),
|
||||
CLK(NULL, "mclk", &mclk_1510, CK_1510 | CK_310),
|
||||
CLK(NULL, "mclk", &mclk_16xx, CK_16XX),
|
||||
CLK(NULL, "bclk", &bclk_1510, CK_1510 | CK_310),
|
||||
CLK(NULL, "bclk", &bclk_16xx, CK_16XX),
|
||||
CLK("mmci-omap.0", "fck", &mmc1_ck, CK_16XX | CK_1510 | CK_310),
|
||||
CLK("mmci-omap.0", "ick", &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
|
||||
CLK("mmci-omap.0", "fck", &mmc3_ck, CK_7XX),
|
||||
CLK("mmci-omap.0", "ick", &armper_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
|
||||
CLK("mmci-omap.1", "fck", &mmc2_ck, CK_16XX),
|
||||
CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX),
|
||||
/* Virtual clocks */
|
||||
@ -398,7 +400,7 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate)
|
||||
* Reprogramming the DPLL is tricky, it must be done from SRAM.
|
||||
* (on 730, bit 13 must always be 1)
|
||||
*/
|
||||
if (cpu_is_omap730())
|
||||
if (cpu_is_omap7xx())
|
||||
omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000);
|
||||
else
|
||||
omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
|
||||
@ -783,8 +785,8 @@ int __init omap1_clk_init(void)
|
||||
cpu_mask |= CK_16XX;
|
||||
if (cpu_is_omap1510())
|
||||
cpu_mask |= CK_1510;
|
||||
if (cpu_is_omap730())
|
||||
cpu_mask |= CK_730;
|
||||
if (cpu_is_omap7xx())
|
||||
cpu_mask |= CK_7XX;
|
||||
if (cpu_is_omap310())
|
||||
cpu_mask |= CK_310;
|
||||
|
||||
@ -800,7 +802,7 @@ int __init omap1_clk_init(void)
|
||||
crystal_type = info->system_clock_type;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP730)
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
ck_ref.rate = 13000000;
|
||||
#elif defined(CONFIG_ARCH_OMAP16XX)
|
||||
if (crystal_type == 2)
|
||||
@ -847,7 +849,7 @@ int __init omap1_clk_init(void)
|
||||
printk(KERN_ERR "System frequencies not set. Check your config.\n");
|
||||
/* Guess sane values (60MHz) */
|
||||
omap_writew(0x2290, DPLL_CTL);
|
||||
omap_writew(cpu_is_omap730() ? 0x3005 : 0x1005, ARM_CKCTL);
|
||||
omap_writew(cpu_is_omap7xx() ? 0x3005 : 0x1005, ARM_CKCTL);
|
||||
ck_dpll1.rate = 60000000;
|
||||
}
|
||||
#endif
|
||||
@ -862,7 +864,7 @@ int __init omap1_clk_init(void)
|
||||
|
||||
#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
|
||||
/* Select slicer output as OMAP input clock */
|
||||
omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
|
||||
omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, OMAP7XX_PCC_UPLD_CTRL);
|
||||
#endif
|
||||
|
||||
/* Amstrad Delta wants BCLK high when inactive */
|
||||
@ -873,7 +875,7 @@ int __init omap1_clk_init(void)
|
||||
|
||||
/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
|
||||
/* (on 730, bit 13 must not be cleared) */
|
||||
if (cpu_is_omap730())
|
||||
if (cpu_is_omap7xx())
|
||||
omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
|
||||
else
|
||||
omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
|
||||
|
@ -574,6 +574,16 @@ static struct clk usb_dc_ck = {
|
||||
.enable_bit = 4,
|
||||
};
|
||||
|
||||
static struct clk usb_dc_ck7xx = {
|
||||
.name = "usb_dc_ck",
|
||||
.ops = &clkops_generic,
|
||||
/* Direct from ULPD, no parent */
|
||||
.rate = 48000000,
|
||||
.flags = RATE_FIXED,
|
||||
.enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
|
||||
.enable_bit = 8,
|
||||
};
|
||||
|
||||
static struct clk mclk_1510 = {
|
||||
.name = "mclk",
|
||||
.ops = &clkops_generic,
|
||||
@ -637,6 +647,18 @@ static struct clk mmc2_ck = {
|
||||
.enable_bit = 20,
|
||||
};
|
||||
|
||||
static struct clk mmc3_ck = {
|
||||
.name = "mmc_ck",
|
||||
.id = 2,
|
||||
.ops = &clkops_generic,
|
||||
/* Functional clock is direct from ULPD, interface clock is ARMPER */
|
||||
.parent = &armper_ck.clk,
|
||||
.rate = 48000000,
|
||||
.flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
|
||||
.enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
|
||||
.enable_bit = 12,
|
||||
};
|
||||
|
||||
static struct clk virtual_ck_mpu = {
|
||||
.name = "mpu",
|
||||
.ops = &clkops_null,
|
||||
|
@ -18,11 +18,11 @@
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/tc.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/mux.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mmc.h>
|
||||
#include <plat/mmc.h>
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
@ -108,15 +108,22 @@ static inline void omap1_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
|
||||
int controller_nr)
|
||||
{
|
||||
if (controller_nr == 0) {
|
||||
omap_cfg_reg(MMC_CMD);
|
||||
omap_cfg_reg(MMC_CLK);
|
||||
omap_cfg_reg(MMC_DAT0);
|
||||
if (cpu_is_omap7xx()) {
|
||||
omap_cfg_reg(MMC_7XX_CMD);
|
||||
omap_cfg_reg(MMC_7XX_CLK);
|
||||
omap_cfg_reg(MMC_7XX_DAT0);
|
||||
} else {
|
||||
omap_cfg_reg(MMC_CMD);
|
||||
omap_cfg_reg(MMC_CLK);
|
||||
omap_cfg_reg(MMC_DAT0);
|
||||
}
|
||||
|
||||
if (cpu_is_omap1710()) {
|
||||
omap_cfg_reg(M15_1710_MMC_CLKI);
|
||||
omap_cfg_reg(P19_1710_MMC_CMDDIR);
|
||||
omap_cfg_reg(P20_1710_MMC_DATDIR0);
|
||||
}
|
||||
if (mmc_controller->slots[0].wires == 4) {
|
||||
if (mmc_controller->slots[0].wires == 4 && !cpu_is_omap7xx()) {
|
||||
omap_cfg_reg(MMC_DAT1);
|
||||
/* NOTE: DAT2 can be on W10 (here) or M15 */
|
||||
if (!mmc_controller->slots[0].nomux)
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include <mach/fpga.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
static void fpga_mask_irq(unsigned int irq)
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <mach/cpu.h>
|
||||
#include <plat/cpu.h>
|
||||
|
||||
#define OMAP_DIE_ID_0 0xfffe1800
|
||||
#define OMAP_DIE_ID_1 0xfffe1804
|
||||
|
5
arch/arm/mach-omap1/include/mach/clkdev.h
Normal file
5
arch/arm/mach-omap1/include/mach/clkdev.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/clkdev.h
|
||||
*/
|
||||
|
||||
#include <plat/clkdev.h>
|
45
arch/arm/mach-omap1/include/mach/debug-macro.S
Normal file
45
arch/arm/mach-omap1/include/mach/debug-macro.S
Normal file
@ -0,0 +1,45 @@
|
||||
/* arch/arm/mach-omap1/include/mach/debug-macro.S
|
||||
*
|
||||
* Debugging macro include header
|
||||
*
|
||||
* Copyright (C) 1994-1999 Russell King
|
||||
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
.macro addruart,rx
|
||||
mrc p15, 0, \rx, c1, c0
|
||||
tst \rx, #1 @ MMU enabled?
|
||||
moveq \rx, #0xff000000 @ physical base address
|
||||
movne \rx, #0xfe000000 @ virtual base
|
||||
orr \rx, \rx, #0x00fb0000
|
||||
#ifdef CONFIG_OMAP_LL_DEBUG_UART3
|
||||
orr \rx, \rx, #0x00009000 @ UART 3
|
||||
#endif
|
||||
#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
|
||||
orr \rx, \rx, #0x00000800 @ UART 2 & 3
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
strb \rd, [\rx]
|
||||
.endm
|
||||
|
||||
.macro busyuart,rd,rx
|
||||
1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
|
||||
and \rd, \rd, #0x60
|
||||
teq \rd, #0x60
|
||||
beq 1002f
|
||||
ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
|
||||
and \rd, \rd, #0x60
|
||||
teq \rd, #0x60
|
||||
bne 1001b
|
||||
1002:
|
||||
.endm
|
||||
|
||||
.macro waituart,rd,rx
|
||||
.endm
|
58
arch/arm/mach-omap1/include/mach/entry-macro.S
Normal file
58
arch/arm/mach-omap1/include/mach/entry-macro.S
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/entry-macro.S
|
||||
*
|
||||
* Low-level IRQ helper macros for OMAP-based platforms
|
||||
*
|
||||
* Copyright (C) 2009 Texas Instruments
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/io.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <asm/hardware/gic.h>
|
||||
|
||||
#if (defined(CONFIG_ARCH_OMAP730)||defined(CONFIG_ARCH_OMAP850)) && \
|
||||
(defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX))
|
||||
#error "FIXME: OMAP7XX doesn't support multiple-OMAP"
|
||||
#elif defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
#define INT_IH2_IRQ INT_7XX_IH2_IRQ
|
||||
#elif defined(CONFIG_ARCH_OMAP15XX)
|
||||
#define INT_IH2_IRQ INT_1510_IH2_IRQ
|
||||
#elif defined(CONFIG_ARCH_OMAP16XX)
|
||||
#define INT_IH2_IRQ INT_1610_IH2_IRQ
|
||||
#else
|
||||
#warning "IH2 IRQ defaulted"
|
||||
#define INT_IH2_IRQ INT_1510_IH2_IRQ
|
||||
#endif
|
||||
|
||||
.macro disable_fiq
|
||||
.endm
|
||||
|
||||
.macro get_irqnr_preamble, base, tmp
|
||||
.endm
|
||||
|
||||
.macro arch_ret_to_user, tmp1, tmp2
|
||||
.endm
|
||||
|
||||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
||||
ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE)
|
||||
ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
|
||||
ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET]
|
||||
mov \irqstat, #0xffffffff
|
||||
bic \tmp, \irqstat, \tmp
|
||||
tst \irqnr, \tmp
|
||||
beq 1510f
|
||||
|
||||
ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
|
||||
cmp \irqnr, #0
|
||||
ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
|
||||
cmpeq \irqnr, #INT_IH2_IRQ
|
||||
ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE)
|
||||
ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
|
||||
addeqs \irqnr, \irqnr, #32
|
||||
1510:
|
||||
.endm
|
||||
|
5
arch/arm/mach-omap1/include/mach/gpio.h
Normal file
5
arch/arm/mach-omap1/include/mach/gpio.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/gpio.h
|
||||
*/
|
||||
|
||||
#include <plat/gpio.h>
|
5
arch/arm/mach-omap1/include/mach/hardware.h
Normal file
5
arch/arm/mach-omap1/include/mach/hardware.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/hardware.h
|
||||
*/
|
||||
|
||||
#include <plat/hardware.h>
|
5
arch/arm/mach-omap1/include/mach/io.h
Normal file
5
arch/arm/mach-omap1/include/mach/io.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/io.h
|
||||
*/
|
||||
|
||||
#include <plat/io.h>
|
5
arch/arm/mach-omap1/include/mach/irqs.h
Normal file
5
arch/arm/mach-omap1/include/mach/irqs.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/irqs.h
|
||||
*/
|
||||
|
||||
#include <plat/irqs.h>
|
5
arch/arm/mach-omap1/include/mach/memory.h
Normal file
5
arch/arm/mach-omap1/include/mach/memory.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/memory.h
|
||||
*/
|
||||
|
||||
#include <plat/memory.h>
|
5
arch/arm/mach-omap1/include/mach/smp.h
Normal file
5
arch/arm/mach-omap1/include/mach/smp.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/smp.h
|
||||
*/
|
||||
|
||||
#include <plat/smp.h>
|
5
arch/arm/mach-omap1/include/mach/system.h
Normal file
5
arch/arm/mach-omap1/include/mach/system.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/system.h
|
||||
*/
|
||||
|
||||
#include <plat/system.h>
|
5
arch/arm/mach-omap1/include/mach/timex.h
Normal file
5
arch/arm/mach-omap1/include/mach/timex.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/timex.h
|
||||
*/
|
||||
|
||||
#include <plat/timex.h>
|
5
arch/arm/mach-omap1/include/mach/uncompress.h
Normal file
5
arch/arm/mach-omap1/include/mach/uncompress.h
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/uncompress.h
|
||||
*/
|
||||
|
||||
#include <plat/uncompress.h>
|
20
arch/arm/mach-omap1/include/mach/vmalloc.h
Normal file
20
arch/arm/mach-omap1/include/mach/vmalloc.h
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* arch/arm/mach-omap1/include/mach/vmalloc.h
|
||||
*
|
||||
* Copyright (C) 2000 Russell King.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
|
@ -15,8 +15,8 @@
|
||||
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/tc.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/tc.h>
|
||||
|
||||
extern int omap1_clk_init(void);
|
||||
extern void omap_check_revision(void);
|
||||
@ -36,33 +36,17 @@ static struct map_desc omap_io_desc[] __initdata = {
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
static struct map_desc omap730_io_desc[] __initdata = {
|
||||
#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
|
||||
static struct map_desc omap7xx_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = OMAP730_DSP_BASE,
|
||||
.pfn = __phys_to_pfn(OMAP730_DSP_START),
|
||||
.length = OMAP730_DSP_SIZE,
|
||||
.virtual = OMAP7XX_DSP_BASE,
|
||||
.pfn = __phys_to_pfn(OMAP7XX_DSP_START),
|
||||
.length = OMAP7XX_DSP_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = OMAP730_DSPREG_BASE,
|
||||
.pfn = __phys_to_pfn(OMAP730_DSPREG_START),
|
||||
.length = OMAP730_DSPREG_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP850
|
||||
static struct map_desc omap850_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = OMAP850_DSP_BASE,
|
||||
.pfn = __phys_to_pfn(OMAP850_DSP_START),
|
||||
.length = OMAP850_DSP_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}, {
|
||||
.virtual = OMAP850_DSPREG_BASE,
|
||||
.pfn = __phys_to_pfn(OMAP850_DSPREG_START),
|
||||
.length = OMAP850_DSPREG_SIZE,
|
||||
.virtual = OMAP7XX_DSPREG_BASE,
|
||||
.pfn = __phys_to_pfn(OMAP7XX_DSPREG_START),
|
||||
.length = OMAP7XX_DSPREG_SIZE,
|
||||
.type = MT_DEVICE
|
||||
}
|
||||
};
|
||||
@ -120,18 +104,11 @@ void __init omap1_map_common_io(void)
|
||||
*/
|
||||
omap_check_revision();
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
if (cpu_is_omap730()) {
|
||||
iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc));
|
||||
#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
|
||||
if (cpu_is_omap7xx()) {
|
||||
iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP850
|
||||
if (cpu_is_omap850()) {
|
||||
iotable_init(omap850_io_desc, ARRAY_SIZE(omap850_io_desc));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap15xx()) {
|
||||
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/cpu.h>
|
||||
#include <plat/cpu.h>
|
||||
|
||||
#define IRQ_BANK(irq) ((irq) >> 5)
|
||||
#define IRQ_BIT(irq) ((irq) & 0x1f)
|
||||
@ -137,16 +137,8 @@ static void omap_irq_set_cfg(int irq, int fiq, int priority, int trigger)
|
||||
irq_bank_writel(val, bank, offset);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
static struct omap_irq_bank omap730_irq_banks[] = {
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 },
|
||||
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0x800040f3 },
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP850
|
||||
static struct omap_irq_bank omap850_irq_banks[] = {
|
||||
#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
|
||||
static struct omap_irq_bank omap7xx_irq_banks[] = {
|
||||
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f },
|
||||
{ .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 },
|
||||
{ .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0x800040f3 },
|
||||
@ -186,16 +178,10 @@ void __init omap_init_irq(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
if (cpu_is_omap730()) {
|
||||
irq_banks = omap730_irq_banks;
|
||||
irq_bank_count = ARRAY_SIZE(omap730_irq_banks);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_OMAP850
|
||||
if (cpu_is_omap850()) {
|
||||
irq_banks = omap850_irq_banks;
|
||||
irq_bank_count = ARRAY_SIZE(omap850_irq_banks);
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
if (cpu_is_omap7xx()) {
|
||||
irq_banks = omap7xx_irq_banks;
|
||||
irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
@ -247,10 +233,8 @@ void __init omap_init_irq(void)
|
||||
|
||||
/* Unmask level 2 handler */
|
||||
|
||||
if (cpu_is_omap730())
|
||||
omap_unmask_irq(INT_730_IH2_IRQ);
|
||||
else if (cpu_is_omap850())
|
||||
omap_unmask_irq(INT_850_IH2_IRQ);
|
||||
if (cpu_is_omap7xx())
|
||||
omap_unmask_irq(INT_7XX_IH2_IRQ);
|
||||
else if (cpu_is_omap15xx())
|
||||
omap_unmask_irq(INT_1510_IH2_IRQ);
|
||||
else if (cpu_is_omap16xx())
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <asm/system.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/fpga.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
#include "leds.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/mux.h>
|
||||
|
||||
#include "leds.h"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <mach/mailbox.h>
|
||||
#include <plat/mailbox.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#define MAILBOX_ARM2DSP1 0x00
|
||||
|
@ -18,11 +18,11 @@
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/cpu.h>
|
||||
#include <mach/mcbsp.h>
|
||||
#include <mach/dsp_common.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/dsp_common.h>
|
||||
|
||||
#define DPS_RSTCT2_PER_EN (1 << 0)
|
||||
#define DSP_RSTCT2_WD_PER_EN (1 << 1)
|
||||
@ -79,29 +79,29 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
|
||||
.free = omap1_mcbsp_free,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
static struct omap_mcbsp_platform_data omap730_mcbsp_pdata[] = {
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
|
||||
{
|
||||
.phys_base = OMAP730_MCBSP1_BASE,
|
||||
.phys_base = OMAP7XX_MCBSP1_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP1_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP1_TX,
|
||||
.rx_irq = INT_730_McBSP1RX,
|
||||
.tx_irq = INT_730_McBSP1TX,
|
||||
.rx_irq = INT_7XX_McBSP1RX,
|
||||
.tx_irq = INT_7XX_McBSP1TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
{
|
||||
.phys_base = OMAP730_MCBSP2_BASE,
|
||||
.phys_base = OMAP7XX_MCBSP2_BASE,
|
||||
.dma_rx_sync = OMAP_DMA_MCBSP3_RX,
|
||||
.dma_tx_sync = OMAP_DMA_MCBSP3_TX,
|
||||
.rx_irq = INT_730_McBSP2RX,
|
||||
.tx_irq = INT_730_McBSP2TX,
|
||||
.rx_irq = INT_7XX_McBSP2RX,
|
||||
.tx_irq = INT_7XX_McBSP2TX,
|
||||
.ops = &omap1_mcbsp_ops,
|
||||
},
|
||||
};
|
||||
#define OMAP730_MCBSP_PDATA_SZ ARRAY_SIZE(omap730_mcbsp_pdata)
|
||||
#define OMAP7XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap7xx_mcbsp_pdata)
|
||||
#else
|
||||
#define omap730_mcbsp_pdata NULL
|
||||
#define OMAP730_MCBSP_PDATA_SZ 0
|
||||
#define omap7xx_mcbsp_pdata NULL
|
||||
#define OMAP7XX_MCBSP_PDATA_SZ 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
@ -172,8 +172,8 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
|
||||
|
||||
int __init omap1_mcbsp_init(void)
|
||||
{
|
||||
if (cpu_is_omap730())
|
||||
omap_mcbsp_count = OMAP730_MCBSP_PDATA_SZ;
|
||||
if (cpu_is_omap7xx())
|
||||
omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
|
||||
if (cpu_is_omap15xx())
|
||||
omap_mcbsp_count = OMAP15XX_MCBSP_PDATA_SZ;
|
||||
if (cpu_is_omap16xx())
|
||||
@ -184,9 +184,9 @@ int __init omap1_mcbsp_init(void)
|
||||
if (!mcbsp_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
if (cpu_is_omap730())
|
||||
omap_mcbsp_register_board_cfg(omap730_mcbsp_pdata,
|
||||
OMAP730_MCBSP_PDATA_SZ);
|
||||
if (cpu_is_omap7xx())
|
||||
omap_mcbsp_register_board_cfg(omap7xx_mcbsp_pdata,
|
||||
OMAP7XX_MCBSP_PDATA_SZ);
|
||||
|
||||
if (cpu_is_omap15xx())
|
||||
omap_mcbsp_register_board_cfg(omap15xx_mcbsp_pdata,
|
||||
|
@ -29,53 +29,39 @@
|
||||
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <mach/mux.h>
|
||||
#include <plat/mux.h>
|
||||
|
||||
#ifdef CONFIG_OMAP_MUX
|
||||
|
||||
static struct omap_mux_cfg arch_mux_cfg;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP730
|
||||
static struct pin_config __initdata_or_module omap730_pins[] = {
|
||||
MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0)
|
||||
MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0)
|
||||
MUX_CFG_730("F3_730_KBR3", 13, 1, 0, 0, 1, 0)
|
||||
MUX_CFG_730("D2_730_KBR4", 13, 5, 0, 4, 1, 0)
|
||||
MUX_CFG_730("C2_730_KBC0", 13, 9, 0, 8, 1, 0)
|
||||
MUX_CFG_730("D3_730_KBC1", 13, 13, 0, 12, 1, 0)
|
||||
MUX_CFG_730("E4_730_KBC2", 13, 17, 0, 16, 1, 0)
|
||||
MUX_CFG_730("F4_730_KBC3", 13, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_730("E3_730_KBC4", 13, 25, 0, 24, 1, 0)
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
static struct pin_config __initdata_or_module omap7xx_pins[] = {
|
||||
MUX_CFG_7XX("E2_7XX_KBR0", 12, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_7XX("J7_7XX_KBR1", 12, 25, 0, 24, 1, 0)
|
||||
MUX_CFG_7XX("E1_7XX_KBR2", 12, 29, 0, 28, 1, 0)
|
||||
MUX_CFG_7XX("F3_7XX_KBR3", 13, 1, 0, 0, 1, 0)
|
||||
MUX_CFG_7XX("D2_7XX_KBR4", 13, 5, 0, 4, 1, 0)
|
||||
MUX_CFG_7XX("C2_7XX_KBC0", 13, 9, 0, 8, 1, 0)
|
||||
MUX_CFG_7XX("D3_7XX_KBC1", 13, 13, 0, 12, 1, 0)
|
||||
MUX_CFG_7XX("E4_7XX_KBC2", 13, 17, 0, 16, 1, 0)
|
||||
MUX_CFG_7XX("F4_7XX_KBC3", 13, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_7XX("E3_7XX_KBC4", 13, 25, 0, 24, 1, 0)
|
||||
|
||||
MUX_CFG_730("AA17_730_USB_DM", 2, 21, 0, 20, 0, 0)
|
||||
MUX_CFG_730("W16_730_USB_PU_EN", 2, 25, 0, 24, 0, 0)
|
||||
MUX_CFG_730("W17_730_USB_VBUSI", 2, 29, 0, 28, 0, 0)
|
||||
MUX_CFG_7XX("AA17_7XX_USB_DM", 2, 21, 0, 20, 0, 0)
|
||||
MUX_CFG_7XX("W16_7XX_USB_PU_EN", 2, 25, 0, 24, 0, 0)
|
||||
MUX_CFG_7XX("W17_7XX_USB_VBUSI", 2, 29, 0, 28, 0, 0)
|
||||
|
||||
/* MMC Pins */
|
||||
MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0)
|
||||
MUX_CFG_7XX("MMC_7XX_CLK", 2, 13, 0, 12, 1, 0)
|
||||
MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0)
|
||||
};
|
||||
#define OMAP730_PINS_SZ ARRAY_SIZE(omap730_pins)
|
||||
#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)
|
||||
#else
|
||||
#define omap730_pins NULL
|
||||
#define OMAP730_PINS_SZ 0
|
||||
#endif /* CONFIG_ARCH_OMAP730 */
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP850
|
||||
struct pin_config __initdata_or_module omap850_pins[] = {
|
||||
MUX_CFG_850("E2_850_KBR0", 12, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_850("J7_850_KBR1", 12, 25, 0, 24, 1, 0)
|
||||
MUX_CFG_850("E1_850_KBR2", 12, 29, 0, 28, 1, 0)
|
||||
MUX_CFG_850("F3_850_KBR3", 13, 1, 0, 0, 1, 0)
|
||||
MUX_CFG_850("D2_850_KBR4", 13, 5, 0, 4, 1, 0)
|
||||
MUX_CFG_850("C2_850_KBC0", 13, 9, 0, 8, 1, 0)
|
||||
MUX_CFG_850("D3_850_KBC1", 13, 13, 0, 12, 1, 0)
|
||||
MUX_CFG_850("E4_850_KBC2", 13, 17, 0, 16, 1, 0)
|
||||
MUX_CFG_850("F4_850_KBC3", 13, 21, 0, 20, 1, 0)
|
||||
MUX_CFG_850("E3_850_KBC4", 13, 25, 0, 24, 1, 0)
|
||||
|
||||
MUX_CFG_850("AA17_850_USB_DM", 2, 21, 0, 20, 0, 0)
|
||||
MUX_CFG_850("W16_850_USB_PU_EN", 2, 25, 0, 24, 0, 0)
|
||||
MUX_CFG_850("W17_850_USB_VBUSI", 2, 29, 0, 28, 0, 0)
|
||||
};
|
||||
#endif
|
||||
#define omap7xx_pins NULL
|
||||
#define OMAP7XX_PINS_SZ 0
|
||||
#endif /* CONFIG_ARCH_OMAP730 || CONFIG_ARCH_OMAP850 */
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
|
||||
static struct pin_config __initdata_or_module omap1xxx_pins[] = {
|
||||
@ -438,11 +424,6 @@ int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
|
||||
printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n",
|
||||
cfg->pull_name, cfg->pull_reg, pull_orig, pull);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP850
|
||||
omap_mux_register(omap850_pins, ARRAY_SIZE(omap850_pins));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OMAP_MUX_ERRORS
|
||||
@ -454,9 +435,9 @@ int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
|
||||
|
||||
int __init omap1_mux_init(void)
|
||||
{
|
||||
if (cpu_is_omap730()) {
|
||||
arch_mux_cfg.pins = omap730_pins;
|
||||
arch_mux_cfg.size = OMAP730_PINS_SZ;
|
||||
if (cpu_is_omap7xx()) {
|
||||
arch_mux_cfg.pins = omap7xx_pins;
|
||||
arch_mux_cfg.size = OMAP7XX_PINS_SZ;
|
||||
arch_mux_cfg.cfg_reg = omap1_cfg_reg;
|
||||
}
|
||||
|
||||
|
@ -48,21 +48,21 @@
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
#include <mach/cpu.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/sram.h>
|
||||
#include <mach/tc.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/dmtimer.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/sram.h>
|
||||
#include <plat/tc.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/dmtimer.h>
|
||||
|
||||
#include "pm.h"
|
||||
|
||||
static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
|
||||
static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE];
|
||||
static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui730_sleep_save[MPUI730_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE];
|
||||
static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
|
||||
|
||||
@ -183,9 +183,9 @@ static void omap_pm_wakeup_setup(void)
|
||||
* drivers must still separately call omap_set_gpio_wakeup() to
|
||||
* wake up to a GPIO interrupt.
|
||||
*/
|
||||
if (cpu_is_omap730())
|
||||
level1_wake = OMAP_IRQ_BIT(INT_730_GPIO_BANK1) |
|
||||
OMAP_IRQ_BIT(INT_730_IH2_IRQ);
|
||||
if (cpu_is_omap7xx())
|
||||
level1_wake = OMAP_IRQ_BIT(INT_7XX_GPIO_BANK1) |
|
||||
OMAP_IRQ_BIT(INT_7XX_IH2_IRQ);
|
||||
else if (cpu_is_omap15xx())
|
||||
level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) |
|
||||
OMAP_IRQ_BIT(INT_1510_IH2_IRQ);
|
||||
@ -195,10 +195,10 @@ static void omap_pm_wakeup_setup(void)
|
||||
|
||||
omap_writel(~level1_wake, OMAP_IH1_MIR);
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
if (cpu_is_omap7xx()) {
|
||||
omap_writel(~level2_wake, OMAP_IH2_0_MIR);
|
||||
omap_writel(~(OMAP_IRQ_BIT(INT_730_WAKE_UP_REQ) |
|
||||
OMAP_IRQ_BIT(INT_730_MPUIO_KEYPAD)),
|
||||
omap_writel(~(OMAP_IRQ_BIT(INT_7XX_WAKE_UP_REQ) |
|
||||
OMAP_IRQ_BIT(INT_7XX_MPUIO_KEYPAD)),
|
||||
OMAP_IH2_1_MIR);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD);
|
||||
@ -253,15 +253,15 @@ void omap1_pm_suspend(void)
|
||||
* Save interrupt, MPUI, ARM and UPLD control registers.
|
||||
*/
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
MPUI730_SAVE(OMAP_IH1_MIR);
|
||||
MPUI730_SAVE(OMAP_IH2_0_MIR);
|
||||
MPUI730_SAVE(OMAP_IH2_1_MIR);
|
||||
MPUI730_SAVE(MPUI_CTRL);
|
||||
MPUI730_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI730_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI730_SAVE(EMIFS_CONFIG);
|
||||
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
if (cpu_is_omap7xx()) {
|
||||
MPUI7XX_SAVE(OMAP_IH1_MIR);
|
||||
MPUI7XX_SAVE(OMAP_IH2_0_MIR);
|
||||
MPUI7XX_SAVE(OMAP_IH2_1_MIR);
|
||||
MPUI7XX_SAVE(MPUI_CTRL);
|
||||
MPUI7XX_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI7XX_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI7XX_SAVE(EMIFS_CONFIG);
|
||||
MPUI7XX_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
MPUI1510_SAVE(OMAP_IH1_MIR);
|
||||
@ -306,7 +306,7 @@ void omap1_pm_suspend(void)
|
||||
omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1);
|
||||
|
||||
/* shut down dsp_ck */
|
||||
if (!cpu_is_omap730())
|
||||
if (!cpu_is_omap7xx())
|
||||
omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL);
|
||||
|
||||
/* temporarily enabling api_ck to access DSP registers */
|
||||
@ -383,12 +383,12 @@ void omap1_pm_suspend(void)
|
||||
ULPD_RESTORE(ULPD_CLOCK_CTRL);
|
||||
ULPD_RESTORE(ULPD_STATUS_REQ);
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
MPUI730_RESTORE(EMIFS_CONFIG);
|
||||
MPUI730_RESTORE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI730_RESTORE(OMAP_IH1_MIR);
|
||||
MPUI730_RESTORE(OMAP_IH2_0_MIR);
|
||||
MPUI730_RESTORE(OMAP_IH2_1_MIR);
|
||||
if (cpu_is_omap7xx()) {
|
||||
MPUI7XX_RESTORE(EMIFS_CONFIG);
|
||||
MPUI7XX_RESTORE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI7XX_RESTORE(OMAP_IH1_MIR);
|
||||
MPUI7XX_RESTORE(OMAP_IH2_0_MIR);
|
||||
MPUI7XX_RESTORE(OMAP_IH2_1_MIR);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
MPUI1510_RESTORE(MPUI_CTRL);
|
||||
MPUI1510_RESTORE(MPUI_DSP_BOOT_CONFIG);
|
||||
@ -461,13 +461,13 @@ static int omap_pm_read_proc(
|
||||
ULPD_SAVE(ULPD_DPLL_CTRL);
|
||||
ULPD_SAVE(ULPD_POWER_CTRL);
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
MPUI730_SAVE(MPUI_CTRL);
|
||||
MPUI730_SAVE(MPUI_DSP_STATUS);
|
||||
MPUI730_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI730_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI730_SAVE(EMIFS_CONFIG);
|
||||
if (cpu_is_omap7xx()) {
|
||||
MPUI7XX_SAVE(MPUI_CTRL);
|
||||
MPUI7XX_SAVE(MPUI_DSP_STATUS);
|
||||
MPUI7XX_SAVE(MPUI_DSP_BOOT_CONFIG);
|
||||
MPUI7XX_SAVE(MPUI_DSP_API_CONFIG);
|
||||
MPUI7XX_SAVE(EMIFF_SDRAM_CONFIG);
|
||||
MPUI7XX_SAVE(EMIFS_CONFIG);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
MPUI1510_SAVE(MPUI_CTRL);
|
||||
MPUI1510_SAVE(MPUI_DSP_STATUS);
|
||||
@ -517,20 +517,20 @@ static int omap_pm_read_proc(
|
||||
ULPD_SHOW(ULPD_STATUS_REQ),
|
||||
ULPD_SHOW(ULPD_POWER_CTRL));
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
if (cpu_is_omap7xx()) {
|
||||
my_buffer_offset += sprintf(my_base + my_buffer_offset,
|
||||
"MPUI730_CTRL_REG 0x%-8x \n"
|
||||
"MPUI730_DSP_STATUS_REG: 0x%-8x \n"
|
||||
"MPUI730_DSP_BOOT_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI730_DSP_API_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI730_SDRAM_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI730_EMIFS_CONFIG_REG: 0x%-8x \n",
|
||||
MPUI730_SHOW(MPUI_CTRL),
|
||||
MPUI730_SHOW(MPUI_DSP_STATUS),
|
||||
MPUI730_SHOW(MPUI_DSP_BOOT_CONFIG),
|
||||
MPUI730_SHOW(MPUI_DSP_API_CONFIG),
|
||||
MPUI730_SHOW(EMIFF_SDRAM_CONFIG),
|
||||
MPUI730_SHOW(EMIFS_CONFIG));
|
||||
"MPUI7XX_CTRL_REG 0x%-8x \n"
|
||||
"MPUI7XX_DSP_STATUS_REG: 0x%-8x \n"
|
||||
"MPUI7XX_DSP_BOOT_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI7XX_DSP_API_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI7XX_SDRAM_CONFIG_REG: 0x%-8x \n"
|
||||
"MPUI7XX_EMIFS_CONFIG_REG: 0x%-8x \n",
|
||||
MPUI7XX_SHOW(MPUI_CTRL),
|
||||
MPUI7XX_SHOW(MPUI_DSP_STATUS),
|
||||
MPUI7XX_SHOW(MPUI_DSP_BOOT_CONFIG),
|
||||
MPUI7XX_SHOW(MPUI_DSP_API_CONFIG),
|
||||
MPUI7XX_SHOW(EMIFF_SDRAM_CONFIG),
|
||||
MPUI7XX_SHOW(EMIFS_CONFIG));
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
my_buffer_offset += sprintf(my_base + my_buffer_offset,
|
||||
"MPUI1510_CTRL_REG 0x%-8x \n"
|
||||
@ -668,9 +668,9 @@ static int __init omap_pm_init(void)
|
||||
* These routines need to be in SRAM as that's the only
|
||||
* memory the MPU can see when it wakes up.
|
||||
*/
|
||||
if (cpu_is_omap730()) {
|
||||
omap_sram_suspend = omap_sram_push(omap730_cpu_suspend,
|
||||
omap730_cpu_suspend_sz);
|
||||
if (cpu_is_omap7xx()) {
|
||||
omap_sram_suspend = omap_sram_push(omap7xx_cpu_suspend,
|
||||
omap7xx_cpu_suspend_sz);
|
||||
} else if (cpu_is_omap15xx()) {
|
||||
omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
|
||||
omap1510_cpu_suspend_sz);
|
||||
@ -686,8 +686,8 @@ static int __init omap_pm_init(void)
|
||||
|
||||
pm_idle = omap1_pm_idle;
|
||||
|
||||
if (cpu_is_omap730())
|
||||
setup_irq(INT_730_WAKE_UP_REQ, &omap_wakeup_irq);
|
||||
if (cpu_is_omap7xx())
|
||||
setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq);
|
||||
else if (cpu_is_omap16xx())
|
||||
setup_irq(INT_1610_WAKE_UP_REQ, &omap_wakeup_irq);
|
||||
|
||||
@ -700,8 +700,8 @@ static int __init omap_pm_init(void)
|
||||
omap_writew(ULPD_POWER_CTRL_REG_VAL, ULPD_POWER_CTRL);
|
||||
|
||||
/* Configure IDLECT3 */
|
||||
if (cpu_is_omap730())
|
||||
omap_writel(OMAP730_IDLECT3_VAL, OMAP730_IDLECT3);
|
||||
if (cpu_is_omap7xx())
|
||||
omap_writel(OMAP7XX_IDLECT3_VAL, OMAP7XX_IDLECT3);
|
||||
else if (cpu_is_omap16xx())
|
||||
omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3);
|
||||
|
||||
|
@ -98,13 +98,14 @@
|
||||
#define OMAP1610_IDLECT3 0xfffece24
|
||||
#define OMAP1610_IDLE_LOOP_REQUEST 0x0400
|
||||
|
||||
#define OMAP730_IDLECT1_SLEEP_VAL 0x16c7
|
||||
#define OMAP730_IDLECT2_SLEEP_VAL 0x09c7
|
||||
#define OMAP730_IDLECT3_VAL 0x3f
|
||||
#define OMAP730_IDLECT3 0xfffece24
|
||||
#define OMAP730_IDLE_LOOP_REQUEST 0x0C00
|
||||
#define OMAP7XX_IDLECT1_SLEEP_VAL 0x16c7
|
||||
#define OMAP7XX_IDLECT2_SLEEP_VAL 0x09c7
|
||||
#define OMAP7XX_IDLECT3_VAL 0x3f
|
||||
#define OMAP7XX_IDLECT3 0xfffece24
|
||||
#define OMAP7XX_IDLE_LOOP_REQUEST 0x0C00
|
||||
|
||||
#if !defined(CONFIG_ARCH_OMAP730) && \
|
||||
!defined(CONFIG_ARCH_OMAP850) && \
|
||||
!defined(CONFIG_ARCH_OMAP15XX) && \
|
||||
!defined(CONFIG_ARCH_OMAP16XX)
|
||||
#warning "Power management for this processor not implemented yet"
|
||||
@ -122,17 +123,17 @@ extern void allow_idle_sleep(void);
|
||||
extern void omap1_pm_idle(void);
|
||||
extern void omap1_pm_suspend(void);
|
||||
|
||||
extern void omap730_cpu_suspend(unsigned short, unsigned short);
|
||||
extern void omap7xx_cpu_suspend(unsigned short, unsigned short);
|
||||
extern void omap1510_cpu_suspend(unsigned short, unsigned short);
|
||||
extern void omap1610_cpu_suspend(unsigned short, unsigned short);
|
||||
extern void omap730_idle_loop_suspend(void);
|
||||
extern void omap7xx_idle_loop_suspend(void);
|
||||
extern void omap1510_idle_loop_suspend(void);
|
||||
extern void omap1610_idle_loop_suspend(void);
|
||||
|
||||
extern unsigned int omap730_cpu_suspend_sz;
|
||||
extern unsigned int omap7xx_cpu_suspend_sz;
|
||||
extern unsigned int omap1510_cpu_suspend_sz;
|
||||
extern unsigned int omap1610_cpu_suspend_sz;
|
||||
extern unsigned int omap730_idle_loop_suspend_sz;
|
||||
extern unsigned int omap7xx_idle_loop_suspend_sz;
|
||||
extern unsigned int omap1510_idle_loop_suspend_sz;
|
||||
extern unsigned int omap1610_idle_loop_suspend_sz;
|
||||
|
||||
@ -155,9 +156,9 @@ extern void omap_serial_wake_trigger(int enable);
|
||||
#define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x))
|
||||
#define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]
|
||||
|
||||
#define MPUI730_SAVE(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x] = omap_readl(x)
|
||||
#define MPUI730_RESTORE(x) omap_writel((mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]), (x))
|
||||
#define MPUI730_SHOW(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]
|
||||
#define MPUI7XX_SAVE(x) mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_##x] = omap_readl(x)
|
||||
#define MPUI7XX_RESTORE(x) omap_writel((mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_##x]), (x))
|
||||
#define MPUI7XX_SHOW(x) mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_##x]
|
||||
|
||||
#define MPUI1510_SAVE(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] = omap_readl(x)
|
||||
#define MPUI1510_RESTORE(x) omap_writel((mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]), (x))
|
||||
@ -232,24 +233,24 @@ enum mpui1510_save_state {
|
||||
#endif
|
||||
};
|
||||
|
||||
enum mpui730_save_state {
|
||||
MPUI730_SLEEP_SAVE_START = 0,
|
||||
enum mpui7xx_save_state {
|
||||
MPUI7XX_SLEEP_SAVE_START = 0,
|
||||
/*
|
||||
* MPUI registers 32 bits
|
||||
*/
|
||||
MPUI730_SLEEP_SAVE_MPUI_CTRL,
|
||||
MPUI730_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
|
||||
MPUI730_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
|
||||
MPUI730_SLEEP_SAVE_MPUI_DSP_STATUS,
|
||||
MPUI730_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
|
||||
MPUI730_SLEEP_SAVE_EMIFS_CONFIG,
|
||||
MPUI730_SLEEP_SAVE_OMAP_IH1_MIR,
|
||||
MPUI730_SLEEP_SAVE_OMAP_IH2_0_MIR,
|
||||
MPUI730_SLEEP_SAVE_OMAP_IH2_1_MIR,
|
||||
#if defined(CONFIG_ARCH_OMAP730)
|
||||
MPUI730_SLEEP_SAVE_SIZE
|
||||
MPUI7XX_SLEEP_SAVE_MPUI_CTRL,
|
||||
MPUI7XX_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
|
||||
MPUI7XX_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
|
||||
MPUI7XX_SLEEP_SAVE_MPUI_DSP_STATUS,
|
||||
MPUI7XX_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
|
||||
MPUI7XX_SLEEP_SAVE_EMIFS_CONFIG,
|
||||
MPUI7XX_SLEEP_SAVE_OMAP_IH1_MIR,
|
||||
MPUI7XX_SLEEP_SAVE_OMAP_IH2_0_MIR,
|
||||
MPUI7XX_SLEEP_SAVE_OMAP_IH2_1_MIR,
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
MPUI7XX_SLEEP_SAVE_SIZE
|
||||
#else
|
||||
MPUI730_SLEEP_SAVE_SIZE = 0
|
||||
MPUI7XX_SLEEP_SAVE_SIZE = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/mux.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/fpga.h>
|
||||
#include <plat/fpga.h>
|
||||
|
||||
static struct clk * uart1_ck;
|
||||
static struct clk * uart2_ck;
|
||||
@ -64,7 +64,6 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)
|
||||
|
||||
static struct plat_serial8250_port serial_platform_data[] = {
|
||||
{
|
||||
.membase = OMAP1_IO_ADDRESS(OMAP_UART1_BASE),
|
||||
.mapbase = OMAP_UART1_BASE,
|
||||
.irq = INT_UART1,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
@ -73,7 +72,6 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
||||
.uartclk = OMAP16XX_BASE_BAUD * 16,
|
||||
},
|
||||
{
|
||||
.membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE),
|
||||
.mapbase = OMAP_UART2_BASE,
|
||||
.irq = INT_UART2,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
@ -82,7 +80,6 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
||||
.uartclk = OMAP16XX_BASE_BAUD * 16,
|
||||
},
|
||||
{
|
||||
.membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE),
|
||||
.mapbase = OMAP_UART3_BASE,
|
||||
.irq = INT_UART3,
|
||||
.flags = UPF_BOOT_AUTOCONF,
|
||||
@ -110,18 +107,11 @@ void __init omap_serial_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (cpu_is_omap730()) {
|
||||
if (cpu_is_omap7xx()) {
|
||||
serial_platform_data[0].regshift = 0;
|
||||
serial_platform_data[1].regshift = 0;
|
||||
serial_platform_data[0].irq = INT_730_UART_MODEM_1;
|
||||
serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
|
||||
}
|
||||
|
||||
if (cpu_is_omap850()) {
|
||||
serial_platform_data[0].regshift = 0;
|
||||
serial_platform_data[1].regshift = 0;
|
||||
serial_platform_data[0].irq = INT_850_UART_MODEM_1;
|
||||
serial_platform_data[1].irq = INT_850_UART_MODEM_IRDA_2;
|
||||
serial_platform_data[0].irq = INT_7XX_UART_MODEM_1;
|
||||
serial_platform_data[1].irq = INT_7XX_UART_MODEM_IRDA_2;
|
||||
}
|
||||
|
||||
if (cpu_is_omap15xx()) {
|
||||
@ -130,7 +120,15 @@ void __init omap_serial_init(void)
|
||||
serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
|
||||
}
|
||||
|
||||
for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) {
|
||||
|
||||
/* Static mapping, never released */
|
||||
serial_platform_data[i].membase =
|
||||
ioremap(serial_platform_data[i].mapbase, SZ_2K);
|
||||
if (!serial_platform_data[i].membase) {
|
||||
printk(KERN_ERR "Could not ioremap uart%i\n", i);
|
||||
continue;
|
||||
}
|
||||
switch (i) {
|
||||
case 0:
|
||||
uart1_ck = clk_get(NULL, "uart1_ck");
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-omap1/sleep.S
|
||||
*
|
||||
* Low-level OMAP730/1510/1610 sleep/wakeUp support
|
||||
* Low-level OMAP7XX/1510/1610 sleep/wakeUp support
|
||||
*
|
||||
* Initial SA1110 code:
|
||||
* Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
|
||||
@ -57,8 +57,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP730)
|
||||
ENTRY(omap730_cpu_suspend)
|
||||
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
|
||||
ENTRY(omap7xx_cpu_suspend)
|
||||
|
||||
@ save registers on stack
|
||||
stmfd sp!, {r0 - r12, lr}
|
||||
@ -91,13 +91,13 @@ ENTRY(omap730_cpu_suspend)
|
||||
|
||||
@ turn off clock domains
|
||||
@ do not disable PERCK (0x04)
|
||||
mov r5, #OMAP730_IDLECT2_SLEEP_VAL & 0xff
|
||||
orr r5, r5, #OMAP730_IDLECT2_SLEEP_VAL & 0xff00
|
||||
mov r5, #OMAP7XX_IDLECT2_SLEEP_VAL & 0xff
|
||||
orr r5, r5, #OMAP7XX_IDLECT2_SLEEP_VAL & 0xff00
|
||||
strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
|
||||
|
||||
@ request ARM idle
|
||||
mov r3, #OMAP730_IDLECT1_SLEEP_VAL & 0xff
|
||||
orr r3, r3, #OMAP730_IDLECT1_SLEEP_VAL & 0xff00
|
||||
mov r3, #OMAP7XX_IDLECT1_SLEEP_VAL & 0xff
|
||||
orr r3, r3, #OMAP7XX_IDLECT1_SLEEP_VAL & 0xff00
|
||||
strh r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
|
||||
|
||||
@ disable instruction cache
|
||||
@ -113,7 +113,7 @@ ENTRY(omap730_cpu_suspend)
|
||||
mov r2, #0
|
||||
mcr p15, 0, r2, c7, c0, 4 @ wait for interrupt
|
||||
/*
|
||||
* omap730_cpu_suspend()'s resume point.
|
||||
* omap7xx_cpu_suspend()'s resume point.
|
||||
*
|
||||
* It will just start executing here, so we'll restore stuff from the
|
||||
* stack.
|
||||
@ -132,9 +132,9 @@ ENTRY(omap730_cpu_suspend)
|
||||
@ restore regs and return
|
||||
ldmfd sp!, {r0 - r12, pc}
|
||||
|
||||
ENTRY(omap730_cpu_suspend_sz)
|
||||
.word . - omap730_cpu_suspend
|
||||
#endif /* CONFIG_ARCH_OMAP730 */
|
||||
ENTRY(omap7xx_cpu_suspend_sz)
|
||||
.word . - omap7xx_cpu_suspend
|
||||
#endif /* CONFIG_ARCH_OMAP730 || CONFIG_ARCH_OMAP850 */
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
ENTRY(omap1510_cpu_suspend)
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <mach/dmtimer.h>
|
||||
#include <plat/dmtimer.h>
|
||||
|
||||
struct sys_timer omap_timer;
|
||||
|
||||
|
@ -65,6 +65,10 @@ config MACH_OMAP3EVM
|
||||
bool "OMAP 3530 EVM board"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_OMAP3517EVM
|
||||
bool "OMAP3517/ AM3517 EVM board"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_OMAP3_PANDORA
|
||||
bool "OMAP3 Pandora"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
@ -97,6 +101,22 @@ config MACH_OMAP_ZOOM2
|
||||
bool "OMAP3 Zoom2 board"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_OMAP_ZOOM3
|
||||
bool "OMAP3630 Zoom3 board"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_CM_T35
|
||||
bool "CompuLab CM-T35 module"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_IGEP0020
|
||||
bool "IGEP0020"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_OMAP_3630SDP
|
||||
bool "OMAP3630 SDP board"
|
||||
depends on ARCH_OMAP3 && ARCH_OMAP34XX
|
||||
|
||||
config MACH_OMAP_4430SDP
|
||||
bool "OMAP 4430 SDP board"
|
||||
depends on ARCH_OMAP4
|
||||
|
@ -31,7 +31,7 @@ obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
|
||||
ifeq ($(CONFIG_PM),y)
|
||||
obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
|
||||
obj-$(CONFIG_ARCH_OMAP24XX) += sleep24xx.o
|
||||
obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
|
||||
obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o
|
||||
obj-$(CONFIG_PM_DEBUG) += pm-debug.o
|
||||
endif
|
||||
|
||||
@ -47,6 +47,9 @@ obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
|
||||
# EMU peripherals
|
||||
obj-$(CONFIG_OMAP3_EMU) += emu.o
|
||||
|
||||
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
|
||||
mailbox_mach-objs := mailbox.o
|
||||
|
||||
iommu-y += iommu2.o
|
||||
iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o
|
||||
|
||||
@ -72,17 +75,33 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \
|
||||
mmc-twl4030.o
|
||||
obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
|
||||
obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
|
||||
board-rx51-sdram.o \
|
||||
board-rx51-peripherals.o \
|
||||
mmc-twl4030.o
|
||||
obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \
|
||||
board-zoom-peripherals.o \
|
||||
mmc-twl4030.o \
|
||||
board-zoom-debugboard.o
|
||||
obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \
|
||||
board-zoom-peripherals.o \
|
||||
mmc-twl4030.o \
|
||||
board-zoom-debugboard.o
|
||||
obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \
|
||||
board-zoom-peripherals.o \
|
||||
mmc-twl4030.o
|
||||
obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \
|
||||
mmc-twl4030.o
|
||||
obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
|
||||
mmc-twl4030.o
|
||||
|
||||
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
|
||||
|
||||
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
|
||||
|
||||
# Platform specific device init code
|
||||
obj-y += usb-musb.o
|
||||
obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
|
||||
obj-y += usb-ehci.o
|
||||
|
||||
onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o
|
||||
obj-y += $(onenand-m) $(onenand-y)
|
||||
|
@ -31,12 +31,12 @@
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/gpmc-smc91x.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/gpmc-smc91x.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
@ -221,7 +221,7 @@ static void __init omap_2430sdp_map_io(void)
|
||||
MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
|
||||
/* Maintainer: Syed Khasim - Texas Instruments Inc */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_2430sdp_map_io,
|
||||
.init_irq = omap_2430sdp_init_irq,
|
||||
|
@ -30,16 +30,16 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mcspi.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/gpmc.h>
|
||||
|
||||
#include <mach/control.h>
|
||||
#include <mach/gpmc-smc91x.h>
|
||||
#include <plat/control.h>
|
||||
#include <plat/gpmc-smc91x.h>
|
||||
|
||||
#include "sdram-qimonda-hyb18m512160af-6.h"
|
||||
#include "mmc-twl4030.h"
|
||||
@ -494,6 +494,18 @@ static void enable_board_wakeup_source(void)
|
||||
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
|
||||
}
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = 57,
|
||||
.reset_gpio_port[1] = 61,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init omap_3430sdp_init(void)
|
||||
{
|
||||
omap3430_i2c_init();
|
||||
@ -510,6 +522,7 @@ static void __init omap_3430sdp_init(void)
|
||||
usb_musb_init();
|
||||
board_smc91x_init();
|
||||
enable_board_wakeup_source();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
}
|
||||
|
||||
static void __init omap_3430sdp_map_io(void)
|
||||
@ -521,7 +534,7 @@ static void __init omap_3430sdp_map_io(void)
|
||||
MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
|
||||
/* Maintainer: Syed Khasim - Texas Instruments Inc */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_3430sdp_map_io,
|
||||
.init_irq = omap_3430sdp_init_irq,
|
||||
|
101
arch/arm/mach-omap2/board-3630sdp.c
Executable file
101
arch/arm/mach-omap2/board-3630sdp.c
Executable file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Texas Instruments Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <plat/common.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/gpmc-smc91x.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include <mach/board-zoom.h>
|
||||
|
||||
#include "sdram-hynix-h8mbx00u0mer-0em.h"
|
||||
|
||||
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
|
||||
|
||||
static struct omap_smc91x_platform_data board_smc91x_data = {
|
||||
.cs = 3,
|
||||
.flags = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
|
||||
};
|
||||
|
||||
static void __init board_smc91x_init(void)
|
||||
{
|
||||
board_smc91x_data.gpio_irq = 158;
|
||||
gpmc_smc91x_init(&board_smc91x_data);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void board_smc91x_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
|
||||
|
||||
static void enable_board_wakeup_source(void)
|
||||
{
|
||||
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
|
||||
}
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = 126,
|
||||
.reset_gpio_port[1] = 61,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init omap_sdp_map_io(void)
|
||||
{
|
||||
omap2_set_globals_343x();
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel sdp_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init omap_sdp_init_irq(void)
|
||||
{
|
||||
omap_board_config = sdp_config;
|
||||
omap_board_config_size = ARRAY_SIZE(sdp_config);
|
||||
omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
|
||||
h8mbx00u0mer0em_sdrc_params);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static void __init omap_sdp_init(void)
|
||||
{
|
||||
zoom_peripherals_init();
|
||||
board_smc91x_init();
|
||||
enable_board_wakeup_source();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_sdp_map_io,
|
||||
.init_irq = omap_sdp_init_irq,
|
||||
.init_machine = omap_sdp_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -23,10 +23,10 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/control.h>
|
||||
#include <mach/timer-gp.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/control.h>
|
||||
#include <plat/timer-gp.h>
|
||||
#include <asm/hardware/gic.h>
|
||||
|
||||
static struct platform_device sdp4430_lcd_device = {
|
||||
@ -52,8 +52,17 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = {
|
||||
|
||||
static void __init gic_init_irq(void)
|
||||
{
|
||||
gic_dist_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_DIST_BASE), 29);
|
||||
gic_cpu_init(0, OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE));
|
||||
void __iomem *base;
|
||||
|
||||
/* Static mapping, never released */
|
||||
base = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
|
||||
BUG_ON(!base);
|
||||
gic_dist_init(0, base, 29);
|
||||
|
||||
/* Static mapping, never released */
|
||||
gic_cpu_base_addr = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
|
||||
BUG_ON(!gic_cpu_base_addr);
|
||||
gic_cpu_init(0, gic_cpu_base_addr);
|
||||
}
|
||||
|
||||
static void __init omap_4430sdp_init_irq(void)
|
||||
@ -84,7 +93,7 @@ static void __init omap_4430sdp_map_io(void)
|
||||
MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
|
||||
/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_4430sdp_map_io,
|
||||
.init_irq = omap_4430sdp_init_irq,
|
||||
|
86
arch/arm/mach-omap2/board-am3517evm.c
Normal file
86
arch/arm/mach-omap2/board-am3517evm.c
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* linux/arch/arm/mach-omap2/board-am3517evm.c
|
||||
*
|
||||
* Copyright (C) 2009 Texas Instruments Incorporated
|
||||
* Author: Ranjith Lohithakshan <ranjithl@ti.com>
|
||||
*
|
||||
* Based on mach-omap2/board-omap3evm.c
|
||||
*
|
||||
* 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 version 2.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
|
||||
* whether express or implied; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
/*
|
||||
* Board initialization
|
||||
*/
|
||||
static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
|
||||
};
|
||||
|
||||
static struct platform_device *am3517_evm_devices[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init am3517_evm_init_irq(void)
|
||||
{
|
||||
omap_board_config = am3517_evm_config;
|
||||
omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
|
||||
|
||||
omap2_init_common_hw(NULL, NULL);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = 57,
|
||||
.reset_gpio_port[1] = -EINVAL,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init am3517_evm_init(void)
|
||||
{
|
||||
platform_add_devices(am3517_evm_devices,
|
||||
ARRAY_SIZE(am3517_evm_devices));
|
||||
|
||||
omap_serial_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
}
|
||||
|
||||
static void __init am3517_evm_map_io(void)
|
||||
{
|
||||
omap2_set_globals_343x();
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = am3517_evm_map_io,
|
||||
.init_irq = am3517_evm_init_irq,
|
||||
.init_machine = am3517_evm_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -33,13 +33,13 @@
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/led.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <mach/control.h>
|
||||
#include <plat/led.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/control.h>
|
||||
|
||||
/* LED & Switch macros */
|
||||
#define LED0_GPIO13 13
|
||||
@ -333,7 +333,7 @@ static void __init omap_apollon_map_io(void)
|
||||
MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
|
||||
/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_apollon_map_io,
|
||||
.init_irq = omap_apollon_init_irq,
|
||||
|
507
arch/arm/mach-omap2/board-cm-t35.c
Normal file
507
arch/arm/mach-omap2/board-cm-t35.c
Normal file
@ -0,0 +1,507 @@
|
||||
/*
|
||||
* board-cm-t35.c (CompuLab CM-T35 module)
|
||||
*
|
||||
* Copyright (C) 2009 CompuLab, Ltd.
|
||||
* Author: Mike Rapoport <mike@compulab.co.il>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <linux/i2c/at24.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
#define CM_T35_GPIO_PENDOWN 57
|
||||
|
||||
#define CM_T35_SMSC911X_CS 5
|
||||
#define CM_T35_SMSC911X_GPIO 163
|
||||
#define SB_T35_SMSC911X_CS 4
|
||||
#define SB_T35_SMSC911X_GPIO 65
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
#define GPMC_CS0_BASE 0x60
|
||||
#define GPMC_CS0_BASE_ADDR (OMAP34XX_GPMC_VIRT + GPMC_CS0_BASE)
|
||||
|
||||
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
|
||||
#include <linux/smsc911x.h>
|
||||
|
||||
static struct smsc911x_platform_config cm_t35_smsc911x_config = {
|
||||
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
|
||||
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
|
||||
.flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
|
||||
.phy_interface = PHY_INTERFACE_MODE_MII,
|
||||
};
|
||||
|
||||
static struct resource cm_t35_smsc911x_resources[] = {
|
||||
{
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = OMAP_GPIO_IRQ(CM_T35_SMSC911X_GPIO),
|
||||
.end = OMAP_GPIO_IRQ(CM_T35_SMSC911X_GPIO),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device cm_t35_smsc911x_device = {
|
||||
.name = "smsc911x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(cm_t35_smsc911x_resources),
|
||||
.resource = cm_t35_smsc911x_resources,
|
||||
.dev = {
|
||||
.platform_data = &cm_t35_smsc911x_config,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource sb_t35_smsc911x_resources[] = {
|
||||
{
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = OMAP_GPIO_IRQ(SB_T35_SMSC911X_GPIO),
|
||||
.end = OMAP_GPIO_IRQ(SB_T35_SMSC911X_GPIO),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device sb_t35_smsc911x_device = {
|
||||
.name = "smsc911x",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(sb_t35_smsc911x_resources),
|
||||
.resource = sb_t35_smsc911x_resources,
|
||||
.dev = {
|
||||
.platform_data = &cm_t35_smsc911x_config,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_smsc911x(struct platform_device *dev,
|
||||
int cs, int irq_gpio)
|
||||
{
|
||||
unsigned long cs_mem_base;
|
||||
|
||||
if (gpmc_cs_request(cs, SZ_16M, &cs_mem_base) < 0) {
|
||||
pr_err("CM-T35: Failed request for GPMC mem for smsc911x\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dev->resource[0].start = cs_mem_base + 0x0;
|
||||
dev->resource[0].end = cs_mem_base + 0xff;
|
||||
|
||||
if ((gpio_request(irq_gpio, "ETH IRQ") == 0) &&
|
||||
(gpio_direction_input(irq_gpio) == 0)) {
|
||||
gpio_export(irq_gpio, 0);
|
||||
} else {
|
||||
pr_err("CM-T35: could not obtain gpio for SMSC911X IRQ\n");
|
||||
return;
|
||||
}
|
||||
|
||||
platform_device_register(dev);
|
||||
}
|
||||
|
||||
static void __init cm_t35_init_ethernet(void)
|
||||
{
|
||||
cm_t35_init_smsc911x(&cm_t35_smsc911x_device,
|
||||
CM_T35_SMSC911X_CS, CM_T35_SMSC911X_GPIO);
|
||||
cm_t35_init_smsc911x(&sb_t35_smsc911x_device,
|
||||
SB_T35_SMSC911X_CS, SB_T35_SMSC911X_GPIO);
|
||||
}
|
||||
#else
|
||||
static inline void __init cm_t35_init_ethernet(void) { return; }
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
||||
#include <linux/leds.h>
|
||||
|
||||
static struct gpio_led cm_t35_leds[] = {
|
||||
[0] = {
|
||||
.gpio = 186,
|
||||
.name = "cm-t35:green",
|
||||
.default_trigger = "heartbeat",
|
||||
.active_low = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data cm_t35_led_pdata = {
|
||||
.num_leds = ARRAY_SIZE(cm_t35_leds),
|
||||
.leds = cm_t35_leds,
|
||||
};
|
||||
|
||||
static struct platform_device cm_t35_led_device = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &cm_t35_led_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_led(void)
|
||||
{
|
||||
platform_device_register(&cm_t35_led_device);
|
||||
}
|
||||
#else
|
||||
static inline void cm_t35_init_led(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
|
||||
static struct mtd_partition cm_t35_nand_partitions[] = {
|
||||
{
|
||||
.name = "xloader",
|
||||
.offset = 0, /* Offset = 0x00000 */
|
||||
.size = 4 * NAND_BLOCK_SIZE,
|
||||
.mask_flags = MTD_WRITEABLE
|
||||
},
|
||||
{
|
||||
.name = "uboot",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
|
||||
.size = 15 * NAND_BLOCK_SIZE,
|
||||
},
|
||||
{
|
||||
.name = "uboot environment",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
|
||||
.size = 2 * NAND_BLOCK_SIZE,
|
||||
},
|
||||
{
|
||||
.name = "linux",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
|
||||
.size = 32 * NAND_BLOCK_SIZE,
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_nand_platform_data cm_t35_nand_data = {
|
||||
.parts = cm_t35_nand_partitions,
|
||||
.nr_parts = ARRAY_SIZE(cm_t35_nand_partitions),
|
||||
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
|
||||
.cs = 0,
|
||||
.gpmc_cs_baseaddr = (void __iomem *)GPMC_CS0_BASE_ADDR,
|
||||
.gpmc_baseaddr = (void __iomem *)OMAP34XX_GPMC_VIRT,
|
||||
|
||||
};
|
||||
|
||||
static struct resource cm_t35_nand_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device cm_t35_nand_device = {
|
||||
.name = "omap2-nand",
|
||||
.id = -1,
|
||||
.num_resources = 1,
|
||||
.resource = &cm_t35_nand_resource,
|
||||
.dev = {
|
||||
.platform_data = &cm_t35_nand_data,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_nand(void)
|
||||
{
|
||||
if (platform_device_register(&cm_t35_nand_device) < 0)
|
||||
pr_err("CM-T35: Unable to register NAND device\n");
|
||||
}
|
||||
#else
|
||||
static inline void cm_t35_init_nand(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
||||
#include <plat/mcspi.h>
|
||||
|
||||
static struct omap2_mcspi_device_config ads7846_mcspi_config = {
|
||||
.turbo_mode = 0,
|
||||
.single_channel = 1, /* 0: slave, 1: master */
|
||||
};
|
||||
|
||||
static int ads7846_get_pendown_state(void)
|
||||
{
|
||||
return !gpio_get_value(CM_T35_GPIO_PENDOWN);
|
||||
}
|
||||
|
||||
static struct ads7846_platform_data ads7846_config = {
|
||||
.x_max = 0x0fff,
|
||||
.y_max = 0x0fff,
|
||||
.x_plate_ohms = 180,
|
||||
.pressure_max = 255,
|
||||
.debounce_max = 10,
|
||||
.debounce_tol = 3,
|
||||
.debounce_rep = 1,
|
||||
.get_pendown_state = ads7846_get_pendown_state,
|
||||
.keep_vref_on = 1,
|
||||
};
|
||||
|
||||
static struct spi_board_info cm_t35_spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
.bus_num = 1,
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 1500000,
|
||||
.controller_data = &ads7846_mcspi_config,
|
||||
.irq = OMAP_GPIO_IRQ(CM_T35_GPIO_PENDOWN),
|
||||
.platform_data = &ads7846_config,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_ads7846(void)
|
||||
{
|
||||
if ((gpio_request(CM_T35_GPIO_PENDOWN, "ADS7846_PENDOWN") == 0) &&
|
||||
(gpio_direction_input(CM_T35_GPIO_PENDOWN) == 0)) {
|
||||
gpio_export(CM_T35_GPIO_PENDOWN, 0);
|
||||
} else {
|
||||
pr_err("CM-T35: could not obtain gpio for ADS7846_PENDOWN\n");
|
||||
return;
|
||||
}
|
||||
|
||||
spi_register_board_info(cm_t35_spi_board_info,
|
||||
ARRAY_SIZE(cm_t35_spi_board_info));
|
||||
}
|
||||
#else
|
||||
static inline void cm_t35_init_ads7846(void) {}
|
||||
#endif
|
||||
|
||||
static struct regulator_consumer_supply cm_t35_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply cm_t35_vsim_supply = {
|
||||
.supply = "vmmc_aux",
|
||||
};
|
||||
|
||||
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
|
||||
static struct regulator_init_data cm_t35_vmmc1 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 3150000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &cm_t35_vmmc1_supply,
|
||||
};
|
||||
|
||||
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
|
||||
static struct regulator_init_data cm_t35_vsim = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 3000000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &cm_t35_vsim_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_usb_data cm_t35_usb_data = {
|
||||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static int cm_t35_keymap[] = {
|
||||
KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
|
||||
KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
|
||||
KEY(2, 0, KEY_RIGHT), KEY(2, 1, KEY_C), KEY(2, 2, KEY_D),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data cm_t35_keymap_data = {
|
||||
.keymap = cm_t35_keymap,
|
||||
.keymap_size = ARRAY_SIZE(cm_t35_keymap),
|
||||
};
|
||||
|
||||
static struct twl4030_keypad_data cm_t35_kp_data = {
|
||||
.keymap_data = &cm_t35_keymap_data,
|
||||
.rows = 3,
|
||||
.cols = 3,
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
static struct twl4030_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.wires = 4,
|
||||
.gpio_cd = -EINVAL,
|
||||
.gpio_wp = -EINVAL,
|
||||
|
||||
},
|
||||
{
|
||||
.mmc = 2,
|
||||
.wires = 4,
|
||||
.transceiver = 1,
|
||||
.gpio_cd = -EINVAL,
|
||||
.gpio_wp = -EINVAL,
|
||||
.ocr_mask = 0x00100000, /* 3.3V */
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata = {
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = -EINVAL,
|
||||
.reset_gpio_port[1] = -EINVAL,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
|
||||
unsigned ngpio)
|
||||
{
|
||||
int wlan_rst = gpio + 2;
|
||||
|
||||
if ((gpio_request(wlan_rst, "WLAN RST") == 0) &&
|
||||
(gpio_direction_output(wlan_rst, 1) == 0)) {
|
||||
gpio_export(wlan_rst, 0);
|
||||
|
||||
udelay(10);
|
||||
gpio_set_value(wlan_rst, 0);
|
||||
udelay(10);
|
||||
gpio_set_value(wlan_rst, 1);
|
||||
} else {
|
||||
pr_err("CM-T35: could not obtain gpio for WiFi reset\n");
|
||||
}
|
||||
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
twl4030_mmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters */
|
||||
cm_t35_vmmc1_supply.dev = mmc[0].dev;
|
||||
cm_t35_vsim_supply.dev = mmc[0].dev;
|
||||
|
||||
/* setup USB with proper PHY reset GPIOs */
|
||||
ehci_pdata.reset_gpio_port[0] = gpio + 6;
|
||||
ehci_pdata.reset_gpio_port[1] = gpio + 7;
|
||||
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
.setup = cm_t35_twl_gpio_setup,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data cm_t35_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
|
||||
/* platform_data for children goes here */
|
||||
.keypad = &cm_t35_kp_data,
|
||||
.usb = &cm_t35_usb_data,
|
||||
.gpio = &cm_t35_gpio_data,
|
||||
.vmmc1 = &cm_t35_vmmc1,
|
||||
.vsim = &cm_t35_vsim,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("tps65930", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
.irq = INT_34XX_SYS_NIRQ,
|
||||
.platform_data = &cm_t35_twldata,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_i2c(void)
|
||||
{
|
||||
omap_register_i2c_bus(1, 2600, cm_t35_i2c_boardinfo,
|
||||
ARRAY_SIZE(cm_t35_i2c_boardinfo));
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel cm_t35_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_irq(void)
|
||||
{
|
||||
omap_board_config = cm_t35_config;
|
||||
omap_board_config_size = ARRAY_SIZE(cm_t35_config);
|
||||
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
mt46h32m32lf6_sdrc_params);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static void __init cm_t35_map_io(void)
|
||||
{
|
||||
omap2_set_globals_343x();
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
static void __init cm_t35_init(void)
|
||||
{
|
||||
omap_serial_init();
|
||||
cm_t35_init_i2c();
|
||||
cm_t35_init_nand();
|
||||
cm_t35_init_ads7846();
|
||||
cm_t35_init_ethernet();
|
||||
cm_t35_init_led();
|
||||
|
||||
usb_musb_init();
|
||||
|
||||
omap_cfg_reg(AF26_34XX_SYS_NIRQ);
|
||||
}
|
||||
|
||||
MACHINE_START(CM_T35, "Compulab CM-T35")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = cm_t35_map_io,
|
||||
.init_irq = cm_t35_init_irq,
|
||||
.init_machine = cm_t35_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -26,10 +26,10 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
|
||||
static struct omap_board_config_kernel generic_config[] = {
|
||||
};
|
||||
@ -56,7 +56,7 @@ static void __init omap_generic_map_io(void)
|
||||
MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
|
||||
/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_generic_map_io,
|
||||
.init_irq = omap_generic_init_irq,
|
||||
|
@ -31,16 +31,16 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/control.h>
|
||||
#include <plat/control.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/keypad.h>
|
||||
#include <mach/menelaus.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/keypad.h>
|
||||
#include <plat/menelaus.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/gpmc.h>
|
||||
|
||||
#define H4_FLASH_CS 0
|
||||
#define H4_SMC91X_CS 1
|
||||
@ -376,7 +376,7 @@ static void __init omap_h4_map_io(void)
|
||||
MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
|
||||
/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_h4_map_io,
|
||||
.init_irq = omap_h4_init_irq,
|
||||
|
251
arch/arm/mach-omap2/board-igep0020.c
Normal file
251
arch/arm/mach-omap2/board-igep0020.c
Normal file
@ -0,0 +1,251 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Integration Software and Electronic Engineering.
|
||||
*
|
||||
* Modified from mach-omap2/board-generic.c
|
||||
*
|
||||
* 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/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
#define IGEP2_SMSC911X_CS 5
|
||||
#define IGEP2_SMSC911X_GPIO 176
|
||||
#define IGEP2_GPIO_USBH_NRESET 24
|
||||
#define IGEP2_GPIO_LED0_RED 26
|
||||
#define IGEP2_GPIO_LED0_GREEN 27
|
||||
#define IGEP2_GPIO_LED1_RED 28
|
||||
|
||||
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
|
||||
|
||||
#include <linux/smsc911x.h>
|
||||
|
||||
static struct smsc911x_platform_config igep2_smsc911x_config = {
|
||||
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
|
||||
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
|
||||
.flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS ,
|
||||
.phy_interface = PHY_INTERFACE_MODE_MII,
|
||||
};
|
||||
|
||||
static struct resource igep2_smsc911x_resources[] = {
|
||||
{
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO),
|
||||
.end = OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO),
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device igep2_smsc911x_device = {
|
||||
.name = "smsc911x",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(igep2_smsc911x_resources),
|
||||
.resource = igep2_smsc911x_resources,
|
||||
.dev = {
|
||||
.platform_data = &igep2_smsc911x_config,
|
||||
},
|
||||
};
|
||||
|
||||
static inline void __init igep2_init_smsc911x(void)
|
||||
{
|
||||
unsigned long cs_mem_base;
|
||||
|
||||
if (gpmc_cs_request(IGEP2_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) {
|
||||
pr_err("IGEP v2: Failed request for GPMC mem for smsc911x\n");
|
||||
gpmc_cs_free(IGEP2_SMSC911X_CS);
|
||||
return;
|
||||
}
|
||||
|
||||
igep2_smsc911x_resources[0].start = cs_mem_base + 0x0;
|
||||
igep2_smsc911x_resources[0].end = cs_mem_base + 0xff;
|
||||
|
||||
if ((gpio_request(IGEP2_SMSC911X_GPIO, "SMSC911X IRQ") == 0) &&
|
||||
(gpio_direction_input(IGEP2_SMSC911X_GPIO) == 0)) {
|
||||
gpio_export(IGEP2_SMSC911X_GPIO, 0);
|
||||
} else {
|
||||
pr_err("IGEP v2: Could not obtain gpio for for SMSC911X IRQ\n");
|
||||
return;
|
||||
}
|
||||
|
||||
platform_device_register(&igep2_smsc911x_device);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void __init igep2_init_smsc911x(void) { }
|
||||
#endif
|
||||
|
||||
static struct omap_board_config_kernel igep2_config[] __initdata = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply igep2_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
static struct regulator_init_data igep2_vmmc1 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 3150000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &igep2_vmmc1_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.wires = 4,
|
||||
.gpio_cd = -EINVAL,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{
|
||||
.mmc = 2,
|
||||
.wires = 4,
|
||||
.gpio_cd = -EINVAL,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static int igep2_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
twl4030_mmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters ... we "know" the
|
||||
* regulators will be set up only *after* we return.
|
||||
*/
|
||||
igep2_vmmc1_supply.dev = mmc[0].dev;
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
static struct twl4030_gpio_platform_data igep2_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
.use_leds = false,
|
||||
.setup = igep2_twl_gpio_setup,
|
||||
};
|
||||
|
||||
static struct twl4030_usb_data igep2_usb_data = {
|
||||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static void __init igep2_init_irq(void)
|
||||
{
|
||||
omap_board_config = igep2_config;
|
||||
omap_board_config_size = ARRAY_SIZE(igep2_config);
|
||||
omap2_init_common_hw(NULL, NULL);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static struct twl4030_platform_data igep2_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
|
||||
/* platform_data for children goes here */
|
||||
.usb = &igep2_usb_data,
|
||||
.gpio = &igep2_gpio_data,
|
||||
.vmmc1 = &igep2_vmmc1,
|
||||
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("twl4030", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
.irq = INT_34XX_SYS_NIRQ,
|
||||
.platform_data = &igep2_twldata,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init igep2_i2c_init(void)
|
||||
{
|
||||
omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo,
|
||||
ARRAY_SIZE(igep2_i2c_boardinfo));
|
||||
/* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz */
|
||||
omap_register_i2c_bus(3, 100, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __init igep2_init(void)
|
||||
{
|
||||
igep2_i2c_init();
|
||||
omap_serial_init();
|
||||
usb_musb_init();
|
||||
|
||||
igep2_init_smsc911x();
|
||||
|
||||
/* GPIO userspace leds */
|
||||
if ((gpio_request(IGEP2_GPIO_LED0_RED, "GPIO_LED0_RED") == 0) &&
|
||||
(gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) {
|
||||
gpio_export(IGEP2_GPIO_LED0_RED, 0);
|
||||
gpio_set_value(IGEP2_GPIO_LED0_RED, 0);
|
||||
} else
|
||||
pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n");
|
||||
|
||||
if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "GPIO_LED0_GREEN") == 0) &&
|
||||
(gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) {
|
||||
gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
|
||||
gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0);
|
||||
} else
|
||||
pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n");
|
||||
|
||||
if ((gpio_request(IGEP2_GPIO_LED1_RED, "GPIO_LED1_RED") == 0) &&
|
||||
(gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) {
|
||||
gpio_export(IGEP2_GPIO_LED1_RED, 0);
|
||||
gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
|
||||
} else
|
||||
pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n");
|
||||
}
|
||||
|
||||
static void __init igep2_map_io(void)
|
||||
{
|
||||
omap2_set_globals_343x();
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
MACHINE_START(IGEP0020, "IGEP v2 board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = igep2_map_io,
|
||||
.init_irq = igep2_init_irq,
|
||||
.init_machine = igep2_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -33,15 +33,15 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mcspi.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/gpmc.h>
|
||||
|
||||
#include <asm/delay.h>
|
||||
#include <mach/control.h>
|
||||
#include <mach/usb.h>
|
||||
#include <plat/control.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
@ -399,7 +399,7 @@ static void __init omap_ldp_map_io(void)
|
||||
|
||||
MACHINE_START(OMAP_LDP, "OMAP LDP board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_ldp_map_io,
|
||||
.init_irq = omap_ldp_init_irq,
|
||||
|
@ -23,12 +23,12 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/mcspi.h>
|
||||
#include <mach/onenand.h>
|
||||
#include <mach/serial.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/onenand.h>
|
||||
#include <plat/serial.h>
|
||||
|
||||
static struct omap2_mcspi_device_config p54spi_mcspi_config = {
|
||||
.turbo_mode = 0,
|
||||
@ -121,7 +121,7 @@ static void __init n8x0_init_machine(void)
|
||||
|
||||
MACHINE_START(NOKIA_N800, "Nokia N800")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = n8x0_map_io,
|
||||
.init_irq = n8x0_init_irq,
|
||||
@ -131,7 +131,7 @@ MACHINE_END
|
||||
|
||||
MACHINE_START(NOKIA_N810, "Nokia N810")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = n8x0_map_io,
|
||||
.init_irq = n8x0_init_irq,
|
||||
@ -141,7 +141,7 @@ MACHINE_END
|
||||
|
||||
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = n8x0_map_io,
|
||||
.init_irq = n8x0_init_irq,
|
||||
|
@ -37,13 +37,13 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <mach/nand.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/timer-gp.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/timer-gp.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
@ -410,6 +410,18 @@ static void __init omap3beagle_flash_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = -EINVAL,
|
||||
.reset_gpio_port[1] = 147,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init omap3_beagle_init(void)
|
||||
{
|
||||
omap3_beagle_i2c_init();
|
||||
@ -423,6 +435,7 @@ static void __init omap3_beagle_init(void)
|
||||
gpio_direction_output(170, true);
|
||||
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
omap3beagle_flash_init();
|
||||
|
||||
/* Ensure SDRC pins are mux'd for self-refresh */
|
||||
@ -439,7 +452,7 @@ static void __init omap3_beagle_map_io(void)
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_beagle_map_io,
|
||||
.init_irq = omap3_beagle_init_irq,
|
||||
|
@ -22,34 +22,74 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/smsc911x.h>
|
||||
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/mcspi.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/mcspi.h>
|
||||
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
#define OMAP3_EVM_TS_GPIO 175
|
||||
#define OMAP3_EVM_EHCI_VBUS 22
|
||||
#define OMAP3_EVM_EHCI_SELECT 61
|
||||
|
||||
#define OMAP3EVM_ETHR_START 0x2c000000
|
||||
#define OMAP3EVM_ETHR_SIZE 1024
|
||||
#define OMAP3EVM_ETHR_ID_REV 0x50
|
||||
#define OMAP3EVM_ETHR_GPIO_IRQ 176
|
||||
#define OMAP3EVM_SMC911X_CS 5
|
||||
#define OMAP3EVM_SMSC911X_CS 5
|
||||
|
||||
static struct resource omap3evm_smc911x_resources[] = {
|
||||
static u8 omap3_evm_version;
|
||||
|
||||
u8 get_omap3_evm_rev(void)
|
||||
{
|
||||
return omap3_evm_version;
|
||||
}
|
||||
EXPORT_SYMBOL(get_omap3_evm_rev);
|
||||
|
||||
static void __init omap3_evm_get_revision(void)
|
||||
{
|
||||
void __iomem *ioaddr;
|
||||
unsigned int smsc_id;
|
||||
|
||||
/* Ethernet PHY ID is stored at ID_REV register */
|
||||
ioaddr = ioremap_nocache(OMAP3EVM_ETHR_START, SZ_1K);
|
||||
if (!ioaddr)
|
||||
return;
|
||||
smsc_id = readl(ioaddr + OMAP3EVM_ETHR_ID_REV) & 0xFFFF0000;
|
||||
iounmap(ioaddr);
|
||||
|
||||
switch (smsc_id) {
|
||||
/*SMSC9115 chipset*/
|
||||
case 0x01150000:
|
||||
omap3_evm_version = OMAP3EVM_BOARD_GEN_1;
|
||||
break;
|
||||
/*SMSC 9220 chipset*/
|
||||
case 0x92200000:
|
||||
default:
|
||||
omap3_evm_version = OMAP3EVM_BOARD_GEN_2;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
|
||||
static struct resource omap3evm_smsc911x_resources[] = {
|
||||
[0] = {
|
||||
.start = OMAP3EVM_ETHR_START,
|
||||
.end = (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
|
||||
@ -58,24 +98,34 @@ static struct resource omap3evm_smc911x_resources[] = {
|
||||
[1] = {
|
||||
.start = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
|
||||
.end = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.flags = (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device omap3evm_smc911x_device = {
|
||||
.name = "smc911x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(omap3evm_smc911x_resources),
|
||||
.resource = &omap3evm_smc911x_resources[0],
|
||||
static struct smsc911x_platform_config smsc911x_config = {
|
||||
.phy_interface = PHY_INTERFACE_MODE_MII,
|
||||
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
|
||||
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
|
||||
.flags = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
|
||||
};
|
||||
|
||||
static inline void __init omap3evm_init_smc911x(void)
|
||||
static struct platform_device omap3evm_smsc911x_device = {
|
||||
.name = "smsc911x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(omap3evm_smsc911x_resources),
|
||||
.resource = &omap3evm_smsc911x_resources[0],
|
||||
.dev = {
|
||||
.platform_data = &smsc911x_config,
|
||||
},
|
||||
};
|
||||
|
||||
static inline void __init omap3evm_init_smsc911x(void)
|
||||
{
|
||||
int eth_cs;
|
||||
struct clk *l3ck;
|
||||
unsigned int rate;
|
||||
|
||||
eth_cs = OMAP3EVM_SMC911X_CS;
|
||||
eth_cs = OMAP3EVM_SMSC911X_CS;
|
||||
|
||||
l3ck = clk_get(NULL, "l3_ck");
|
||||
if (IS_ERR(l3ck))
|
||||
@ -83,15 +133,58 @@ static inline void __init omap3evm_init_smc911x(void)
|
||||
else
|
||||
rate = clk_get_rate(l3ck);
|
||||
|
||||
if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMC911x irq") < 0) {
|
||||
printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
|
||||
if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
|
||||
printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
|
||||
OMAP3EVM_ETHR_GPIO_IRQ);
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
|
||||
platform_device_register(&omap3evm_smsc911x_device);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void __init omap3evm_init_smsc911x(void) { return; }
|
||||
#endif
|
||||
|
||||
static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply omap3evm_vsim_supply = {
|
||||
.supply = "vmmc_aux",
|
||||
};
|
||||
|
||||
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
|
||||
static struct regulator_init_data omap3evm_vmmc1 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 3150000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &omap3evm_vmmc1_supply,
|
||||
};
|
||||
|
||||
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
|
||||
static struct regulator_init_data omap3evm_vsim = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 3000000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &omap3evm_vsim_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
@ -134,6 +227,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
twl4030_mmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters */
|
||||
omap3evm_vmmc1_supply.dev = mmc[0].dev;
|
||||
omap3evm_vsim_supply.dev = mmc[0].dev;
|
||||
|
||||
/*
|
||||
* Most GPIOs are for USB OTG. Some are mostly sent to
|
||||
* the P2 connector; notably LEDA for the LCD backlight.
|
||||
@ -226,6 +323,13 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
|
||||
|
||||
static int __init omap3_evm_i2c_init(void)
|
||||
{
|
||||
/*
|
||||
* REVISIT: These entries can be set in omap3evm_twl_data
|
||||
* after a merge with MFD tree
|
||||
*/
|
||||
omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
|
||||
omap3evm_twldata.vsim = &omap3evm_vsim;
|
||||
|
||||
omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
|
||||
ARRAY_SIZE(omap3evm_i2c_boardinfo));
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
@ -299,16 +403,29 @@ static void __init omap3_evm_init_irq(void)
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
omap3evm_init_smc911x();
|
||||
}
|
||||
|
||||
static struct platform_device *omap3_evm_devices[] __initdata = {
|
||||
&omap3_evm_lcd_device,
|
||||
&omap3evm_smc911x_device,
|
||||
};
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
/* PHY reset GPIO will be runtime programmed based on EVM version */
|
||||
.reset_gpio_port[0] = -EINVAL,
|
||||
.reset_gpio_port[1] = -EINVAL,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init omap3_evm_init(void)
|
||||
{
|
||||
omap3_evm_get_revision();
|
||||
|
||||
omap3_evm_i2c_init();
|
||||
|
||||
platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
|
||||
@ -321,8 +438,32 @@ static void __init omap3_evm_init(void)
|
||||
/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
|
||||
usb_nop_xceiv_register();
|
||||
#endif
|
||||
if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
|
||||
/* enable EHCI VBUS using GPIO22 */
|
||||
omap_cfg_reg(AF9_34XX_GPIO22);
|
||||
gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
|
||||
gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
|
||||
gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);
|
||||
|
||||
/* Select EHCI port on main board */
|
||||
omap_cfg_reg(U3_34XX_GPIO61);
|
||||
gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
|
||||
gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
|
||||
gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);
|
||||
|
||||
/* setup EHCI phy reset config */
|
||||
omap_cfg_reg(AH14_34XX_GPIO21);
|
||||
ehci_pdata.reset_gpio_port[1] = 21;
|
||||
|
||||
} else {
|
||||
/* setup EHCI phy reset on MDC */
|
||||
omap_cfg_reg(AF4_34XX_GPIO135_OUT);
|
||||
ehci_pdata.reset_gpio_port[1] = 135;
|
||||
}
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
ads7846_dev_init();
|
||||
omap3evm_init_smsc911x();
|
||||
}
|
||||
|
||||
static void __init omap3_evm_map_io(void)
|
||||
@ -334,7 +475,7 @@ static void __init omap3_evm_map_io(void)
|
||||
MACHINE_START(OMAP3EVM, "OMAP3 EVM")
|
||||
/* Maintainer: Syed Mohammed Khasim - Texas Instruments */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_evm_map_io,
|
||||
.init_irq = omap3_evm_init_irq,
|
||||
|
@ -34,13 +34,13 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/mcspi.h>
|
||||
#include <mach/usb.h>
|
||||
#include <mach/mux.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/usb.h>
|
||||
#include <plat/mux.h>
|
||||
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
#include "mmc-twl4030.h"
|
||||
@ -397,6 +397,18 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
|
||||
&pandora_keys_gpio,
|
||||
};
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = 16,
|
||||
.reset_gpio_port[1] = -EINVAL,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
static void __init omap3pandora_init(void)
|
||||
{
|
||||
omap3pandora_i2c_init();
|
||||
@ -406,6 +418,7 @@ static void __init omap3pandora_init(void)
|
||||
spi_register_board_info(omap3pandora_spi_board_info,
|
||||
ARRAY_SIZE(omap3pandora_spi_board_info));
|
||||
omap3pandora_ads7846_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
pandora_keys_gpio_init();
|
||||
usb_musb_init();
|
||||
|
||||
@ -422,7 +435,7 @@ static void __init omap3pandora_map_io(void)
|
||||
|
||||
MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3pandora_map_io,
|
||||
.init_irq = omap3pandora_init_irq,
|
||||
|
@ -38,14 +38,14 @@
|
||||
#include <asm/mach/flash.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/nand.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/usb.h>
|
||||
#include <plat/nand.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
#include "mmc-twl4030.h"
|
||||
@ -67,7 +67,7 @@
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
|
||||
#include <mach/mcspi.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
||||
@ -394,6 +394,18 @@ static struct platform_device *overo_devices[] __initdata = {
|
||||
&overo_lcd_device,
|
||||
};
|
||||
|
||||
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
|
||||
.port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
|
||||
.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
|
||||
|
||||
.phy_reset = true,
|
||||
.reset_gpio_port[0] = -EINVAL,
|
||||
.reset_gpio_port[1] = OVERO_GPIO_USBH_NRESET,
|
||||
.reset_gpio_port[2] = -EINVAL
|
||||
};
|
||||
|
||||
|
||||
static void __init overo_init(void)
|
||||
{
|
||||
overo_i2c_init();
|
||||
@ -401,6 +413,7 @@ static void __init overo_init(void)
|
||||
omap_serial_init();
|
||||
overo_flash_init();
|
||||
usb_musb_init();
|
||||
usb_ehci_init(&ehci_pdata);
|
||||
overo_ads7846_init();
|
||||
overo_init_smsc911x();
|
||||
|
||||
@ -443,14 +456,6 @@ static void __init overo_init(void)
|
||||
else
|
||||
printk(KERN_ERR "could not obtain gpio for "
|
||||
"OVERO_GPIO_USBH_CPEN\n");
|
||||
|
||||
if ((gpio_request(OVERO_GPIO_USBH_NRESET,
|
||||
"OVERO_GPIO_USBH_NRESET") == 0) &&
|
||||
(gpio_direction_output(OVERO_GPIO_USBH_NRESET, 1) == 0))
|
||||
gpio_export(OVERO_GPIO_USBH_NRESET, 0);
|
||||
else
|
||||
printk(KERN_ERR "could not obtain gpio for "
|
||||
"OVERO_GPIO_USBH_NRESET\n");
|
||||
}
|
||||
|
||||
static void __init overo_map_io(void)
|
||||
@ -461,7 +466,7 @@ static void __init overo_map_io(void)
|
||||
|
||||
MACHINE_START(OVERO, "Gumstix Overo")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = overo_map_io,
|
||||
.init_irq = overo_init_irq,
|
||||
|
@ -14,28 +14,137 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/wl12xx.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/mmc/host.h>
|
||||
|
||||
#include <mach/mcspi.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <mach/onenand.h>
|
||||
#include <mach/gpmc-smc91x.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/onenand.h>
|
||||
#include <plat/gpmc-smc91x.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
#define SYSTEM_REV_B_USES_VAUX3 0x1699
|
||||
#define SYSTEM_REV_S_USES_VAUX3 0x8
|
||||
|
||||
#define RX51_WL1251_POWER_GPIO 87
|
||||
#define RX51_WL1251_IRQ_GPIO 42
|
||||
|
||||
/* list all spi devices here */
|
||||
enum {
|
||||
RX51_SPI_WL1251,
|
||||
};
|
||||
|
||||
static struct wl12xx_platform_data wl1251_pdata;
|
||||
|
||||
static struct omap2_mcspi_device_config wl1251_mcspi_config = {
|
||||
.turbo_mode = 0,
|
||||
.single_channel = 1,
|
||||
};
|
||||
|
||||
static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
|
||||
[RX51_SPI_WL1251] = {
|
||||
.modalias = "wl1251",
|
||||
.bus_num = 4,
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 48000000,
|
||||
.mode = SPI_MODE_2,
|
||||
.controller_data = &wl1251_mcspi_config,
|
||||
.platform_data = &wl1251_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
|
||||
|
||||
#define RX51_GPIO_CAMERA_LENS_COVER 110
|
||||
#define RX51_GPIO_CAMERA_FOCUS 68
|
||||
#define RX51_GPIO_CAMERA_CAPTURE 69
|
||||
#define RX51_GPIO_KEYPAD_SLIDE 71
|
||||
#define RX51_GPIO_LOCK_BUTTON 113
|
||||
#define RX51_GPIO_PROXIMITY 89
|
||||
|
||||
#define RX51_GPIO_DEBOUNCE_TIMEOUT 10
|
||||
|
||||
static struct gpio_keys_button rx51_gpio_keys[] = {
|
||||
{
|
||||
.desc = "Camera Lens Cover",
|
||||
.type = EV_SW,
|
||||
.code = SW_CAMERA_LENS_COVER,
|
||||
.gpio = RX51_GPIO_CAMERA_LENS_COVER,
|
||||
.active_low = 1,
|
||||
.debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
||||
}, {
|
||||
.desc = "Camera Focus",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_CAMERA_FOCUS,
|
||||
.gpio = RX51_GPIO_CAMERA_FOCUS,
|
||||
.active_low = 1,
|
||||
.debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
||||
}, {
|
||||
.desc = "Camera Capture",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_CAMERA,
|
||||
.gpio = RX51_GPIO_CAMERA_CAPTURE,
|
||||
.active_low = 1,
|
||||
.debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
||||
}, {
|
||||
.desc = "Lock Button",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_SCREENLOCK,
|
||||
.gpio = RX51_GPIO_LOCK_BUTTON,
|
||||
.active_low = 1,
|
||||
.debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
||||
}, {
|
||||
.desc = "Keypad Slide",
|
||||
.type = EV_SW,
|
||||
.code = SW_KEYPAD_SLIDE,
|
||||
.gpio = RX51_GPIO_KEYPAD_SLIDE,
|
||||
.active_low = 1,
|
||||
.debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
||||
}, {
|
||||
.desc = "Proximity Sensor",
|
||||
.type = EV_SW,
|
||||
.code = SW_FRONT_PROXIMITY,
|
||||
.gpio = RX51_GPIO_PROXIMITY,
|
||||
.active_low = 0,
|
||||
.debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT,
|
||||
}
|
||||
};
|
||||
|
||||
static struct gpio_keys_platform_data rx51_gpio_keys_data = {
|
||||
.buttons = rx51_gpio_keys,
|
||||
.nbuttons = ARRAY_SIZE(rx51_gpio_keys),
|
||||
};
|
||||
|
||||
static struct platform_device rx51_gpio_keys_device = {
|
||||
.name = "gpio-keys",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &rx51_gpio_keys_data,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init rx51_add_gpio_keys(void)
|
||||
{
|
||||
platform_device_register(&rx51_gpio_keys_device);
|
||||
}
|
||||
#else
|
||||
static void __init rx51_add_gpio_keys(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */
|
||||
|
||||
static int board_keymap[] = {
|
||||
KEY(0, 0, KEY_Q),
|
||||
KEY(0, 1, KEY_O),
|
||||
@ -536,10 +645,64 @@ static inline void board_smc91x_init(void)
|
||||
|
||||
#endif
|
||||
|
||||
static void rx51_wl1251_set_power(bool enable)
|
||||
{
|
||||
gpio_set_value(RX51_WL1251_POWER_GPIO, enable);
|
||||
}
|
||||
|
||||
static void __init rx51_init_wl1251(void)
|
||||
{
|
||||
int irq, ret;
|
||||
|
||||
ret = gpio_request(RX51_WL1251_POWER_GPIO, "wl1251 power");
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
ret = gpio_direction_output(RX51_WL1251_POWER_GPIO, 0);
|
||||
if (ret < 0)
|
||||
goto err_power;
|
||||
|
||||
ret = gpio_request(RX51_WL1251_IRQ_GPIO, "wl1251 irq");
|
||||
if (ret < 0)
|
||||
goto err_power;
|
||||
|
||||
ret = gpio_direction_input(RX51_WL1251_IRQ_GPIO);
|
||||
if (ret < 0)
|
||||
goto err_irq;
|
||||
|
||||
irq = gpio_to_irq(RX51_WL1251_IRQ_GPIO);
|
||||
if (irq < 0)
|
||||
goto err_irq;
|
||||
|
||||
wl1251_pdata.set_power = rx51_wl1251_set_power;
|
||||
rx51_peripherals_spi_board_info[RX51_SPI_WL1251].irq = irq;
|
||||
|
||||
return;
|
||||
|
||||
err_irq:
|
||||
gpio_free(RX51_WL1251_IRQ_GPIO);
|
||||
|
||||
err_power:
|
||||
gpio_free(RX51_WL1251_POWER_GPIO);
|
||||
|
||||
error:
|
||||
printk(KERN_ERR "wl1251 board initialisation failed\n");
|
||||
wl1251_pdata.set_power = NULL;
|
||||
|
||||
/*
|
||||
* Now rx51_peripherals_spi_board_info[1].irq is zero and
|
||||
* set_power is null, and wl1251_probe() will fail.
|
||||
*/
|
||||
}
|
||||
|
||||
void __init rx51_peripherals_init(void)
|
||||
{
|
||||
rx51_i2c_init();
|
||||
board_onenand_init();
|
||||
board_smc91x_init();
|
||||
rx51_add_gpio_keys();
|
||||
rx51_init_wl1251();
|
||||
spi_register_board_info(rx51_peripherals_spi_board_info,
|
||||
ARRAY_SIZE(rx51_peripherals_spi_board_info));
|
||||
}
|
||||
|
||||
|
221
arch/arm/mach-omap2/board-rx51-sdram.c
Normal file
221
arch/arm/mach-omap2/board-rx51-sdram.c
Normal file
@ -0,0 +1,221 @@
|
||||
/*
|
||||
* SDRC register values for RX51
|
||||
*
|
||||
* Copyright (C) 2008 Nokia Corporation
|
||||
*
|
||||
* Lauri Leukkunen <lauri.leukkunen@nokia.com>
|
||||
*
|
||||
* Original code by Juha Yrjola <juha.yrjola@solidboot.com>
|
||||
*
|
||||
* 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/kernel.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <plat/io.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/sdrc.h>
|
||||
|
||||
|
||||
/* In picoseconds, except for tREF (ns), tXP, tCKE, tWTR (clks) */
|
||||
struct sdram_timings {
|
||||
u32 casl;
|
||||
u32 tDAL;
|
||||
u32 tDPL;
|
||||
u32 tRRD;
|
||||
u32 tRCD;
|
||||
u32 tRP;
|
||||
u32 tRAS;
|
||||
u32 tRC;
|
||||
u32 tRFC;
|
||||
u32 tXSR;
|
||||
|
||||
u32 tREF; /* in ns */
|
||||
|
||||
u32 tXP;
|
||||
u32 tCKE;
|
||||
u32 tWTR;
|
||||
};
|
||||
|
||||
struct omap_sdrc_params rx51_sdrc_params[4];
|
||||
|
||||
static const struct sdram_timings rx51_timings[] = {
|
||||
{
|
||||
.casl = 3,
|
||||
.tDAL = 33000,
|
||||
.tDPL = 15000,
|
||||
.tRRD = 12000,
|
||||
.tRCD = 22500,
|
||||
.tRP = 18000,
|
||||
.tRAS = 42000,
|
||||
.tRC = 66000,
|
||||
.tRFC = 138000,
|
||||
.tXSR = 200000,
|
||||
|
||||
.tREF = 7800,
|
||||
|
||||
.tXP = 2,
|
||||
.tCKE = 2,
|
||||
.tWTR = 2
|
||||
},
|
||||
};
|
||||
|
||||
static unsigned long sdrc_get_fclk_period(long rate)
|
||||
{
|
||||
/* In picoseconds */
|
||||
return 1000000000 / rate;
|
||||
}
|
||||
|
||||
static unsigned int sdrc_ps_to_ticks(unsigned int time_ps, long rate)
|
||||
{
|
||||
unsigned long tick_ps;
|
||||
|
||||
/* Calculate in picosecs to yield more exact results */
|
||||
tick_ps = sdrc_get_fclk_period(rate);
|
||||
|
||||
return (time_ps + tick_ps - 1) / tick_ps;
|
||||
}
|
||||
#undef DEBUG
|
||||
#ifdef DEBUG
|
||||
static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit,
|
||||
int ticks, long rate, const char *name)
|
||||
#else
|
||||
static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit,
|
||||
int ticks)
|
||||
#endif
|
||||
{
|
||||
int mask, nr_bits;
|
||||
|
||||
nr_bits = end_bit - st_bit + 1;
|
||||
if (ticks >= 1 << nr_bits)
|
||||
return -1;
|
||||
mask = (1 << nr_bits) - 1;
|
||||
*regval &= ~(mask << st_bit);
|
||||
*regval |= ticks << st_bit;
|
||||
#ifdef DEBUG
|
||||
printk(KERN_INFO "SDRC %s: %i ticks %i ns\n", name, ticks,
|
||||
(unsigned int)sdrc_get_fclk_period(rate) * ticks /
|
||||
1000);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#define SDRC_SET_ONE(reg, st, end, field, rate) \
|
||||
if (set_sdrc_timing_regval((reg), (st), (end), \
|
||||
rx51_timings->field, (rate), #field) < 0) \
|
||||
err = -1;
|
||||
#else
|
||||
#define SDRC_SET_ONE(reg, st, end, field, rate) \
|
||||
if (set_sdrc_timing_regval((reg), (st), (end), \
|
||||
rx51_timings->field) < 0) \
|
||||
err = -1;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
static int set_sdrc_timing_regval_ps(u32 *regval, int st_bit, int end_bit,
|
||||
int time, long rate, const char *name)
|
||||
#else
|
||||
static int set_sdrc_timing_regval_ps(u32 *regval, int st_bit, int end_bit,
|
||||
int time, long rate)
|
||||
#endif
|
||||
{
|
||||
int ticks, ret;
|
||||
ret = 0;
|
||||
|
||||
if (time == 0)
|
||||
ticks = 0;
|
||||
else
|
||||
ticks = sdrc_ps_to_ticks(time, rate);
|
||||
|
||||
#ifdef DEBUG
|
||||
ret = set_sdrc_timing_regval(regval, st_bit, end_bit, ticks,
|
||||
rate, name);
|
||||
#else
|
||||
ret = set_sdrc_timing_regval(regval, st_bit, end_bit, ticks);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#define SDRC_SET_ONE_PS(reg, st, end, field, rate) \
|
||||
if (set_sdrc_timing_regval_ps((reg), (st), (end), \
|
||||
rx51_timings->field, \
|
||||
(rate), #field) < 0) \
|
||||
err = -1;
|
||||
|
||||
#else
|
||||
#define SDRC_SET_ONE_PS(reg, st, end, field, rate) \
|
||||
if (set_sdrc_timing_regval_ps((reg), (st), (end), \
|
||||
rx51_timings->field, (rate)) < 0) \
|
||||
err = -1;
|
||||
#endif
|
||||
|
||||
static int sdrc_timings(int id, long rate)
|
||||
{
|
||||
u32 ticks_per_ms;
|
||||
u32 rfr, l;
|
||||
u32 actim_ctrla = 0, actim_ctrlb = 0;
|
||||
u32 rfr_ctrl;
|
||||
int err = 0;
|
||||
long l3_rate = rate / 1000;
|
||||
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 0, 4, tDAL, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 6, 8, tDPL, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 9, 11, tRRD, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 12, 14, tRCD, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 15, 17, tRP, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 18, 21, tRAS, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 22, 26, tRC, l3_rate);
|
||||
SDRC_SET_ONE_PS(&actim_ctrla, 27, 31, tRFC, l3_rate);
|
||||
|
||||
SDRC_SET_ONE_PS(&actim_ctrlb, 0, 7, tXSR, l3_rate);
|
||||
|
||||
SDRC_SET_ONE(&actim_ctrlb, 8, 10, tXP, l3_rate);
|
||||
SDRC_SET_ONE(&actim_ctrlb, 12, 14, tCKE, l3_rate);
|
||||
SDRC_SET_ONE(&actim_ctrlb, 16, 17, tWTR, l3_rate);
|
||||
|
||||
ticks_per_ms = l3_rate;
|
||||
rfr = rx51_timings[0].tREF * ticks_per_ms / 1000000;
|
||||
if (rfr > 65535 + 50)
|
||||
rfr = 65535;
|
||||
else
|
||||
rfr -= 50;
|
||||
|
||||
#ifdef DEBUG
|
||||
printk(KERN_INFO "SDRC tREF: %i ticks\n", rfr);
|
||||
#endif
|
||||
|
||||
l = rfr << 8;
|
||||
rfr_ctrl = l | 0x1; /* autorefresh, reload counter with 1xARCV */
|
||||
|
||||
rx51_sdrc_params[id].rate = rate;
|
||||
rx51_sdrc_params[id].actim_ctrla = actim_ctrla;
|
||||
rx51_sdrc_params[id].actim_ctrlb = actim_ctrlb;
|
||||
rx51_sdrc_params[id].rfr_ctrl = rfr_ctrl;
|
||||
rx51_sdrc_params[id].mr = 0x32;
|
||||
|
||||
rx51_sdrc_params[id + 1].rate = 0;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
struct omap_sdrc_params *rx51_get_sdram_timings(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sdrc_timings(0, 41500000);
|
||||
err |= sdrc_timings(1, 83000000);
|
||||
err |= sdrc_timings(2, 166000000);
|
||||
|
||||
return &rx51_sdrc_params[0];
|
||||
}
|
||||
|
@ -22,13 +22,15 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/mcspi.h>
|
||||
#include <mach/mux.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/gpmc.h>
|
||||
#include <mach/usb.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/gpmc.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
struct omap_sdrc_params *rx51_get_sdram_timings(void);
|
||||
|
||||
static struct omap_lcd_config rx51_lcd_config = {
|
||||
.ctrl_name = "internal",
|
||||
@ -55,9 +57,12 @@ static struct omap_board_config_kernel rx51_config[] = {
|
||||
|
||||
static void __init rx51_init_irq(void)
|
||||
{
|
||||
struct omap_sdrc_params *sdrc_params;
|
||||
|
||||
omap_board_config = rx51_config;
|
||||
omap_board_config_size = ARRAY_SIZE(rx51_config);
|
||||
omap2_init_common_hw(NULL, NULL);
|
||||
sdrc_params = rx51_get_sdram_timings();
|
||||
omap2_init_common_hw(sdrc_params, sdrc_params);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
@ -84,7 +89,7 @@ static void __init rx51_map_io(void)
|
||||
MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
|
||||
/* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = rx51_map_io,
|
||||
.init_irq = rx51_init_irq,
|
||||
|
@ -14,20 +14,20 @@
|
||||
#include <linux/smsc911x.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <mach/gpmc.h>
|
||||
#include <plat/gpmc.h>
|
||||
|
||||
#define ZOOM2_SMSC911X_CS 7
|
||||
#define ZOOM2_SMSC911X_GPIO 158
|
||||
#define ZOOM2_QUADUART_CS 3
|
||||
#define ZOOM2_QUADUART_GPIO 102
|
||||
#define ZOOM_SMSC911X_CS 7
|
||||
#define ZOOM_SMSC911X_GPIO 158
|
||||
#define ZOOM_QUADUART_CS 3
|
||||
#define ZOOM_QUADUART_GPIO 102
|
||||
#define QUART_CLK 1843200
|
||||
#define DEBUG_BASE 0x08000000
|
||||
#define ZOOM2_ETHR_START DEBUG_BASE
|
||||
#define ZOOM_ETHR_START DEBUG_BASE
|
||||
|
||||
static struct resource zoom2_smsc911x_resources[] = {
|
||||
static struct resource zoom_smsc911x_resources[] = {
|
||||
[0] = {
|
||||
.start = ZOOM2_ETHR_START,
|
||||
.end = ZOOM2_ETHR_START + SZ_4K,
|
||||
.start = ZOOM_ETHR_START,
|
||||
.end = ZOOM_ETHR_START + SZ_4K,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
@ -35,42 +35,42 @@ static struct resource zoom2_smsc911x_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct smsc911x_platform_config zoom2_smsc911x_config = {
|
||||
static struct smsc911x_platform_config zoom_smsc911x_config = {
|
||||
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
|
||||
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
|
||||
.flags = SMSC911X_USE_32BIT,
|
||||
.phy_interface = PHY_INTERFACE_MODE_MII,
|
||||
};
|
||||
|
||||
static struct platform_device zoom2_smsc911x_device = {
|
||||
static struct platform_device zoom_smsc911x_device = {
|
||||
.name = "smsc911x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(zoom2_smsc911x_resources),
|
||||
.resource = zoom2_smsc911x_resources,
|
||||
.num_resources = ARRAY_SIZE(zoom_smsc911x_resources),
|
||||
.resource = zoom_smsc911x_resources,
|
||||
.dev = {
|
||||
.platform_data = &zoom2_smsc911x_config,
|
||||
.platform_data = &zoom_smsc911x_config,
|
||||
},
|
||||
};
|
||||
|
||||
static inline void __init zoom2_init_smsc911x(void)
|
||||
static inline void __init zoom_init_smsc911x(void)
|
||||
{
|
||||
int eth_cs;
|
||||
unsigned long cs_mem_base;
|
||||
int eth_gpio = 0;
|
||||
|
||||
eth_cs = ZOOM2_SMSC911X_CS;
|
||||
eth_cs = ZOOM_SMSC911X_CS;
|
||||
|
||||
if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
|
||||
printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n");
|
||||
return;
|
||||
}
|
||||
|
||||
zoom2_smsc911x_resources[0].start = cs_mem_base + 0x0;
|
||||
zoom2_smsc911x_resources[0].end = cs_mem_base + 0xff;
|
||||
zoom_smsc911x_resources[0].start = cs_mem_base + 0x0;
|
||||
zoom_smsc911x_resources[0].end = cs_mem_base + 0xff;
|
||||
|
||||
eth_gpio = ZOOM2_SMSC911X_GPIO;
|
||||
eth_gpio = ZOOM_SMSC911X_GPIO;
|
||||
|
||||
zoom2_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
|
||||
zoom_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
|
||||
|
||||
if (gpio_request(eth_gpio, "smsc911x irq") < 0) {
|
||||
printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
|
||||
@ -94,7 +94,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device zoom2_debugboard_serial_device = {
|
||||
static struct platform_device zoom_debugboard_serial_device = {
|
||||
.name = "serial8250",
|
||||
.id = 3,
|
||||
.dev = {
|
||||
@ -102,13 +102,13 @@ static struct platform_device zoom2_debugboard_serial_device = {
|
||||
},
|
||||
};
|
||||
|
||||
static inline void __init zoom2_init_quaduart(void)
|
||||
static inline void __init zoom_init_quaduart(void)
|
||||
{
|
||||
int quart_cs;
|
||||
unsigned long cs_mem_base;
|
||||
int quart_gpio = 0;
|
||||
|
||||
quart_cs = ZOOM2_QUADUART_CS;
|
||||
quart_cs = ZOOM_QUADUART_CS;
|
||||
|
||||
if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) {
|
||||
printk(KERN_ERR "Failed to request GPMC mem"
|
||||
@ -116,7 +116,7 @@ static inline void __init zoom2_init_quaduart(void)
|
||||
return;
|
||||
}
|
||||
|
||||
quart_gpio = ZOOM2_QUADUART_GPIO;
|
||||
quart_gpio = ZOOM_QUADUART_GPIO;
|
||||
|
||||
if (gpio_request(quart_gpio, "TL16CP754C GPIO") < 0) {
|
||||
printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n",
|
||||
@ -126,15 +126,15 @@ static inline void __init zoom2_init_quaduart(void)
|
||||
gpio_direction_input(quart_gpio);
|
||||
}
|
||||
|
||||
static inline int omap_zoom2_debugboard_detect(void)
|
||||
static inline int omap_zoom_debugboard_detect(void)
|
||||
{
|
||||
int debug_board_detect = 0;
|
||||
int ret = 1;
|
||||
|
||||
debug_board_detect = ZOOM2_SMSC911X_GPIO;
|
||||
debug_board_detect = ZOOM_SMSC911X_GPIO;
|
||||
|
||||
if (gpio_request(debug_board_detect, "Zoom2 debug board detect") < 0) {
|
||||
printk(KERN_ERR "Failed to request GPIO%d for Zoom2 debug"
|
||||
if (gpio_request(debug_board_detect, "Zoom debug board detect") < 0) {
|
||||
printk(KERN_ERR "Failed to request GPIO%d for Zoom debug"
|
||||
"board detect\n", debug_board_detect);
|
||||
return 0;
|
||||
}
|
||||
@ -147,17 +147,17 @@ static inline int omap_zoom2_debugboard_detect(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct platform_device *zoom2_devices[] __initdata = {
|
||||
&zoom2_smsc911x_device,
|
||||
&zoom2_debugboard_serial_device,
|
||||
static struct platform_device *zoom_devices[] __initdata = {
|
||||
&zoom_smsc911x_device,
|
||||
&zoom_debugboard_serial_device,
|
||||
};
|
||||
|
||||
int __init omap_zoom2_debugboard_init(void)
|
||||
int __init zoom_debugboard_init(void)
|
||||
{
|
||||
if (!omap_zoom2_debugboard_detect())
|
||||
if (!omap_zoom_debugboard_detect())
|
||||
return 0;
|
||||
|
||||
zoom2_init_smsc911x();
|
||||
zoom2_init_quaduart();
|
||||
return platform_add_devices(zoom2_devices, ARRAY_SIZE(zoom2_devices));
|
||||
zoom_init_smsc911x();
|
||||
zoom_init_quaduart();
|
||||
return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
|
||||
}
|
||||
|
267
arch/arm/mach-omap2/board-zoom-peripherals.c
Executable file
267
arch/arm/mach-omap2/board-zoom-peripherals.c
Executable file
@ -0,0 +1,267 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Texas Instruments Inc.
|
||||
*
|
||||
* Modified from mach-omap2/board-zoom2.c
|
||||
*
|
||||
* 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/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <plat/common.h>
|
||||
#include <plat/usb.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
|
||||
/* Zoom2 has Qwerty keyboard*/
|
||||
static int board_keymap[] = {
|
||||
KEY(0, 0, KEY_E),
|
||||
KEY(0, 1, KEY_R),
|
||||
KEY(0, 2, KEY_T),
|
||||
KEY(0, 3, KEY_HOME),
|
||||
KEY(0, 6, KEY_I),
|
||||
KEY(0, 7, KEY_LEFTSHIFT),
|
||||
KEY(1, 0, KEY_D),
|
||||
KEY(1, 1, KEY_F),
|
||||
KEY(1, 2, KEY_G),
|
||||
KEY(1, 3, KEY_SEND),
|
||||
KEY(1, 6, KEY_K),
|
||||
KEY(1, 7, KEY_ENTER),
|
||||
KEY(2, 0, KEY_X),
|
||||
KEY(2, 1, KEY_C),
|
||||
KEY(2, 2, KEY_V),
|
||||
KEY(2, 3, KEY_END),
|
||||
KEY(2, 6, KEY_DOT),
|
||||
KEY(2, 7, KEY_CAPSLOCK),
|
||||
KEY(3, 0, KEY_Z),
|
||||
KEY(3, 1, KEY_KPPLUS),
|
||||
KEY(3, 2, KEY_B),
|
||||
KEY(3, 3, KEY_F1),
|
||||
KEY(3, 6, KEY_O),
|
||||
KEY(3, 7, KEY_SPACE),
|
||||
KEY(4, 0, KEY_W),
|
||||
KEY(4, 1, KEY_Y),
|
||||
KEY(4, 2, KEY_U),
|
||||
KEY(4, 3, KEY_F2),
|
||||
KEY(4, 4, KEY_VOLUMEUP),
|
||||
KEY(4, 6, KEY_L),
|
||||
KEY(4, 7, KEY_LEFT),
|
||||
KEY(5, 0, KEY_S),
|
||||
KEY(5, 1, KEY_H),
|
||||
KEY(5, 2, KEY_J),
|
||||
KEY(5, 3, KEY_F3),
|
||||
KEY(5, 5, KEY_VOLUMEDOWN),
|
||||
KEY(5, 6, KEY_M),
|
||||
KEY(5, 7, KEY_ENTER),
|
||||
KEY(6, 0, KEY_Q),
|
||||
KEY(6, 1, KEY_A),
|
||||
KEY(6, 2, KEY_N),
|
||||
KEY(6, 3, KEY_BACKSPACE),
|
||||
KEY(6, 6, KEY_P),
|
||||
KEY(6, 7, KEY_SELECT),
|
||||
KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */
|
||||
KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */
|
||||
KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */
|
||||
KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */
|
||||
KEY(7, 5, KEY_RIGHT),
|
||||
KEY(7, 6, KEY_UP),
|
||||
KEY(7, 7, KEY_DOWN)
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data board_map_data = {
|
||||
.keymap = board_keymap,
|
||||
.keymap_size = ARRAY_SIZE(board_keymap),
|
||||
};
|
||||
|
||||
static struct twl4030_keypad_data zoom_kp_twl4030_data = {
|
||||
.keymap_data = &board_map_data,
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom_vsim_supply = {
|
||||
.supply = "vmmc_aux",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom_vmmc2_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
static struct regulator_init_data zoom_vmmc1 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 3150000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom_vmmc1_supply,
|
||||
};
|
||||
|
||||
/* VMMC2 for MMC2 card */
|
||||
static struct regulator_init_data zoom_vmmc2 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 1850000,
|
||||
.apply_uV = true,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom_vmmc2_supply,
|
||||
};
|
||||
|
||||
/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
|
||||
static struct regulator_init_data zoom_vsim = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 3000000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom_vsim_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_hsmmc_info mmc[] __initdata = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.wires = 4,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{
|
||||
.mmc = 2,
|
||||
.wires = 4,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static int zoom_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ),
|
||||
* gpio + 1 is "mmc1_cd" (input/IRQ)
|
||||
*/
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
mmc[1].gpio_cd = gpio + 1;
|
||||
twl4030_mmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters ... we "know" the
|
||||
* regulators will be set up only *after* we return.
|
||||
*/
|
||||
zoom_vmmc1_supply.dev = mmc[0].dev;
|
||||
zoom_vsim_supply.dev = mmc[0].dev;
|
||||
zoom_vmmc2_supply.dev = mmc[1].dev;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int zoom_batt_table[] = {
|
||||
/* 0 C*/
|
||||
30800, 29500, 28300, 27100,
|
||||
26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
|
||||
17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
|
||||
11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
|
||||
8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
|
||||
5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
|
||||
4040, 3910, 3790, 3670, 3550
|
||||
};
|
||||
|
||||
static struct twl4030_bci_platform_data zoom_bci_data = {
|
||||
.battery_tmp_tbl = zoom_batt_table,
|
||||
.tblsize = ARRAY_SIZE(zoom_batt_table),
|
||||
};
|
||||
|
||||
static struct twl4030_usb_data zoom_usb_data = {
|
||||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static struct twl4030_gpio_platform_data zoom_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
.setup = zoom_twl_gpio_setup,
|
||||
};
|
||||
|
||||
static struct twl4030_madc_platform_data zoom_madc_data = {
|
||||
.irq_line = 1,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_audio_data zoom_audio_data = {
|
||||
.audio_mclk = 26000000,
|
||||
};
|
||||
|
||||
static struct twl4030_codec_data zoom_codec_data = {
|
||||
.audio_mclk = 26000000,
|
||||
.audio = &zoom_audio_data,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data zoom_twldata = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
|
||||
/* platform_data for children goes here */
|
||||
.bci = &zoom_bci_data,
|
||||
.madc = &zoom_madc_data,
|
||||
.usb = &zoom_usb_data,
|
||||
.gpio = &zoom_gpio_data,
|
||||
.keypad = &zoom_kp_twl4030_data,
|
||||
.codec = &zoom_codec_data,
|
||||
.vmmc2 = &zoom_vmmc2,
|
||||
.vsim = &zoom_vsim,
|
||||
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("twl5030", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
.irq = INT_34XX_SYS_NIRQ,
|
||||
.platform_data = &zoom_twldata,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init omap_i2c_init(void)
|
||||
{
|
||||
omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo,
|
||||
ARRAY_SIZE(zoom_i2c_boardinfo));
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init zoom_peripherals_init(void)
|
||||
{
|
||||
omap_i2c_init();
|
||||
omap_serial_init();
|
||||
usb_musb_init();
|
||||
}
|
@ -13,218 +13,28 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/usb.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/board.h>
|
||||
|
||||
#include <mach/board-zoom.h>
|
||||
|
||||
#include "mmc-twl4030.h"
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
|
||||
/* Zoom2 has Qwerty keyboard*/
|
||||
static int board_keymap[] = {
|
||||
KEY(0, 0, KEY_E),
|
||||
KEY(0, 1, KEY_R),
|
||||
KEY(0, 2, KEY_T),
|
||||
KEY(0, 3, KEY_HOME),
|
||||
KEY(0, 6, KEY_I),
|
||||
KEY(0, 7, KEY_LEFTSHIFT),
|
||||
KEY(1, 0, KEY_D),
|
||||
KEY(1, 1, KEY_F),
|
||||
KEY(1, 2, KEY_G),
|
||||
KEY(1, 3, KEY_SEND),
|
||||
KEY(1, 6, KEY_K),
|
||||
KEY(1, 7, KEY_ENTER),
|
||||
KEY(2, 0, KEY_X),
|
||||
KEY(2, 1, KEY_C),
|
||||
KEY(2, 2, KEY_V),
|
||||
KEY(2, 3, KEY_END),
|
||||
KEY(2, 6, KEY_DOT),
|
||||
KEY(2, 7, KEY_CAPSLOCK),
|
||||
KEY(3, 0, KEY_Z),
|
||||
KEY(3, 1, KEY_KPPLUS),
|
||||
KEY(3, 2, KEY_B),
|
||||
KEY(3, 3, KEY_F1),
|
||||
KEY(3, 6, KEY_O),
|
||||
KEY(3, 7, KEY_SPACE),
|
||||
KEY(4, 0, KEY_W),
|
||||
KEY(4, 1, KEY_Y),
|
||||
KEY(4, 2, KEY_U),
|
||||
KEY(4, 3, KEY_F2),
|
||||
KEY(4, 4, KEY_VOLUMEUP),
|
||||
KEY(4, 6, KEY_L),
|
||||
KEY(4, 7, KEY_LEFT),
|
||||
KEY(5, 0, KEY_S),
|
||||
KEY(5, 1, KEY_H),
|
||||
KEY(5, 2, KEY_J),
|
||||
KEY(5, 3, KEY_F3),
|
||||
KEY(5, 5, KEY_VOLUMEDOWN),
|
||||
KEY(5, 6, KEY_M),
|
||||
KEY(5, 7, KEY_ENTER),
|
||||
KEY(6, 0, KEY_Q),
|
||||
KEY(6, 1, KEY_A),
|
||||
KEY(6, 2, KEY_N),
|
||||
KEY(6, 3, KEY_BACKSPACE),
|
||||
KEY(6, 6, KEY_P),
|
||||
KEY(6, 7, KEY_SELECT),
|
||||
KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */
|
||||
KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */
|
||||
KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */
|
||||
KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */
|
||||
KEY(7, 5, KEY_RIGHT),
|
||||
KEY(7, 6, KEY_UP),
|
||||
KEY(7, 7, KEY_DOWN)
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data board_map_data = {
|
||||
.keymap = board_keymap,
|
||||
.keymap_size = ARRAY_SIZE(board_keymap),
|
||||
};
|
||||
|
||||
static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
|
||||
.keymap_data = &board_map_data,
|
||||
.rows = 8,
|
||||
.cols = 8,
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
static struct omap_board_config_kernel zoom2_config[] __initdata = {
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom2_vmmc1_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom2_vsim_supply = {
|
||||
.supply = "vmmc_aux",
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply zoom2_vmmc2_supply = {
|
||||
.supply = "vmmc",
|
||||
};
|
||||
|
||||
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
|
||||
static struct regulator_init_data zoom2_vmmc1 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 3150000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom2_vmmc1_supply,
|
||||
};
|
||||
|
||||
/* VMMC2 for MMC2 card */
|
||||
static struct regulator_init_data zoom2_vmmc2 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
.max_uV = 1850000,
|
||||
.apply_uV = true,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom2_vmmc2_supply,
|
||||
};
|
||||
|
||||
/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
|
||||
static struct regulator_init_data zoom2_vsim = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
.max_uV = 3000000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
| REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &zoom2_vsim_supply,
|
||||
};
|
||||
|
||||
static struct twl4030_hsmmc_info mmc[] __initdata = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.wires = 4,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{
|
||||
.mmc = 2,
|
||||
.wires = 4,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static int zoom2_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ),
|
||||
* gpio + 1 is "mmc1_cd" (input/IRQ)
|
||||
*/
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
mmc[1].gpio_cd = gpio + 1;
|
||||
twl4030_mmc_init(mmc);
|
||||
|
||||
/* link regulators to MMC adapters ... we "know" the
|
||||
* regulators will be set up only *after* we return.
|
||||
*/
|
||||
zoom2_vmmc1_supply.dev = mmc[0].dev;
|
||||
zoom2_vsim_supply.dev = mmc[0].dev;
|
||||
zoom2_vmmc2_supply.dev = mmc[1].dev;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int zoom2_batt_table[] = {
|
||||
/* 0 C*/
|
||||
30800, 29500, 28300, 27100,
|
||||
26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
|
||||
17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
|
||||
11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
|
||||
8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
|
||||
5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
|
||||
4040, 3910, 3790, 3670, 3550
|
||||
};
|
||||
|
||||
static struct twl4030_bci_platform_data zoom2_bci_data = {
|
||||
.battery_tmp_tbl = zoom2_batt_table,
|
||||
.tblsize = ARRAY_SIZE(zoom2_batt_table),
|
||||
};
|
||||
|
||||
static struct twl4030_usb_data zoom2_usb_data = {
|
||||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
|
||||
static void __init omap_zoom2_init_irq(void)
|
||||
{
|
||||
omap_board_config = zoom2_config;
|
||||
omap_board_config_size = ARRAY_SIZE(zoom2_config);
|
||||
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
|
||||
mt46h32m32lf6_sdrc_params);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static struct twl4030_gpio_platform_data zoom2_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
.setup = zoom2_twl_gpio_setup,
|
||||
};
|
||||
/* REVISIT: These audio entries can be removed once MFD code is merged */
|
||||
#if 0
|
||||
|
||||
static struct twl4030_madc_platform_data zoom2_madc_data = {
|
||||
.irq_line = 1,
|
||||
@ -256,32 +66,12 @@ static struct twl4030_platform_data zoom2_twldata = {
|
||||
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("twl4030", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
.irq = INT_34XX_SYS_NIRQ,
|
||||
.platform_data = &zoom2_twldata,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init omap_i2c_init(void)
|
||||
{
|
||||
omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo,
|
||||
ARRAY_SIZE(zoom2_i2c_boardinfo));
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern int __init omap_zoom2_debugboard_init(void);
|
||||
#endif
|
||||
|
||||
static void __init omap_zoom2_init(void)
|
||||
{
|
||||
omap_i2c_init();
|
||||
omap_serial_init();
|
||||
omap_zoom2_debugboard_init();
|
||||
usb_musb_init();
|
||||
zoom_peripherals_init();
|
||||
zoom_debugboard_init();
|
||||
}
|
||||
|
||||
static void __init omap_zoom2_map_io(void)
|
||||
@ -292,7 +82,7 @@ static void __init omap_zoom2_map_io(void)
|
||||
|
||||
MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_zoom2_map_io,
|
||||
.init_irq = omap_zoom2_init_irq,
|
||||
|
59
arch/arm/mach-omap2/board-zoom3.c
Normal file
59
arch/arm/mach-omap2/board-zoom3.c
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Texas Instruments Inc.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <mach/board-zoom.h>
|
||||
|
||||
#include <plat/common.h>
|
||||
#include <plat/board.h>
|
||||
|
||||
#include "sdram-hynix-h8mbx00u0mer-0em.h"
|
||||
|
||||
static void __init omap_zoom_map_io(void)
|
||||
{
|
||||
omap2_set_globals_343x();
|
||||
omap2_map_common_io();
|
||||
}
|
||||
|
||||
static struct omap_board_config_kernel zoom_config[] __initdata = {
|
||||
};
|
||||
|
||||
static void __init omap_zoom_init_irq(void)
|
||||
{
|
||||
omap_board_config = zoom_config;
|
||||
omap_board_config_size = ARRAY_SIZE(zoom_config);
|
||||
omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
|
||||
h8mbx00u0mer0em_sdrc_params);
|
||||
omap_init_irq();
|
||||
omap_gpio_init();
|
||||
}
|
||||
|
||||
static void __init omap_zoom_init(void)
|
||||
{
|
||||
zoom_peripherals_init();
|
||||
zoom_debugboard_init();
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
|
||||
.phys_io = 0x48000000,
|
||||
.io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap_zoom_map_io,
|
||||
.init_irq = omap_zoom_init_irq,
|
||||
.init_machine = omap_zoom_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
@ -24,13 +24,13 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <mach/clockdomain.h>
|
||||
#include <mach/cpu.h>
|
||||
#include <mach/prcm.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/clockdomain.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/prcm.h>
|
||||
#include <asm/div64.h>
|
||||
|
||||
#include <mach/sdrc.h>
|
||||
#include <plat/sdrc.h>
|
||||
#include "sdrc.h"
|
||||
#include "clock.h"
|
||||
#include "prm.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CLOCK_H
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <plat/clock.h>
|
||||
|
||||
/* The maximum error between a target DPLL rate and the rounded rate in Hz */
|
||||
#define DEFAULT_DPLL_RATE_TOLERANCE 50000
|
||||
|
@ -28,13 +28,13 @@
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <mach/sram.h>
|
||||
#include <mach/prcm.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/sram.h>
|
||||
#include <plat/prcm.h>
|
||||
#include <asm/div64.h>
|
||||
#include <asm/clkdev.h>
|
||||
|
||||
#include <mach/sdrc.h>
|
||||
#include <plat/sdrc.h>
|
||||
#include "clock.h"
|
||||
#include "prm.h"
|
||||
#include "prm-regbits-24xx.h"
|
||||
|
@ -27,13 +27,13 @@
|
||||
#include <linux/limits.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#include <mach/cpu.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/sram.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/sram.h>
|
||||
#include <asm/div64.h>
|
||||
#include <asm/clkdev.h>
|
||||
|
||||
#include <mach/sdrc.h>
|
||||
#include <plat/sdrc.h>
|
||||
#include "clock.h"
|
||||
#include "prm.h"
|
||||
#include "prm-regbits-34xx.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
|
||||
|
||||
#include <mach/control.h>
|
||||
#include <plat/control.h>
|
||||
|
||||
#include "clock.h"
|
||||
#include "cm.h"
|
||||
|
@ -28,14 +28,14 @@
|
||||
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <plat/clock.h>
|
||||
|
||||
#include "prm.h"
|
||||
#include "prm-regbits-24xx.h"
|
||||
#include "cm.h"
|
||||
|
||||
#include <mach/powerdomain.h>
|
||||
#include <mach/clockdomain.h>
|
||||
#include <plat/powerdomain.h>
|
||||
#include <plat/clockdomain.h>
|
||||
|
||||
/* clkdm_list contains all registered struct clockdomains */
|
||||
static LIST_HEAD(clkdm_list);
|
||||
|
@ -10,7 +10,7 @@
|
||||
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_H
|
||||
|
||||
#include <mach/clockdomain.h>
|
||||
#include <plat/clockdomain.h>
|
||||
|
||||
/*
|
||||
* OMAP2/3-common clockdomains
|
||||
|
@ -17,11 +17,11 @@
|
||||
#include "prcm-common.h"
|
||||
|
||||
#define OMAP2420_CM_REGADDR(module, reg) \
|
||||
OMAP2_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
|
||||
OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
|
||||
#define OMAP2430_CM_REGADDR(module, reg) \
|
||||
OMAP2_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
|
||||
OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
|
||||
#define OMAP34XX_CM_REGADDR(module, reg) \
|
||||
OMAP2_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
|
||||
OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
|
||||
|
||||
/*
|
||||
* Architecture-specific global CM registers
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user