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

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/board-omap3evm.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:
30
30
#include <linux/usb/otg.h>
31
31
#include <linux/smsc911x.h>
32
32
 
 
33
#include <linux/wl12xx.h>
 
34
#include <linux/regulator/fixed.h>
33
35
#include <linux/regulator/machine.h>
34
36
#include <linux/mmc/host.h>
35
37
 
58
60
#define OMAP3EVM_ETHR_ID_REV    0x50
59
61
#define OMAP3EVM_ETHR_GPIO_IRQ  176
60
62
#define OMAP3EVM_SMSC911X_CS    5
 
63
/*
 
64
 * Eth Reset signal
 
65
 *      64 = Generation 1 (<=RevD)
 
66
 *      7 = Generation 2 (>=RevE)
 
67
 */
 
68
#define OMAP3EVM_GEN1_ETHR_GPIO_RST     64
 
69
#define OMAP3EVM_GEN2_ETHR_GPIO_RST     7
61
70
 
62
71
static u8 omap3_evm_version;
63
72
 
124
133
 
125
134
static inline void __init omap3evm_init_smsc911x(void)
126
135
{
127
 
        int eth_cs;
 
136
        int eth_cs, eth_rst;
128
137
        struct clk *l3ck;
129
138
        unsigned int rate;
130
139
 
 
140
        if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
 
141
                eth_rst = OMAP3EVM_GEN1_ETHR_GPIO_RST;
 
142
        else
 
143
                eth_rst = OMAP3EVM_GEN2_ETHR_GPIO_RST;
 
144
 
131
145
        eth_cs = OMAP3EVM_SMSC911X_CS;
132
146
 
133
147
        l3ck = clk_get(NULL, "l3_ck");
136
150
        else
137
151
                rate = clk_get_rate(l3ck);
138
152
 
 
153
        /* Configure ethernet controller reset gpio */
 
154
        if (cpu_is_omap3430()) {
 
155
                if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
 
156
                        pr_err(KERN_ERR "Failed to request %d for smsc911x\n",
 
157
                                        eth_rst);
 
158
                        return;
 
159
                }
 
160
 
 
161
                if (gpio_direction_output(eth_rst, 1) < 0) {
 
162
                        pr_err(KERN_ERR "Failed to set direction of %d for" \
 
163
                                        " smsc911x\n", eth_rst);
 
164
                        return;
 
165
                }
 
166
                /* reset pulse to ethernet controller*/
 
167
                usleep_range(150, 220);
 
168
                gpio_set_value(eth_rst, 0);
 
169
                usleep_range(150, 220);
 
170
                gpio_set_value(eth_rst, 1);
 
171
                usleep_range(1, 2);
 
172
        }
 
173
 
139
174
        if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
140
175
                printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
141
176
                        OMAP3EVM_ETHR_GPIO_IRQ);
235
270
        gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0);
236
271
 
237
272
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
238
 
                gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
 
273
                gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
239
274
        else
240
 
                gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
 
275
                gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
241
276
 
242
277
        lcd_enabled = 1;
243
278
        return 0;
248
283
        gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1);
249
284
 
250
285
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
251
 
                gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
 
286
                gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
252
287
        else
253
 
                gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
 
288
                gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
254
289
 
255
290
        lcd_enabled = 0;
256
291
}
289
324
                return -EINVAL;
290
325
        }
291
326
 
292
 
        gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
 
327
        gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
293
328
 
294
329
        dvi_enabled = 1;
295
330
        return 0;
297
332
 
298
333
static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
299
334
{
300
 
        gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
 
335
        gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
301
336
 
302
337
        dvi_enabled = 0;
303
338
}
328
363
        .default_device = &omap3_evm_lcd_device,
329
364
};
330
365
 
331
 
static struct platform_device omap3_evm_dss_device = {
332
 
        .name           = "omapdss",
333
 
        .id             = -1,
334
 
        .dev            = {
335
 
                .platform_data = &omap3_evm_dss_data,
336
 
        },
337
 
};
338
 
 
339
366
static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
340
367
        .supply                 = "vmmc",
341
368
};
381
408
                .gpio_cd        = -EINVAL,
382
409
                .gpio_wp        = 63,
383
410
        },
 
411
#ifdef CONFIG_WL12XX_PLATFORM_DATA
 
412
        {
 
413
                .name           = "wl1271",
 
414
                .mmc            = 2,
 
415
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
 
416
                .gpio_wp        = -EINVAL,
 
417
                .gpio_cd        = -EINVAL,
 
418
                .nonremovable   = true,
 
419
        },
 
420
#endif
384
421
        {}      /* Terminator */
385
422
};
386
423
 
411
448
static int omap3evm_twl_gpio_setup(struct device *dev,
412
449
                unsigned gpio, unsigned ngpio)
413
450
{
 
451
        int r;
 
452
 
414
453
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
415
454
        omap_mux_init_gpio(63, OMAP_PIN_INPUT);
416
455
        mmc[0].gpio_cd = gpio + 0;
426
465
         */
427
466
 
428
467
        /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
429
 
        gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
430
 
        gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
468
        r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
 
469
        if (!r)
 
470
                r = gpio_direction_output(gpio + TWL4030_GPIO_MAX,
 
471
                        (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0);
 
472
        if (r)
 
473
                printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
431
474
 
432
475
        /* gpio + 7 == DVI Enable */
433
476
        gpio_request(gpio + 7, "EN_DVI");
491
534
        .irq_line       = 1,
492
535
};
493
536
 
494
 
static struct twl4030_codec_audio_data omap3evm_audio_data = {
495
 
        .audio_mclk = 26000000,
496
 
};
 
537
static struct twl4030_codec_audio_data omap3evm_audio_data;
497
538
 
498
539
static struct twl4030_codec_data omap3evm_codec_data = {
499
540
        .audio_mclk = 26000000,
500
541
        .audio = &omap3evm_audio_data,
501
542
};
502
543
 
503
 
static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = {
504
 
        .supply         = "vdda_dac",
505
 
        .dev            = &omap3_evm_dss_device.dev,
506
 
};
 
544
static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
 
545
        REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
507
546
 
508
547
/* VDAC for DSS driving S-Video */
509
548
static struct regulator_init_data omap3_evm_vdac = {
521
560
};
522
561
 
523
562
/* VPLL2 for digital video outputs */
524
 
static struct regulator_consumer_supply omap3_evm_vpll2_supply =
525
 
        REGULATOR_SUPPLY("vdds_dsi", "omapdss");
 
563
static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
 
564
        REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
 
565
        REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
 
566
};
526
567
 
527
568
static struct regulator_init_data omap3_evm_vpll2 = {
528
569
        .constraints = {
534
575
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
535
576
                                        | REGULATOR_CHANGE_STATUS,
536
577
        },
537
 
        .num_consumer_supplies  = 1,
538
 
        .consumer_supplies      = &omap3_evm_vpll2_supply,
539
 
};
 
578
        .num_consumer_supplies  = ARRAY_SIZE(omap3_evm_vpll2_supplies),
 
579
        .consumer_supplies      = omap3_evm_vpll2_supplies,
 
580
};
 
581
 
 
582
/* ads7846 on SPI */
 
583
static struct regulator_consumer_supply omap3evm_vio_supply =
 
584
        REGULATOR_SUPPLY("vcc", "spi1.0");
 
585
 
 
586
/* VIO for ads7846 */
 
587
static struct regulator_init_data omap3evm_vio = {
 
588
        .constraints = {
 
589
                .min_uV                 = 1800000,
 
590
                .max_uV                 = 1800000,
 
591
                .apply_uV               = true,
 
592
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
 
593
                                        | REGULATOR_MODE_STANDBY,
 
594
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
 
595
                                        | REGULATOR_CHANGE_STATUS,
 
596
        },
 
597
        .num_consumer_supplies  = 1,
 
598
        .consumer_supplies      = &omap3evm_vio_supply,
 
599
};
 
600
 
 
601
#ifdef CONFIG_WL12XX_PLATFORM_DATA
 
602
 
 
603
#define OMAP3EVM_WLAN_PMENA_GPIO        (150)
 
604
#define OMAP3EVM_WLAN_IRQ_GPIO          (149)
 
605
 
 
606
static struct regulator_consumer_supply omap3evm_vmmc2_supply =
 
607
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
608
 
 
609
/* VMMC2 for driving the WL12xx module */
 
610
static struct regulator_init_data omap3evm_vmmc2 = {
 
611
        .constraints = {
 
612
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
 
613
        },
 
614
        .num_consumer_supplies  = 1,
 
615
        .consumer_supplies = &omap3evm_vmmc2_supply,
 
616
};
 
617
 
 
618
static struct fixed_voltage_config omap3evm_vwlan = {
 
619
        .supply_name            = "vwl1271",
 
620
        .microvolts             = 1800000, /* 1.80V */
 
621
        .gpio                   = OMAP3EVM_WLAN_PMENA_GPIO,
 
622
        .startup_delay          = 70000, /* 70ms */
 
623
        .enable_high            = 1,
 
624
        .enabled_at_boot        = 0,
 
625
        .init_data              = &omap3evm_vmmc2,
 
626
};
 
627
 
 
628
static struct platform_device omap3evm_wlan_regulator = {
 
629
        .name           = "reg-fixed-voltage",
 
630
        .id             = 1,
 
631
        .dev = {
 
632
                .platform_data  = &omap3evm_vwlan,
 
633
        },
 
634
};
 
635
 
 
636
struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
 
637
        .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO),
 
638
        .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
 
639
};
 
640
#endif
540
641
 
541
642
static struct twl4030_platform_data omap3evm_twldata = {
542
643
        .irq_base       = TWL4030_IRQ_BASE,
550
651
        .codec          = &omap3evm_codec_data,
551
652
        .vdac           = &omap3_evm_vdac,
552
653
        .vpll2          = &omap3_evm_vpll2,
 
654
        .vio            = &omap3evm_vio,
553
655
};
554
656
 
555
657
static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
625
727
static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
626
728
};
627
729
 
628
 
static void __init omap3_evm_init_irq(void)
 
730
static void __init omap3_evm_init_early(void)
629
731
{
630
 
        omap_board_config = omap3_evm_config;
631
 
        omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
632
732
        omap2_init_common_infrastructure();
633
733
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
634
 
        omap_init_irq();
635
734
}
636
735
 
637
 
static struct platform_device *omap3_evm_devices[] __initdata = {
638
 
        &omap3_evm_dss_device,
639
 
};
640
 
 
641
 
static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
642
 
 
643
 
        .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
644
 
        .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
645
 
        .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
 
736
static struct usbhs_omap_board_data usbhs_bdata __initdata = {
 
737
 
 
738
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
 
739
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
 
740
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
646
741
 
647
742
        .phy_reset  = true,
648
743
        /* PHY reset GPIO will be runtime programmed based on EVM version */
652
747
};
653
748
 
654
749
#ifdef CONFIG_OMAP_MUX
655
 
static struct omap_board_mux board_mux[] __initdata = {
656
 
        OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
657
 
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
658
 
                                OMAP_PIN_OFF_WAKEUPENABLE),
659
 
        OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
660
 
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW),
661
 
        { .reg_offset = OMAP_MUX_TERMINATOR },
662
 
};
 
750
static struct omap_board_mux omap35x_board_mux[] __initdata = {
 
751
        OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
 
752
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
 
753
                                OMAP_PIN_OFF_WAKEUPENABLE),
 
754
        OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
 
755
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
 
756
                                OMAP_PIN_OFF_WAKEUPENABLE),
 
757
        OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
 
758
                                OMAP_PIN_OFF_NONE),
 
759
        OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
 
760
                                OMAP_PIN_OFF_NONE),
 
761
#ifdef CONFIG_WL12XX_PLATFORM_DATA
 
762
        /* WLAN IRQ - GPIO 149 */
 
763
        OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
 
764
 
 
765
        /* WLAN POWER ENABLE - GPIO 150 */
 
766
        OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
 
767
 
 
768
        /* MMC2 SDIO pin muxes for WL12xx */
 
769
        OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
770
        OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
771
        OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
772
        OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
773
        OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
774
        OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
