netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Blackfin Ethernet MAC driver compile error
@ 2007-10-02 11:30 Kalle Pokki
  2007-10-02 15:36 ` Robin Getz
  2007-10-04  9:12 ` Bryan Wu
  0 siblings, 2 replies; 6+ messages in thread
From: Kalle Pokki @ 2007-10-02 11:30 UTC (permalink / raw)
  To: linux-kernel, netdev, bryan.wu

The Blackfin Ethernet MAC driver does not compile. It seems the driver is
missing some pinmux defines.

  CC      drivers/net/bfin_mac.o
drivers/net/bfin_mac.c: In function 'setup_pin_mux':
drivers/net/bfin_mac.c:275: error: 'P_MII0' undeclared (first use in
this function)
drivers/net/bfin_mac.c:275: error: (Each undeclared identifier is
reported only once
drivers/net/bfin_mac.c:275: error: for each function it appears in.)
drivers/net/bfin_mac.c:279: error: implicit declaration of function
'peripheral_request_list'
drivers/net/bfin_mac.c:285: error: implicit declaration of function
'peripheral_free_list'
make[2]: *** [drivers/net/bfin_mac.o] Error 1
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Blackfin Ethernet MAC driver compile error
  2007-10-02 11:30 Blackfin Ethernet MAC driver compile error Kalle Pokki
@ 2007-10-02 15:36 ` Robin Getz
  2007-10-04  9:20   ` Bryan Wu
  2007-10-04  9:12 ` Bryan Wu
  1 sibling, 1 reply; 6+ messages in thread
From: Robin Getz @ 2007-10-02 15:36 UTC (permalink / raw)
  To: Kalle Pokki; +Cc: linux-kernel, netdev, bryan.wu

On Tue 2 Oct 2007 07:30, Kalle Pokki pondered:
> The Blackfin Ethernet MAC driver does not compile. It seems the driver is
> missing some pinmux defines.
> 
>   CC      drivers/net/bfin_mac.o
> drivers/net/bfin_mac.c: In function 'setup_pin_mux':
> drivers/net/bfin_mac.c:275: error: 'P_MII0' undeclared (first use in
> this function)
> drivers/net/bfin_mac.c:275: error: (Each undeclared identifier is
> reported only once
> drivers/net/bfin_mac.c:275: error: for each function it appears in.)

Unfortunately, Bryan is out for the week, so he can't update things..

The updates to include/asm-blackfin/mach-bf537/portmux.h seem to have been 
missing from Bryan's git tree, and therefore were not pushed to Linus's tree.

Sigh. - Sorry about that.

When Bryan gets back, he will update things, but for now, this might work. (I 
don't know if there are any other interdependencies).


--- portmux.h	2007-10-02 11:18:34.000000000 -0400
+++ ./linux-2.6.x/include/asm-blackfin/mach-bf537/portmux.h	2007-08-18 
19:37:22.000000000 -0400
@@ -99,11 +99,44 @@
 #define P_SPORT0_DRPRI	(P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0))
 #define P_SPORT0_TSCLK	(P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0))
 #define P_SPORT0_TFS	(P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0))
-#define P_SPORT0_DTPRI	(P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
+#define P_SPORT0_DTPRI	(P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(0))
 #define P_CAN0_RX	(P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1))
 #define P_CAN0_TX	(P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1))
 #define P_SPI0_SSEL3	(P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1))
 #define P_SPI0_SSEL2	(P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
 #define P_SPI0_SSEL7	(P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2))
 
-#endif /* _MACH_PORTMUX_H_ */
+#define P_MII0 {\
+	P_MII0_ETxD0, \
+	P_MII0_ETxD1, \
+	P_MII0_ETxD2, \
+	P_MII0_ETxD3, \
+	P_MII0_ETxEN, \
+	P_MII0_TxCLK, \
+	P_MII0_PHYINT, \
+	P_MII0_COL, \
+	P_MII0_ERxD0, \
+	P_MII0_ERxD1, \
+	P_MII0_ERxD2, \
+	P_MII0_ERxD3, \
+	P_MII0_ERxDV, \
+	P_MII0_ERxCLK, \
+	P_MII0_ERxER, \
+	P_MII0_CRS, \
+	P_MDC, \
+	P_MDIO, 0}
+
+
+#define P_RMII0 {\
+	P_MII0_ETxD0, \
+	P_MII0_ETxD1, \
+	P_MII0_ETxEN, \
+	P_MII0_ERxD0, \
+	P_MII0_ERxD1, \
+	P_MII0_ERxER, \
+	P_RMII0_REF_CLK, \
+	P_RMII0_MDINT, \
+	P_RMII0_CRS_DV, \
+	P_MDC, \
+	P_MDIO, 0}
+#endif			        	/* _MACH_PORTMUX_H_ */

> drivers/net/bfin_mac.c:279: error: implicit declaration of function
> 'peripheral_request_list'
> drivers/net/bfin_mac.c:285: error: implicit declaration of function
> 'peripheral_free_list'

Arg.

This was in an arch/blackfin/kernel/bfin_gpio.c update that hasn't seem to 
made it either.

In the future - we will make sure driver submissions are done in the correct 
order - so the proper infrastructure is in the tree before the driver is 
submitted. - Sorry.



Index: arch/blackfin/kernel/bfin_gpio.c
===================================================================
--- arch/blackfin/kernel/bfin_gpio.c	(revision 3403)
+++ arch/blackfin/kernel/bfin_gpio.c	(revision 3404)
@@ -84,6 +84,7 @@
 #include <linux/err.h>
 #include <asm/blackfin.h>
 #include <asm/gpio.h>
+#include <asm/portmux.h>
 #include <linux/irq.h>
 
 #ifdef BF533_FAMILY
@@ -115,8 +116,12 @@
 };
 #endif
 
-static unsigned short reserved_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
+static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
+static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS + 16)];
+char *str_ident = NULL;
 
+#define RESOURCE_LABEL_SIZE 16
+
 #ifdef CONFIG_PM
 static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
 static unsigned char wakeup_flags_map[MAX_BLACKFIN_GPIOS];
@@ -143,13 +148,39 @@
 	return 0;
 }
 
+static void set_label(unsigned short ident, const char *label)
+{
+
+	if (label && str_ident) {
+		strncpy(str_ident + ident * RESOURCE_LABEL_SIZE, label,
+			 RESOURCE_LABEL_SIZE);
+		str_ident[ident * RESOURCE_LABEL_SIZE +
+			 RESOURCE_LABEL_SIZE - 1] = 0;
+	}
+}
+
+static char *get_label(unsigned short ident)
+{
+	if (!str_ident)
+		return "UNKNOWN";
+
+	return (str_ident[ident * RESOURCE_LABEL_SIZE] ?
+		(str_ident + ident * RESOURCE_LABEL_SIZE) : "UNKNOWN");
+}
+
+static int cmp_label(unsigned short ident, const char *label)
+{
+	if (label && str_ident)
+		return strncmp(str_ident + ident * RESOURCE_LABEL_SIZE,
+				 label, strlen(label));
+	else
+		return -EINVAL;
+}
+
 #ifdef BF537_FAMILY
 static void port_setup(unsigned short gpio, unsigned short usage)
 {
 	if (usage == GPIO_USAGE) {
-		if (*port_fer[gpio_bank(gpio)] & gpio_bit(gpio))
-			printk(KERN_WARNING "bfin-gpio: Possible Conflict with Peripheral "
-			       "usage and GPIO %d detected!\n", gpio);
 		*port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio);
 	} else
 		*port_fer[gpio_bank(gpio)] |= gpio_bit(gpio);
@@ -159,7 +190,57 @@
 # define port_setup(...)  do { } while (0)
 #endif
 
+#ifdef BF537_FAMILY
 
+#define PMUX_LUT_RES		0
+#define PMUX_LUT_OFFSET		1
+#define PMUX_LUT_ENTRIES	41
+#define PMUX_LUT_SIZE		2
+
+static unsigned short port_mux_lut[PMUX_LUT_ENTRIES][PMUX_LUT_SIZE] = {
+	{P_PPI0_D13, 11}, {P_PPI0_D14, 11}, {P_PPI0_D15, 11},
+	{P_SPORT1_TFS, 11}, {P_SPORT1_TSCLK, 11}, {P_SPORT1_DTPRI, 11},
+	{P_PPI0_D10, 10}, {P_PPI0_D11, 10}, {P_PPI0_D12, 10},
+	{P_SPORT1_RSCLK, 10}, {P_SPORT1_RFS, 10}, {P_SPORT1_DRPRI, 10},
+	{P_PPI0_D8, 9}, {P_PPI0_D9, 9}, {P_SPORT1_DRSEC, 9},
+	{P_SPORT1_DTSEC, 9}, {P_TMR2, 8}, {P_PPI0_FS3, 8}, {P_TMR3, 7},
+	{P_SPI0_SSEL4, 7}, {P_TMR4, 6}, {P_SPI0_SSEL5, 6}, {P_TMR5, 5},
+	{P_SPI0_SSEL6, 5}, {P_UART1_RX, 4}, {P_UART1_TX, 4}, {P_TMR6, 4},
+	{P_TMR7, 4}, {P_UART0_RX, 3}, {P_UART0_TX, 3}, {P_DMAR0, 3},
+	{P_DMAR1, 3}, {P_SPORT0_DTSEC, 1}, {P_SPORT0_DRSEC, 1},
+	{P_CAN0_RX, 1}, {P_CAN0_TX, 1}, {P_SPI0_SSEL7, 1},
+	{P_SPORT0_TFS, 0}, {P_SPORT0_DTPRI, 0}, {P_SPI0_SSEL2, 0},
+	{P_SPI0_SSEL3, 0}
+};
+
+static void portmux_setup(unsigned short per, unsigned short function)
+{
+	u16 y, muxreg, offset;
+
+	for (y = 0; y < PMUX_LUT_ENTRIES; y++) {
+		if (port_mux_lut[y][PMUX_LUT_RES] == per) {
+
+			/* SET PORTMUX REG */
+
+			offset = port_mux_lut[y][PMUX_LUT_OFFSET];
+			muxreg = bfin_read_PORT_MUX();
+
+			if (offset != 1) {
+				muxreg &= ~(1 << offset);
+			} else {
+				muxreg &= ~(3 << 1);
+			}
+
+			muxreg |= (function << offset);
+			bfin_write_PORT_MUX(muxreg);
+		}
+	}
+}
+
+#else
+# define portmux_setup(...)  do { } while (0)
+#endif
+
 static void default_gpio(unsigned short gpio)
 {
 	unsigned short bank, bitmask;
@@ -179,22 +260,15 @@
 
 static int __init bfin_gpio_init(void)
 {
-	int i;
 
+	str_ident = kzalloc(RESOURCE_LABEL_SIZE * 256, GFP_KERNEL);
+	if (!str_ident)
+		return -ENOMEM;
+
 	printk(KERN_INFO "Blackfin GPIO Controller\n");
 
-	for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
-		reserved_map[gpio_bank(i)] = 0;
+	return 0;
 
-#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || 
defined(CONFIG_BFIN_MAC_MODULE))
-# if defined(CONFIG_BFIN_MAC_RMII)
-	reserved_map[gpio_bank(PORT_H)] = 0xC373;
-# else
-	reserved_map[gpio_bank(PORT_H)] = 0xFFFF;
-# endif
-#endif
-
-	return 0;
 }
 
 arch_initcall(bfin_gpio_init);
@@ -223,7 +297,7 @@
 void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
 { \
 	unsigned long flags; \
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
 	local_irq_save(flags); \
 	if (arg) \
 		gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
@@ -243,7 +317,7 @@
 #define SET_GPIO_SC(name) \
 void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
 { \
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
 	if (arg) \
 		gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
 	else \
@@ -258,7 +332,7 @@
 void set_gpio_data(unsigned short gpio, unsigned short arg)
 {
 	unsigned long flags;
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 	local_irq_save(flags);
 	if (arg)
 		gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
@@ -277,7 +351,7 @@
 void set_gpio_toggle(unsigned short gpio)
 {
 	unsigned long flags;
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 	local_irq_save(flags);
 	gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
 	bfin_read_CHIPID();
@@ -286,7 +360,7 @@
 #else
 void set_gpio_toggle(unsigned short gpio)
 {
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 	gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
 }
 #endif
@@ -350,7 +424,7 @@
 {
 	unsigned long flags;
 	unsigned short ret;
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 	local_irq_save(flags);
 	ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->data >> gpio_sub_n(gpio));
 	bfin_read_CHIPID();
@@ -494,13 +568,14 @@
 			gpio_bank_saved[bank].dir   = gpio_bankb[bank]->dir;
 			gpio_bank_saved[bank].edge  = gpio_bankb[bank]->edge;
 			gpio_bank_saved[bank].both  = gpio_bankb[bank]->both;
-			gpio_bank_saved[bank].reserved = reserved_map[bank];
+			gpio_bank_saved[bank].reserved =
+						reserved_gpio_map[bank];
 
 			gpio = i;
 
 			while (mask) {
 				if (mask & 1) {
-					reserved_map[gpio_bank(gpio)] |=
+					reserved_gpio_map[gpio_bank(gpio)] |=
 							gpio_bit(gpio);
 					bfin_gpio_wakeup_type(gpio,
 						wakeup_flags_map[gpio]);
@@ -540,7 +615,8 @@
 			gpio_bankb[bank]->edge  = gpio_bank_saved[bank].edge;
 			gpio_bankb[bank]->both  = gpio_bank_saved[bank].both;
 
-			reserved_map[bank] = gpio_bank_saved[bank].reserved;
+			reserved_gpio_map[bank] =
+					gpio_bank_saved[bank].reserved;
 
 		}
 
@@ -550,6 +626,140 @@
 
 #endif
 
+
+
+
+int peripheral_request(unsigned short per, const char *label)
+{
+	unsigned long flags;
+	unsigned short ident = P_IDENT(per);
+
+	/*
+	 * Don't cares are pins with only one dedicated function
+	 */
+
+	if (per & P_DONTCARE)
+		return 0;
+
+	if (!(per & P_DEFINED))
+		return -ENODEV;
+
+	if (check_gpio(ident) < 0)
+		return -EINVAL;
+
+	local_irq_save(flags);
+
+	if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
+		printk(KERN_ERR
+		       "%s: Peripheral %d is already reserved as GPIO by %s !\n",
+		       __FUNCTION__, ident, get_label(ident));
+		dump_stack();
+		local_irq_restore(flags);
+		return -EBUSY;
+	}
+
+	if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
+
+	/*
+	 * Pin functions like AMC address strobes my
+	 * be requested and used by several drivers
+	 */
+
+	if (!(per & P_MAYSHARE)) {
+
+	/*
+	 * Allow that the identical pin function can
+	 * be requested from the same driver twice
+	 */
+
+		if (cmp_label(ident, label) == 0)
+			goto anyway;
+
+			printk(KERN_ERR
+			       "%s: Peripheral %d function %d is already"
+			       "reserved by %s !\n",
+			       __FUNCTION__, ident, P_FUNCT2MUX(per),
+				get_label(ident));
+			dump_stack();
+			local_irq_restore(flags);
+			return -EBUSY;
+		}
+
+	}
+
+anyway:
+
+
+	portmux_setup(per, P_FUNCT2MUX(per));
+
+	port_setup(ident, PERIPHERAL_USAGE);
+
+	reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
+	local_irq_restore(flags);
+	set_label(ident, label);
+
+	return 0;
+}
+EXPORT_SYMBOL(peripheral_request);
+
+int peripheral_request_list(unsigned short per[], const char *label)
+{
+	u16 cnt;
+	int ret;
+
+	for (cnt = 0; per[cnt] != 0; cnt++) {
+		ret = peripheral_request(per[cnt], label);
+		if (ret < 0)
+			return ret;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(peripheral_request_list);
+
+void peripheral_free(unsigned short per)
+{
+	unsigned long flags;
+	unsigned short ident = P_IDENT(per);
+
+	if (per & P_DONTCARE)
+		return;
+
+	if (!(per & P_DEFINED))
+		return;
+
+	if (check_gpio(ident) < 0)
+		return;
+
+	local_irq_save(flags);
+
+	if (unlikely(!(reserved_peri_map[gpio_bank(ident)]
+			 & gpio_bit(ident)))) {
+		local_irq_restore(flags);
+		return;
+	}
+
+	if (!(per & P_MAYSHARE)) {
+		port_setup(ident, GPIO_USAGE);
+	}
+
+	reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
+
+	local_irq_restore(flags);
+}
+EXPORT_SYMBOL(peripheral_free);
+
+void peripheral_free_list(unsigned short per[])
+{
+	u16 cnt;
+
+	for (cnt = 0; per[cnt] != 0; cnt++) {
+		peripheral_free(per[cnt]);
+	}
+
+}
+EXPORT_SYMBOL(peripheral_free_list);
+
 /***********************************************************
 *
 * FUNCTIONS: Blackfin GPIO Driver
@@ -574,13 +784,13 @@
 
 	local_irq_save(flags);
 
-	if (unlikely(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
+	if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
 		printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio);
 		dump_stack();
 		local_irq_restore(flags);
 		return -EBUSY;
 	}
-	reserved_map[gpio_bank(gpio)] |= gpio_bit(gpio);
+	reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
 
 	local_irq_restore(flags);
 
@@ -599,7 +809,7 @@
 
 	local_irq_save(flags);
 
-	if (unlikely(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
+	if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
 		printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
 		dump_stack();
 		local_irq_restore(flags);
@@ -608,7 +818,7 @@
 
 	default_gpio(gpio);
 
-	reserved_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
+	reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
 
 	local_irq_restore(flags);
 }
@@ -618,7 +828,7 @@
 {
 	unsigned long flags;
 
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 
 	local_irq_save(flags);
 	gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio);
@@ -631,7 +841,7 @@
 {
 	unsigned long flags;
 
-	BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+	BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 
 	local_irq_save(flags);
 	gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Blackfin Ethernet MAC driver compile error
  2007-10-02 11:30 Blackfin Ethernet MAC driver compile error Kalle Pokki
  2007-10-02 15:36 ` Robin Getz
