~ubuntu-branches/ubuntu/precise/linux-linaro-u8500/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): John Rigby, Upstream Fixes, Andy Green, John Rigby
  • Date: 2011-04-14 12:16:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110414121606-b77podkyqgr2oix7
Tags: 2.6.38-1002.3
[ Upstream Fixes ]

* MUSB: shutdown: Make sure block is awake before doing shutdown
  - LP: #745737
* Fixed gpio polarity of gpio USB-phy reset.
  - LP: #747639

[ Andy Green ]

* LINARO: SAUCE: disable CONFIG_OMAP_RESET_CLOCKS
  - LP: #752900

[ John Rigby ]

* Rebase to new upstreams:
  Linux v2.6.38.1
  linaro-linux-2.6.38-upstream-29Mar2011
  Ubuntu-2.6.38-7.35
* SAUCE: OMAP4: clock: wait for module to become accessible on
  a clk enable
  - LP: #745737
* Rebase to new upstreams:
  Linux v2.6.38.2
  linaro-linux-2.6.38-upstream-5Apr2011
  Ubuntu-2.6.38-8.41
  - LP: #732842
* Update configs for device tree, dvfs and lttng
* LINARO: add building of dtb's
* LINARO: SAUCE: Disable lowest operating freqs on omap34xx
  - LP: #732912

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <linux/usb/otg.h>
27
27
#include <linux/i2c/twl.h>
28
28
#include <linux/regulator/machine.h>
 
29
#include <linux/regulator/fixed.h>
 
30
#include <linux/wl12xx.h>
 
31
#include <linux/netdevice.h>
 
32
#include <linux/if_ether.h>
29
33
 
30
34
#include <mach/hardware.h>
31
35
#include <mach/omap4-common.h>
 
36
#include <mach/id.h>
32
37
#include <asm/mach-types.h>
33
38
#include <asm/mach/arch.h>
34
39
#include <asm/mach/map.h>
 
40
#include <plat/display.h>
35
41
 
36
42
#include <plat/board.h>
37
43
#include <plat/common.h>
46
52
 
47
53
#define GPIO_HUB_POWER          1
48
54
#define GPIO_HUB_NRESET         62
 
55
#define GPIO_WIFI_PMENA         43
 
56
#define GPIO_WIFI_IRQ           53
 
57
#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
 
58
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
 
59
 
 
60
/* wl127x BT, FM, GPS connectivity chip */
 
61
static int wl1271_gpios[] = {46, -1, -1};
 
62
static struct platform_device wl1271_device = {
 
63
        .name   = "kim",
 
64
        .id     = -1,
 
65
        .dev    = {
 
66
                .platform_data  = &wl1271_gpios,
 
67
        },
 
68
};
49
69
 
50
70
static struct gpio_led gpio_leds[] = {
51
71
        {
75
95
 
76
96
static struct platform_device *panda_devices[] __initdata = {
77
97
        &leds_gpio,
78
 
};
79
 
 
80
 
/* Display DVI */
81
 
#define PANDA_DVI_TFP410_POWER_DOWN_GPIO        0
82
 
 
83
 
static int panda_enable_dvi(struct omap_dss_device *dssdev)
84
 
{
85
 
        gpio_set_value(dssdev->reset_gpio, 1);
86
 
        return 0;
87
 
}
88
 
 
89
 
static void panda_disable_dvi(struct omap_dss_device *dssdev)
90
 
{
91
 
        gpio_set_value(dssdev->reset_gpio, 0);
92
 
}
93
 
 
94
 
/* Using generic display panel */
95
 
static struct panel_generic_dpi_data dvi_panel = {
96
 
        .name                   = "generic",
97
 
        .platform_enable        = panda_enable_dvi,
98
 
        .platform_disable       = panda_disable_dvi,
99
 
};
100
 
 
101
 
struct omap_dss_device panda_dvi_device = {
102
 
        .type                   = OMAP_DISPLAY_TYPE_DPI,
103
 
        .name                   = "dvi",
104
 
        .driver_name            = "generic_dpi_panel",
105
 
        .data                   = &dvi_panel,
106
 
        .phy.dpi.data_lines     = 24,
107
 
        .reset_gpio             = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
108
 
        .channel                = OMAP_DSS_CHANNEL_LCD2,
109
 
};
110
 
 
111
 
int __init panda_dvi_init(void)
112
 
{
113
 
        int r;
114
 
 
115
 
        /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
116
 
        r = gpio_request_one(panda_dvi_device.reset_gpio,
117
 
                                GPIOF_OUT_INIT_LOW, "DVI PD");
118
 
        if (r)
119
 
                pr_err("Failed to get DVI powerdown GPIO\n");
120
 
 
121
 
        return r;
122
 
}
123
 
 
124
 
static struct omap_dss_device *panda_dss_devices[] = {
125
 
        &panda_dvi_device,
126
 
};
127
 
 
128
 
static struct omap_dss_board_info panda_dss_data = {
129
 
        .num_devices    = ARRAY_SIZE(panda_dss_devices),
130
 
        .devices        = panda_dss_devices,
131
 
        .default_device = &panda_dvi_device,
132
 
};
133
 
 
134
 
static void __init omap4_panda_init_irq(void)
 
98
        &wl1271_device,
 
99
};
 
100
 
 
101
static void __init omap4_panda_init_early(void)
135
102
{
136
103
        omap2_init_common_infrastructure();
137
104
        omap2_init_common_devices(NULL, NULL);
138
 
        gic_init_irq();
139
105
}
140
106
 
141
 
static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
142
 
        .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
143
 
        .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
144
 
        .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
 
107
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 
108
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
 
109
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
 
110
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
145
111
        .phy_reset  = false,
146
112
        .reset_gpio_port[0]  = -EINVAL,
147
113
        .reset_gpio_port[1]  = -EINVAL,
183
149
        gpio_set_value(GPIO_HUB_NRESET, 0);
184
150
        gpio_set_value(GPIO_HUB_NRESET, 1);
185
151
 
186
 
        usb_ehci_init(&ehci_pdata);
 
152
        usbhs_init(&usbhs_bdata);
187
153
 
188
154
        /* enable power to hub */
189
155
        gpio_set_value(GPIO_HUB_POWER, 1);
208
174
        .phy_exit       = omap4430_phy_exit,
209
175
        .phy_power      = omap4430_phy_power,
210
176
        .phy_set_clock  = omap4430_phy_set_clk,
 
177
        .phy_suspend    = omap4430_phy_suspend,
211
178
};
212
179
 
213
180
static struct omap2_hsmmc_info mmc[] = {
217
184
                .gpio_wp        = -EINVAL,
218
185
                .gpio_cd        = -EINVAL,
219
186
        },
 
187
        {
 
188
                .name           = "wl1271",
 
189
                .mmc            = 5,
 
190
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
 
191
                .gpio_wp        = -EINVAL,
 
192
                .gpio_cd        = -EINVAL,
 
193
                .ocr_mask       = MMC_VDD_165_195,
 
194
                .nonremovable   = true,
 
195
        },
220
196
        {}      /* Terminator */
221
197
};
222
198
 
223
199
static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
224
200
        {
225
201
                .supply = "vmmc",
226
 
                .dev_name = "mmci-omap-hs.0",
227
 
        },
 
202
                .dev_name = "omap_hsmmc.0",
 
203
        },
 
204
};
 
205
 
 
206
static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
 
207
        .supply = "vmmc",
 
208
        .dev_name = "omap_hsmmc.4",
 
209
};
 
210
 
 
211
static struct regulator_init_data panda_vmmc5 = {
 
212
        .constraints = {
 
213
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
 
214
        },
 
215
        .num_consumer_supplies = 1,
 
216
        .consumer_supplies = &omap4_panda_vmmc5_supply,
 
217
};
 
218
 
 
219
static struct fixed_voltage_config panda_vwlan = {
 
220
        .supply_name = "vwl1271",
 
221
        .microvolts = 1800000, /* 1.8V */
 
222
        .gpio = GPIO_WIFI_PMENA,
 
223
        .startup_delay = 70000, /* 70msec */
 
224
        .enable_high = 1,
 
225
        .enabled_at_boot = 0,
 
226
        .init_data = &panda_vmmc5,
 
227
};
 
228
 
 
229
static struct platform_device omap_vwlan_device = {
 
230
        .name           = "reg-fixed-voltage",
 
231
        .id             = 1,
 
232
        .dev = {
 
233
                .platform_data = &panda_vwlan,
 
234
        },
 
235
};
 
236
 
 
237
struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
 
238
        .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
 
239
        /* PANDA ref clock is 38.4 MHz */
 
240
        .board_ref_clock = 2,
228
241
};
229
242
 
230
243
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
375
388
        },
376
389
};
377
390
 
 
391
static struct regulator_init_data omap4_panda_clk32kg = {
 
392
        .constraints = {
 
393
                .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
 
394
        },
 
395
};
 
396
 
378
397
static struct twl4030_platform_data omap4_panda_twldata = {
379
398
        .irq_base       = TWL6030_IRQ_BASE,
380
399
        .irq_end        = TWL6030_IRQ_END,
388
407
        .vusb           = &omap4_panda_vusb,
389
408
        .vaux2          = &omap4_panda_vaux2,
390
409
        .vaux3          = &omap4_panda_vaux3,
 
410
        .clk32kg        = &omap4_panda_clk32kg,
391
411
        .usb            = &omap4_usbphy_data,
392
412
};
393
413
 
431
451
 
432
452
#ifdef CONFIG_OMAP_MUX
433
453
static struct omap_board_mux board_mux[] __initdata = {
 
454
        /* WLAN IRQ - GPIO 53 */
 
455
        OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
 
456
        /* WLAN POWER ENABLE - GPIO 43 */
 
457
        OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
 
458
        /* WLAN SDIO: MMC5 CMD */
 
459
        OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
460
        /* WLAN SDIO: MMC5 CLK */
 
461
        OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
462
        /* WLAN SDIO: MMC5 DAT[0-3] */
 
463
        OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
464
        OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
465
        OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
 
466
        OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
434
467
        /* gpio 0 - TFP410 PD */
435
468
        OMAP4_MUX(KPD_COL1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
436
469
        /* dispc2_data23 */
491
524
        OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
492
525
        { .reg_offset = OMAP_MUX_TERMINATOR },
493
526
};
 
527
 
 
528
static struct omap_device_pad serial2_pads[] __initdata = {
 
529
        OMAP_MUX_STATIC("uart2_cts.uart2_cts",
 
530
                         OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 
531
        OMAP_MUX_STATIC("uart2_rts.uart2_rts",
 
532
                         OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 
533
        OMAP_MUX_STATIC("uart2_rx.uart2_rx",
 
534
                         OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 
535
        OMAP_MUX_STATIC("uart2_tx.uart2_tx",
 
536
                         OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 
537
};
 
538
 
 
539
static struct omap_device_pad serial3_pads[] __initdata = {
 
540
        OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
 
541
                         OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
 
542
        OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
 
543
                         OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 
544
        OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
 
545
                         OMAP_PIN_INPUT | OMAP_MUX_MODE0),
 
546
        OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
 
547
                         OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 
548
};
 
549
 
 
550
static struct omap_device_pad serial4_pads[] __initdata = {
 
551
        OMAP_MUX_STATIC("uart4_rx.uart4_rx",
 
552
                         OMAP_PIN_INPUT | OMAP_MUX_MODE0),
 
553
        OMAP_MUX_STATIC("uart4_tx.uart4_tx",
 
554
                         OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 
555
};
 
556
 
 
557
static struct omap_board_data serial2_data = {
 
558
        .id             = 1,
 
559
        .pads           = serial2_pads,
 
560
        .pads_cnt       = ARRAY_SIZE(serial2_pads),
 
561
};
 
562
 
 
563
static struct omap_board_data serial3_data = {
 
564
        .id             = 2,
 
565
        .pads           = serial3_pads,
 
566
        .pads_cnt       = ARRAY_SIZE(serial3_pads),
 
567
};
 
568
 
 
569
static struct omap_board_data serial4_data = {
 
570
        .id             = 3,
 
571
        .pads           = serial4_pads,
 
572
        .pads_cnt       = ARRAY_SIZE(serial4_pads),
 
573
};
 
574
 
 
575
static inline void board_serial_init(void)
 
576
{
 
577
        struct omap_board_data bdata;
 
578
        bdata.flags     = 0;
 
579
        bdata.pads      = NULL;
 
580
        bdata.pads_cnt  = 0;
 
581
        bdata.id        = 0;
 
582
        /* pass dummy data for UART1 */
 
583
        omap_serial_init_port(&bdata);
 
584
 
 
585
        omap_serial_init_port(&serial2_data);
 
586
        omap_serial_init_port(&serial3_data);
 
587
        omap_serial_init_port(&serial4_data);
 
588
}
494
589
#else
495
590
#define board_mux       NULL
 
591
 
 
592
static inline void board_serial_init(void)
 
593
{
 
594
        omap_serial_init();
 
595
}
496
596
#endif
497
597
 
 
598
/* Display DVI */
 
599
#define PANDA_DVI_TFP410_POWER_DOWN_GPIO        0
 
600
 
 
601
static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev)
 
602
{
 
603
        gpio_set_value(dssdev->reset_gpio, 1);
 
604
        return 0;
 
605
}
 
606
 
 
607
static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev)
 
608
{
 
609
        gpio_set_value(dssdev->reset_gpio, 0);
 
610
}
 
611
 
 
612
/* Using generic display panel */
 
613
static struct panel_generic_dpi_data omap4_dvi_panel = {
 
614
        .name                   = "generic",
 
615
        .platform_enable        = omap4_panda_enable_dvi,
 
616
        .platform_disable       = omap4_panda_disable_dvi,
 
617
};
 
618
 
 
619
struct omap_dss_device omap4_panda_dvi_device = {
 
620
        .type                   = OMAP_DISPLAY_TYPE_DPI,
 
621
        .name                   = "dvi",
 
622
        .driver_name            = "generic_dpi_panel",
 
623
        .data                   = &omap4_dvi_panel,
 
624
        .phy.dpi.data_lines     = 24,
 
625
        .reset_gpio             = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
 
626
        .channel                = OMAP_DSS_CHANNEL_LCD2,
 
627
};
 
628
 
 
629
int __init omap4_panda_dvi_init(void)
 
630
{
 
631
        int r;
 
632
 
 
633
        /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
 
634
        r = gpio_request_one(omap4_panda_dvi_device.reset_gpio,
 
635
                                GPIOF_OUT_INIT_LOW, "DVI PD");
 
636
        if (r)
 
637
                pr_err("Failed to get DVI powerdown GPIO\n");
 
638
 
 
639
        return r;
 
640
}
 
641
 
 
642
 
 
643
static void omap4_panda_hdmi_mux_init(void)
 
644
{
 
645
        /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
 
646
        omap_mux_init_signal("hdmi_hpd",
 
647
                        OMAP_PIN_INPUT_PULLUP);
 
648
        omap_mux_init_signal("hdmi_cec",
 
649
                        OMAP_PIN_INPUT_PULLUP);
 
650
        /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
 
651
        omap_mux_init_signal("hdmi_ddc_scl",
 
652
                        OMAP_PIN_INPUT_PULLUP);
 
653
        omap_mux_init_signal("hdmi_ddc_sda",
 
654
                        OMAP_PIN_INPUT_PULLUP);
 
655
}
 
656
 
 
657
static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev)
 
658
{
 
659
        int status;
 
660
 
 
661
        status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH,
 
662
                                                        "hdmi_gpio_hpd");
 
663
        if (status) {
 
664
                pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD);
 
665
                return status;
 
666
        }
 
667
        status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH,
 
668
                                                        "hdmi_gpio_ls_oe");
 
669
        if (status) {
 
670
                pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE);
 
671
                goto error1;
 
672
        }
 
673
 
 
674
        return 0;
 
675
 
 
676
error1:
 
677
        gpio_free(HDMI_GPIO_HPD);
 
678
 
 
679
        return status;
 
680
}
 
681
 
 
682
static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev)
 
683
{
 
684
        gpio_free(HDMI_GPIO_LS_OE);
 
685
        gpio_free(HDMI_GPIO_HPD);
 
686
}
 
687
 
 
688
static struct omap_dss_device  omap4_panda_hdmi_device = {
 
689
        .name = "hdmi",
 
690
        .driver_name = "hdmi_panel",
 
691
        .type = OMAP_DISPLAY_TYPE_HDMI,
 
692
        .platform_enable = omap4_panda_panel_enable_hdmi,
 
693
        .platform_disable = omap4_panda_panel_disable_hdmi,
 
694
        .channel = OMAP_DSS_CHANNEL_DIGIT,
 
695
};
 
696
 
 
697
static struct omap_dss_device *omap4_panda_dss_devices[] = {
 
698
        &omap4_panda_dvi_device,
 
699
        &omap4_panda_hdmi_device,
 
700
};
 
701
 
 
702
static struct omap_dss_board_info omap4_panda_dss_data = {
 
703
        .num_devices    = ARRAY_SIZE(omap4_panda_dss_devices),
 
704
        .devices        = omap4_panda_dss_devices,
 
705
        .default_device = &omap4_panda_dvi_device,
 
706
};
 
707
 
 
708
void omap4_panda_display_init(void)
 
709
{
 
710
        int r;
 
711
 
 
712
        r = omap4_panda_dvi_init();
 
713
        if (r)
 
714
                pr_err("error initializing panda DVI\n");
 
715
 
 
716
        omap4_panda_hdmi_mux_init();
 
717
        omap_display_init(&omap4_panda_dss_data);
 
718
}
 
719
 
 
720
/*
 
721
 * These device paths represent the onboard USB <-> Ethernet bridge, and
 
722
 * the WLAN module on Panda, both of which need their random or all-zeros
 
723
 * mac address replacing with a per-cpu stable generated one
 
724
 */
 
725
static const char * const panda_fixup_mac_device_paths[] = {
 
726
        "usb1/1-1/1-1.1/1-1.1:1.0",
 
727
        "mmc1:0001:2",
 
728
};
 
729
 
 
730
static int panda_device_path_need_mac(struct device *dev)
 
731
{
 
732
        const char **try = panda_fixup_mac_device_paths;
 
733
        const char *path;
 
734
        int count = ARRAY_SIZE(panda_fixup_mac_device_paths);
 
735
        const char *p;
 
736
        int len;
 
737
        struct device *devn;
 
738
 
 
739
        while (count--) {
 
740
 
 
741
                p = *try + strlen(*try);
 
742
                devn = dev;
 
743
 
 
744
                while (devn) {
 
745
 
 
746
                        path = dev_name(devn);
 
747
                        len = strlen(path);
 
748
 
 
749
                        if ((p - *try) < len) {
 
750
                                devn = NULL;
 
751
                                continue;
 
752
                        }
 
753
 
 
754
                        p -= len;
 
755
 
 
756
                        if (strncmp(path, p, len)) {
 
757
                                devn = NULL;
 
758
                                continue;
 
759
                        }
 
760
 
 
761
                        devn = devn->parent;
 
762
                        if (p == *try)
 
763
                                return count;
 
764
 
 
765
                        if (devn != NULL && (p - *try) < 2)
 
766
                                devn = NULL;
 
767
 
 
768
                        p--;
 
769
                        if (devn != NULL && *p != '/')
 
770
                                devn = NULL;
 
771
                }
 
772
 
 
773
                try++;
 
774
        }
 
775
 
 
776
        return -ENOENT;
 
777
}
 
778
 
 
779
static int omap_panda_netdev_event(struct notifier_block *this,
 
780
                                                 unsigned long event, void *ptr)
 
781
{
 
782
        struct net_device *dev = ptr;
 
783
        struct sockaddr sa;
 
784
        int n;
 
785
 
 
786
        if (event != NETDEV_REGISTER)
 
787
                return NOTIFY_DONE;
 
788
 
 
789
        n = panda_device_path_need_mac(dev->dev.parent);
 
790
        if (n >= 0) {
 
791
                sa.sa_family = dev->type;
 
792
                omap2_die_id_to_ethernet_mac(sa.sa_data, n);
 
793
                dev->netdev_ops->ndo_set_mac_address(dev, &sa);
 
794
        }
 
795
 
 
796
        return NOTIFY_DONE;
 
797
}
 
798
 
 
799
static struct notifier_block omap_panda_netdev_notifier = {
 
800
        .notifier_call = omap_panda_netdev_event,
 
801
        .priority = 1,
 
802
};
 
803
 
498
804
static void __init omap4_panda_init(void)
499
805
{
500
806
        int package = OMAP_PACKAGE_CBS;
501
 
        int err;
502
807
 
503
808
        if (omap_rev() == OMAP4430_REV_ES1_0)
504
809
                package = OMAP_PACKAGE_CBL;
505
810
        omap4_mux_init(board_mux, package);
506
811
 
 
812
        if (wl12xx_set_platform_data(&omap_panda_wlan_data))
 
813
                pr_err("error setting wl12xx data\n");
 
814
 
 
815
        register_netdevice_notifier(&omap_panda_netdev_notifier);
 
816
 
507
817
        omap4_panda_i2c_init();
508
818
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
509
 
        omap_serial_init();
 
819
        platform_device_register(&omap_vwlan_device);
 
820
        board_serial_init();
510
821
        omap4_twl6030_hsmmc_init(mmc);
511
822
        omap4_ehci_init();
512
823
        usb_musb_init(&musb_board_data);
513
 
 
514
 
        /* Enabling DVI Display */
515
 
        err = panda_dvi_init();
516
 
        if (!err)
517
 
                omap_display_init(&panda_dss_data);
 
824
        omap4_panda_display_init();
518
825
}
519
826
 
520
827
static void __init omap4_panda_map_io(void)
523
830
        omap44xx_map_common_io();
524
831
}
525
832
 
 
833
static const char *omap4_panda_match[] __initdata = {
 
834
        "ti,omap4-panda",
 
835
        NULL,
 
836
};
 
837
 
526
838
MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
527
839
        /* Maintainer: David Anders - Texas Instruments Inc */
528
840
        .boot_params    = 0x80000100,
529
841
        .reserve        = omap_reserve,
530
842
        .map_io         = omap4_panda_map_io,
531
 
        .init_irq       = omap4_panda_init_irq,
 
843
        .init_early     = omap4_panda_init_early,
 
844
        .init_irq       = gic_init_irq,
532
845
        .init_machine   = omap4_panda_init,
533
846
        .timer          = &omap_timer,
 
847
        .dt_compat      = omap4_panda_match,
534
848
MACHINE_END