[Balloon-svn] r1867 - balloon/branches/menuconfig2/package/k…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: subversion@balloonboard.org
Date:  
To: balloon-svn
Subject: [Balloon-svn] r1867 - balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4
Author: nick
Date: 2012-05-02 09:27:15 +0100 (Wed, 02 May 2012)
New Revision: 1867

Modified:
balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/balloon3.patch
balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/spi_tt.patch
Log:
refactor TT halt patch

Modified: balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/balloon3.patch
===================================================================
--- balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/balloon3.patch    2012-05-01 16:47:26 UTC (rev 1866)
+++ balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/balloon3.patch    2012-05-02 08:27:15 UTC (rev 1867)
@@ -1,7 +1,7 @@
 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-01 17:30:49.000000000 +0100
-+++ linux-2.6.39.4/arch/arm/mach-pxa/balloon3.c    2012-05-01 17:30:55.000000000 +0100
+--- linux-2.6.39.4.orig/arch/arm/mach-pxa/balloon3.c    2012-05-02 09:18:25.000000000 +0100
++++ linux-2.6.39.4/arch/arm/mach-pxa/balloon3.c    2012-05-02 09:22:38.000000000 +0100
 @@ -31,6 +31,7 @@
  #include <linux/mtd/nand.h>
  #include <linux/mtd/physmap.h>
@@ -10,7 +10,7 @@


#include <asm/setup.h>
#include <asm/mach-types.h>
-@@ -52,8 +53,15 @@
+@@ -52,8 +53,11 @@
#include <mach/irda.h>
#include <mach/ohci.h>

@@ -19,14 +19,10 @@
#include "generic.h"
#include "devices.h"
+#include "linux/delay.h"
-+
-+#ifdef CONFIG_MACH_BALLOON3_BUBBLE
-+#include "linux/samosa_bus.h"
-+#endif

/******************************************************************************
* Pin configuration
-@@ -67,6 +75,9 @@
+@@ -67,6 +71,9 @@

      /* Reset, configured as GPIO wakeup source */
      GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
@@ -36,7 +32,7 @@
  };


  /******************************************************************************
-@@ -211,7 +222,7 @@
+@@ -211,7 +218,7 @@
  #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
  static unsigned long balloon3_lcd_pin_config[] __initdata = {
      GPIOxx_LCD_TFT_16BPP,
@@ -45,7 +41,7 @@
  };


static struct pxafb_mode_info balloon3_lcd_modes[] = {
-@@ -275,6 +286,35 @@
+@@ -275,6 +282,35 @@
static inline void balloon3_lcd_init(void) {}
#endif

@@ -81,7 +77,7 @@
  /******************************************************************************
   * SD/MMC card controller
   ******************************************************************************/
-@@ -309,6 +349,22 @@
+@@ -309,6 +345,22 @@
   * USB Gadget
   ******************************************************************************/
  #if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE)
@@ -104,7 +100,7 @@
  static void balloon3_udc_command(int cmd)
  {
      if (cmd == PXA2XX_UDC_CMD_CONNECT)
-@@ -317,14 +373,8 @@
+@@ -317,14 +369,8 @@
          UP2OCR &= ~UP2OCR_DPPUE;
  }


@@ -119,7 +115,7 @@
      .gpio_pullup        = -1,
  };


-@@ -480,14 +530,14 @@
+@@ -480,14 +526,14 @@
  {
      int balloon3_irq = (d->irq - BALLOON3_IRQ(0));
      balloon3_irq_enabled &= ~(1 << balloon3_irq);
@@ -136,7 +132,7 @@
  }


static struct irq_chip balloon3_irq_chip = {
-@@ -526,7 +576,7 @@
+@@ -526,7 +572,7 @@

      pxa27x_init_irq();
      /* setup extra Balloon3 irqs */
@@ -145,7 +141,7 @@
          irq_set_chip_and_handler(irq, &balloon3_irq_chip,
                       handle_level_irq);
          set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
-@@ -550,22 +600,33 @@
+@@ -550,22 +596,33 @@
      .teardown    = NULL,
      .context    = NULL,
  };
@@ -182,7 +178,7 @@


/******************************************************************************
* NAND
-@@ -779,11 +840,159 @@
+@@ -779,11 +836,146 @@
static inline void balloon3_pmic_init(void) {}
#endif

@@ -257,19 +253,6 @@
 +
 +    /* switch off RS232 */
 +    gpio_set_value(BALLOON3_GPIO_RUN_232, 0);
-+#ifdef CONFIG_MACH_BALLOON3_BUBBLE
-+    while (1) {
-+        // time periods in units of a samosa write
-+        // clear - 2 time periods low
-+        samosa8_write(0x12, 1 << 2);
-+        samosa8_write(0x12, 1 << 2);
-+        // set - 3 time periods high.
-+        samosa8_write(0x13, 1 << 2);
-+        samosa8_write(0x13, 1 << 2);
-+        samosa8_write(0x13, 1 << 2);
-+        
-+    }
-+#endif
 +    asm ( "mov r0,#0x7\n"
 +        "mcr p14, 0, r0, c7, c0, 0\n"
 +    );
@@ -342,7 +325,7 @@
      ARB_CNTRL = ARB_CORE_PARK | 0x234;


      pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_pin_config));
-@@ -804,6 +1013,7 @@
+@@ -804,6 +996,7 @@
      balloon3_udc_init();
      balloon3_uhc_init();
      balloon3_cf_init();
@@ -350,7 +333,7 @@
  }


  static struct map_desc balloon3_io_desc[] __initdata = {
-@@ -821,6 +1031,61 @@
+@@ -821,6 +1014,61 @@
      iotable_init(balloon3_io_desc, ARRAY_SIZE(balloon3_io_desc));
  }


@@ -414,8 +397,8 @@
      .map_io        = balloon3_map_io,
 Index: linux-2.6.39.4/arch/arm/mach-pxa/include/mach/balloon3.h
 ===================================================================
---- linux-2.6.39.4.orig/arch/arm/mach-pxa/include/mach/balloon3.h    2012-05-01 17:30:49.000000000 +0100
-+++ linux-2.6.39.4/arch/arm/mach-pxa/include/mach/balloon3.h    2012-05-01 17:30:55.000000000 +0100
+--- linux-2.6.39.4.orig/arch/arm/mach-pxa/include/mach/balloon3.h    2012-05-02 09:18:25.000000000 +0100
++++ linux-2.6.39.4/arch/arm/mach-pxa/include/mach/balloon3.h    2012-05-02 09:18:34.000000000 +0100
 @@ -47,6 +47,19 @@
  #define BALLOON3_SAMOSA_ADDR_REG    (BALLOON3_FPGA_VIRT + 0x00c00000)
  #define BALLOON3_SAMOSA_DATA_REG    (BALLOON3_FPGA_VIRT + 0x00c00004)
@@ -489,8 +472,8 @@
  #endif
 Index: linux-2.6.39.4/arch/arm/mach-pxa/Kconfig
 ===================================================================
---- linux-2.6.39.4.orig/arch/arm/mach-pxa/Kconfig    2012-05-01 17:30:49.000000000 +0100
-+++ linux-2.6.39.4/arch/arm/mach-pxa/Kconfig    2012-05-01 17:30:55.000000000 +0100
+--- linux-2.6.39.4.orig/arch/arm/mach-pxa/Kconfig    2012-05-02 09:18:25.000000000 +0100
++++ linux-2.6.39.4/arch/arm/mach-pxa/Kconfig    2012-05-02 09:18:34.000000000 +0100
 @@ -56,6 +56,7 @@


  comment "Third Party Dev Platforms (sorted by vendor name)"
@@ -636,8 +619,8 @@
      select PXA27x
 Index: linux-2.6.39.4/sound/soc/pxa/Kconfig
 ===================================================================
---- linux-2.6.39.4.orig/sound/soc/pxa/Kconfig    2012-05-01 17:30:49.000000000 +0100
-+++ linux-2.6.39.4/sound/soc/pxa/Kconfig    2012-05-01 17:30:55.000000000 +0100
+--- linux-2.6.39.4.orig/sound/soc/pxa/Kconfig    2012-05-02 09:18:25.000000000 +0100
++++ linux-2.6.39.4/sound/soc/pxa/Kconfig    2012-05-02 09:18:34.000000000 +0100
 @@ -26,6 +26,14 @@
      tristate
      select PXA_SSP


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-01 16:47:26 UTC (rev 1866)
+++ balloon/branches/menuconfig2/package/kernel/patches/2.6.39.4/spi_tt.patch    2012-05-02 08:27:15 UTC (rev 1867)
@@ -1,7 +1,7 @@
 Index: linux-2.6.39.4/drivers/spi/Kconfig
 ===================================================================
---- linux-2.6.39.4.orig/drivers/spi/Kconfig    2012-05-01 17:30:37.000000000 +0100
-+++ linux-2.6.39.4/drivers/spi/Kconfig    2012-05-01 17:31:58.000000000 +0100
+--- 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
 @@ -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-01 17:30:37.000000000 +0100
-+++ linux-2.6.39.4/drivers/spi/Makefile    2012-05-01 17:31:58.000000000 +0100
+--- 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
 @@ -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-01 17:31:58.000000000 +0100
++++ linux-2.6.39.4/drivers/spi/spi_tt.c    2012-05-02 09:22:48.000000000 +0100
 @@ -0,0 +1,291 @@
 +/*
 + * Copyright 20011 Toby Churchill Ltd
@@ -335,7 +335,7 @@
 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-01 17:31:58.000000000 +0100
++++ linux-2.6.39.4/include/linux/spi/spi_tt.h    2012-05-02 09:22:48.000000000 +0100
 @@ -0,0 +1,65 @@
 +#ifndef SPI_TT_H
 +#define SPI_TT_H
@@ -404,8 +404,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-01 17:31:58.000000000 +0100
-+++ linux-2.6.39.4/arch/arm/mach-pxa/balloon3.c    2012-05-01 17:31:58.000000000 +0100
+--- 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
 @@ -54,6 +54,12 @@
  #include <mach/irda.h>
  #include <mach/ohci.h>
@@ -419,7 +419,7 @@
  #include <sound/wm8960.h>


  #include "generic.h"
-@@ -315,6 +321,9 @@
+@@ -311,6 +317,9 @@
  static void balloon3_backlight_power(int on)
  {
      gpio_set_value(BALLOON3_GPIO_RUN_BACKLIGHT, on);
@@ -429,7 +429,7 @@
  }


  static char *lcd;
-@@ -400,7 +409,24 @@
+@@ -396,7 +405,24 @@
          goto err2;
      }


@@ -454,7 +454,7 @@
      pxa_set_fb_info(NULL, &balloon3_lcd_screen);
      return;


-@@ -685,31 +711,55 @@
+@@ -681,31 +707,55 @@
  /******************************************************************************
   * FPGA IRQ
   ******************************************************************************/
@@ -511,7 +511,7 @@
      do {
          /* clear useless edge notification */
          if (desc->irq_data.chip->irq_ack) {
-@@ -724,9 +774,23 @@
+@@ -720,9 +770,23 @@
              generic_handle_irq(irq);
              pending &= pending - 1;
          }
@@ -535,7 +535,7 @@
  }


static void __init balloon3_init_irq(void)
-@@ -746,6 +810,13 @@
+@@ -742,6 +806,13 @@

      pr_debug("%s: chained handler installed - irq %d automatically "
          "enabled\n", __func__, BALLOON3_AUX_NIRQ);
@@ -549,7 +549,7 @@
  }


/******************************************************************************
-@@ -999,6 +1070,60 @@
+@@ -995,6 +1066,60 @@
static inline void balloon3_pmic_init(void) {}
#endif

@@ -610,7 +610,27 @@

//#define PAC_REG_POWERCONTROL __REG(0x4050024c)

-@@ -1173,6 +1298,7 @@
+@@ -1066,6 +1191,19 @@
+ 
+     /* switch off RS232 */
+     gpio_set_value(BALLOON3_GPIO_RUN_232, 0);
++#if defined(CONFIG_SPI_TT) || defined(CONFIG_SPI_TT_MODULE)
++    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);
++        // 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);
++        
++    }
++#endif
+     asm ( "mov r0,#0x7\n"
+         "mcr p14, 0, r0, c7, c0, 0\n"
+     );
+@@ -1156,6 +1294,7 @@
      balloon3_uhc_init();
      balloon3_cf_init();
      balloon3_power_fault_init();