* [PATCH v2] at91sam9260_devices: add flag to change ETX{2,3} pincfg on add_device_eth
[not found] <1323187817-28668-5-git-send-email-m.grzeschik@pengutronix.de>
@ 2011-12-09 11:28 ` Michael Grzeschik
2011-12-09 11:36 ` Michael Grzeschik
0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2011-12-09 11:28 UTC (permalink / raw)
To: barebox
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
- added missing define for AT91SAM_ETX2_ETX3_ALTERNATIVE
arch/arm/mach-at91/at91sam9260_devices.c | 9 +++++++--
arch/arm/mach-at91/include/mach/board.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 177f770..be1fdd9 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -63,8 +63,13 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
at91_set_B_periph(AT91_PIN_PA25, 0); /* ERX2 */
at91_set_B_periph(AT91_PIN_PA26, 0); /* ERX3 */
at91_set_B_periph(AT91_PIN_PA27, 0); /* ERXCK */
- at91_set_B_periph(AT91_PIN_PA23, 0); /* ETX2 */
- at91_set_B_periph(AT91_PIN_PA24, 0); /* ETX3 */
+ if (data->flags & AT91SAM_ETX2_ETX3_ALTERNATIVE) {
+ at91_set_B_periph(AT91_PIN_PA10, 0); /* ETX2 */
+ at91_set_B_periph(AT91_PIN_PA11, 0); /* ETX3 */
+ } else {
+ at91_set_B_periph(AT91_PIN_PA23, 0); /* ETX2 */
+ at91_set_B_periph(AT91_PIN_PA24, 0); /* ETX3 */
+ }
at91_set_B_periph(AT91_PIN_PA22, 0); /* ETXER */
}
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 546fe90..5e23688 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -51,6 +51,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);
#define AT91SAM_ETHER_MII (0 << 0)
#define AT91SAM_ETHER_RMII (1 << 0)
#define AT91SAM_ETHER_FORCE_LINK (1 << 1)
+#define AT91SAM_ETX2_ETX3_ALTERNATIVE (2 << 0)
struct at91_ether_platform_data {
unsigned int flags;
--
1.7.7.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] at91sam9260_devices: add flag to change ETX{2,3} pincfg on add_device_eth
2011-12-09 11:28 ` [PATCH v2] at91sam9260_devices: add flag to change ETX{2,3} pincfg on add_device_eth Michael Grzeschik
@ 2011-12-09 11:36 ` Michael Grzeschik
0 siblings, 0 replies; 2+ messages in thread
From: Michael Grzeschik @ 2011-12-09 11:36 UTC (permalink / raw)
To: barebox
Hi,
On Fri, Dec 09, 2011 at 12:28:42PM +0100, Michael Grzeschik wrote:
> diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
> index 546fe90..5e23688 100644
> --- a/arch/arm/mach-at91/include/mach/board.h
> +++ b/arch/arm/mach-at91/include/mach/board.h
> @@ -51,6 +51,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);
> #define AT91SAM_ETHER_MII (0 << 0)
> #define AT91SAM_ETHER_RMII (1 << 0)
> #define AT91SAM_ETHER_FORCE_LINK (1 << 1)
> +#define AT91SAM_ETX2_ETX3_ALTERNATIVE (2 << 0)
>
> struct at91_ether_platform_data {
> unsigned int flags;
> --
> 1.7.7.3
This Hunk was wrong and has already been fixed with commit e72399a
-#define AT91SAM_ETX2_ETX3_ALTERNATIVE (2 << 0)
+#define AT91SAM_ETX2_ETX3_ALTERNATIVE (1 << 2)
Regards,
Michael Grzeschik
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-09 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1323187817-28668-5-git-send-email-m.grzeschik@pengutronix.de>
2011-12-09 11:28 ` [PATCH v2] at91sam9260_devices: add flag to change ETX{2,3} pincfg on add_device_eth Michael Grzeschik
2011-12-09 11:36 ` Michael Grzeschik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox