aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/spitz.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-12-14 13:23:03 -0500
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-12-14 13:23:03 -0500
commit559300bc0ef7ccd541656f1189d38e7088389559 (patch)
treecd1682881ca4246e9c5a1e8632be4bdd9d9706c6 /arch/arm/mach-pxa/spitz.c
parent5416bf33f92a4104dbcd6062bf377c8421ca3cfd (diff)
parent22763c5cf3690a681551162c15d34d935308c8d7 (diff)
Merge commit 'v2.6.32'
Conflicts: arch/avr32/mach-at32ap/include/mach/cpu.h
Diffstat (limited to 'arch/arm/mach-pxa/spitz.c')
-rw-r--r--arch/arm/mach-pxa/spitz.c80
1 files changed, 64 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index ee8d6038ce82..d98023f55503 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/gpio_keys.h>
18#include <linux/gpio.h> 19#include <linux/gpio.h>
19#include <linux/leds.h> 20#include <linux/leds.h>
20#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
@@ -375,6 +376,43 @@ static struct platform_device spitzkbd_device = {
375}; 376};
376 377
377 378
379static struct gpio_keys_button spitz_gpio_keys[] = {
380 {
381 .type = EV_PWR,
382 .code = KEY_SUSPEND,
383 .gpio = SPITZ_GPIO_ON_KEY,
384 .desc = "On/Off",
385 .wakeup = 1,
386 },
387 /* Two buttons detecting the lid state */
388 {
389 .type = EV_SW,
390 .code = 0,
391 .gpio = SPITZ_GPIO_SWA,
392 .desc = "Display Down",
393 },
394 {
395 .type = EV_SW,
396 .code = 1,
397 .gpio = SPITZ_GPIO_SWB,
398 .desc = "Lid Closed",
399 },
400};
401
402static struct gpio_keys_platform_data spitz_gpio_keys_platform_data = {
403 .buttons = spitz_gpio_keys,
404 .nbuttons = ARRAY_SIZE(spitz_gpio_keys),
405};
406
407static struct platform_device spitz_gpio_keys_device = {
408 .name = "gpio-keys",
409 .id = -1,
410 .dev = {
411 .platform_data = &spitz_gpio_keys_platform_data,
412 },
413};
414
415
378/* 416/*
379 * Spitz LEDs 417 * Spitz LEDs
380 */ 418 */
@@ -689,6 +727,7 @@ static struct platform_device sharpsl_rom_device = {
689static struct platform_device *devices[] __initdata = { 727static struct platform_device *devices[] __initdata = {
690 &spitzscoop_device, 728 &spitzscoop_device,
691 &spitzkbd_device, 729 &spitzkbd_device,
730 &spitz_gpio_keys_device,
692 &spitzled_device, 731 &spitzled_device,
693 &sharpsl_nand_device, 732 &sharpsl_nand_device,
694 &sharpsl_rom_device, 733 &sharpsl_rom_device,
@@ -740,11 +779,36 @@ static void __init common_init(void)
740 pxa_set_i2c_info(NULL); 779 pxa_set_i2c_info(NULL);
741} 780}
742 781
782#if defined(CONFIG_MACH_AKITA) || defined(CONFIG_MACH_BORZOI)
783static struct nand_bbt_descr sharpsl_akita_bbt = {
784 .options = 0,
785 .offs = 4,
786 .len = 1,
787 .pattern = scan_ff_pattern
788};
789
790static struct nand_ecclayout akita_oobinfo = {
791 .eccbytes = 24,
792 .eccpos = {
793 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11,
794 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
795 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37},
796 .oobfree = {{0x08, 0x09}}
797};
798#endif
799
743#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) 800#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
744static void __init spitz_init(void) 801static void __init spitz_init(void)
745{ 802{
746 spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON; 803 spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON;
747 804
805#ifdef CONFIG_MACH_BORZOI
806 if (machine_is_borzoi()) {
807 sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt;
808 sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo;
809 }
810#endif
811
748 platform_scoop_config = &spitz_pcmcia_config; 812 platform_scoop_config = &spitz_pcmcia_config;
749 813
750 common_init(); 814 common_init();
@@ -769,22 +833,6 @@ static struct i2c_board_info akita_i2c_board_info[] = {
769 }, 833 },
770}; 834};
771 835
772static struct nand_bbt_descr sharpsl_akita_bbt = {
773 .options = 0,
774 .offs = 4,
775 .len = 1,
776 .pattern = scan_ff_pattern
777};
778
779static struct nand_ecclayout akita_oobinfo = {
780 .eccbytes = 24,
781 .eccpos = {
782 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11,
783 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
784 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37},
785 .oobfree = {{0x08, 0x09}}
786};
787
788static void __init akita_init(void) 836static void __init akita_init(void)
789{ 837{
790 spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON; 838 spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON;