[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-313-g1f7876c
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-05-21 14:28:05
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 1f7876c13221e763807e08db3dd03a5e0f7e2b65 (commit)
from 5e10423791ebe4eef46ddcde2140857de1f0e5cd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1f7876c13221e763807e08db3dd03a5e0f7e2b65
Author: Eric Jarrige <eri...@ar...>
Date: Mon May 21 16:27:52 2012 +0200
[LINUX] apf28: Support both ethernet interfaces (eth0 / apf28 and eth1 / apf28dev)
-----------------------------------------------------------------------
Summary of changes:
.../450-armadeus-add_apf28_module_support.patch | 313 ++++++++++----------
...1-armadeus-add_apf28dev_baseboard_support.patch | 161 ++++++++++-
2 files changed, 322 insertions(+), 152 deletions(-)
diff --git a/patches/linux/2.6.35/450-armadeus-add_apf28_module_support.patch b/patches/linux/2.6.35/450-armadeus-add_apf28_module_support.patch
index 42b7c8a..1940bea 100644
--- a/patches/linux/2.6.35/450-armadeus-add_apf28_module_support.patch
+++ b/patches/linux/2.6.35/450-armadeus-add_apf28_module_support.patch
@@ -37,7 +37,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/mach-apf28.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.35.3/arch/arm/mach-mx28/mach-apf28.c 2012-02-03 17:39:56.000000000 +0100
-@@ -0,0 +1,310 @@
+@@ -0,0 +1,323 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -81,203 +81,210 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/mach-apf28.c
+
+#include "mx28_pins.h"
+#include "device.h"
-+//#include "mx28evk.h"
+
+extern void apf28_baseboard_init(void);
+
+static struct pin_desc apf28_fixed_pins[] = {
+ {
-+ .name = "DUART.RX",
-+ .id = PINID_PWM0,
-+ .fun = PIN_FUN3,
++ .name = "DUART.RX",
++ .id = PINID_PWM0,
++ .fun = PIN_FUN3,
+ },
+ {
-+ .name = "DUART.TX",
-+ .id = PINID_PWM1,
-+ .fun = PIN_FUN3,
-+ },
-+ {
-+ .name = "ENET0_MDC",
-+ .id = PINID_ENET0_MDC,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
-+ },
-+ {
-+ .name = "ENET0_MDIO",
-+ .id = PINID_ENET0_MDIO,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
-+ },
-+ {
-+ .name = "ENET0_RX_EN",
-+ .id = PINID_ENET0_RX_EN,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
-+ },
-+ {
-+ .name = "ENET0_RXD0",
-+ .id = PINID_ENET0_RXD0,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "DUART.TX",
++ .id = PINID_PWM1,
++ .fun = PIN_FUN3,
+ },
++};
++
++static struct pin_desc apf28_eth_pins[] = {
++#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)\
++ || defined(CONFIG_FEC_L2SWITCH)
+ {
-+ .name = "ENET0_RXD1",
-+ .id = PINID_ENET0_RXD1,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_MDC",
++ .id = PINID_ENET0_MDC,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET0_TX_EN",
-+ .id = PINID_ENET0_TX_EN,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_MDIO",
++ .id = PINID_ENET0_MDIO,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET0_TXD0",
-+ .id = PINID_ENET0_TXD0,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_RX_EN",
++ .id = PINID_ENET0_RX_EN,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET0_TXD1",
-+ .id = PINID_ENET0_TXD1,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_RXD0",
++ .id = PINID_ENET0_RXD0,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET1_RX_EN",
-+ .id = PINID_ENET0_CRS,
-+ .fun = PIN_FUN2,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_RXD1",
++ .id = PINID_ENET0_RXD1,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET1_RXD0",
-+ .id = PINID_ENET0_RXD2,
-+ .fun = PIN_FUN2,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_TX_EN",
++ .id = PINID_ENET0_TX_EN,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET1_RXD1",
-+ .id = PINID_ENET0_RXD3,
-+ .fun = PIN_FUN2,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_TXD0",
++ .id = PINID_ENET0_TXD0,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET1_TX_EN",
-+ .id = PINID_ENET0_COL,
-+ .fun = PIN_FUN2,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET0_TXD1",
++ .id = PINID_ENET0_TXD1,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET1_TXD0",
-+ .id = PINID_ENET0_TXD2,
-+ .fun = PIN_FUN2,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ENET_CLK",
++ .id = PINID_ENET_CLK,
++ .fun = PIN_FUN1,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
+ },
+ {
-+ .name = "ENET1_TXD1",
-+ .id = PINID_ENET0_TXD3,
-+ .fun = PIN_FUN2,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "PHY0_RESET",
++ .id = PINID_ENET0_RX_CLK,
++ .fun = PIN_GPIO,
++ .strength = PAD_4MA,
++ .voltage = PAD_3_3V,
++ .pullup = 0,
++ .drive = 1,
++ .pull = 0,
++ .output = 1,
++ .data = 1,
+ },
+ {
-+ .name = "ENET_CLK",
-+ .id = PINID_ENET_CLK,
-+ .fun = PIN_FUN1,
-+ .strength = PAD_8MA,
-+ .pull = 1,
-+ .pullup = 1,
-+ .voltage = PAD_3_3V,
-+ .drive = 1,
++ .name = "ETH0_INT",
++ .id = PINID_ENET0_TX_CLK,
++ .fun = PIN_GPIO,
++ .strength = PAD_4MA,
++ .voltage = PAD_3_3V,
++ .pullup = 0,
++ .drive = 1,
++ .pull = 0,
++ .output = 0,
+ },
++#endif /* defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE) */
+};
+
-+/* used by device.c (mx28evk makes it a bootcmd option) */
-+int enable_gpmi = 1;
-+
-+/* another Freescale hack: */
-+int mx28evk_enet_gpio_init(void)
++int __inline__ apf28_enet0_gpio_init(void)
+{
+ /* reset phy */
-+ gpio_request(MXS_PIN_TO_GPIO(PINID_ENET0_RX_CLK), "PHY_RESET");
+ gpio_direction_output(MXS_PIN_TO_GPIO(PINID_ENET0_RX_CLK), 0);
+
-+ /*
-+ * Before timer bug fix(set wrong match value of timer),
-+ * mdelay(10) delay 50ms actually.
-+ * So change delay to 50ms after timer issue fix.
-+ */
-+ mdelay(50);
++ udelay(100);
+ gpio_direction_output(MXS_PIN_TO_GPIO(PINID_ENET0_RX_CLK), 1);
+
+ return 0;
+}
+
++void __inline__ apf28_enet0_io_lowerpower_enter(void)
++{
++ int i;
++ for (i = 0; i < ARRAY_SIZE(apf28_eth_pins); i++) {
++ mxs_release_pin(apf28_eth_pins[i].id,
++ apf28_eth_pins[i].name);
++ gpio_request(MXS_PIN_TO_GPIO(apf28_eth_pins[i].id),
++ apf28_eth_pins[i].name);
++ gpio_direction_output(
++ MXS_PIN_TO_GPIO(apf28_eth_pins[i].id), 0);
++ }
++}
++
++void __inline__ apf28_enet0_io_lowerpower_exit(void)
++{
++ int i;
++ for (i = 0; i < ARRAY_SIZE(apf28_eth_pins); i++) {
++ gpio_free(MXS_PIN_TO_GPIO(apf28_eth_pins[i].id));
++ if (apf28_eth_pins[i].fun != PIN_GPIO)
++ mxs_request_pin(apf28_eth_pins[i].id,
++ apf28_eth_pins[i].fun,
++ apf28_eth_pins[i].name);
++ else {
++ gpio_request(MXS_PIN_TO_GPIO(apf28_eth_pins[i].id),
++ apf28_eth_pins[i].name);
++ if (apf28_eth_pins[i].output)
++ gpio_direction_output(
++ MXS_PIN_TO_GPIO(apf28_eth_pins[i].id),
++ apf28_eth_pins[i].data);
++ else
++ gpio_direction_input(
++ MXS_PIN_TO_GPIO(apf28_eth_pins[i].id));
++ }
++ }
++}
++
++#if !defined(CONFIG_FEC2) && !defined(CONFIG_FEC2_MODULE)\
++ && !defined(CONFIG_FEC_L2SWITCH)
++int mx28evk_enet_gpio_init(void)
++{
++ apf28_enet0_gpio_init();
++ return 0;
++}
++
+void mx28evk_enet_io_lowerpower_enter(void)
+{
-+ printk("--- %s not implemented (yet)\n", __func__);
++ apf28_enet0_io_lowerpower_enter();
+}
+
+void mx28evk_enet_io_lowerpower_exit(void)
+{
-+ printk("--- %s not implemented (yet)\n", __func__);
++ apf28_enet0_io_lowerpower_exit();
+}
++#endif
++
++/* used by device.c (mx28evk makes it a bootcmd option) */
++int enable_gpmi = 1;
++
+
+static void __init fixup_board(struct machine_desc *desc, struct tag *tags,
+ char **cmdline, struct meminfo *mi)
@@ -330,6 +337,12 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/mach-apf28.c
+
+ mx28_gpio_init();
+ apf28_init_pin_group(apf28_fixed_pins, ARRAY_SIZE(apf28_fixed_pins));
++
++#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)\
++ || defined(CONFIG_FEC_L2SWITCH)
++ apf28_init_pin_group(apf28_eth_pins, ARRAY_SIZE(apf28_eth_pins));
++#endif /* defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE) */
++
+ mx28_device_init();
+ apf28_device_init();
+
diff --git a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
index 45e56cb..233ac93 100644
--- a/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
+++ b/patches/linux/2.6.35/451-armadeus-add_apf28dev_baseboard_support.patch
@@ -45,7 +45,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c 2012-02-15 15:51:09.000000000 +0100
-@@ -0,0 +1,381 @@
+@@ -0,0 +1,539 @@
+/*
+ * Copyright (C) 2012 Armadeus systems
+ *
@@ -72,6 +72,7 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#include <linux/io.h>
+#include <linux/err.h>
+#include <linux/clk.h>
++#include <linux/delay.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+#include <linux/leds.h>
@@ -354,6 +355,95 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ },
+};
+
++#if defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE)\
++ || defined(CONFIG_FEC_L2SWITCH)
++static struct pin_desc apf28dev_eth_pins[] = {
++ {
++ .name = "ENET1_RX_EN",
++ .id = PINID_ENET0_CRS,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
++ {
++ .name = "ENET1_RXD0",
++ .id = PINID_ENET0_RXD2,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
++ {
++ .name = "ENET1_RXD1",
++ .id = PINID_ENET0_RXD3,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
++ {
++ .name = "ENET1_TX_EN",
++ .id = PINID_ENET0_COL,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
++ {
++ .name = "ENET1_TXD0",
++ .id = PINID_ENET0_TXD2,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
++ {
++ .name = "ENET1_TXD1",
++ .id = PINID_ENET0_TXD3,
++ .fun = PIN_FUN2,
++ .strength = PAD_8MA,
++ .pull = 1,
++ .pullup = 1,
++ .voltage = PAD_3_3V,
++ .drive = 1,
++ },
++ {
++ .name = "PHY1_RESET",
++ .id = PINID_LCD_HSYNC,
++ .fun = PIN_GPIO,
++ .strength = PAD_4MA,
++ .voltage = PAD_3_3V,
++ .pullup = 0,
++ .drive = 1,
++ .pull = 0,
++ .output = 1,
++ .data = 1,
++ },
++ {
++ .name = "ETH1_INT",
++ .id = PINID_LCD_VSYNC,
++ .fun = PIN_GPIO,
++ .strength = PAD_4MA,
++ .voltage = PAD_3_3V,
++ .pullup = 0,
++ .drive = 1,
++ .pull = 0,
++ .output = 0,
++ },
++};
++#endif /* defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE).. */
++
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+static struct gpio_keys_button apf28dev_gpio_keys[] = {
+ {
@@ -412,6 +502,68 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+#endif
+};
+
++#if defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE)\
++ || defined(CONFIG_FEC_L2SWITCH)
++extern int apf28_enet0_gpio_init(void);
++extern void apf28_enet0_io_lowerpower_enter(void);
++extern void apf28_enet0_io_lowerpower_exit(void);
++
++int mx28evk_enet_gpio_init(void)
++{
++ /* reset phy */
++ apf28_enet0_gpio_init();
++
++ gpio_direction_output(MXS_PIN_TO_GPIO(PINID_LCD_HSYNC), 0);
++
++ udelay(100);
++ gpio_direction_output(MXS_PIN_TO_GPIO(PINID_LCD_HSYNC), 1);
++
++ return 0;
++}
++
++void mx28evk_enet_io_lowerpower_enter(void)
++{
++ int i;
++
++ apf28_enet0_io_lowerpower_enter();
++
++ for (i = 0; i < ARRAY_SIZE(apf28dev_eth_pins); i++) {
++ mxs_release_pin(apf28dev_eth_pins[i].id,
++ apf28dev_eth_pins[i].name);
++ gpio_request(MXS_PIN_TO_GPIO(apf28dev_eth_pins[i].id),
++ apf28dev_eth_pins[i].name);
++ gpio_direction_output(
++ MXS_PIN_TO_GPIO(apf28dev_eth_pins[i].id), 0);
++ }
++}
++
++void mx28evk_enet_io_lowerpower_exit(void)
++{
++ int i;
++
++ apf28_enet0_io_lowerpower_exit();
++
++ for (i = 0; i < ARRAY_SIZE(apf28dev_eth_pins); i++) {
++ gpio_free(MXS_PIN_TO_GPIO(apf28dev_eth_pins[i].id));
++ if (apf28dev_eth_pins[i].fun != PIN_GPIO)
++ mxs_request_pin(apf28dev_eth_pins[i].id,
++ apf28dev_eth_pins[i].fun,
++ apf28dev_eth_pins[i].name);
++ else {
++ gpio_request(MXS_PIN_TO_GPIO(apf28dev_eth_pins[i].id),
++ apf28dev_eth_pins[i].name);
++ if (apf28dev_eth_pins[i].output)
++ gpio_direction_output(
++ MXS_PIN_TO_GPIO(apf28dev_eth_pins[i].id),
++ apf28dev_eth_pins[i].data);
++ else
++ gpio_direction_input(
++ MXS_PIN_TO_GPIO(apf28dev_eth_pins[i].id));
++ }
++ }
++}
++#endif /* defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE).. */
++
+static void __init apf28dev_device_init(void)
+{
+ /* Add apf28dev special code */
@@ -425,9 +577,14 @@ Index: linux-2.6.35.3/arch/arm/mach-mx28/apf28dev.c
+ printk("--- apf28_baseboard_init %d\n", MXS_PIN_TO_GPIO(PINID_PWM3));
+
+ apf28_init_pin_group(apf28dev_fixed_pins, ARRAY_SIZE(apf28dev_fixed_pins));
++
++#if defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE)\
++ || defined(CONFIG_FEC_L2SWITCH)
++ apf28_init_pin_group(apf28dev_eth_pins, ARRAY_SIZE(apf28dev_eth_pins));
++#endif /* defined(CONFIG_FEC2) || defined(CONFIG_FEC2_MODULE).. */
++
+ apf28dev_device_init();
+}
-+
Index: linux-2.6.35.3/drivers/video/mxs/Kconfig
===================================================================
--- linux-2.6.35.3.orig/drivers/video/mxs/Kconfig 2012-02-15 14:42:20.000000000 +0100
hooks/post-receive
--
armadeus
|