| .. | .. |
|---|
| 10 | 10 | #include <linux/gpio.h> |
|---|
| 11 | 11 | #include <linux/i2c.h> |
|---|
| 12 | 12 | #include <linux/init.h> |
|---|
| 13 | | -#include <linux/module.h> |
|---|
| 14 | 13 | #include <linux/interrupt.h> |
|---|
| 15 | 14 | #include <linux/io.h> |
|---|
| 16 | 15 | #include <linux/leds.h> |
|---|
| .. | .. |
|---|
| 327 | 326 | |
|---|
| 328 | 327 | /**********************************************************************/ |
|---|
| 329 | 328 | |
|---|
| 329 | +#ifdef CONFIG_MMC_AU1X |
|---|
| 330 | 330 | /* SD carddetects: they're supposed to be edge-triggered, but ack |
|---|
| 331 | 331 | * doesn't seem to work (CPLD Rev 2). Instead, the screaming one |
|---|
| 332 | 332 | * is disabled and its counterpart enabled. The 200ms timeout is |
|---|
| .. | .. |
|---|
| 340 | 340 | |
|---|
| 341 | 341 | static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr) |
|---|
| 342 | 342 | { |
|---|
| 343 | | - void (*mmc_cd)(struct mmc_host *, unsigned long); |
|---|
| 344 | | - |
|---|
| 345 | | - /* link against CONFIG_MMC=m */ |
|---|
| 346 | | - mmc_cd = symbol_get(mmc_detect_change); |
|---|
| 347 | | - if (mmc_cd) { |
|---|
| 348 | | - mmc_cd(ptr, msecs_to_jiffies(200)); |
|---|
| 349 | | - symbol_put(mmc_detect_change); |
|---|
| 350 | | - } |
|---|
| 343 | + mmc_detect_change(ptr, msecs_to_jiffies(200)); |
|---|
| 351 | 344 | |
|---|
| 352 | 345 | msleep(100); /* debounce */ |
|---|
| 353 | 346 | if (irq == DB1200_SD0_INSERT_INT) |
|---|
| .. | .. |
|---|
| 431 | 424 | |
|---|
| 432 | 425 | static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr) |
|---|
| 433 | 426 | { |
|---|
| 434 | | - void (*mmc_cd)(struct mmc_host *, unsigned long); |
|---|
| 435 | | - |
|---|
| 436 | | - /* link against CONFIG_MMC=m */ |
|---|
| 437 | | - mmc_cd = symbol_get(mmc_detect_change); |
|---|
| 438 | | - if (mmc_cd) { |
|---|
| 439 | | - mmc_cd(ptr, msecs_to_jiffies(200)); |
|---|
| 440 | | - symbol_put(mmc_detect_change); |
|---|
| 441 | | - } |
|---|
| 427 | + mmc_detect_change(ptr, msecs_to_jiffies(200)); |
|---|
| 442 | 428 | |
|---|
| 443 | 429 | msleep(100); /* debounce */ |
|---|
| 444 | 430 | if (irq == PB1200_SD1_INSERT_INT) |
|---|
| .. | .. |
|---|
| 599 | 585 | .num_resources = ARRAY_SIZE(au1200_mmc1_res), |
|---|
| 600 | 586 | .resource = au1200_mmc1_res, |
|---|
| 601 | 587 | }; |
|---|
| 588 | +#endif /* CONFIG_MMC_AU1X */ |
|---|
| 602 | 589 | |
|---|
| 603 | 590 | /**********************************************************************/ |
|---|
| 604 | 591 | |
|---|
| .. | .. |
|---|
| 766 | 753 | static struct platform_device *db1200_devs[] __initdata = { |
|---|
| 767 | 754 | NULL, /* PSC0, selected by S6.8 */ |
|---|
| 768 | 755 | &db1200_ide_dev, |
|---|
| 756 | +#ifdef CONFIG_MMC_AU1X |
|---|
| 769 | 757 | &db1200_mmc0_dev, |
|---|
| 758 | +#endif |
|---|
| 770 | 759 | &au1200_lcd_dev, |
|---|
| 771 | 760 | &db1200_eth_dev, |
|---|
| 772 | 761 | &db1200_nand_dev, |
|---|
| .. | .. |
|---|
| 777 | 766 | }; |
|---|
| 778 | 767 | |
|---|
| 779 | 768 | static struct platform_device *pb1200_devs[] __initdata = { |
|---|
| 769 | +#ifdef CONFIG_MMC_AU1X |
|---|
| 780 | 770 | &pb1200_mmc1_dev, |
|---|
| 771 | +#endif |
|---|
| 781 | 772 | }; |
|---|
| 782 | 773 | |
|---|
| 783 | 774 | /* Some peripheral base addresses differ on the PB1200 */ |
|---|