~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/board-3430sdp.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
307
307
        .default_device = &sdp3430_lcd_device,
308
308
};
309
309
 
310
 
static struct platform_device sdp3430_dss_device = {
311
 
        .name           = "omapdss",
312
 
        .id             = -1,
313
 
        .dev            = {
314
 
                .platform_data = &sdp3430_dss_data,
315
 
        },
316
 
};
317
 
 
318
 
static struct regulator_consumer_supply sdp3430_vdda_dac_supply = {
319
 
        .supply         = "vdda_dac",
320
 
        .dev            = &sdp3430_dss_device.dev,
321
 
};
322
 
 
323
 
static struct platform_device *sdp3430_devices[] __initdata = {
324
 
        &sdp3430_dss_device,
325
 
};
326
 
 
327
310
static struct omap_board_config_kernel sdp3430_config[] __initdata = {
328
311
};
329
312
 
330
 
static void __init omap_3430sdp_init_irq(void)
 
313
static void __init omap_3430sdp_init_early(void)
331
314
{
332
 
        omap_board_config = sdp3430_config;
333
 
        omap_board_config_size = ARRAY_SIZE(sdp3430_config);
334
 
        omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
335
315
        omap2_init_common_infrastructure();
336
316
        omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
337
 
        omap_init_irq();
338
317
}
339
318
 
340
319
static int sdp3430_batt_table[] = {
370
349
        {}      /* Terminator */
371
350
};
372
351
 
373
 
static struct regulator_consumer_supply sdp3430_vmmc1_supply = {
374
 
        .supply                 = "vmmc",
375
 
};
376
 
 
377
 
static struct regulator_consumer_supply sdp3430_vsim_supply = {
378
 
        .supply                 = "vmmc_aux",
379
 
};
380
 
 
381
 
static struct regulator_consumer_supply sdp3430_vmmc2_supply = {
382
 
        .supply                 = "vmmc",
383
 
};
384
 
 
385
352
static int sdp3430_twl_gpio_setup(struct device *dev,
386
353
                unsigned gpio, unsigned ngpio)
387
354
{
392
359
        mmc[1].gpio_cd = gpio + 1;
393
360
        omap2_hsmmc_init(mmc);
394
361
 
395
 
        /* link regulators to MMC adapters ... we "know" the
396
 
         * regulators will be set up only *after* we return.
397
 
         */
398
 
        sdp3430_vmmc1_supply.dev = mmc[0].dev;
399
 
        sdp3430_vsim_supply.dev = mmc[0].dev;
400
 
        sdp3430_vmmc2_supply.dev = mmc[1].dev;
401
 
 
402
362
        /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
403
363
        gpio_request(gpio + 7, "sub_lcd_en_bkl");
404
364
        gpio_direction_output(gpio + 7, 0);
427
387
        .irq_line       = 1,
428
388
};
429
389
 
 
390
/* regulator consumer mappings */
 
391
 
 
392
/* ads7846 on SPI */
 
393
static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
 
394
        REGULATOR_SUPPLY("vcc", "spi1.0"),
 
395
};
 
396
 
 
397
static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
 
398
        REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
 
399
};
 
400
 
 
401
/* VPLL2 for digital video outputs */
 
402
static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
 
403
        REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
 
404
        REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
 
405
};
 
406
 
 
407
static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
 
408
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 
409
};
 
410
 
 
411
static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {
 
412
        REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 
413
};
 
414
 
 
415
static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {
 
416
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 
417
};
 
418
 
430
419
/*
431
420
 * Apply all the fixed voltages since most versions of U-Boot
432
421
 * don't bother with that initialization.
469
458
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
470
459
                                        | REGULATOR_CHANGE_STATUS,
471
460
        },
 
461
        .num_consumer_supplies          = ARRAY_SIZE(sdp3430_vaux3_supplies),
 
462
        .consumer_supplies              = sdp3430_vaux3_supplies,
472
463
};
473
464
 
474
465
/* VAUX4 for OMAP VDD_CSI2 (camera) */
495
486
                                        | REGULATOR_CHANGE_MODE
496
487
                                        | REGULATOR_CHANGE_STATUS,
497
488
        },
498
 
        .num_consumer_supplies  = 1,
499
 
        .consumer_supplies      = &sdp3430_vmmc1_supply,
 
489
        .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vmmc1_supplies),
 
490
        .consumer_supplies      = sdp3430_vmmc1_supplies,
500
491
};
501
492
 
502
493
/* VMMC2 for MMC2 card */
510
501
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
511
502
                                        | REGULATOR_CHANGE_STATUS,
512
503
        },
513
 
        .num_consumer_supplies  = 1,
514
 
        .consumer_supplies      = &sdp3430_vmmc2_supply,
 
504
        .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vmmc2_supplies),
 
505
        .consumer_supplies      = sdp3430_vmmc2_supplies,
515
506
};
516
507
 
517
508
/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
525
516
                                        | REGULATOR_CHANGE_MODE
526
517
                                        | REGULATOR_CHANGE_STATUS,
527
518
        },
528
 
        .num_consumer_supplies  = 1,
529
 
        .consumer_supplies      = &sdp3430_vsim_supply,
 
519
        .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vsim_supplies),
 
520
        .consumer_supplies      = sdp3430_vsim_supplies,
530
521
};
531
522
 
532
523
/* VDAC for DSS driving S-Video */
540
531
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
541
532
                                        | REGULATOR_CHANGE_STATUS,
542
533
        },
543
 
        .num_consumer_supplies  = 1,
544
 
        .consumer_supplies      = &sdp3430_vdda_dac_supply,
545
 
};
546
 
 
547
 
/* VPLL2 for digital video outputs */
548
 
static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
549
 
        {
550
 
                .supply         = "vdds_dsi",
551
 
                .dev            = &sdp3430_dss_device.dev,
552
 
        }
 
534
        .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
 
535
        .consumer_supplies      = sdp3430_vdda_dac_supplies,
553
536
};
554
537
 
555
538
static struct regulator_init_data sdp3430_vpll2 = {
567
550
        .consumer_supplies      = sdp3430_vpll2_supplies,
568
551
};
569
552
 
570
 
static struct twl4030_codec_audio_data sdp3430_audio = {
571
 
        .audio_mclk = 26000000,
572
 
};
 
553
static struct twl4030_codec_audio_data sdp3430_audio;
573
554
 
574
555
static struct twl4030_codec_data sdp3430_codec = {
575
556
        .audio_mclk = 26000000,
653
634
                OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
654
635
}
655
636
 
656
 
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
 
637
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
657
638
 
658
 
        .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
659
 
        .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
660
 
        .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
 
639
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
 
640
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
 
641
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
661
642
 
662
643
        .phy_reset  = true,
663
644
        .reset_gpio_port[0]  = 57,
669
650
static struct omap_board_mux board_mux[] __initdata = {
670
651
        { .reg_offset = OMAP_MUX_TERMINATOR },
671
652
};
 
653
 
 
654
static struct omap_device_pad serial1_pads[] __initdata = {
 
655
        /*
 
656
         * Note that off output enable is an active low
 
657
         * signal. So setting this means pin is a
 
658
         * input enabled in off mode
 
659
         */
 
660
        OMAP_MUX_STATIC("uart1_cts.uart1_cts",
 
661
                         OMAP_PIN_INPUT |
 
662
                         OMAP_PIN_OFF_INPUT_PULLDOWN |
 
663
                         OMAP_OFFOUT_EN |
 
664
                         OMAP_MUX_MODE0),
 
665
        OMAP_MUX_STATIC("uart1_rts.uart1_rts",
 
666
                         OMAP_PIN_OUTPUT |
 
667
                         OMAP_OFF_EN |
 
668
                         OMAP_MUX_MODE0),
 
669
        OMAP_MUX_STATIC("uart1_rx.uart1_rx",
 
670
                         OMAP_PIN_INPUT |
 
671
                         OMAP_PIN_OFF_INPUT_PULLDOWN |
 
672
                         OMAP_OFFOUT_EN |
 
673
                         OMAP_MUX_MODE0),
 
674
        OMAP_MUX_STATIC("uart1_tx.uart1_tx",
 
675
                         OMAP_PIN_OUTPUT |
 
676
                         OMAP_OFF_EN |
 
677
                         OMAP_MUX_MODE0),
 
678
};
 
679
 
 
680
static struct omap_device_pad serial2_pads[] __initdata = {
 
681
        OMAP_MUX_STATIC("uart2_cts.uart2_cts",
 
682
                         OMAP_PIN_INPUT_PULLUP |
 
683
                         OMAP_PIN_OFF_INPUT_PULLDOWN |
 
684
                         OMAP_OFFOUT_EN |
 
685
                         OMAP_MUX_MODE0),
 
686
        OMAP_MUX_STATIC("uart2_rts.uart2_rts",
 
687
                         OMAP_PIN_OUTPUT |
 
688
                         OMAP_OFF_EN |
 
689
                         OMAP_MUX_MODE0),
 
690
        OMAP_MUX_STATIC("uart2_rx.uart2_rx",
 
691
                         OMAP_PIN_INPUT |
 
692
                         OMAP_PIN_OFF_INPUT_PULLDOWN |
 
693
                         OMAP_OFFOUT_EN |
 
694
                         OMAP_MUX_MODE0),
 
695
        OMAP_MUX_STATIC("uart2_tx.uart2_tx",
 
696
                         OMAP_PIN_OUTPUT |
 
697
                         OMAP_OFF_EN |
 
698
                         OMAP_MUX_MODE0),
 
699
};
 
700
 
 
701
static struct omap_device_pad serial3_pads[] __initdata = {
 
702
        OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
 
703
                         OMAP_PIN_INPUT_PULLDOWN |
 
704
                         OMAP_PIN_OFF_INPUT_PULLDOWN |
 
705
                         OMAP_OFFOUT_EN |
 
706
                         OMAP_MUX_MODE0),
 
707
        OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
 
708
                         OMAP_PIN_OUTPUT |
 
709
                         OMAP_OFF_EN |
 
710
                         OMAP_MUX_MODE0),
 
711
        OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
 
712
                         OMAP_PIN_INPUT |
 
713
                         OMAP_PIN_OFF_INPUT_PULLDOWN |
 
714
                         OMAP_OFFOUT_EN |
 
715
                         OMAP_MUX_MODE0),
 
716
        OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
 
717
                         OMAP_PIN_OUTPUT |
 
718
                         OMAP_OFF_EN |
 
719
                         OMAP_MUX_MODE0),
 
720
};
 
721
 
 
722
static struct omap_board_data serial1_data = {
 
723
        .id             = 0,
 
724
        .pads           = serial1_pads,
 
725
        .pads_cnt       = ARRAY_SIZE(serial1_pads),
 
726
};
 
727
 
 
728
static struct omap_board_data serial2_data = {
 
729
        .id             = 1,
 
730
        .pads           = serial2_pads,
 
731
        .pads_cnt       = ARRAY_SIZE(serial2_pads),
 
732
};
 
733
 
 
734
static struct omap_board_data serial3_data = {
 
735
        .id             = 2,
 
736
        .pads           = serial3_pads,
 
737
        .pads_cnt       = ARRAY_SIZE(serial3_pads),
 
738
};
 
739
 
 
740
static inline void board_serial_init(void)
 
741
{
 
742
        omap_serial_init_port(&serial1_data);
 
743
        omap_serial_init_port(&serial2_data);
 
744
        omap_serial_init_port(&serial3_data);
 
745
}
 
746
#else
 
747
#define board_mux       NULL
 
748
 
 
749
static inline void board_serial_init(void)
 
750
{
 
751
        omap_serial_init();
 
752
}
672
753
#endif
673
754
 
674
755
/*
800
881
static void __init omap_3430sdp_init(void)
801
882
{
802
883
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
884
        omap_board_config = sdp3430_config;
 
885
        omap_board_config_size = ARRAY_SIZE(sdp3430_config);
 
886
        omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
803
887
        omap3430_i2c_init();
804
 
        platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
 
888
        omap_display_init(&sdp3430_dss_data);
805
889
        if (omap_rev() > OMAP3430_REV_ES1_0)
806
890
                ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
807
891
        else
810
894
        spi_register_board_info(sdp3430_spi_board_info,
811
895
                                ARRAY_SIZE(sdp3430_spi_board_info));
812
896
        ads7846_dev_init();
813
 
        omap_serial_init();
 
897
        board_serial_init();
814
898
        usb_musb_init(&musb_board_data);
815
899
        board_smc91x_init();
816
 
        board_flash_init(sdp_flash_partitions, chip_sel_3430);
 
900
        board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
817
901
        sdp3430_display_init();
818
902
        enable_board_wakeup_source();
819
 
        usb_ehci_init(&ehci_pdata);
 
903
        usbhs_init(&usbhs_bdata);
820
904
}
821
905
 
822
906
MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
823
907
        /* Maintainer: Syed Khasim - Texas Instruments Inc */
824
908
        .boot_params    = 0x80000100,
 
909
        .reserve        = omap_reserve,
825
910
        .map_io         = omap3_map_io,
826
 
        .reserve        = omap_reserve,
827
 
        .init_irq       = omap_3430sdp_init_irq,
 
911
        .init_early     = omap_3430sdp_init_early,
 
912
        .init_irq       = omap_init_irq,
828
913
        .init_machine   = omap_3430sdp_init,
829
914
        .timer          = &omap_timer,
830
915
MACHINE_END