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

« back to all changes in this revision

Viewing changes to arch/blackfin/mach-bf533/boards/cm_bf533.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
};
72
72
#endif
73
73
 
74
 
#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
 
74
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
75
75
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
76
76
        .enable_dma = 0,
77
77
        .bits_per_word = 16,
110
110
        },
111
111
#endif
112
112
 
113
 
#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
 
113
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
114
114
        {
115
 
                .modalias = "ad1836",
 
115
                .modalias = "ad183x",
116
116
                .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
117
117
                .bus_num = 0,
118
 
                .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
 
118
                .chip_select = 4,
119
119
                .controller_data = &ad1836_spi_chip_info,
120
120
        },
121
121
#endif
242
242
#endif
243
243
 
244
244
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
245
 
static struct resource bfin_uart_resources[] = {
 
245
#ifdef CONFIG_SERIAL_BFIN_UART0
 
246
static struct resource bfin_uart0_resources[] = {
246
247
        {
247
 
                .start = 0xFFC00400,
248
 
                .end = 0xFFC004FF,
 
248
                .start = BFIN_UART_THR,
 
249
                .end = BFIN_UART_GCTL+2,
249
250
                .flags = IORESOURCE_MEM,
250
251
        },
251
 
};
252
 
 
253
 
static struct platform_device bfin_uart_device = {
 
252
        {
 
253
                .start = IRQ_UART0_RX,
 
254
                .end = IRQ_UART0_RX + 1,
 
255
                .flags = IORESOURCE_IRQ,
 
256
        },
 
257
        {
 
258
                .start = IRQ_UART0_ERROR,
 
259
                .end = IRQ_UART0_ERROR,
 
260
                .flags = IORESOURCE_IRQ,
 
261
        },
 
262
        {
 
263
                .start = CH_UART0_TX,
 
264
                .end = CH_UART0_TX,
 
265
                .flags = IORESOURCE_DMA,
 
266
        },
 
267
        {
 
268
                .start = CH_UART0_RX,
 
269
                .end = CH_UART0_RX,
 
270
                .flags = IORESOURCE_DMA,
 
271
        },
 
272
};
 
273
 
 
274
static unsigned short bfin_uart0_peripherals[] = {
 
275
        P_UART0_TX, P_UART0_RX, 0
 
276
};
 
277
 
 
278
static struct platform_device bfin_uart0_device = {
254
279
        .name = "bfin-uart",
255
 
        .id = 1,
256
 
        .num_resources = ARRAY_SIZE(bfin_uart_resources),
257
 
        .resource = bfin_uart_resources,
 
280
        .id = 0,
 
281
        .num_resources = ARRAY_SIZE(bfin_uart0_resources),
 
282
        .resource = bfin_uart0_resources,
 
283
        .dev = {
 
284
                .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
 
285
        },
258
286
};
259
287
#endif
 
288
#endif
260
289
 
261
290
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
262
291
#ifdef CONFIG_BFIN_SIR0
288
317
#endif
289
318
 
290
319
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
 
320
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
 
321
static struct resource bfin_sport0_uart_resources[] = {
 
322
        {
 
323
                .start = SPORT0_TCR1,
 
324
                .end = SPORT0_MRCS3+4,
 
325
                .flags = IORESOURCE_MEM,
 
326
        },
 
327
        {
 
328
                .start = IRQ_SPORT0_RX,
 
329
                .end = IRQ_SPORT0_RX+1,
 
330
                .flags = IORESOURCE_IRQ,
 
331
        },
 
332
        {
 
333
                .start = IRQ_SPORT0_ERROR,
 
334
                .end = IRQ_SPORT0_ERROR,
 
335
                .flags = IORESOURCE_IRQ,
 
336
        },
 
337
};
 
338
 
 
339
static unsigned short bfin_sport0_peripherals[] = {
 
340
        P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
 
341
        P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
 
342
};
 
343
 
291
344
static struct platform_device bfin_sport0_uart_device = {
292
345
        .name = "bfin-sport-uart",
293
346
        .id = 0,
 
347
        .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
 
348
        .resource = bfin_sport0_uart_resources,
 
349
        .dev = {
 
350
                .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
 
351
        },
 
352
};
 
353
#endif
 
354
#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
 
355
static struct resource bfin_sport1_uart_resources[] = {
 
356
        {
 
357
                .start = SPORT1_TCR1,
 
358
                .end = SPORT1_MRCS3+4,
 
359
                .flags = IORESOURCE_MEM,
 
360
        },
 
361
        {
 
362
                .start = IRQ_SPORT1_RX,
 
363
                .end = IRQ_SPORT1_RX+1,
 
364
                .flags = IORESOURCE_IRQ,
 
365
        },
 
366
        {
 
367
                .start = IRQ_SPORT1_ERROR,
 
368
                .end = IRQ_SPORT1_ERROR,
 
369
                .flags = IORESOURCE_IRQ,
 
370
        },
 
371
};
 
372
 
 
373
static unsigned short bfin_sport1_peripherals[] = {
 
374
        P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
 
375
        P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
294
376
};
295
377
 
296
378
static struct platform_device bfin_sport1_uart_device = {
297
379
        .name = "bfin-sport-uart",
298
380
        .id = 1,
 
381
        .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
 
382
        .resource = bfin_sport1_uart_resources,
 
383
        .dev = {
 
384
                .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
 
385
        },
299
386
};
300
387
#endif
 
388
#endif
301
389
 
302
390
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
303
391
static struct resource isp1362_hcd_resources[] = {
312
400
        }, {
313
401
                .start = IRQ_PF4,
314
402
                .end = IRQ_PF4,
315
 
                .flags = IORESOURCE_IRQ,
 
403
                .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
316
404
        },
317
405
};
318
406
 
432
520
        &bfin_dpmc,
433
521
 
434
522
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
435
 
        &bfin_uart_device,
 
523
#ifdef CONFIG_SERIAL_BFIN_UART0
 
524
        &bfin_uart0_device,
 
525
#endif
436
526
#endif
437
527
 
438
528
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
442
532
#endif
443
533
 
444
534
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
 
535
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
445
536
        &bfin_sport0_uart_device,
 
537
#endif
 
538
#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
446
539
        &bfin_sport1_uart_device,
447
540
#endif
 
541
#endif
448
542
 
449
543
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
450
544
        &rtc_device,
486
580
}
487
581
 
488
582
arch_initcall(cm_bf533_init);
 
583
 
 
584
static struct platform_device *cm_bf533_early_devices[] __initdata = {
 
585
#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
 
586
#ifdef CONFIG_SERIAL_BFIN_UART0
 
587
        &bfin_uart0_device,
 
588
#endif
 
589
#endif
 
590
 
 
591
#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
 
592
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
 
593
        &bfin_sport0_uart_device,
 
594
#endif
 
595
#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
 
596
        &bfin_sport1_uart_device,
 
597
#endif
 
598
#endif
 
599
};
 
600
 
 
601
void __init native_machine_early_platform_add_devices(void)
 
602
{
 
603
        printk(KERN_INFO "register early platform devices\n");
 
604
        early_platform_add_devices(cm_bf533_early_devices,
 
605
                ARRAY_SIZE(cm_bf533_early_devices));
 
606
}