Author: nick
Date: 2012-05-04 10:12:23 +0100 (Fri, 04 May 2012)
New Revision: 1868
Modified:
balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/spi_tt.patch
Log:
update poweroff for TT
Modified: balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/spi_tt.patch
===================================================================
--- balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/spi_tt.patch 2012-05-02 08:27:15 UTC (rev 1867)
+++ balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/spi_tt.patch 2012-05-04 09:12:23 UTC (rev 1868)
@@ -1,7 +1,7 @@
Index: linux-2.6.39.4/drivers/spi/Kconfig
===================================================================
---- linux-2.6.39.4.orig/drivers/spi/Kconfig 2012-05-02 09:18:24.000000000 +0100
-+++ linux-2.6.39.4/drivers/spi/Kconfig 2012-05-02 09:22:48.000000000 +0100
+--- linux-2.6.39.4.orig/drivers/spi/Kconfig 2011-08-03 20:43:28.000000000 +0100
++++ linux-2.6.39.4/drivers/spi/Kconfig 2012-05-02 09:35:11.000000000 +0100
@@ -386,6 +386,21 @@
SPI driver for the Topcliff PCH (Platform Controller Hub) SPI bus
used in some x86 embedded processors.
@@ -26,8 +26,8 @@
depends on GENERIC_GPIO && CPU_TX49XX
Index: linux-2.6.39.4/drivers/spi/Makefile
===================================================================
---- linux-2.6.39.4.orig/drivers/spi/Makefile 2012-05-02 09:18:24.000000000 +0100
-+++ linux-2.6.39.4/drivers/spi/Makefile 2012-05-02 09:22:48.000000000 +0100
+--- linux-2.6.39.4.orig/drivers/spi/Makefile 2011-08-03 20:43:28.000000000 +0100
++++ linux-2.6.39.4/drivers/spi/Makefile 2012-05-02 09:35:11.000000000 +0100
@@ -54,6 +54,7 @@
obj-$(CONFIG_SPI_SH_MSIOF) += spi_sh_msiof.o
obj-$(CONFIG_SPI_STMP3XXX) += spi_stmp.o
@@ -39,7 +39,7 @@
Index: linux-2.6.39.4/drivers/spi/spi_tt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.39.4/drivers/spi/spi_tt.c 2012-05-02 09:22:48.000000000 +0100
++++ linux-2.6.39.4/drivers/spi/spi_tt.c 2012-05-02 09:35:11.000000000 +0100
@@ -0,0 +1,291 @@
+/*
+ * Copyright 20011 Toby Churchill Ltd
@@ -335,8 +335,8 @@
Index: linux-2.6.39.4/include/linux/spi/spi_tt.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.39.4/include/linux/spi/spi_tt.h 2012-05-02 09:22:48.000000000 +0100
-@@ -0,0 +1,65 @@
++++ linux-2.6.39.4/include/linux/spi/spi_tt.h 2012-05-04 09:27:13.000000000 +0100
+@@ -0,0 +1,69 @@
+#ifndef SPI_TT_H
+#define SPI_TT_H
+
@@ -364,6 +364,7 @@
+// SAMOSA_ADDR_SPI_STATUS
+#define SPI_STATUS_READY_BIT (0)
+#define RTC_SPI_STATUS_READY_BIT (1)
++
+// SAMOSA_ADDR_CONTROL_REG_2
+#define KBD_RESET_BIT (0)
+#define FAR_DISPLAY_RESET_BIT (1)
@@ -371,6 +372,9 @@
+#define CS_ADC_BIT (3)
+#define CS_KBD_BIT (4)
+#define CS_RTC_BIT (5)
++#define POWER_TRANSIT_ON_BIT (6)
++#define POWER_OFF_BIT (7)
++
+// SAMOSA_ADDR_CONTROL_REG_3
+#define CS_USER_DISPLAY_BIT (0)
+#define USER_DISPLAY_RESET_BIT (1)
@@ -404,8 +408,8 @@
+#endif
Index: linux-2.6.39.4/arch/arm/mach-pxa/balloon3.c
===================================================================
---- linux-2.6.39.4.orig/arch/arm/mach-pxa/balloon3.c 2012-05-02 09:22:48.000000000 +0100
-+++ linux-2.6.39.4/arch/arm/mach-pxa/balloon3.c 2012-05-02 09:25:28.000000000 +0100
+--- linux-2.6.39.4.orig/arch/arm/mach-pxa/balloon3.c 2012-05-02 09:35:10.000000000 +0100
++++ linux-2.6.39.4/arch/arm/mach-pxa/balloon3.c 2012-05-04 09:25:50.000000000 +0100
@@ -54,6 +54,12 @@
#include <mach/irda.h>
#include <mach/ohci.h>
@@ -618,12 +622,12 @@
+ while (1) {
+ // time periods in units of a samosa write
+ // clear - 2 time periods low
-+ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_CLR, 1 << 2);
-+ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_CLR, 1 << 2);
++ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_CLR, (1 << POWER_OFF_BIT));
++ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_CLR, (1 << POWER_OFF_BIT));
+ // set - 3 time periods high.
-+ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_SET, 1 << 2);
-+ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_SET, 1 << 2);
-+ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_SET, 1 << 2);
++ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_SET, (1 << POWER_OFF_BIT));
++ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_SET, (1 << POWER_OFF_BIT));
++ samosa_write8(SAMOSA_ADDR_CONTROL_REG_2_SET, (1 << POWER_OFF_BIT));
+
+ }
+#endif