Commit 5ccf1978 authored by Tony Lindgren's avatar Tony Lindgren

Merge branch 'for-next' into omap-for-linus

parents 24ed45aa 435bb827
...@@ -1787,6 +1787,11 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -1787,6 +1787,11 @@ and is between 256 and 4096 characters. It is defined in the file
waiting for the ACK, so if this is set too high waiting for the ACK, so if this is set too high
interrupts *may* be lost! interrupts *may* be lost!
omap_mux= [OMAP] Override bootloader pin multiplexing.
Format: <mux_mode0.mode_name=value>...
For example, to override I2C bus2:
omap_mux=i2c2_scl.i2c2_scl=0x100,i2c2_sda.i2c2_sda=0x100
opl3= [HW,OSS] opl3= [HW,OSS]
Format: <io> Format: <io>
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.32-rc6 # Linux kernel version: 2.6.32-rc8
# Sat Nov 14 10:56:01 2009 # Sat Dec 5 12:16:24 2009
# #
CONFIG_ARM=y CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y
...@@ -198,7 +198,9 @@ CONFIG_ARCH_OMAP1=y ...@@ -198,7 +198,9 @@ CONFIG_ARCH_OMAP1=y
# OMAP Feature Selections # OMAP Feature Selections
# #
# CONFIG_OMAP_RESET_CLOCKS is not set # CONFIG_OMAP_RESET_CLOCKS is not set
# CONFIG_OMAP_MUX is not set CONFIG_OMAP_MUX=y
# CONFIG_OMAP_MUX_DEBUG is not set
CONFIG_OMAP_MUX_WARNINGS=y
CONFIG_OMAP_MCBSP=y CONFIG_OMAP_MCBSP=y
# CONFIG_OMAP_MBOX_FWK is not set # CONFIG_OMAP_MBOX_FWK is not set
CONFIG_OMAP_MPU_TIMER=y CONFIG_OMAP_MPU_TIMER=y
...@@ -207,6 +209,7 @@ CONFIG_OMAP_LL_DEBUG_UART1=y ...@@ -207,6 +209,7 @@ CONFIG_OMAP_LL_DEBUG_UART1=y
# CONFIG_OMAP_LL_DEBUG_UART2 is not set # CONFIG_OMAP_LL_DEBUG_UART2 is not set
# CONFIG_OMAP_LL_DEBUG_UART3 is not set # CONFIG_OMAP_LL_DEBUG_UART3 is not set
# CONFIG_OMAP_LL_DEBUG_NONE is not set # CONFIG_OMAP_LL_DEBUG_NONE is not set
CONFIG_OMAP_SERIAL_WAKE=y
# CONFIG_OMAP_PM_NONE is not set # CONFIG_OMAP_PM_NONE is not set
CONFIG_OMAP_PM_NOOP=y CONFIG_OMAP_PM_NOOP=y
......
This diff is collapsed.
This diff is collapsed.
...@@ -610,7 +610,8 @@ CONFIG_INPUT_EVDEV=y ...@@ -610,7 +610,8 @@ CONFIG_INPUT_EVDEV=y
# #
# Input Device Drivers # Input Device Drivers
# #
# CONFIG_INPUT_KEYBOARD is not set CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_TWL4030=y
# CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TABLET is not set
......
...@@ -629,7 +629,8 @@ CONFIG_INPUT_EVDEV=y ...@@ -629,7 +629,8 @@ CONFIG_INPUT_EVDEV=y
# #
# Input Device Drivers # Input Device Drivers
# #
# CONFIG_INPUT_KEYBOARD is not set CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_TWL4030=y
# CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TABLET is not set
......
...@@ -18,6 +18,9 @@ obj-$(CONFIG_PM) += pm.o sleep.o ...@@ -18,6 +18,9 @@ obj-$(CONFIG_PM) += pm.o sleep.o
obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
mailbox_mach-objs := mailbox.o mailbox_mach-objs := mailbox.o
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
obj-y += $(i2c-omap-m) $(i2c-omap-y)
led-y := leds.o led-y := leds.o
# Specific board support # Specific board support
...@@ -49,3 +52,7 @@ led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o ...@@ -49,3 +52,7 @@ led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o
led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o
led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o
obj-$(CONFIG_LEDS) += $(led-y) obj-$(CONFIG_LEDS) += $(led-y)
ifneq ($(CONFIG_FB_OMAP),)
obj-y += lcd_dma.o
endif
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/smc91x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
#include <mach/gpio.h> #include <mach/gpio.h>
#include <plat/mux.h> #include <plat/mux.h>
#include <plat/fpga.h> #include <plat/fpga.h>
#include <plat/nand.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/board.h> #include <plat/board.h>
...@@ -100,6 +100,12 @@ static int fsample_keymap[] = { ...@@ -100,6 +100,12 @@ static int fsample_keymap[] = {
0 0
}; };
static struct smc91x_platdata smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource smc91x_resources[] = { static struct resource smc91x_resources[] = {
[0] = { [0] = {
.start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
...@@ -167,8 +173,40 @@ static struct platform_device nor_device = { ...@@ -167,8 +173,40 @@ static struct platform_device nor_device = {
.resource = &nor_resource, .resource = &nor_resource,
}; };
static struct omap_nand_platform_data nand_data = { static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
.options = NAND_SAMSUNG_LP_OPTIONS, {
struct nand_chip *this = mtd->priv;
unsigned long mask;
if (cmd == NAND_CMD_NONE)
return;
mask = (ctrl & NAND_CLE) ? 0x02 : 0;
if (ctrl & NAND_ALE)
mask |= 0x04;
writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
}
#define FSAMPLE_NAND_RB_GPIO_PIN 62
static int nand_dev_ready(struct mtd_info *mtd)
{
return gpio_get_value(FSAMPLE_NAND_RB_GPIO_PIN);
}
static const char *part_probes[] = { "cmdlinepart", NULL };
static struct platform_nand_data nand_data = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
.options = NAND_SAMSUNG_LP_OPTIONS,
.part_probe_types = part_probes,
},
.ctrl = {
.cmd_ctrl = nand_cmd_ctl,
.dev_ready = nand_dev_ready,
},
}; };
static struct resource nand_resource = { static struct resource nand_resource = {
...@@ -178,7 +216,7 @@ static struct resource nand_resource = { ...@@ -178,7 +216,7 @@ static struct resource nand_resource = {
}; };
static struct platform_device nand_device = { static struct platform_device nand_device = {
.name = "omapnand", .name = "gen_nand",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &nand_data, .platform_data = &nand_data,
...@@ -190,6 +228,9 @@ static struct platform_device nand_device = { ...@@ -190,6 +228,9 @@ static struct platform_device nand_device = {
static struct platform_device smc91x_device = { static struct platform_device smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &smc91x_info,
},
.num_resources = ARRAY_SIZE(smc91x_resources), .num_resources = ARRAY_SIZE(smc91x_resources),
.resource = smc91x_resources, .resource = smc91x_resources,
}; };
...@@ -233,13 +274,6 @@ static struct platform_device *devices[] __initdata = { ...@@ -233,13 +274,6 @@ static struct platform_device *devices[] __initdata = {
&lcd_device, &lcd_device,
}; };
#define P2_NAND_RB_GPIO_PIN 62
static int nand_dev_ready(struct omap_nand_platform_data *data)
{
return gpio_get_value(P2_NAND_RB_GPIO_PIN);
}
static struct omap_lcd_config fsample_lcd_config __initdata = { static struct omap_lcd_config fsample_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
...@@ -250,9 +284,9 @@ static struct omap_board_config_kernel fsample_config[] = { ...@@ -250,9 +284,9 @@ static struct omap_board_config_kernel fsample_config[] = {
static void __init omap_fsample_init(void) static void __init omap_fsample_init(void)
{ {
if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
BUG(); BUG();
nand_data.dev_ready = nand_dev_ready; gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE); omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/i2c/tps65010.h> #include <linux/i2c/tps65010.h>
#include <linux/smc91x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/gpio.h> #include <asm/gpio.h>
...@@ -40,7 +41,6 @@ ...@@ -40,7 +41,6 @@
#include <plat/mux.h> #include <plat/mux.h>
#include <plat/dma.h> #include <plat/dma.h>
#include <plat/tc.h> #include <plat/tc.h>
#include <plat/nand.h>
#include <plat/irda.h> #include <plat/irda.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/keypad.h> #include <plat/keypad.h>
...@@ -179,11 +179,43 @@ static struct mtd_partition h2_nand_partitions[] = { ...@@ -179,11 +179,43 @@ static struct mtd_partition h2_nand_partitions[] = {
}, },
}; };
/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
static struct omap_nand_platform_data h2_nand_data = { {
.options = NAND_SAMSUNG_LP_OPTIONS, struct nand_chip *this = mtd->priv;
.parts = h2_nand_partitions, unsigned long mask;
.nr_parts = ARRAY_SIZE(h2_nand_partitions),
if (cmd == NAND_CMD_NONE)
return;
mask = (ctrl & NAND_CLE) ? 0x02 : 0;
if (ctrl & NAND_ALE)
mask |= 0x04;
writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
}
#define H2_NAND_RB_GPIO_PIN 62
static int h2_nand_dev_ready(struct mtd_info *mtd)
{
return gpio_get_value(H2_NAND_RB_GPIO_PIN);
}
static const char *h2_part_probes[] = { "cmdlinepart", NULL };
struct platform_nand_data h2_nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
.nr_partitions = ARRAY_SIZE(h2_nand_partitions),
.partitions = h2_nand_partitions,
.options = NAND_SAMSUNG_LP_OPTIONS,
.part_probe_types = h2_part_probes,
},
.ctrl = {
.cmd_ctrl = h2_nand_cmd_ctl,
.dev_ready = h2_nand_dev_ready,
},
}; };
static struct resource h2_nand_resource = { static struct resource h2_nand_resource = {
...@@ -191,15 +223,21 @@ static struct resource h2_nand_resource = { ...@@ -191,15 +223,21 @@ static struct resource h2_nand_resource = {
}; };
static struct platform_device h2_nand_device = { static struct platform_device h2_nand_device = {
.name = "omapnand", .name = "gen_nand",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &h2_nand_data, .platform_data = &h2_nand_platdata,
}, },
.num_resources = 1, .num_resources = 1,
.resource = &h2_nand_resource, .resource = &h2_nand_resource,
}; };
static struct smc91x_platdata h2_smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource h2_smc91x_resources[] = { static struct resource h2_smc91x_resources[] = {
[0] = { [0] = {
.start = OMAP1610_ETHR_START, /* Physical */ .start = OMAP1610_ETHR_START, /* Physical */
...@@ -216,6 +254,9 @@ static struct resource h2_smc91x_resources[] = { ...@@ -216,6 +254,9 @@ static struct resource h2_smc91x_resources[] = {
static struct platform_device h2_smc91x_device = { static struct platform_device h2_smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &h2_smc91x_info,
},
.num_resources = ARRAY_SIZE(h2_smc91x_resources), .num_resources = ARRAY_SIZE(h2_smc91x_resources),
.resource = h2_smc91x_resources, .resource = h2_smc91x_resources,
}; };
...@@ -368,8 +409,6 @@ static struct omap_board_config_kernel h2_config[] __initdata = { ...@@ -368,8 +409,6 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
{ OMAP_TAG_LCD, &h2_lcd_config }, { OMAP_TAG_LCD, &h2_lcd_config },
}; };
#define H2_NAND_RB_GPIO_PIN 62
static void __init h2_init(void) static void __init h2_init(void)
{ {
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/i2c/tps65010.h> #include <linux/i2c/tps65010.h>
#include <linux/smc91x.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -42,7 +43,6 @@ ...@@ -42,7 +43,6 @@
#include <mach/irqs.h> #include <mach/irqs.h>
#include <plat/mux.h> #include <plat/mux.h>
#include <plat/tc.h> #include <plat/tc.h>
#include <plat/nand.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/dma.h> #include <plat/dma.h>
...@@ -181,11 +181,43 @@ static struct mtd_partition nand_partitions[] = { ...@@ -181,11 +181,43 @@ static struct mtd_partition nand_partitions[] = {
}, },
}; };
/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
static struct omap_nand_platform_data nand_data = { {
.options = NAND_SAMSUNG_LP_OPTIONS, struct nand_chip *this = mtd->priv;
.parts = nand_partitions, unsigned long mask;
.nr_parts = ARRAY_SIZE(nand_partitions),
if (cmd == NAND_CMD_NONE)
return;
mask = (ctrl & NAND_CLE) ? 0x02 : 0;
if (ctrl & NAND_ALE)
mask |= 0x04;
writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
}
#define H3_NAND_RB_GPIO_PIN 10
static int nand_dev_ready(struct mtd_info *mtd)
{
return gpio_get_value(H3_NAND_RB_GPIO_PIN);
}
static const char *part_probes[] = { "cmdlinepart", NULL };
struct platform_nand_data nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
.nr_partitions = ARRAY_SIZE(nand_partitions),
.partitions = nand_partitions,
.options = NAND_SAMSUNG_LP_OPTIONS,
.part_probe_types = part_probes,
},
.ctrl = {
.cmd_ctrl = nand_cmd_ctl,
.dev_ready = nand_dev_ready,
},
}; };
static struct resource nand_resource = { static struct resource nand_resource = {
...@@ -193,15 +225,21 @@ static struct resource nand_resource = { ...@@ -193,15 +225,21 @@ static struct resource nand_resource = {
}; };
static struct platform_device nand_device = { static struct platform_device nand_device = {
.name = "omapnand", .name = "gen_nand",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &nand_data, .platform_data = &nand_platdata,
}, },
.num_resources = 1, .num_resources = 1,
.resource = &nand_resource, .resource = &nand_resource,
}; };
static struct smc91x_platdata smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource smc91x_resources[] = { static struct resource smc91x_resources[] = {
[0] = { [0] = {
.start = OMAP1710_ETHR_START, /* Physical */ .start = OMAP1710_ETHR_START, /* Physical */
...@@ -218,6 +256,9 @@ static struct resource smc91x_resources[] = { ...@@ -218,6 +256,9 @@ static struct resource smc91x_resources[] = {
static struct platform_device smc91x_device = { static struct platform_device smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &smc91x_info,
},
.num_resources = ARRAY_SIZE(smc91x_resources), .num_resources = ARRAY_SIZE(smc91x_resources),
.resource = smc91x_resources, .resource = smc91x_resources,
}; };
...@@ -332,13 +373,6 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = { ...@@ -332,13 +373,6 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = {
}, },
}; };
#define H3_NAND_RB_GPIO_PIN 10
static int nand_dev_ready(struct omap_nand_platform_data *data)
{
return gpio_get_value(H3_NAND_RB_GPIO_PIN);
}
static void __init h3_init(void) static void __init h3_init(void)
{ {
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
...@@ -356,7 +390,7 @@ static void __init h3_init(void) ...@@ -356,7 +390,7 @@ static void __init h3_init(void)
nand_resource.end += SZ_4K - 1; nand_resource.end += SZ_4K - 1;
if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0) if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
BUG(); BUG();
nand_data.dev_ready = nand_dev_ready; gpio_direction_input(H3_NAND_RB_GPIO_PIN);
/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
/* GPIO10 pullup/down register, Enable pullup on GPIO10 */ /* GPIO10 pullup/down register, Enable pullup on GPIO10 */
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <plat/common.h> #include <plat/common.h>
#include <plat/board.h> #include <plat/board.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/usb.h>
#include <mach/irqs.h> #include <mach/irqs.h>
...@@ -140,6 +141,15 @@ static struct platform_device kp_device = { ...@@ -140,6 +141,15 @@ static struct platform_device kp_device = {
.resource = kp_resources, .resource = kp_resources,
}; };
/* USB Device */
static struct omap_usb_config htcherald_usb_config __initdata = {
.otg = 0,
.register_host = 0,
.register_dev = 1,
.hmc_mode = 4,
.pins[0] = 2,
};
/* LCD Device resources */ /* LCD Device resources */
static struct platform_device lcd_device = { static struct platform_device lcd_device = {
.name = "lcd_htcherald", .name = "lcd_htcherald",
...@@ -214,6 +224,57 @@ static void __init htcherald_disable_watchdog(void) ...@@ -214,6 +224,57 @@ static void __init htcherald_disable_watchdog(void)
} }
} }
#define HTCHERALD_GPIO_USB_EN1 33
#define HTCHERALD_GPIO_USB_EN2 73
#define HTCHERALD_GPIO_USB_DM 35
#define HTCHERALD_GPIO_USB_DP 36
static void __init htcherald_usb_enable(void)
{
unsigned int tries = 20;
unsigned int value = 0;
/* Request the GPIOs we need to control here */
if (gpio_request(HTCHERALD_GPIO_USB_EN1, "herald_usb") < 0)
goto err1;
if (gpio_request(HTCHERALD_GPIO_USB_EN2, "herald_usb") < 0)
goto err2;
if (gpio_request(HTCHERALD_GPIO_USB_DM, "herald_usb") < 0)
goto err3;
if (gpio_request(HTCHERALD_GPIO_USB_DP, "herald_usb") < 0)
goto err4;
/* force USB_EN GPIO to 0 */
do {
/* output low */
gpio_direction_output(HTCHERALD_GPIO_USB_EN1, 0);
} while ((value = gpio_get_value(HTCHERALD_GPIO_USB_EN1)) == 1 &&
--tries);
if (value == 1)
printk(KERN_WARNING "Unable to reset USB, trying to continue\n");
gpio_direction_output(HTCHERALD_GPIO_USB_EN2, 0); /* output low */
gpio_direction_input(HTCHERALD_GPIO_USB_DM); /* input */
gpio_direction_input(HTCHERALD_GPIO_USB_DP); /* input */
goto done;
err4:
gpio_free(HTCHERALD_GPIO_USB_DM);
err3:
gpio_free(HTCHERALD_GPIO_USB_EN2);
err2:
gpio_free(HTCHERALD_GPIO_USB_EN1);
err1:
printk(KERN_ERR "Unabled to request GPIO for USB\n");
done:
printk(KERN_INFO "USB setup complete.\n");
}
static void __init htcherald_init(void) static void __init htcherald_init(void)
{ {
printk(KERN_INFO "HTC Herald init.\n"); printk(KERN_INFO "HTC Herald init.\n");
...@@ -225,6 +286,9 @@ static void __init htcherald_init(void) ...@@ -225,6 +286,9 @@ static void __init htcherald_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
htcherald_disable_watchdog(); htcherald_disable_watchdog();
htcherald_usb_enable();
omap_usb_init(&htcherald_usb_config);
} }
static void __init htcherald_init_irq(void) static void __init htcherald_init_irq(void)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/smc91x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -142,6 +143,11 @@ static struct platform_device innovator_kp_device = { ...@@ -142,6 +143,11 @@ static struct platform_device innovator_kp_device = {
.resource = innovator_kp_resources, .resource = innovator_kp_resources,
}; };
static struct smc91x_platdata innovator_smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
...@@ -175,6 +181,9 @@ static struct resource innovator1510_smc91x_resources[] = { ...@@ -175,6 +181,9 @@ static struct resource innovator1510_smc91x_resources[] = {
static struct platform_device innovator1510_smc91x_device = { static struct platform_device innovator1510_smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &innovator_smc91x_info,
},
.num_resources = ARRAY_SIZE(innovator1510_smc91x_resources), .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources),
.resource = innovator1510_smc91x_resources, .resource = innovator1510_smc91x_resources,
}; };
...@@ -241,6 +250,9 @@ static struct resource innovator1610_smc91x_resources[] = { ...@@ -241,6 +250,9 @@ static struct resource innovator1610_smc91x_resources[] = {
static struct platform_device innovator1610_smc91x_device = { static struct platform_device innovator1610_smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &innovator_smc91x_info,
},
.num_resources = ARRAY_SIZE(innovator1610_smc91x_resources), .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources),
.resource = innovator1610_smc91x_resources, .resource = innovator1610_smc91x_resources,
}; };
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/smc91x.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -115,6 +116,12 @@ static struct platform_device osk5912_flash_device = { ...@@ -115,6 +116,12 @@ static struct platform_device osk5912_flash_device = {
.resource = &osk_flash_resource, .resource = &osk_flash_resource,
}; };
static struct smc91x_platdata osk5912_smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource osk5912_smc91x_resources[] = { static struct resource osk5912_smc91x_resources[] = {
[0] = { [0] = {
.start = OMAP_OSK_ETHR_START, /* Physical */ .start = OMAP_OSK_ETHR_START, /* Physical */
...@@ -131,6 +138,9 @@ static struct resource osk5912_smc91x_resources[] = { ...@@ -131,6 +138,9 @@ static struct resource osk5912_smc91x_resources[] = {
static struct platform_device osk5912_smc91x_device = { static struct platform_device osk5912_smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = -1, .id = -1,
.dev = {
.platform_data = &osk5912_smc91x_info,
},
.num_resources = ARRAY_SIZE(osk5912_smc91x_resources), .num_resources = ARRAY_SIZE(osk5912_smc91x_resources),
.resource = osk5912_smc91x_resources, .resource = osk5912_smc91x_resources,
}; };
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/smc91x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
#include <mach/gpio.h> #include <mach/gpio.h>
#include <plat/mux.h> #include <plat/mux.h>
#include <plat/fpga.h> #include <plat/fpga.h>
#include <plat/nand.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/board.h> #include <plat/board.h>
...@@ -67,6 +67,12 @@ static int p2_keymap[] = { ...@@ -67,6 +67,12 @@ static int p2_keymap[] = {
0 0
}; };
static struct smc91x_platdata smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource smc91x_resources[] = { static struct resource smc91x_resources[] = {
[0] = { [0] = {
.start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
...@@ -134,8 +140,40 @@ static struct platform_device nor_device = { ...@@ -134,8 +140,40 @@ static struct platform_device nor_device = {
.resource = &nor_resource, .resource = &nor_resource,
}; };
static struct omap_nand_platform_data nand_data = { static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
.options = NAND_SAMSUNG_LP_OPTIONS, {
struct nand_chip *this = mtd->priv;
unsigned long mask;
if (cmd == NAND_CMD_NONE)
return;
mask = (ctrl & NAND_CLE) ? 0x02 : 0;
if (ctrl & NAND_ALE)
mask |= 0x04;
writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
}
#define P2_NAND_RB_GPIO_PIN 62
static int nand_dev_ready(struct mtd_info *mtd)
{
return gpio_get_value(P2_NAND_RB_GPIO_PIN);
}
static const char *part_probes[] = { "cmdlinepart", NULL };
static struct platform_nand_data nand_data = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
.options = NAND_SAMSUNG_LP_OPTIONS,
.part_probe_types = part_probes,
},
.ctrl = {
.cmd_ctrl = nand_cmd_ctl,
.dev_ready = nand_dev_ready,
},
}; };
static struct resource nand_resource = { static struct resource nand_resource = {
...@@ -145,7 +183,7 @@ static struct resource nand_resource = { ...@@ -145,7 +183,7 @@ static struct resource nand_resource = {
}; };
static struct platform_device nand_device = { static struct platform_device nand_device = {
.name = "omapnand", .name = "gen_nand",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &nand_data, .platform_data = &nand_data,
...@@ -157,6 +195,9 @@ static struct platform_device nand_device = { ...@@ -157,6 +195,9 @@ static struct platform_device nand_device = {
static struct platform_device smc91x_device = { static struct platform_device smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &smc91x_info,
},
.num_resources = ARRAY_SIZE(smc91x_resources), .num_resources = ARRAY_SIZE(smc91x_resources),
.resource = smc91x_resources, .resource = smc91x_resources,
}; };
...@@ -201,13 +242,6 @@ static struct platform_device *devices[] __initdata = { ...@@ -201,13 +242,6 @@ static struct platform_device *devices[] __initdata = {
&lcd_device, &lcd_device,
}; };
#define P2_NAND_RB_GPIO_PIN 62
static int nand_dev_ready(struct omap_nand_platform_data *data)
{
return gpio_get_value(P2_NAND_RB_GPIO_PIN);
}
static struct omap_lcd_config perseus2_lcd_config __initdata = { static struct omap_lcd_config perseus2_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
...@@ -220,7 +254,7 @@ static void __init omap_perseus2_init(void) ...@@ -220,7 +254,7 @@ static void __init omap_perseus2_init(void)
{ {
if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
BUG(); BUG();
nand_data.dev_ready = nand_dev_ready; gpio_direction_input(P2_NAND_RB_GPIO_PIN);
omap_cfg_reg(L3_1610_FLASH_CS2B_OE); omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE); omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/smc91x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -106,6 +107,12 @@ static struct platform_device voiceblue_flash_device = { ...@@ -106,6 +107,12 @@ static struct platform_device voiceblue_flash_device = {
.resource = &voiceblue_flash_resource, .resource = &voiceblue_flash_resource,
}; };
static struct smc91x_platdata voiceblue_smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource voiceblue_smc91x_resources[] = { static struct resource voiceblue_smc91x_resources[] = {
[0] = { [0] = {
.start = OMAP_CS2_PHYS + 0x300, .start = OMAP_CS2_PHYS + 0x300,
...@@ -122,6 +129,9 @@ static struct resource voiceblue_smc91x_resources[] = { ...@@ -122,6 +129,9 @@ static struct resource voiceblue_smc91x_resources[] = {
static struct platform_device voiceblue_smc91x_device = { static struct platform_device voiceblue_smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = 0, .id = 0,
.dev = {
.platform_data = &voiceblue_smc91x_info,
},
.num_resources = ARRAY_SIZE(voiceblue_smc91x_resources), .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources),
.resource = voiceblue_smc91x_resources, .resource = voiceblue_smc91x_resources,
}; };
......
...@@ -655,9 +655,9 @@ static struct omap_clk omap_clks[] = { ...@@ -655,9 +655,9 @@ static struct omap_clk omap_clks[] = {
CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX), CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX),
/* Virtual clocks */ /* Virtual clocks */
CLK(NULL, "mpu", &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310), CLK(NULL, "mpu", &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310),
CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310), CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX),
CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX),
CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310), CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX),
CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX),
CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310),
......
/*
* Helper module for board specific I2C bus registration
*
* Copyright (C) 2009 Nokia Corporation.
*
* 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 <plat/i2c.h>
#include <plat/mux.h>
#include <plat/cpu.h>
int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
struct i2c_board_info const *info,
unsigned len)
{
if (cpu_is_omap7xx()) {
omap_cfg_reg(I2C_7XX_SDA);
omap_cfg_reg(I2C_7XX_SCL);
} else {
omap_cfg_reg(I2C_SDA);
omap_cfg_reg(I2C_SCL);
}
return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
}
/*
* arch/arm/mach-omap1/include/mach/lcd_dma.h
*
* Extracted from arch/arm/plat-omap/include/plat/dma.h
* Copyright (C) 2003 Nokia Corporation
* Author: Juha Yrjölä <juha.yrjola@nokia.com>
*
* 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
*/
#ifndef __MACH_OMAP1_LCD_DMA_H__
#define __MACH_OMAP1_LCD_DMA_H__
/* Hardware registers for LCD DMA */
#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
#define OMAP1610_DMA_LCD_BASE (0xfffee300)
#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
/* LCD DMA block numbers */
enum {
OMAP_LCD_DMA_B1_TOP,
OMAP_LCD_DMA_B1_BOTTOM,
OMAP_LCD_DMA_B2_TOP,
OMAP_LCD_DMA_B2_BOTTOM
};
/* LCD DMA functions */
extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
void *data);
extern void omap_free_lcd_dma(void);
extern void omap_setup_lcd_dma(void);
extern void omap_enable_lcd_dma(void);
extern void omap_stop_lcd_dma(void);
extern void omap_set_lcd_dma_ext_controller(int external);
extern void omap_set_lcd_dma_single_transfer(int single);
extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
int data_type);
extern void omap_set_lcd_dma_b1_rotation(int rotate);
extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
extern void omap_set_lcd_dma_b1_mirror(int mirror);
extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
extern int omap_lcd_dma_running(void);
#endif /* __MACH_OMAP1_LCD_DMA_H__ */
/*
* arch/arm/mach-omap1/include/mach/lcdc.h
*
* Extracted from drivers/video/omap/lcdc.c
* Copyright (C) 2004 Nokia Corporation
* Author: Imre Deak <imre.deak@nokia.com>
*
* 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.
*/
#ifndef __MACH_LCDC_H__
#define __MACH_LCDC_H__
#define OMAP_LCDC_BASE 0xfffec000
#define OMAP_LCDC_SIZE 256
#define OMAP_LCDC_IRQ INT_LCD_CTRL
#define OMAP_LCDC_CONTROL (OMAP_LCDC_BASE + 0x00)
#define OMAP_LCDC_TIMING0 (OMAP_LCDC_BASE + 0x04)
#define OMAP_LCDC_TIMING1 (OMAP_LCDC_BASE + 0x08)
#define OMAP_LCDC_TIMING2 (OMAP_LCDC_BASE + 0x0c)
#define OMAP_LCDC_STATUS (OMAP_LCDC_BASE + 0x10)
#define OMAP_LCDC_SUBPANEL (OMAP_LCDC_BASE + 0x14)
#define OMAP_LCDC_LINE_INT (OMAP_LCDC_BASE + 0x18)
#define OMAP_LCDC_DISPLAY_STATUS (OMAP_LCDC_BASE + 0x1c)
#define OMAP_LCDC_STAT_DONE (1 << 0)
#define OMAP_LCDC_STAT_VSYNC (1 << 1)
#define OMAP_LCDC_STAT_SYNC_LOST (1 << 2)
#define OMAP_LCDC_STAT_ABC (1 << 3)
#define OMAP_LCDC_STAT_LINE_INT (1 << 4)
#define OMAP_LCDC_STAT_FUF (1 << 5)
#define OMAP_LCDC_STAT_LOADED_PALETTE (1 << 6)
#define OMAP_LCDC_CTRL_LCD_EN (1 << 0)
#define OMAP_LCDC_CTRL_LCD_TFT (1 << 7)
#define OMAP_LCDC_CTRL_LINE_IRQ_CLR_SEL (1 << 10)
#define OMAP_LCDC_IRQ_VSYNC (1 << 2)
#define OMAP_LCDC_IRQ_DONE (1 << 3)
#define OMAP_LCDC_IRQ_LOADED_PALETTE (1 << 4)
#define OMAP_LCDC_IRQ_LINE_NIRQ (1 << 5)
#define OMAP_LCDC_IRQ_LINE (1 << 6)
#define OMAP_LCDC_IRQ_MASK (((1 << 5) - 1) << 2)
#endif /* __MACH_LCDC_H__ */
This diff is collapsed.
...@@ -50,12 +50,18 @@ MUX_CFG_7XX("E3_7XX_KBC4", 13, 25, 0, 24, 1, 0) ...@@ -50,12 +50,18 @@ MUX_CFG_7XX("E3_7XX_KBC4", 13, 25, 0, 24, 1, 0)
MUX_CFG_7XX("AA17_7XX_USB_DM", 2, 21, 0, 20, 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("W16_7XX_USB_PU_EN", 2, 25, 0, 24, 0, 0)
MUX_CFG_7XX("W17_7XX_USB_VBUSI", 2, 29, 0, 28, 0, 0) MUX_CFG_7XX("W17_7XX_USB_VBUSI", 2, 29, 6, 28, 1, 0)
MUX_CFG_7XX("W18_7XX_USB_DMCK_OUT",3, 3, 1, 2, 0, 0)
MUX_CFG_7XX("W19_7XX_USB_DCRST", 3, 7, 1, 6, 0, 0)
/* MMC Pins */ /* MMC Pins */
MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0) 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_CLK", 2, 13, 0, 12, 1, 0)
MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0)
/* I2C interface */
MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0)
MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0)
}; };
#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)
#else #else
......
...@@ -24,6 +24,18 @@ config ARCH_OMAP3430 ...@@ -24,6 +24,18 @@ config ARCH_OMAP3430
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select ARCH_OMAP_OTG select ARCH_OMAP_OTG
config OMAP_PACKAGE_CBC
bool
config OMAP_PACKAGE_CBB
bool
config OMAP_PACKAGE_CUS
bool
config OMAP_PACKAGE_CBP
bool
comment "OMAP Board Type" comment "OMAP Board Type"
depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4 depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4
...@@ -52,14 +64,17 @@ config MACH_OMAP_2430SDP ...@@ -52,14 +64,17 @@ config MACH_OMAP_2430SDP
config MACH_OMAP3_BEAGLE config MACH_OMAP3_BEAGLE
bool "OMAP3 BEAGLE board" bool "OMAP3 BEAGLE board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP_LDP config MACH_OMAP_LDP
bool "OMAP3 LDP board" bool "OMAP3 LDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OVERO config MACH_OVERO
bool "Gumstix Overo board" bool "Gumstix Overo board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP3EVM config MACH_OMAP3EVM
bool "OMAP 3530 EVM board" bool "OMAP 3530 EVM board"
...@@ -68,14 +83,22 @@ config MACH_OMAP3EVM ...@@ -68,14 +83,22 @@ config MACH_OMAP3EVM
config MACH_OMAP3517EVM config MACH_OMAP3517EVM
bool "OMAP3517/ AM3517 EVM board" bool "OMAP3517/ AM3517 EVM board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP3_PANDORA config MACH_OMAP3_PANDORA
bool "OMAP3 Pandora" bool "OMAP3 Pandora"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP3_TOUCHBOOK
bool "OMAP3 Touch Book"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
select BACKLIGHT_CLASS_DEVICE
config MACH_OMAP_3430SDP config MACH_OMAP_3430SDP
bool "OMAP 3430 SDP board" bool "OMAP 3430 SDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_NOKIA_N800 config MACH_NOKIA_N800
bool bool
...@@ -96,26 +119,33 @@ config MACH_NOKIA_N8X0 ...@@ -96,26 +119,33 @@ config MACH_NOKIA_N8X0
config MACH_NOKIA_RX51 config MACH_NOKIA_RX51
bool "Nokia RX-51 board" bool "Nokia RX-51 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP_ZOOM2 config MACH_OMAP_ZOOM2
bool "OMAP3 Zoom2 board" bool "OMAP3 Zoom2 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP_ZOOM3 config MACH_OMAP_ZOOM3
bool "OMAP3630 Zoom3 board" bool "OMAP3630 Zoom3 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBP
config MACH_CM_T35 config MACH_CM_T35
bool "CompuLab CM-T35 module" bool "CompuLab CM-T35 module"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CUS
select OMAP_MUX
config MACH_IGEP0020 config MACH_IGEP0020
bool "IGEP0020" bool "IGEP0020"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBB
config MACH_OMAP_3630SDP config MACH_OMAP_3630SDP
bool "OMAP3630 SDP board" bool "OMAP3630 SDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX depends on ARCH_OMAP3 && ARCH_OMAP34XX
select OMAP_PACKAGE_CBP
config MACH_OMAP_4430SDP config MACH_OMAP_4430SDP
bool "OMAP 4430 SDP board" bool "OMAP 4430 SDP board"
......
...@@ -26,6 +26,9 @@ obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o ...@@ -26,6 +26,9 @@ obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o
obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o
obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o
# Pin multiplexing
obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o
# SMS/SDRC # SMS/SDRC
obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o # obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o
...@@ -61,6 +64,9 @@ iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o ...@@ -61,6 +64,9 @@ iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o
obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y) obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y)
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
obj-y += $(i2c-omap-m) $(i2c-omap-y)
# Specific board support # Specific board support
obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
...@@ -99,7 +105,8 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ ...@@ -99,7 +105,8 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \
mmc-twl4030.o mmc-twl4030.o
obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
mmc-twl4030.o mmc-twl4030.o
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
mmc-twl4030.o
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <plat/mux.h>
#include <plat/board.h> #include <plat/board.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/common.h> #include <plat/common.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#include <plat/control.h> #include <plat/control.h>
#include <plat/gpmc-smc91x.h> #include <plat/gpmc-smc91x.h>
#include "mux.h"
#include "sdram-qimonda-hyb18m512160af-6.h" #include "sdram-qimonda-hyb18m512160af-6.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
...@@ -625,7 +625,9 @@ static inline void board_smc91x_init(void) ...@@ -625,7 +625,9 @@ static inline void board_smc91x_init(void)
static void enable_board_wakeup_source(void) static void enable_board_wakeup_source(void)
{ {
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */ /* T2 interrupt line (keypad) */
omap_mux_init_signal("sys_nirq",
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
} }
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
...@@ -640,8 +642,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ...@@ -640,8 +642,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.reset_gpio_port[2] = -EINVAL .reset_gpio_port[2] = -EINVAL
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap_3430sdp_init(void) static void __init omap_3430sdp_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3430_i2c_init(); omap3430_i2c_init();
platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
if (omap_rev() > OMAP3430_REV_ES1_0) if (omap_rev() > OMAP3430_REV_ES1_0)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <mach/board-zoom.h> #include <mach/board-zoom.h>
#include "mux.h"
#include "sdram-hynix-h8mbx00u0mer-0em.h" #include "sdram-hynix-h8mbx00u0mer-0em.h"
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
...@@ -48,7 +49,9 @@ static inline void board_smc91x_init(void) ...@@ -48,7 +49,9 @@ static inline void board_smc91x_init(void)
static void enable_board_wakeup_source(void) static void enable_board_wakeup_source(void)
{ {
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */ /* T2 interrupt line (keypad) */
omap_mux_init_signal("sys_nirq",
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
} }
static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
...@@ -82,8 +85,17 @@ static void __init omap_sdp_init_irq(void) ...@@ -82,8 +85,17 @@ static void __init omap_sdp_init_irq(void)
omap_gpio_init(); omap_gpio_init();
} }
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap_sdp_init(void) static void __init omap_sdp_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
zoom_peripherals_init(); zoom_peripherals_init();
board_smc91x_init(); board_smc91x_init();
enable_board_wakeup_source(); enable_board_wakeup_source();
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <plat/common.h> #include <plat/common.h>
#include <plat/usb.h> #include <plat/usb.h>
#include "mux.h"
/* /*
* Board initialization * Board initialization
*/ */
...@@ -60,8 +62,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { ...@@ -60,8 +62,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
.reset_gpio_port[2] = -EINVAL .reset_gpio_port[2] = -EINVAL
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init am3517_evm_init(void) static void __init am3517_evm_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
platform_add_devices(am3517_evm_devices, platform_add_devices(am3517_evm_devices,
ARRAY_SIZE(am3517_evm_devices)); ARRAY_SIZE(am3517_evm_devices));
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/smc91x.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -120,6 +121,12 @@ static void __init apollon_flash_init(void) ...@@ -120,6 +121,12 @@ static void __init apollon_flash_init(void)
apollon_flash_resource[0].end = base + SZ_128K - 1; apollon_flash_resource[0].end = base + SZ_128K - 1;
} }
static struct smc91x_platdata appolon_smc91x_info = {
.flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
.leda = RPC_LED_100_10,
.ledb = RPC_LED_TX_RX,
};
static struct resource apollon_smc91x_resources[] = { static struct resource apollon_smc91x_resources[] = {
[0] = { [0] = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
...@@ -134,6 +141,9 @@ static struct resource apollon_smc91x_resources[] = { ...@@ -134,6 +141,9 @@ static struct resource apollon_smc91x_resources[] = {
static struct platform_device apollon_smc91x_device = { static struct platform_device apollon_smc91x_device = {
.name = "smc91x", .name = "smc91x",
.id = -1, .id = -1,
.dev = {
.platform_data = &appolon_smc91x_info,
},
.num_resources = ARRAY_SIZE(apollon_smc91x_resources), .num_resources = ARRAY_SIZE(apollon_smc91x_resources),
.resource = apollon_smc91x_resources, .resource = apollon_smc91x_resources,
}; };
......
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/mux.h>
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
...@@ -482,8 +482,102 @@ static void __init cm_t35_map_io(void) ...@@ -482,8 +482,102 @@ static void __init cm_t35_map_io(void)
omap2_map_common_io(); omap2_map_common_io();
} }
static struct omap_board_mux board_mux[] __initdata = {
/* nCS and IRQ for CM-T35 ethernet */
OMAP3_MUX(GPMC_NCS5, OMAP_MUX_MODE0),
OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
/* nCS and IRQ for SB-T35 ethernet */
OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE0),
OMAP3_MUX(GPMC_WAIT3, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
/* PENDOWN GPIO */
OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
/* mUSB */
OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
/* MMC 2 */
OMAP3_MUX(SDMMC2_DAT4, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
OMAP3_MUX(SDMMC2_DAT5, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
OMAP3_MUX(SDMMC2_DAT6, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
OMAP3_MUX(SDMMC2_DAT7, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
/* McSPI 1 */
OMAP3_MUX(MCSPI1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(MCSPI1_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(MCSPI1_CS0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
/* McSPI 4 */
OMAP3_MUX(MCBSP1_CLKR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP1_DX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP1_DR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP1_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP),
/* McBSP 2 */
OMAP3_MUX(MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
/* serial ports */
OMAP3_MUX(MCBSP3_CLKX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
OMAP3_MUX(MCBSP3_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
/* DSS */
OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
/* TPS IRQ */
OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_WAKEUP_EN | \
OMAP_PIN_INPUT_PULLUP),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
static void __init cm_t35_init(void) static void __init cm_t35_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
omap_serial_init(); omap_serial_init();
cm_t35_init_i2c(); cm_t35_init_i2c();
cm_t35_init_nand(); cm_t35_init_nand();
...@@ -492,8 +586,6 @@ static void __init cm_t35_init(void) ...@@ -492,8 +586,6 @@ static void __init cm_t35_init(void)
cm_t35_init_led(); cm_t35_init_led();
usb_musb_init(); usb_musb_init();
omap_cfg_reg(AF26_34XX_SYS_NIRQ);
} }
MACHINE_START(CM_T35, "Compulab CM-T35") MACHINE_START(CM_T35, "Compulab CM-T35")
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/mux.h>
#include <plat/usb.h> #include <plat/usb.h>
#include "mux.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
#define IGEP2_SMSC911X_CS 5 #define IGEP2_SMSC911X_CS 5
...@@ -203,8 +203,17 @@ static int __init igep2_i2c_init(void) ...@@ -203,8 +203,17 @@ static int __init igep2_i2c_init(void)
return 0; return 0;
} }
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init igep2_init(void) static void __init igep2_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
igep2_i2c_init(); igep2_i2c_init();
omap_serial_init(); omap_serial_init();
usb_musb_init(); usb_musb_init();
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <plat/control.h> #include <plat/control.h>
#include <plat/usb.h> #include <plat/usb.h>
#include "mux.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
#define LDP_SMSC911X_CS 1 #define LDP_SMSC911X_CS 1
...@@ -374,8 +375,17 @@ static struct platform_device *ldp_devices[] __initdata = { ...@@ -374,8 +375,17 @@ static struct platform_device *ldp_devices[] __initdata = {
&ldp_gpio_keys_device, &ldp_gpio_keys_device,
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap_ldp_init(void) static void __init omap_ldp_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_i2c_init(); omap_i2c_init();
platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
ts_gpio = 54; ts_gpio = 54;
......
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
#include <plat/common.h> #include <plat/common.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/mux.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/timer-gp.h> #include <plat/timer-gp.h>
#include "mux.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
#define GPMC_CS0_BASE 0x60 #define GPMC_CS0_BASE 0x60
...@@ -140,10 +140,10 @@ static int beagle_twl_gpio_setup(struct device *dev, ...@@ -140,10 +140,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio) unsigned gpio, unsigned ngpio)
{ {
if (system_rev >= 0x20 && system_rev <= 0x34301000) { if (system_rev >= 0x20 && system_rev <= 0x34301000) {
omap_cfg_reg(AG9_34XX_GPIO23); omap_mux_init_gpio(23, OMAP_PIN_INPUT);
mmc[0].gpio_wp = 23; mmc[0].gpio_wp = 23;
} else { } else {
omap_cfg_reg(AH8_34XX_GPIO29); omap_mux_init_gpio(29, OMAP_PIN_INPUT);
} }
/* gpio + 0 is "mmc0_cd" (input/IRQ) */ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
...@@ -422,14 +422,23 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ...@@ -422,14 +422,23 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.reset_gpio_port[2] = -EINVAL .reset_gpio_port[2] = -EINVAL
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap3_beagle_init(void) static void __init omap3_beagle_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_beagle_i2c_init(); omap3_beagle_i2c_init();
platform_add_devices(omap3_beagle_devices, platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices)); ARRAY_SIZE(omap3_beagle_devices));
omap_serial_init(); omap_serial_init();
omap_cfg_reg(J25_34XX_GPIO170); omap_mux_init_gpio(170, OMAP_PIN_INPUT);
gpio_request(170, "DVI_nPD"); gpio_request(170, "DVI_nPD");
/* REVISIT leave DVI powered down until it's needed ... */ /* REVISIT leave DVI powered down until it's needed ... */
gpio_direction_output(170, true); gpio_direction_output(170, true);
...@@ -439,8 +448,8 @@ static void __init omap3_beagle_init(void) ...@@ -439,8 +448,8 @@ static void __init omap3_beagle_init(void)
omap3beagle_flash_init(); omap3beagle_flash_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
omap_cfg_reg(H16_34XX_SDRC_CKE0); omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_cfg_reg(H17_34XX_SDRC_CKE1); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
} }
static void __init omap3_beagle_map_io(void) static void __init omap3_beagle_map_io(void)
......
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <plat/board.h> #include <plat/board.h>
#include <plat/mux.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
...@@ -223,7 +223,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev, ...@@ -223,7 +223,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio) unsigned gpio, unsigned ngpio)
{ {
/* gpio + 0 is "mmc0_cd" (input/IRQ) */ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
omap_cfg_reg(L8_34XX_GPIO63); omap_mux_init_gpio(63, OMAP_PIN_INPUT);
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
twl4030_mmc_init(mmc); twl4030_mmc_init(mmc);
...@@ -422,9 +422,18 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ...@@ -422,9 +422,18 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.reset_gpio_port[2] = -EINVAL .reset_gpio_port[2] = -EINVAL
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap3_evm_init(void) static void __init omap3_evm_init(void)
{ {
omap3_evm_get_revision(); omap3_evm_get_revision();
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_evm_i2c_init(); omap3_evm_i2c_init();
...@@ -440,24 +449,24 @@ static void __init omap3_evm_init(void) ...@@ -440,24 +449,24 @@ static void __init omap3_evm_init(void)
#endif #endif
if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
/* enable EHCI VBUS using GPIO22 */ /* enable EHCI VBUS using GPIO22 */
omap_cfg_reg(AF9_34XX_GPIO22); omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS"); gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0); gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1); gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);
/* Select EHCI port on main board */ /* Select EHCI port on main board */
omap_cfg_reg(U3_34XX_GPIO61); omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port"); gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0); gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0); gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);
/* setup EHCI phy reset config */ /* setup EHCI phy reset config */
omap_cfg_reg(AH14_34XX_GPIO21); omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
ehci_pdata.reset_gpio_port[1] = 21; ehci_pdata.reset_gpio_port[1] = 21;
} else { } else {
/* setup EHCI phy reset on MDC */ /* setup EHCI phy reset on MDC */
omap_cfg_reg(AF4_34XX_GPIO135_OUT); omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
ehci_pdata.reset_gpio_port[1] = 135; ehci_pdata.reset_gpio_port[1] = 135;
} }
usb_musb_init(); usb_musb_init();
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/mux.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
...@@ -98,10 +98,10 @@ static struct gpio_keys_button pandora_gpio_keys[] = { ...@@ -98,10 +98,10 @@ static struct gpio_keys_button pandora_gpio_keys[] = {
GPIO_BUTTON_LOW(103, KEY_DOWN, "down"), GPIO_BUTTON_LOW(103, KEY_DOWN, "down"),
GPIO_BUTTON_LOW(96, KEY_LEFT, "left"), GPIO_BUTTON_LOW(96, KEY_LEFT, "left"),
GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"), GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"),
GPIO_BUTTON_LOW(111, BTN_A, "a"), GPIO_BUTTON_LOW(109, KEY_KP1, "game 1"),
GPIO_BUTTON_LOW(106, BTN_B, "b"), GPIO_BUTTON_LOW(111, KEY_KP2, "game 2"),
GPIO_BUTTON_LOW(109, BTN_X, "x"), GPIO_BUTTON_LOW(106, KEY_KP3, "game 3"),
GPIO_BUTTON_LOW(101, BTN_Y, "y"), GPIO_BUTTON_LOW(101, KEY_KP4, "game 4"),
GPIO_BUTTON_LOW(102, BTN_TL, "l"), GPIO_BUTTON_LOW(102, BTN_TL, "l"),
GPIO_BUTTON_LOW(97, BTN_TL2, "l2"), GPIO_BUTTON_LOW(97, BTN_TL2, "l2"),
GPIO_BUTTON_LOW(105, BTN_TR, "r"), GPIO_BUTTON_LOW(105, BTN_TR, "r"),
...@@ -315,7 +315,7 @@ static int __init omap3pandora_i2c_init(void) ...@@ -315,7 +315,7 @@ static int __init omap3pandora_i2c_init(void)
omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo, omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo,
ARRAY_SIZE(omap3pandora_i2c_boardinfo)); ARRAY_SIZE(omap3pandora_i2c_boardinfo));
/* i2c2 pins are not connected */ /* i2c2 pins are not connected */
omap_register_i2c_bus(3, 400, NULL, 0); omap_register_i2c_bus(3, 100, NULL, 0);
return 0; return 0;
} }
...@@ -368,23 +368,8 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { ...@@ -368,23 +368,8 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
} }
}; };
static struct platform_device omap3pandora_lcd_device = {
.name = "pandora_lcd",
.id = -1,
};
static struct omap_lcd_config omap3pandora_lcd_config __initdata = {
.ctrl_name = "internal",
};
static struct omap_board_config_kernel omap3pandora_config[] __initdata = {
{ OMAP_TAG_LCD, &omap3pandora_lcd_config },
};
static void __init omap3pandora_init_irq(void) static void __init omap3pandora_init_irq(void)
{ {
omap_board_config = omap3pandora_config;
omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params); mt46h32m32lf6_sdrc_params);
omap_init_irq(); omap_init_irq();
...@@ -392,7 +377,6 @@ static void __init omap3pandora_init_irq(void) ...@@ -392,7 +377,6 @@ static void __init omap3pandora_init_irq(void)
} }
static struct platform_device *omap3pandora_devices[] __initdata = { static struct platform_device *omap3pandora_devices[] __initdata = {
&omap3pandora_lcd_device,
&pandora_leds_gpio, &pandora_leds_gpio,
&pandora_keys_gpio, &pandora_keys_gpio,
}; };
...@@ -409,8 +393,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ...@@ -409,8 +393,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.reset_gpio_port[2] = -EINVAL .reset_gpio_port[2] = -EINVAL
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap3pandora_init(void) static void __init omap3pandora_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3pandora_i2c_init(); omap3pandora_i2c_init();
platform_add_devices(omap3pandora_devices, platform_add_devices(omap3pandora_devices,
ARRAY_SIZE(omap3pandora_devices)); ARRAY_SIZE(omap3pandora_devices));
...@@ -423,8 +416,8 @@ static void __init omap3pandora_init(void) ...@@ -423,8 +416,8 @@ static void __init omap3pandora_init(void)
usb_musb_init(); usb_musb_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
omap_cfg_reg(H16_34XX_SDRC_CKE0); omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_cfg_reg(H17_34XX_SDRC_CKE1); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
} }
static void __init omap3pandora_map_io(void) static void __init omap3pandora_map_io(void)
......
This diff is collapsed.
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/mux.h>
#include <plat/usb.h> #include <plat/usb.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
...@@ -405,9 +405,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ...@@ -405,9 +405,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
.reset_gpio_port[2] = -EINVAL .reset_gpio_port[2] = -EINVAL
}; };
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init overo_init(void) static void __init overo_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
overo_i2c_init(); overo_i2c_init();
platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
omap_serial_init(); omap_serial_init();
...@@ -418,8 +426,8 @@ static void __init overo_init(void) ...@@ -418,8 +426,8 @@ static void __init overo_init(void)
overo_init_smsc911x(); overo_init_smsc911x();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
omap_cfg_reg(H16_34XX_SDRC_CKE0); omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_cfg_reg(H17_34XX_SDRC_CKE1); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
if ((gpio_request(OVERO_GPIO_W2W_NRESET, if ((gpio_request(OVERO_GPIO_W2W_NRESET,
"OVERO_GPIO_W2W_NRESET") == 0) && "OVERO_GPIO_W2W_NRESET") == 0) &&
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <plat/onenand.h> #include <plat/onenand.h>
#include <plat/gpmc-smc91x.h> #include <plat/gpmc-smc91x.h>
#include "mux.h"
#include "mmc-twl4030.h" #include "mmc-twl4030.h"
#define SYSTEM_REV_B_USES_VAUX3 0x1699 #define SYSTEM_REV_B_USES_VAUX3 0x1699
...@@ -59,7 +60,7 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { ...@@ -59,7 +60,7 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
.bus_num = 4, .bus_num = 4,
.chip_select = 0, .chip_select = 0,
.max_speed_hz = 48000000, .max_speed_hz = 48000000,
.mode = SPI_MODE_2, .mode = SPI_MODE_3,
.controller_data = &wl1251_mcspi_config, .controller_data = &wl1251_mcspi_config,
.platform_data = &wl1251_pdata, .platform_data = &wl1251_pdata,
}, },
...@@ -630,9 +631,9 @@ static struct omap_smc91x_platform_data board_smc91x_data = { ...@@ -630,9 +631,9 @@ static struct omap_smc91x_platform_data board_smc91x_data = {
static void __init board_smc91x_init(void) static void __init board_smc91x_init(void)
{ {
omap_cfg_reg(U8_34XX_GPIO54_DOWN); omap_mux_init_gpio(54, OMAP_PIN_INPUT_PULLDOWN);
omap_cfg_reg(G25_34XX_GPIO86_OUT); omap_mux_init_gpio(86, OMAP_PIN_OUTPUT);
omap_cfg_reg(H19_34XX_GPIO164_OUT); omap_mux_init_gpio(164, OMAP_PIN_OUTPUT);
gpmc_smc91x_init(&board_smc91x_data); gpmc_smc91x_init(&board_smc91x_data);
} }
......
...@@ -23,13 +23,14 @@ ...@@ -23,13 +23,14 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <plat/mux.h>
#include <plat/board.h> #include <plat/board.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/dma.h> #include <plat/dma.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/usb.h> #include <plat/usb.h>
#include "mux.h"
struct omap_sdrc_params *rx51_get_sdram_timings(void); struct omap_sdrc_params *rx51_get_sdram_timings(void);
static struct omap_lcd_config rx51_lcd_config = { static struct omap_lcd_config rx51_lcd_config = {
...@@ -69,15 +70,24 @@ static void __init rx51_init_irq(void) ...@@ -69,15 +70,24 @@ static void __init rx51_init_irq(void)
extern void __init rx51_peripherals_init(void); extern void __init rx51_peripherals_init(void);
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init rx51_init(void) static void __init rx51_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_serial_init(); omap_serial_init();
usb_musb_init(); usb_musb_init();
rx51_peripherals_init(); rx51_peripherals_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
omap_cfg_reg(H16_34XX_SDRC_CKE0); omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_cfg_reg(H17_34XX_SDRC_CKE1); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
} }
static void __init rx51_map_io(void) static void __init rx51_map_io(void)
......
...@@ -152,14 +152,20 @@ static struct regulator_init_data zoom_vsim = { ...@@ -152,14 +152,20 @@ static struct regulator_init_data zoom_vsim = {
static struct twl4030_hsmmc_info mmc[] __initdata = { static struct twl4030_hsmmc_info mmc[] __initdata = {
{ {
.name = "external",
.mmc = 1, .mmc = 1,
.wires = 4, .wires = 4,
.gpio_wp = -EINVAL, .gpio_wp = -EINVAL,
.power_saving = true,
}, },
{ {
.name = "internal",
.mmc = 2, .mmc = 2,
.wires = 4, .wires = 8,
.gpio_cd = -EINVAL,
.gpio_wp = -EINVAL, .gpio_wp = -EINVAL,
.nonremovable = true,
.power_saving = true,
}, },
{} /* Terminator */ {} /* Terminator */
}; };
...@@ -167,11 +173,8 @@ static struct twl4030_hsmmc_info mmc[] __initdata = { ...@@ -167,11 +173,8 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
static int zoom_twl_gpio_setup(struct device *dev, static int zoom_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio) unsigned gpio, unsigned ngpio)
{ {
/* gpio + 0 is "mmc0_cd" (input/IRQ), /* gpio + 0 is "mmc0_cd" (input/IRQ) */
* gpio + 1 is "mmc1_cd" (input/IRQ)
*/
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
mmc[1].gpio_cd = gpio + 1;
twl4030_mmc_init(mmc); twl4030_mmc_init(mmc);
/* link regulators to MMC adapters ... we "know" the /* link regulators to MMC adapters ... we "know" the
...@@ -236,6 +239,7 @@ static struct twl4030_platform_data zoom_twldata = { ...@@ -236,6 +239,7 @@ static struct twl4030_platform_data zoom_twldata = {
.gpio = &zoom_gpio_data, .gpio = &zoom_gpio_data,
.keypad = &zoom_kp_twl4030_data, .keypad = &zoom_kp_twl4030_data,
.codec = &zoom_codec_data, .codec = &zoom_codec_data,
.vmmc1 = &zoom_vmmc1,
.vmmc2 = &zoom_vmmc2, .vmmc2 = &zoom_vmmc2,
.vsim = &zoom_vsim, .vsim = &zoom_vsim,
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <mach/board-zoom.h> #include <mach/board-zoom.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
static void __init omap_zoom2_init_irq(void) static void __init omap_zoom2_init_irq(void)
...@@ -68,8 +69,17 @@ static struct twl4030_platform_data zoom2_twldata = { ...@@ -68,8 +69,17 @@ static struct twl4030_platform_data zoom2_twldata = {
#endif #endif
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap_zoom2_init(void) static void __init omap_zoom2_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
zoom_peripherals_init(); zoom_peripherals_init();
zoom_debugboard_init(); zoom_debugboard_init();
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <plat/common.h> #include <plat/common.h>
#include <plat/board.h> #include <plat/board.h>
#include "mux.h"
#include "sdram-hynix-h8mbx00u0mer-0em.h" #include "sdram-hynix-h8mbx00u0mer-0em.h"
static void __init omap_zoom_map_io(void) static void __init omap_zoom_map_io(void)
...@@ -42,8 +43,17 @@ static void __init omap_zoom_init_irq(void) ...@@ -42,8 +43,17 @@ static void __init omap_zoom_init_irq(void)
omap_gpio_init(); omap_gpio_init();
} }
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#else
#define board_mux NULL
#endif
static void __init omap_zoom_init(void) static void __init omap_zoom_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
zoom_peripherals_init(); zoom_peripherals_init();
zoom_debugboard_init(); zoom_debugboard_init();
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment