[ARM] sa1100: add clock source support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d142b6e77d394a4fcc0a42381b03852bd9c4e263
Commit: d142b6e77d394a4fcc0a42381b03852bd9c4e263
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Nov 12 21:55:12 2007 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:40:57 2008 +

[ARM] sa1100: add clock source support

Add generic clock source support for SA11x0 platforms.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig|1 +
 arch/arm/mach-sa1100/time.c |   38 --
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a04f507..7425279 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -366,6 +366,7 @@ config ARCH_SA1100
select ARCH_DISCONTIGMEM_ENABLE
select ARCH_MTD_XIP
select GENERIC_GPIO
+   select GENERIC_TIME
help
  Support for StrongARM 11x0 based boards.
 
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index fdf7b01..7298435 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -14,6 +14,7 @@
 #include linux/irq.h
 #include linux/timex.h
 #include linux/signal.h
+#include linux/clocksource.h
 
 #include asm/mach/time.h
 #include asm/hardware.h
@@ -35,23 +36,6 @@ static int sa1100_set_rtc(void)
return 0;
 }
 
-/* IRQs are disabled before entering here from do_gettimeofday() */
-static unsigned long sa1100_gettimeoffset (void)
-{
-   unsigned long ticks_to_match, elapsed, usec;
-
-   /* Get ticks before next timer match */
-   ticks_to_match = OSMR0 - OSCR;
-
-   /* We need elapsed ticks since last match */
-   elapsed = LATCH - ticks_to_match;
-
-   /* Now convert them to usec */
-   usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
-
-   return usec;
-}
-
 #ifdef CONFIG_NO_IDLE_HZ
 static unsigned long initial_match;
 static int match_posponed;
@@ -96,6 +80,20 @@ static struct irqaction sa1100_timer_irq = {
.handler= sa1100_timer_interrupt,
 };
 
+static cycle_t sa1100_read_oscr(void)
+{
+   return OSCR;
+}
+
+static struct clocksource cksrc_sa1100_oscr = {
+   .name   = oscr,
+   .rating = 200,
+   .read   = sa1100_read_oscr,
+   .mask   = CLOCKSOURCE_MASK(32),
+   .shift  = 20,
+   .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
 static void __init sa1100_timer_init(void)
 {
unsigned long flags;
@@ -109,6 +107,11 @@ static void __init sa1100_timer_init(void)
OIER = OIER_E0; /* enable match on timer 0 to cause interrupts 
*/
OSMR0 = OSCR + LATCH;   /* set initial match */
local_irq_restore(flags);
+
+   cksrc_sa1100_oscr.mult =
+   clocksource_hz2mult(CLOCK_TICK_RATE, cksrc_sa1100_oscr.shift);
+
+   clocksource_register(cksrc_sa1100_oscr);
 }
 
 #ifdef CONFIG_NO_IDLE_HZ
@@ -182,7 +185,6 @@ struct sys_timer sa1100_timer = {
.init   = sa1100_timer_init,
.suspend= sa1100_timer_suspend,
.resume = sa1100_timer_resume,
-   .offset = sa1100_gettimeoffset,
 #ifdef CONFIG_NO_IDLE_HZ
.dyn_tick   = sa1100_dyn_tick,
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4795/1: S3C244X: Add armclk and setparent call

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=06dbbd69f94e97751782ef6f1a9bb19da60efd1c
Commit: 06dbbd69f94e97751782ef6f1a9bb19da60efd1c
Parent: 3a38e4be76e86c7b94c36dc8f3ce489987da24e4
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:35 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4795/1: S3C244X: Add armclk and setparent call

Add armclk to the supported clocks on the S3C2440 and S3C2442 to
better represent the DVS state which controls whether FCLK or HCLK
is fed to the ARM core.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/s3c244x-clock.c |   37 +
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/s3c244x-clock.c 
b/arch/arm/plat-s3c24xx/s3c244x-clock.c
index 0bf5e7f..faf3e0f 100644
--- a/arch/arm/plat-s3c24xx/s3c244x-clock.c
+++ b/arch/arm/plat-s3c24xx/s3c244x-clock.c
@@ -44,15 +44,52 @@
 #include asm/plat-s3c24xx/clock.h
 #include asm/plat-s3c24xx/cpu.h
 
+static int s3c2440_setparent_armclk(struct clk *clk, struct clk *parent)
+{
+   unsigned long camdivn;
+   unsigned long dvs;
+
+   if (parent == clk_f)
+   dvs = 0;
+   else if (parent == clk_h)
+   dvs = S3C2440_CAMDIVN_DVSEN;
+   else
+   return -EINVAL;
+
+   clk-parent = parent;
+
+   camdivn  = __raw_readl(S3C2440_CAMDIVN);
+   camdivn = ~S3C2440_CAMDIVN_DVSEN;
+   camdivn |= dvs;
+   __raw_writel(camdivn, S3C2440_CAMDIVN);
+
+   return 0;
+}
+
+static struct clk clk_arm = {
+   .name   = armclk,
+   .id = -1,
+   .set_parent = s3c2440_setparent_armclk,
+};
+
 static int s3c244x_clk_add(struct sys_device *sysdev)
 {
unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
unsigned long clkdivn;
struct clk *clock_upll;
+   int ret;
 
printk(S3C244X: Clock Support, DVS %s\n,
   (camdivn  S3C2440_CAMDIVN_DVSEN) ? on : off);
 
+   clk_arm.parent = (camdivn  S3C2440_CAMDIVN_DVSEN) ? clk_h : clk_f;
+
+   ret = s3c24xx_register_clock(clk_arm);
+   if (ret  0) {
+   printk(KERN_ERR S3C24XX: Failed to add armclk (%d)\n, ret);
+   return ret;
+   }
+
clock_upll = clk_get(NULL, upll);
if (IS_ERR(clock_upll)) {
printk(KERN_ERR S3C244X: Failed to get upll clock\n);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4794/1: S3C24XX: Comonise S3C2440 and S3C2442 clock code

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3a38e4be76e86c7b94c36dc8f3ce489987da24e4
Commit: 3a38e4be76e86c7b94c36dc8f3ce489987da24e4
Parent: c27cb681ac1598352569f75cb19850a12b7ef102
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:34 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4794/1: S3C24XX: Comonise S3C2440 and S3C2442 clock code

Merge together the bits of the S3C2440 and S3C2442 clock code
that can be.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2440/clock.c |   22 +---
 arch/arm/mach-s3c2442/clock.c |   22 +---
 arch/arm/plat-s3c24xx/Makefile|1 +
 arch/arm/plat-s3c24xx/s3c244x-clock.c |  100 +
 4 files changed, 103 insertions(+), 42 deletions(-)

diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c
index 79e2ea4..184d804 100644
--- a/arch/arm/mach-s3c2440/clock.c
+++ b/arch/arm/mach-s3c2440/clock.c
@@ -111,14 +111,9 @@ static struct clk s3c2440_clk_ac97 = {
 
 static int s3c2440_clk_add(struct sys_device *sysdev)
 {
-   unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
-   unsigned long clkdivn;
+   struct clk *clock_upll;
struct clk *clock_h;
struct clk *clock_p;
-   struct clk *clock_upll;
-
-   printk(S3C2440: Clock Support, DVS %s\n,
-  (camdivn  S3C2440_CAMDIVN_DVSEN) ? on : off);
 
clock_p = clk_get(NULL, pclk);
clock_h = clk_get(NULL, hclk);
@@ -129,21 +124,6 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
return -EINVAL;
}
 
-   /* check rate of UPLL, and if it is near 96MHz, then change
-* to using half the UPLL rate for the system */
-
-   if (clk_get_rate(clock_upll)  (94 * MHZ)) {
-   clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
-
-   mutex_lock(clocks_mutex);
-
-   clkdivn = __raw_readl(S3C2410_CLKDIVN);
-   clkdivn |= S3C2440_CLKDIVN_UCLK;
-   __raw_writel(clkdivn, S3C2410_CLKDIVN);
-
-   mutex_unlock(clocks_mutex);
-   }
-
s3c2440_clk_cam.parent = clock_h;
s3c2440_clk_ac97.parent = clock_p;
s3c2440_clk_cam_upll.parent = clock_upll;
diff --git a/arch/arm/mach-s3c2442/clock.c b/arch/arm/mach-s3c2442/clock.c
index 5b9e830..2d030d4 100644
--- a/arch/arm/mach-s3c2442/clock.c
+++ b/arch/arm/mach-s3c2442/clock.c
@@ -115,14 +115,9 @@ static struct clk s3c2442_clk_cam_upll = {
 
 static int s3c2442_clk_add(struct sys_device *sysdev)
 {
-   unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
-   unsigned long clkdivn;
+   struct clk *clock_upll;
struct clk *clock_h;
struct clk *clock_p;
-   struct clk *clock_upll;
-
-   printk(S3C2442: Clock Support, DVS %s\n,
-  (camdivn  S3C2440_CAMDIVN_DVSEN) ? on : off);
 
clock_p = clk_get(NULL, pclk);
clock_h = clk_get(NULL, hclk);
@@ -133,21 +128,6 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
return -EINVAL;
}
 
-   /* check rate of UPLL, and if it is near 96MHz, then change
-* to using half the UPLL rate for the system */
-
-   if (clk_get_rate(clock_upll)  (94 * MHZ)) {
-   clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
-
-   mutex_lock(clocks_mutex);
-
-   clkdivn = __raw_readl(S3C2410_CLKDIVN);
-   clkdivn |= S3C2440_CLKDIVN_UCLK;
-   __raw_writel(clkdivn, S3C2410_CLKDIVN);
-
-   mutex_unlock(clocks_mutex);
-   }
-
s3c2442_clk_cam.parent = clock_h;
s3c2442_clk_cam_upll.parent = clock_upll;
 
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index 8e5ccaa..131d202 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -23,6 +23,7 @@ obj-y += clock.o
 
 obj-$(CONFIG_CPU_S3C244X)  += s3c244x.o
 obj-$(CONFIG_CPU_S3C244X)  += s3c244x-irq.o
+obj-$(CONFIG_CPU_S3C244X)  += s3c244x-clock.o
 obj-$(CONFIG_PM_SIMTEC)+= pm-simtec.o
 obj-$(CONFIG_PM)   += pm.o
 obj-$(CONFIG_PM)   += sleep.o
diff --git a/arch/arm/plat-s3c24xx/s3c244x-clock.c 
b/arch/arm/plat-s3c24xx/s3c244x-clock.c
new file mode 100644
index 000..0bf5e7f
--- /dev/null
+++ b/arch/arm/plat-s3c24xx/s3c244x-clock.c
@@ -0,0 +1,100 @@
+/* linux/arch/arm/plat-s3c24xx/s3c24xx-clock.c
+ *
+ * Copyright (c) 2004-2005,2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks [EMAIL PROTECTED]
+ *
+ * S3C2440/S3C2442 Common clock support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software 

[ARM] 4793/1: S3C24XX: Add IRQ-GPIO pin mapping function

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c27cb681ac1598352569f75cb19850a12b7ef102
Commit: c27cb681ac1598352569f75cb19850a12b7ef102
Parent: 9b8c0088404778a1291191cf140bcfea082f027c
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:33 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4793/1: S3C24XX: Add IRQ-GPIO pin mapping function

Add the reverse of s3c2410_gpio_getirq to convert
a IRQ  number into a GPIO pin number.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/gpio.c|   16 
 include/asm-arm/arch-s3c2410/hardware.h |   11 +++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
index 7cc6fae..ee99dcc 100644
--- a/arch/arm/plat-s3c24xx/gpio.c
+++ b/arch/arm/plat-s3c24xx/gpio.c
@@ -199,3 +199,19 @@ int s3c2410_gpio_getirq(unsigned int pin)
 }
 
 EXPORT_SYMBOL(s3c2410_gpio_getirq);
+
+int s3c2410_gpio_irq2pin(unsigned int irq)
+{
+   if (irq = IRQ_EINT0  irq = IRQ_EINT3)
+   return S3C2410_GPF0 + (irq - IRQ_EINT0);
+
+   if (irq = IRQ_EINT4  irq = IRQ_EINT7)
+   return S3C2410_GPF4 + (irq - IRQ_EINT4);
+
+   if (irq = IRQ_EINT8  irq = IRQ_EINT23)
+   return S3C2410_GPG0 + (irq - IRQ_EINT8);
+
+   return -EINVAL;
+}
+
+EXPORT_SYMBOL(s3c2410_gpio_irq2pin);
diff --git a/include/asm-arm/arch-s3c2410/hardware.h 
b/include/asm-arm/arch-s3c2410/hardware.h
index 20509e4..29592c3 100644
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ b/include/asm-arm/arch-s3c2410/hardware.h
@@ -50,6 +50,17 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
 
 extern int s3c2410_gpio_getirq(unsigned int pin);
 
+/* s3c2410_gpio_irq2pin
+ *
+ * turn the given irq number into the corresponding GPIO number
+ *
+ * returns:
+ *  0 = no pin
+ * =0 = gpio pin number
+*/
+
+extern int s3c2410_gpio_irq2pin(unsigned int irq);
+
 #ifdef CONFIG_CPU_S3C2400
 
 extern int s3c2400_gpio_getirq(unsigned int pin);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4791/1: S3C2412: Make fclk a parent of msysclk

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ddd870bdb722280bd5af1682d82557d1787ac90c
Commit: ddd870bdb722280bd5af1682d82557d1787ac90c
Parent: cca851d7b4d87f3a644d3381930dc737890bd9ac
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:31 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4791/1: S3C2412: Make fclk a parent of msysclk

In the S3C2412 fclk is derived from msysclk, not straight from
the MPLL output. Set clk_f.parent appropriately.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/clock.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index 0f75250..2697a65 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -684,6 +684,8 @@ int __init s3c2412_baseclk_add(void)
clk_usb_bus.parent = clk_usbsrc;
clk_usb_bus.rate = 0x0;
 
+   clk_f.parent = clk_msysclk;
+
s3c2412_clk_initparents();
 
for (ptr = 0; ptr  ARRAY_SIZE(clks); ptr++) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4789/1: S3C2412: Add missing CLKDIVN register values

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e95f52cd3b664eaa9c2b2b123f2a339ae0f1a92b
Commit: e95f52cd3b664eaa9c2b2b123f2a339ae0f1a92b
Parent: 046c9d321fd5f5ce1c89c9d0f1a519c26a096486
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:29 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4789/1: S3C2412: Add missing CLKDIVN register values

Add S3C2412_CLKDIVN_DVSEN and S3C2412_CLKDIVN_HALFHCLK definitions to
the S3C2412_CLKDIVN set.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/regs-clock.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h 
b/include/asm-arm/arch-s3c2410/regs-clock.h
index e39656b..dba9df9 100644
--- a/include/asm-arm/arch-s3c2410/regs-clock.h
+++ b/include/asm-arm/arch-s3c2410/regs-clock.h
@@ -138,6 +138,8 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk)
 #define S3C2412_CLKDIVN_PDIVN  (12)
 #define S3C2412_CLKDIVN_HDIVN_MASK (30)
 #define S3C2421_CLKDIVN_ARMDIVN(13)
+#define S3C2412_CLKDIVN_DVSEN  (14)
+#define S3C2412_CLKDIVN_HALFHCLK   (15)
 #define S3C2412_CLKDIVN_USB48DIV   (16)
 #define S3C2412_CLKDIVN_UARTDIV_MASK   (158)
 #define S3C2412_CLKDIVN_UARTDIV_SHIFT  (8)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4786/1: S3C2412: Add SPI FIFO controll constants

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=db9b85c527a397e4cb75956ae69acea92904f6dc
Commit: db9b85c527a397e4cb75956ae69acea92904f6dc
Parent: e5812bf66881a7d9c67d807b09d69a023d6e4b86
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:26 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4786/1: S3C2412: Add SPI FIFO controll constants

Add control constants for the S3C2412 SPI unit FIFO.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/plat-s3c24xx/regs-spi.h |   23 +++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h 
b/include/asm-arm/plat-s3c24xx/regs-spi.h
index 960907f..ea565b0 100644
--- a/include/asm-arm/plat-s3c24xx/regs-spi.h
+++ b/include/asm-arm/plat-s3c24xx/regs-spi.h
@@ -17,7 +17,21 @@
 
 #define S3C2410_SPCON  (0x00)
 
+#define S3C2412_SPCON_RXFIFO_RB2   (014)
+#define S3C2412_SPCON_RXFIFO_RB4   (114)
+#define S3C2412_SPCON_RXFIFO_RB12  (214)
+#define S3C2412_SPCON_RXFIFO_RB14  (314)
+#define S3C2412_SPCON_TXFIFO_RB2   (012)
+#define S3C2412_SPCON_TXFIFO_RB4   (112)
+#define S3C2412_SPCON_TXFIFO_RB12  (212)
+#define S3C2412_SPCON_TXFIFO_RB14  (312)
+#define S3C2412_SPCON_RXFIFO_RESET (111) /* RxFIFO reset */
+#define S3C2412_SPCON_TXFIFO_RESET (110) /* TxFIFO reset */
+#define S3C2412_SPCON_RXFIFO_EN(19)  /* RxFIFO Enable */
+#define S3C2412_SPCON_TXFIFO_EN(18)  /* TxFIFO Enable */
+
 #define S3C2412_SPCON_DIRC_RX(17)
+
 #define S3C2410_SPCON_SMOD_DMA   (25)/* DMA mode */
 #define S3C2410_SPCON_SMOD_INT   (15)/* interrupt mode */
 #define S3C2410_SPCON_SMOD_POLL   (05)   /* polling mode */
@@ -35,6 +49,15 @@
 
 #define S3C2410_SPSTA   (0x04)
 
+#define S3C2412_SPSTA_RXFIFO_AE(111)
+#define S3C2412_SPSTA_TXFIFO_AE(110)
+#define S3C2412_SPSTA_RXFIFO_ERROR (19)
+#define S3C2412_SPSTA_TXFIFO_ERROR (18)
+#define S3C2412_SPSTA_RXFIFO_FIFO  (17)
+#define S3C2412_SPSTA_RXFIFO_EMPTY (16)
+#define S3C2412_SPSTA_TXFIFO_NFULL (15)
+#define S3C2412_SPSTA_TXFIFO_EMPTY (14)
+
 #define S3C2410_SPSTA_DCOL   (12)/* Data Collision Error */
 #define S3C2410_SPSTA_MULD   (11)/* Multi Master Error */
 #define S3C2410_SPSTA_READY  (10)/* Data Tx/Rx ready */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4785/1: S3C24XX: Add _SHIFT definitions for S3C2410_BANKCON registers

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e5812bf66881a7d9c67d807b09d69a023d6e4b86
Commit: e5812bf66881a7d9c67d807b09d69a023d6e4b86
Parent: 62feee648ca0ad6e1b54e44e6c8ddb69f225f812
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:25 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4785/1: S3C24XX: Add _SHIFT definitions for S3C2410_BANKCON registers

Add definitions to allow easier decomposotion of the contents of
the S3C2410_BANKON registers

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/regs-mem.h |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h 
b/include/asm-arm/arch-s3c2410/regs-mem.h
index e4d8234..312ff93 100644
--- a/include/asm-arm/arch-s3c2410/regs-mem.h
+++ b/include/asm-arm/arch-s3c2410/regs-mem.h
@@ -98,16 +98,19 @@
 #define S3C2410_BANKCON_Tacp3  (0x1  2)
 #define S3C2410_BANKCON_Tacp4  (0x2  2)
 #define S3C2410_BANKCON_Tacp6  (0x3  2)
+#define S3C2410_BANKCON_Tacp_SHIFT (2)
 
 #define S3C2410_BANKCON_Tcah0  (0x0  4)
 #define S3C2410_BANKCON_Tcah1  (0x1  4)
 #define S3C2410_BANKCON_Tcah2  (0x2  4)
 #define S3C2410_BANKCON_Tcah4  (0x3  4)
+#define S3C2410_BANKCON_Tcah_SHIFT (4)
 
 #define S3C2410_BANKCON_Tcoh0  (0x0  6)
 #define S3C2410_BANKCON_Tcoh1  (0x1  6)
 #define S3C2410_BANKCON_Tcoh2  (0x2  6)
 #define S3C2410_BANKCON_Tcoh4  (0x3  6)
+#define S3C2410_BANKCON_Tcoh_SHIFT (6)
 
 #define S3C2410_BANKCON_Tacc1  (0x0  8)
 #define S3C2410_BANKCON_Tacc2  (0x1  8)
@@ -117,16 +120,19 @@
 #define S3C2410_BANKCON_Tacc8  (0x5  8)
 #define S3C2410_BANKCON_Tacc10 (0x6  8)
 #define S3C2410_BANKCON_Tacc14 (0x7  8)
+#define S3C2410_BANKCON_Tacc_SHIFT (8)
 
 #define S3C2410_BANKCON_Tcos0  (0x0  11)
 #define S3C2410_BANKCON_Tcos1  (0x1  11)
 #define S3C2410_BANKCON_Tcos2  (0x2  11)
 #define S3C2410_BANKCON_Tcos4  (0x3  11)
+#define S3C2410_BANKCON_Tcos_SHIFT (11)
 
 #define S3C2410_BANKCON_Tacs0  (0x0  13)
 #define S3C2410_BANKCON_Tacs1  (0x1  13)
 #define S3C2410_BANKCON_Tacs2  (0x2  13)
 #define S3C2410_BANKCON_Tacs4  (0x3  13)
+#define S3C2410_BANKCON_Tacs_SHIFT (13)
 
 #define S3C2410_BANKCON_SRAM   (0x0  15)
 #define S3C2400_BANKCON_EDODRAM(0x2  15)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4784/1: S3C24XX: Fix GPIO restore glitches

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62feee648ca0ad6e1b54e44e6c8ddb69f225f812
Commit: 62feee648ca0ad6e1b54e44e6c8ddb69f225f812
Parent: bb6d9b56c1d5c1cbff39b7c337c900e2b3d8387a
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:24 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4784/1: S3C24XX: Fix GPIO restore glitches

The core resume code may have caused glitches in the GPIO when
restoring the GPIO state due to the order in which the GPIO registers
were being written.

Change the restore process take into account the state of the
GPIOs on resume and the state the system wants to restore them to.

See the code comments in the patch for more details of the process.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/pm.c |  247 ++--
 1 files changed, 214 insertions(+), 33 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c
index 4fdb311..bf5581a 100644
--- a/arch/arm/plat-s3c24xx/pm.c
+++ b/arch/arm/plat-s3c24xx/pm.c
@@ -83,38 +83,39 @@ static struct sleep_save core_save[] = {
SAVE_ITEM(S3C2410_REFRESH),
 };
 
-static struct sleep_save gpio_save[] = {
-   SAVE_ITEM(S3C2410_GPACON),
-   SAVE_ITEM(S3C2410_GPADAT),
-
-   SAVE_ITEM(S3C2410_GPBCON),
-   SAVE_ITEM(S3C2410_GPBDAT),
-   SAVE_ITEM(S3C2410_GPBUP),
-
-   SAVE_ITEM(S3C2410_GPCCON),
-   SAVE_ITEM(S3C2410_GPCDAT),
-   SAVE_ITEM(S3C2410_GPCUP),
-
-   SAVE_ITEM(S3C2410_GPDCON),
-   SAVE_ITEM(S3C2410_GPDDAT),
-   SAVE_ITEM(S3C2410_GPDUP),
-
-   SAVE_ITEM(S3C2410_GPECON),
-   SAVE_ITEM(S3C2410_GPEDAT),
-   SAVE_ITEM(S3C2410_GPEUP),
-
-   SAVE_ITEM(S3C2410_GPFCON),
-   SAVE_ITEM(S3C2410_GPFDAT),
-   SAVE_ITEM(S3C2410_GPFUP),
-
-   SAVE_ITEM(S3C2410_GPGCON),
-   SAVE_ITEM(S3C2410_GPGDAT),
-   SAVE_ITEM(S3C2410_GPGUP),
-
-   SAVE_ITEM(S3C2410_GPHCON),
-   SAVE_ITEM(S3C2410_GPHDAT),
-   SAVE_ITEM(S3C2410_GPHUP),
+static struct gpio_sleep {
+   void __iomem*base;
+   unsigned int gpcon;
+   unsigned int gpdat;
+   unsigned int gpup;
+} gpio_save[] = {
+   [0] = {
+   .base   = S3C2410_GPACON,
+   },
+   [1] = {
+   .base   = S3C2410_GPBCON,
+   },
+   [2] = {
+   .base   = S3C2410_GPCCON,
+   },
+   [3] = {
+   .base   = S3C2410_GPDCON,
+   },
+   [4] = {
+   .base   = S3C2410_GPECON,
+   },
+   [5] = {
+   .base   = S3C2410_GPFCON,
+   },
+   [6] = {
+   .base   = S3C2410_GPGCON,
+   },
+   [7] = {
+   .base   = S3C2410_GPHCON,
+   },
+};
 
+static struct sleep_save misc_save[] = {
SAVE_ITEM(S3C2410_DCLKCON),
 };
 
@@ -486,6 +487,184 @@ static void s3c2410_pm_configure_extint(void)
}
 }
 
+/* offsets for CON/DAT/UP registers */
+
+#define OFFS_CON   (S3C2410_GPACON - S3C2410_GPACON)
+#define OFFS_DAT   (S3C2410_GPADAT - S3C2410_GPACON)
+#define OFFS_UP(S3C2410_GPBUP  - S3C2410_GPBCON)
+
+/* s3c2410_pm_save_gpios()
+ *
+ * Save the state of the GPIOs
+ */
+
+static void s3c2410_pm_save_gpios(void)
+{
+   struct gpio_sleep *gps = gpio_save;
+   unsigned int gpio;
+
+   for (gpio = 0; gpio  ARRAY_SIZE(gpio_save); gpio++, gps++) {
+   void __iomem *base = gps-base;
+
+   gps-gpcon = __raw_readl(base + OFFS_CON);
+   gps-gpdat = __raw_readl(base + OFFS_DAT);
+
+   if (gpio  0)
+   gps-gpup = __raw_readl(base + OFFS_UP);
+
+   }
+}
+
+/* Test whether the given masked+shifted bits of an GPIO configuration
+ * are one of the SFN (special function) modes. */
+
+static inline int is_sfn(unsigned long con)
+{
+   return (con == 2 || con == 3);
+}
+
+/* Test if the given masked+shifted GPIO configuration is an input */
+
+static inline int is_in(unsigned long con)
+{
+   return con == 0;
+}
+
+/* Test if the given masked+shifted GPIO configuration is an output */
+
+static inline int is_out(unsigned long con)
+{
+   return con == 1;
+}
+
+/* s3c2410_pm_restore_gpio()
+ *
+ * Restore one of the GPIO banks that was saved during suspend. This is
+ * not as simple as once thought, due to the possibility of glitches
+ * from the order that the CON and DAT registers are set in.
+ *
+ * The three states the pin can be are {IN,OUT,SFN} which gives us 9
+ * combinations of changes to check. Three of these, if the pin stays
+ * in the same configuration can be discounted. This leaves us with
+ * the following:
+ *
+ * { IN = OUT }  Change DAT first
+ * { IN = SFN }  Change CON first
+ * { OUT = SFN } Change CON first, so new data will not 

[ARM] 4782/1: S3C24XX: Define FIQ_START for any FIQ users

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f613be4a9b6d680772b0a52a43a4a94d8e131b6
Commit: 9f613be4a9b6d680772b0a52a43a4a94d8e131b6
Parent: c58f7a1d36709e50398c05df9419386befef2c59
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:22 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4782/1: S3C24XX: Define FIQ_START for any FIQ users

Ensure FIQ_START is defined to allow anyone to use FIQ code on
an S3C24XX based CPU.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/irqs.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/irqs.h 
b/include/asm-arm/arch-s3c2410/irqs.h
index 996f654..d858b3e 100644
--- a/include/asm-arm/arch-s3c2410/irqs.h
+++ b/include/asm-arm/arch-s3c2410/irqs.h
@@ -160,4 +160,7 @@
 #define NR_IRQS (IRQ_S3C2440_AC97+1)
 #endif
 
+/* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
+#define FIQ_START  IRQ_EINT0
+
 #endif /* __ASM_ARCH_IRQ_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4783/1: S3C24XX: Add s3c2410_gpio_getpull()

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb6d9b56c1d5c1cbff39b7c337c900e2b3d8387a
Commit: bb6d9b56c1d5c1cbff39b7c337c900e2b3d8387a
Parent: 9f613be4a9b6d680772b0a52a43a4a94d8e131b6
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:23 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4783/1: S3C24XX: Add s3c2410_gpio_getpull()

Add the call s3c2410_gpio_getpull() to return the
current state of the pin's pull-up.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/gpio.c|   13 +
 include/asm-arm/arch-s3c2410/hardware.h |   12 
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
index ec3a09c..7cc6fae 100644
--- a/arch/arm/plat-s3c24xx/gpio.c
+++ b/arch/arm/plat-s3c24xx/gpio.c
@@ -122,6 +122,19 @@ void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
 
 EXPORT_SYMBOL(s3c2410_gpio_pullup);
 
+int s3c2410_gpio_getpull(unsigned int pin)
+{
+   void __iomem *base = S3C24XX_GPIO_BASE(pin);
+   unsigned long offs = S3C2410_GPIO_OFFSET(pin);
+
+   if (pin  S3C2410_GPIO_BANKB)
+   return -EINVAL;
+
+   return (__raw_readl(base + 0x08)  (1L  offs)) ? 1 : 0;
+}
+
+EXPORT_SYMBOL(s3c2410_gpio_getpull);
+
 void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
 {
void __iomem *base = S3C24XX_GPIO_BASE(pin);
diff --git a/include/asm-arm/arch-s3c2410/hardware.h 
b/include/asm-arm/arch-s3c2410/hardware.h
index faeaba5..20509e4 100644
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ b/include/asm-arm/arch-s3c2410/hardware.h
@@ -87,6 +87,18 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned 
int on,
 
 extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);
 
+/* s3c2410_gpio_getpull
+ *
+ * Read the state of the pull-up on a given pin
+ *
+ * return:
+ *  0 = error code
+ *   0 = enabled
+ *   1 = disabled
+*/
+
+extern int s3c2410_gpio_getpull(unsigned int pin);
+
 extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);
 
 extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4778/1: S3C2412: Add armclk and init from DVS state

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bdbea34ddd2e52dc73f03e7ef7197d4c0da400d6
Commit: bdbea34ddd2e52dc73f03e7ef7197d4c0da400d6
Parent: 57c1b0f8dbfffaa00a242b171429e56489caef15
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:18 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4778/1: S3C2412: Add armclk and init from DVS state

Add armclk to the S3C2412 to indicate the current clock connected to
the ARM core.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/clock.c |   50 +
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index 4589936..42ccb5e 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -234,6 +234,45 @@ static struct clk clk_msysclk = {
.set_parent = s3c2412_setparent_msysclk,
 };
 
+static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent)
+{
+   unsigned long flags;
+   unsigned long clkdiv;
+   unsigned long dvs;
+
+   /* Note, we current equate fclk andf msysclk for S3C2412 */
+
+   if (parent == clk_msysclk || parent == clk_f)
+   dvs = 0;
+   else if (parent == clk_h)
+   dvs = S3C2412_CLKDIVN_DVSEN;
+   else
+   return -EINVAL;
+
+   clk-parent = parent;
+
+   /* update this under irq lockdown, clkdivn is not protected
+* by the clock system. */
+
+   local_irq_save(flags);
+
+   clkdiv  = __raw_readl(S3C2410_CLKDIVN);
+   clkdiv = ~S3C2412_CLKDIVN_DVSEN;
+   clkdiv |= dvs;
+   __raw_writel(clkdiv, S3C2410_CLKDIVN);
+
+   local_irq_restore(flags);
+
+   return 0;
+}
+
+static struct clk clk_armclk = {
+   .name   = armclk,
+   .id = -1,
+   .parent = clk_msysclk,
+   .set_parent = s3c2412_setparent_armclk,
+};
+
 /* these next clocks have an divider immediately after them,
  * so we can register them with their divider and leave out the
  * intermediate clock stage
@@ -630,11 +669,13 @@ static struct clk *clks[] __initdata = {
clk_erefclk,
clk_urefclk,
clk_mrefclk,
+   clk_armclk,
 };
 
 int __init s3c2412_baseclk_add(void)
 {
unsigned long clkcon  = __raw_readl(S3C2410_CLKCON);
+   unsigned int dvs;
struct clk *clkp;
int ret;
int ptr;
@@ -655,6 +696,15 @@ int __init s3c2412_baseclk_add(void)
}
}
 
+   /* set the dvs state according to what we got at boot time */
+
+   dvs = __raw_readl(S3C2410_CLKDIVN)  S3C2412_CLKDIVN_DVSEN;
+
+   if (dvs)
+   clk_armclk.parent = clk_h;
+
+   printk(KERN_INFO S3C2412: DVS is %s\n, dvs ? on : off);
+
/* ensure usb bus clock is within correct rate of 48MHz */
 
if (clk_get_rate(clk_usb_bus) != (48 * 1000 * 1000)) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4775/1: s3c2410: fix compilation error if only s3c2442 cpu is selected

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f7275dac55008f8296cfb89a01b1e71918ac7995
Commit: f7275dac55008f8296cfb89a01b1e71918ac7995
Parent: 332349518f1958b0bc1ae3febc2e4f75f214d255
Author: Krzysztof Helt [EMAIL PROTECTED]
AuthorDate: Sun Jan 27 19:01:18 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4775/1: s3c2410: fix compilation error if only s3c2442 cpu is selected

This patch fixes compilation error if only a machine with
s3c2442 cpu is selected but without s3c2440 cpu selected.

Signed-off-by: Krzysztof Helt [EMAIL PROTECTED]
Acked-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/regs-dsc.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h 
b/include/asm-arm/arch-s3c2410/regs-dsc.h
index c074851..1235df7 100644
--- a/include/asm-arm/arch-s3c2410/regs-dsc.h
+++ b/include/asm-arm/arch-s3c2410/regs-dsc.h
@@ -19,7 +19,7 @@
 #define S3C2412_DSC1  S3C2410_GPIOREG(0xe0)
 #endif
 
-#if defined(CONFIG_CPU_S3C2440)
+#if defined(CONFIG_CPU_S3C244X)
 
 #define S3C2440_DSC0  S3C2410_GPIOREG(0xc4)
 #define S3C2440_DSC1  S3C2410_GPIOREG(0xc8)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4731/1: S3C2412: Check for incomplete sleep

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=332349518f1958b0bc1ae3febc2e4f75f214d255
Commit: 332349518f1958b0bc1ae3febc2e4f75f214d255
Parent: 0baada2742a42390a2ebed09e07e1fab518db884
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:34 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4731/1: S3C2412: Check for incomplete sleep

Check if the sleep command returns due to a pending interrupt
in the standby unit. If this happens, try and ack the IRQ
before re-trying the resume.

It is currently unclear whether the resume can be backed out
of at this stage as this could cause a problem with level
based interrupts.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/Makefile |2 +-
 arch/arm/mach-s3c2412/pm.c |   17 ++
 arch/arm/mach-s3c2412/sleep.S  |   68 
 3 files changed, 72 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile
index f8e0116..7b782c7 100644
--- a/arch/arm/mach-s3c2412/Makefile
+++ b/arch/arm/mach-s3c2412/Makefile
@@ -13,7 +13,7 @@ obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
 obj-$(CONFIG_CPU_S3C2412)  += irq.o
 obj-$(CONFIG_CPU_S3C2412)  += clock.o
 obj-$(CONFIG_S3C2412_DMA)  += dma.o
-obj-$(CONFIG_S3C2412_PM)   += pm.o
+obj-$(CONFIG_S3C2412_PM)   += pm.o sleep.o
 
 # Machine support
 
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c
index 974ffb1..d4ffb2d 100644
--- a/arch/arm/mach-s3c2412/pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -33,6 +33,8 @@
 
 #include asm/plat-s3c24xx/s3c2412.h
 
+extern void s3c2412_sleep_enter(void);
+
 static void s3c2412_cpu_suspend(void)
 {
unsigned long tmp;
@@ -43,20 +45,7 @@ static void s3c2412_cpu_suspend(void)
tmp |= S3C2412_PWRCFG_STANDBYWFI_SLEEP;
__raw_writel(tmp, S3C2412_PWRCFG);
 
-   /* issue the standby signal into the pm unit. Note, we
-* issue a write-buffer drain just in case */
-
-   tmp = 0;
-
-   asm(b 1f\n\t
-   .align 5\n\t
-   1:\n\t
-   mcr p15, 0, %0, c7, c10, 4\n\t
-   mcr p15, 0, %0, c7, c0, 4 :: r (tmp));
-
-   /* we should never get past here */
-
-   panic(sleep resumed to originator?);
+   s3c2412_sleep_enter();
 }
 
 static void s3c2412_pm_prepare(void)
diff --git a/arch/arm/mach-s3c2412/sleep.S b/arch/arm/mach-s3c2412/sleep.S
new file mode 100644
index 000..db32cac
--- /dev/null
+++ b/arch/arm/mach-s3c2412/sleep.S
@@ -0,0 +1,68 @@
+/* linux/arch/arm/mach-s3c2412/sleep.S
+ *
+ * Copyright (c) 2007 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
+ *
+ * S3C2412 Power Manager low-level sleep support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#include linux/linkage.h
+#include asm/assembler.h
+#include asm/hardware.h
+#include asm/arch/map.h
+
+#include asm/arch/regs-irq.h
+
+   .text
+
+   .global s3c2412_sleep_enter
+
+s3c2412_sleep_enter:
+   mov r0, #0  /* argument for coprocessors */
+   ldr r1, =S3C2410_INTPND
+   ldr r2, =S3C2410_SRCPND
+   ldr r3, =S3C2410_EINTPEND
+
+   teq r0, r0
+   bl  s3c2412_sleep_enter1
+   teq pc, r0
+   bl  s3c2412_sleep_enter1
+
+   .align  5
+
+   /* this is called twice, first with the Z flag to ensure that the
+* instructions have been loaded into the cache, and the second
+* time to try and suspend the system.
+   */
+s3c2412_sleep_enter1:
+   mcr p15, 0, r0, c7, c10, 4
+   mcrne   p15, 0, r0, c7, c0, 4
+
+   /* if we return from here, it is because an interrupt was
+* active when we tried to shutdown. Try and ack the IRQ and
+* retry, as simply returning causes the system to lock.
+   */
+
+   ldrne   r9, [ r1 ]
+   strne   r9, [ r1 ]
+   ldrne   r9, [ r2 ]
+   strne   r9, [ r2 ]
+   ldrne   r9, [ r3 ]
+   strne   r9, [ r3 ]
+   bne s3c2412_sleep_enter1
+
+   mov pc, r14
-
To unsubscribe from this list: send the line unsubscribe git-commits-head 

[ARM] 4730/1: S3C2412: Ensure the PWRCFG has the right mode for RTC wake

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0baada2742a42390a2ebed09e07e1fab518db884
Commit: 0baada2742a42390a2ebed09e07e1fab518db884
Parent: 8e3007a0e8a0d2f5e3139cb9fe606c2a998b9ed3
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:33 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4730/1: S3C2412: Ensure the PWRCFG has the right mode for RTC wake

Ensure that if the RTC IRQ is not selected for wake in the
base configuration, then the PWRCFG has the same value set
in it.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/irq.c|   24 
 arch/arm/plat-s3c24xx/irq.c|2 +-
 include/asm-arm/plat-s3c24xx/irq.h |2 ++
 3 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c
index e9d0c76..cc1917b 100644
--- a/arch/arm/mach-s3c2412/irq.c
+++ b/arch/arm/mach-s3c2412/irq.c
@@ -33,6 +33,7 @@
 
 #include asm/arch/regs-irq.h
 #include asm/arch/regs-gpio.h
+#include asm/arch/regs-power.h
 
 #include asm/plat-s3c24xx/cpu.h
 #include asm/plat-s3c24xx/irq.h
@@ -153,6 +154,22 @@ static struct irq_chip s3c2412_irq_cfsdi = {
.unmask = s3c2412_irq_cfsdi_unmask,
 };
 
+static int s3c2412_irq_rtc_wake(unsigned int irqno, unsigned int state)
+{
+   unsigned long pwrcfg;
+
+   pwrcfg = __raw_readl(S3C2412_PWRCFG);
+   if (state)
+   pwrcfg = ~S3C2412_PWRCFG_RTC_MASKIRQ;
+   else
+   pwrcfg |= S3C2412_PWRCFG_RTC_MASKIRQ;
+   __raw_writel(pwrcfg, S3C2412_PWRCFG);
+
+   return s3c_irq_chip.set_wake(irqno, state);
+}
+
+static struct irq_chip s3c2412_irq_rtc_chip;
+
 static int s3c2412_irq_add(struct sys_device *sysdev)
 {
unsigned int irqno;
@@ -173,6 +190,13 @@ static int s3c2412_irq_add(struct sys_device *sysdev)
set_irq_flags(irqno, IRQF_VALID);
}
 
+   /* change RTC IRQ's set wake method */
+
+   s3c2412_irq_rtc_chip = s3c_irq_chip;
+   s3c2412_irq_rtc_chip.set_wake = s3c2412_irq_rtc_wake;
+
+   set_irq_chip(IRQ_RTC, s3c2412_irq_rtc_chip);
+
return 0;
 }
 
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
index 8fbc884..d486f51 100644
--- a/arch/arm/plat-s3c24xx/irq.c
+++ b/arch/arm/plat-s3c24xx/irq.c
@@ -187,7 +187,7 @@ struct irq_chip s3c_irq_level_chip = {
.set_wake   = s3c_irq_wake
 };
 
-static struct irq_chip s3c_irq_chip = {
+struct irq_chip s3c_irq_chip = {
.name   = s3c,
.ack= s3c_irq_ack,
.mask   = s3c_irq_mask,
diff --git a/include/asm-arm/plat-s3c24xx/irq.h 
b/include/asm-arm/plat-s3c24xx/irq.h
index 8af6d95..45746a9 100644
--- a/include/asm-arm/plat-s3c24xx/irq.h
+++ b/include/asm-arm/plat-s3c24xx/irq.h
@@ -15,7 +15,9 @@
 
 #define EXTINT_OFF (IRQ_EINT4 - 4)
 
+/* these are exported for arch/arm/mach-* usage */
 extern struct irq_chip s3c_irq_level_chip;
+extern struct irq_chip s3c_irq_chip;
 
 static inline void
 s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4729/1: VR1000: Do not add IIS device on initialisation

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8e3007a0e8a0d2f5e3139cb9fe606c2a998b9ed3
Commit: 8e3007a0e8a0d2f5e3139cb9fe606c2a998b9ed3
Parent: b6a175a562a1c8d326de0ee501114a2af2602772
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:36 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4729/1: VR1000: Do not add IIS device on initialisation

The IIS device is being registered by the Simtec Audio
driver, and thus registering here causes an error due
to device tree naming collision.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/mach-vr1000.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c 
b/arch/arm/mach-s3c2410/mach-vr1000.c
index 9f43f3f..3aade7b 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -365,7 +365,6 @@ static struct platform_device *vr1000_devices[] __initdata 
= {
s3c_device_lcd,
s3c_device_wdt,
s3c_device_i2c,
-   s3c_device_iis,
s3c_device_adc,
serial_device,
vr1000_nor,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4724/1: S3C2412: Select S3C2410 base GPIO implementation

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=71e5b2f154eb743d609bb4e743ea344596769911
Commit: 71e5b2f154eb743d609bb4e743ea344596769911
Parent: 9cbae12cca55332c9fef8f700ea28d36d7cc54be
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:30 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4724/1: S3C2412: Select S3C2410 base GPIO implementation

The S3C2412 GPIO is similar enough to the S3C2410 that
it can use it as a base for GPIO functionality.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index 8e8fe48..0b43431 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -10,6 +10,7 @@ config CPU_S3C2412
select CPU_LLSERIAL_S3C2440
select S3C2412_PM if PM
select S3C2412_DMA if S3C2410_DMA
+   select S3C2410_GPIO
help
  Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4723/1: BAST: Fix LCD driver default display setting

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9cbae12cca55332c9fef8f700ea28d36d7cc54be
Commit: 9cbae12cca55332c9fef8f700ea28d36d7cc54be
Parent: ff44b49b55edee33b7ecea987be1a6413162581b
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:38 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4723/1: BAST: Fix LCD driver default display setting

We have a default display set to 4, when we only have
three registered displays. Fix this argument (a seperate
patch has been generated to ensure that the LCD driver
takes notice of this bug)

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/mach-bast.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2410/mach-bast.c 
b/arch/arm/mach-s3c2410/mach-bast.c
index 587864f..53c2a13 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -530,7 +530,7 @@ static struct s3c2410fb_mach_info __initdata bast_fb_info = 
{
 
.displays = bast_lcd_info,
.num_displays = ARRAY_SIZE(bast_lcd_info),
-   .default_display = 4,
+   .default_display = 1,
 };
 
 /* Standard BAST devices */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4722/1: S3C24XX: Improve output if watchdog reset fails

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ff44b49b55edee33b7ecea987be1a6413162581b
Commit: ff44b49b55edee33b7ecea987be1a6413162581b
Parent: d652074ebcedd13c7ce760c7f3327f30862852fb
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:32 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4722/1: S3C24XX: Improve output if watchdog reset fails

If the watchdog reset fails and we decided to take the jump
to zero approach, allow 50ms for the UARTS to drain the FIFOs
before calling into a bootloader that may flush the output.

Also reduece the waits and the timeout values as 5 seconds is
rather long.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/system.h |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/system.h 
b/include/asm-arm/arch-s3c2410/system.h
index cb9cd9f..14de4e5 100644
--- a/include/asm-arm/arch-s3c2410/system.h
+++ b/include/asm-arm/arch-s3c2410/system.h
@@ -82,18 +82,21 @@ arch_reset(char mode)
printk(KERN_WARNING %s: warning: cannot get watchdog clock\n, 
__func__);
 
/* put initial values into count and data */
-   __raw_writel(0x100, S3C2410_WTCNT);
-   __raw_writel(0x100, S3C2410_WTDAT);
+   __raw_writel(0x80, S3C2410_WTCNT);
+   __raw_writel(0x80, S3C2410_WTDAT);
 
/* set the watchdog to go and reset... */

__raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
 S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
 
/* wait for reset to assert... */
-   mdelay(5000);
+   mdelay(500);
 
printk(KERN_ERR Watchdog reset failed to assert reset\n);
 
+   /* delay to allow the serial port to show the message */
+   mdelay(50);
+
/* we'll take a jump through zero as a poor second */
cpu_reset(0);
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] msm: dma support for MSM7X00A

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bfe645adf1a79b873b528556523abb46f281a5dc
Commit: bfe645adf1a79b873b528556523abb46f281a5dc
Parent: 9e73c84c89b7c91ad5d6a141c58efbbe139f6b6c
Author: Arve Hjønnevåg [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 04:12:29 2007 -0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:39:14 2008 +

[ARM] msm: dma support for MSM7X00A

Signed-off-by: Brian Swetland [EMAIL PROTECTED]
---
 arch/arm/mach-msm/Makefile |2 +-
 arch/arm/mach-msm/dma.c|  214 
 include/asm-arm/arch-msm/dma.h |  150 
 3 files changed, 365 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index fcca853..d12f236 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -1,4 +1,4 @@
-obj-y += io.o idle.o irq.o timer.o
+obj-y += io.o idle.o irq.o timer.o dma.o
 
 # Common code for board init
 obj-y += common.o
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
new file mode 100644
index 000..8b0f339
--- /dev/null
+++ b/arch/arm/mach-msm/dma.c
@@ -0,0 +1,214 @@
+/* linux/arch/arm/mach-msm/dma.c
+ *
+ * Copyright (C) 2007 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include asm/io.h
+#include linux/interrupt.h
+#include asm/arch/dma.h
+
+#define MSM_DMOV_CHANNEL_COUNT 16
+
+enum {
+   MSM_DMOV_PRINT_ERRORS = 1,
+   MSM_DMOV_PRINT_IO = 2,
+   MSM_DMOV_PRINT_FLOW = 4
+};
+
+static DEFINE_SPINLOCK(msm_dmov_lock);
+static struct msm_dmov_cmd active_command;
+static struct list_head ready_commands[MSM_DMOV_CHANNEL_COUNT];
+static struct list_head active_commands[MSM_DMOV_CHANNEL_COUNT];
+unsigned int msm_dmov_print_mask = MSM_DMOV_PRINT_ERRORS;
+
+#define MSM_DMOV_DPRINTF(mask, format, args...) \
+   do { \
+   if ((mask)  msm_dmov_print_mask) \
+   printk(KERN_ERR format, args); \
+   } while (0)
+#define PRINT_ERROR(format, args...) \
+   MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_ERRORS, format, args);
+#define PRINT_IO(format, args...) \
+   MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_IO, format, args);
+#define PRINT_FLOW(format, args...) \
+   MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_FLOW, format, args);
+
+void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd)
+{
+   unsigned long irq_flags;
+   unsigned int status;
+
+   spin_lock_irqsave(msm_dmov_lock, irq_flags);
+   status = readl(DMOV_STATUS(id));
+   if (list_empty(ready_commands[id]) 
+   (status  DMOV_STATUS_CMD_PTR_RDY)) {
+#if 0
+   if (list_empty(active_commands[id])) {
+   PRINT_FLOW(msm_dmov_enqueue_cmd(%d), enable 
interrupt\n, id);
+   writel(DMOV_CONFIG_IRQ_EN, DMOV_CONFIG(id));
+   }
+#endif
+   PRINT_IO(msm_dmov_enqueue_cmd(%d), start command, status 
%x\n, id, status);
+   list_add_tail(cmd-list, active_commands[id]);
+   writel(cmd-cmdptr, DMOV_CMD_PTR(id));
+   } else {
+   if (list_empty(active_commands[id]))
+   PRINT_ERROR(msm_dmov_enqueue_cmd(%d), error datamover 
stalled, status %x\n, id, status);
+
+   PRINT_IO(msm_dmov_enqueue_cmd(%d), enqueue command, status 
%x\n, id, status);
+   list_add_tail(cmd-list, ready_commands[id]);
+   }
+   spin_unlock_irqrestore(msm_dmov_lock, irq_flags);
+}
+
+struct msm_dmov_exec_cmdptr_cmd {
+   struct msm_dmov_cmd dmov_cmd;
+   struct completion complete;
+   unsigned id;
+   unsigned int result;
+   unsigned int flush[6];
+};
+
+static void dmov_exec_cmdptr_complete_func(struct msm_dmov_cmd *_cmd, unsigned 
int result)
+{
+   struct msm_dmov_exec_cmdptr_cmd *cmd = container_of(_cmd, struct 
msm_dmov_exec_cmdptr_cmd, dmov_cmd);
+   cmd-result = result;
+   if (result != 0x8002) {
+   cmd-flush[0] = readl(DMOV_FLUSH0(cmd-id));
+   cmd-flush[1] = readl(DMOV_FLUSH1(cmd-id));
+   cmd-flush[2] = readl(DMOV_FLUSH2(cmd-id));
+   cmd-flush[3] = readl(DMOV_FLUSH3(cmd-id));
+   cmd-flush[4] = readl(DMOV_FLUSH4(cmd-id));
+   cmd-flush[5] = readl(DMOV_FLUSH5(cmd-id));
+   }
+   complete(cmd-complete);
+}
+
+int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr)
+{
+   struct msm_dmov_exec_cmdptr_cmd cmd;
+
+   PRINT_FLOW(dmov_exec_cmdptr(%d, %x)\n, 

[ARM] msm: board file for MACH_HALIBUT (QCT MSM7200A)

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e73c84c89b7c91ad5d6a141c58efbbe139f6b6c
Commit: 9e73c84c89b7c91ad5d6a141c58efbbe139f6b6c
Parent: 3e4ea3728a38b224d8b35ff8a9281407f603aa20
Author: Brian Swetland [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 04:12:13 2007 -0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:39:14 2008 +

[ARM] msm: board file for MACH_HALIBUT (QCT MSM7200A)

Add support for the Qualcomm MSM7200A eval board.
Common devices are defined in common.c, to avoid excessive
cut'n'pasting them into other board files.

Signed-off-by: Brian Swetland [EMAIL PROTECTED]
---
 arch/arm/Kconfig  |2 +
 arch/arm/configs/msm_defconfig|  895 +
 arch/arm/mach-msm/Kconfig |   18 +
 arch/arm/mach-msm/Makefile|5 +
 arch/arm/mach-msm/board-halibut.c |  114 +
 arch/arm/mach-msm/common.c|  116 +
 6 files changed, 1150 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 89c3811..ec29499 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -488,6 +488,8 @@ source arch/arm/mach-davinci/Kconfig
 
 source arch/arm/mach-ks8695/Kconfig
 
+source arch/arm/mach-msm/Kconfig
+
 # Definitions to make life easier
 config ARCH_ACORN
bool
diff --git a/arch/arm/configs/msm_defconfig b/arch/arm/configs/msm_defconfig
new file mode 100644
index 000..ae4c5e6
--- /dev/null
+++ b/arch/arm/configs/msm_defconfig
@@ -0,0 +1,895 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Wed Nov  7 01:36:45 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_GENERIC_GPIO is not set
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_GPIOS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+# CONFIG_SYSVIPC is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_PANIC_TIMEOUT=0
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_GOLDFISH is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not 

[ARM] msm: irq and timer support for ARCH_MSM7X00A

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e4ea3728a38b224d8b35ff8a9281407f603aa20
Commit: 3e4ea3728a38b224d8b35ff8a9281407f603aa20
Parent: 3042102a28501510a409fe86962f20369e325cf2
Author: Arve Hjønnevåg [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 04:11:58 2007 -0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:39:14 2008 +

[ARM] msm: irq and timer support for ARCH_MSM7X00A

- Vectored Interrupt Controller support
- Timer support using the GPT and DGT timers

Signed-off-by: Brian Swetland [EMAIL PROTECTED]
---
 arch/arm/mach-msm/Makefile |2 +-
 arch/arm/mach-msm/irq.c|  154 +
 arch/arm/mach-msm/timer.c  |  205 
 3 files changed, 360 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index feb9e46..a42d1a0 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -1,2 +1,2 @@
-obj-y += io.o idle.o 
+obj-y += io.o idle.o irq.o timer.o
 
diff --git a/arch/arm/mach-msm/irq.c b/arch/arm/mach-msm/irq.c
new file mode 100644
index 000..2415804
--- /dev/null
+++ b/arch/arm/mach-msm/irq.c
@@ -0,0 +1,154 @@
+/* linux/arch/arm/mach-msm/irq.c
+ *
+ * Copyright (C) 2007 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include linux/init.h
+#include linux/module.h
+#include linux/sched.h
+#include linux/interrupt.h
+#include linux/ptrace.h
+#include linux/timer.h
+
+#include linux/irq.h
+#include asm/hardware.h
+
+#include asm/io.h
+
+#include asm/arch/msm_iomap.h
+
+#define VIC_REG(off) (MSM_VIC_BASE + (off))
+
+#define VIC_INT_SELECT0 VIC_REG(0x)  /* 1: FIQ, 0: IRQ */
+#define VIC_INT_SELECT1 VIC_REG(0x0004)  /* 1: FIQ, 0: IRQ */
+#define VIC_INT_EN0 VIC_REG(0x0010)
+#define VIC_INT_EN1 VIC_REG(0x0014)
+#define VIC_INT_ENCLEAR0VIC_REG(0x0020)
+#define VIC_INT_ENCLEAR1VIC_REG(0x0024)
+#define VIC_INT_ENSET0  VIC_REG(0x0030)
+#define VIC_INT_ENSET1  VIC_REG(0x0034)
+#define VIC_INT_TYPE0   VIC_REG(0x0040)  /* 1: EDGE, 0: LEVEL  */
+#define VIC_INT_TYPE1   VIC_REG(0x0044)  /* 1: EDGE, 0: LEVEL  */
+#define VIC_INT_POLARITY0   VIC_REG(0x0050)  /* 1: NEG, 0: POS */
+#define VIC_INT_POLARITY1   VIC_REG(0x0054)  /* 1: NEG, 0: POS */
+#define VIC_NO_PEND_VAL VIC_REG(0x0060)
+#define VIC_INT_MASTERENVIC_REG(0x0064)  /* 1: IRQ, 2: FIQ */
+#define VIC_PROTECTION  VIC_REG(0x006C)  /* 1: ENABLE  */
+#define VIC_CONFIG  VIC_REG(0x0068)  /* 1: USE ARM1136 VIC */
+#define VIC_IRQ_STATUS0 VIC_REG(0x0080)
+#define VIC_IRQ_STATUS1 VIC_REG(0x0084)
+#define VIC_FIQ_STATUS0 VIC_REG(0x0090)
+#define VIC_FIQ_STATUS1 VIC_REG(0x0094)
+#define VIC_RAW_STATUS0 VIC_REG(0x00A0)
+#define VIC_RAW_STATUS1 VIC_REG(0x00A4)
+#define VIC_INT_CLEAR0  VIC_REG(0x00B0)
+#define VIC_INT_CLEAR1  VIC_REG(0x00B4)
+#define VIC_SOFTINT0VIC_REG(0x00C0)
+#define VIC_SOFTINT1VIC_REG(0x00C4)
+#define VIC_IRQ_VEC_RD  VIC_REG(0x00D0)  /* pending int # */
+#define VIC_IRQ_VEC_PEND_RD VIC_REG(0x00D4)  /* pending vector addr */
+#define VIC_IRQ_VEC_WR  VIC_REG(0x00D8)
+#define VIC_IRQ_IN_SERVICE  VIC_REG(0x00E0)
+#define VIC_IRQ_IN_STACKVIC_REG(0x00E4)
+#define VIC_TEST_BUS_SELVIC_REG(0x00E8)
+
+#define VIC_VECTPRIORITY(n) VIC_REG(0x0200+((n) * 4))
+#define VIC_VECTADDR(n) VIC_REG(0x0400+((n) * 4))
+
+static void msm_irq_ack(unsigned int irq)
+{
+   unsigned reg = VIC_INT_CLEAR0 + ((irq  32) ? 4 : 0);
+   irq = 1  (irq  31);
+   writel(irq, reg);
+}
+
+static void msm_irq_mask(unsigned int irq)
+{
+   unsigned reg = VIC_INT_ENCLEAR0 + ((irq  32) ? 4 : 0);
+   writel(1  (irq  31), reg);
+}
+
+static void msm_irq_unmask(unsigned int irq)
+{
+   unsigned reg = VIC_INT_ENSET0 + ((irq  32) ? 4 : 0);
+   writel(1  (irq  31), reg);
+}
+
+static int msm_irq_set_wake(unsigned int irq, unsigned int on)
+{
+   return -EINVAL;
+}
+
+static int msm_irq_set_type(unsigned int irq, unsigned int flow_type)
+{
+   unsigned treg = VIC_INT_TYPE0 + ((irq  32) ? 4 : 0);
+   unsigned preg = VIC_INT_POLARITY0 + ((irq  32) ? 4 : 0);
+   int b = 1  (irq  31);
+
+   if (flow_type  (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW))
+   writel(readl(preg) | b, preg);
+   if (flow_type  (IRQF_TRIGGER_RISING | IRQF_TRIGGER_HIGH))
+   writel(readl(preg)  (~b), preg);
+
+   if (flow_type 

[ARM] msm: core platform support for ARCH_MSM7X00A

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3042102a28501510a409fe86962f20369e325cf2
Commit: 3042102a28501510a409fe86962f20369e325cf2
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Brian Swetland [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 04:11:43 2007 -0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:39:14 2008 +

[ARM] msm: core platform support for ARCH_MSM7X00A

- core header files for arch-msm
- Kconfig and Makefiles to enable ARCH_MSM7X00A builds
- MSM7X00A specific arch_idle
- peripheral iomap and irq number definitions

Signed-off-by: Brian Swetland [EMAIL PROTECTED]
---
 arch/arm/Kconfig   |   11 
 arch/arm/Makefile  |1 +
 arch/arm/mach-msm/Makefile |2 +
 arch/arm/mach-msm/Makefile.boot|3 +
 arch/arm/mach-msm/idle.S   |   36 +++
 arch/arm/mach-msm/io.c |   85 ++
 arch/arm/mm/Kconfig|3 +-
 include/asm-arm/arch-msm/board.h   |   37 +++
 include/asm-arm/arch-msm/debug-macro.S |   40 
 include/asm-arm/arch-msm/dma.h |1 +
 include/asm-arm/arch-msm/entry-macro.S |   38 
 include/asm-arm/arch-msm/hardware.h|   18 ++
 include/asm-arm/arch-msm/io.h  |   33 ++
 include/asm-arm/arch-msm/irqs.h|   89 +++
 include/asm-arm/arch-msm/memory.h  |   27 
 include/asm-arm/arch-msm/msm_iomap.h   |  104 
 include/asm-arm/arch-msm/system.h  |   23 +++
 include/asm-arm/arch-msm/timex.h   |   20 ++
 include/asm-arm/arch-msm/uncompress.h  |   36 +++
 include/asm-arm/arch-msm/vmalloc.h |   22 +++
 20 files changed, 628 insertions(+), 1 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a04f507..89c3811 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -409,6 +409,17 @@ config ARCH_OMAP
help
  Support for TI's OMAP platform (OMAP1 and OMAP2).
 
+config ARCH_MSM7X00A
+   bool Qualcomm MSM7X00A
+   select GENERIC_TIME
+   select GENERIC_CLOCKEVENTS
+   help
+ Support for Qualcomm MSM7X00A based systems.  This runs on the ARM11
+ apps processor of the MSM7X00A and depends on a shared memory
+ interface to the ARM9 modem processor which runs the baseband stack
+ and controls some vital subsystems (clock and power control, etc).
+ http://www.cdmatech.com/products/msm7200_chipset_solution.jsp
+
 endchoice
 
 source arch/arm/mach-clps711x/Kconfig
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 35e56c9..dd220d1 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -139,6 +139,7 @@ endif
  machine-$(CONFIG_ARCH_KS8695) := ks8695
   incdir-$(CONFIG_ARCH_MXC)   := mxc
  machine-$(CONFIG_ARCH_MX3)   := mx3
+ machine-$(CONFIG_ARCH_MSM7X00A)   := msm
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
 # This is what happens if you forget the IOCS16 line.
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
new file mode 100644
index 000..feb9e46
--- /dev/null
+++ b/arch/arm/mach-msm/Makefile
@@ -0,0 +1,2 @@
+obj-y += io.o idle.o 
+
diff --git a/arch/arm/mach-msm/Makefile.boot b/arch/arm/mach-msm/Makefile.boot
new file mode 100644
index 000..24dfbf8
--- /dev/null
+++ b/arch/arm/mach-msm/Makefile.boot
@@ -0,0 +1,3 @@
+  zreladdr-y   := 0x10008000
+params_phys-y  := 0x1100
+initrd_phys-y  := 0x1080
diff --git a/arch/arm/mach-msm/idle.S b/arch/arm/mach-msm/idle.S
new file mode 100644
index 000..2b1cb7f
--- /dev/null
+++ b/arch/arm/mach-msm/idle.S
@@ -0,0 +1,36 @@
+/* linux/include/asm-arm/arch-msm/idle.S
+ *
+ * Idle processing for MSM7K - work around bugs with SWFI.
+ *
+ * Copyright (c) 2007 QUALCOMM Incorporated.
+ * Copyright (C) 2007 Google, Inc. 
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */ 
+   
+#include linux/linkage.h
+#include asm/assembler.h
+
+ENTRY(arch_idle)
+#ifdef CONFIG_MSM7X00A_IDLE
+   mrc p15, 0, r1, c1, c0, 0/* read current CR*/
+   bic r0, r1, #(1  2)/* clear dcache bit   */
+   bic r0, r0, #(1  12)   /* clear icache bit   */
+   mcr p15, 0, r0, c1, c0, 0/* disable d/i cache  */
+
+   mov r0, #0   /* prepare wfi value  */
+   mcr p15, 0, r0, c7, c10, 0   /* flush the cache

[ARM] CONFIG_DEBUG_STACK_USAGE

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ddf4e42c6a109392851d8843e2699bffd3c476bf
Commit: ddf4e42c6a109392851d8843e2699bffd3c476bf
Parent: 70b6f2b4af709bded5220bcd8f3b4e255de20411
Author: Sascha Hauer [EMAIL PROTECTED]
AuthorDate: Tue Jul 24 18:37:01 2007 +0200
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:50:06 2008 +

[ARM] CONFIG_DEBUG_STACK_USAGE

In early 2.6 days stack utilization instrumentation was made
configurable. Seems that arm misses the DEBUG_STACK_USAGE option.

Signed-off-by: Sascha Hauer [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig.debug |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 18101f5..192ee01 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -43,6 +43,12 @@ config DEBUG_ERRORS
  you are concerned with the code size or don't want to see these
  messages.
 
+config DEBUG_STACK_USAGE
+   bool Enable stack utilization instrumentation
+   depends on DEBUG_KERNEL
+   help
+ Enables the display of the minimum amount of free stack which each
+ task has ever had available in the sysrq-T output.
 
 # These options are only for real kernel hackers who want to get their hands 
dirty.
 config DEBUG_LL
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4689/1: small comment wrap fix

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=70b6f2b4af709bded5220bcd8f3b4e255de20411
Commit: 70b6f2b4af709bded5220bcd8f3b4e255de20411
Parent: 7b544c99e0328937932022da3cbdd38cf3f072ec
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Tue Dec 4 14:33:33 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:50:05 2008 +

[ARM] 4689/1: small comment wrap fix

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/kernel/entry-armv.S |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 29dec08..d65b072 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -11,8 +11,8 @@
  *
  *  Low-level vector interface routines
  *
- *  Note:  there is a StrongARM bug in the STMIA rn, {regs}^ instruction that 
causes
- *  it to save wrong values...  Be aware!
+ *  Note:  there is a StrongARM bug in the STMIA rn, {regs}^ instruction
+ *  that causes it to save wrong values...  Be aware!
  */
 
 #include asm/memory.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4666/1: ixp4xx: fix sparse warnings in include/asm-arm/arch-ixp4xx/io.h

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2936b1976a9c70d1cce4700c51f26d4b9495e9d
Commit: d2936b1976a9c70d1cce4700c51f26d4b9495e9d
Parent: e173dbf68869dd1fe64c16b8d6ae2fbe6a3b2f89
Author: Pavel Roskin [EMAIL PROTECTED]
AuthorDate: Sun Nov 25 02:12:39 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:50:03 2008 +

[ARM] 4666/1: ixp4xx: fix sparse warnings in 
include/asm-arm/arch-ixp4xx/io.h

Don't lose __iomem in casts.  Use __force to cast __iomem addresses to
integers.  Use __force to cast u32 to __le32 and vice versa.

Signed-off-by: Pavel Roskin [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-ixp4xx/io.h |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
index a90..9c5d235 100644
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ b/include/asm-arm/arch-ixp4xx/io.h
@@ -61,13 +61,13 @@ __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned 
int mtype)
if((addr  PCIBIOS_MIN_MEM) || (addr  0x4fff))
return __arm_ioremap(addr, size, mtype);
 
-   return (void *)addr;
+   return (void __iomem *)addr;
 }
 
 static inline void
 __ixp4xx_iounmap(void __iomem *addr)
 {
-   if ((u32)addr = VMALLOC_START)
+   if ((__force u32)addr = VMALLOC_START)
__iounmap(addr);
 }
 
@@ -141,9 +141,9 @@ __ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 
*vaddr, int count)
 static inline void 
 __ixp4xx_writel(u32 value, volatile void __iomem *p)
 {
-   u32 addr = (u32)p;
+   u32 addr = (__force u32)p;
if (addr = VMALLOC_START) {
-   __raw_writel(value, addr);
+   __raw_writel(value, p);
return;
}
 
@@ -208,11 +208,11 @@ __ixp4xx_readsw(const volatile void __iomem *bus_addr, 
u16 *vaddr, u32 count)
 static inline unsigned long 
 __ixp4xx_readl(const volatile void __iomem *p)
 {
-   u32 addr = (u32)p;
+   u32 addr = (__force u32)p;
u32 data;
 
if (addr = VMALLOC_START)
-   return __raw_readl(addr);
+   return __raw_readl(p);
 
if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, data))
return 0x;
@@ -438,7 +438,7 @@ __ixp4xx_ioread32(const void __iomem *addr)
return  (unsigned int)__ixp4xx_inl(port  PIO_MASK);
else {
 #ifndef CONFIG_IXP4XX_INDIRECT_PCI
-   return le32_to_cpu(__raw_readl((u32)port));
+   return le32_to_cpu((__force __le32)__raw_readl(addr));
 #else
return (unsigned int)__ixp4xx_readl(addr);
 #endif
@@ -523,7 +523,7 @@ __ixp4xx_iowrite32(u32 value, void __iomem *addr)
__ixp4xx_outl(value, port  PIO_MASK);
else
 #ifndef CONFIG_IXP4XX_INDIRECT_PCI
-   __raw_writel(cpu_to_le32(value), port);
+   __raw_writel((u32 __force)cpu_to_le32(value), addr);
 #else
__ixp4xx_writel(value, addr);
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] remove reference to non-existent MTD_OBSOLETE_CHIPS

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e173dbf68869dd1fe64c16b8d6ae2fbe6a3b2f89
Commit: e173dbf68869dd1fe64c16b8d6ae2fbe6a3b2f89
Parent: c5f333831fe2ff1656f954aabdb3eb8c276169cc
Author: Robert P. J. Day [EMAIL PROTECTED]
AuthorDate: Wed Nov 21 14:51:49 2007 -0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:50:02 2008 +

[ARM] remove reference to non-existent MTD_OBSOLETE_CHIPS

The CONFIG variable MTD_OBSOLETE_CHIPS was deleted in commit
ba7cc09c9c9e29a57045dc5bbf843ac1cfad3283.

Signed-off-by: Robert P. J. Day [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/configs/collie_defconfig |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/collie_defconfig 
b/arch/arm/configs/collie_defconfig
index 970c8c7..4264e27 100644
--- a/arch/arm/configs/collie_defconfig
+++ b/arch/arm/configs/collie_defconfig
@@ -367,7 +367,6 @@ CONFIG_MTD_CFI_UTIL=y
 # CONFIG_MTD_RAM is not set
 # CONFIG_MTD_ROM is not set
 # CONFIG_MTD_ABSENT is not set
-CONFIG_MTD_OBSOLETE_CHIPS=y
 CONFIG_MTD_SHARP=y
 # CONFIG_MTD_XIP is not set
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Remove at91_lcdc.h

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f1a6de9c7efc8e3fb535f1e61848f671f90b5cd5
Commit: f1a6de9c7efc8e3fb535f1e61848f671f90b5cd5
Parent: df1a29032060680d258689448dca37bb003c4c2c
Author: Jan Altenberg [EMAIL PROTECTED]
AuthorDate: Tue Oct 2 13:26:43 2007 -0700
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:49:58 2008 +

[ARM] Remove at91_lcdc.h

include/asm-arm/arch-at91/at91_lcdc.h (which is still present in latest
git) has been superseeded by include/video/atmel_lcdc.h, so let's remove
it.

Signed-off-by: Jan Altenberg [EMAIL PROTECTED]
Cc: Andrew Victor [EMAIL PROTECTED]
Cc: Nicolas Ferre [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-at91/at91_lcdc.h |  148 -
 1 files changed, 0 insertions(+), 148 deletions(-)

diff --git a/include/asm-arm/arch-at91/at91_lcdc.h 
b/include/asm-arm/arch-at91/at91_lcdc.h
deleted file mode 100644
index ab040a4..000
--- a/include/asm-arm/arch-at91/at91_lcdc.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * include/asm-arm/arch-at91/at91_lcdc.h
- *
- * LCD Controller (LCDC).
- * Based on AT91SAM9261 datasheet revision E.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef AT91_LCDC_H
-#define AT91_LCDC_H
-
-#define AT91_LCDC_DMABADDR10x00/* DMA Base Address Register 1 
*/
-#define AT91_LCDC_DMABADDR20x04/* DMA Base Address Register 2 
*/
-#define AT91_LCDC_DMAFRMPT10x08/* DMA Frame Pointer Register 1 
*/
-#define AT91_LCDC_DMAFRMPT20x0c/* DMA Frame Pointer Register 2 
*/
-#define AT91_LCDC_DMAFRMADD1   0x10/* DMA Frame Address Register 1 
*/
-#define AT91_LCDC_DMAFRMADD2   0x14/* DMA Frame Address Register 2 
*/
-
-#define AT91_LCDC_DMAFRMCFG0x18/* DMA Frame Configuration 
Register */
-#defineAT91_LCDC_FRSIZE(0x7f   0)/* 
Frame Size */
-#defineAT91_LCDC_BLENGTH   (0x7f  24)/* 
Burst Length */
-
-#define AT91_LCDC_DMACON   0x1c/* DMA Control Register */
-#defineAT91_LCDC_DMAEN (0x1  0)  /* DMA Enable */
-#defineAT91_LCDC_DMARST(0x1  1)  /* DMA Reset */
-#defineAT91_LCDC_DMABUSY   (0x1  2)  /* DMA Busy */
-
-#define AT91_LCDC_LCDCON1  0x0800  /* LCD Control Register 1 */
-#defineAT91_LCDC_BYPASS(1   0)   /* Bypass 
lcd_dotck divider */
-#defineAT91_LCDC_CLKVAL(0x1ff  12)   /* Clock 
Divider */
-#defineAT91_LCDC_LINCNT(0x7ff  21)   /* Line Counter 
*/
-
-#define AT91_LCDC_LCDCON2  0x0804  /* LCD Control Register 2 */
-#defineAT91_LCDC_DISTYPE   (3  0)/* Display Type 
*/
-#defineAT91_LCDC_DISTYPE_STNMONO   (0  0)
-#defineAT91_LCDC_DISTYPE_STNCOLOR  (1  0)
-#defineAT91_LCDC_DISTYPE_TFT   (2  0)
-#defineAT91_LCDC_SCANMOD   (1  2)/* Scan Mode */
-#defineAT91_LCDC_SCANMOD_SINGLE(0  2)
-#defineAT91_LCDC_SCANMOD_DUAL  (1  2)
-#defineAT91_LCDC_IFWIDTH   (3  3)/*Interface 
Width */
-#defineAT91_LCDC_IFWIDTH_4 (0  3)
-#defineAT91_LCDC_IFWIDTH_8 (1  3)
-#defineAT91_LCDC_IFWIDTH_16(2  3)
-#defineAT91_LCDC_PIXELSIZE (7  5)/* Bits per 
pixel */
-#defineAT91_LCDC_PIXELSIZE_1   (0  5)
-#defineAT91_LCDC_PIXELSIZE_2   (1  5)
-#defineAT91_LCDC_PIXELSIZE_4   (2  5)
-#defineAT91_LCDC_PIXELSIZE_8   (3  5)
-#defineAT91_LCDC_PIXELSIZE_16  (4  5)
-#defineAT91_LCDC_PIXELSIZE_24  (5  5)
-#defineAT91_LCDC_INVVD (1  8)/* LCD Data 
polarity */
-#defineAT91_LCDC_INVVD_NORMAL  (0  8)
-#defineAT91_LCDC_INVVD_INVERTED(1  8)
-#defineAT91_LCDC_INVFRAME  (1  9 )   /* LCD VSync 
polarity */
-#defineAT91_LCDC_INVFRAME_NORMAL   (0  9)
-#defineAT91_LCDC_INVFRAME_INVERTED (1  9)
-#defineAT91_LCDC_INVLINE   (1  10)   /* LCD HSync 
polarity 

[ARM] Update mach-types

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2fd2b1242810fb4d2ba36548fecc1f005c36770c
Commit: 2fd2b1242810fb4d2ba36548fecc1f005c36770c
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Sat Jan 26 14:47:48 2008 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:47:48 2008 +

[ARM] Update mach-types

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/tools/mach-types |  258 +++--
 1 files changed, 251 insertions(+), 7 deletions(-)

diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 0a9a5e7..7ed58c0 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Fri May 11 19:53:41 2007
+# Last update: Sat Jan 26 14:45:34 2008
 #
 # machine_is_xxx   CONFIG_ MACH_TYPE_xxx   number
 #
@@ -266,7 +266,7 @@ stork_egg   ARCH_STORK_EGG  STORK_EGG   
248
 wismo  SA1100_WISMOWISMO   249
 ezlinx ARCH_EZLINX EZLINX  250
 at91rm9200 ARCH_AT91RM9200 AT91RM9200  251
-orion  ARCH_ORION  ORION   252
+adtech_orion   ARCH_ADTECH_ORION   ADTECH_ORION252
 neptuneARCH_NEPTUNENEPTUNE 
253
 hackkitSA1100_HACKKIT  HACKKIT 
254
 pxa_wins30 ARCH_PXA_WINS30 PXA_WINS30  255
@@ -661,7 +661,6 @@ a9200ec MACH_A9200ECA9200EC 
645
 pnx0105MACH_PNX0105PNX0105 
646
 adcpoecpu  MACH_ADCPOECPU  ADCPOECPU   647
 csb637 MACH_CSB637 CSB637  648
-ml69q6203  MACH_ML69Q6203  ML69Q6203   649
 mb9200 MACH_MB9200 MB9200  650
 kulun  MACH_KULUN  KULUN   651
 snapperMACH_SNAPPERSNAPPER 
652
@@ -953,7 +952,6 @@ fred_jack   MACH_FRED_JACK  FRED_JACK   
939
 ttg_color1 MACH_TTG_COLOR1 TTG_COLOR1  940
 nxeb500hmi MACH_NXEB500HMI NXEB500HMI  941
 netdcu8MACH_NETDCU8NETDCU8 
942
-ml675050_cpu_boa   MACH_ML675050_CPU_BOA   ML675050_CPU_BOA943
 ng_fvx538  MACH_NG_FVX538  NG_FVX538   944
 ng_fvs338  MACH_NG_FVS338  NG_FVS338   945
 pnx4103MACH_PNX4103PNX4103 
946
@@ -1148,7 +1146,7 @@ aidx270   MACH_AIDX270AIDX270 
1134
 rema   MACH_REMA   REMA1135
 bps1000MACH_BPS1000BPS1000 
1136
 hw90350MACH_HW90350HW90350 
1137
-omap_sdp3430   MACH_OMAP_SDP3430   OMAP_SDP34301138
+omap_3430sdp   MACH_OMAP_3430SDP   OMAP_3430SDP1138
 bluetouch  MACH_BLUETOUCH  BLUETOUCH   1139
 vstms  MACH_VSTMS  VSTMS   1140
 xsbase270  MACH_XSBASE270  XSBASE270   1141
@@ -1214,7 +1212,7 @@ osstbox   MACH_OSSTBOXOSSTBOX 
1203
 kbat9261   MACH_KBAT9261   KBAT92611204
 ct1100 MACH_CT1100 CT1100  1205
 akcppxaMACH_AKCPPXAAKCPPXA 
1206
-zevio_1020 MACH_ZEVIO_1020 ZEVIO_1020  1207
+ochaya1020 MACH_OCHAYA1020 OCHAYA1020  1207
 hitrackMACH_HITRACKHITRACK 
1208
 syme1  MACH_SYME1  SYME1   1209
 syhl1  MACH_SYHL1  SYHL1   1210
@@ -1299,7 +1297,7 @@ xp179 MACH_XP179  XP179   
1290
 h4300  MACH_H4300  H4300   1291
 goramo_mlr MACH_GORAMO_MLR GORAMO_MLR  1292
 mxc30020evbMACH_MXC30020EVBMXC30020EVB 1293
-adsbitsymx MACH_ADSBITSIMX ADSBITSIMX  1294
+adsbitsyg5 MACH_ADSBITSYG5 

[ARM] 4603/1: KS8695: debugfs interface to view pin state

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=20118ff97823822bf4d52ccb528ce2b5042c3057
Commit: 20118ff97823822bf4d52ccb528ce2b5042c3057
Parent: 7d77ce8f67358c6b7708726f8fa230cd58d75b2c
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Mon Oct 15 14:27:41 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:38:48 2008 +

[ARM] 4603/1: KS8695: debugfs interface to view pin state

This patch adds a debug interface (if CONFIG_DEBUG_FS is selected) to
display the basic configuration and current state of the GPIO pins on
the Kendin/Micrel KS8695 processor.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-ks8695/gpio.c |   83 +++
 include/asm-arm/arch-ks8695/regs-gpio.h |2 +
 2 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c
index b1aa3cb..5e46191 100644
--- a/arch/arm/mach-ks8695/gpio.c
+++ b/arch/arm/mach-ks8695/gpio.c
@@ -20,6 +20,8 @@
 #include linux/kernel.h
 #include linux/mm.h
 #include linux/init.h
+#include linux/debugfs.h
+#include linux/seq_file.h
 #include linux/module.h
 
 #include asm/io.h
@@ -216,3 +218,84 @@ int irq_to_gpio(unsigned int irq)
return (irq - KS8695_IRQ_EXTERN0);
 }
 EXPORT_SYMBOL(irq_to_gpio);
+
+
+/*  Debug interface . 
*/
+
+#ifdef CONFIG_DEBUG_FS
+
+static int ks8695_gpio_show(struct seq_file *s, void *unused)
+{
+   unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, 
IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN };
+   unsigned int intmask[] = { IOPC_IOEINT0TM, IOPC_IOEINT1TM, 
IOPC_IOEINT2TM, IOPC_IOEINT3TM };
+   unsigned long mode, ctrl, data;
+   int i;
+
+   mode = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
+   ctrl = __raw_readl(KS8695_GPIO_VA + KS8695_IOPC);
+   data = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
+
+   seq_printf(s, Pin\tI/O\tFunction\tState\n\n);
+
+   for (i = KS8695_GPIO_0; i = KS8695_GPIO_15 ; i++) {
+   seq_printf(s, %i:\t, i);
+
+   seq_printf(s, %s\t, (mode  IOPM_(i)) ? Output : Input);
+
+   if (i = KS8695_GPIO_3) {
+   if (ctrl  enable[i]) {
+   seq_printf(s, EXT%i , i);
+
+   switch ((ctrl  intmask[i])  (4 * i)) {
+   case IOPC_TM_LOW:
+   seq_printf(s, (Low)); 
break;
+   case IOPC_TM_HIGH:
+   seq_printf(s, (High));
break;
+   case IOPC_TM_RISING:
+   seq_printf(s, (Rising));  
break;
+   case IOPC_TM_FALLING:
+   seq_printf(s, (Falling)); 
break;
+   case IOPC_TM_EDGE:
+   seq_printf(s, (Edges));   
break;
+   }
+   }
+   else
+   seq_printf(s, GPIO\t);
+   }
+   else if (i = KS8695_GPIO_5) {
+   if (ctrl  enable[i])
+   seq_printf(s, TOUT%i\t, i - KS8695_GPIO_4);
+   else
+   seq_printf(s, GPIO\t);
+   }
+   else
+   seq_printf(s, GPIO\t);
+
+   seq_printf(s, \t);
+
+   seq_printf(s, %i\n, (data  IOPD_(i)) ? 1 : 0);
+   }
+   return 0;
+}
+
+static int ks8695_gpio_open(struct inode *inode, struct file *file)
+{
+   return single_open(file, ks8695_gpio_show, NULL);
+}
+
+static const struct file_operations ks8695_gpio_operations = {
+   .open   = ks8695_gpio_open,
+   .read   = seq_read,
+   .llseek = seq_lseek,
+   .release= single_release,
+};
+
+static int __init ks8695_gpio_debugfs_init(void)
+{
+   /* /sys/kernel/debug/ks8695_gpio */
+   (void) debugfs_create_file(ks8695_gpio, S_IFREG | S_IRUGO, NULL, 
NULL, ks8695_gpio_operations);
+   return 0;
+}
+postcore_initcall(ks8695_gpio_debugfs_init);
+
+#endif
diff --git a/include/asm-arm/arch-ks8695/regs-gpio.h 
b/include/asm-arm/arch-ks8695/regs-gpio.h
index 57fcf9f..6b95d77 100644
--- a/include/asm-arm/arch-ks8695/regs-gpio.h
+++ b/include/asm-arm/arch-ks8695/regs-gpio.h
@@ -49,5 +49,7 @@
 #define IOPC_TM_FALLING(4) /* Falling Edge 
Detection */
 #define IOPC_TM_EDGE   (6) /* Both Edge Detection */
 
+/* Port Data Register */
+#define IOPD_(x)   

ARM kprobes: let's enable it

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5de865b4c5af253db19bdae3c0553952dc7eda1d
Commit: 5de865b4c5af253db19bdae3c0553952dc7eda1d
Parent: 796969104cab0d454dbc792ad0d12a4f365a8564
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Mon Dec 3 17:15:52 2007 -0500
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:17 2008 +

ARM kprobes: let's enable it

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 Documentation/kprobes.txt|1 +
 arch/arm/Kconfig.instrumentation |   10 ++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index cb12ae1..53a6389 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -141,6 +141,7 @@ architectures:
 - ppc64
 - ia64 (Does not support probes on instruction slot1.)
 - sparc64 (Return probes not yet implemented.)
+- arm
 
 3. Configuring Kprobes
 
diff --git a/arch/arm/Kconfig.instrumentation b/arch/arm/Kconfig.instrumentation
index 63b8c6d..453ad8e 100644
--- a/arch/arm/Kconfig.instrumentation
+++ b/arch/arm/Kconfig.instrumentation
@@ -43,6 +43,16 @@ config OPROFILE_MPCORE
 config OPROFILE_ARM11_CORE
bool
 
+config KPROBES
+   bool Kprobes
+   depends on KALLSYMS  MODULES  !UML  !XIP_KERNEL
+   help
+ Kprobes allows you to trap at almost any kernel address and
+ execute a callback function.  register_kprobe() establishes
+ a probepoint and specifies the callback.  Kprobes is useful
+ for kernel debugging, non-intrusive instrumentation and testing.
+ If in doubt, say N.
+
 config MARKERS
bool Activate markers
help
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM kprobes: add the kprobes hook to the page fault handler

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25ce1dd71b8326f2542cf030f68e0e64c3d94dc1
Commit: 25ce1dd71b8326f2542cf030f68e0e64c3d94dc1
Parent: 24ba613c9d6cad315f484e658288db152f1dc447
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Mon Dec 3 15:21:57 2007 -0500
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:16 2008 +

ARM kprobes: add the kprobes hook to the page fault handler

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/mm/fault.c |   27 +++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index a8a7dab..1e7b1ed 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -12,6 +12,7 @@
 #include linux/signal.h
 #include linux/mm.h
 #include linux/init.h
+#include linux/kprobes.h
 
 #include asm/system.h
 #include asm/pgtable.h
@@ -20,6 +21,29 @@
 
 #include fault.h
 
+
+#ifdef CONFIG_KPROBES
+static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
+{
+   int ret = 0;
+
+   if (!user_mode(regs)) {
+   /* kprobe_running() needs smp_processor_id() */
+   preempt_disable();
+   if (kprobe_running()  kprobe_fault_handler(regs, fsr))
+   ret = 1;
+   preempt_enable();
+   }
+
+   return ret;
+}
+#else
+static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
+{
+   return 0;
+}
+#endif
+
 /*
  * This is useful to dump out the page tables associated with
  * 'addr' in mm 'mm'.
@@ -222,6 +246,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct 
pt_regs *regs)
struct mm_struct *mm;
int fault, sig, code;
 
+   if (notify_page_fault(regs, fsr))
+   return 0;
+
tsk = current;
mm  = tsk-mm;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM kprobes: instruction single-stepping support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35aa1df4328340f38edc46f00837f08d33d49f63
Commit: 35aa1df4328340f38edc46f00837f08d33d49f63
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Quentin Barnes [EMAIL PROTECTED]
AuthorDate: Mon Jun 11 22:20:10 2007 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:16 2008 +

ARM kprobes: instruction single-stepping support

This is the code implementing instruction single-stepping for kprobes
on ARM.

To get around the limitation of no Next-PC and no hardware single-
stepping, all kprobe'd instructions are split into three camps:
simulation, emulation, and rejected. Simulated instructions are
those instructions which behavior is reproduced by straight C code.
Emulated instructions are ones that are copied, slightly altered
and executed directly in the instruction slot to reproduce their
behavior.  Rejected instructions are ones that could be simulated,
but work hasn't been put into simulating them. These instructions
should be very rare, if not unencountered, in the kernel. If ever
needed, code could be added to simulate them.

One might wonder why this and the ptrace singlestep facility are not
sharing some code.  Both approaches are fundamentally different because
the ptrace code regains control after the stepped instruction by installing
a breakpoint after the instruction itself, and possibly at the location
where the instruction might be branching to, instead of simulating or
emulating the target instruction.

The ptrace approach isn't suitable for kprobes because the breakpoints
would have to be moved back, and the icache flushed, everytime the
probe is hit to let normal code execution resume, which would have a
significant performance impact. It is also racy on SMP since another
CPU could, with the right timing, sail through the probe point without
being caught.  Because ptrace single-stepping always result in a
different process to be scheduled, the concern for performance is much
less significant.

On the other hand, the kprobes approach isn't (currently) suitable for
ptrace because it has no provision for proper user space memory
protection and translation, and even if that was implemented, the gain
wouldn't be worth the added complexity in the ptrace path compared to
the current approach.

So, until kprobes does support user space, both kprobes and ptrace are
best kept independent and separate.

Signed-off-by: Quentin Barnes [EMAIL PROTECTED]
Signed-off-by: Abhishek Sagar [EMAIL PROTECTED]
Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/kernel/Makefile |1 +
 arch/arm/kernel/kprobes-decode.c | 1529 ++
 include/asm-arm/kprobes.h|   43 ++
 3 files changed, 1573 insertions(+), 0 deletions(-)

diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 593b565..9e0eeba 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_ISA_DMA) += dma-isa.o
 obj-$(CONFIG_PCI)  += bios32.o isa.o
 obj-$(CONFIG_SMP)  += smp.o
 obj-$(CONFIG_KEXEC)+= machine_kexec.o relocate_kernel.o
+obj-$(CONFIG_KPROBES)  += kprobes-decode.o
 obj-$(CONFIG_OABI_COMPAT)  += sys_oabi-compat.o
 
 obj-$(CONFIG_CRUNCH)   += crunch.o crunch-bits.o
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c
new file mode 100644
index 000..d51bc8b
--- /dev/null
+++ b/arch/arm/kernel/kprobes-decode.c
@@ -0,0 +1,1529 @@
+/*
+ * arch/arm/kernel/kprobes-decode.c
+ *
+ * Copyright (C) 2006, 2007 Motorola Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+/*
+ * We do not have hardware single-stepping on ARM, This
+ * effort is further complicated by the ARM not having a
+ * next PC register.  Instructions that change the PC
+ * can't be safely single-stepped in a MP environment, so
+ * we have a lot of work to do:
+ *
+ * In the prepare phase:
+ *   *) If it is an instruction that does anything
+ *  with the CPU mode, we reject it for a kprobe.
+ *  (This is out of laziness rather than need.  The
+ *  instructions could be simulated.)
+ *
+ *   *) Otherwise, decode the instruction rewriting its
+ *  registers to take fixed, ordered registers and
+ *  setting a handler for it to run the instruction.
+ *
+ * 

[ARM] 4670/1: ep93xx: implement IRQT_BOTHEDGE gpio irq sense type

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c9a071d77e007464952a2d41b6686d98eb3f0b8
Commit: 3c9a071d77e007464952a2d41b6686d98eb3f0b8
Parent: 7ca722533979d47563e75a40c86c405153818b83
Author: Herbert Valerio Riedel [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 18:49:08 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:37:31 2008 +

[ARM] 4670/1: ep93xx: implement IRQT_BOTHEDGE gpio irq sense type

Having a both-edge sensitive irq trigger type is required for the
generic gpio-keys input driver; alas the ep93xx does not support
both-edge gpio triggers in hardware, so this patch implements them by
switching edge polarity on each triggered interrupt.  This is the same
approach as taken by the Orion SoC both-edge gpio irq support
implementation.

Signed-off-by: Herbert Valerio Riedel [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-ep93xx/core.c |   64 +++---
 1 files changed, 53 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 58957d7..2788da0 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -3,6 +3,7 @@
  * Core routines for Cirrus EP93xx chips.
  *
  * Copyright (C) 2006 Lennert Buytenhek [EMAIL PROTECTED]
+ * Copyright (C) 2007 Herbert Valerio Riedel [EMAIL PROTECTED]
  *
  * Thanks go to Michael Burian and Ray Lehtiniemi for their key
  * role in the ep93xx linux community.
@@ -315,12 +316,29 @@ static void ep93xx_gpio_f_irq_handler(unsigned int irq, 
struct irq_desc *desc)
desc_handle_irq(gpio_irq, irq_desc + gpio_irq);
 }
 
+static void ep93xx_gpio_irq_ack(unsigned int irq)
+{
+   int line = irq_to_gpio(irq);
+   int port = line  3;
+   int port_mask = 1  (line  7);
+
+   if ((irq_desc[irq].status  IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) {
+   gpio_int_type2[port] ^= port_mask; /* switch edge direction */
+   update_gpio_int_params(port);
+   }
+
+   __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port]));
+}
+
 static void ep93xx_gpio_irq_mask_ack(unsigned int irq)
 {
int line = irq_to_gpio(irq);
int port = line  3;
int port_mask = 1  (line  7);
 
+   if ((irq_desc[irq].status  IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE)
+   gpio_int_type2[port] ^= port_mask; /* switch edge direction */
+
gpio_int_unmasked[port] = ~port_mask;
update_gpio_int_params(port);
 
@@ -353,31 +371,54 @@ static void ep93xx_gpio_irq_unmask(unsigned int irq)
  */
 static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type)
 {
+   struct irq_desc *desc = irq_desc + irq;
const int gpio = irq_to_gpio(irq);
const int port = gpio  3;
const int port_mask = 1  (gpio  7);
 
ep93xx_gpio_set_direction(gpio, GPIO_IN);
 
-   if (type  IRQT_RISING) {
-   gpio_int_enabled[port] |= port_mask;
+   switch (type) {
+   case IRQT_RISING:
gpio_int_type1[port] |= port_mask;
gpio_int_type2[port] |= port_mask;
-   } else if (type  IRQT_FALLING) {
-   gpio_int_enabled[port] |= port_mask;
+   desc-handle_irq = handle_edge_irq;
+   break;
+   case IRQT_FALLING:
gpio_int_type1[port] |= port_mask;
gpio_int_type2[port] = ~port_mask;
-   } else if (type  IRQT_HIGH) {
-   gpio_int_enabled[port] |= port_mask;
+   desc-handle_irq = handle_edge_irq;
+   break;
+   case IRQT_HIGH:
gpio_int_type1[port] = ~port_mask;
gpio_int_type2[port] |= port_mask;
-   } else if (type  IRQT_LOW) {
-   gpio_int_enabled[port] |= port_mask;
+   desc-handle_irq = handle_level_irq;
+   break;
+   case IRQT_LOW:
gpio_int_type1[port] = ~port_mask;
gpio_int_type2[port] = ~port_mask;
-   } else {
-   gpio_int_enabled[port] = ~port_mask;
+   desc-handle_irq = handle_level_irq;
+   break;
+   case IRQT_BOTHEDGE:
+   gpio_int_type1[port] |= port_mask;
+   /* set initial polarity based on current input level */
+   if (gpio_get_value(gpio))
+   gpio_int_type2[port] = ~port_mask; /* falling */
+   else
+   gpio_int_type2[port] |= port_mask; /* rising */
+   desc-handle_irq = handle_edge_irq;
+   break;
+   default:
+   pr_err(ep93xx: failed to set irq type %d for gpio %d\n,
+  type, gpio);
+   return -EINVAL;
}
+
+   gpio_int_enabled[port] |= port_mask;
+
+   desc-status = ~IRQ_TYPE_SENSE_MASK;
+   

[ARM] 4669/1: ep93xx: simplify GPIO code and cleanups

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ca722533979d47563e75a40c86c405153818b83
Commit: 7ca722533979d47563e75a40c86c405153818b83
Parent: 4e9f9fd5148004b983b29e15de66918e71da56c0
Author: Herbert Valerio Riedel [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 18:45:59 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:37:31 2008 +

[ARM] 4669/1: ep93xx: simplify GPIO code and cleanups

This patch renumbers the (virtual) GPIO line numbering to have all
irq-capable gpio lines = EP93XX_GPIO_LINE_MAX_IRQ by swapping the
port f range with the port c range; This simplifies code such as

 #define IRQ_EP93XX_GPIO(x)  (64 + (((x) + (((x)  2)  8))  0x1f))

or

 if (line = 0  line  16) {
/* Port A/B */
 } else if (line = 40  line  48) {
/* Port F */
 }

considerably; in addition to the renumbering this patch also
introduces macro constants EP93XX_GPIO_LINE_MAX_IRQ and
EP93XX_GPIO_LINE_MAX, and replaces most magic numbers by those and
invocations of gpio_to_irq()/irq_to_gpio().

Signed-off-by: Herbert Valerio Riedel [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-ep93xx/core.c|  147 +---
 include/asm-arm/arch-ep93xx/gpio.h |   27 +++
 include/asm-arm/arch-ep93xx/irqs.h |6 --
 3 files changed, 82 insertions(+), 98 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 8a73406..58957d7 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -157,35 +157,35 @@ static unsigned char gpio_int_enabled[3];
 static unsigned char gpio_int_type1[3];
 static unsigned char gpio_int_type2[3];
 
-static void update_gpio_int_params(int abf)
+/* Port ordering is: A B F */
+static const u8 int_type1_register_offset[3]   = { 0x90, 0xac, 0x4c };
+static const u8 int_type2_register_offset[3]   = { 0x94, 0xb0, 0x50 };
+static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 };
+static const u8 int_en_register_offset[3]  = { 0x9c, 0xb8, 0x5c };
+
+static void update_gpio_int_params(unsigned port)
 {
-   if (abf == 0) {
-   __raw_writeb(0, EP93XX_GPIO_A_INT_ENABLE);
-   __raw_writeb(gpio_int_type2[0], EP93XX_GPIO_A_INT_TYPE2);
-   __raw_writeb(gpio_int_type1[0], EP93XX_GPIO_A_INT_TYPE1);
-   __raw_writeb(gpio_int_unmasked[0]  gpio_int_enabled[0], 
EP93XX_GPIO_A_INT_ENABLE);
-   } else if (abf == 1) {
-   __raw_writeb(0, EP93XX_GPIO_B_INT_ENABLE);
-   __raw_writeb(gpio_int_type2[1], EP93XX_GPIO_B_INT_TYPE2);
-   __raw_writeb(gpio_int_type1[1], EP93XX_GPIO_B_INT_TYPE1);
-   __raw_writeb(gpio_int_unmasked[1]  gpio_int_enabled[1], 
EP93XX_GPIO_B_INT_ENABLE);
-   } else if (abf == 2) {
-   __raw_writeb(0, EP93XX_GPIO_F_INT_ENABLE);
-   __raw_writeb(gpio_int_type2[2], EP93XX_GPIO_F_INT_TYPE2);
-   __raw_writeb(gpio_int_type1[2], EP93XX_GPIO_F_INT_TYPE1);
-   __raw_writeb(gpio_int_unmasked[2]  gpio_int_enabled[2], 
EP93XX_GPIO_F_INT_ENABLE);
-   } else {
-   BUG();
-   }
-}
+   BUG_ON(port  2);
 
+   __raw_writeb(0, EP93XX_GPIO_REG(int_en_register_offset[port]));
+
+   __raw_writeb(gpio_int_type2[port],
+   EP93XX_GPIO_REG(int_type2_register_offset[port]));
+
+   __raw_writeb(gpio_int_type1[port],
+   EP93XX_GPIO_REG(int_type1_register_offset[port]));
+
+   __raw_writeb(gpio_int_unmasked[port]  gpio_int_enabled[port],
+   EP93XX_GPIO_REG(int_en_register_offset[port]));
+}
 
-static unsigned char data_register_offset[8] = {
-   0x00, 0x04, 0x08, 0x0c, 0x20, 0x30, 0x38, 0x40,
+/* Port ordering is: A B F D E C G H */
+static const u8 data_register_offset[8] = {
+   0x00, 0x04, 0x30, 0x0c, 0x20, 0x08, 0x38, 0x40,
 };
 
-static unsigned char data_direction_register_offset[8] = {
-   0x10, 0x14, 0x18, 0x1c, 0x24, 0x34, 0x3c, 0x44,
+static const u8 data_direction_register_offset[8] = {
+   0x10, 0x14, 0x34, 0x1c, 0x24, 0x18, 0x3c, 0x44,
 };
 
 static void ep93xx_gpio_set_direction(unsigned line, int direction)
@@ -199,14 +199,10 @@ static void ep93xx_gpio_set_direction(unsigned line, int 
direction)
 
local_irq_save(flags);
if (direction == GPIO_OUT) {
-   if (line = 0  line  16) {
-   /* Port A/B.  */
+   if (line = 0  line = EP93XX_GPIO_LINE_MAX_IRQ) {
+   /* Port A/B/F */
gpio_int_unmasked[line  3] = ~(1  (line  7));
update_gpio_int_params(line  3);
-   } else if (line = 40  line  48) {
-   /* Port F.  */
-   gpio_int_unmasked[2] = ~(1  (line  

[ARM] 4668/1: ep93xx: implement new GPIO API

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e9f9fd5148004b983b29e15de66918e71da56c0
Commit: 4e9f9fd5148004b983b29e15de66918e71da56c0
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Herbert Valerio Riedel [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 18:41:02 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:37:31 2008 +

[ARM] 4668/1: ep93xx: implement new GPIO API

Implement new GPIO API for ep93xx platform as defined in 
Documentation/gpio.txt
and provide transitional __deprecated wrappers for the previous gpio_line_*
functions.

Signed-off-by: Herbert Valerio Riedel [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig   |1 +
 arch/arm/mach-ep93xx/core.c|   63 +-
 include/asm-arm/arch-ep93xx/gpio.h |   76 +++-
 3 files changed, 111 insertions(+), 29 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a04f507..97e58a1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -217,6 +217,7 @@ config ARCH_EP93XX
bool EP93xx-based
select ARM_AMBA
select ARM_VIC
+   select GENERIC_GPIO
help
  This enables support for the Cirrus EP93xx series of CPUs.
 
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 70b2c78..8a73406 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -188,7 +188,7 @@ static unsigned char data_direction_register_offset[8] = {
0x10, 0x14, 0x18, 0x1c, 0x24, 0x34, 0x3c, 0x44,
 };
 
-void gpio_line_config(int line, int direction)
+static void ep93xx_gpio_set_direction(unsigned line, int direction)
 {
unsigned int data_direction_register;
unsigned long flags;
@@ -219,39 +219,64 @@ void gpio_line_config(int line, int direction)
}
local_irq_restore(flags);
 }
+
+void __deprecated gpio_line_config(int line, int direction)
+{
+   ep93xx_gpio_set_direction(line, direction);
+}
 EXPORT_SYMBOL(gpio_line_config);
 
-int gpio_line_get(int line)
+int gpio_direction_input(unsigned gpio)
+{
+   if (gpio  EP93XX_GPIO_LINE_H(7))
+   return -EINVAL;
+
+   ep93xx_gpio_set_direction(gpio, GPIO_IN);
+
+   return 0;
+}
+EXPORT_SYMBOL(gpio_direction_input);
+
+int gpio_direction_output(unsigned gpio, int value)
+{
+   if (gpio  EP93XX_GPIO_LINE_H(7))
+   return -EINVAL;
+
+   gpio_set_value(gpio, value);
+   ep93xx_gpio_set_direction(gpio, GPIO_OUT);
+
+   return 0;
+}
+EXPORT_SYMBOL(gpio_direction_output);
+
+int gpio_get_value(unsigned gpio)
 {
unsigned int data_register;
 
-   data_register = EP93XX_GPIO_REG(data_register_offset[line  3]);
+   data_register = EP93XX_GPIO_REG(data_register_offset[gpio  3]);
 
-   return !!(__raw_readb(data_register)  (1  (line  7)));
+   return !!(__raw_readb(data_register)  (1  (gpio  7)));
 }
-EXPORT_SYMBOL(gpio_line_get);
+EXPORT_SYMBOL(gpio_get_value);
 
-void gpio_line_set(int line, int value)
+void gpio_set_value(unsigned gpio, int value)
 {
unsigned int data_register;
unsigned long flags;
unsigned char v;
 
-   data_register = EP93XX_GPIO_REG(data_register_offset[line  3]);
+   data_register = EP93XX_GPIO_REG(data_register_offset[gpio  3]);
 
local_irq_save(flags);
-   if (value == EP93XX_GPIO_HIGH) {
-   v = __raw_readb(data_register);
-   v |= 1  (line  7);
-   __raw_writeb(v, data_register);
-   } else if (value == EP93XX_GPIO_LOW) {
-   v = __raw_readb(data_register);
-   v = ~(1  (line  7));
-   __raw_writeb(v, data_register);
-   }
+   v = __raw_readb(data_register);
+   if (value)
+   v |= 1  (gpio  7);
+   else
+   v = ~(1  (gpio  7));
+   __raw_writeb(v, data_register);
local_irq_restore(flags);
 }
-EXPORT_SYMBOL(gpio_line_set);
+EXPORT_SYMBOL(gpio_set_value);
 
 
 /*
@@ -334,9 +359,9 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned 
int type)
 
line = irq - IRQ_EP93XX_GPIO(0);
if (line = 0  line  16) {
-   gpio_line_config(line, GPIO_IN);
+   ep93xx_gpio_set_direction(line, GPIO_IN);
} else {
-   gpio_line_config(EP93XX_GPIO_LINE_F(line-16), GPIO_IN);
+   ep93xx_gpio_set_direction(EP93XX_GPIO_LINE_F(line-16), GPIO_IN);
}
 
port = line  3;
diff --git a/include/asm-arm/arch-ep93xx/gpio.h 
b/include/asm-arm/arch-ep93xx/gpio.h
index 1ee14a1..fc1e57d 100644
--- a/include/asm-arm/arch-ep93xx/gpio.h
+++ b/include/asm-arm/arch-ep93xx/gpio.h
@@ -5,16 +5,6 @@
 #ifndef __ASM_ARCH_GPIO_H
 #define 

[ARM] 4615/4: sam926[13]ek buttons updated

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eaf858a988a4b7b34a6ae03a3ac52cdf25013892
Commit: eaf858a988a4b7b34a6ae03a3ac52cdf25013892
Parent: 86640cae60147b0cd2705145de8067e24db70a8b
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Mon Jan 14 08:53:22 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Jan 27 17:54:16 2008 +

[ARM] 4615/4: sam926[13]ek buttons updated

From: Nicolas Ferre [EMAIL PROTECTED]

On the at92sam9263ek board, tell the input subsystem about the buttons.
This patch is taken from Andrew Victor's at91 patchset, then updated to
match the latest kernel code and to use labels printed on the board.

Also update the at91sam9261ek buttons to cope with input changes.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Acked-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/board-sam9261ek.c |8 ++--
 arch/arm/mach-at91/board-sam9263ek.c |   53 ++
 2 files changed, 57 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-at91/board-sam9261ek.c 
b/arch/arm/mach-at91/board-sam9261ek.c
index 594c5c1..aa29ea5 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -404,25 +404,25 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data;
 static struct gpio_keys_button ek_buttons[] = {
{
.gpio   = AT91_PIN_PA27,
-   .keycode= BTN_0,
+   .code   = BTN_0,
.desc   = Button 0,
.active_low = 1,
},
{
.gpio   = AT91_PIN_PA26,
-   .keycode= BTN_1,
+   .code   = BTN_1,
.desc   = Button 1,
.active_low = 1,
},
{
.gpio   = AT91_PIN_PA25,
-   .keycode= BTN_2,
+   .code   = BTN_2,
.desc   = Button 2,
.active_low = 1,
},
{
.gpio   = AT91_PIN_PA24,
-   .keycode= BTN_3,
+   .code   = BTN_3,
.desc   = Button 3,
.active_low = 1,
}
diff --git a/arch/arm/mach-at91/board-sam9263ek.c 
b/arch/arm/mach-at91/board-sam9263ek.c
index 2df0ff2..f09347a 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -27,6 +27,8 @@
 #include linux/spi/spi.h
 #include linux/spi/ads7846.h
 #include linux/fb.h
+#include linux/gpio_keys.h
+#include linux/input.h
 
 #include video/atmel_lcdc.h
 
@@ -265,6 +267,55 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data;
 
 
 /*
+ * GPIO Buttons
+ */
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+static struct gpio_keys_button ek_buttons[] = {
+   {   /* BP1, leftclic */
+   .code   = BTN_LEFT,
+   .gpio   = AT91_PIN_PC5,
+   .active_low = 1,
+   .desc   = left_click,
+   .wakeup = 1,
+   },
+   {   /* BP2, rightclic */
+   .code   = BTN_RIGHT,
+   .gpio   = AT91_PIN_PC4,
+   .active_low = 1,
+   .desc   = right_click,
+   .wakeup = 1,
+   },
+};
+
+static struct gpio_keys_platform_data ek_button_data = {
+   .buttons= ek_buttons,
+   .nbuttons   = ARRAY_SIZE(ek_buttons),
+};
+
+static struct platform_device ek_button_device = {
+   .name   = gpio-keys,
+   .id = -1,
+   .num_resources  = 0,
+   .dev= {
+   .platform_data  = ek_button_data,
+   }
+};
+
+static void __init ek_add_device_buttons(void)
+{
+   at91_set_GPIO_periph(AT91_PIN_PC5, 0);  /* left button */
+   at91_set_deglitch(AT91_PIN_PC5, 1);
+   at91_set_GPIO_periph(AT91_PIN_PC4, 0);  /* right button */
+   at91_set_deglitch(AT91_PIN_PC4, 1);
+
+   platform_device_register(ek_button_device);
+}
+#else
+static void __init ek_add_device_buttons(void) {}
+#endif
+
+
+/*
  * AC97
  */
 static struct atmel_ac97_data ek_ac97_data = {
@@ -319,6 +370,8 @@ static void __init ek_board_init(void)
at91_add_device_i2c(NULL, 0);
/* LCD Controller */
at91_add_device_lcdc(ek_lcdc_data);
+   /* Push Buttons */
+   ek_add_device_buttons();
/* AC97 */
at91_add_device_ac97(ek_ac97_data);
/* LEDs */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4761/1: [AT91] Board-support for NEW_LEDs

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b41bdf68a72c1fd506ee3dbfbf954fd2eaef75c
Commit: 1b41bdf68a72c1fd506ee3dbfbf954fd2eaef75c
Parent: 2743f0c1dcca54d6c80b0de1273b3f4e90051a85
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:32:17 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:32 2008 +

[ARM] 4761/1: [AT91] Board-support for NEW_LEDs

Add NEW_LEDs support for the following boards:
 - Cogent CSB337
 - Atmel AT91RM9200-DK
 - Atmel AT91RM9200-EK
 - Atmel AT91SAM9263-EK

Mostly based on patch from David Brownell.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/board-csb337.c|   24 
 arch/arm/mach-at91/board-dk.c|   10 ++
 arch/arm/mach-at91/board-ek.c|   21 +
 arch/arm/mach-at91/board-sam9263ek.c |   26 ++
 4 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/board-csb337.c 
b/arch/arm/mach-at91/board-csb337.c
index 51cb3c8..0e2a11f 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -215,6 +215,28 @@ static void __init csb300_add_device_buttons(void)
 static void __init csb300_add_device_buttons(void) {}
 #endif
 
+static struct gpio_led csb_leds[] = {
+   {   /* led0, yellow */
+   .name   = led0,
+   .gpio   = AT91_PIN_PB2,
+   .active_low = 1,
+   .default_trigger= heartbeat,
+   },
+   {   /* led1, green */
+   .name   = led1,
+   .gpio   = AT91_PIN_PB1,
+   .active_low = 1,
+   .default_trigger= mmc0,
+   },
+   {   /* led2, yellow */
+   .name   = led2,
+   .gpio   = AT91_PIN_PB0,
+   .active_low = 1,
+   .default_trigger= ide-disk,
+   },
+};
+
+
 static void __init csb337_board_init(void)
 {
/* Serial */
@@ -236,6 +258,8 @@ static void __init csb337_board_init(void)
at91_add_device_mmc(0, csb337_mmc_data);
/* NOR flash */
platform_device_register(csb_flash);
+   /* LEDs */
+   at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
/* Switches on CSB300 */
csb300_add_device_buttons();
 }
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c
index 40c9e43..0a897ef 100644
--- a/arch/arm/mach-at91/board-dk.c
+++ b/arch/arm/mach-at91/board-dk.c
@@ -183,6 +183,14 @@ static struct platform_device dk_flash = {
.num_resources  = 1,
 };
 
+static struct gpio_led dk_leds[] = {
+   {
+   .name   = led0,
+   .gpio   = AT91_PIN_PB2,
+   .active_low = 1,
+   .default_trigger= heartbeat,
+   }
+};
 
 static void __init dk_board_init(void)
 {
@@ -213,6 +221,8 @@ static void __init dk_board_init(void)
at91_add_device_nand(dk_nand_data);
/* NOR Flash */
platform_device_register(dk_flash);
+   /* LEDs */
+   at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
/* VGA */
 // dk_add_device_video();
 }
diff --git a/arch/arm/mach-at91/board-ek.c b/arch/arm/mach-at91/board-ek.c
index 53a5ef9..0574e50 100644
--- a/arch/arm/mach-at91/board-ek.c
+++ b/arch/arm/mach-at91/board-ek.c
@@ -141,6 +141,25 @@ static struct platform_device ek_flash = {
.num_resources  = 1,
 };
 
+static struct gpio_led ek_leds[] = {
+   {   /* user led 1, DS2 */
+   .name   = green,
+   .gpio   = AT91_PIN_PB0,
+   .active_low = 1,
+   .default_trigger= mmc0,
+   },
+   {   /* user led 2, DS4 */
+   .name   = yellow,
+   .gpio   = AT91_PIN_PB1,
+   .active_low = 1,
+   .default_trigger= heartbeat,
+   },
+   {   /* user led 3, DS6 */
+   .name   = red,
+   .gpio   = AT91_PIN_PB2,
+   .active_low = 1,
+   }
+};
 
 static void __init ek_board_init(void)
 {
@@ -167,6 +186,8 @@ static void __init ek_board_init(void)
 #endif
/* NOR Flash */
platform_device_register(ek_flash);
+   /* LEDs */
+   at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
/* VGA */
 // ek_add_device_video();
 }
diff --git a/arch/arm/mach-at91/board-sam9263ek.c 
b/arch/arm/mach-at91/board-sam9263ek.c
index a9dd595..2df0ff2 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ 

[ARM] 4759/1: [AT91] Buttons on CSB300

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6d2a8401d27e3eb8b71d09dd67e0e7d0085b5e29
Commit: 6d2a8401d27e3eb8b71d09dd67e0e7d0085b5e29
Parent: a04ff1af9723607f5901b79c559357e37cee6823
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:28:27 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:32 2008 +

[ARM] 4759/1: [AT91] Buttons on CSB300

Support for the 3 GPIO-connected buttons on the CSB300 board.

Based on wakeup testing code from David Brownell.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/board-csb337.c |   61 +
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/board-csb337.c 
b/arch/arm/mach-at91/board-csb337.c
index d0aa20c..51cb3c8 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -25,6 +25,8 @@
 #include linux/platform_device.h
 #include linux/spi/spi.h
 #include linux/mtd/physmap.h
+#include linux/input.h
+#include linux/gpio_keys.h
 
 #include asm/hardware.h
 #include asm/setup.h
@@ -156,6 +158,63 @@ static struct platform_device csb_flash = {
.num_resources  = ARRAY_SIZE(csb_flash_resources),
 };
 
+/*
+ * GPIO Buttons (on CSB300)
+ */
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+static struct gpio_keys_button csb300_buttons[] = {
+   {
+   .gpio   = AT91_PIN_PB29,
+   .code   = BTN_0,
+   .desc   = sw0,
+   .active_low = 1,
+   .wakeup = 1,
+   },
+   {
+   .gpio   = AT91_PIN_PB28,
+   .code   = BTN_1,
+   .desc   = sw1,
+   .active_low = 1,
+   .wakeup = 1,
+   },
+   {
+   .gpio   = AT91_PIN_PA21,
+   .code   = BTN_2,
+   .desc   = sw2,
+   .active_low = 1,
+   .wakeup = 1,
+   }
+};
+
+static struct gpio_keys_platform_data csb300_button_data = {
+   .buttons= csb300_buttons,
+   .nbuttons   = ARRAY_SIZE(csb300_buttons),
+};
+
+static struct platform_device csb300_button_device = {
+   .name   = gpio-keys,
+   .id = -1,
+   .num_resources  = 0,
+   .dev= {
+   .platform_data  = csb300_button_data,
+   }
+};
+
+static void __init csb300_add_device_buttons(void)
+{
+   at91_set_gpio_input(AT91_PIN_PB29, 0);  /* sw0 */
+   at91_set_deglitch(AT91_PIN_PB29, 1);
+   at91_set_gpio_input(AT91_PIN_PB28, 0);  /* sw1 */
+   at91_set_deglitch(AT91_PIN_PB28, 1);
+   at91_set_gpio_input(AT91_PIN_PA21, 0);  /* sw2 */
+   at91_set_deglitch(AT91_PIN_PA21, 1);
+
+   platform_device_register(csb300_button_device);
+}
+#else
+static void __init csb300_add_device_buttons(void) {}
+#endif
+
 static void __init csb337_board_init(void)
 {
/* Serial */
@@ -177,6 +236,8 @@ static void __init csb337_board_init(void)
at91_add_device_mmc(0, csb337_mmc_data);
/* NOR flash */
platform_device_register(csb_flash);
+   /* Switches on CSB300 */
+   csb300_add_device_buttons();
 }
 
 MACHINE_START(CSB337, Cogent CSB337)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4756/1: [AT91] Makefile cleanup

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b7b272a8826a2332f689853792eb8c42477fec85
Commit: b7b272a8826a2332f689853792eb8c42477fec85
Parent: 228235584f0dc1ab7f33f53d6cea8ee8a4d7f0da
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:23:09 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:32 2008 +

[ARM] 4756/1: [AT91] Makefile cleanup

Cleanup the main AT91 makefile.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/Makefile |   19 ++-
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index a21f08c..a8a009c 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -8,7 +8,6 @@ obj-n   :=
 obj-   :=
 
 obj-$(CONFIG_AT91_PMC_UNIT)+= clock.o
-obj-$(CONFIG_PM)   += pm.o
 
 # CPU-specific support
 obj-$(CONFIG_ARCH_AT91RM9200)  += at91rm9200.o at91rm9200_time.o 
at91rm9200_devices.o
@@ -29,7 +28,6 @@ obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
 obj-$(CONFIG_MACH_ATEB9200)+= board-eb9200.o
 obj-$(CONFIG_MACH_KAFA)+= board-kafa.o
 obj-$(CONFIG_MACH_PICOTUX2XX)  += board-picotux200.o
-obj-$(CONFIG_MACH_AT91EB01)+= board-eb01.o
 
 # AT91SAM9260 board-specific support
 obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
@@ -43,19 +41,14 @@ obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
 # AT91SAM9RL board-specific support
 obj-$(CONFIG_MACH_AT91SAM9RLEK)+= board-sam9rlek.o
 
-# LEDs support
-led-$(CONFIG_ARCH_AT91RM9200DK)+= leds.o
-led-$(CONFIG_MACH_AT91RM9200EK)+= leds.o
-led-$(CONFIG_MACH_AT91SAM9261EK)+= leds.o
-led-$(CONFIG_MACH_CSB337)  += leds.o
-led-$(CONFIG_MACH_CSB637)  += leds.o
-led-$(CONFIG_MACH_KB9200)  += leds.o
-led-$(CONFIG_MACH_KAFA)+= leds.o
-obj-$(CONFIG_LEDS) += $(led-y)
+# AT91X40 board-specific support
+obj-$(CONFIG_MACH_AT91EB01)+= board-eb01.o
 
-# VGA support
-#obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
+# Drivers
+obj-$(CONFIG_LEDS) += leds.o
 
+# Power Management
+obj-$(CONFIG_PM)   += pm.o
 
 ifeq ($(CONFIG_PM_DEBUG),y)
 CFLAGS_pm.o += -DDEBUG
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4754/1: [AT91] SSC library support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bfbc32663d4846039f88c0eccc1956587d89c042
Commit: bfbc32663d4846039f88c0eccc1956587d89c042
Parent: c6686ff9df086f9473663c2e61c1173c56788b2e
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:18:06 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4754/1: [AT91] SSC library support

Core support of the Atmel SSC library for all Atmel AT91 processors.

Based on David Brownell's initial patch for the AT91RM9200.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Acked-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91rm9200_devices.c  |  173 ++
 arch/arm/mach-at91/at91sam9260_devices.c |   79 ++
 arch/arm/mach-at91/at91sam9261_devices.c |  173 ++
 arch/arm/mach-at91/at91sam9263_devices.c |  129 ++
 arch/arm/mach-at91/at91sam9rl_devices.c  |  129 ++
 include/asm-arm/arch-at91/board.h|   17 +++
 6 files changed, 700 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c 
b/arch/arm/mach-at91/at91rm9200_devices.c
index a601c7c..cebea41 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -636,6 +636,179 @@ void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
 
 
 /* 
+ *  SSC -- Synchronous Serial Controller
+ *  */
+
+#if defined(CONFIG_ATMEL_SSC) || defined(CONFIG_ATMEL_SSC_MODULE)
+static u64 ssc0_dmamask = DMA_BIT_MASK(32);
+
+static struct resource ssc0_resources[] = {
+   [0] = {
+   .start  = AT91RM9200_BASE_SSC0,
+   .end= AT91RM9200_BASE_SSC0 + SZ_16K - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = AT91RM9200_ID_SSC0,
+   .end= AT91RM9200_ID_SSC0,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device at91rm9200_ssc0_device = {
+   .name   = ssc,
+   .id = 0,
+   .dev= {
+   .dma_mask   = ssc0_dmamask,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
+   },
+   .resource   = ssc0_resources,
+   .num_resources  = ARRAY_SIZE(ssc0_resources),
+};
+
+static inline void configure_ssc0_pins(unsigned pins)
+{
+   if (pins  ATMEL_SSC_TF)
+   at91_set_A_periph(AT91_PIN_PB0, 1);
+   if (pins  ATMEL_SSC_TK)
+   at91_set_A_periph(AT91_PIN_PB1, 1);
+   if (pins  ATMEL_SSC_TD)
+   at91_set_A_periph(AT91_PIN_PB2, 1);
+   if (pins  ATMEL_SSC_RD)
+   at91_set_A_periph(AT91_PIN_PB3, 1);
+   if (pins  ATMEL_SSC_RK)
+   at91_set_A_periph(AT91_PIN_PB4, 1);
+   if (pins  ATMEL_SSC_RF)
+   at91_set_A_periph(AT91_PIN_PB5, 1);
+}
+
+static u64 ssc1_dmamask = DMA_BIT_MASK(32);
+
+static struct resource ssc1_resources[] = {
+   [0] = {
+   .start  = AT91RM9200_BASE_SSC1,
+   .end= AT91RM9200_BASE_SSC1 + SZ_16K - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = AT91RM9200_ID_SSC1,
+   .end= AT91RM9200_ID_SSC1,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device at91rm9200_ssc1_device = {
+   .name   = ssc,
+   .id = 1,
+   .dev= {
+   .dma_mask   = ssc1_dmamask,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
+   },
+   .resource   = ssc1_resources,
+   .num_resources  = ARRAY_SIZE(ssc1_resources),
+};
+
+static inline void configure_ssc1_pins(unsigned pins)
+{
+   if (pins  ATMEL_SSC_TF)
+   at91_set_A_periph(AT91_PIN_PB6, 1);
+   if (pins  ATMEL_SSC_TK)
+   at91_set_A_periph(AT91_PIN_PB7, 1);
+   if (pins  ATMEL_SSC_TD)
+   at91_set_A_periph(AT91_PIN_PB8, 1);
+   if (pins  ATMEL_SSC_RD)
+   at91_set_A_periph(AT91_PIN_PB9, 1);
+   if (pins  ATMEL_SSC_RK)
+   at91_set_A_periph(AT91_PIN_PB10, 1);
+   if (pins  ATMEL_SSC_RF)
+   at91_set_A_periph(AT91_PIN_PB11, 1);
+}
+
+static u64 ssc2_dmamask = DMA_BIT_MASK(32);
+
+static struct resource ssc2_resources[] = {
+   [0] = {
+   .start  = AT91RM9200_BASE_SSC2,
+   .end= AT91RM9200_BASE_SSC2 + SZ_16K - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = AT91RM9200_ID_SSC2,
+   .end= AT91RM9200_ID_SSC2,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device 

[ARM] 4752/1: [AT91] RTT, RTC and WDT peripherals on SAM9

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=884f5a6a8dc8646d5904f166adf3c558be57e1ab
Commit: 884f5a6a8dc8646d5904f166adf3c558be57e1ab
Parent: e2920802351b3e01a3e70a26bb1bbb22f29da4cb
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:11:13 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4752/1: [AT91] RTT, RTC and WDT peripherals on SAM9

Add platform_device and initialization for the RTT (Real Time Timer)
and WDT (Watchdog) integrated in the Atmel AT91SAM9 processors.

For SAM9263, register both RTT peripherals.
   [From: David Brownell [EMAIL PROTECTED]]

Provide platform_resources for RTT peripherals
  [From: David Brownell [EMAIL PROTECTED]]

Add support for RTC peripheral on AT91SAM9RL (same RTC peripherals as
AT91RM9200)
  [From: David Brownell [EMAIL PROTECTED]]

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91sam9260_devices.c |   47 
 arch/arm/mach-at91/at91sam9261_devices.c |   47 
 arch/arm/mach-at91/at91sam9263_devices.c |   63 +++
 arch/arm/mach-at91/at91sam9rl_devices.c  |   68 ++
 include/asm-arm/arch-at91/at91_rtt.h |8 ++--
 5 files changed, 229 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9260_devices.c 
b/arch/arm/mach-at91/at91sam9260_devices.c
index 3091bf4..1533556 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -539,6 +539,51 @@ void __init at91_add_device_spi(struct spi_board_info 
*devices, int nr_devices)
 
 
 /* 
+ *  RTT
+ *  */
+
+static struct resource rtt_resources[] = {
+   {
+   .start  = AT91_BASE_SYS + AT91_RTT,
+   .end= AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
+   .flags  = IORESOURCE_MEM,
+   }
+};
+
+static struct platform_device at91sam9260_rtt_device = {
+   .name   = at91_rtt,
+   .id = -1,
+   .resource   = rtt_resources,
+   .num_resources  = ARRAY_SIZE(rtt_resources),
+};
+
+static void __init at91_add_device_rtt(void)
+{
+   platform_device_register(at91sam9260_rtt_device);
+}
+
+
+/* 
+ *  Watchdog
+ *  */
+
+#if defined(CONFIG_AT91SAM9_WATCHDOG) || 
defined(CONFIG_AT91SAM9_WATCHDOG_MODULE)
+static struct platform_device at91sam9260_wdt_device = {
+   .name   = at91_wdt,
+   .id = -1,
+   .num_resources  = 0,
+};
+
+static void __init at91_add_device_watchdog(void)
+{
+   platform_device_register(at91sam9260_wdt_device);
+}
+#else
+static void __init at91_add_device_watchdog(void) {}
+#endif
+
+
+/* 
  *  LEDs
  *  */
 
@@ -898,6 +943,8 @@ void __init at91_add_device_serial(void) {}
  */
 static int __init at91_add_standard_devices(void)
 {
+   at91_add_device_rtt();
+   at91_add_device_watchdog();
return 0;
 }
 
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c 
b/arch/arm/mach-at91/at91sam9261_devices.c
index 1d03844..17f3f6a 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -551,6 +551,51 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info 
*data) {}
 
 
 /* 
+ *  RTT
+ *  */
+
+static struct resource rtt_resources[] = {
+   {
+   .start  = AT91_BASE_SYS + AT91_RTT,
+   .end= AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
+   .flags  = IORESOURCE_MEM,
+   }
+};
+
+static struct platform_device at91sam9261_rtt_device = {
+   .name   = at91_rtt,
+   .id = -1,
+   .resource   = rtt_resources,
+   .num_resources  = ARRAY_SIZE(rtt_resources),
+};
+
+static void __init at91_add_device_rtt(void)
+{
+   platform_device_register(at91sam9261_rtt_device);
+}
+
+
+/* 
+ *  Watchdog
+ *  */
+
+#if defined(CONFIG_AT91SAM9_WATCHDOG) || 
defined(CONFIG_AT91SAM9_WATCHDOG_MODULE)
+static struct platform_device at91sam9261_wdt_device = {
+   .name   = at91_wdt,
+   .id = -1,
+   .num_resources  = 0,
+};
+
+static void __init 

[ARM] 4751/1: [AT91] ISI peripheral on SAM9263

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e2920802351b3e01a3e70a26bb1bbb22f29da4cb
Commit: e2920802351b3e01a3e70a26bb1bbb22f29da4cb
Parent: f06e656fb4f6f41ae9cba0f5d6948a6c7f6250ba
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Tue Jan 22 11:43:26 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4751/1: [AT91] ISI peripheral on SAM9263

Add support for the Image Sensor Interface (ISI) peripheral integrated
in the Atmel AT91SAM9263 processor.

Patch from MaLiK

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91sam9263_devices.c |   50 ++
 include/asm-arm/arch-at91/board.h|3 ++
 2 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9263_devices.c 
b/arch/arm/mach-at91/at91sam9263_devices.c
index ac329a9..d50a8df 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -732,6 +732,56 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info 
*data) {}
 
 
 /* 
+ *  Image Sensor Interface
+ *  */
+
+#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
+
+struct resource isi_resources[] = {
+   [0] = {
+   .start  = AT91SAM9263_BASE_ISI,
+   .end= AT91SAM9263_BASE_ISI + SZ_16K - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = AT91SAM9263_ID_ISI,
+   .end= AT91SAM9263_ID_ISI,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device at91sam9263_isi_device = {
+   .name   = at91_isi,
+   .id = -1,
+   .resource   = isi_resources,
+   .num_resources  = ARRAY_SIZE(isi_resources),
+};
+
+void __init at91_add_device_isi(void)
+{
+   at91_set_A_periph(AT91_PIN_PE0, 0); /* ISI_D0 */
+   at91_set_A_periph(AT91_PIN_PE1, 0); /* ISI_D1 */
+   at91_set_A_periph(AT91_PIN_PE2, 0); /* ISI_D2 */
+   at91_set_A_periph(AT91_PIN_PE3, 0); /* ISI_D3 */
+   at91_set_A_periph(AT91_PIN_PE4, 0); /* ISI_D4 */
+   at91_set_A_periph(AT91_PIN_PE5, 0); /* ISI_D5 */
+   at91_set_A_periph(AT91_PIN_PE6, 0); /* ISI_D6 */
+   at91_set_A_periph(AT91_PIN_PE7, 0); /* ISI_D7 */
+   at91_set_A_periph(AT91_PIN_PE8, 0); /* ISI_PCK */
+   at91_set_A_periph(AT91_PIN_PE9, 0); /* ISI_HSYNC */
+   at91_set_A_periph(AT91_PIN_PE10, 0);/* ISI_VSYNC */
+   at91_set_B_periph(AT91_PIN_PE11, 0);/* ISI_MCK (PCK3) */
+   at91_set_B_periph(AT91_PIN_PE12, 0);/* ISI_PD8 */
+   at91_set_B_periph(AT91_PIN_PE13, 0);/* ISI_PD9 */
+   at91_set_B_periph(AT91_PIN_PE14, 0);/* ISI_PD10 */
+   at91_set_B_periph(AT91_PIN_PE15, 0);/* ISI_PD11 */
+}
+#else
+void __init at91_add_device_isi(void) {}
+#endif
+
+
+/* 
  *  LEDs
  *  */
 
diff --git a/include/asm-arm/arch-at91/board.h 
b/include/asm-arm/arch-at91/board.h
index 7905496..762148c 100644
--- a/include/asm-arm/arch-at91/board.h
+++ b/include/asm-arm/arch-at91/board.h
@@ -126,6 +126,9 @@ struct atmel_ac97_data {
 };
 extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
 
+ /* ISI */
+extern void __init at91_add_device_isi(void);
+
  /* LEDs */
 extern u8 at91_leds_cpu;
 extern u8 at91_leds_timer;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4656/1: AT91: Tweak interrupt priorities

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7cbed2b507efd1bb19a574b8db14d5aad5936d6d
Commit: 7cbed2b507efd1bb19a574b8db14d5aad5936d6d
Parent: 87fee013a23ad02821699aef5b76891b42959182
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Tue Nov 20 08:46:53 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:30 2008 +

[ARM] 4656/1: AT91: Tweak interrupt priorities

Slight tweaking of the default interrupt priorities (AIC) for the
integrated peripherals on the AT91RM9200, AT91SAM9260, AT91SAM9261 and
AT91SAM9263 processors.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91rm9200.c  |   30 +++---
 arch/arm/mach-at91/at91sam9260.c |   28 ++--
 arch/arm/mach-at91/at91sam9261.c |   28 ++--
 arch/arm/mach-at91/at91sam9263.c |   30 +++---
 4 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 2cad2bf..d688c1d 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -301,28 +301,28 @@ void __init at91rm9200_initialize(unsigned long 
main_clock, unsigned short banks
 static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
7,  /* Advanced Interrupt Controller (FIQ) */
7,  /* System Peripherals */
-   0,  /* Parallel IO Controller A */
-   0,  /* Parallel IO Controller B */
-   0,  /* Parallel IO Controller C */
-   0,  /* Parallel IO Controller D */
-   6,  /* USART 0 */
-   6,  /* USART 1 */
-   6,  /* USART 2 */
-   6,  /* USART 3 */
+   1,  /* Parallel IO Controller A */
+   1,  /* Parallel IO Controller B */
+   1,  /* Parallel IO Controller C */
+   1,  /* Parallel IO Controller D */
+   5,  /* USART 0 */
+   5,  /* USART 1 */
+   5,  /* USART 2 */
+   5,  /* USART 3 */
0,  /* Multimedia Card Interface */
-   4,  /* USB Device Port */
-   0,  /* Two-Wire Interface */
-   6,  /* Serial Peripheral Interface */
-   5,  /* Serial Synchronous Controller 0 */
-   5,  /* Serial Synchronous Controller 1 */
-   5,  /* Serial Synchronous Controller 2 */
+   2,  /* USB Device Port */
+   6,  /* Two-Wire Interface */
+   5,  /* Serial Peripheral Interface */
+   4,  /* Serial Synchronous Controller 0 */
+   4,  /* Serial Synchronous Controller 1 */
+   4,  /* Serial Synchronous Controller 2 */
0,  /* Timer Counter 0 */
0,  /* Timer Counter 1 */
0,  /* Timer Counter 2 */
0,  /* Timer Counter 3 */
0,  /* Timer Counter 4 */
0,  /* Timer Counter 5 */
-   3,  /* USB Host port */
+   2,  /* USB Host port */
3,  /* Ethernet MAC */
0,  /* Advanced Interrupt Controller (IRQ0) */
0,  /* Advanced Interrupt Controller (IRQ1) */
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index e47381e..18d0661 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -327,30 +327,30 @@ void __init at91sam9260_initialize(unsigned long 
main_clock)
 static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = 
{
7,  /* Advanced Interrupt Controller */
7,  /* System Peripherals */
-   0,  /* Parallel IO Controller A */
-   0,  /* Parallel IO Controller B */
-   0,  /* Parallel IO Controller C */
+   1,  /* Parallel IO Controller A */
+   1,  /* Parallel IO Controller B */
+   1,  /* Parallel IO Controller C */
0,  /* Analog-to-Digital Converter */
-   6,  /* USART 0 */
-   6,  /* USART 1 */
-   6,  /* USART 2 */
+   5,  /* USART 0 */
+   5,  /* USART 1 */
+   5,  /* USART 2 */
0,  /* Multimedia Card Interface */
-   4,  /* USB Device Port */
-   0,  /* Two-Wire Interface */
-   6,  /* Serial Peripheral Interface 0 */
-   6,  /* Serial Peripheral Interface 1 */
+   2,  /* USB Device Port */
+   6,  /* Two-Wire Interface */
+   5,  /* Serial Peripheral Interface 0 */
+   5,  /* Serial Peripheral Interface 1 */
5,  /* Serial Synchronous Controller */
0,
0,
0,  /* Timer Counter 0 */
0,  /* Timer Counter 1 */
0,  /* Timer Counter 2 */
-   3,  /* USB Host port */
+   2,  /* USB Host port */
3,  /* Ethernet */
0,  /* Image Sensor Interface */
-   6,  /* USART 3 */

[ARM] 4647/1: at91rm9200: Remove redundant machine-type verification and manipulation

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=87fee013a23ad02821699aef5b76891b42959182
Commit: 87fee013a23ad02821699aef5b76891b42959182
Parent: 5170874816fc1eb2b0b865a70b6f520268227908
Author: Guennadi Liakhovetski [EMAIL PROTECTED]
AuthorDate: Tue Nov 13 19:49:25 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:30 2008 +

[ARM] 4647/1: at91rm9200: Remove redundant machine-type verification and 
manipulation

AT91RM9200 needlessly verifies machine-type numbers of
supported / known platforms and overwrites it for unknown
ones. Remove it.

Signed-off-by: Guennadi Liakhovetski [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/boot/compressed/Makefile  |4 --
 arch/arm/boot/compressed/head-at91rm9200.S |   81 
 2 files changed, 0 insertions(+), 85 deletions(-)

diff --git a/arch/arm/boot/compressed/Makefile 
b/arch/arm/boot/compressed/Makefile
index 5fde99f..de9d9ee 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -44,10 +44,6 @@ ifeq ($(CONFIG_PXA_SHARPSL),y)
 OBJS   += head-sharpsl.o
 endif
 
-ifeq ($(CONFIG_ARCH_AT91RM9200),y)
-OBJS   += head-at91rm9200.o
-endif
-
 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
 ifeq ($(CONFIG_CPU_CP15),y)
 OBJS   += big-endian.o
diff --git a/arch/arm/boot/compressed/head-at91rm9200.S 
b/arch/arm/boot/compressed/head-at91rm9200.S
deleted file mode 100644
index 11782cc..000
--- a/arch/arm/boot/compressed/head-at91rm9200.S
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * linux/arch/arm/boot/compressed/head-at91rm9200.S
- *
- *  Copyright (C) 2003 SAN People
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-#include asm/mach-types.h
-
-   .section.start, ax
-
-   @ Atmel AT91RM9200-DK : 262
-   mov r3, #(MACH_TYPE_AT91RM9200DK  0xff)
-   orr r3, r3, #(MACH_TYPE_AT91RM9200DK  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Cogent CSB337 : 399
-   mov r3, #(MACH_TYPE_CSB337  0xff)
-   orr r3, r3, #(MACH_TYPE_CSB337  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Cogent CSB637 : 648
-   mov r3, #(MACH_TYPE_CSB637  0xff)
-   orr r3, r3, #(MACH_TYPE_CSB637  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Atmel AT91RM9200-EK : 705
-   mov r3, #(MACH_TYPE_AT91RM9200EK  0xff)
-   orr r3, r3, #(MACH_TYPE_AT91RM9200EK  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Conitec Carmeva : 769
-   mov r3, #(MACH_TYPE_CARMEVA  0xff)
-   orr r3, r3, #(MACH_TYPE_CARMEVA  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ KwikByte KB920x : 612
-   mov r3, #(MACH_TYPE_KB9200  0xff)
-   orr r3, r3, #(MACH_TYPE_KB9200  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Embest ATEB9200 : 923
-   mov r3, #(MACH_TYPE_ATEB9200  0xff)
-   orr r3, r3, #(MACH_TYPE_ATEB9200  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Sperry-Sun KAFA : 662
-   mov r3, #(MACH_TYPE_KAFA  0xff)
-   orr r3, r3, #(MACH_TYPE_KAFA  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ picotux 200 : 963
-   mov r3, #(MACH_TYPE_PICOTUX2XX  0xff)
-   orr r3, r3, #(MACH_TYPE_PICOTUX2XX  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Ajeco 1ARM : 1075
-   mov r3, #(MACH_TYPE_ONEARM  0xff)
-   orr r3, r3, #(MACH_TYPE_ONEARM  0xff00)
-   cmp r7, r3
-   beq 99f
-
-   @ Unknown board, use the AT91RM9200DK board
-   @ mov   r7, #MACH_TYPE_AT91RM9200
-   mov r7, #(MACH_TYPE_AT91RM9200DK  0xff)
-   orr r7, r7, #(MACH_TYPE_AT91RM9200DK  0xff00)
-
-99:
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4776/1: Add HWUART clock to fix hwuart support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e01dbdb40eea94ecb2c703960dac744c9b19a186
Commit: e01dbdb40eea94ecb2c703960dac744c9b19a186
Parent: cd4c1eb51064f24a8b0a53069c4d004deade65c7
Author: Dmitry Baryshkov [EMAIL PROTECTED]
AuthorDate: Sun Jan 27 23:11:48 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 12:39:48 2008 +

[ARM] 4776/1: Add HWUART clock to fix hwuart support

This adds back the registration of HWUART clock on pxa25x

Signed-off-by: Dmitry Baryshkov [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/pxa25x.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 9732d5d..006a6e0 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -111,11 +111,14 @@ static const struct clkops clk_pxa25x_lcd_ops = {
  * 95.842MHz - MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
  * 147.456MHz - UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly)
  */
+static struct clk pxa25x_hwuart_clk =
+   INIT_CKEN(UARTCLK, HWUART, 14745600, 1, pxa_device_hwuart.dev)
+;
+
 static struct clk pxa25x_clks[] = {
INIT_CK(LCDCLK, LCD, clk_pxa25x_lcd_ops, pxa_device_fb.dev),
INIT_CKEN(UARTCLK, FFUART, 14745600, 1, pxa_device_ffuart.dev),
INIT_CKEN(UARTCLK, BTUART, 14745600, 1, pxa_device_btuart.dev),
-   INIT_CKEN(UARTCLK, BTUART, 14745600, 1, pxa_device_btuart.dev),
INIT_CKEN(UARTCLK, STUART, 14745600, 1, NULL),
INIT_CKEN(UDCCLK, USB, 47923000, 5, pxa_device_udc.dev),
INIT_CKEN(MMCCLK, MMC, 19169000, 0, pxa_device_mci.dev),
@@ -303,6 +306,10 @@ static int __init pxa25x_init(void)
 {
int ret = 0;
 
+   /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
+   if (cpu_is_pxa25x())
+   clks_register(pxa25x_hwuart_clk, 1);
+
if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Fix timer damage from d3d74453c34f8fd87674a8cf5b8a327c68f22e99

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=193c3cc12583344be01206078d9ad3fec5dbc397
Commit: 193c3cc12583344be01206078d9ad3fec5dbc397
Parent: 6232be32afa121628c72291ce7eaa24a639905c2
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 10:16:37 2008 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 10:17:12 2008 +

[ARM] Fix timer damage from d3d74453c34f8fd87674a8cf5b8a327c68f22e99

Move the xtime write mode seqlock into timer_tick(), so it only
surrounds the call to do_timer().

This avoids a deadlock in update_process_times() ...
hrtimer_get_softirq_time() which tries to get a read mode seqlock
on xtime, thereby preventing booting.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/kernel/time.c   |2 ++
 arch/arm/mach-aaec2000/core.c|4 
 arch/arm/mach-clps711x/time.c|2 --
 arch/arm/mach-clps7500/core.c|4 
 arch/arm/mach-ebsa110/core.c |4 
 arch/arm/mach-ep93xx/core.c  |4 
 arch/arm/mach-footbridge/dc21285-timer.c |4 
 arch/arm/mach-footbridge/isa-timer.c |2 --
 arch/arm/mach-h720x/cpu-h7201.c  |4 
 arch/arm/mach-h720x/cpu-h7202.c  |2 --
 arch/arm/mach-integrator/core.c  |4 
 arch/arm/mach-ixp2000/core.c |4 
 arch/arm/mach-ks8695/time.c  |3 ---
 arch/arm/mach-lh7a40x/time.c |4 
 arch/arm/mach-mx3/time.c |4 
 arch/arm/mach-netx/time.c|4 
 arch/arm/mach-omap2/timer-gp.c   |4 
 arch/arm/mach-pnx4008/time.c |4 
 arch/arm/mach-realview/core.c|4 
 arch/arm/mach-sa1100/time.c  |4 
 arch/arm/mach-shark/core.c   |2 --
 21 files changed, 2 insertions(+), 71 deletions(-)

diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index e59b5b8..b5867ec 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -325,7 +325,9 @@ void timer_tick(void)
profile_tick(CPU_PROFILING);
do_leds();
do_set_rtc();
+   write_seqlock(xtime_lock);
do_timer(1);
+   write_sequnlock(xtime_lock);
 #ifndef CONFIG_SMP
update_process_times(user_mode(get_irq_regs()));
 #endif
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c
index 0446ef2..b016be2 100644
--- a/arch/arm/mach-aaec2000/core.c
+++ b/arch/arm/mach-aaec2000/core.c
@@ -130,13 +130,9 @@ static irqreturn_t
 aaec2000_timer_interrupt(int irq, void *dev_id)
 {
/* TODO: Check timer accuracy */
-   write_seqlock(xtime_lock);
-
timer_tick();
TIMER1_CLEAR = 1;
 
-   write_sequnlock(xtime_lock);
-
return IRQ_HANDLED;
 }
 
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
index f428af7..e5dc33f 100644
--- a/arch/arm/mach-clps711x/time.c
+++ b/arch/arm/mach-clps711x/time.c
@@ -50,9 +50,7 @@ static unsigned long clps711x_gettimeoffset(void)
 static irqreturn_t
 p720t_timer_interrupt(int irq, void *dev_id)
 {
-   write_seqlock(xtime_lock);
timer_tick();
-   write_sequnlock(xtime_lock);
return IRQ_HANDLED;
 }
 
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
index 986205e..2ac6367 100644
--- a/arch/arm/mach-clps7500/core.c
+++ b/arch/arm/mach-clps7500/core.c
@@ -298,8 +298,6 @@ extern unsigned long ioc_timer_gettimeoffset(void);
 static irqreturn_t
 clps7500_timer_interrupt(int irq, void *dev_id)
 {
-   write_seqlock(xtime_lock);
-
timer_tick();
 
/* Why not using do_leds interface?? */
@@ -313,8 +311,6 @@ clps7500_timer_interrupt(int irq, void *dev_id)
}
}
 
-   write_sequnlock(xtime_lock);
-
return IRQ_HANDLED;
 }
 
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 8c1b569..7710e14 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -178,8 +178,6 @@ ebsa110_timer_interrupt(int irq, void *dev_id)
 {
u32 count;
 
-   write_seqlock(xtime_lock);
-
/* latch and read timer 1 */
__raw_writeb(0x40, PIT_CTRL);
count = __raw_readb(PIT_T1);
@@ -192,8 +190,6 @@ ebsa110_timer_interrupt(int irq, void *dev_id)
 
timer_tick();
 
-   write_sequnlock(xtime_lock);
-
return IRQ_HANDLED;
 }
 
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 70b2c78..f1074ff 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -99,8 +99,6 @@ static unsigned int last_jiffy_time;
 
 static int ep93xx_timer_interrupt(int irq, void *dev_id)
 {
-   write_seqlock(xtime_lock);
-
__raw_writel(1, EP93XX_TIMER1_CLEAR);
while ((signed long)
(__raw_readl(EP93XX_TIMER4_VALUE_LOW) - 

libata: Change write_data to rw for some function documentations

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0affa456cb6da51a31a6dd76b3d8827f467f807d
Commit: 0affa456cb6da51a31a6dd76b3d8827f467f807d
Parent: 91525300baf162e83e923b09ca286f9205e21522
Author: Linus Nilsson [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 15:56:27 2008 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Jan 29 08:48:17 2008 +1100

libata: Change write_data to rw for some function documentations

The documentation for ata_data_xfer and ata_data_xfer_noirq had the 'rw'
parameter named 'write_data'.

Signed-off-by: Linus Nilsson [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ce803d1..bdbd55a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4924,7 +4924,7 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
  * @dev: device to target
  * @buf: data buffer
  * @buflen: buffer length
- * @write_data: read/write
+ * @rw: read/write
  *
  * Transfer data from/to the device data register by PIO.
  *
@@ -4970,7 +4970,7 @@ unsigned int ata_data_xfer(struct ata_device *dev, 
unsigned char *buf,
  * @dev: device to target
  * @buf: data buffer
  * @buflen: buffer length
- * @write_data: read/write
+ * @rw: read/write
  *
  * Transfer data from/to the device data register by PIO. Do the
  * transfer with interrupts disabled.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4763/1: pxa: fix pxa3xx_get_clk_frequency_khz() to return KHz

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6232be32afa121628c72291ce7eaa24a639905c2
Commit: 6232be32afa121628c72291ce7eaa24a639905c2
Parent: 91525300baf162e83e923b09ca286f9205e21522
Author: eric miao [EMAIL PROTECTED]
AuthorDate: Thu Jan 24 02:27:30 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 10:14:53 2008 +

[ARM] 4763/1: pxa: fix pxa3xx_get_clk_frequency_khz() to return KHz

The original code incorrectly returns Hz instead of KHz.

Signed-off-by: eric miao [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/pxa3xx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 61d9c9d..37e93f9 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -86,7 +86,7 @@ unsigned int pxa3xx_get_clk_frequency_khz(int info)
HSS / 100, (HSS % 100) / 1);
}
 
-   return CLK;
+   return CLK / 1000;
 }
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Fix class_device damage caused by 0c55445f201841bfd6c658c47df8311b6722f002

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd4c1eb51064f24a8b0a53069c4d004deade65c7
Commit: cd4c1eb51064f24a8b0a53069c4d004deade65c7
Parent: 193c3cc12583344be01206078d9ad3fec5dbc397
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 10:59:09 2008 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 10:59:09 2008 +

[ARM] Fix class_device damage caused by 
0c55445f201841bfd6c658c47df8311b6722f002

Lots of compile errors in drivers/mfd/ucb1x00-assabet.c...

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 drivers/mfd/ucb1x00-assabet.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c
index b7c8e78..61aeaf7 100644
--- a/drivers/mfd/ucb1x00-assabet.c
+++ b/drivers/mfd/ucb1x00-assabet.c
@@ -20,7 +20,7 @@
 #include ucb1x00.h
 
 #define UCB1X00_ATTR(name,input)\
-static ssize_t name##_show(struct device *dev, struct device_attribute *attr,
+static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
   char *buf)   \
 {  \
struct ucb1x00 *ucb = classdev_to_ucb1x00(dev); \
@@ -38,17 +38,17 @@ UCB1X00_ATTR(batt_temp, UCB_ADC_INP_AD2);
 
 static int ucb1x00_assabet_add(struct ucb1x00_dev *dev)
 {
-   device_create_file(dev-ucb-dev, device_attr_vbatt);
-   device_create_file(dev-ucb-dev, device_attr_vcharger);
-   device_create_file(dev-ucb-dev, device_attr_batt_temp);
+   device_create_file(dev-ucb-dev, dev_attr_vbatt);
+   device_create_file(dev-ucb-dev, dev_attr_vcharger);
+   device_create_file(dev-ucb-dev, dev_attr_batt_temp);
return 0;
 }
 
 static void ucb1x00_assabet_remove(struct ucb1x00_dev *dev)
 {
-   device_remove_file(dev-ucb-cdev, device_attr_batt_temp);
-   device_remove_file(dev-ucb-cdev, device_attr_vcharger);
-   device_remove_file(dev-ucb-cdev, device_attr_vbatt);
+   device_remove_file(dev-ucb-dev, dev_attr_batt_temp);
+   device_remove_file(dev-ucb-dev, dev_attr_vcharger);
+   device_remove_file(dev-ucb-dev, dev_attr_vbatt);
 }
 
 static struct ucb1x00_driver ucb1x00_assabet_driver = {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4602/3: AT91: debugfs interface to view GPIO pin state

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b66545e7ae80b4b0eef3f7884ef9260455070be9
Commit: b66545e7ae80b4b0eef3f7884ef9260455070be9
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Fri Nov 23 16:09:10 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:30 2008 +

[ARM] 4602/3: AT91: debugfs interface to view GPIO pin state

This patch adds a debug interface (if CONFIG_DEBUG_FS is selected) to
display the basic configuration and current state of the GPIO pins on
the Atmel AT91 processors.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/gpio.c |   62 +
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index aa2d365..6aeddd6 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -13,6 +13,8 @@
 #include linux/errno.h
 #include linux/interrupt.h
 #include linux/irq.h
+#include linux/debugfs.h
+#include linux/seq_file.h
 #include linux/kernel.h
 #include linux/list.h
 #include linux/module.h
@@ -414,6 +416,66 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc 
*desc)
 
 /*--*/
 
+#ifdef CONFIG_DEBUG_FS
+
+static int at91_gpio_show(struct seq_file *s, void *unused)
+{
+   int bank, j;
+
+   /* print heading */
+   seq_printf(s, Pin\t);
+   for (bank = 0; bank  gpio_banks; bank++) {
+   seq_printf(s, PIO%c\t, 'A' + bank);
+   };
+   seq_printf(s, \n\n);
+
+   /* print pin status */
+   for (j = 0; j  32; j++) {
+   seq_printf(s, %i:\t, j);
+
+   for (bank = 0; bank  gpio_banks; bank++) {
+   unsignedpin  = PIN_BASE + (32 * bank) + j;
+   void __iomem*pio = pin_to_controller(pin);
+   unsignedmask = pin_to_mask(pin);
+
+   if (__raw_readl(pio + PIO_PSR)  mask)
+   seq_printf(s, GPIO:%s, __raw_readl(pio + 
PIO_PDSR)  mask ? 1 : 0);
+   else
+   seq_printf(s, %s, __raw_readl(pio + PIO_ABSR) 
 mask ? B : A);
+
+   seq_printf(s, \t);
+   }
+
+   seq_printf(s, \n);
+   }
+
+   return 0;
+}
+
+static int at91_gpio_open(struct inode *inode, struct file *file)
+{
+   return single_open(file, at91_gpio_show, NULL);
+}
+
+static const struct file_operations at91_gpio_operations = {
+   .open   = at91_gpio_open,
+   .read   = seq_read,
+   .llseek = seq_lseek,
+   .release= single_release,
+};
+
+static int __init at91_gpio_debugfs_init(void)
+{
+   /* /sys/kernel/debug/at91_gpio */
+   (void) debugfs_create_file(at91_gpio, S_IFREG | S_IRUGO, NULL, NULL, 
at91_gpio_operations);
+   return 0;
+}
+postcore_initcall(at91_gpio_debugfs_init);
+
+#endif
+
+/*--*/
+
 /*
  * Called from the processor-specific init to enable GPIO interrupt support.
  */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4657/1: AT91: Header definition update

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ebbec27da6d7f4762b73985ac4929acf061d48b
Commit: 9ebbec27da6d7f4762b73985ac4929acf061d48b
Parent: 7cbed2b507efd1bb19a574b8db14d5aad5936d6d
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Tue Nov 20 13:34:56 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:30 2008 +

[ARM] 4657/1: AT91: Header definition update

Add definitions of registers / bits found on some AT91SAM9 processors

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-at91/at91_pmc.h   |4 +++-
 include/asm-arm/arch-at91/at91_twi.h   |   11 +++
 include/asm-arm/arch-at91/at91sam9260_matrix.h |2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/include/asm-arm/arch-at91/at91_pmc.h 
b/include/asm-arm/arch-at91/at91_pmc.h
index 33ff5b6..34804ea 100644
--- a/include/asm-arm/arch-at91/at91_pmc.h
+++ b/include/asm-arm/arch-at91/at91_pmc.h
@@ -37,7 +37,9 @@
 #defineAT91_PMC_PCDR   (AT91_PMC + 0x14)   /* Peripheral 
Clock Disable Register */
 #defineAT91_PMC_PCSR   (AT91_PMC + 0x18)   /* Peripheral 
Clock Status Register */
 
-#defineAT91_CKGR_MOR   (AT91_PMC + 0x20)   /* Main 
Oscillator Register */
+#defineAT91_CKGR_UCKR  (AT91_PMC + 0x1C)   /* UTMI Clock 
Register [SAM9RL only] */
+
+#defineAT91_CKGR_MOR   (AT91_PMC + 0x20)   /* Main 
Oscillator Register [not on SAM9RL] */
 #defineAT91_PMC_MOSCEN (1 0) /* Main 
Oscillator Enable */
 #defineAT91_PMC_OSCBYPASS  (1 1) /* 
Oscillator Bypass [AT91SAM926x only] */
 #defineAT91_PMC_OSCOUNT(0xff  8) /* Main 
Oscillator Start-up Time */
diff --git a/include/asm-arm/arch-at91/at91_twi.h 
b/include/asm-arm/arch-at91/at91_twi.h
index ca9a907..f9f2e3c 100644
--- a/include/asm-arm/arch-at91/at91_twi.h
+++ b/include/asm-arm/arch-at91/at91_twi.h
@@ -21,6 +21,8 @@
 #defineAT91_TWI_STOP   (1   1)   /* Send a Stop 
Condition */
 #defineAT91_TWI_MSEN   (1   2)   /* Master 
Transfer Enable */
 #defineAT91_TWI_MSDIS  (1   3)   /* Master 
Transfer Disable */
+#defineAT91_TWI_SVEN   (1   4)   /* Slave 
Transfer Enable [SAM9260 only] */
+#defineAT91_TWI_SVDIS  (1   5)   /* Slave 
Transfer Disable [SAM9260 only] */
 #defineAT91_TWI_SWRST  (1   7)   /* Software 
Reset */
 
 #defineAT91_TWI_MMR0x04/* Master Mode Register 
*/
@@ -32,6 +34,9 @@
 #defineAT91_TWI_MREAD  (1 12)/* Master Read 
Direction */
 #defineAT91_TWI_DADR   (0x7f  16)/* Device 
Address */
 
+#defineAT91_TWI_SMR0x08/* Slave Mode Register 
[SAM9260 only] */
+#defineAT91_TWI_SADR   (0x7f  16)/* Slave 
Address */
+
 #defineAT91_TWI_IADR   0x0c/* Internal Address 
Register */
 
 #defineAT91_TWI_CWGR   0x10/* Clock Waveform 
Generator Register */
@@ -43,9 +48,15 @@
 #defineAT91_TWI_TXCOMP (1   0)   /* Transmission 
Complete */
 #defineAT91_TWI_RXRDY  (1   1)   /* Receive 
Holding Register Ready */
 #defineAT91_TWI_TXRDY  (1   2)   /* Transmit 
Holding Register Ready */
+#defineAT91_TWI_SVREAD (1   3)   /* Slave Read 
[SAM9260 only] */
+#defineAT91_TWI_SVACC  (1   4)   /* Slave Access 
[SAM9260 only] */
+#defineAT91_TWI_GACC   (1   5)   /* General Call 
Access [SAM9260 only] */
 #defineAT91_TWI_OVRE   (1   6)   /* Overrun 
Error [AT91RM9200 only] */
 #defineAT91_TWI_UNRE   (1   7)   /* Underrun 
Error [AT91RM9200 only] */
 #defineAT91_TWI_NACK   (1   8)   /* Not 
Acknowledged */
+#defineAT91_TWI_ARBLST (1   9)   /* Arbitration 
Lost [SAM9260 only] */
+#defineAT91_TWI_SCLWS  (1  10)   /* Clock Wait 
State [SAM9260 only] */
+#defineAT91_TWI_EOSACC (1  11)   /* End of Slave 
Address [SAM9260 only] */
 
 #defineAT91_TWI_IER0x24/* Interrupt Enable 
Register */
 #defineAT91_TWI_IDR0x28/* Interrupt Disable 
Register */
diff --git a/include/asm-arm/arch-at91/at91sam9260_matrix.h 
b/include/asm-arm/arch-at91/at91sam9260_matrix.h
index aacb1e9..a8e9fec 100644
--- a/include/asm-arm/arch-at91/at91sam9260_matrix.h
+++ 

[ARM] 4688/1: at91: speed-up irq processing

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=156864f806baa4e1aa6eabd28ac45ecc92b31315
Commit: 156864f806baa4e1aa6eabd28ac45ecc92b31315
Parent: 9ebbec27da6d7f4762b73985ac4929acf061d48b
Author: Marc Pignat [EMAIL PROTECTED]
AuthorDate: Mon Dec 3 12:58:24 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:30 2008 +

[ARM] 4688/1: at91: speed-up irq processing

Save N instructions on every interrupt processing (where N is the
number of interrupts processed in any one IRQ exception).

Signed-off-by: Marc Pignat [EMAIL PROTECTED]
Acked-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-at91/entry-macro.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-at91/entry-macro.S 
b/include/asm-arm/arch-at91/entry-macro.S
index cc1d850..1005eee 100644
--- a/include/asm-arm/arch-at91/entry-macro.S
+++ b/include/asm-arm/arch-at91/entry-macro.S
@@ -17,13 +17,13 @@
.endm
 
.macro  get_irqnr_preamble, base, tmp
+   ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC)   @ base virtual 
address of AIC peripheral
.endm
 
.macro  arch_ret_to_user, tmp1, tmp2
.endm
 
.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-   ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC)   @ base virtual 
address of AIC peripheral
ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ 
vector register: de-asserts nIRQ to processor (and clears interrupt)
ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)]   @ read 
interrupt source number
teq \irqstat, #0@ ISR is 0 when 
no current interrupt, or spurious interrupt
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4646/1: AT91: configurable HZ, default to 128

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5248c657898c018bcd23ef77759fa1d6c690bdf4
Commit: 5248c657898c018bcd23ef77759fa1d6c690bdf4
Parent: 156864f806baa4e1aa6eabd28ac45ecc92b31315
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Mon Nov 12 17:59:10 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4646/1: AT91: configurable HZ, default to 128

This makes HZ configurable on AT91, following the model used on OMAP.

It defaults to a power of two on AT91rm9200 chips, avoiding rounding
errors which come from dividing a 32 KiHz clock to generate scheduler
irqs; and uses 100 on AT91sam926x chips, using MCK/16 (multi-MHZ).

Signed-off-by: David Brownell [EMAIL PROTECTED]
Acked-by: Remy Bhmer [EMAIL PROTECTED]
Acked-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig   |1 +
 arch/arm/mach-at91/Kconfig |   16 
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a04f507..93e40b6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -657,6 +657,7 @@ config HZ
default 128 if ARCH_L7200
default 200 if ARCH_EBSA110 || ARCH_S3C2410
default OMAP_32K_TIMER_HZ if ARCH_OMAP  OMAP_32K_TIMER
+   default AT91_TIMER_HZ if ARCH_AT91
default 100
 
 config AEABI
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 05a9f8a..214733e 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -219,6 +219,22 @@ config AT91_PROGRAMMABLE_CLOCKS
  Select this if you need to program one or more of the PCK0..PCK3
  programmable clock outputs.
 
+config AT91_TIMER_HZ
+   int Kernel HZ (jiffies per second)
+   range 32 1024
+   depends on ARCH_AT91
+   default 128 if ARCH_AT91RM9200
+   default 100
+   help
+ On AT91rm9200 chips where you're using a system clock derived
+ from the 32768 Hz hardware clock, this tick rate should divide
+ it exactly: use a power-of-two value, such as 128 or 256, to
+ reduce timing errors caused by rounding.
+
+ On AT91sam926x chips, or otherwise when using a higher precision
+ system clock (of at least several MHz), rounding is less of a
+ problem so it can be safer to use a decimal values like 100.
+
 endmenu
 
 endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4734/1: at91sam9263ek: include IRQ for Ethernet PHY

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a50d49dbb72aff90601fda90ea37a02a606d2d90
Commit: a50d49dbb72aff90601fda90ea37a02a606d2d90
Parent: 5248c657898c018bcd23ef77759fa1d6c690bdf4
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Fri Dec 28 02:04:52 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4734/1: at91sam9263ek: include IRQ for Ethernet PHY

On the at92sam9263ek board, tell the MACB driver the IRQ used
by its PHY.  This patch is taken from Andrew Victor's 2.6.23-at91
patchset; it matches board schematics.  (But it's currently a NOP
since the MACB driver doesn't yet use PHY irqs.)

Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/board-sam9263ek.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/board-sam9263ek.c 
b/arch/arm/mach-at91/board-sam9263ek.c
index ab9dcc0..a9dd595 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -163,6 +163,7 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
  * MACB Ethernet device
  */
 static struct at91_eth_data __initdata ek_macb_data = {
+   .phy_irq_pin= AT91_PIN_PE31,
.is_rmii= 1,
 };
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4750/1: [AT91] STN LCD displays on SAM9261

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f06e656fb4f6f41ae9cba0f5d6948a6c7f6250ba
Commit: f06e656fb4f6f41ae9cba0f5d6948a6c7f6250ba
Parent: a50d49dbb72aff90601fda90ea37a02a606d2d90
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Tue Jan 22 11:37:32 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4750/1: [AT91] STN LCD displays on SAM9261

Add support for STN LCD displays on Atmel AT91SAM9261-based boards.

Patch from Nicolas Ferre.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91sam9261_devices.c |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9261_devices.c 
b/arch/arm/mach-at91/at91sam9261_devices.c
index 64979a9..1d03844 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -507,6 +507,17 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info 
*data)
return;
}
 
+#if defined(CONFIG_FB_ATMEL_STN)
+   at91_set_A_periph(AT91_PIN_PB0, 0); /* LCDVSYNC */
+   at91_set_A_periph(AT91_PIN_PB1, 0); /* LCDHSYNC */
+   at91_set_A_periph(AT91_PIN_PB2, 0); /* LCDDOTCK */
+   at91_set_A_periph(AT91_PIN_PB3, 0); /* LCDDEN */
+   at91_set_A_periph(AT91_PIN_PB4, 0); /* LCDCC */
+   at91_set_A_periph(AT91_PIN_PB5, 0); /* LCDD0 */
+   at91_set_A_periph(AT91_PIN_PB6, 0); /* LCDD1 */
+   at91_set_A_periph(AT91_PIN_PB7, 0); /* LCDD2 */
+   at91_set_A_periph(AT91_PIN_PB8, 0); /* LCDD3 */
+#else
at91_set_A_periph(AT91_PIN_PB1, 0); /* LCDHSYNC */
at91_set_A_periph(AT91_PIN_PB2, 0); /* LCDDOTCK */
at91_set_A_periph(AT91_PIN_PB3, 0); /* LCDDEN */
@@ -529,6 +540,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info 
*data)
at91_set_B_periph(AT91_PIN_PB26, 0);/* LCDD21 */
at91_set_B_periph(AT91_PIN_PB27, 0);/* LCDD22 */
at91_set_B_periph(AT91_PIN_PB28, 0);/* LCDD23 */
+#endif
 
lcdc_data = *data;
platform_device_register(at91_lcdc_device);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4753/1: [AT91] Use DMA_BIT_MASK

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c6686ff9df086f9473663c2e61c1173c56788b2e
Commit: c6686ff9df086f9473663c2e61c1173c56788b2e
Parent: 884f5a6a8dc8646d5904f166adf3c558be57e1ab
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:13:53 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:31 2008 +

[ARM] 4753/1: [AT91] Use DMA_BIT_MASK

Replace hard-coded DMA mask (0x) with DMA_BIT_MASK(32) as
defined in dma-mapping.h.
Set dma_mask field for the UART platform_devices.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91rm9200_devices.c  |   54 +++
 arch/arm/mach-at91/at91sam9260_devices.c |   70 +++--
 arch/arm/mach-at91/at91sam9261_devices.c |   49 +
 arch/arm/mach-at91/at91sam9263_devices.c |   59 +++--
 arch/arm/mach-at91/at91sam9rl_devices.c  |   50 ++---
 5 files changed, 181 insertions(+), 101 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c 
b/arch/arm/mach-at91/at91rm9200_devices.c
index 9296833..a601c7c 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -13,6 +13,7 @@
 #include asm/mach/arch.h
 #include asm/mach/map.h
 
+#include linux/dma-mapping.h
 #include linux/platform_device.h
 #include linux/i2c-gpio.h
 
@@ -29,7 +30,7 @@
  *  */
 
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-static u64 ohci_dmamask = 0xUL;
+static u64 ohci_dmamask = DMA_BIT_MASK(32);
 static struct at91_usbh_data usbh_data;
 
 static struct resource usbh_resources[] = {
@@ -50,7 +51,7 @@ static struct platform_device at91rm9200_usbh_device = {
.id = -1,
.dev= {
.dma_mask   = ohci_dmamask,
-   .coherent_dma_mask  = 0x,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
.platform_data  = usbh_data,
},
.resource   = usbh_resources,
@@ -125,7 +126,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) 
{}
  *  */
 
 #if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)
-static u64 eth_dmamask = 0xUL;
+static u64 eth_dmamask = DMA_BIT_MASK(32);
 static struct at91_eth_data eth_data;
 
 static struct resource eth_resources[] = {
@@ -146,7 +147,7 @@ static struct platform_device at91rm9200_eth_device = {
.id = -1,
.dev= {
.dma_mask   = eth_dmamask,
-   .coherent_dma_mask  = 0x,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
.platform_data  = eth_data,
},
.resource   = eth_resources,
@@ -285,7 +286,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data) {}
  *  */
 
 #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
-static u64 mmc_dmamask = 0xUL;
+static u64 mmc_dmamask = DMA_BIT_MASK(32);
 static struct at91_mmc_data mmc_data;
 
 static struct resource mmc_resources[] = {
@@ -306,7 +307,7 @@ static struct platform_device at91rm9200_mmc_device = {
.id = -1,
.dev= {
.dma_mask   = mmc_dmamask,
-   .coherent_dma_mask  = 0x,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
.platform_data  = mmc_data,
},
.resource   = mmc_resources,
@@ -513,7 +514,7 @@ void __init at91_add_device_i2c(struct i2c_board_info 
*devices, int nr_devices)
  *  */
 
 #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
-static u64 spi_dmamask = 0xUL;
+static u64 spi_dmamask = DMA_BIT_MASK(32);
 
 static struct resource spi_resources[] = {
[0] = {
@@ -533,7 +534,7 @@ static struct platform_device at91rm9200_spi_device = {
.id = 0,
.dev= {
.dma_mask   = spi_dmamask,
-   .coherent_dma_mask  = 0x,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
},
.resource   = spi_resources,
.num_resources  = ARRAY_SIZE(spi_resources),
@@ -658,12 +659,15 @@ static struct atmel_uart_data dbgu_data 

[ARM] 4755/1: [AT91] NAND update

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=228235584f0dc1ab7f33f53d6cea8ee8a4d7f0da
Commit: 228235584f0dc1ab7f33f53d6cea8ee8a4d7f0da
Parent: bfbc32663d4846039f88c0eccc1956587d89c042
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:21:02 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:32 2008 +

[ARM] 4755/1: [AT91] NAND update

Map the complete memory region (SZ_256M) as is done on the other AT91
processors.

The SMC_SMARTMEDIA bit should be set in the EBI controller to enable
the hardware NAND logic.
  (Patch from Sascha Erlacher)

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91rm9200_devices.c  |2 +-
 arch/arm/mach-at91/at91sam9260_devices.c |4 ++--
 arch/arm/mach-at91/at91sam9261_devices.c |2 +-
 arch/arm/mach-at91/at91sam9263_devices.c |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c 
b/arch/arm/mach-at91/at91rm9200_devices.c
index cebea41..a264726 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -376,7 +376,7 @@ static struct at91_nand_data nand_data;
 static struct resource nand_resources[] = {
{
.start  = NAND_BASE,
-   .end= NAND_BASE + SZ_8M - 1,
+   .end= NAND_BASE + SZ_256M - 1,
.flags  = IORESOURCE_MEM,
}
 };
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c 
b/arch/arm/mach-at91/at91sam9260_devices.c
index 2e3db13..8acd62b 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -290,7 +290,7 @@ static struct at91_nand_data nand_data;
 static struct resource nand_resources[] = {
{
.start  = NAND_BASE,
-   .end= NAND_BASE + SZ_8M - 1,
+   .end= NAND_BASE + SZ_256M - 1,
.flags  = IORESOURCE_MEM,
}
 };
@@ -313,7 +313,7 @@ void __init at91_add_device_nand(struct at91_nand_data 
*data)
return;
 
csa = at91_sys_read(AT91_MATRIX_EBICSA);
-   at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC);
+   at91_sys_write(AT91_MATRIX_EBICSA, csa | 
AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
 
/* set the bus interface characteristics */
at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | 
AT91_SMC_NCS_WRSETUP_(0)
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c 
b/arch/arm/mach-at91/at91sam9261_devices.c
index 266ccf0..ba84ba6 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -233,7 +233,7 @@ void __init at91_add_device_nand(struct at91_nand_data 
*data)
return;
 
csa = at91_sys_read(AT91_MATRIX_EBICSA);
-   at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC);
+   at91_sys_write(AT91_MATRIX_EBICSA, csa | 
AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
 
/* set the bus interface characteristics */
at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | 
AT91_SMC_NCS_WRSETUP_(0)
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c 
b/arch/arm/mach-at91/at91sam9263_devices.c
index f83ef62..c025f5c 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -383,7 +383,7 @@ void __init at91_add_device_nand(struct at91_nand_data 
*data)
return;
 
csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
-   at91_sys_write(AT91_MATRIX_EBI0CSA, csa | AT91_MATRIX_EBI0_CS3A_SMC);
+   at91_sys_write(AT91_MATRIX_EBI0CSA, csa | 
AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA);
 
/* set the bus interface characteristics */
at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | 
AT91_SMC_NCS_WRSETUP_(0)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4757/1: [AT91] UART initialization

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c8f385a631ef1f49d67a3798ca40dec36ccdf07d
Commit: c8f385a631ef1f49d67a3798ca40dec36ccdf07d
Parent: b7b272a8826a2332f689853792eb8c42477fec85
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:25:15 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:32 2008 +

[ARM] 4757/1: [AT91] UART initialization

Modify the UART initialization to allow the board-initialization code
to specify which pins are connected, and which pins should therefore
be initialized.

The current at91_init_serial() will continue to work as-is, but is
marked as deprecated and will be removed once the board-specific
files has been updated to use the new interface.

As in the AVR32 code, we assume that the TX and RX pins will always be
initialized.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91rm9200_devices.c  |  114 --
 arch/arm/mach-at91/at91sam9260_devices.c |  115 +-
 arch/arm/mach-at91/at91sam9261_devices.c |   77 +---
 arch/arm/mach-at91/at91sam9263_devices.c |   79 +
 arch/arm/mach-at91/at91sam9rl_devices.c  |   99 ++---
 include/asm-arm/arch-at91/board.h|   12 +++-
 6 files changed, 420 insertions(+), 76 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c 
b/arch/arm/mach-at91/at91rm9200_devices.c
index a264726..2396622 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -884,17 +884,21 @@ static struct platform_device at91rm9200_uart0_device = {
.num_resources  = ARRAY_SIZE(uart0_resources),
 };
 
-static inline void configure_usart0_pins(void)
+static inline void configure_usart0_pins(unsigned pins)
 {
at91_set_A_periph(AT91_PIN_PA17, 1);/* TXD0 */
at91_set_A_periph(AT91_PIN_PA18, 0);/* RXD0 */
-   at91_set_A_periph(AT91_PIN_PA20, 0);/* CTS0 */
 
-   /*
-* AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21.
-*  We need to drive the pin manually.  Default is off (RTS is active 
low).
-*/
-   at91_set_gpio_output(AT91_PIN_PA21, 1);
+   if (pins  ATMEL_UART_CTS)
+   at91_set_A_periph(AT91_PIN_PA20, 0);/* CTS0 */
+
+   if (pins  ATMEL_UART_RTS) {
+   /*
+* AT91RM9200 Errata #39 - RTS0 is not internally connected to 
PA21.
+*  We need to drive the pin manually.  Default is off (RTS is 
active low).
+*/
+   at91_set_gpio_output(AT91_PIN_PA21, 1);
+   }
 }
 
 static struct resource uart1_resources[] = {
@@ -929,16 +933,23 @@ static struct platform_device at91rm9200_uart1_device = {
.num_resources  = ARRAY_SIZE(uart1_resources),
 };
 
-static inline void configure_usart1_pins(void)
+static inline void configure_usart1_pins(unsigned pins)
 {
-   at91_set_A_periph(AT91_PIN_PB18, 0);/* RI1 */
-   at91_set_A_periph(AT91_PIN_PB19, 0);/* DTR1 */
at91_set_A_periph(AT91_PIN_PB20, 1);/* TXD1 */
at91_set_A_periph(AT91_PIN_PB21, 0);/* RXD1 */
-   at91_set_A_periph(AT91_PIN_PB23, 0);/* DCD1 */
-   at91_set_A_periph(AT91_PIN_PB24, 0);/* CTS1 */
-   at91_set_A_periph(AT91_PIN_PB25, 0);/* DSR1 */
-   at91_set_A_periph(AT91_PIN_PB26, 0);/* RTS1 */
+
+   if (pins  ATMEL_UART_RI)
+   at91_set_A_periph(AT91_PIN_PB18, 0);/* RI1 */
+   if (pins  ATMEL_UART_DTR)
+   at91_set_A_periph(AT91_PIN_PB19, 0);/* DTR1 */
+   if (pins  ATMEL_UART_DCD)
+   at91_set_A_periph(AT91_PIN_PB23, 0);/* DCD1 */
+   if (pins  ATMEL_UART_CTS)
+   at91_set_A_periph(AT91_PIN_PB24, 0);/* CTS1 */
+   if (pins  ATMEL_UART_DSR)
+   at91_set_A_periph(AT91_PIN_PB25, 0);/* DSR1 */
+   if (pins  ATMEL_UART_RTS)
+   at91_set_A_periph(AT91_PIN_PB26, 0);/* RTS1 */
 }
 
 static struct resource uart2_resources[] = {
@@ -973,10 +984,15 @@ static struct platform_device at91rm9200_uart2_device = {
.num_resources  = ARRAY_SIZE(uart2_resources),
 };
 
-static inline void configure_usart2_pins(void)
+static inline void configure_usart2_pins(unsigned pins)
 {
at91_set_A_periph(AT91_PIN_PA22, 0);/* RXD2 */
at91_set_A_periph(AT91_PIN_PA23, 1);/* TXD2 */
+
+   if (pins  ATMEL_UART_CTS)
+   at91_set_B_periph(AT91_PIN_PA30, 0);/* CTS2 */
+   if (pins  ATMEL_UART_RTS)
+   at91_set_B_periph(AT91_PIN_PA31, 0);/* RTS2 */
 }
 
 static struct resource uart3_resources[] = {
@@ -1011,16 +1027,21 

[ARM] 4760/1: [AT91] SPI CS0 errata on AT91RM9200

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2743f0c1dcca54d6c80b0de1273b3f4e90051a85
Commit: 2743f0c1dcca54d6c80b0de1273b3f4e90051a85
Parent: 6d2a8401d27e3eb8b71d09dd67e0e7d0085b5e29
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Wed Jan 23 09:29:46 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:32 2008 +

[ARM] 4760/1: [AT91] SPI CS0 errata on AT91RM9200

Due to errata regarding the handling of SPI CS0 on the AT91RM9200, the
atmel_spi driver drives CS0 from the SPI controller and not as a GPIO
pin.
We therefore need to configure CS0 for use by the controller

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91rm9200_devices.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c 
b/arch/arm/mach-at91/at91rm9200_devices.c
index ea9a952..ef6aeb8 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -558,8 +558,11 @@ void __init at91_add_device_spi(struct spi_board_info 
*devices, int nr_devices)
else
cs_pin = spi_standard_cs[devices[i].chip_select];
 
-   /* enable chip-select pin */
-   at91_set_gpio_output(cs_pin, 1);
+   if (devices[i].chip_select == 0)/* for CS0 errata */
+   at91_set_A_periph(cs_pin, 0);
+   else
+   at91_set_gpio_output(cs_pin, 1);
+
 
/* pass chip-select pin to driver */
devices[i].controller_data = (void *) cs_pin;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4738/1: at91sam9261: Remove udc pullup enabling in board initialisation

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=da7a42d60ba214937ddb35152f336a4e4baa49a6
Commit: da7a42d60ba214937ddb35152f336a4e4baa49a6
Parent: 1b41bdf68a72c1fd506ee3dbfbf954fd2eaef75c
Author: Christian Glindkamp [EMAIL PROTECTED]
AuthorDate: Thu Jan 3 12:15:23 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:00:33 2008 +

[ARM] 4738/1: at91sam9261: Remove udc pullup enabling in board 
initialisation

Currently the udc pullup is enabled by default on boot. If the device
is connected to a host at this time, the host starts the negotiation
before the udc/gadget driver is ready to handle it.

Signed-off-by: Christian Glindkamp [EMAIL PROTECTED]
Acked-by: David Brownell [EMAIL PROTECTED]
Acked-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-at91/at91sam9261_devices.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9261_devices.c 
b/arch/arm/mach-at91/at91sam9261_devices.c
index 57d7e3b..2456412 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -107,8 +107,6 @@ static struct platform_device at91sam9261_udc_device = {
 
 void __init at91_add_device_udc(struct at91_udc_data *data)
 {
-   unsigned long x;
-
if (!data)
return;
 
@@ -117,9 +115,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
at91_set_deglitch(data-vbus_pin, 1);
}
 
-   /* Pullup pin is handled internally */
-   x = at91_sys_read(AT91_MATRIX_USBPUCR);
-   at91_sys_write(AT91_MATRIX_USBPUCR, x | AT91_MATRIX_USBPUCR_PUON);
+   /* Pullup pin is handled internally by USB device peripheral */
 
udc_data = *data;
platform_device_register(at91sam9261_udc_device);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4765/1: [AT91] AT91CAP9A-DK board support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=86640cae60147b0cd2705145de8067e24db70a8b
Commit: 86640cae60147b0cd2705145de8067e24db70a8b
Parent: 2b3b3516b6eeea1464e205b2dde9ebc9b7dd2ec8
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Thu Jan 24 15:16:41 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:01:14 2008 +

[ARM] 4765/1: [AT91] AT91CAP9A-DK board support

Add support for the Atmel AT91CAP9A-DK Evaluation Kit board.

Signed-off-by: Stelian Pop [EMAIL PROTECTED]
Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/configs/at91cap9adk_defconfig | 1143 
 arch/arm/mach-at91/Kconfig |   19 +-
 arch/arm/mach-at91/Makefile|3 +
 arch/arm/mach-at91/board-cap9adk.c |  359 ++
 4 files changed, 1522 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/at91cap9adk_defconfig 
b/arch/arm/configs/at91cap9adk_defconfig
new file mode 100644
index 000..e32e736
--- /dev/null
+++ b/arch/arm/configs/at91cap9adk_defconfig
@@ -0,0 +1,1143 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc8
+# Wed Jan 23 22:55:57 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+CONFIG_ARCH_AT91=y
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# 

[ARM] 4671/1: ep93xx: remove obsolete gpio_line_* operations

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6331acd78f7916db16ec20b50d7838bd4944cd27
Commit: 6331acd78f7916db16ec20b50d7838bd4944cd27
Parent: 3c9a071d77e007464952a2d41b6686d98eb3f0b8
Author: Herbert Valerio Riedel [EMAIL PROTECTED]
AuthorDate: Mon Nov 26 18:50:42 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:37:31 2008 +

[ARM] 4671/1: ep93xx: remove obsolete gpio_line_* operations

With the new GPIO methods in place the old gpio_line_* methods are 
redundant,
so this patch finally removes the old legacy gpio_line_* wrappers.

Signed-off-by: Herbert Valerio Riedel [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-ep93xx/core.c|9 +++--
 include/asm-arm/arch-ep93xx/gpio.h |   19 ---
 2 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 2788da0..4cb3f74 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -189,6 +189,9 @@ static const u8 data_direction_register_offset[8] = {
0x10, 0x14, 0x34, 0x1c, 0x24, 0x18, 0x3c, 0x44,
 };
 
+#define GPIO_IN0
+#define GPIO_OUT   1
+
 static void ep93xx_gpio_set_direction(unsigned line, int direction)
 {
unsigned int data_direction_register;
@@ -217,12 +220,6 @@ static void ep93xx_gpio_set_direction(unsigned line, int 
direction)
local_irq_restore(flags);
 }
 
-void __deprecated gpio_line_config(int line, int direction)
-{
-   ep93xx_gpio_set_direction(line, direction);
-}
-EXPORT_SYMBOL(gpio_line_config);
-
 int gpio_direction_input(unsigned gpio)
 {
if (gpio  EP93XX_GPIO_LINE_MAX)
diff --git a/include/asm-arm/arch-ep93xx/gpio.h 
b/include/asm-arm/arch-ep93xx/gpio.h
index cebb64b..9b1864b 100644
--- a/include/asm-arm/arch-ep93xx/gpio.h
+++ b/include/asm-arm/arch-ep93xx/gpio.h
@@ -138,23 +138,4 @@ static inline int irq_to_gpio(unsigned irq)
return irq - gpio_to_irq(0);
 }
 
-/* obsolete specific GPIO API */
-#define GPIO_IN0
-#define GPIO_OUT   1
-
-#define EP93XX_GPIO_LOW0
-#define EP93XX_GPIO_HIGH   1
-
-void __deprecated gpio_line_config(int line, int direction);
-
-static inline int  __deprecated gpio_line_get(int line)
-{
-   return gpio_get_value(line);
-}
-
-static inline void __deprecated gpio_line_set(int line, int value)
-{
-   gpio_set_value(line, value);
-}
-
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4708/1: iop: update defconfigs for 2.6.24

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ecdc902bf87e57e47efb6cab3999d64bfe3b2dfd
Commit: ecdc902bf87e57e47efb6cab3999d64bfe3b2dfd
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Dan Williams [EMAIL PROTECTED]
AuthorDate: Thu Dec 13 00:20:05 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:37:57 2008 +

[ARM] 4708/1: iop: update defconfigs for 2.6.24

* iop13xx, iop33x, iop32x: re-enable the IOP_ADMA driver by default
* iop32x: enable RS5C372 and RTC_CLASS support

Signed-off-by: Dan Williams [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/configs/iop13xx_defconfig |  156 ---
 arch/arm/configs/iop32x_defconfig  |  207 ++--
 arch/arm/configs/iop33x_defconfig  |  154 --
 3 files changed, 267 insertions(+), 250 deletions(-)

diff --git a/arch/arm/configs/iop13xx_defconfig 
b/arch/arm/configs/iop13xx_defconfig
index add03c9..988b4d1 100644
--- a/arch/arm/configs/iop13xx_defconfig
+++ b/arch/arm/configs/iop13xx_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22
-# Thu Jul 19 15:57:52 2007
+# Linux kernel version: 2.6.24-rc5
+# Wed Dec 12 16:11:03 2007
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -26,15 +26,11 @@ CONFIG_VECTORS_BASE=0x
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
@@ -45,10 +41,15 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
 # CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_BLK_DEV_INITRD=y
@@ -69,7 +70,6 @@ CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
@@ -130,6 +130,7 @@ CONFIG_ARCH_IOP13XX=y
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
@@ -151,9 +152,12 @@ CONFIG_MACH_IQ81340SC=y
 CONFIG_MACH_IQ81340MC=y
 
 #
-# IOP13XX IMU Support
+# Boot options
+#
+
+#
+# Power management
 #
-# CONFIG_IOP_IMU is not set
 CONFIG_PLAT_IOP=y
 
 #
@@ -185,10 +189,7 @@ CONFIG_PCI=y
 CONFIG_PCI_SYSCALL=y
 CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_MSI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
+CONFIG_PCI_LEGACY=y
 # CONFIG_PCCARD is not set
 
 #
@@ -207,6 +208,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
 # CONFIG_RESOURCES_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
@@ -246,6 +248,7 @@ CONFIG_BINFMT_AOUT=y
 # Power management options
 #
 # CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
 
 #
 # Networking
@@ -285,6 +288,7 @@ CONFIG_IP_PNP_BOOTP=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -324,10 +328,6 @@ CONFIG_IPV6=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -356,6 +356,7 @@ CONFIG_IPV6=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
@@ -383,6 +384,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
 # CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -423,6 +425,7 @@ CONFIG_MTD_PHYSMAP_START=0xfa00
 CONFIG_MTD_PHYSMAP_LEN=0x0
 CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
@@ -463,6 +466,11 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # SCSI device support
@@ -499,12 +507,9 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 

[ARM] 4732/1: GLAN Tank: register rtc-rs5c372 i2c device

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd7b8858631bf335ce6e8b4a985b7f951041b572
Commit: bd7b8858631bf335ce6e8b4a985b7f951041b572
Parent: ecdc902bf87e57e47efb6cab3999d64bfe3b2dfd
Author: Martin Michlmayr [EMAIL PROTECTED]
AuthorDate: Thu Dec 27 14:09:07 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:37:57 2008 +

[ARM] 4732/1: GLAN Tank: register rtc-rs5c372 i2c device

Use the new i2c framework to load rtc-rs5c372 for the GLAN Tank.

Tested-by: Gordon Farquharson [EMAIL PROTECTED]

Signed-off-by: Martin Michlmayr [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-iop32x/glantank.c |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 2b086ab..6309f9a 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -3,7 +3,7 @@
  *
  * Board support code for the GLAN Tank.
  *
- * Copyright (C) 2006 Martin Michlmayr [EMAIL PROTECTED]
+ * Copyright (C) 2006, 2007 Martin Michlmayr [EMAIL PROTECTED]
  * Copyright (C) 2006 Lennert Buytenhek [EMAIL PROTECTED]
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -21,6 +21,7 @@
 #include linux/serial_core.h
 #include linux/serial_8250.h
 #include linux/mtd/physmap.h
+#include linux/i2c.h
 #include linux/platform_device.h
 #include asm/hardware.h
 #include asm/io.h
@@ -166,6 +167,13 @@ static struct platform_device glantank_serial_device = {
.resource   = glantank_uart_resource,
 };
 
+static struct i2c_board_info __initdata glantank_i2c_devices[] = {
+   {
+   I2C_BOARD_INFO(rtc-rs5c372, 0x32),
+   .type = rs5c372a,
+   },
+};
+
 static void glantank_power_off(void)
 {
__raw_writeb(0x01, 0xfe8d0004);
@@ -183,6 +191,9 @@ static void __init glantank_init_machine(void)
platform_device_register(iop3xx_dma_0_channel);
platform_device_register(iop3xx_dma_1_channel);
 
+   i2c_register_board_info(0, glantank_i2c_devices,
+   ARRAY_SIZE(glantank_i2c_devices));
+
pm_power_off = glantank_power_off;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4770/1: GLAN Tank: correct physmap_flash_data width field

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b696b6b448d3ec5f882aa346ce544e00763e7b3d
Commit: b696b6b448d3ec5f882aa346ce544e00763e7b3d
Parent: bd7b8858631bf335ce6e8b4a985b7f951041b572
Author: Gordon Farquharson [EMAIL PROTECTED]
AuthorDate: Sat Jan 26 08:35:44 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:58:55 2008 +

[ARM] 4770/1: GLAN Tank: correct physmap_flash_data width field

This patch is required, in conjunction with the patch submitted to
linux-mtd [1], to access the flash memory device in the GLAN Tank.

Without the patches, the boot log shows

physmap platform flash device: 0008 at f000
...
physmap-flash physmap-flash.0: map_probe failed

whereas with the patches, the boot log shows

physmap platform flash device: 0008 at f000
Found: ST M29W400DB
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
...
cmdlinepart partition parsing not available
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7
No RedBoot partition table detected in physmap-flash.0

The change made by this patch is required because the ST M29W400DB
flash memory chip in the GLAN Tank is used in 16 bit bus mode (~BYTE
pin is high when the board is powered on).

[1] http://lists.infradead.org/pipermail/linux-mtd/2008-January/020291.html

Signed-off-by: Gordon Farquharson [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-iop32x/glantank.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 6309f9a..74c65ce 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -119,7 +119,7 @@ subsys_initcall(glantank_pci_init);
  * GLAN Tank machine initialization.
  */
 static struct physmap_flash_data glantank_flash_data = {
-   .width  = 1,
+   .width  = 2,
 };
 
 static struct resource glantank_flash_resource = {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM kprobes: core code

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=24ba613c9d6cad315f484e658288db152f1dc447
Commit: 24ba613c9d6cad315f484e658288db152f1dc447
Parent: 35aa1df4328340f38edc46f00837f08d33d49f63
Author: Abhishek Sagar [EMAIL PROTECTED]
AuthorDate: Mon Jun 11 22:20:10 2007 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:16 2008 +

ARM kprobes: core code

This is a full implementation of Kprobes including Jprobes and
Kretprobes support.

This ARM implementation does not follow the usual kprobes double-
exception model. The traditional model is where the initial kprobes
breakpoint calls kprobe_handler(), which returns from exception to
execute the instruction in its original context, then immediately
re-enters after a second breakpoint (or single-stepping exception)
into post_kprobe_handler(), each time the probe is hit..  The ARM
implementation only executes one kprobes exception per hit, so no
post_kprobe_handler() phase. All side-effects from the kprobe'd
instruction are resolved before returning from the initial exception.
As a result, all instructions are _always_ effectively boosted
regardless of the type of instruction, and even regardless of whether
or not there is a post-handler for the probe.

Signed-off-by: Abhishek Sagar [EMAIL PROTECTED]
Signed-off-by: Quentin Barnes [EMAIL PROTECTED]
Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/kernel/Makefile  |2 +-
 arch/arm/kernel/kprobes.c |  453 +
 include/asm-arm/kprobes.h |   29 +++
 3 files changed, 483 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 9e0eeba..faa7619 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -19,7 +19,7 @@ obj-$(CONFIG_ISA_DMA) += dma-isa.o
 obj-$(CONFIG_PCI)  += bios32.o isa.o
 obj-$(CONFIG_SMP)  += smp.o
 obj-$(CONFIG_KEXEC)+= machine_kexec.o relocate_kernel.o
-obj-$(CONFIG_KPROBES)  += kprobes-decode.o
+obj-$(CONFIG_KPROBES)  += kprobes.o kprobes-decode.o
 obj-$(CONFIG_OABI_COMPAT)  += sys_oabi-compat.o
 
 obj-$(CONFIG_CRUNCH)   += crunch.o crunch-bits.o
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
new file mode 100644
index 000..a18a845
--- /dev/null
+++ b/arch/arm/kernel/kprobes.c
@@ -0,0 +1,453 @@
+/*
+ * arch/arm/kernel/kprobes.c
+ *
+ * Kprobes on ARM
+ *
+ * Abhishek Sagar [EMAIL PROTECTED]
+ * Copyright (C) 2006, 2007 Motorola Inc.
+ *
+ * Nicolas Pitre [EMAIL PROTECTED]
+ * Copyright (C) 2007 Marvell Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#include linux/kernel.h
+#include linux/kprobes.h
+#include linux/module.h
+#include linux/stringify.h
+#include asm/traps.h
+#include asm/cacheflush.h
+
+/*
+ * This undefined instruction must be unique and
+ * reserved solely for kprobes' use.
+ */
+#define KPROBE_BREAKPOINT_INSTRUCTION  0xe7f001f8
+
+#define MIN_STACK_SIZE(addr)   \
+   min((unsigned long)MAX_STACK_SIZE,  \
+   (unsigned long)current_thread_info() + THREAD_START_SP - (addr))
+
+#define flush_insns(addr, cnt) \
+   flush_icache_range((unsigned long)(addr),   \
+  (unsigned long)(addr) +  \
+  sizeof(kprobe_opcode_t) * (cnt))
+
+/* Used as a marker in ARM_pc to note when we're in a jprobe. */
+#define JPROBE_MAGIC_ADDR  0x
+
+DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
+DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
+
+
+int __kprobes arch_prepare_kprobe(struct kprobe *p)
+{
+   kprobe_opcode_t insn;
+   kprobe_opcode_t tmp_insn[MAX_INSN_SIZE];
+   unsigned long addr = (unsigned long)p-addr;
+   int is;
+
+   if (addr  0x3)
+   return -EINVAL;
+
+   insn = *p-addr;
+   p-opcode = insn;
+   p-ainsn.insn = tmp_insn;
+
+   switch (arm_kprobe_decode_insn(insn, p-ainsn)) {
+   case INSN_REJECTED: /* not supported */
+   return -EINVAL;
+
+   case INSN_GOOD: /* instruction uses slot */
+   p-ainsn.insn = get_insn_slot();
+   if (!p-ainsn.insn)
+   return -ENOMEM;
+   for (is = 0; is  MAX_INSN_SIZE; ++is)
+   p-ainsn.insn[is] = tmp_insn[is];
+   flush_insns(p-ainsn.insn, 

ARM kprobes: don't let a single-stepped stmdb corrupt the exception stack

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d30a0c8bf99f0e6a7d8c57bd4524039585ffbced
Commit: d30a0c8bf99f0e6a7d8c57bd4524039585ffbced
Parent: 25ce1dd71b8326f2542cf030f68e0e64c3d94dc1
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Fri Dec 14 15:56:01 2007 -0500
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:17 2008 +

ARM kprobes: don't let a single-stepped stmdb corrupt the exception stack

If kprobes installs a breakpoint on a stmdb sp!, {...} instruction,
and then single-step it by simulation from the exception context, it will
corrupt the saved regs on the stack from the previous context.

To avoid this, let's add an optional parameter to the svc_entry macro
allowing for a hole to be created on the stack before saving the
interrupted context, and use it in the undef_svc handler when kprobes
is enabled.

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/kernel/entry-armv.S |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 29dec08..12ecc81 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -112,8 +112,8 @@ common_invalid:
 #define SPFIX(code...)
 #endif
 
-   .macro  svc_entry
-   sub sp, sp, #S_FRAME_SIZE
+   .macro  svc_entry, stack_hole=0
+   sub sp, sp, #(S_FRAME_SIZE + \stack_hole)
  SPFIX(tst sp, #4  )
  SPFIX(bicne   sp, sp, #4  )
stmib   sp, {r1 - r12}
@@ -121,7 +121,7 @@ common_invalid:
ldmia   r0, {r1 - r3}
add r5, sp, #S_SP   @ here for interlock avoidance
mov r4, #-1 @ 
-   add r0, sp, #S_FRAME_SIZE   @ 
+   add r0, sp, #(S_FRAME_SIZE + \stack_hole)
  SPFIX(addne   r0, r0, #4  )
str r1, [sp]@ save the real r0 copied
@ from the exception stack
@@ -242,7 +242,14 @@ svc_preempt:
 
.align  5
 __und_svc:
+#ifdef CONFIG_KPROBES
+   @ If a kprobe is about to simulate a stmdb sp... instruction,
+   @ it obviously needs free stack space which then will belong to
+   @ the saved context.
+   svc_entry 64
+#else
svc_entry
+#endif
 
@
@ call emulation code, which returns using r9 if it has emulated
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM kprobes: prevent some functions involved with kprobes from being probed

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=785d3cd286f0bf67d1bf692559b9ae5de12678f5
Commit: 785d3cd286f0bf67d1bf692559b9ae5de12678f5
Parent: d30a0c8bf99f0e6a7d8c57bd4524039585ffbced
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Mon Dec 3 15:27:56 2007 -0500
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:17 2008 +

ARM kprobes: prevent some functions involved with kprobes from being probed

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/kernel/entry-armv.S  |8 +++-
 arch/arm/kernel/kprobes.c |2 +-
 arch/arm/kernel/traps.c   |9 -
 arch/arm/kernel/vmlinux.lds.S |1 +
 arch/arm/mm/fault.c   |4 ++--
 include/asm-arm/traps.h   |9 +
 6 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 12ecc81..3727537 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -58,6 +58,12 @@
 
.endm
 
+#ifdef CONFIG_KPROBES
+   .section.kprobes.text,ax,%progbits
+#else
+   .text
+#endif
+
 /*
  * Invalid mode handlers
  */
@@ -562,7 +568,7 @@ do_fpe:
.data
 ENTRY(fp_enter)
.word   no_fp
-   .text
+   .previous
 
 no_fp: mov pc, lr
 
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index a18a845..450ee2c 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -55,7 +55,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
unsigned long addr = (unsigned long)p-addr;
int is;
 
-   if (addr  0x3)
+   if (addr  0x3 || in_exception_text(addr))
return -EINVAL;
 
insn = *p-addr;
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index c34db4e..65bb762 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -46,15 +46,6 @@ __setup(user_debug=, user_debug_setup);
 
 static void dump_mem(const char *str, unsigned long bottom, unsigned long top);
 
-static inline int in_exception_text(unsigned long ptr)
-{
-   extern char __exception_text_start[];
-   extern char __exception_text_end[];
-
-   return ptr = (unsigned long)__exception_text_start 
-  ptr  (unsigned long)__exception_text_end;
-}
-
 void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned 
long frame)
 {
 #ifdef CONFIG_KALLSYMS
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 5ff5406..30f732c 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -94,6 +94,7 @@ SECTIONS
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
+   KPROBES_TEXT
 #ifdef CONFIG_MMU
*(.fixup)
 #endif
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 1e7b1ed..28ad7ab 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -239,7 +239,7 @@ out:
return fault;
 }
 
-static int
+static int __kprobes
 do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 {
struct task_struct *tsk;
@@ -338,7 +338,7 @@ no_context:
  * interrupt or a critical region, and should only copy the information
  * from the master page table, nothing more.
  */
-static int
+static int __kprobes
 do_translation_fault(unsigned long addr, unsigned int fsr,
 struct pt_regs *regs)
 {
diff --git a/include/asm-arm/traps.h b/include/asm-arm/traps.h
index d4f34dc..f1541af 100644
--- a/include/asm-arm/traps.h
+++ b/include/asm-arm/traps.h
@@ -15,4 +15,13 @@ struct undef_hook {
 void register_undef_hook(struct undef_hook *hook);
 void unregister_undef_hook(struct undef_hook *hook);
 
+static inline int in_exception_text(unsigned long ptr)
+{
+   extern char __exception_text_start[];
+   extern char __exception_text_end[];
+
+   return ptr = (unsigned long)__exception_text_start 
+  ptr  (unsigned long)__exception_text_end;
+}
+
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM kprobes: special hook for the kprobes breakpoint handler

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=796969104cab0d454dbc792ad0d12a4f365a8564
Commit: 796969104cab0d454dbc792ad0d12a4f365a8564
Parent: 785d3cd286f0bf67d1bf692559b9ae5de12678f5
Author: Nicolas Pitre [EMAIL PROTECTED]
AuthorDate: Mon Dec 3 17:22:36 2007 -0500
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:25:17 2008 +

ARM kprobes: special hook for the kprobes breakpoint handler

The kprobes code is already able to cope with reentrant probes, so its
handler must be called outside of the region protected by undef_lock.

If ever this lock is released when handlers are called then this commit
could be reverted.

Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/kernel/kprobes.c |8 +---
 arch/arm/kernel/traps.c   |   12 
 include/asm-arm/kprobes.h |7 +++
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index 450ee2c..a22a98c 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -26,12 +26,6 @@
 #include asm/traps.h
 #include asm/cacheflush.h
 
-/*
- * This undefined instruction must be unique and
- * reserved solely for kprobes' use.
- */
-#define KPROBE_BREAKPOINT_INSTRUCTION  0xe7f001f8
-
 #define MIN_STACK_SIZE(addr)   \
min((unsigned long)MAX_STACK_SIZE,  \
(unsigned long)current_thread_info() + THREAD_START_SP - (addr))
@@ -206,7 +200,7 @@ void __kprobes kprobe_handler(struct pt_regs *regs)
}
 }
 
-static int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
+int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
 {
kprobe_handler(regs);
return 0;
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 65bb762..5595fdd 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -19,6 +19,7 @@
 #include linux/kallsyms.h
 #include linux/delay.h
 #include linux/init.h
+#include linux/kprobes.h
 
 #include asm/atomic.h
 #include asm/cacheflush.h
@@ -313,6 +314,17 @@ asmlinkage void __exception do_undefinstr(struct pt_regs 
*regs)
get_user(instr, (u32 __user *)pc);
}
 
+#ifdef CONFIG_KPROBES
+   /*
+* It is possible to have recursive kprobes, so we can't call
+* the kprobe trap handler with the undef_lock held.
+*/
+   if (instr == KPROBE_BREAKPOINT_INSTRUCTION  !user_mode(regs)) {
+   kprobe_trap_handler(regs, instr);
+   return;
+   }
+#endif
+
spin_lock_irqsave(undef_lock, flags);
list_for_each_entry(hook, undef_hook, node) {
if ((instr  hook-instr_mask) == hook-instr_val 
diff --git a/include/asm-arm/kprobes.h b/include/asm-arm/kprobes.h
index 273f374..4e7bd32 100644
--- a/include/asm-arm/kprobes.h
+++ b/include/asm-arm/kprobes.h
@@ -25,6 +25,12 @@
 #define MAX_INSN_SIZE  2
 #define MAX_STACK_SIZE 64  /* 32 would probably be OK */
 
+/*
+ * This undefined instruction must be unique and
+ * reserved solely for kprobes' use.
+ */
+#define KPROBE_BREAKPOINT_INSTRUCTION  0xe7f001f8
+
 #define regs_return_value(regs)((regs)-ARM_r0)
 #define flush_insn_slot(p) do { } while (0)
 #define kretprobe_blacklist_size   0
@@ -55,6 +61,7 @@ struct kprobe_ctlblk {
 
 void arch_remove_kprobe(struct kprobe *);
 
+int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr);
 int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
 int kprobe_exceptions_notify(struct notifier_block *self,
 unsigned long val, void *data);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4601/1: KS8695: PCI support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7d77ce8f67358c6b7708726f8fa230cd58d75b2c
Commit: 7d77ce8f67358c6b7708726f8fa230cd58d75b2c
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Mon Oct 15 13:09:19 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:38:48 2008 +

[ARM] 4601/1: KS8695: PCI support

This patch adds support for the PCI Host controller integrated in the
Kendin/Micrel KS8695 processor.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-ks8695/Makefile   |2 +-
 arch/arm/mach-ks8695/board-micrel.c |2 +-
 arch/arm/mach-ks8695/pci.c  |  326 +++
 3 files changed, 328 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile
index 2a07a28..730a3af 100644
--- a/arch/arm/mach-ks8695/Makefile
+++ b/arch/arm/mach-ks8695/Makefile
@@ -9,7 +9,7 @@ obj-n   :=
 obj-   :=
 
 # PCI support is optional
-#obj-$(CONFIG_PCI) += pci.o
+obj-$(CONFIG_PCI)  += pci.o
 
 # Board-specific support
 obj-$(CONFIG_MACH_KS8695)  += board-micrel.o
diff --git a/arch/arm/mach-ks8695/board-micrel.c 
b/arch/arm/mach-ks8695/board-micrel.c
index 2feeef8..05ac2bd 100644
--- a/arch/arm/mach-ks8695/board-micrel.c
+++ b/arch/arm/mach-ks8695/board-micrel.c
@@ -40,7 +40,7 @@ static void __init micrel_init(void)
printk(KERN_INFO Micrel KS8695 Development Board initializing\n);
 
 #ifdef CONFIG_PCI
-// ks8695_init_pci(micrel_pci);
+   ks8695_init_pci(micrel_pci);
 #endif
 
/* Add devices */
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c
new file mode 100644
index 000..3f4e033
--- /dev/null
+++ b/arch/arm/mach-ks8695/pci.c
@@ -0,0 +1,326 @@
+/*
+ * arch/arm/mach-ks8695/pci.c
+ *
+ *  Copyright (C) 2003, Micrel Semiconductors
+ *  Copyright (C) 2006, Greg Ungerer [EMAIL PROTECTED]
+ *  Copyright (C) 2006, Ben Dooks
+ *  Copyright (C) 2007, Andrew Victor
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include linux/kernel.h
+#include linux/pci.h
+#include linux/mm.h
+#include linux/init.h
+#include linux/irq.h
+#include linux/delay.h
+
+#include asm/io.h
+#include asm/signal.h
+#include asm/mach/pci.h
+#include asm/hardware.h
+
+#include asm/arch/devices.h
+#include asm/arch/regs-pci.h
+
+
+static int pci_dbg;
+static int pci_cfg_dbg;
+
+
+static void ks8695_pci_setupconfig(unsigned int bus_nr, unsigned int devfn, 
unsigned int where)
+{
+   unsigned long pbca;
+
+   pbca = PBCA_ENABLE | (where  ~3);
+   pbca |= PCI_SLOT(devfn)  11 ;
+   pbca |= PCI_FUNC(devfn)  8;
+   pbca |= bus_nr  16;
+
+   if (bus_nr == 0) {
+   /* use Type-0 transaction */
+   __raw_writel(pbca, KS8695_PCI_VA + KS8695_PBCA);
+   } else {
+   /* use Type-1 transaction */
+   __raw_writel(pbca | PBCA_TYPE1, KS8695_PCI_VA + KS8695_PBCA);
+   }
+}
+
+
+/*
+ * The KS8695 datasheet prohibits anything other than 32bit accesses
+ * to the IO registers, so all our configuration must be done with
+ * 32bit operations, and the correct bit masking and shifting.
+ */
+
+static int ks8695_pci_readconfig(struct pci_bus *bus,
+   unsigned int devfn, int where, int size, u32 *value)
+{
+   ks8695_pci_setupconfig(bus-number, devfn, where);
+
+   *value = __raw_readl(KS8695_PCI_VA +  KS8695_PBCD);
+
+   switch (size) {
+   case 4:
+   break;
+   case 2:
+   *value = *value  ((where  2) * 8);
+   *value = 0x;
+   break;
+   case 1:
+   *value = *value  ((where  3) * 8);
+   *value = 0xff;
+   break;
+   }
+
+   if (pci_cfg_dbg) {
+   printk(read: %d,%08x,%02x,%d: %08x (%08x)\n,
+   bus-number, devfn, where, size, *value,
+   __raw_readl(KS8695_PCI_VA +  KS8695_PBCD));
+   }
+
+   return 

[ARM] ARRAY_SIZE() cleanup

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df1a29032060680d258689448dca37bb003c4c2c
Commit: df1a29032060680d258689448dca37bb003c4c2c
Parent: 2fd2b1242810fb4d2ba36548fecc1f005c36770c
Author: Alejandro Martinez Ruiz [EMAIL PROTECTED]
AuthorDate: Wed Oct 17 12:14:25 2007 +0200
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:49:57 2008 +

[ARM] ARRAY_SIZE() cleanup

Signed-off-by: Alejandro Martinez Ruiz [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/kernel/dma-isa.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c
index 0a3e9ad..2f080a3 100644
--- a/arch/arm/kernel/dma-isa.c
+++ b/arch/arm/kernel/dma-isa.c
@@ -216,7 +216,7 @@ void __init isa_init_dma(dma_t *dma)
 
request_dma(DMA_ISA_CASCADE, cascade);
 
-   for (i = 0; i  sizeof(dma_resources) / 
sizeof(dma_resources[0]); i++)
+   for (i = 0; i  ARRAY_SIZE(dma_resources); i++)
request_resource(ioport_resource, dma_resources + i);
}
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Misc minor interrupt handler cleanups

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e8f2af17757b54db7f307b75e088489c480eb889
Commit: e8f2af17757b54db7f307b75e088489c480eb889
Parent: f1a6de9c7efc8e3fb535f1e61848f671f90b5cd5
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Fri Oct 26 05:40:25 2007 -0400
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:49:59 2008 +

[ARM] Misc minor interrupt handler cleanups

mach-integrator/pci_v3.c: no need to reference 'irq' arg, its constant

mach-omap1/pm.c: remove extra whitespace

arch/arm/mach-sa1100/ssp.c: remove braces around single C stmt

arch/arm/plat-omap/mcbsp.c:
- remove pointless casts from void*
- make longer lines more readable

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-integrator/pci_v3.c |8 +---
 arch/arm/mach-omap1/pm.c  |2 +-
 arch/arm/mach-sa1100/ssp.c|3 +--
 arch/arm/plat-omap/mcbsp.c|   20 
 4 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-integrator/pci_v3.c 
b/arch/arm/mach-integrator/pci_v3.c
index d4d8134..d55fa4e 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -440,7 +440,7 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct 
pt_regs *regs)
return 1;
 }
 
-static irqreturn_t v3_irq(int irq, void *devid)
+static irqreturn_t v3_irq(int dummy, void *devid)
 {
 #ifdef CONFIG_DEBUG_LL
struct pt_regs *regs = get_irq_regs();
@@ -448,8 +448,10 @@ static irqreturn_t v3_irq(int irq, void *devid)
unsigned long instr = *(unsigned long *)pc;
char buf[128];
 
-   sprintf(buf, V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x 
ISTAT=%02x\n, irq,
-   pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE)  
255,
+   sprintf(buf, V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x 
+   ISTAT=%02x\n, IRQ_AP_V3INT, pc, instr,
+   __raw_readl(SC_LBFADDR),
+   __raw_readl(SC_LBFCODE)  255,
v3_readb(V3_LB_ISTAT));
printascii(buf);
 #endif
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index d9805e3..06b7e54 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -639,7 +639,7 @@ static void omap_pm_finish(void)
 }
 
 
-static irqreturn_t  omap_wakeup_interrupt(int irq, void *dev)
+static irqreturn_t omap_wakeup_interrupt(int irq, void *dev)
 {
return IRQ_HANDLED;
 }
diff --git a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c
index 59703c6..06206ce 100644
--- a/arch/arm/mach-sa1100/ssp.c
+++ b/arch/arm/mach-sa1100/ssp.c
@@ -29,9 +29,8 @@ static irqreturn_t ssp_interrupt(int irq, void *dev_id)
 {
unsigned int status = Ser4SSSR;
 
-   if (status  SSSR_ROR) {
+   if (status  SSSR_ROR)
printk(KERN_WARNING SSP: receiver overrun\n);
-   }
 
Ser4SSSR = SSSR_ROR;
 
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index f7b9ccd..2af5bd5 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -98,9 +98,10 @@ static void omap_mcbsp_dump_reg(u8 id)
 
 static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
 {
-   struct omap_mcbsp * mcbsp_tx = (struct omap_mcbsp *)(dev_id);
+   struct omap_mcbsp *mcbsp_tx = dev_id;
 
-   DBG(TX IRQ callback : 0x%x\n, OMAP_MCBSP_READ(mcbsp_tx-io_base, 
SPCR2));
+   DBG(TX IRQ callback : 0x%x\n,
+   OMAP_MCBSP_READ(mcbsp_tx-io_base, SPCR2));
 
complete(mcbsp_tx-tx_irq_completion);
return IRQ_HANDLED;
@@ -108,9 +109,10 @@ static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void 
*dev_id)
 
 static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id)
 {
-   struct omap_mcbsp * mcbsp_rx = (struct omap_mcbsp *)(dev_id);
+   struct omap_mcbsp *mcbsp_rx = dev_id;
 
-   DBG(RX IRQ callback : 0x%x\n, OMAP_MCBSP_READ(mcbsp_rx-io_base, 
SPCR2));
+   DBG(RX IRQ callback : 0x%x\n,
+   OMAP_MCBSP_READ(mcbsp_rx-io_base, SPCR2));
 
complete(mcbsp_rx-rx_irq_completion);
return IRQ_HANDLED;
@@ -118,9 +120,10 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void 
*dev_id)
 
 static void omap_mcbsp_tx_dma_callback(int lch, u16 ch_status, void *data)
 {
-   struct omap_mcbsp * mcbsp_dma_tx = (struct omap_mcbsp *)(data);
+   struct omap_mcbsp *mcbsp_dma_tx = data;
 
-   DBG(TX DMA callback : 0x%x\n, OMAP_MCBSP_READ(mcbsp_dma_tx-io_base, 
SPCR2));
+   DBG(TX DMA callback : 0x%x\n,
+   OMAP_MCBSP_READ(mcbsp_dma_tx-io_base, SPCR2));
 
/* We can free the channels */
omap_free_dma(mcbsp_dma_tx-dma_tx_lch);
@@ -131,9 +134,10 @@ static void omap_mcbsp_tx_dma_callback(int lch, u16 
ch_status, void *data)
 
 

[ARM] 4687/1: Trivial arch/arm/kernel/entry-common.S comment fix

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b544c99e0328937932022da3cbdd38cf3f072ec
Commit: 7b544c99e0328937932022da3cbdd38cf3f072ec
Parent: d2936b1976a9c70d1cce4700c51f26d4b9495e9d
Author: George G. Davis [EMAIL PROTECTED]
AuthorDate: Sat Dec 1 05:49:41 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:50:04 2008 +

[ARM] 4687/1: Trivial arch/arm/kernel/entry-common.S comment fix

Make the comment match the code

Signed-off-by: George G. Davis [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/kernel/entry-common.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 33e6cc2..6c90c50 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -72,7 +72,7 @@ no_work_pending:
ldr r1, [sp, #S_PSR]@ get calling cpsr
ldr lr, [sp, #S_PC]!@ get pc
msr spsr_cxsf, r1   @ save in spsr_svc
-   ldmdb   sp, {r0 - lr}^  @ get calling r1 - lr
+   ldmdb   sp, {r0 - lr}^  @ get calling r0 - lr
mov r0, r0
add sp, sp, #S_FRAME_SIZE - S_PC
movspc, lr  @ return  move spsr_svc into 
cpsr
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] remove duplicate includes

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d7d4f54b1337bf64605dc9cb3c540f67843be39
Commit: 1d7d4f54b1337bf64605dc9cb3c540f67843be39
Parent: ddf4e42c6a109392851d8843e2699bffd3c476bf
Author: Lucas Woods [EMAIL PROTECTED]
AuthorDate: Wed Nov 21 14:51:51 2007 -0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:50:07 2008 +

[ARM] remove duplicate includes

Signed-off-by: Lucas Woods [EMAIL PROTECTED]
Acked-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/common/rtctime.c|1 -
 arch/arm/mach-ep93xx/core.c  |1 -
 arch/arm/mach-ixp23xx/core.c |1 -
 arch/arm/mach-ixp23xx/espresso.c |2 --
 arch/arm/mach-ixp23xx/ixdp2351.c |2 --
 arch/arm/mach-ixp23xx/roadrunner.c   |2 --
 arch/arm/mach-ixp4xx/nslu2-power.c   |1 -
 arch/arm/mach-omap1/board-nokia770.c |1 -
 arch/arm/mach-omap1/board-osk.c  |1 -
 arch/arm/mach-omap1/board-palmtt.c   |1 -
 arch/arm/mach-omap1/board-palmz71.c  |1 -
 arch/arm/mach-omap2/board-apollon.c  |1 -
 12 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c
index bf1075e..f53bca4 100644
--- a/arch/arm/common/rtctime.c
+++ b/arch/arm/common/rtctime.c
@@ -20,7 +20,6 @@
 #include linux/capability.h
 #include linux/device.h
 #include linux/mutex.h
-#include linux/rtc.h
 
 #include asm/rtc.h
 #include asm/semaphore.h
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 70b2c78..f8f001d 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -21,7 +21,6 @@
 #include linux/serial.h
 #include linux/tty.h
 #include linux/bitops.h
-#include linux/serial.h
 #include linux/serial_8250.h
 #include linux/serial_core.h
 #include linux/device.h
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index 16356ff..5fea5a1 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -22,7 +22,6 @@
 #include linux/serial.h
 #include linux/tty.h
 #include linux/bitops.h
-#include linux/serial.h
 #include linux/serial_8250.h
 #include linux/serial_core.h
 #include linux/device.h
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c
index 7a85ced..d3a779a 100644
--- a/arch/arm/mach-ixp23xx/espresso.c
+++ b/arch/arm/mach-ixp23xx/espresso.c
@@ -19,7 +19,6 @@
 #include linux/tty.h
 #include linux/bitops.h
 #include linux/ioport.h
-#include linux/serial.h
 #include linux/serial_8250.h
 #include linux/serial_core.h
 #include linux/device.h
@@ -40,7 +39,6 @@
 #include asm/mach/map.h
 #include asm/mach/irq.h
 #include asm/mach/arch.h
-#include asm/mach/irq.h
 #include asm/mach/pci.h
 
 static int __init espresso_pci_init(void)
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
index c41a6b5..5c5d4d6 100644
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ b/arch/arm/mach-ixp23xx/ixdp2351.c
@@ -24,7 +24,6 @@
 #include linux/tty.h
 #include linux/bitops.h
 #include linux/ioport.h
-#include linux/serial.h
 #include linux/serial_8250.h
 #include linux/serial_core.h
 #include linux/device.h
@@ -44,7 +43,6 @@
 #include asm/mach/map.h
 #include asm/mach/irq.h
 #include asm/mach/arch.h
-#include asm/mach/irq.h
 #include asm/mach/pci.h
 
 /*
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c 
b/arch/arm/mach-ixp23xx/roadrunner.c
index e356449..f0f70ba 100644
--- a/arch/arm/mach-ixp23xx/roadrunner.c
+++ b/arch/arm/mach-ixp23xx/roadrunner.c
@@ -23,7 +23,6 @@
 #include linux/tty.h
 #include linux/bitops.h
 #include linux/ioport.h
-#include linux/serial.h
 #include linux/serial_8250.h
 #include linux/serial_core.h
 #include linux/device.h
@@ -44,7 +43,6 @@
 #include asm/mach/map.h
 #include asm/mach/irq.h
 #include asm/mach/arch.h
-#include asm/mach/irq.h
 #include asm/mach/pci.h
 
 /*
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c 
b/arch/arm/mach-ixp4xx/nslu2-power.c
index acd71e9..6f10dc2 100644
--- a/arch/arm/mach-ixp4xx/nslu2-power.c
+++ b/arch/arm/mach-ixp4xx/nslu2-power.c
@@ -21,7 +21,6 @@
 #include linux/reboot.h
 #include linux/irq.h
 #include linux/interrupt.h
-#include linux/reboot.h
 
 #include asm/mach-types.h
 
diff --git a/arch/arm/mach-omap1/board-nokia770.c 
b/arch/arm/mach-omap1/board-nokia770.c
index 182a98a..e2c8ffd 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -32,7 +32,6 @@
 #include asm/arch/common.h
 #include asm/arch/dsp_common.h
 #include asm/arch/aic23.h
-#include asm/arch/gpio.h
 #include asm/arch/omapfb.h
 #include asm/arch/lcd_mipid.h
 
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 5db182d..4081a42 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -31,7 +31,6 @@
 #include linux/platform_device.h
 

[ARM] 4719/1: S3C2412: Update SPI register definitions for the S3C2412

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1fb4e5611a9d0b524d85f0db4402aa439ebdb331
Commit: 1fb4e5611a9d0b524d85f0db4402aa439ebdb331
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:29 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:48 2008 +

[ARM] 4719/1: S3C2412: Update SPI register definitions for the S3C2412

Add S3C2412 register definitions.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/plat-s3c24xx/regs-spi.h |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h 
b/include/asm-arm/plat-s3c24xx/regs-spi.h
index 4a499a1..960907f 100644
--- a/include/asm-arm/plat-s3c24xx/regs-spi.h
+++ b/include/asm-arm/plat-s3c24xx/regs-spi.h
@@ -17,6 +17,7 @@
 
 #define S3C2410_SPCON  (0x00)
 
+#define S3C2412_SPCON_DIRC_RX(17)
 #define S3C2410_SPCON_SMOD_DMA   (25)/* DMA mode */
 #define S3C2410_SPCON_SMOD_INT   (15)/* interrupt mode */
 #define S3C2410_SPCON_SMOD_POLL   (05)   /* polling mode */
@@ -37,7 +38,7 @@
 #define S3C2410_SPSTA_DCOL   (12)/* Data Collision Error */
 #define S3C2410_SPSTA_MULD   (11)/* Multi Master Error */
 #define S3C2410_SPSTA_READY  (10)/* Data Tx/Rx ready */
-
+#define S3C2412_SPSTA_READY_ORG  (13)
 
 #define S3C2410_SPPIN   (0x08)
 
@@ -46,9 +47,13 @@
 #define S3C2400_SPPIN_nCS(11)/* SPI Card Select */
 #define S3C2410_SPPIN_KEEP   (10)/* Master Out keep */
 
-
 #define S3C2410_SPPRE   (0x0C)
 #define S3C2410_SPTDAT  (0x10)
 #define S3C2410_SPRDAT  (0x14)
 
+#define S3C2412_TXFIFO  (0x18)
+#define S3C2412_RXFIFO  (0x18)
+#define S3C2412_SPFIC   (0x24)
+
+
 #endif /* __ASM_ARCH_REGS_SPI_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4720/1: S3C2412: Add power configuration registers for battery flat behaviour.

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf08167c82b38ed9f6401e68b3c91fb11496f101
Commit: cf08167c82b38ed9f6401e68b3c91fb11496f101
Parent: 1fb4e5611a9d0b524d85f0db4402aa439ebdb331
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:28 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:48 2008 +

[ARM] 4720/1: S3C2412: Add power configuration registers for battery flat 
behaviour.

Add the S3C2412_PWRCFG values for the action taken on detecting that
the battery is flat.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/regs-power.h |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/regs-power.h 
b/include/asm-arm/arch-s3c2410/regs-power.h
index f79987b..13d13b7 100644
--- a/include/asm-arm/arch-s3c2410/regs-power.h
+++ b/include/asm-arm/arch-s3c2410/regs-power.h
@@ -23,7 +23,8 @@
 #define S3C2412_INFORM2S3C24XX_PWRREG(0x78)
 #define S3C2412_INFORM3S3C24XX_PWRREG(0x7C)
 
-#define S3C2412_PWRCFG_BATF_IGNORE (00)
+#define S3C2412_PWRCFG_BATF_IRQ(10)
+#define S3C2412_PWRCFG_BATF_IGNORE (20)
 #define S3C2412_PWRCFG_BATF_SLEEP  (30)
 #define S3C2412_PWRCFG_BATF_MASK   (30)
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4721/1: S3C24XX: Ensure watchdog clock is enbaled for hard reset

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d652074ebcedd13c7ce760c7f3327f30862852fb
Commit: d652074ebcedd13c7ce760c7f3327f30862852fb
Parent: cf08167c82b38ed9f6401e68b3c91fb11496f101
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:31 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:48 2008 +

[ARM] 4721/1: S3C24XX: Ensure watchdog clock is enbaled for hard reset

If the hard reset routine is using the watchdog, then
ensure that the clock for the watchdog has been enabled
before we try and issue a reset.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/system.h |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/system.h 
b/include/asm-arm/arch-s3c2410/system.h
index 6389178..cb9cd9f 100644
--- a/include/asm-arm/arch-s3c2410/system.h
+++ b/include/asm-arm/arch-s3c2410/system.h
@@ -20,6 +20,9 @@
 #include asm/plat-s3c/regs-watchdog.h
 #include asm/arch/regs-clock.h
 
+#include linux/clk.h
+#include linux/err.h
+
 void (*s3c24xx_idle)(void);
 void (*s3c24xx_reset_hook)(void);
 
@@ -59,6 +62,8 @@ static void arch_idle(void)
 static void
 arch_reset(char mode)
 {
+   struct clk *wdtclk;
+
if (mode == 's') {
cpu_reset(0);
}
@@ -70,6 +75,12 @@ arch_reset(char mode)
 
__raw_writel(0, S3C2410_WTCON);   /* disable watchdog, to be safe  */
 
+   wdtclk = clk_get(NULL, watchdog);
+   if (!IS_ERR(wdtclk)) {
+   clk_enable(wdtclk);
+   } else
+   printk(KERN_WARNING %s: warning: cannot get watchdog clock\n, 
__func__);
+
/* put initial values into count and data */
__raw_writel(0x100, S3C2410_WTCNT);
__raw_writel(0x100, S3C2410_WTDAT);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4725/1: S3C2412: Fix IIS and SDI definitions in DMA map

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d45c30cb4c0b5f397ba2e942d63b4170fa1f
Commit: d45c30cb4c0b5f397ba2e942d63b4170fa1f
Parent: 71e5b2f154eb743d609bb4e743ea344596769911
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:40 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4725/1: S3C2412: Fix IIS and SDI definitions in DMA map

The IIS and SDI register hw_addr definitions are
incorrect in the DMA map for the S3C2412.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/dma.c |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c
index 53c1d5b..c9cd514 100644
--- a/arch/arm/mach-s3c2412/dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -30,6 +30,7 @@
 #include asm/arch/regs-mem.h
 #include asm/arch/regs-lcd.h
 #include asm/arch/regs-sdi.h
+#include asm/plat-s3c24xx/regs-s3c2412-iis.h
 #include asm/plat-s3c24xx/regs-iis.h
 #include asm/plat-s3c24xx/regs-spi.h
 
@@ -47,8 +48,8 @@ static struct s3c24xx_dma_map __initdata 
s3c2412_dma_mappings[] = {
[DMACH_SDI] = {
.name   = sdi,
.channels   = MAP(S3C2412_DMAREQSEL_SDI),
-   .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
-   .hw_addr.from   = S3C2410_PA_IIS + S3C2410_IISFIFO,
+   .hw_addr.to = S3C2410_PA_SDI + S3C2410_SDIDATA,
+   .hw_addr.from   = S3C2410_PA_SDI + S3C2410_SDIDATA,
},
[DMACH_SPI0] = {
.name   = spi0,
@@ -105,12 +106,12 @@ static struct s3c24xx_dma_map __initdata 
s3c2412_dma_mappings[] = {
[DMACH_I2S_IN] = {
.name   = i2s-sdi,
.channels   = MAP(S3C2412_DMAREQSEL_I2SRX),
-   .hw_addr.from   = S3C2410_PA_IIS + S3C2410_IISFIFO,
+   .hw_addr.from   = S3C2410_PA_IIS + S3C2412_IISRXD,
},
[DMACH_I2S_OUT] = {
.name   = i2s-sdo,
.channels   = MAP(S3C2412_DMAREQSEL_I2STX),
-   .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO,
+   .hw_addr.to = S3C2410_PA_IIS + S3C2412_IISTXD,
},
[DMACH_USB_EP1] = {
.name   = usb-ep1,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4726/1: S3C2412: IIS register definitions

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b708d7bf18fd90105b8099cc558d66477dafd8ea
Commit: b708d7bf18fd90105b8099cc558d66477dafd8ea
Parent: d45c30cb4c0b5f397ba2e942d63b4170fa1f
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:39 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4726/1: S3C2412: IIS register definitions

The S3C2412 IIS engine differs from the previous
SoC in the range, so add a set of register definitions
in a seperate file for it.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h |   72 +++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h 
b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h
new file mode 100644
index 000..25d4058
--- /dev/null
+++ b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h
@@ -0,0 +1,72 @@
+/* linux/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h
+ *
+ * Copyright 2007 Simtec Electronics [EMAIL PROTECTED]
+ * http://armlinux.simtec.co.uk/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * S3C2412 IIS register definition
+*/
+
+#ifndef __ASM_ARCH_REGS_S3C2412_IIS_H
+#define __ASM_ARCH_REGS_S3C2412_IIS_H
+
+#define S3C2412_IISCON (0x00)
+#define S3C2412_IISMOD (0x04)
+#define S3C2412_IISFIC (0x08)
+#define S3C2412_IISPSR (0x0C)
+#define S3C2412_IISTXD (0x10)
+#define S3C2412_IISRXD (0x14)
+
+#define S3C2412_IISCON_LRINDEX (1  11)
+#define S3C2412_IISCON_TXFIFO_EMPTY(1  10)
+#define S3C2412_IISCON_RXFIFO_EMPTY(1  9)
+#define S3C2412_IISCON_TXFIFO_FULL (1  8)
+#define S3C2412_IISCON_RXFIFO_FULL (1  7)
+#define S3C2412_IISCON_TXDMA_PAUSE (1  6)
+#define S3C2412_IISCON_RXDMA_PAUSE (1  5)
+#define S3C2412_IISCON_TXCH_PAUSE  (1  4)
+#define S3C2412_IISCON_RXCH_PAUSE  (1  3)
+#define S3C2412_IISCON_TXDMA_ACTIVE(1  2)
+#define S3C2412_IISCON_RXDMA_ACTIVE(1  1)
+#define S3C2412_IISCON_IIS_ACTIVE  (1  0)
+
+#define S3C2412_IISMOD_MASTER_INTERNAL (0  10)
+#define S3C2412_IISMOD_MASTER_EXTERNAL (1  10)
+#define S3C2412_IISMOD_SLAVE   (2  10)
+#define S3C2412_IISMOD_MASTER_MASK (3  10)
+#define S3C2412_IISMOD_MODE_TXONLY (0  8)
+#define S3C2412_IISMOD_MODE_RXONLY (1  8)
+#define S3C2412_IISMOD_MODE_TXRX   (2  8)
+#define S3C2412_IISMOD_MODE_MASK   (3  8)
+#define S3C2412_IISMOD_LR_LLOW (0  7)
+#define S3C2412_IISMOD_LR_RLOW (1  7)
+#define S3C2412_IISMOD_SDF_IIS (0  5)
+#define S3C2412_IISMOD_SDF_MSB (0  5)
+#define S3C2412_IISMOD_SDF_LSB (0  5)
+#define S3C2412_IISMOD_SDF_MASK(3  5)
+#define S3C2412_IISMOD_RCLK_256FS  (0  3)
+#define S3C2412_IISMOD_RCLK_512FS  (1  3)
+#define S3C2412_IISMOD_RCLK_384FS  (2  3)
+#define S3C2412_IISMOD_RCLK_768FS  (3  3)
+#define S3C2412_IISMOD_RCLK_MASK   (3  3)
+#define S3C2412_IISMOD_BCLK_32FS   (0  1)
+#define S3C2412_IISMOD_BCLK_48FS   (1  1)
+#define S3C2412_IISMOD_BCLK_16FS   (2  1)
+#define S3C2412_IISMOD_BCLK_24FS   (3  1)
+#define S3C2412_IISMOD_BCLK_MASK   (3  1)
+#define S3C2412_IISMOD_8BIT(1  0)
+
+#define S3C2412_IISPSR_PSREN   (1  15)
+
+#define S3C2412_IISFIC_TXFLUSH (1  15)
+#define S3C2412_IISFIC_RXFLUSH (1  7)
+#define S3C2412_IISFIC_TXCOUNT(x)  (((x)   8)  0xf)
+#define S3C2412_IISFIC_RXCOUNT(x)  (((x)   0)  0xf)
+
+
+
+#endif /* __ASM_ARCH_REGS_S3C2412_IIS_H */
+
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4727/1: S3C2412: Remove unused GPESLPCON

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0953612a479491b57db794580b13a8e39b810724
Commit: 0953612a479491b57db794580b13a8e39b810724
Parent: b708d7bf18fd90105b8099cc558d66477dafd8ea
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:37 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4727/1: S3C2412: Remove unused GPESLPCON

S3C2412_GPESLPCON does not exist in the register
mappings, so remove it.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/pm.c   |1 -
 include/asm-arm/arch-s3c2410/regs-gpio.h |1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c
index 8988dac..974ffb1 100644
--- a/arch/arm/mach-s3c2412/pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -88,7 +88,6 @@ static struct sleep_save s3c2412_sleep[] = {
SAVE_ITEM(S3C2412_GPBSLPCON),
SAVE_ITEM(S3C2412_GPCSLPCON),
SAVE_ITEM(S3C2412_GPDSLPCON),
-   SAVE_ITEM(S3C2412_GPESLPCON),
SAVE_ITEM(S3C2412_GPFSLPCON),
SAVE_ITEM(S3C2412_GPGSLPCON),
SAVE_ITEM(S3C2412_GPHSLPCON),
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h 
b/include/asm-arm/arch-s3c2410/regs-gpio.h
index b693158..1f089fb 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpio.h
@@ -1133,7 +1133,6 @@
 #define S3C2412_GPBSLPCON  S3C2410_GPIOREG(0x1C)
 #define S3C2412_GPCSLPCON  S3C2410_GPIOREG(0x2C)
 #define S3C2412_GPDSLPCON  S3C2410_GPIOREG(0x3C)
-#define S3C2412_GPESLPCON  S3C2410_GPIOREG(0x4C)
 #define S3C2412_GPFSLPCON  S3C2410_GPIOREG(0x5C)
 #define S3C2412_GPGSLPCON  S3C2410_GPIOREG(0x6C)
 #define S3C2412_GPHSLPCON  S3C2410_GPIOREG(0x7C)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4728/1: BAST: Do not add IIS device on initialisation

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b6a175a562a1c8d326de0ee501114a2af2602772
Commit: b6a175a562a1c8d326de0ee501114a2af2602772
Parent: 0953612a479491b57db794580b13a8e39b810724
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 23 03:09:35 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:49 2008 +

[ARM] 4728/1: BAST: Do not add IIS device on initialisation

The IIS device is being registered by the Simtec Audio
driver, and thus registering here causes an error due
to device tree naming collision.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/mach-bast.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2410/mach-bast.c 
b/arch/arm/mach-s3c2410/mach-bast.c
index 53c2a13..6617547 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -540,7 +540,6 @@ static struct platform_device *bast_devices[] __initdata = {
s3c_device_lcd,
s3c_device_wdt,
s3c_device_i2c,
-   s3c_device_iis,
s3c_device_rtc,
s3c_device_nand,
bast_device_nor,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4777/1: S3C24XX: Ensure clk_set_rate() checks the set_rate method for the clk

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57c1b0f8dbfffaa00a242b171429e56489caef15
Commit: 57c1b0f8dbfffaa00a242b171429e56489caef15
Parent: f7275dac55008f8296cfb89a01b1e71918ac7995
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:17 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4777/1: S3C24XX: Ensure clk_set_rate() checks the set_rate method for 
the clk

Add checks for clk_set_rate() and ensure that we do not allow set_rate
to be called for a clock that does not have it defined. Add default
methods for fclk, hclk, pclk and mpll.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/clock.c |   19 +++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c
index 79cda0f..99a4474 100644
--- a/arch/arm/plat-s3c24xx/clock.c
+++ b/arch/arm/plat-s3c24xx/clock.c
@@ -172,6 +172,15 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
if (IS_ERR(clk))
return -EINVAL;
 
+   /* We do not default just do a clk-rate = rate as
+* the clock may have been made this way by choice.
+*/
+
+   WARN_ON(clk-set_rate == NULL);
+
+   if (clk-set_rate == NULL)
+   return -EINVAL;
+
mutex_lock(clocks_mutex);
ret = (clk-set_rate)(clk, rate);
mutex_unlock(clocks_mutex);
@@ -213,6 +222,12 @@ EXPORT_SYMBOL(clk_set_parent);
 
 /* base clocks */
 
+static int clk_default_setrate(struct clk *clk, unsigned long rate)
+{
+   clk-rate = rate;
+   return 0;
+}
+
 struct clk clk_xtal = {
.name   = xtal,
.id = -1,
@@ -224,6 +239,7 @@ struct clk clk_xtal = {
 struct clk clk_mpll = {
.name   = mpll,
.id = -1,
+   .set_rate   = clk_default_setrate,
 };
 
 struct clk clk_upll = {
@@ -239,6 +255,7 @@ struct clk clk_f = {
.rate   = 0,
.parent = clk_mpll,
.ctrlbit= 0,
+   .set_rate   = clk_default_setrate,
 };
 
 struct clk clk_h = {
@@ -247,6 +264,7 @@ struct clk clk_h = {
.rate   = 0,
.parent = NULL,
.ctrlbit= 0,
+   .set_rate   = clk_default_setrate,
 };
 
 struct clk clk_p = {
@@ -255,6 +273,7 @@ struct clk clk_p = {
.rate   = 0,
.parent = NULL,
.ctrlbit= 0,
+   .set_rate   = clk_default_setrate,
 };
 
 struct clk clk_usb_bus = {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4779/1: S3C2412: Add s3c2412_gpio_set_sleepcfg() call

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=67d729adc0e76e21c82a2c59853f25f5f784ca79
Commit: 67d729adc0e76e21c82a2c59853f25f5f784ca79
Parent: bdbea34ddd2e52dc73f03e7ef7197d4c0da400d6
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:19 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4779/1: S3C2412: Add s3c2412_gpio_set_sleepcfg() call

Add s3c2412_gpio_set_sleepcfg() to allow the setting of the sleep
configuration of the GPIO blocks.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/Makefile   |1 +
 arch/arm/mach-s3c2412/gpio.c |   60 ++
 include/asm-arm/arch-s3c2410/hardware.h  |5 ++
 include/asm-arm/arch-s3c2410/regs-gpio.h |5 ++
 4 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile
index 7b782c7..267f334 100644
--- a/arch/arm/mach-s3c2412/Makefile
+++ b/arch/arm/mach-s3c2412/Makefile
@@ -12,6 +12,7 @@ obj-  :=
 obj-$(CONFIG_CPU_S3C2412)  += s3c2412.o
 obj-$(CONFIG_CPU_S3C2412)  += irq.o
 obj-$(CONFIG_CPU_S3C2412)  += clock.o
+obj-$(CONFIG_CPU_S3C2412)  += gpio.o
 obj-$(CONFIG_S3C2412_DMA)  += dma.o
 obj-$(CONFIG_S3C2412_PM)   += pm.o sleep.o
 
diff --git a/arch/arm/mach-s3c2412/gpio.c b/arch/arm/mach-s3c2412/gpio.c
new file mode 100644
index 000..8e55c3a
--- /dev/null
+++ b/arch/arm/mach-s3c2412/gpio.c
@@ -0,0 +1,60 @@
+/* linux/arch/arm/mach-s3c2412/gpio.c
+ *
+ * Copyright (c) 2007 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
+ *
+ * http://armlinux.simtec.co.uk/.
+ *
+ * S3C2412/S3C2413 specific GPIO support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include linux/kernel.h
+#include linux/types.h
+#include linux/module.h
+#include linux/interrupt.h
+
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include asm/arch/regs-gpio.h
+
+#include asm/hardware.h
+
+int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state)
+{
+   void __iomem *base = S3C24XX_GPIO_BASE(pin);
+   unsigned long offs = S3C2410_GPIO_OFFSET(pin);
+   unsigned long flags;
+   unsigned long slpcon;
+
+   offs *= 2;
+
+   if (pin  S3C2410_GPIO_BANKB)
+   return -EINVAL;
+
+   if (pin = S3C2410_GPIO_BANKF 
+   pin = S3C2410_GPIO_BANKG)
+   return -EINVAL;
+
+   if (pin  (S3C2410_GPIO_BANKH + 32))
+   return -EINVAL;
+
+   local_irq_save(flags);
+
+   slpcon = __raw_readl(base + 0x0C);
+
+   slpcon = ~(3  offs);
+   slpcon |= state  offs;
+
+   __raw_writel(slpcon, base + 0x0C);
+
+   local_irq_restore(flags);
+
+   return 0;
+}
+
+EXPORT_SYMBOL(s3c2412_gpio_set_sleepcfg);
diff --git a/include/asm-arm/arch-s3c2410/hardware.h 
b/include/asm-arm/arch-s3c2410/hardware.h
index 6dadf58..faeaba5 100644
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ b/include/asm-arm/arch-s3c2410/hardware.h
@@ -99,6 +99,11 @@ extern int s3c2440_set_dsc(unsigned int pin, unsigned int 
value);
 
 #endif /* CONFIG_CPU_S3C2440 */
 
+#ifdef CONFIG_CPU_S3C2412
+
+extern int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state);
+
+#endif /* CONFIG_CPU_S3C2412 */
 
 #endif /* __ASSEMBLY__ */
 
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h 
b/include/asm-arm/arch-s3c2410/regs-gpio.h
index 1f089fb..0ad75d7 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpio.h
@@ -1138,6 +1138,11 @@
 #define S3C2412_GPHSLPCON  S3C2410_GPIOREG(0x7C)
 
 /* definitions for each pin bit */
+#define S3C2412_GPIO_SLPCON_LOW ( 0x00 )
+#define S3C2412_GPIO_SLPCON_HIGH ( 0x01 )
+#define S3C2412_GPIO_SLPCON_IN   ( 0x02 )
+#define S3C2412_GPIO_SLPCON_PULL ( 0x03 )
+
 #define S3C2412_SLPCON_LOW(x)  ( 0x00  ((x) * 2))
 #define S3C2412_SLPCON_HIGH(x) ( 0x01  ((x) * 2))
 #define S3C2412_SLPCON_IN(x)   ( 0x02  ((x) * 2))
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4780/1: S3C2412: Allow for seperate DMA channels for TX and RX

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c6709e8ef5752314c22c75bc7575f9be390e215b
Commit: c6709e8ef5752314c22c75bc7575f9be390e215b
Parent: 67d729adc0e76e21c82a2c59853f25f5f784ca79
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:20 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:50 2008 +

[ARM] 4780/1: S3C2412: Allow for seperate DMA channels for TX and RX

The current S3C24XX DMA code does not allow for an peripheral
that has one channel for RX and another for TX.

This patch adds a per-cpu dma operation to select the transmit
or receive channel, and adds support to the S3C2412 for the
seperate DMA channels for TX and RX.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/dma.c|   39 ++-
 arch/arm/plat-s3c24xx/dma.c|   16 +++---
 include/asm-arm/plat-s3c24xx/dma.h |5 
 3 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c
index c9cd514..1dd8649 100644
--- a/arch/arm/mach-s3c2412/dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -40,106 +40,141 @@ static struct s3c24xx_dma_map __initdata 
s3c2412_dma_mappings[] = {
[DMACH_XD0] = {
.name   = xdreq0,
.channels   = MAP(S3C2412_DMAREQSEL_XDREQ0),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_XDREQ0),
},
[DMACH_XD1] = {
.name   = xdreq1,
.channels   = MAP(S3C2412_DMAREQSEL_XDREQ1),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_XDREQ1),
},
[DMACH_SDI] = {
.name   = sdi,
.channels   = MAP(S3C2412_DMAREQSEL_SDI),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_SDI),
.hw_addr.to = S3C2410_PA_SDI + S3C2410_SDIDATA,
.hw_addr.from   = S3C2410_PA_SDI + S3C2410_SDIDATA,
},
[DMACH_SPI0] = {
.name   = spi0,
.channels   = MAP(S3C2412_DMAREQSEL_SPI0TX),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_SPI0RX),
.hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT,
.hw_addr.from   = S3C2410_PA_SPI + S3C2410_SPRDAT,
},
[DMACH_SPI1] = {
.name   = spi1,
.channels   = MAP(S3C2412_DMAREQSEL_SPI1TX),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_SPI1RX),
.hw_addr.to = S3C2410_PA_SPI + S3C2412_SPI1 + 
S3C2410_SPTDAT,
.hw_addr.from   = S3C2410_PA_SPI + S3C2412_SPI1  + 
S3C2410_SPRDAT,
},
[DMACH_UART0] = {
.name   = uart0,
.channels   = MAP(S3C2412_DMAREQSEL_UART0_0),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_UART0_0),
.hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH,
.hw_addr.from   = S3C2410_PA_UART0 + S3C2410_URXH,
},
[DMACH_UART1] = {
.name   = uart1,
.channels   = MAP(S3C2412_DMAREQSEL_UART1_0),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_UART1_0),
.hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH,
.hw_addr.from   = S3C2410_PA_UART1 + S3C2410_URXH,
},
[DMACH_UART2] = {
.name   = uart2,
.channels   = MAP(S3C2412_DMAREQSEL_UART2_0),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_UART2_0),
.hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH,
.hw_addr.from   = S3C2410_PA_UART2 + S3C2410_URXH,
},
[DMACH_UART0_SRC2] = {
.name   = uart0,
.channels   = MAP(S3C2412_DMAREQSEL_UART0_1),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_UART0_1),
.hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH,
.hw_addr.from   = S3C2410_PA_UART0 + S3C2410_URXH,
},
[DMACH_UART1_SRC2] = {
.name   = uart1,
.channels   = MAP(S3C2412_DMAREQSEL_UART1_1),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_UART1_1),
.hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH,
.hw_addr.from   = S3C2410_PA_UART1 + S3C2410_URXH,
},
[DMACH_UART2_SRC2] = {
.name   = uart2,
.channels   = MAP(S3C2412_DMAREQSEL_UART2_1),
+   .channels_rx= MAP(S3C2412_DMAREQSEL_UART2_1),
.hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH,
.hw_addr.from   = S3C2410_PA_UART2 + S3C2410_URXH,
},
[DMACH_TIMER] = {
.name   = timer,
  

[ARM] 4781/1: S3C24XX: DMA suspend and resume support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c58f7a1d36709e50398c05df9419386befef2c59
Commit: c58f7a1d36709e50398c05df9419386befef2c59
Parent: c6709e8ef5752314c22c75bc7575f9be390e215b
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:21 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4781/1: S3C24XX: DMA suspend and resume support

If an DMA channel was active at suspend, then ensure that
it is correctly reconfigured when the system resumes.

Note, the previous policy was for each driver to handle their
own reconfiguration on resume. The policy has been changed to
make the individual driver's job easier.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/dma.c|   26 +-
 include/asm-arm/arch-s3c2410/dma.h |1 +
 2 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 10ef399..68ce89d 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1173,6 +1173,7 @@ int s3c2410_dma_devconfig(int channel,
 
chan-source = source;
chan-dev_addr = devaddr;
+   chan-hw_cfg = hwcfg;
 
switch (source) {
case S3C2410_DMASRC_HW:
@@ -1235,6 +1236,10 @@ int s3c2410_dma_getposition(dmach_t channel, dma_addr_t 
*src, dma_addr_t *dst)
 
 EXPORT_SYMBOL(s3c2410_dma_getposition);
 
+static struct s3c2410_dma_chan *to_dma_chan(struct sys_device *dev)
+{
+   return container_of(dev, struct s3c2410_dma_chan, dev);
+}
 
 /* system device class */
 
@@ -1242,7 +1247,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
 
 static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
 {
-   struct s3c2410_dma_chan *cp = container_of(dev, struct 
s3c2410_dma_chan, dev);
+   struct s3c2410_dma_chan *cp = to_dma_chan(dev);
 
printk(KERN_DEBUG suspending dma channel %d\n, cp-number);
 
@@ -1264,6 +1269,24 @@ static int s3c2410_dma_suspend(struct sys_device *dev, 
pm_message_t state)
 
 static int s3c2410_dma_resume(struct sys_device *dev)
 {
+   struct s3c2410_dma_chan *cp = to_dma_chan(dev);
+   unsigned int no = cp-number | DMACH_LOW_LEVEL;
+
+   /* restore channel's hardware configuration */
+
+   if (!cp-in_use)
+   return 0;
+
+   printk(KERN_INFO dma%d: restoring configuration\n, cp-number);
+
+   s3c2410_dma_config(no, cp-xfer_unit, cp-dcon);
+   s3c2410_dma_devconfig(no, cp-source, cp-hw_cfg, cp-dev_addr);
+
+   /* re-select the dma source for this channel */
+
+   if (cp-map != NULL)
+   dma_sel.select(cp, cp-map);
+
return 0;
 }
 
@@ -1453,6 +1476,7 @@ static struct s3c2410_dma_chan 
*s3c2410_dma_map_channel(int channel)
 
  found:
dmach = s3c2410_chans[ch];
+   dmach-map = ch_map;
dma_chan_map[channel] = dmach;
 
/* select the channel */
diff --git a/include/asm-arm/arch-s3c2410/dma.h 
b/include/asm-arm/arch-s3c2410/dma.h
index c6e8d8f..4f291d9 100644
--- a/include/asm-arm/arch-s3c2410/dma.h
+++ b/include/asm-arm/arch-s3c2410/dma.h
@@ -214,6 +214,7 @@ struct s3c2410_dma_chan {
unsigned longdev_addr;
unsigned longload_timeout;
unsigned int flags; /* channel flags */
+   unsigned int hw_cfg;/* last hw config */
 
struct s3c24xx_dma_map  *map;   /* channel hw maps */
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4787/1: S3C24XX: s3c2410_dma_request() should return the allocated channel number

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a07c438faf952643f79983fb16a10f111c9df0df
Commit: a07c438faf952643f79983fb16a10f111c9df0df
Parent: db9b85c527a397e4cb75956ae69acea92904f6dc
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:27 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:51 2008 +

[ARM] 4787/1: S3C24XX: s3c2410_dma_request() should return the allocated 
channel number

The s3c2410_dma_request() function should return the channel allocated
instead of zero for success.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/plat-s3c24xx/dma.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 68ce89d..9785983 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -787,7 +787,7 @@ int s3c2410_dma_request(unsigned int channel,
 
pr_debug(%s: channel initialised, %p\n, __FUNCTION__, chan);
 
-   return 0;
+   return chan-number | DMACH_LOW_LEVEL;
 }
 
 EXPORT_SYMBOL(s3c2410_dma_request);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4790/1: S3C2412: Fix parent selection for msysclk.

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cca851d7b4d87f3a644d3381930dc737890bd9ac
Commit: cca851d7b4d87f3a644d3381930dc737890bd9ac
Parent: e95f52cd3b664eaa9c2b2b123f2a339ae0f1a92b
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:30 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4790/1: S3C2412: Fix parent selection for msysclk.

The msysclk clock was checking for the wrong PLL for the
parent in s3c2412_setparent_msysclk(), trying the UPLL instead
of the MPLL output.

Also ensure the mpll and fclks are at the same rate at init time.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2412/clock.c   |2 +-
 arch/arm/mach-s3c2412/s3c2412.c |2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index 42ccb5e..0f75250 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -217,7 +217,7 @@ static int s3c2412_setparent_msysclk(struct clk *clk, 
struct clk *parent)
 
if (parent == clk_mdivclk)
clksrc = ~S3C2412_CLKSRC_MSYSCLK_MPLL;
-   else if (parent == clk_upll)
+   else if (parent == clk_mpll)
clksrc |= S3C2412_CLKSRC_MSYSCLK_MPLL;
else
return -EINVAL;
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index 265cd3f..abf1599 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -168,6 +168,8 @@ void __init s3c2412_init_clocks(int xtal)
 
fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2);
 
+   clk_mpll.rate = fclk;
+
tmp = __raw_readl(S3C2410_CLKDIVN);
 
/* work out clock scalings */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4792/1: S3C24XX: Remove warnings from debug-macro.S

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b8c0088404778a1291191cf140bcfea082f027c
Commit: 9b8c0088404778a1291191cf140bcfea082f027c
Parent: ddd870bdb722280bd5af1682d82557d1787ac90c
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Mon Jan 28 13:01:32 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Jan 28 13:20:52 2008 +

[ARM] 4792/1: S3C24XX: Remove warnings from debug-macro.S

Remove warnings left in include/asm-arm/arch-s3c2410/debug-macro.S
whilst these where being experimented with.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/debug-macro.S |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S 
b/include/asm-arm/arch-s3c2410/debug-macro.S
index 9c8cd9a..89076c3 100644
--- a/include/asm-arm/arch-s3c2410/debug-macro.S
+++ b/include/asm-arm/arch-s3c2410/debug-macro.S
@@ -92,11 +92,9 @@
 #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY)
 #define fifo_full  fifo_full_s3c2410
 #define fifo_level fifo_level_s3c2410
-#warning 2410only
 #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY)
 #define fifo_full  fifo_full_s3c24xx
 #define fifo_level fifo_level_s3c24xx
-#warning generic
 #endif
 
 /* include the reset of the code which will do the work */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4582/2: Add support for the common VFP subarchitecture

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c98929c07a01c9ec2e1e5253456acc7168da8b66
Commit: c98929c07a01c9ec2e1e5253456acc7168da8b66
Parent: 9b73e76f3cf63379dcf45fcd4f112f5812418d0a
Author: Catalin Marinas [EMAIL PROTECTED]
AuthorDate: Thu Nov 22 18:32:01 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 14:41:28 2008 +

[ARM] 4582/2: Add support for the common VFP subarchitecture

This patch allows the VFP support code to run correctly on CPUs
compatible with the common VFP subarchitecture specification (Appendix
B in the ARM ARM v7-A and v7-R edition). It implements support for VFP
subarchitecture 2 while being backwards compatible with
subarchitecture 1.

On VFP subarchitecture 1, the arithmetic exceptions are asynchronous
(or imprecise as described in the old ARM ARM) unless the FPSCR.IXE
bit is 1. The exceptional instructions can be read from FPINST and
FPINST2 registers. With VFP subarchitecture 2, the arithmetic
exceptions can also be synchronous and marked by the FPEXC.DEX bit
(the FPEXC.EX bit is cleared). CPUs implementing the synchronous
arithmetic exceptions don't have the FPINST and FPINST2 registers and
accessing them would trigger and undefined exception.

Note that FPEXC.EX bit has an additional meaning on subarchitecture 1
- if it isn't set, there is no additional information in FPINST and
FPINST2 that needs to be saved at context switch or when lazy-loading
the VFP state of a different thread.

The patch also removes the clearing of the cumulative exception flags in
FPSCR when additional exceptions were raised. It is up to the user
application to clear these bits.

Signed-off-by: Catalin Marinas [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/vfp/vfphw.S |   38 +-
 arch/arm/vfp/vfpmodule.c |   98 ++
 include/asm-arm/vfp.h|   30 +++---
 3 files changed, 89 insertions(+), 77 deletions(-)

diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index 0ac022f..53d9f8e 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -100,10 +100,10 @@ vfp_support_entry:
cmp r4, #0
beq no_old_VFP_process
VFPFMRX r5, FPSCR   @ current status
-   VFPFMRX r6, FPINST  @ FPINST (always there, rev0 onwards)
-   tst r1, #FPEXC_FPV2 @ is there an FPINST2 to read?
-   VFPFMRX r8, FPINST2, NE @ FPINST2 if needed - avoids reading
-   @ nonexistant reg on rev0
+   tst r1, #FPEXC_EX   @ is there additional state to save?
+   VFPFMRX r6, FPINST, NE  @ FPINST (only if FPEXC.EX is set)
+   tstne   r1, #FPEXC_FP2V @ is there an FPINST2 to read?
+   VFPFMRX r8, FPINST2, NE @ FPINST2 if needed (and present)
VFPFSTMIA r4@ save the working registers
stmia   r4, {r1, r5, r6, r8}@ save FPEXC, FPSCR, FPINST, FPINST2
@ and point r4 at the word at the
@@ -117,10 +117,10 @@ no_old_VFP_process:
VFPFLDMIA r10   @ reload the working registers while
@ FPEXC is in a safe state
ldmia   r10, {r1, r5, r6, r8}   @ load FPEXC, FPSCR, FPINST, FPINST2
-   tst r1, #FPEXC_FPV2 @ is there an FPINST2 to write?
-   VFPFMXR FPINST2, r8, NE @ FPINST2 if needed - avoids writing
-   @ nonexistant reg on rev0
-   VFPFMXR FPINST, r6
+   tst r1, #FPEXC_EX   @ is there additional state to restore?
+   VFPFMXR FPINST, r6, NE  @ restore FPINST (only if FPEXC.EX is 
set)
+   tstne   r1, #FPEXC_FP2V @ is there an FPINST2 to write?
+   VFPFMXR FPINST2, r8, NE @ FPINST2 if needed (and present)
VFPFMXR FPSCR, r5   @ restore status
 
 check_for_exception:
@@ -136,10 +136,14 @@ check_for_exception:
 
 
 look_for_VFP_exceptions:
-   tst r1, #FPEXC_EX
+   @ Check for synchronous or asynchronous exception
+   tst r1, #FPEXC_EX | FPEXC_DEX
bne process_exception
+   @ On some implementations of the VFP subarch 1, setting FPSCR.IXE
+   @ causes all the CDP instructions to be bounced synchronously without
+   @ setting the FPEXC.EX bit
VFPFMRX r5, FPSCR
-   tst r5, #FPSCR_IXE  @ IXE doesn't set FPEXC_EX !
+   tst r5, #FPSCR_IXE
bne process_exception
 
@ Fall into hand on to next handler - appropriate coproc instr
@@ -150,10 +154,6 @@ look_for_VFP_exceptions:
 
 process_exception:
DBGSTR  bounce
-   sub r2, r2, #4
-   str r2, [sp, #S_PC] @ retry the instruction on exit 

[ARM] Feroceon: support old cores with ARM926 ID

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d910a0aa21c9c6e824744d0139bbe6a9ae676e2d
Commit: d910a0aa21c9c6e824744d0139bbe6a9ae676e2d
Parent: 3ebb5a2b44b02bddd5fbf0f29d71f1df6146c2c3
Author: Tzachi Perelstein [EMAIL PROTECTED]
AuthorDate: Tue Nov 6 10:35:40 2007 +0200
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:03:41 2008 +

[ARM] Feroceon: support old cores with ARM926 ID

This enables the usage of some old Feroceon cores
for which the CPU ID is equal to the ARM926 ID.
Relevant for Feroceon-1850 and old Feroceon-2850.

Signed-off-by: Tzachi Perelstein [EMAIL PROTECTED]
Signed-off-by: Nicolas Pitre [EMAIL PROTECTED]
Acked-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mm/Kconfig |9 +
 arch/arm/mm/proc-feroceon.S |   27 +++
 2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 378fb74..9cdc74f 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -354,6 +354,15 @@ config CPU_FEROCEON
select CPU_COPY_V4WB if MMU
select CPU_TLB_V4WBI if MMU
 
+config CPU_FEROCEON_OLD_ID
+   bool Accept early Feroceon cores with an ARM926 ID
+   depends on CPU_FEROCEON  !CPU_ARM926T
+   default y
+   help
+ This enables the usage of some old Feroceon cores
+ for which the CPU ID is equal to the ARM926 ID.
+ Relevant for Feroceon-1850 and early Feroceon-2850.
+
 # ARMv6
 config CPU_V6
bool Support ARM V6 processor
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
index 8ad341a..fa0dc7e 100644
--- a/arch/arm/mm/proc-feroceon.S
+++ b/arch/arm/mm/proc-feroceon.S
@@ -453,6 +453,33 @@ cpu_feroceon_name:
 
.section .proc.info.init, #alloc, #execinstr
 
+#ifdef CONFIG_CPU_FEROCEON_OLD_ID
+   .type   __feroceon_old_id_proc_info,#object
+__feroceon_old_id_proc_info:
+   .long   0x41069260
+   .long   0xfff0
+   .long   PMD_TYPE_SECT | \
+   PMD_SECT_BUFFERABLE | \
+   PMD_SECT_CACHEABLE | \
+   PMD_BIT4 | \
+   PMD_SECT_AP_WRITE | \
+   PMD_SECT_AP_READ
+   .long   PMD_TYPE_SECT | \
+   PMD_BIT4 | \
+   PMD_SECT_AP_WRITE | \
+   PMD_SECT_AP_READ
+   b   __feroceon_setup
+   .long   cpu_arch_name
+   .long   cpu_elf_name
+   .long   HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
+   .long   cpu_feroceon_name
+   .long   feroceon_processor_functions
+   .long   v4wbi_tlb_fns
+   .long   v4wb_user_fns
+   .long   feroceon_cache_fns
+   .size   __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info
+#endif
+
.type   __feroceon_proc_info,#object
 __feroceon_proc_info:
.long   0x56055310
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Orion: platform device registration for UART, USB and NAND

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ca26f7d3ed3c841e561613a9ea2f44ca899e27de
Commit: ca26f7d3ed3c841e561613a9ea2f44ca899e27de
Parent: 51cbff1d6f1946f97b847f9a144737eca20ede84
Author: Tzachi Perelstein [EMAIL PROTECTED]
AuthorDate: Tue Oct 23 15:14:42 2007 -0400
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:03:50 2008 +

[ARM] Orion: platform device registration for UART, USB and NAND

Signed-off-by: Tzachi Perelstein [EMAIL PROTECTED]
Reviewed-by: Nicolas Pitre [EMAIL PROTECTED]
Reviewed-by: Lennert Buytenhek [EMAIL PROTECTED]
Acked-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-orion/common.c  |  123 +
 include/asm-arm/arch-orion/platform.h |   25 +++
 2 files changed, 148 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
index 69363cb..ab1000e 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -12,6 +12,8 @@
 
 #include linux/kernel.h
 #include linux/init.h
+#include linux/platform_device.h
+#include linux/serial_8250.h
 #include asm/page.h
 #include asm/timex.h
 #include asm/mach/map.h
@@ -54,6 +56,119 @@ void __init orion_map_io(void)
 }
 
 /*
+ * UART
+ /
+
+static struct resource orion_uart_resources[] = {
+   {
+   .start  = UART0_BASE,
+   .end= UART0_BASE + 0xff,
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = IRQ_ORION_UART0,
+   .end= IRQ_ORION_UART0,
+   .flags  = IORESOURCE_IRQ,
+   },
+   {
+   .start  = UART1_BASE,
+   .end= UART1_BASE + 0xff,
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = IRQ_ORION_UART1,
+   .end= IRQ_ORION_UART1,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct plat_serial8250_port orion_uart_data[] = {
+   {
+   .mapbase= UART0_BASE,
+   .membase= (char *)UART0_BASE,
+   .irq= IRQ_ORION_UART0,
+   .flags  = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
+   .iotype = UPIO_MEM,
+   .regshift   = 2,
+   .uartclk= ORION_TCLK,
+   },
+   {
+   .mapbase= UART1_BASE,
+   .membase= (char *)UART1_BASE,
+   .irq= IRQ_ORION_UART1,
+   .flags  = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
+   .iotype = UPIO_MEM,
+   .regshift   = 2,
+   .uartclk= ORION_TCLK,
+   },
+   { },
+};
+
+static struct platform_device orion_uart = {
+   .name   = serial8250,
+   .id = PLAT8250_DEV_PLATFORM,
+   .dev= {
+   .platform_data  = orion_uart_data,
+   },
+   .resource   = orion_uart_resources,
+   .num_resources  = ARRAY_SIZE(orion_uart_resources),
+};
+
+/***
+ * USB Controller - 2 interfaces
+ 
**/
+
+static struct resource orion_ehci0_resources[] = {
+   {
+   .start  = ORION_USB0_REG_BASE,
+   .end= ORION_USB0_REG_BASE + SZ_4K,
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = IRQ_ORION_USB0_CTRL,
+   .end= IRQ_ORION_USB0_CTRL,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct resource orion_ehci1_resources[] = {
+   {
+   .start  = ORION_USB1_REG_BASE,
+   .end= ORION_USB1_REG_BASE + SZ_4K,
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = IRQ_ORION_USB1_CTRL,
+   .end= IRQ_ORION_USB1_CTRL,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static u64 ehci_dmamask = 0xUL;
+
+static struct platform_device orion_ehci0 = {
+   .name   = orion-ehci,
+   .id = 0,
+   .dev= {
+   .dma_mask   = ehci_dmamask,
+   .coherent_dma_mask  = 0x,
+   },
+   .resource   = orion_ehci0_resources,
+   .num_resources  = ARRAY_SIZE(orion_ehci0_resources),
+};
+
+static struct platform_device orion_ehci1 = {
+   .name   = orion-ehci,
+   .id = 1,
+   .dev= {
+   .dma_mask   = ehci_dmamask,

[ARM] Orion: common platform setup for Gigabit Ethernet port

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e07c9d85726e57914608a4e66a5dbb35863cd8fb
Commit: e07c9d85726e57914608a4e66a5dbb35863cd8fb
Parent: ca26f7d3ed3c841e561613a9ea2f44ca899e27de
Author: Tzachi Perelstein [EMAIL PROTECTED]
AuthorDate: Wed Oct 31 12:42:41 2007 +0200
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:03:51 2008 +

[ARM] Orion: common platform setup for Gigabit Ethernet port

The Orion Ethernet port is the same port used in the Discovery
family (MV643XX). This patch include the common platform_device
stuff according to the existing mv643xx_eth conventions.

Signed-off-by: Tzachi Perelstein [EMAIL PROTECTED]
Reviewed-by: Lennert Buytenhek [EMAIL PROTECTED]
Acked-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-orion/common.c |   44 ++
 arch/arm/mach-orion/common.h |8 +++
 2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
index ab1000e..12736fd 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -14,6 +14,7 @@
 #include linux/init.h
 #include linux/platform_device.h
 #include linux/serial_8250.h
+#include linux/mv643xx_eth.h
 #include asm/page.h
 #include asm/timex.h
 #include asm/mach/map.h
@@ -169,6 +170,49 @@ static struct platform_device orion_ehci1 = {
 };
 
 /*
+ * Gigabit Ethernet port
+ * (The Orion and Discovery (MV643xx) families use the same Ethernet driver)
+ /
+
+static struct resource orion_eth_shared_resources[] = {
+   {
+   .start  = ORION_ETH_REG_BASE,
+   .end= ORION_ETH_REG_BASE + 0x,
+   .flags  = IORESOURCE_MEM,
+   },
+};
+
+static struct platform_device orion_eth_shared = {
+   .name   = MV643XX_ETH_SHARED_NAME,
+   .id = 0,
+   .num_resources  = 1,
+   .resource   = orion_eth_shared_resources,
+};
+
+static struct resource orion_eth_resources[] = {
+   {
+   .name   = eth irq,
+   .start  = IRQ_ORION_ETH_SUM,
+   .end= IRQ_ORION_ETH_SUM,
+   .flags  = IORESOURCE_IRQ,
+   }
+};
+
+static struct platform_device orion_eth = {
+   .name   = MV643XX_ETH_NAME,
+   .id = 0,
+   .num_resources  = 1,
+   .resource   = orion_eth_resources,
+};
+
+void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data)
+{
+   orion_eth.dev.platform_data = eth_data;
+   platform_device_register(orion_eth_shared);
+   platform_device_register(orion_eth);
+}
+
+/*
  * General
  /
 
diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h
index 2b452fa..06c10c0 100644
--- a/arch/arm/mach-orion/common.h
+++ b/arch/arm/mach-orion/common.h
@@ -67,4 +67,12 @@ void gpio_display(void); /* debug */
  */
 extern struct sys_timer orion_timer;
 
+/*
+ * Pull in Orion Ethernet platform_data, used by machine-setup
+ */
+
+struct mv643xx_eth_platform_data;
+
+void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data);
+
 #endif /* __ARCH_ORION_COMMON_H__ */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Orion: add support for Orion/MV88F5181 based D-Link DNS-323

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=555a36561be191eb01658a5229aa11b4e4a8a7f0
Commit: 555a36561be191eb01658a5229aa11b4e4a8a7f0
Parent: c9e3de941a1694aeab60a10bd39eb710c975010d
Author: Herbert Valerio Riedel [EMAIL PROTECTED]
AuthorDate: Mon Nov 12 09:05:55 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:03:56 2008 +

[ARM] Orion: add support for Orion/MV88F5181 based D-Link DNS-323

With this patch USB, SATA (via sata_mv), Ethernet, RTC, LEDs and NOR Flash
work.

Signed-off-by: Herbert Valerio Riedel [EMAIL PROTECTED]
Acked-by: Tzachi Perelstein [EMAIL PROTECTED]
Acked-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-orion/Kconfig|7 +
 arch/arm/mach-orion/Makefile   |1 +
 arch/arm/mach-orion/dns323-setup.c |  322 
 3 files changed, 330 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-orion/Kconfig b/arch/arm/mach-orion/Kconfig
index dc92951..bdaed86 100644
--- a/arch/arm/mach-orion/Kconfig
+++ b/arch/arm/mach-orion/Kconfig
@@ -23,6 +23,13 @@ config MACH_KUROBOX_PRO
  Say 'Y' here if you want your kernel to support the
  KuroBox Pro platform.
 
+config MACH_DNS323
+   bool D-Link DNS-323
+   select I2C_BOARDINFO
+   help
+ Say 'Y' here if you want your kernel to support the
+ D-Link DNS-323 platform.
+
 endmenu
 
 endif
diff --git a/arch/arm/mach-orion/Makefile b/arch/arm/mach-orion/Makefile
index caf20ff..237ce98 100644
--- a/arch/arm/mach-orion/Makefile
+++ b/arch/arm/mach-orion/Makefile
@@ -2,3 +2,4 @@ obj-y   += common.o addr-map.o pci.o 
gpio.o irq.o time.o
 obj-$(CONFIG_MACH_DB88F5281)   += db88f5281-setup.o
 obj-$(CONFIG_MACH_RD88F5182)   += rd88f5182-setup.o
 obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
+obj-$(CONFIG_MACH_DNS323)  += dns323-setup.o
diff --git a/arch/arm/mach-orion/dns323-setup.c 
b/arch/arm/mach-orion/dns323-setup.c
new file mode 100644
index 000..c8a806f
--- /dev/null
+++ b/arch/arm/mach-orion/dns323-setup.c
@@ -0,0 +1,322 @@
+/*
+ * arch/arm/mach-orion/dns323-setup.c
+ *
+ * Copyright (C) 2007 Herbert Valerio Riedel [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/pci.h
+#include linux/irq.h
+#include linux/mtd/physmap.h
+#include linux/mv643xx_eth.h
+#include linux/leds.h
+#include linux/gpio_keys.h
+#include linux/input.h
+#include linux/i2c.h
+#include asm/mach-types.h
+#include asm/gpio.h
+#include asm/mach/arch.h
+#include asm/mach/pci.h
+#include asm/arch/orion.h
+#include asm/arch/platform.h
+#include common.h
+
+#define DNS323_GPIO_LED_RIGHT_AMBER1
+#define DNS323_GPIO_LED_LEFT_AMBER 2
+#define DNS323_GPIO_LED_POWER  5
+#define DNS323_GPIO_OVERTEMP   6
+#define DNS323_GPIO_RTC7
+#define DNS323_GPIO_POWER_OFF  8
+#define DNS323_GPIO_KEY_POWER  9
+#define DNS323_GPIO_KEY_RESET  10
+
+/
+ * PCI setup
+ */
+
+static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+   /* PCI-E */
+   if (dev-bus-number == orion_pcie_local_bus_nr())
+   return IRQ_ORION_PCIE0_INT;
+
+   pr_err(%s: requested mapping for unknown bus\n, __func__);
+
+   return -1;
+}
+
+static struct hw_pci dns323_pci __initdata = {
+   .nr_controllers = 1,
+   .swizzle= pci_std_swizzle,
+   .setup  = orion_pci_sys_setup,
+   .scan   = orion_pci_sys_scan_bus,
+   .map_irq= dns323_pci_map_irq,
+};
+
+static int __init dns323_pci_init(void)
+{
+   if (machine_is_dns323())
+   pci_common_init(dns323_pci);
+
+   return 0;
+}
+
+subsys_initcall(dns323_pci_init);
+
+/
+ * Ethernet
+ */
+
+static struct mv643xx_eth_platform_data dns323_eth_data = {
+   .phy_addr = 8,
+   .force_phy_addr = 1,
+};
+
+/
+ * 8MiB NOR flash (Spansion S29GL064M90TFIR4)
+ *
+ * Layout as used by D-Link:
+ *  0x-0x0001 : MTD1
+ *  0x0001-0x0002 : MTD2
+ *  0x0002-0x001a : Linux Kernel
+ *  0x001a-0x007d : File System
+ *  0x007d-0x0080 : u-boot
+ */
+
+#define DNS323_NOR_BOOT_BASE 0xf400
+#define DNS323_NOR_BOOT_SIZE SZ_8M
+
+static struct mtd_partition dns323_partitions[] = {
+   {
+   .name   = MTD1,
+   .size   = 

[I2C] Split mv643xx I2C platform support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a0832798c05241f15e793805b6024919c07b8292
Commit: a0832798c05241f15e793805b6024919c07b8292
Parent: 60ce1c20068ec2c138cdf9e5cbe583cc60883c62
Author: Tzachi Perelstein [EMAIL PROTECTED]
AuthorDate: Mon Nov 12 19:38:51 2007 +0200
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:03:59 2008 +

[I2C] Split mv643xx I2C platform support

The motivation for this change is to allow other chips, like the
Marvell Orion ARM SoC family, to use the existing i2c-mv64xxx driver.

Signed-off-by: Tzachi Perelstein [EMAIL PROTECTED]
Acked-by: Nicolas Pitre [EMAIL PROTECTED]
Acked-by: Dale Farnsworth [EMAIL PROTECTED]
Acked-by: Mark A. Greer [EMAIL PROTECTED]
Acked-by: Jean Delvare [EMAIL PROTECTED]
---
 drivers/i2c/busses/Kconfig   |2 +-
 drivers/i2c/busses/i2c-mv64xxx.c |   31 +--
 include/linux/mv643xx.h  |   10 +-
 include/linux/mv643xx_i2c.h  |   23 +++
 4 files changed, 42 insertions(+), 24 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index c466c6c..b148bf0 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -648,7 +648,7 @@ config I2C_PCA_ISA
 
 config I2C_MV64XXX
tristate Marvell mv64xxx I2C Controller
-   depends on MV64X60  EXPERIMENTAL
+   depends on (MV64X60 || ARCH_ORION)  EXPERIMENTAL
help
  If you say yes to this option, support will be included for the
  built-in I2C interface on the Marvell 64xxx line of host bridges.
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index bb7bf68..cdd1ef9 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -1,6 +1,6 @@
 /*
- * Driver for the i2c controller on the Marvell line of host bridges for MIPS
- * and PPC (e.g, gt642[46]0, mv643[46]0, mv644[46]0).
+ * Driver for the i2c controller on the Marvell line of host bridges
+ * (e.g, gt642[46]0, mv643[46]0, mv644[46]0, and Orion SoC family).
  *
  * Author: Mark A. Greer [EMAIL PROTECTED]
  *
@@ -14,7 +14,7 @@
 #include linux/spinlock.h
 #include linux/i2c.h
 #include linux/interrupt.h
-#include linux/mv643xx.h
+#include linux/mv643xx_i2c.h
 #include linux/platform_device.h
 
 #include asm/io.h
@@ -86,6 +86,7 @@ struct mv64xxx_i2c_data {
u32 cntl_bits;
void __iomem*reg_base;
u32 reg_base_p;
+   u32 reg_size;
u32 addr1;
u32 addr2;
u32 bytes_left;
@@ -463,17 +464,20 @@ static int __devinit
 mv64xxx_i2c_map_regs(struct platform_device *pd,
struct mv64xxx_i2c_data *drv_data)
 {
-   struct resource *r;
+   int size;
+   struct resource *r = platform_get_resource(pd, IORESOURCE_MEM, 0);
 
-   if ((r = platform_get_resource(pd, IORESOURCE_MEM, 0)) 
-   request_mem_region(r-start, MV64XXX_I2C_REG_BLOCK_SIZE,
-   drv_data-adapter.name)) {
+   if (!r)
+   return -ENODEV;
 
-   drv_data-reg_base = ioremap(r-start,
-   MV64XXX_I2C_REG_BLOCK_SIZE);
-   drv_data-reg_base_p = r-start;
-   } else
-   return -ENOMEM;
+   size = r-end - r-start + 1;
+
+   if (!request_mem_region(r-start, size, drv_data-adapter.name))
+   return -EBUSY;
+
+   drv_data-reg_base = ioremap(r-start, size);
+   drv_data-reg_base_p = r-start;
+   drv_data-reg_size = size;
 
return 0;
 }
@@ -483,8 +487,7 @@ mv64xxx_i2c_unmap_regs(struct mv64xxx_i2c_data *drv_data)
 {
if (drv_data-reg_base) {
iounmap(drv_data-reg_base);
-   release_mem_region(drv_data-reg_base_p,
-   MV64XXX_I2C_REG_BLOCK_SIZE);
+   release_mem_region(drv_data-reg_base_p, drv_data-reg_size);
}
 
drv_data-reg_base = NULL;
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h
index d2ae618..69327b7 100644
--- a/include/linux/mv643xx.h
+++ b/include/linux/mv643xx.h
@@ -15,6 +15,7 @@
 
 #include asm/types.h
 #include linux/mv643xx_eth.h
+#include linux/mv643xx_i2c.h
 
 //
 /* Processor Address Space  */
@@ -863,7 +864,6 @@
 /* I2C Registers*/
 //
 
-#define MV64XXX_I2C_CTLR_NAME  mv64xxx_i2c
 #define MV64XXX_I2C_OFFSET  0xc000
 #define MV64XXX_I2C_REG_BLOCK_SIZE  0x0020
 
@@ -968,14 +968,6 @@ struct mpsc_pdata {
u32 brg_clk_freq;
 };
 
-/* i2c Platform Device, Driver Data */
-struct mv64xxx_i2c_pdata {
-   u32 freq_m;
-   

[ARM] Orion: implement power-off method for QNAP TS-109/209

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8f86dda3ed8f05748f2351ae967926227a91ca2a
Commit: 8f86dda3ed8f05748f2351ae967926227a91ca2a
Parent: 3faf2ee870c26f6a809af3f32368f96c357ed91b
Author: Herbert Valerio Riedel [EMAIL PROTECTED]
AuthorDate: Sun Dec 16 17:42:31 2007 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:04:04 2008 +

[ARM] Orion: implement power-off method for QNAP TS-109/209

Since the PIC is attached to UART1, it doesn't need a kernel device driver
of its own; but powering off is something that the kernel should do, so
this patch forcefully configures the UART1 for 19200 baud and sends the
character that tells the PIC to cut the power.

Signed-off-by: Herbert Valerio Riedel [EMAIL PROTECTED]
Cc: Byron Bradley [EMAIL PROTECTED]
Acked-by: Nicolas Pitre [EMAIL PROTECTED]
---
 arch/arm/mach-orion/ts209-setup.c |   30 ++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-orion/ts209-setup.c 
b/arch/arm/mach-orion/ts209-setup.c
index 34f88ac..e3e930e 100644
--- a/arch/arm/mach-orion/ts209-setup.c
+++ b/arch/arm/mach-orion/ts209-setup.c
@@ -20,6 +20,7 @@
 #include linux/gpio_keys.h
 #include linux/input.h
 #include linux/i2c.h
+#include linux/serial_reg.h
 #include asm/mach-types.h
 #include asm/gpio.h
 #include asm/mach/arch.h
@@ -239,6 +240,32 @@ static struct platform_device *qnap_ts209_devices[] 
__initdata = {
qnap_ts209_button_device,
 };
 
+/*
+ * QNAP TS-[12]09 specific power off method via UART1-attached PIC
+ */
+
+#define UART1_REG(x)  (UART1_BASE + ((UART_##x)  2))
+
+static void qnap_ts209_power_off(void)
+{
+   /* 19200 baud divisor */
+   const unsigned divisor = ((ORION_TCLK + (8 * 19200)) / (16 * 19200));
+
+   pr_info(%s: triggering power-off...\n, __func__);
+
+   /* hijack uart1 and reset into sane state (19200,8n1) */
+   orion_write(UART1_REG(LCR), 0x83);
+   orion_write(UART1_REG(DLL), divisor  0xff);
+   orion_write(UART1_REG(DLM), (divisor  8)  0xff);
+   orion_write(UART1_REG(LCR), 0x03);
+   orion_write(UART1_REG(IER), 0x00);
+   orion_write(UART1_REG(FCR), 0x00);
+   orion_write(UART1_REG(MCR), 0x00);
+
+   /* send the power-off command 'A' to PIC */
+   orion_write(UART1_REG(TX), 'A');
+}
+
 static void __init qnap_ts209_init(void)
 {
/*
@@ -287,6 +314,9 @@ static void __init qnap_ts209_init(void)
orion_write(MPP_16_19_CTRL, 0x5500);
orion_gpio_set_valid_pins(0x3cc0fff);
 
+   /* register ts209 specific power-off method */
+   pm_power_off = qnap_ts209_power_off;
+
platform_add_devices(qnap_ts209_devices,
ARRAY_SIZE(qnap_ts209_devices));
i2c_register_board_info(0, qnap_ts209_i2c_rtc, 1);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] pxa: mainstone: update backlight to use the backlight infrastructure

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3777f7748a5d10222a55ce88f753a19b16c17032
Commit: 3777f7748a5d10222a55ce88f753a19b16c17032
Parent: 03f5b2cee6cabd0400b9f89956c373a0b5d3802a
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Thu Nov 8 11:22:48 2007 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:07:50 2008 +

[ARM] pxa: mainstone: update backlight to use the backlight infrastructure

Linux has framebuffer backlight support infrastructure which should
be used to expose backlight attributes.  Mainstone should use it.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/mainstone.c |   60 ++---
 1 files changed, 50 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 41d8c6c..a5db00c 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -23,6 +23,7 @@
 #include linux/ioport.h
 #include linux/mtd/mtd.h
 #include linux/mtd/partitions.h
+#include linux/backlight.h
 
 #include asm/types.h
 #include asm/setup.h
@@ -263,21 +264,60 @@ static struct platform_device mst_flash_device[2] = {
},
 };
 
-static void mainstone_backlight_power(int on)
+#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
+static int mainstone_backlight_update_status(struct backlight_device *bl)
 {
-   if (on) {
+   int brightness = bl-props.brightness;
+
+   if (bl-props.power != FB_BLANK_UNBLANK ||
+   bl-props.fb_blank != FB_BLANK_UNBLANK)
+   brightness = 0;
+
+   if (brightness != 0) {
pxa_gpio_mode(GPIO16_PWM0_MD);
pxa_set_cken(CKEN_PWM0, 1);
-   PWM_CTRL0 = 0;
-   PWM_PWDUTY0 = 0x3ff;
-   PWM_PERVAL0 = 0x3ff;
-   } else {
-   PWM_CTRL0 = 0;
-   PWM_PWDUTY0 = 0x0;
-   PWM_PERVAL0 = 0x3FF;
+   }
+   PWM_CTRL0 = 0;
+   PWM_PWDUTY0 = brightness;
+   PWM_PERVAL0 = bl-props.max_brightness;
+   if (brightness == 0)
pxa_set_cken(CKEN_PWM0, 0);
+   return 0; /* pointless return value */
+}
+
+static int mainstone_backlight_get_brightness(struct backlight_device *bl)
+{
+   return PWM_PWDUTY0;
+}
+
+static /*const*/ struct backlight_ops mainstone_backlight_ops = {
+   .update_status  = mainstone_backlight_update_status,
+   .get_brightness = mainstone_backlight_get_brightness,
+};
+
+static void __init mainstone_backlight_register(void)
+{
+   struct backlight_device *bl;
+
+   bl = backlight_device_register(mainstone-bl, pxa_device_fb.dev,
+  NULL, mainstone_backlight_ops);
+   if (IS_ERR(bl)) {
+   printk(KERN_ERR mainstone: unable to register backlight: 
%ld\n,
+  PTR_ERR(bl));
+   return;
}
+
+   /*
+* broken design - register-then-setup interfaces are
+* utterly broken by definition.
+*/
+   bl-props.max_brightness = 1023;
+   bl-props.brightness = 1023;
+   backlight_update_status(bl);
 }
+#else
+#define mainstone_backlight_register() do { } while (0)
+#endif
 
 static struct pxafb_mode_info toshiba_ltm04c380k_mode = {
.pixclock   = 5,
@@ -311,7 +351,6 @@ static struct pxafb_mach_info mainstone_pxafb_info = {
.num_modes  = 1,
.lccr0  = LCCR0_Act,
.lccr3  = LCCR3_PCP,
-   .pxafb_backlight_power  = mainstone_backlight_power,
 };
 
 static int mainstone_mci_init(struct device *dev, irq_handler_t 
mstone_detect_int, void *data)
@@ -473,6 +512,7 @@ static void __init mainstone_init(void)
mainstone_pxafb_info.modes = toshiba_ltm035a776c_mode;
 
set_pxa_fb_info(mainstone_pxafb_info);
+   mainstone_backlight_register();
 
pxa_set_mci_info(mainstone_mci_platform_data);
pxa_set_ficp_info(mainstone_ficp_platform_data);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] pxa: remove periodic mode emulation support

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a88264c24c44924a549f3d596b86d611b7ee9909
Commit: a88264c24c44924a549f3d596b86d611b7ee9909
Parent: 3777f7748a5d10222a55ce88f753a19b16c17032
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Nov 12 22:45:16 2007 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:07:50 2008 +

[ARM] pxa: remove periodic mode emulation support

Apparantly, the generic time subsystem can accurately emulate periodic
mode via the one-shot support code, so we don't need our own periodic
emulation code anymore.  Just ensure that we build support for one shot
into the generic time subsystem.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig |1 +
 arch/arm/mach-pxa/time.c |   61 ++
 2 files changed, 9 insertions(+), 53 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a04f507..1be7182 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -345,6 +345,7 @@ config ARCH_PXA
select GENERIC_GPIO
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+   select TICK_ONESHOT
help
  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index fbfa192..3c4abbf 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -59,55 +59,17 @@ unsigned long long sched_clock(void)
 }
 
 
+#define MIN_OSCR_DELTA 16
+
 static irqreturn_t
 pxa_ost0_interrupt(int irq, void *dev_id)
 {
-   int next_match;
struct clock_event_device *c = dev_id;
 
-   if (c-mode == CLOCK_EVT_MODE_ONESHOT) {
-   /* Disarm the compare/match, signal the event. */
-   OIER = ~OIER_E0;
-   OSSR = OSSR_M0;
-   c-event_handler(c);
-   } else if (c-mode == CLOCK_EVT_MODE_PERIODIC) {
-   /* Call the event handler as many times as necessary
-* to recover missed events, if any (if we update
-* OSMR0 and OSCR0 is still ahead of us, we've missed
-* the event).  As we're dealing with that, re-arm the
-* compare/match for the next event.
-*
-* HACK ALERT:
-*
-* There's a latency between the instruction that
-* writes to OSMR0 and the actual commit to the
-* physical hardware, because the CPU doesn't (have
-* to) run at bus speed, there's a write buffer
-* between the CPU and the bus, etc. etc.  So if the
-* target OSCR0 is very close, to the OSMR0 load
-* value, the update to OSMR0 might not get to the
-* hardware in time and we'll miss that interrupt.
-*
-* To be safe, if the new OSMR0 is very close to the
-* target OSCR0 value, we call the event_handler as
-* though the event actually happened.  According to
-* Nico's comment in the previous version of this
-* code, experience has shown that 6 OSCR ticks is
-* very close but he went with 8.  We will use 16,
-* based on the results of testing on PXA270.
-*
-* To be doubly sure, we also tell clkevt via
-* clockevents_register_device() not to ask for
-* anything that might put us very close.
-*/
-#define MIN_OSCR_DELTA 16
-   do {
-   OSSR = OSSR_M0;
-   next_match = (OSMR0 += LATCH);
-   c-event_handler(c);
-   } while (((signed long)(next_match - OSCR) = MIN_OSCR_DELTA)
- (c-mode == CLOCK_EVT_MODE_PERIODIC));
-   }
+   /* Disarm the compare/match, signal the event. */
+   OIER = ~OIER_E0;
+   OSSR = OSSR_M0;
+   c-event_handler(c);
 
return IRQ_HANDLED;
 }
@@ -133,14 +95,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct 
clock_event_device *dev)
unsigned long irqflags;
 
switch (mode) {
-   case CLOCK_EVT_MODE_PERIODIC:
-   raw_local_irq_save(irqflags);
-   OSSR = OSSR_M0;
-   OIER |= OIER_E0;
-   OSMR0 = OSCR + LATCH;
-   raw_local_irq_restore(irqflags);
-   break;
-
case CLOCK_EVT_MODE_ONESHOT:
raw_local_irq_save(irqflags);
OIER = ~OIER_E0;
@@ -158,13 +112,14 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct 
clock_event_device *dev)
break;
 
case CLOCK_EVT_MODE_RESUME:
+   case CLOCK_EVT_MODE_PERIODIC:
break;
}
 }
 
 static struct clock_event_device ckevt_pxa_osmr0 = {
.name   = osmr0,
-   .features  

[ARM] pxa: Don't wind OSCR backwards over suspend/resume

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ae7806f8b4bf9a1e74c82f3bd4e91d59bd3d697
Commit: 4ae7806f8b4bf9a1e74c82f3bd4e91d59bd3d697
Parent: a88264c24c44924a549f3d596b86d611b7ee9909
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Nov 12 22:48:12 2007 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:07:51 2008 +

[ARM] pxa: Don't wind OSCR backwards over suspend/resume

OSCR is supposed to monotonically increment; however restoring it
to a time prior to OSMR0 may result in it being wound backwards.
Instead, if OSMR0 is within the minimum expiry time, wind OSMR0
forwards.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/time.c |   21 -
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 3c4abbf..ac0bbad 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -181,7 +181,7 @@ static void __init pxa_timer_init(void)
 }
 
 #ifdef CONFIG_PM
-static unsigned long osmr[4], oier;
+static unsigned long osmr[4], oier, oscr;
 
 static void pxa_timer_suspend(void)
 {
@@ -190,23 +190,26 @@ static void pxa_timer_suspend(void)
osmr[2] = OSMR2;
osmr[3] = OSMR3;
oier = OIER;
+   oscr = OSCR;
 }
 
 static void pxa_timer_resume(void)
 {
+   /*
+* Ensure that we have at least MIN_OSCR_DELTA between match
+* register 0 and the OSCR, to guarantee that we will receive
+* the one-shot timer interrupt.  We adjust OSMR0 in preference
+* to OSCR to guarantee that OSCR is monotonically incrementing.
+*/
+   if (osmr[0] - oscr  MIN_OSCR_DELTA)
+   osmr[0] += MIN_OSCR_DELTA;
+
OSMR0 = osmr[0];
OSMR1 = osmr[1];
OSMR2 = osmr[2];
OSMR3 = osmr[3];
OIER = oier;
-
-   /*
-* OSCR0 is the system timer, which has to increase
-* monotonically until it rolls over in hardware.  The value
-* (OSMR0 - LATCH) is OSCR0 at the most recent system tick,
-* which is a handy value to restore to OSCR0.
-*/
-   OSCR = OSMR0 - LATCH;
+   OSCR = oscr;
 }
 #else
 #define pxa_timer_suspend NULL
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] pxa: define SSP platform devices for pxa2xx/pxa3xx

2008-01-28 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2b82dded8c45daeaad332459222034a3fabd227
Commit: d2b82dded8c45daeaad332459222034a3fabd227
Parent: 49db76eb5fd7d75babb4f3a5f30e86d1f8e82543
Author: eric miao [EMAIL PROTECTED]
AuthorDate: Mon Dec 10 17:51:29 2007 +0800
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sat Jan 26 15:07:51 2008 +

[ARM] pxa: define SSP platform devices for pxa2xx/pxa3xx

Signed-off-by: eric miao [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/devices.h |8 ++
 arch/arm/mach-pxa/generic.c |  277 +++
 2 files changed, 285 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index 51162a7..e78b48f 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -13,4 +13,12 @@ extern struct platform_device pxa_device_rtc;
 extern struct platform_device pxa27x_device_i2c_power;
 extern struct platform_device pxa27x_device_ohci;
 
+extern struct platform_device pxa25x_device_ssp;
+extern struct platform_device pxa25x_device_nssp;
+extern struct platform_device pxa25x_device_assp;
+extern struct platform_device pxa27x_device_ssp1;
+extern struct platform_device pxa27x_device_ssp2;
+extern struct platform_device pxa27x_device_ssp3;
+extern struct platform_device pxa3xx_device_ssp4;
+
 void __init pxa_register_device(struct platform_device *dev, void *data);
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 3d863c9..8bb70e7 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -24,6 +24,7 @@
 #include linux/ioport.h
 #include linux/pm.h
 #include linux/string.h
+#include linux/dma-mapping.h
 
 #include asm/hardware.h
 #include asm/irq.h
@@ -487,3 +488,279 @@ struct platform_device pxa_device_rtc = {
.name   = sa1100-rtc,
.id = -1,
 };
+
+#ifdef CONFIG_PXA25x
+
+static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
+
+static struct resource pxa25x_resource_ssp[] = {
+   [0] = {
+   .start  = 0x4100,
+   .end= 0x411f,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = IRQ_SSP,
+   .end= IRQ_SSP,
+   .flags  = IORESOURCE_IRQ,
+   },
+   [2] = {
+   /* DRCMR for RX */
+   .start  = 13,
+   .end= 13,
+   .flags  = IORESOURCE_DMA,
+   },
+   [3] = {
+   /* DRCMR for TX */
+   .start  = 14,
+   .end= 14,
+   .flags  = IORESOURCE_DMA,
+   },
+};
+
+struct platform_device pxa25x_device_ssp = {
+   .name   = pxa25x-ssp,
+   .id = 0,
+   .dev= {
+   .dma_mask = pxa25x_ssp_dma_mask,
+   .coherent_dma_mask = DMA_BIT_MASK(32),
+   },
+   .resource   = pxa25x_resource_ssp,
+   .num_resources  = ARRAY_SIZE(pxa25x_resource_ssp),
+};
+
+static u64 pxa25x_nssp_dma_mask = DMA_BIT_MASK(32);
+
+static struct resource pxa25x_resource_nssp[] = {
+   [0] = {
+   .start  = 0x4140,
+   .end= 0x4140002f,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = IRQ_NSSP,
+   .end= IRQ_NSSP,
+   .flags  = IORESOURCE_IRQ,
+   },
+   [2] = {
+   /* DRCMR for RX */
+   .start  = 15,
+   .end= 15,
+   .flags  = IORESOURCE_DMA,
+   },
+   [3] = {
+   /* DRCMR for TX */
+   .start  = 16,
+   .end= 16,
+   .flags  = IORESOURCE_DMA,
+   },
+};
+
+struct platform_device pxa25x_device_nssp = {
+   .name   = pxa25x-nssp,
+   .id = 1,
+   .dev= {
+   .dma_mask = pxa25x_nssp_dma_mask,
+   .coherent_dma_mask = DMA_BIT_MASK(32),
+   },
+   .resource   = pxa25x_resource_nssp,
+   .num_resources  = ARRAY_SIZE(pxa25x_resource_nssp),
+};
+
+static u64 pxa25x_assp_dma_mask = DMA_BIT_MASK(32);
+
+static struct resource pxa25x_resource_assp[] = {
+   [0] = {
+   .start  = 0x4150,
+   .end= 0x4150002f,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = IRQ_ASSP,
+   .end= IRQ_ASSP,
+   .flags  = IORESOURCE_IRQ,
+   },
+   [2] = {
+   /* DRCMR for RX */
+   .start  = 23,
+   .end= 23,
+   .flags  = IORESOURCE_DMA,
+   },
+   [3] = {
+   /* DRCMR for TX */
+   .start  = 24,
+   .end= 24,
+   .flags  = IORESOURCE_DMA,
+   },
+};
+
+struct platform_device pxa25x_device_assp = {
+   /* 

<    1   2   3   4   5   >