Skip to content

Commit

Permalink
Merge branches 'omap1-upstream' and 'omap2-upstream' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell King authored and Russell King committed Oct 12, 2007
3 parents 58273e5 + 06767fb + 8777297 commit 92633b7
Show file tree
Hide file tree
Showing 52 changed files with 4,723 additions and 344 deletions.
399 changes: 205 additions & 194 deletions arch/arm/configs/omap_h2_1610_defconfig

Large diffs are not rendered by default.

1,073 changes: 1,073 additions & 0 deletions arch/arm/configs/omap_osk_5912_defconfig

Large diffs are not rendered by default.

38 changes: 33 additions & 5 deletions arch/arm/mach-omap1/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,39 @@ config MACH_OMAP_PALMTE
bool "Palm Tungsten E"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
Support for the Palm Tungsten E PDA. Currently only the LCD panel
is supported. To boot the kernel, you'll need a PalmOS compatible
bootloader; check out http://palmtelinux.sourceforge.net for more
information.
Say Y here if you have such a PDA, say NO otherwise.
Support for the Palm Tungsten E PDA. To boot the kernel, you'll
need a PalmOS compatible bootloader; check out
http://palmtelinux.sourceforge.net/ for more information.
Say Y here if you have this PDA model, say N otherwise.

config MACH_OMAP_PALMZ71
bool "Palm Zire71"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
Support for the Palm Zire71 PDA. To boot the kernel,
you'll need a PalmOS compatible bootloader; check out
http://hackndev.com/palm/z71 for more informations.
Say Y here if you have such a PDA, say N otherwise.

config MACH_OMAP_PALMTT
bool "Palm Tungsten|T"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
Support for the Palm Tungsten|T PDA. To boot the kernel, you'll
need a PalmOS compatible bootloader (Garux); check out
http://www.hackndev.com/palm/tt/ for more information.
Say Y here if you have this PDA model, say N otherwise.

config MACH_SX1
bool "Siemens SX1"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
Support for the Siemens SX1 phone. To boot the kernel,
you'll need a SX1 compatible bootloader; check out
http://forum.oslik.ru and
http://www.handhelds.org/moin/moin.cgi/SiemensSX1
for more information.
Say Y here if you have such a phone, say NO otherwise.

config MACH_NOKIA770
bool "Nokia 770"
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-omap1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o
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

ifeq ($(CONFIG_ARCH_OMAP15XX),y)
# Innovator-1510 FPGA
Expand Down
120 changes: 120 additions & 0 deletions arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/platform_device.h>

#include <asm/hardware.h>
Expand All @@ -23,6 +24,7 @@

#include <asm/arch/board-ams-delta.h>
#include <asm/arch/gpio.h>
#include <asm/arch/keypad.h>
#include <asm/arch/mux.h>
#include <asm/arch/usb.h>
#include <asm/arch/board.h>
Expand All @@ -31,6 +33,86 @@
static u8 ams_delta_latch1_reg;
static u16 ams_delta_latch2_reg;

static int ams_delta_keymap[] = {
KEY(0, 0, KEY_F1), /* Advert */

KEY(3, 0, KEY_COFFEE), /* Games */
KEY(2, 0, KEY_QUESTION), /* Directory */
KEY(3, 2, KEY_CONNECT), /* Internet */
KEY(2, 1, KEY_SHOP), /* Services */
KEY(1, 1, KEY_PHONE), /* VoiceMail */

KEY(1, 0, KEY_DELETE), /* Delete */
KEY(2, 2, KEY_PLAY), /* Play */
KEY(0, 1, KEY_PAGEUP), /* Up */
KEY(3, 1, KEY_PAGEDOWN), /* Down */
KEY(0, 2, KEY_EMAIL), /* ReadEmail */
KEY(1, 2, KEY_STOP), /* Stop */

/* Numeric keypad portion */
KEY(7, 0, KEY_KP1),
KEY(6, 0, KEY_KP2),
KEY(5, 0, KEY_KP3),
KEY(7, 1, KEY_KP4),
KEY(6, 1, KEY_KP5),
KEY(5, 1, KEY_KP6),
KEY(7, 2, KEY_KP7),
KEY(6, 2, KEY_KP8),
KEY(5, 2, KEY_KP9),
KEY(6, 3, KEY_KP0),
KEY(7, 3, KEY_KPASTERISK),
KEY(5, 3, KEY_KPDOT), /* # key */
KEY(2, 7, KEY_NUMLOCK), /* Mute */
KEY(1, 7, KEY_KPMINUS), /* Recall */
KEY(1, 6, KEY_KPPLUS), /* Redial */
KEY(6, 7, KEY_KPSLASH), /* Handsfree */
KEY(0, 6, KEY_ENTER), /* Video */

KEY(4, 7, KEY_CAMERA), /* Photo */

KEY(4, 0, KEY_F2), /* Home */
KEY(4, 1, KEY_F3), /* Office */
KEY(4, 2, KEY_F4), /* Mobile */
KEY(7, 7, KEY_F5), /* SMS */
KEY(5, 7, KEY_F6), /* Email */

/* QWERTY portion of keypad */
KEY(4, 3, KEY_Q),
KEY(3, 3, KEY_W),
KEY(2, 3, KEY_E),
KEY(1, 3, KEY_R),
KEY(0, 3, KEY_T),
KEY(7, 4, KEY_Y),
KEY(6, 4, KEY_U),
KEY(5, 4, KEY_I),
KEY(4, 4, KEY_O),
KEY(3, 4, KEY_P),

KEY(2, 4, KEY_A),
KEY(1, 4, KEY_S),
KEY(0, 4, KEY_D),
KEY(7, 5, KEY_F),
KEY(6, 5, KEY_G),
KEY(5, 5, KEY_H),
KEY(4, 5, KEY_J),
KEY(3, 5, KEY_K),
KEY(2, 5, KEY_L),

KEY(1, 5, KEY_Z),
KEY(0, 5, KEY_X),
KEY(7, 6, KEY_C),
KEY(6, 6, KEY_V),
KEY(5, 6, KEY_B),
KEY(4, 6, KEY_N),
KEY(3, 6, KEY_M),
KEY(2, 6, KEY_SPACE),

KEY(0, 7, KEY_LEFTSHIFT), /* Vol up */
KEY(3, 7, KEY_LEFTCTRL), /* Vol down */

0
};

void ams_delta_latch1_write(u8 mask, u8 value)
{
ams_delta_latch1_reg &= ~mask;
Expand Down Expand Up @@ -76,6 +158,10 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
}
};

static struct omap_lcd_config ams_delta_lcd_config __initdata = {
.ctrl_name = "internal",
};

static struct omap_uart_config ams_delta_uart_config __initdata = {
.enabled_uarts = 1,
};
Expand All @@ -87,16 +173,50 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
};

static struct omap_board_config_kernel ams_delta_config[] = {
{ OMAP_TAG_LCD, &ams_delta_lcd_config },
{ OMAP_TAG_UART, &ams_delta_uart_config },
{ OMAP_TAG_USB, &ams_delta_usb_config },
};

static struct resource ams_delta_kp_resources[] = {
[0] = {
.start = INT_KEYBOARD,
.end = INT_KEYBOARD,
.flags = IORESOURCE_IRQ,
},
};

static struct omap_kp_platform_data ams_delta_kp_data = {
.rows = 8,
.cols = 8,
.keymap = ams_delta_keymap,
.keymapsize = ARRAY_SIZE(ams_delta_keymap),
.delay = 9,
};

static struct platform_device ams_delta_kp_device = {
.name = "omap-keypad",
.id = -1,
.dev = {
.platform_data = &ams_delta_kp_data,
},
.num_resources = ARRAY_SIZE(ams_delta_kp_resources),
.resource = ams_delta_kp_resources,
};

static struct platform_device ams_delta_lcd_device = {
.name = "lcd_ams_delta",
.id = -1,
};

static struct platform_device ams_delta_led_device = {
.name = "ams-delta-led",
.id = -1
};

static struct platform_device *ams_delta_devices[] __initdata = {
&ams_delta_kp_device,
&ams_delta_lcd_device,
&ams_delta_led_device,
};

Expand Down
79 changes: 79 additions & 0 deletions arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,66 @@ static struct platform_device h2_nor_device = {
.resource = &h2_nor_resource,
};

#if 0 /* REVISIT: Enable when nand_platform_data is applied */

static struct mtd_partition h2_nand_partitions[] = {
#if 0
/* REVISIT: enable these partitions if you make NAND BOOT
* work on your H2 (rev C or newer); published versions of
* x-load only support P2 and H3.
*/
{
.name = "xloader",
.offset = 0,
.size = 64 * 1024,
.mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "bootloader",
.offset = MTDPART_OFS_APPEND,
.size = 256 * 1024,
.mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = 192 * 1024,
},
{
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = 2 * SZ_1M,
},
#endif
{
.name = "filesystem",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
},
};

/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
static struct nand_platform_data h2_nand_data = {
.options = NAND_SAMSUNG_LP_OPTIONS,
.parts = h2_nand_partitions,
.nr_parts = ARRAY_SIZE(h2_nand_partitions),
};

static struct resource h2_nand_resource = {
.flags = IORESOURCE_MEM,
};

static struct platform_device h2_nand_device = {
.name = "omapnand",
.id = 0,
.dev = {
.platform_data = &h2_nand_data,
},
.num_resources = 1,
.resource = &h2_nand_resource,
};
#endif

static struct resource h2_smc91x_resources[] = {
[0] = {
.start = OMAP1610_ETHR_START, /* Physical */
Expand Down Expand Up @@ -218,11 +278,15 @@ static struct resource h2_irda_resources[] = {
.flags = IORESOURCE_IRQ,
},
};

static u64 irda_dmamask = 0xffffffff;

static struct platform_device h2_irda_device = {
.name = "omapirda",
.id = 0,
.dev = {
.platform_data = &h2_irda_data,
.dma_mask = &irda_dmamask,
},
.num_resources = ARRAY_SIZE(h2_irda_resources),
.resource = h2_irda_resources,
Expand Down Expand Up @@ -270,6 +334,7 @@ static struct platform_device h2_mcbsp1_device = {

static struct platform_device *h2_devices[] __initdata = {
&h2_nor_device,
//&h2_nand_device,
&h2_smc91x_device,
&h2_irda_device,
&h2_kp_device,
Expand Down Expand Up @@ -333,6 +398,13 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
{ OMAP_TAG_LCD, &h2_lcd_config },
};

#define H2_NAND_RB_GPIO_PIN 62

static int h2_nand_dev_ready(struct nand_platform_data *data)
{
return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
}

static void __init h2_init(void)
{
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
Expand All @@ -347,6 +419,13 @@ static void __init h2_init(void)
h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
h2_nor_resource.end += SZ_32M - 1;

#if 0 /* REVISIT: Enable when nand_platform_data is applied */
h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
h2_nand_resource.end += SZ_4K - 1;
if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
h2_nand_data.dev_ready = h2_nand_dev_ready;
#endif

omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
omap_cfg_reg(M8_1610_FLASH_CS2B_WE);

Expand Down
Loading

0 comments on commit 92633b7

Please sign in to comment.