775
#endif
 
776
        { .reg_offset = OMAP_MUX_TERMINATOR },
 
777
};
 
778
 
 
779
static struct omap_board_mux omap36x_board_mux[] __initdata = {
 
780
        OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
 
781
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
 
782
                                OMAP_PIN_OFF_WAKEUPENABLE),
 
783
        OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
 
784
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
 
785
                                OMAP_PIN_OFF_WAKEUPENABLE),
 
786
        /* AM/DM37x EVM: DSS data bus muxed with sys_boot */
 
787
        OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
788
        OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
789
        OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
790
        OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
791
        OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
792
        OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
793
        OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
794
        OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
795
        OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
796
        OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
797
        OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
798
        OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 
799
#ifdef CONFIG_WL12XX_PLATFORM_DATA
 
800
        /* WLAN IRQ - GPIO 149 */
 
801
        OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
 
802
 
 
803
        /* WLAN POWER ENABLE - GPIO 150 */
 
804
        OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
 
805
 
 
806
        /* MMC2 SDIO pin muxes for WL12xx */
 
807
        OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
808
        OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
809
        OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
810
        OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
811
        OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
812
        OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
813
#endif
 
814
 
 
815
        { .reg_offset = OMAP_MUX_TERMINATOR },
 
816
};
 
817
#else
 
818
#define omap35x_board_mux       NULL
 
819
#define omap36x_board_mux       NULL
663
820
#endif
664
821
 
665
822
static struct omap_musb_board_data musb_board_data = {
671
828
static void __init omap3_evm_init(void)
672
829
{
673
830
        omap3_evm_get_revision();
674
 
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
831
 
 
832
        if (cpu_is_omap3630())
 
833
                omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
 
834
        else
 
835
                omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
 
836
 
 
837
        omap_board_config = omap3_evm_config;
 
838
        omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
675
839
 
676
840
        omap3_evm_i2c_init();
677
841
 
678
 
        platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
 
842
        omap_display_init(&omap3_evm_dss_data);
679
843
 
680
844
        spi_register_board_info(omap3evm_spi_board_info,
681
845
                                ARRAY_SIZE(omap3evm_spi_board_info));
700
864
 
701
865
                /* setup EHCI phy reset config */
702
866
                omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
703
 
                ehci_pdata.reset_gpio_port[1] = 21;
 
867
                usbhs_bdata.reset_gpio_port[1] = 21;
704
868
 
705
869
                /* EVM REV >= E can supply 500mA with EXTVBUS programming */
706
870
                musb_board_data.power = 500;
708
872
        } else {
709
873
                /* setup EHCI phy reset on MDC */
710
874
                omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
711
 
                ehci_pdata.reset_gpio_port[1] = 135;
 
875
                usbhs_bdata.reset_gpio_port[1] = 135;
712
876
        }
713
877
        usb_musb_init(&musb_board_data);
714
 
        usb_ehci_init(&ehci_pdata);
 
878
        usbhs_init(&usbhs_bdata);
715
879
        ads7846_dev_init();
716
880
        omap3evm_init_smsc911x();
717
881
        omap3_evm_display_init();
 
882
 
 
883
#ifdef CONFIG_WL12XX_PLATFORM_DATA
 
884
        /* WL12xx WLAN Init */
 
885
        if (wl12xx_set_platform_data(&omap3evm_wlan_data))
 
886
                pr_err("error setting wl12xx data\n");
 
887
        platform_device_register(&omap3evm_wlan_regulator);
 
888
#endif
718
889
}
719
890
 
720
891
MACHINE_START(OMAP3EVM, "OMAP3 EVM")
721
892
        /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
722
893
        .boot_params    = 0x80000100,
 
894
        .reserve        = omap_reserve,
723
895
        .map_io         = omap3_map_io,
724
 
        .reserve        = omap_reserve,
725
 
        .init_irq       = omap3_evm_init_irq,
 
896
        .init_early     = omap3_evm_init_early,
 
897
        .init_irq       = omap_init_irq,
726
898
        .init_machine   = omap3_evm_init,
727
899
        .timer          = &omap_timer,
728
900
MACHINE_END