diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-04-02 18:22:11 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-04-02 18:22:11 -0400 |
commit | cd02938a828f4b2098a074afb7454f106f2e8df5 (patch) | |
tree | 7b543fd6aa82a62dc3a9614c26f89daca83e77d5 /arch/arm | |
parent | 9d681f3a1b27fdfc17ea251cf8d5f627dab34670 (diff) | |
parent | 172ef275444efa12d834fb9d1b1acdac92db47f7 (diff) |
Merge branch 'smsc911x-armplatforms' of git://github.com/steveglen/linux-2.6
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/configs/omap_ldp_defconfig | 24 | ||||
-rw-r--r-- | arch/arm/configs/pcm037_defconfig | 23 | ||||
-rw-r--r-- | arch/arm/configs/realview-smp_defconfig | 24 | ||||
-rw-r--r-- | arch/arm/configs/realview_defconfig | 24 | ||||
-rw-r--r-- | arch/arm/mach-mx3/pcm037.c | 23 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 47 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 65 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pcm990-baseboard.c | 53 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.c | 17 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx3_camera.h | 52 |
10 files changed, 300 insertions, 52 deletions
diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig index aa9d34feddc6..679a4a3e265e 100644 --- a/arch/arm/configs/omap_ldp_defconfig +++ b/arch/arm/configs/omap_ldp_defconfig | |||
@@ -474,14 +474,34 @@ CONFIG_NETDEVICES=y | |||
474 | # CONFIG_EQUALIZER is not set | 474 | # CONFIG_EQUALIZER is not set |
475 | # CONFIG_TUN is not set | 475 | # CONFIG_TUN is not set |
476 | # CONFIG_VETH is not set | 476 | # CONFIG_VETH is not set |
477 | # CONFIG_PHYLIB is not set | 477 | CONFIG_PHYLIB=y |
478 | |||
479 | # | ||
480 | # MII PHY device drivers | ||
481 | # | ||
482 | # CONFIG_MARVELL_PHY is not set | ||
483 | # CONFIG_DAVICOM_PHY is not set | ||
484 | # CONFIG_QSEMI_PHY is not set | ||
485 | # CONFIG_LXT_PHY is not set | ||
486 | # CONFIG_CICADA_PHY is not set | ||
487 | # CONFIG_VITESSE_PHY is not set | ||
488 | CONFIG_SMSC_PHY=y | ||
489 | # CONFIG_BROADCOM_PHY is not set | ||
490 | # CONFIG_ICPLUS_PHY is not set | ||
491 | # CONFIG_REALTEK_PHY is not set | ||
492 | # CONFIG_NATIONAL_PHY is not set | ||
493 | # CONFIG_STE10XP is not set | ||
494 | # CONFIG_LSI_ET1011C_PHY is not set | ||
495 | # CONFIG_FIXED_PHY is not set | ||
496 | # CONFIG_MDIO_BITBANG is not set | ||
478 | CONFIG_NET_ETHERNET=y | 497 | CONFIG_NET_ETHERNET=y |
479 | CONFIG_MII=y | 498 | CONFIG_MII=y |
480 | # CONFIG_AX88796 is not set | 499 | # CONFIG_AX88796 is not set |
481 | # CONFIG_SMC91X is not set | 500 | # CONFIG_SMC91X is not set |
482 | # CONFIG_DM9000 is not set | 501 | # CONFIG_DM9000 is not set |
483 | # CONFIG_ENC28J60 is not set | 502 | # CONFIG_ENC28J60 is not set |
484 | CONFIG_SMC911X=y | 503 | # CONFIG_SMC911X is not set |
504 | CONFIG_SMSC911X=y | ||
485 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 505 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
486 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 506 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
487 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 507 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
diff --git a/arch/arm/configs/pcm037_defconfig b/arch/arm/configs/pcm037_defconfig index 627474586470..6e37c77c4760 100644 --- a/arch/arm/configs/pcm037_defconfig +++ b/arch/arm/configs/pcm037_defconfig | |||
@@ -465,12 +465,33 @@ CONFIG_NETDEVICES=y | |||
465 | # CONFIG_EQUALIZER is not set | 465 | # CONFIG_EQUALIZER is not set |
466 | # CONFIG_TUN is not set | 466 | # CONFIG_TUN is not set |
467 | # CONFIG_VETH is not set | 467 | # CONFIG_VETH is not set |
468 | # CONFIG_PHYLIB is not set | 468 | CONFIG_PHYLIB=y |
469 | |||
470 | # | ||
471 | # MII PHY device drivers | ||
472 | # | ||
473 | # CONFIG_MARVELL_PHY is not set | ||
474 | # CONFIG_DAVICOM_PHY is not set | ||
475 | # CONFIG_QSEMI_PHY is not set | ||
476 | # CONFIG_LXT_PHY is not set | ||
477 | # CONFIG_CICADA_PHY is not set | ||
478 | # CONFIG_VITESSE_PHY is not set | ||
479 | CONFIG_SMSC_PHY=y | ||
480 | # CONFIG_BROADCOM_PHY is not set | ||
481 | # CONFIG_ICPLUS_PHY is not set | ||
482 | # CONFIG_REALTEK_PHY is not set | ||
483 | # CONFIG_NATIONAL_PHY is not set | ||
484 | # CONFIG_STE10XP is not set | ||
485 | # CONFIG_LSI_ET1011C_PHY is not set | ||
486 | # CONFIG_FIXED_PHY is not set | ||
487 | # CONFIG_MDIO_BITBANG is not set | ||
469 | CONFIG_NET_ETHERNET=y | 488 | CONFIG_NET_ETHERNET=y |
470 | CONFIG_MII=y | 489 | CONFIG_MII=y |
471 | # CONFIG_AX88796 is not set | 490 | # CONFIG_AX88796 is not set |
472 | CONFIG_SMC91X=y | 491 | CONFIG_SMC91X=y |
473 | # CONFIG_DM9000 is not set | 492 | # CONFIG_DM9000 is not set |
493 | # CONFIG_SMC911X is not set | ||
494 | CONFIG_SMSC911X=y | ||
474 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 495 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
475 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 496 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
476 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 497 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig index cd29824d791c..21db4b3ec8ff 100644 --- a/arch/arm/configs/realview-smp_defconfig +++ b/arch/arm/configs/realview-smp_defconfig | |||
@@ -496,13 +496,33 @@ CONFIG_NETDEVICES=y | |||
496 | # CONFIG_EQUALIZER is not set | 496 | # CONFIG_EQUALIZER is not set |
497 | # CONFIG_TUN is not set | 497 | # CONFIG_TUN is not set |
498 | # CONFIG_VETH is not set | 498 | # CONFIG_VETH is not set |
499 | # CONFIG_PHYLIB is not set | 499 | CONFIG_PHYLIB=y |
500 | |||
501 | # | ||
502 | # MII PHY device drivers | ||
503 | # | ||
504 | # CONFIG_MARVELL_PHY is not set | ||
505 | # CONFIG_DAVICOM_PHY is not set | ||
506 | # CONFIG_QSEMI_PHY is not set | ||
507 | # CONFIG_LXT_PHY is not set | ||
508 | # CONFIG_CICADA_PHY is not set | ||
509 | # CONFIG_VITESSE_PHY is not set | ||
510 | CONFIG_SMSC_PHY=y | ||
511 | # CONFIG_BROADCOM_PHY is not set | ||
512 | # CONFIG_ICPLUS_PHY is not set | ||
513 | # CONFIG_REALTEK_PHY is not set | ||
514 | # CONFIG_NATIONAL_PHY is not set | ||
515 | # CONFIG_STE10XP is not set | ||
516 | # CONFIG_LSI_ET1011C_PHY is not set | ||
517 | # CONFIG_FIXED_PHY is not set | ||
518 | # CONFIG_MDIO_BITBANG is not set | ||
500 | CONFIG_NET_ETHERNET=y | 519 | CONFIG_NET_ETHERNET=y |
501 | CONFIG_MII=y | 520 | CONFIG_MII=y |
502 | # CONFIG_AX88796 is not set | 521 | # CONFIG_AX88796 is not set |
503 | CONFIG_SMC91X=y | 522 | CONFIG_SMC91X=y |
504 | # CONFIG_DM9000 is not set | 523 | # CONFIG_DM9000 is not set |
505 | CONFIG_SMC911X=y | 524 | # CONFIG_SMC911X is not set |
525 | CONFIG_SMSC911X=y | ||
506 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 526 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
507 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 527 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
508 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 528 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig index 7e253f58ed18..9a75c30b910d 100644 --- a/arch/arm/configs/realview_defconfig +++ b/arch/arm/configs/realview_defconfig | |||
@@ -490,13 +490,33 @@ CONFIG_NETDEVICES=y | |||
490 | # CONFIG_EQUALIZER is not set | 490 | # CONFIG_EQUALIZER is not set |
491 | # CONFIG_TUN is not set | 491 | # CONFIG_TUN is not set |
492 | # CONFIG_VETH is not set | 492 | # CONFIG_VETH is not set |
493 | # CONFIG_PHYLIB is not set | 493 | CONFIG_PHYLIB=y |
494 | |||
495 | # | ||
496 | # MII PHY device drivers | ||
497 | # | ||
498 | # CONFIG_MARVELL_PHY is not set | ||
499 | # CONFIG_DAVICOM_PHY is not set | ||
500 | # CONFIG_QSEMI_PHY is not set | ||
501 | # CONFIG_LXT_PHY is not set | ||
502 | # CONFIG_CICADA_PHY is not set | ||
503 | # CONFIG_VITESSE_PHY is not set | ||
504 | CONFIG_SMSC_PHY=y | ||
505 | # CONFIG_BROADCOM_PHY is not set | ||
506 | # CONFIG_ICPLUS_PHY is not set | ||
507 | # CONFIG_REALTEK_PHY is not set | ||
508 | # CONFIG_NATIONAL_PHY is not set | ||
509 | # CONFIG_STE10XP is not set | ||
510 | # CONFIG_LSI_ET1011C_PHY is not set | ||
511 | # CONFIG_FIXED_PHY is not set | ||
512 | # CONFIG_MDIO_BITBANG is not set | ||
494 | CONFIG_NET_ETHERNET=y | 513 | CONFIG_NET_ETHERNET=y |
495 | CONFIG_MII=y | 514 | CONFIG_MII=y |
496 | # CONFIG_AX88796 is not set | 515 | # CONFIG_AX88796 is not set |
497 | CONFIG_SMC91X=y | 516 | CONFIG_SMC91X=y |
498 | # CONFIG_DM9000 is not set | 517 | # CONFIG_DM9000 is not set |
499 | CONFIG_SMC911X=y | 518 | # CONFIG_SMC911X is not set |
519 | CONFIG_SMSC911X=y | ||
500 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 520 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
501 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 521 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
502 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 522 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 5fce022114de..c3648eff5137 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/mtd/plat-ram.h> | 24 | #include <linux/mtd/plat-ram.h> |
25 | #include <linux/memory.h> | 25 | #include <linux/memory.h> |
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/smc911x.h> | 27 | #include <linux/smsc911x.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/i2c/at24.h> | 30 | #include <linux/i2c/at24.h> |
@@ -70,7 +70,7 @@ static struct imxuart_platform_data uart_pdata = { | |||
70 | .flags = IMXUART_HAVE_RTSCTS, | 70 | .flags = IMXUART_HAVE_RTSCTS, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct resource smc911x_resources[] = { | 73 | static struct resource smsc911x_resources[] = { |
74 | [0] = { | 74 | [0] = { |
75 | .start = CS1_BASE_ADDR + 0x300, | 75 | .start = CS1_BASE_ADDR + 0x300, |
76 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | 76 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, |
@@ -79,22 +79,25 @@ static struct resource smc911x_resources[] = { | |||
79 | [1] = { | 79 | [1] = { |
80 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 80 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
81 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 81 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
82 | .flags = IORESOURCE_IRQ, | 82 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
83 | }, | 83 | }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct smc911x_platdata smc911x_info = { | 86 | static struct smsc911x_platform_config smsc911x_info = { |
87 | .flags = SMC911X_USE_32BIT, | 87 | .flags = SMSC911X_USE_32BIT | SMSC911X_FORCE_INTERNAL_PHY | |
88 | .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW, | 88 | SMSC911X_SAVE_MAC_ADDRESS, |
89 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
90 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
91 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
89 | }; | 92 | }; |
90 | 93 | ||
91 | static struct platform_device pcm037_eth = { | 94 | static struct platform_device pcm037_eth = { |
92 | .name = "smc911x", | 95 | .name = "smsc911x", |
93 | .id = -1, | 96 | .id = -1, |
94 | .num_resources = ARRAY_SIZE(smc911x_resources), | 97 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
95 | .resource = smc911x_resources, | 98 | .resource = smsc911x_resources, |
96 | .dev = { | 99 | .dev = { |
97 | .platform_data = &smc911x_info, | 100 | .platform_data = &smsc911x_info, |
98 | }, | 101 | }, |
99 | }; | 102 | }; |
100 | 103 | ||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index e096f776f996..da57b0fcda14 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/spi/ads7846.h> | 23 | #include <linux/spi/ads7846.h> |
24 | #include <linux/i2c/twl4030.h> | 24 | #include <linux/i2c/twl4030.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/smsc911x.h> | ||
26 | 27 | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
@@ -41,12 +42,12 @@ | |||
41 | 42 | ||
42 | #include "mmc-twl4030.h" | 43 | #include "mmc-twl4030.h" |
43 | 44 | ||
44 | #define LDP_SMC911X_CS 1 | 45 | #define LDP_SMSC911X_CS 1 |
45 | #define LDP_SMC911X_GPIO 152 | 46 | #define LDP_SMSC911X_GPIO 152 |
46 | #define DEBUG_BASE 0x08000000 | 47 | #define DEBUG_BASE 0x08000000 |
47 | #define LDP_ETHR_START DEBUG_BASE | 48 | #define LDP_ETHR_START DEBUG_BASE |
48 | 49 | ||
49 | static struct resource ldp_smc911x_resources[] = { | 50 | static struct resource ldp_smsc911x_resources[] = { |
50 | [0] = { | 51 | [0] = { |
51 | .start = LDP_ETHR_START, | 52 | .start = LDP_ETHR_START, |
52 | .end = LDP_ETHR_START + SZ_4K, | 53 | .end = LDP_ETHR_START + SZ_4K, |
@@ -59,40 +60,50 @@ static struct resource ldp_smc911x_resources[] = { | |||
59 | }, | 60 | }, |
60 | }; | 61 | }; |
61 | 62 | ||
62 | static struct platform_device ldp_smc911x_device = { | 63 | static struct smsc911x_platform_config ldp_smsc911x_config = { |
63 | .name = "smc911x", | 64 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
65 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
66 | .flags = SMSC911X_USE_32BIT, | ||
67 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
68 | }; | ||
69 | |||
70 | static struct platform_device ldp_smsc911x_device = { | ||
71 | .name = "smsc911x", | ||
64 | .id = -1, | 72 | .id = -1, |
65 | .num_resources = ARRAY_SIZE(ldp_smc911x_resources), | 73 | .num_resources = ARRAY_SIZE(ldp_smsc911x_resources), |
66 | .resource = ldp_smc911x_resources, | 74 | .resource = ldp_smsc911x_resources, |
75 | .dev = { | ||
76 | .platform_data = &ldp_smsc911x_config, | ||
77 | }, | ||
67 | }; | 78 | }; |
68 | 79 | ||
69 | static struct platform_device *ldp_devices[] __initdata = { | 80 | static struct platform_device *ldp_devices[] __initdata = { |
70 | &ldp_smc911x_device, | 81 | &ldp_smsc911x_device, |
71 | }; | 82 | }; |
72 | 83 | ||
73 | static inline void __init ldp_init_smc911x(void) | 84 | static inline void __init ldp_init_smsc911x(void) |
74 | { | 85 | { |
75 | int eth_cs; | 86 | int eth_cs; |
76 | unsigned long cs_mem_base; | 87 | unsigned long cs_mem_base; |
77 | int eth_gpio = 0; | 88 | int eth_gpio = 0; |
78 | 89 | ||
79 | eth_cs = LDP_SMC911X_CS; | 90 | eth_cs = LDP_SMSC911X_CS; |
80 | 91 | ||
81 | if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { | 92 | if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { |
82 | printk(KERN_ERR "Failed to request GPMC mem for smc911x\n"); | 93 | printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); |
83 | return; | 94 | return; |
84 | } | 95 | } |
85 | 96 | ||
86 | ldp_smc911x_resources[0].start = cs_mem_base + 0x0; | 97 | ldp_smsc911x_resources[0].start = cs_mem_base + 0x0; |
87 | ldp_smc911x_resources[0].end = cs_mem_base + 0xff; | 98 | ldp_smsc911x_resources[0].end = cs_mem_base + 0xff; |
88 | udelay(100); | 99 | udelay(100); |
89 | 100 | ||
90 | eth_gpio = LDP_SMC911X_GPIO; | 101 | eth_gpio = LDP_SMSC911X_GPIO; |
91 | 102 | ||
92 | ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); | 103 | ldp_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); |
93 | 104 | ||
94 | if (gpio_request(eth_gpio, "smc911x irq") < 0) { | 105 | if (gpio_request(eth_gpio, "smsc911x irq") < 0) { |
95 | printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", | 106 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", |
96 | eth_gpio); | 107 | eth_gpio); |
97 | return; | 108 | return; |
98 | } | 109 | } |
@@ -104,7 +115,7 @@ static void __init omap_ldp_init_irq(void) | |||
104 | omap2_init_common_hw(NULL); | 115 | omap2_init_common_hw(NULL); |
105 | omap_init_irq(); | 116 | omap_init_irq(); |
106 | omap_gpio_init(); | 117 | omap_gpio_init(); |
107 | ldp_init_smc911x(); | 118 | ldp_init_smsc911x(); |
108 | } | 119 | } |
109 | 120 | ||
110 | static struct omap_uart_config ldp_uart_config __initdata = { | 121 | static struct omap_uart_config ldp_uart_config __initdata = { |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index b3f6e9d81807..b1f23bea863f 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -57,6 +57,9 @@ | |||
57 | #define GPMC_CS0_BASE 0x60 | 57 | #define GPMC_CS0_BASE 0x60 |
58 | #define GPMC_CS_SIZE 0x30 | 58 | #define GPMC_CS_SIZE 0x30 |
59 | 59 | ||
60 | #define OVERO_SMSC911X_CS 5 | ||
61 | #define OVERO_SMSC911X_GPIO 176 | ||
62 | |||
60 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ | 63 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ |
61 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 64 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
62 | 65 | ||
@@ -116,6 +119,67 @@ static void __init overo_ads7846_init(void) | |||
116 | static inline void __init overo_ads7846_init(void) { return; } | 119 | static inline void __init overo_ads7846_init(void) { return; } |
117 | #endif | 120 | #endif |
118 | 121 | ||
122 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | ||
123 | |||
124 | #include <linux/smsc911x.h> | ||
125 | |||
126 | static struct resource overo_smsc911x_resources[] = { | ||
127 | { | ||
128 | .name = "smsc911x-memory", | ||
129 | .flags = IORESOURCE_MEM, | ||
130 | }, | ||
131 | { | ||
132 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | static struct smsc911x_platform_config overo_smsc911x_config = { | ||
137 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
138 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
139 | .flags = SMSC911X_USE_32BIT , | ||
140 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
141 | }; | ||
142 | |||
143 | static struct platform_device overo_smsc911x_device = { | ||
144 | .name = "smsc911x", | ||
145 | .id = -1, | ||
146 | .num_resources = ARRAY_SIZE(overo_smsc911x_resources), | ||
147 | .resource = &overo_smsc911x_resources, | ||
148 | .dev = { | ||
149 | .platform_data = &overo_smsc911x_config, | ||
150 | }, | ||
151 | }; | ||
152 | |||
153 | static inline void __init overo_init_smsc911x(void) | ||
154 | { | ||
155 | unsigned long cs_mem_base; | ||
156 | |||
157 | if (gpmc_cs_request(OVERO_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) { | ||
158 | printk(KERN_ERR "Failed request for GPMC mem for smsc911x\n"); | ||
159 | return; | ||
160 | } | ||
161 | |||
162 | overo_smsc911x_resources[0].start = cs_mem_base + 0x0; | ||
163 | overo_smsc911x_resources[0].end = cs_mem_base + 0xff; | ||
164 | |||
165 | if ((gpio_request(OVERO_SMSC911X_GPIO, "SMSC911X IRQ") == 0) && | ||
166 | (gpio_direction_input(OVERO_SMSC911X_GPIO) == 0)) { | ||
167 | gpio_export(OVERO_SMSC911X_GPIO, 0); | ||
168 | } else { | ||
169 | printk(KERN_ERR "could not obtain gpio for SMSC911X IRQ\n"); | ||
170 | return; | ||
171 | } | ||
172 | |||
173 | overo_smsc911x_resources[1].start = OMAP_GPIO_IRQ(OVERO_SMSC911X_GPIO); | ||
174 | overo_smsc911x_resources[1].end = 0; | ||
175 | |||
176 | platform_device_register(&overo_smsc911x_device); | ||
177 | } | ||
178 | |||
179 | #else | ||
180 | static inline void __init overo_init_smsc911x(void) { return; } | ||
181 | #endif | ||
182 | |||
119 | static struct mtd_partition overo_nand_partitions[] = { | 183 | static struct mtd_partition overo_nand_partitions[] = { |
120 | { | 184 | { |
121 | .name = "xloader", | 185 | .name = "xloader", |
@@ -290,6 +354,7 @@ static void __init overo_init(void) | |||
290 | overo_flash_init(); | 354 | overo_flash_init(); |
291 | usb_musb_init(); | 355 | usb_musb_init(); |
292 | overo_ads7846_init(); | 356 | overo_ads7846_init(); |
357 | overo_init_smsc911x(); | ||
293 | 358 | ||
294 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, | 359 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, |
295 | "OVERO_GPIO_W2W_NRESET") == 0) && | 360 | "OVERO_GPIO_W2W_NRESET") == 0) && |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index f46698e20c1f..6112740b4ae9 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -380,14 +380,49 @@ static struct pca953x_platform_data pca9536_data = { | |||
380 | .gpio_base = NR_BUILTIN_GPIO + 1, | 380 | .gpio_base = NR_BUILTIN_GPIO + 1, |
381 | }; | 381 | }; |
382 | 382 | ||
383 | static struct soc_camera_link iclink[] = { | 383 | static int gpio_bus_switch; |
384 | { | 384 | |
385 | .bus_id = 0, /* Must match with the camera ID above */ | 385 | static int pcm990_camera_set_bus_param(struct soc_camera_link *link, |
386 | .gpio = NR_BUILTIN_GPIO + 1, | 386 | unsigned long flags) |
387 | }, { | 387 | { |
388 | .bus_id = 0, /* Must match with the camera ID above */ | 388 | if (gpio_bus_switch <= 0) { |
389 | .gpio = -ENXIO, | 389 | if (flags == SOCAM_DATAWIDTH_10) |
390 | return 0; | ||
391 | else | ||
392 | return -EINVAL; | ||
393 | } | ||
394 | |||
395 | if (flags & SOCAM_DATAWIDTH_8) | ||
396 | gpio_set_value(gpio_bus_switch, 1); | ||
397 | else | ||
398 | gpio_set_value(gpio_bus_switch, 0); | ||
399 | |||
400 | return 0; | ||
401 | } | ||
402 | |||
403 | static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link) | ||
404 | { | ||
405 | int ret; | ||
406 | |||
407 | if (!gpio_bus_switch) { | ||
408 | ret = gpio_request(NR_BUILTIN_GPIO + 1, "camera"); | ||
409 | if (!ret) { | ||
410 | gpio_bus_switch = NR_BUILTIN_GPIO + 1; | ||
411 | gpio_direction_output(gpio_bus_switch, 0); | ||
412 | } else | ||
413 | gpio_bus_switch = -EINVAL; | ||
390 | } | 414 | } |
415 | |||
416 | if (gpio_bus_switch > 0) | ||
417 | return SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_10; | ||
418 | else | ||
419 | return SOCAM_DATAWIDTH_10; | ||
420 | } | ||
421 | |||
422 | static struct soc_camera_link iclink = { | ||
423 | .bus_id = 0, /* Must match with the camera ID above */ | ||
424 | .query_bus_param = pcm990_camera_query_bus_param, | ||
425 | .set_bus_param = pcm990_camera_set_bus_param, | ||
391 | }; | 426 | }; |
392 | 427 | ||
393 | /* Board I2C devices. */ | 428 | /* Board I2C devices. */ |
@@ -398,10 +433,10 @@ static struct i2c_board_info __initdata pcm990_i2c_devices[] = { | |||
398 | .platform_data = &pca9536_data, | 433 | .platform_data = &pca9536_data, |
399 | }, { | 434 | }, { |
400 | I2C_BOARD_INFO("mt9v022", 0x48), | 435 | I2C_BOARD_INFO("mt9v022", 0x48), |
401 | .platform_data = &iclink[0], /* With extender */ | 436 | .platform_data = &iclink, /* With extender */ |
402 | }, { | 437 | }, { |
403 | I2C_BOARD_INFO("mt9m001", 0x5d), | 438 | I2C_BOARD_INFO("mt9m001", 0x5d), |
404 | .platform_data = &iclink[0], /* With extender */ | 439 | .platform_data = &iclink, /* With extender */ |
405 | }, | 440 | }, |
406 | }; | 441 | }; |
407 | #endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ | 442 | #endif /* CONFIG_VIDEO_PXA27x ||CONFIG_VIDEO_PXA27x_MODULE */ |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index d6766685cfc7..9ab947c14f26 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/clocksource.h> | 28 | #include <linux/clocksource.h> |
29 | #include <linux/clockchips.h> | 29 | #include <linux/clockchips.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/smc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | #include <linux/ata_platform.h> | 32 | #include <linux/ata_platform.h> |
33 | 33 | ||
34 | #include <asm/clkdev.h> | 34 | #include <asm/clkdev.h> |
@@ -128,14 +128,15 @@ int realview_flash_register(struct resource *res, u32 num) | |||
128 | return platform_device_register(&realview_flash_device); | 128 | return platform_device_register(&realview_flash_device); |
129 | } | 129 | } |
130 | 130 | ||
131 | static struct smc911x_platdata realview_smc911x_platdata = { | 131 | static struct smsc911x_platform_config smsc911x_config = { |
132 | .flags = SMC911X_USE_32BIT, | 132 | .flags = SMSC911X_USE_32BIT, |
133 | .irq_flags = IRQF_SHARED, | 133 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, |
134 | .irq_polarity = 1, | 134 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
135 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
135 | }; | 136 | }; |
136 | 137 | ||
137 | static struct platform_device realview_eth_device = { | 138 | static struct platform_device realview_eth_device = { |
138 | .name = "smc911x", | 139 | .name = "smsc911x", |
139 | .id = 0, | 140 | .id = 0, |
140 | .num_resources = 2, | 141 | .num_resources = 2, |
141 | }; | 142 | }; |
@@ -145,8 +146,8 @@ int realview_eth_register(const char *name, struct resource *res) | |||
145 | if (name) | 146 | if (name) |
146 | realview_eth_device.name = name; | 147 | realview_eth_device.name = name; |
147 | realview_eth_device.resource = res; | 148 | realview_eth_device.resource = res; |
148 | if (strcmp(realview_eth_device.name, "smc911x") == 0) | 149 | if (strcmp(realview_eth_device.name, "smsc911x") == 0) |
149 | realview_eth_device.dev.platform_data = &realview_smc911x_platdata; | 150 | realview_eth_device.dev.platform_data = &smsc911x_config; |
150 | 151 | ||
151 | return platform_device_register(&realview_eth_device); | 152 | return platform_device_register(&realview_eth_device); |
152 | } | 153 | } |
diff --git a/arch/arm/plat-mxc/include/mach/mx3_camera.h b/arch/arm/plat-mxc/include/mach/mx3_camera.h new file mode 100644 index 000000000000..36d7ff27b5e2 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx3_camera.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * mx3_camera.h - i.MX3x camera driver header file | ||
3 | * | ||
4 | * Copyright (C) 2008, Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _MX3_CAMERA_H_ | ||
22 | #define _MX3_CAMERA_H_ | ||
23 | |||
24 | #include <linux/device.h> | ||
25 | |||
26 | #define MX3_CAMERA_CLK_SRC 1 | ||
27 | #define MX3_CAMERA_EXT_VSYNC 2 | ||
28 | #define MX3_CAMERA_DP 4 | ||
29 | #define MX3_CAMERA_PCP 8 | ||
30 | #define MX3_CAMERA_HSP 0x10 | ||
31 | #define MX3_CAMERA_VSP 0x20 | ||
32 | #define MX3_CAMERA_DATAWIDTH_4 0x40 | ||
33 | #define MX3_CAMERA_DATAWIDTH_8 0x80 | ||
34 | #define MX3_CAMERA_DATAWIDTH_10 0x100 | ||
35 | #define MX3_CAMERA_DATAWIDTH_15 0x200 | ||
36 | |||
37 | #define MX3_CAMERA_DATAWIDTH_MASK (MX3_CAMERA_DATAWIDTH_4 | MX3_CAMERA_DATAWIDTH_8 | \ | ||
38 | MX3_CAMERA_DATAWIDTH_10 | MX3_CAMERA_DATAWIDTH_15) | ||
39 | |||
40 | /** | ||
41 | * struct mx3_camera_pdata - i.MX3x camera platform data | ||
42 | * @flags: MX3_CAMERA_* flags | ||
43 | * @mclk_10khz: master clock frequency in 10kHz units | ||
44 | * @dma_dev: IPU DMA device to match against in channel allocation | ||
45 | */ | ||
46 | struct mx3_camera_pdata { | ||
47 | unsigned long flags; | ||
48 | unsigned long mclk_10khz; | ||
49 | struct device *dma_dev; | ||
50 | }; | ||
51 | |||
52 | #endif | ||