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

« back to all changes in this revision

Viewing changes to arch/arm/mach-mx3/mach-mx31lilly.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:
24
24
#include <linux/init.h>
25
25
#include <linux/clk.h>
26
26
#include <linux/gpio.h>
 
27
#include <linux/delay.h>
27
28
#include <linux/platform_device.h>
28
29
#include <linux/interrupt.h>
29
30
#include <linux/smsc911x.h>
110
111
 
111
112
/* USB */
112
113
 
113
 
#if defined(CONFIG_USB_ULPI)
114
 
 
115
114
#define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \
116
115
                        PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
117
116
 
118
 
static int usbotg_init(struct platform_device *pdev)
119
 
{
120
 
        unsigned int pins[] = {
121
 
                MX31_PIN_USBOTG_DATA0__USBOTG_DATA0,
122
 
                MX31_PIN_USBOTG_DATA1__USBOTG_DATA1,
123
 
                MX31_PIN_USBOTG_DATA2__USBOTG_DATA2,
124
 
                MX31_PIN_USBOTG_DATA3__USBOTG_DATA3,
125
 
                MX31_PIN_USBOTG_DATA4__USBOTG_DATA4,
126
 
                MX31_PIN_USBOTG_DATA5__USBOTG_DATA5,
127
 
                MX31_PIN_USBOTG_DATA6__USBOTG_DATA6,
128
 
                MX31_PIN_USBOTG_DATA7__USBOTG_DATA7,
129
 
                MX31_PIN_USBOTG_CLK__USBOTG_CLK,
130
 
                MX31_PIN_USBOTG_DIR__USBOTG_DIR,
131
 
                MX31_PIN_USBOTG_NXT__USBOTG_NXT,
132
 
                MX31_PIN_USBOTG_STP__USBOTG_STP,
133
 
        };
134
 
 
135
 
        mxc_iomux_setup_multiple_pins(pins, ARRAY_SIZE(pins), "USB OTG");
136
 
 
137
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG);
138
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG);
139
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG);
140
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, USB_PAD_CFG);
141
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, USB_PAD_CFG);
142
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, USB_PAD_CFG);
143
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, USB_PAD_CFG);
144
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, USB_PAD_CFG);
145
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, USB_PAD_CFG);
146
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, USB_PAD_CFG);
147
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG);
148
 
        mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG);
149
 
 
150
 
        mxc_iomux_set_gpr(MUX_PGP_USB_4WIRE, true);
151
 
        mxc_iomux_set_gpr(MUX_PGP_USB_COMMON, true);
152
 
 
153
 
        /* chip select */
154
 
        mxc_iomux_alloc_pin(IOMUX_MODE(MX31_PIN_DTR_DCE2, IOMUX_CONFIG_GPIO),
155
 
                                "USBOTG_CS");
156
 
        gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS");
157
 
        gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0);
158
 
 
159
 
        return 0;
160
 
}
161
 
 
162
117
static int usbh1_init(struct platform_device *pdev)
163
118
{
164
119
        int pins[] = {
183
138
 
184
139
        mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true);
185
140
 
186
 
        return 0;
 
141
        mdelay(10);
 
142
 
 
143
        return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
 
144
                        MXC_EHCI_INTERFACE_SINGLE_UNI);
187
145
}
188
146
 
189
147
static int usbh2_init(struct platform_device *pdev)
220
178
        gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
221
179
        gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
222
180
 
223
 
        return 0;
 
181
        mdelay(10);
 
182
 
 
183
        return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
224
184
}
225
185
 
226
 
static struct mxc_usbh_platform_data usbotg_pdata = {
227
 
        .init   = usbotg_init,
228
 
        .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
229
 
        .flags  = MXC_EHCI_POWER_PINS_ENABLED,
230
 
};
231
 
 
232
186
static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
233
187
        .init   = usbh1_init,
234
188
        .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
235
 
        .flags  = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
236
189
};
237
190
 
238
191
static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
239
192
        .init   = usbh2_init,
240
193
        .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
241
 
        .flags  = MXC_EHCI_POWER_PINS_ENABLED,
242
194
};
243
195
 
244
196
static void lilly1131_usb_init(void)
245
197
{
246
 
        usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
247
 
                                ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
248
 
        usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
249
 
                                ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
250
 
 
251
198
        imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
252
 
        imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
 
199
 
 
200
        usbh2_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
 
201
                        ULPI_OTG_DRVVBUS_EXT);
 
202
        if (usbh2_pdata.otg)
 
203
                imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
253
204
}
254
205
 
255
 
#else
256
 
static inline void lilly1131_usb_init(void) {}
257
 
#endif /* CONFIG_USB_ULPI */
258
 
 
259
206
/* SPI */
260
207
 
261
208
static int spi_internal_chipselect[] = {
274
221
        .num_chipselect = ARRAY_SIZE(spi_internal_chipselect),
275
222
};
276
223
 
277
 
static struct mc13783_platform_data mc13783_pdata __initdata = {
278
 
        .flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN,
 
224
static struct mc13xxx_platform_data mc13783_pdata __initdata = {
 
225
        .flags = MC13XXX_USE_RTC | MC13XXX_USE_TOUCHSCREEN,
279
226
};
280
227
 
281
228
static struct spi_board_info mc13783_dev __initdata = {
347
294
};
348
295
 
349
296
MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
350
 
        .boot_params    = MX3x_PHYS_OFFSET + 0x100,
351
 
        .map_io         = mx31_map_io,
352
 
        .init_irq       = mx31_init_irq,
353
 
        .init_machine   = mx31lilly_board_init,
354
 
        .timer          = &mx31lilly_timer,
 
297
        .boot_params = MX3x_PHYS_OFFSET + 0x100,
 
298
        .map_io = mx31_map_io,
 
299
        .init_early = imx31_init_early,
 
300
        .init_irq = mx31_init_irq,
 
301
        .timer = &mx31lilly_timer,
 
302
        .init_machine = mx31lilly_board_init,
355
303
MACHINE_END
356