@ 2007-10-04  9:12 ` Bryan Wu
  2007-10-04 14:26   ` Kalle Pokki
  1 sibling, 1 reply; 6+ messages in thread
From: Bryan Wu @ 2007-10-04  9:12 UTC (permalink / raw)
  To: Kalle Pokki; +Cc: linux-kernel, netdev, bryan.wu

On Tue, 2007-10-02 at 19:30 +0800, Kalle Pokki wrote:
> The Blackfin Ethernet MAC driver does not compile. It seems the driver
> is 
> missing some pinmux defines.
> 
>   CC      drivers/net/bfin_mac.o 
> drivers/net/bfin_mac.c: In function 'setup_pin_mux': 
> drivers/net/bfin_mac.c:275: error: 'P_MII0' undeclared (first use in 
> this function) 
> drivers/net/bfin_mac.c:275: error: (Each undeclared identifier is 
> reported only once 
> drivers/net/bfin_mac.c:275: error: for each function it appears in.) 
> drivers/net/bfin_mac.c:279: error: implicit declaration of function 
> 'peripheral_request_list' 
> drivers/net/bfin_mac.c:285: error: implicit declaration of function 
> 'peripheral_free_list' 
> make[2]: *** [drivers/net/bfin_mac.o] Error 1 
> make[1]: *** [drivers/net] Error 2 
> make: *** [drivers] Error 2
> 
Sorry for missing the pinmux patches.
After Linus's git-pull, it should be fixed in the latest Linus mainline
git tree.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66b1f1a982bf4dbad9fa0de25b8d95c4936f05c4

Thanks a lot
-Bryan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Blackfin Ethernet MAC driver compile error
  2007-10-02 15:36 ` Robin Getz
@ 2007-10-04  9:20   ` Bryan Wu
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan Wu @ 2007-10-04  9:20 UTC (permalink / raw)
  To: Robin Getz; +Cc: Kalle Pokki, linux-kernel, netdev, bryan.wu

On Tue, 2007-10-02 at 23:36 +0800, Robin Getz wrote:
> On Tue 2 Oct 2007 07:30, Kalle Pokki pondered: 
> > The Blackfin Ethernet MAC driver does not compile. It seems the
> driver is 
> > missing some pinmux defines. 
> > 
> >   CC      drivers/net/bfin_mac.o 
> > drivers/net/bfin_mac.c: In function 'setup_pin_mux': 
> > drivers/net/bfin_mac.c:275: error: 'P_MII0' undeclared (first use
> in 
> > this function) 
> > drivers/net/bfin_mac.c:275: error: (Each undeclared identifier is 
> > reported only once 
> > drivers/net/bfin_mac.c:275: error: for each function it appears in.)
> 
> Unfortunately, Bryan is out for the week, so he can't update things..

I am here, although it is National Day holiday in China and I am not in
office.
> 
> The updates to include/asm-blackfin/mach-bf537/portmux.h seem to have
> been 
> missing from Bryan's git tree, and therefore were not pushed to
> Linus's tree.
> 
Yes, it was not merged to Linus's tree almost one month ago.
But now Linus git-pull it from my git-tree 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66b1f1a982bf4dbad9fa0de25b8d95c4936f05c4

> Sigh. - Sorry about that.
> 
> When Bryan gets back, he will update things, but for now, this might
> work. (I 
> don't know if there are any other interdependencies).
> 
Sorry again, some important core API changes should be merged before
drivers.
> 
> --- portmux.h   2007-10-02 11:18:34.000000000 -0400 
> +++ ./linux-2.6.x/include/asm-blackfin/mach-bf537/portmux.h
> 2007-08-18 
> 19:37:22.000000000 -0400 
> @@ -99,11 +99,44 @@ 
>  #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(PORT_PJ8) | P_FUNCT(0)) 
>  #define P_SPORT0_TSCLK (P_DEFINED | P_IDENT(PORT_PJ9) | P_FUNCT(0)) 
>  #define P_SPORT0_TFS   (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0)) 
> -#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) 
> +#define P_SPORT0_DTPRI (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(0)) 
>  #define P_CAN0_RX      (P_DEFINED | P_IDENT(PORT_PJ4) | P_FUNCT(1)) 
>  #define P_CAN0_TX      (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(1)) 
>  #define P_SPI0_SSEL3   (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(1)) 
>  #define P_SPI0_SSEL2   (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1)) 
>  #define P_SPI0_SSEL7   (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2)) 
>   
> -#endif /* _MACH_PORTMUX_H_ */ 
> +#define P_MII0 {\ 
> +       P_MII0_ETxD0, \ 
> +       P_MII0_ETxD1, \ 
> +       P_MII0_ETxD2, \ 
> +       P_MII0_ETxD3, \ 
> +       P_MII0_ETxEN, \ 
> +       P_MII0_TxCLK, \ 
> +       P_MII0_PHYINT, \ 
> +       P_MII0_COL, \ 
> +       P_MII0_ERxD0, \ 
> +       P_MII0_ERxD1, \ 
> +       P_MII0_ERxD2, \ 
> +       P_MII0_ERxD3, \ 
> +       P_MII0_ERxDV, \ 
> +       P_MII0_ERxCLK, \ 
> +       P_MII0_ERxER, \ 
> +       P_MII0_CRS, \ 
> +       P_MDC, \ 
> +       P_MDIO, 0} 
> + 
> + 
> +#define P_RMII0 {\ 
> +       P_MII0_ETxD0, \ 
> +       P_MII0_ETxD1, \ 
> +       P_MII0_ETxEN, \ 
> +       P_MII0_ERxD0, \ 
> +       P_MII0_ERxD1, \ 
> +       P_MII0_ERxER, \ 
> +       P_RMII0_REF_CLK, \ 
> +       P_RMII0_MDINT, \ 
> +       P_RMII0_CRS_DV, \ 
> +       P_MDC, \ 
> +       P_MDIO, 0} 
> +#endif                                 /* _MACH_PORTMUX_H_ */
> 
> > drivers/net/bfin_mac.c:279: error: implicit declaration of function 
> > 'peripheral_request_list' 
> > drivers/net/bfin_mac.c:285: error: implicit declaration of function 
> > 'peripheral_free_list'
> 
> Arg.
> 
> This was in an arch/blackfin/kernel/bfin_gpio.c update that hasn't
> seem to 
> made it either.
> 
> In the future - we will make sure driver submissions are done in the
> correct 
> order - so the proper infrastructure is in the tree before the driver
> is 
> submitted. - Sorry.
> 
I will try my best to keep them in order or fix it as soon as possible,
-:)))

[!snip!]
> 
Thanks
-Bryan
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Blackfin Ethernet MAC driver compile error
  2007-10-04  9:12 ` Bryan Wu
@ 2007-10-04 14:26   ` Kalle Pokki
  2007-10-04 16:31     ` Bryan Wu
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Pokki @ 2007-10-04 14:26 UTC (permalink / raw)
  To: bryan.wu; +Cc: linux-kernel, netdev

On 10/4/07, Bryan Wu <bryan.wu@analog.com> wrote:
> Sorry for missing the pinmux patches.
> After Linus's git-pull, it should be fixed in the latest Linus mainline
> git tree.

Thanks, it is working now. I was also glad to see the binfmt_flat
patch going in.

Do you plan to get the PHY abstraction layer patches for the Blackfin
EMAC included in the upcoming merge window?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Blackfin Ethernet MAC driver compile error
  2007-10-04 14:26   ` Kalle Pokki
@ 2007-10-04 16:31     ` Bryan Wu
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan Wu @ 2007-10-04 16:31 UTC (permalink / raw)
  To: Kalle Pokki; +Cc: bryan.wu, linux-kernel, netdev

On Thu, 2007-10-04 at 22:26 +0800, Kalle Pokki wrote:
> On 10/4/07, Bryan Wu <bryan.wu@analog.com> wrote: 
> > Sorry for missing the pinmux patches. 
> > After Linus's git-pull, it should be fixed in the latest Linus
> mainline 
> > git tree.
> 
> Thanks, it is working now. I was also glad to see the binfmt_flat 
> patch going in.

Yeah, thanks Linus to accept the patches 
> 
> Do you plan to get the PHY abstraction layer patches for the Blackfin 
> EMAC included in the upcoming merge window?

Currently, it is in Jeff's netdev-2.6.git tree. IMO, Jeff will send it
to Linus when merge window open.

Regards
-Bryan Wu
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-04 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 11:30 Blackfin Ethernet MAC driver compile error Kalle Pokki
2007-10-02 15:36 ` Robin Getz
2007-10-04  9:20   ` Bryan Wu
2007-10-04  9:12 ` Bryan Wu
2007-10-04 14:26   ` Kalle Pokki
2007-10-04 16:31     ` Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).