public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.16-git18: collie_defconfig broken
@ 2006-03-30 12:25 Russell King
  2006-03-30 13:16 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2006-03-30 12:25 UTC (permalink / raw)
  To: Linux Kernel List, Pavel Machek, Richard Purdie, lenz

The kautobuild found the following error while trying to build 2.6.16-git18
using collie_defconfig:

arch/arm/mach-sa1100/collie.c:92: error: 'collie_uart_set_mctrl' undeclared here (not in a function)
arch/arm/mach-sa1100/collie.c:93: error: 'collie_uart_get_mctrl' undeclared here (not in a function)
make[1]: *** [arch/arm/mach-sa1100/collie.o] Error 1
make: *** [arch/arm/mach-sa1100] Error 2
make: Leaving directory `/var/tmp/kernel-orig'

See

http://armlinux.simtec.co.uk/kautobuild/2.6.16-git18/collie_defconfig/zimage.log

for the full build log.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

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

* Re: 2.6.16-git18: collie_defconfig broken
  2006-03-30 12:25 2.6.16-git18: collie_defconfig broken Russell King
@ 2006-03-30 13:16 ` Pavel Machek
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2006-03-30 13:16 UTC (permalink / raw)
  To: Linux Kernel List, Richard Purdie, lenz; +Cc: patches

Hi!

> The kautobuild found the following error while trying to build 2.6.16-git18
> using collie_defconfig:
> 
> arch/arm/mach-sa1100/collie.c:92: error: 'collie_uart_set_mctrl' undeclared here (not in a function)
> arch/arm/mach-sa1100/collie.c:93: error: 'collie_uart_get_mctrl' undeclared here (not in a function)
> make[1]: *** [arch/arm/mach-sa1100/collie.o] Error 1
> make: *** [arch/arm/mach-sa1100] Error 2
> make: Leaving directory `/var/tmp/kernel-orig'
> 
> See
> 
> http://armlinux.simtec.co.uk/kautobuild/2.6.16-git18/collie_defconfig/zimage.log
> 
> for the full build log.

This fixes above compile error by adding missing pieces of uart
support, and fixes compilation.

Signed-off-by: Pavel Machek <pavel@suse.cz>
PATCH FOLLOWS
KernelVersion: 2.6.16-git

diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 1024540..10ebb84 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -11,7 +11,8 @@
  * published by the Free Software Foundation.
  *
  * ChangeLog:
- *  03-06-2004 John Lenz <jelenz@wisc.edu>
+ *  2006 Pavel Machek <pavel@suse.cz>
+ *  03-06-2004 John Lenz <lenz@cs.wisc.edu>
  *  06-04-2002 Chris Larson <kergoth@digitalnemesis.net>
  *  04-16-2001 Lineo Japan,Inc. ...
  */
@@ -87,12 +88,75 @@ static struct mcp_plat_data collie_mcp_d
 	.sclk_rate      = 11981000,
 };
 
+#ifdef CONFIG_SHARP_LOCOMO
+/*
+ * low-level UART features.
+ */
+static struct locomo_dev *uart_dev = NULL;
+
+static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl)
+{
+ 	if (!uart_dev) return;
+	
+ 	if (mctrl & TIOCM_RTS)
+		locomo_gpio_write(uart_dev, LOCOMO_GPIO_RTS, 0);
+ 	else
+		locomo_gpio_write(uart_dev, LOCOMO_GPIO_RTS, 1);
+	
+ 	if (mctrl & TIOCM_DTR)
+		locomo_gpio_write(uart_dev, LOCOMO_GPIO_DTR, 0);
+ 	else
+		locomo_gpio_write(uart_dev, LOCOMO_GPIO_DTR, 1);
+}
+ 
+static u_int collie_uart_get_mctrl(struct uart_port *port)
+{
+	int ret = TIOCM_CD;
+	unsigned int r;
+	if (!uart_dev) return ret;
+
+	r = locomo_gpio_read_output(uart_dev, LOCOMO_GPIO_CTS & LOCOMO_GPIO_DSR);
+	if (r & LOCOMO_GPIO_CTS)
+		ret |= TIOCM_CTS;
+	if (r & LOCOMO_GPIO_DSR)
+		ret |= TIOCM_DSR;
+
+	return ret;
+}
 
 static struct sa1100_port_fns collie_port_fns __initdata = {
 	.set_mctrl	= collie_uart_set_mctrl,
 	.get_mctrl	= collie_uart_get_mctrl,
 };
 
+static int collie_uart_probe(struct locomo_dev *dev)
+{
+	uart_dev = dev;
+	return 0;
+}
+
+static int collie_uart_remove(struct locomo_dev *dev)
+{
+	uart_dev = NULL;
+	return 0;
+}
+
+static struct locomo_driver collie_uart_driver = {
+	.drv = {
+		.name = "collie_uart",
+	},
+	.devid	= LOCOMO_DEVID_UART,
+	.probe	= collie_uart_probe,
+	.remove	= collie_uart_remove,
+}; 
+
+static int __init collie_uart_init(void) {
+	return locomo_driver_register(&collie_uart_driver);
+}
+device_initcall(collie_uart_init);
+
+#endif
+
 
 static struct resource locomo_resources[] = {
 	[0] = {
@@ -218,6 +327,12 @@ static void __init collie_map_io(void)
 {
 	sa1100_map_io();
 	iotable_init(collie_io_desc, ARRAY_SIZE(collie_io_desc));
+
+#ifdef CONFIG_SHARP_LOCOMO
+	sa1100_register_uart_fns(&collie_port_fns);
+#endif
+	sa1100_register_uart(0, 3);
+	sa1100_register_uart(1, 1);
 }
 
 MACHINE_START(COLLIE, "Sharp-Collie")


-- 
Picture of sleeping (Linux) penguin wanted...

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

end of thread, other threads:[~2006-03-30 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 12:25 2.6.16-git18: collie_defconfig broken Russell King
2006-03-30 13:16 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox