* [PATCH 0/3] omap3: cm-t35 updates
@ 2009-11-11 11:19 Mike Rapoport
2009-11-11 11:19 ` [PATCH 1/3] omap3: cm-t35: update led polarity Mike Rapoport
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mike Rapoport @ 2009-11-11 11:19 UTC (permalink / raw)
To: linux-omap; +Cc: Mike Rapoport
Here are several small updates for CM-T35 board.
Changes since commit e7e7a613eded2732b68496f69ff8fc34f16e1dd0:
Tony Lindgren (1):
Linux-omap rebuilt: Processor support for new omaps merged
Mike Rapoport (3):
omap3: cm-t35: update led polarity
omap3: cm-t35: use matrix_keyboard
omap3: cm-t35: add support for baseboard ehternet
arch/arm/mach-omap2/board-cm-t35.c | 71 ++++++++++++++++++++++++++----------
1 files changed, 51 insertions(+), 20 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/3] omap3: cm-t35: update led polarity 2009-11-11 11:19 [PATCH 0/3] omap3: cm-t35 updates Mike Rapoport @ 2009-11-11 11:19 ` Mike Rapoport 2009-11-11 11:19 ` [PATCH 2/3] omap3: cm-t35: use matrix_keyboard Mike Rapoport ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Mike Rapoport @ 2009-11-11 11:19 UTC (permalink / raw) To: linux-omap; +Cc: Mike Rapoport Signed-off-by: Mike Rapoport <mike@compulab.co.il> --- arch/arm/mach-omap2/board-cm-t35.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 0a39513..f9290ca 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -123,7 +123,7 @@ static struct gpio_led cm_t35_leds[] = { .gpio = 186, .name = "cm-t35:green", .default_trigger = "heartbeat", - .active_low = 1, + .active_low = 0, }, }; -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] omap3: cm-t35: use matrix_keyboard 2009-11-11 11:19 [PATCH 0/3] omap3: cm-t35 updates Mike Rapoport 2009-11-11 11:19 ` [PATCH 1/3] omap3: cm-t35: update led polarity Mike Rapoport @ 2009-11-11 11:19 ` Mike Rapoport 2009-11-11 11:19 ` [PATCH 3/3] omap3: cm-t35: add support for baseboard ehternet Mike Rapoport 2009-11-11 20:04 ` [PATCH 0/3] omap3: cm-t35 updates Tony Lindgren 3 siblings, 0 replies; 5+ messages in thread From: Mike Rapoport @ 2009-11-11 11:19 UTC (permalink / raw) To: linux-omap; +Cc: Mike Rapoport Signed-off-by: Mike Rapoport <mike@compulab.co.il> --- arch/arm/mach-omap2/board-cm-t35.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index f9290ca..0a46c0e 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -24,6 +24,7 @@ #include <linux/init.h> #include <linux/platform_device.h> #include <linux/input.h> +#include <linux/input/matrix_keypad.h> #include <linux/delay.h> #include <linux/gpio.h> @@ -39,7 +40,6 @@ #include <plat/common.h> #include <plat/mux.h> #include <plat/nand.h> -#include <plat/keypad.h> #include <plat/gpmc.h> #include <plat/usb.h> -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] omap3: cm-t35: add support for baseboard ehternet 2009-11-11 11:19 [PATCH 0/3] omap3: cm-t35 updates Mike Rapoport 2009-11-11 11:19 ` [PATCH 1/3] omap3: cm-t35: update led polarity Mike Rapoport 2009-11-11 11:19 ` [PATCH 2/3] omap3: cm-t35: use matrix_keyboard Mike Rapoport @ 2009-11-11 11:19 ` Mike Rapoport 2009-11-11 20:04 ` [PATCH 0/3] omap3: cm-t35 updates Tony Lindgren 3 siblings, 0 replies; 5+ messages in thread From: Mike Rapoport @ 2009-11-11 11:19 UTC (permalink / raw) To: linux-omap; +Cc: Mike Rapoport Default CM-T35 baseboard (SB-T35) utilizes SMSC9220 Ethernet chip. Enable it. Signed-off-by: Mike Rapoport <mike@compulab.co.il> --- arch/arm/mach-omap2/board-cm-t35.c | 67 ++++++++++++++++++++++++++---------- 1 files changed, 49 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 0a46c0e..22c4529 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -52,6 +52,8 @@ #define CM_T35_SMSC911X_CS 5 #define CM_T35_SMSC911X_GPIO 163 +#define SB_T35_SMSC911X_CS 4 +#define SB_T35_SMSC911X_GPIO 65 #define NAND_BLOCK_SIZE SZ_128K #define GPMC_CS0_BASE 0x60 @@ -60,9 +62,15 @@ #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #include <linux/smsc911x.h> +static struct smsc911x_platform_config cm_t35_smsc911x_config = { + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, + .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, + .phy_interface = PHY_INTERFACE_MODE_MII, +}; + static struct resource cm_t35_smsc911x_resources[] = { { - .name = "smsc911x-memory", .flags = IORESOURCE_MEM, }, { @@ -72,13 +80,6 @@ static struct resource cm_t35_smsc911x_resources[] = { }, }; -static struct smsc911x_platform_config cm_t35_smsc911x_config = { - .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, - .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, - .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, - .phy_interface = PHY_INTERFACE_MODE_MII, -}; - static struct platform_device cm_t35_smsc911x_device = { .name = "smsc911x", .id = 0, @@ -89,30 +90,60 @@ static struct platform_device cm_t35_smsc911x_device = { }, }; -static void __init cm_t35_init_smsc911x(void) +static struct resource sb_t35_smsc911x_resources[] = { + { + .flags = IORESOURCE_MEM, + }, + { + .start = OMAP_GPIO_IRQ(SB_T35_SMSC911X_GPIO), + .end = OMAP_GPIO_IRQ(SB_T35_SMSC911X_GPIO), + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, + }, +}; + +static struct platform_device sb_t35_smsc911x_device = { + .name = "smsc911x", + .id = 1, + .num_resources = ARRAY_SIZE(sb_t35_smsc911x_resources), + .resource = sb_t35_smsc911x_resources, + .dev = { + .platform_data = &cm_t35_smsc911x_config, + }, +}; + +static void __init cm_t35_init_smsc911x(struct platform_device *dev, + int cs, int irq_gpio) { unsigned long cs_mem_base; - if (gpmc_cs_request(CM_T35_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) { + if (gpmc_cs_request(cs, SZ_16M, &cs_mem_base) < 0) { pr_err("CM-T35: Failed request for GPMC mem for smsc911x\n"); return; } - cm_t35_smsc911x_resources[0].start = cs_mem_base + 0x0; - cm_t35_smsc911x_resources[0].end = cs_mem_base + 0xff; + dev->resource[0].start = cs_mem_base + 0x0; + dev->resource[0].end = cs_mem_base + 0xff; - if ((gpio_request(CM_T35_SMSC911X_GPIO, "CM ETH IRQ") == 0) && - (gpio_direction_input(CM_T35_SMSC911X_GPIO) == 0)) { - gpio_export(CM_T35_SMSC911X_GPIO, 0); + if ((gpio_request(irq_gpio, "ETH IRQ") == 0) && + (gpio_direction_input(irq_gpio) == 0)) { + gpio_export(irq_gpio, 0); } else { pr_err("CM-T35: could not obtain gpio for SMSC911X IRQ\n"); return; } - platform_device_register(&cm_t35_smsc911x_device); + platform_device_register(dev); +} + +static void __init cm_t35_init_ethernet(void) +{ + cm_t35_init_smsc911x(&cm_t35_smsc911x_device, + CM_T35_SMSC911X_CS, CM_T35_SMSC911X_GPIO); + cm_t35_init_smsc911x(&sb_t35_smsc911x_device, + SB_T35_SMSC911X_CS, SB_T35_SMSC911X_GPIO); } #else -static inline void __init cm_t35_init_smsc911x(void) { return; } +static inline void __init cm_t35_init_ethernet(void) { return; } #endif #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) @@ -457,7 +488,7 @@ static void __init cm_t35_init(void) cm_t35_init_i2c(); cm_t35_init_nand(); cm_t35_init_ads7846(); - cm_t35_init_smsc911x(); + cm_t35_init_ethernet(); cm_t35_init_led(); usb_musb_init(); -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] omap3: cm-t35 updates 2009-11-11 11:19 [PATCH 0/3] omap3: cm-t35 updates Mike Rapoport ` (2 preceding siblings ...) 2009-11-11 11:19 ` [PATCH 3/3] omap3: cm-t35: add support for baseboard ehternet Mike Rapoport @ 2009-11-11 20:04 ` Tony Lindgren 3 siblings, 0 replies; 5+ messages in thread From: Tony Lindgren @ 2009-11-11 20:04 UTC (permalink / raw) To: Mike Rapoport; +Cc: linux-omap * Mike Rapoport <mike@compulab.co.il> [091111 03:25]: > Here are several small updates for CM-T35 board. > > Changes since commit e7e7a613eded2732b68496f69ff8fc34f16e1dd0: > Tony Lindgren (1): > Linux-omap rebuilt: Processor support for new omaps merged > > Mike Rapoport (3): > omap3: cm-t35: update led polarity > omap3: cm-t35: use matrix_keyboard > omap3: cm-t35: add support for baseboard ehternet > > arch/arm/mach-omap2/board-cm-t35.c | 71 ++++++++++++++++++++++++++---------- Merging all three into your earlier patch in omap for-next branch. Tony ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-11 20:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-11 11:19 [PATCH 0/3] omap3: cm-t35 updates Mike Rapoport 2009-11-11 11:19 ` [PATCH 1/3] omap3: cm-t35: update led polarity Mike Rapoport 2009-11-11 11:19 ` [PATCH 2/3] omap3: cm-t35: use matrix_keyboard Mike Rapoport 2009-11-11 11:19 ` [PATCH 3/3] omap3: cm-t35: add support for baseboard ehternet Mike Rapoport 2009-11-11 20:04 ` [PATCH 0/3] omap3: cm-t35 updates Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox