[tools] add mktitanimg to create Titan (AR7-based) images (#6632)
[openwrt.git] / target / linux / brcm63xx / patches-2.6.32 / 240-spi.patch
index d4b95b0..52f5241 100644 (file)
@@ -1,7 +1,7 @@
-Index: linux-2.6.32.10/arch/mips/bcm63xx/cpu.c
+Index: linux-2.6.32.13/arch/mips/bcm63xx/cpu.c
 ===================================================================
---- linux-2.6.32.10.orig/arch/mips/bcm63xx/cpu.c       2010-03-15 16:52:04.000000000 +0100
-+++ linux-2.6.32.10/arch/mips/bcm63xx/cpu.c    2010-04-22 17:35:21.000000000 +0200
+--- linux-2.6.32.13.orig/arch/mips/bcm63xx/cpu.c       2010-05-27 21:34:54.000000000 -0400
++++ linux-2.6.32.13/arch/mips/bcm63xx/cpu.c    2010-05-27 21:48:23.000000000 -0400
 @@ -55,6 +55,7 @@
  
  static const int bcm96338_irqs[] = {
@@ -26,10 +26,10 @@ Index: linux-2.6.32.10/arch/mips/bcm63xx/cpu.c
        [IRQ_UART0]             = BCM_6358_UART0_IRQ,
        [IRQ_DSL]               = BCM_6358_DSL_IRQ,
        [IRQ_ENET0]             = BCM_6358_ENET0_IRQ,
-Index: linux-2.6.32.10/arch/mips/bcm63xx/dev-spi.c
+Index: linux-2.6.32.13/arch/mips/bcm63xx/dev-spi.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.32.10/arch/mips/bcm63xx/dev-spi.c        2010-04-22 17:35:21.000000000 +0200
++++ linux-2.6.32.13/arch/mips/bcm63xx/dev-spi.c        2010-05-27 21:48:23.000000000 -0400
 @@ -0,0 +1,60 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -91,10 +91,10 @@ Index: linux-2.6.32.10/arch/mips/bcm63xx/dev-spi.c
 +
 +      return platform_device_register(&bcm63xx_spi_device);
 +}
-Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
+Index: linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
 ===================================================================
---- linux-2.6.32.10.orig/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h      2010-04-22 17:35:21.000000000 +0200
-+++ linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h   2010-04-22 17:43:33.000000000 +0200
+--- linux-2.6.32.13.orig/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h      2010-05-27 21:44:19.000000000 -0400
++++ linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h   2010-05-27 21:48:23.000000000 -0400
 @@ -108,6 +108,7 @@
  #define RSET_WDT_SIZE                 12
  #define RSET_ENET_SIZE                        2048
@@ -103,6 +103,15 @@ Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
  #define RSET_UART_SIZE                        24
  #define RSET_UDC_SIZE                 256
  #define RSET_OHCI_SIZE                        256
+@@ -209,7 +210,7 @@
+ #define BCM_6358_WDT_BASE             (0xfffe005c)
+ #define BCM_6358_UART0_BASE           (0xfffe0100)
+ #define BCM_6358_GPIO_BASE            (0xfffe0080)
+-#define BCM_6358_SPI_BASE             (0xdeadbeef)
++#define BCM_6358_SPI_BASE             (0xfffe0800)
+ #define BCM_6358_UDC0_BASE            (0xfffe0400)
+ #define BCM_6358_OHCI0_BASE           (0xfffe1400)
+ #define BCM_6358_OHCI_PRIV_BASE               (0xdeadbeef)
 @@ -428,6 +429,7 @@
   */
  enum bcm63xx_irq {
@@ -127,10 +136,10 @@ Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
  #define BCM_6358_UART0_IRQ            (IRQ_INTERNAL_BASE + 2)
  #define BCM_6358_OHCI0_IRQ            (IRQ_INTERNAL_BASE + 5)
  #define BCM_6358_ENET1_IRQ            (IRQ_INTERNAL_BASE + 6)
-Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+Index: linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
 ===================================================================
---- linux-2.6.32.10.orig/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h     2010-03-15 16:52:04.000000000 +0100
-+++ linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h  2010-04-22 17:35:21.000000000 +0200
+--- linux-2.6.32.13.orig/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h     2010-05-27 21:34:54.000000000 -0400
++++ linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h  2010-05-27 21:48:23.000000000 -0400
 @@ -769,5 +769,117 @@
  #define DMIPSPLLCFG_N2_SHIFT          29
  #define DMIPSPLLCFG_N2_MASK           (0x7 << DMIPSPLLCFG_N2_SHIFT)
@@ -249,10 +258,10 @@ Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
 +
  #endif /* BCM63XX_REGS_H_ */
  
-Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
+Index: linux-2.6.32.13/drivers/spi/bcm63xx_spi.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.32.10/drivers/spi/bcm63xx_spi.c  2010-04-22 17:35:21.000000000 +0200
++++ linux-2.6.32.13/drivers/spi/bcm63xx_spi.c  2010-05-27 21:48:23.000000000 -0400
 @@ -0,0 +1,628 @@
 +/*
 + * Broadcom BCM63xx SPI controller support
@@ -506,7 +515,7 @@ Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
 +      if (is_on == BITBANG_CS_INACTIVE)
 +              val |= SPI_CMD_NOOP;
 +      else if (is_on == BITBANG_CS_ACTIVE)
-+              val |= (1 << spi->chip_select << SPI_CMD_DEVICE_ID_SHIFT);
++              val |= (spi->chip_select << SPI_CMD_DEVICE_ID_SHIFT);
 +
 +      bcm_spi_writew(val, bs->regs, SPI_CMD);
 +}
@@ -649,10 +658,10 @@ Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
 +      bcm_spi_writeb(msg_ctl, bs->regs, SPI_MSG_CTL);
 +
 +      /* Issue the transfer */
-+      cmd = bcm_spi_readb(bs->regs, SPI_CMD);
++      cmd = bcm_spi_readw(bs->regs, SPI_CMD);
 +      cmd |= SPI_CMD_START_IMMEDIATE;
 +      cmd |= (0 << SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+      bcm_spi_writeb(cmd, bs->regs, SPI_CMD);
++      bcm_spi_writew(cmd, bs->regs, SPI_CMD);
 +
 +      wait_for_completion(&bs->done);
 +
@@ -697,10 +706,10 @@ Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
 +                      bcm63xx_spi_fill_tx_fifo(bs);
 +
 +                      /* Start the transfer */
-+                      cmd = bcm_spi_readb(bs->regs, SPI_CMD);
++                      cmd = bcm_spi_readw(bs->regs, SPI_CMD);
 +                      cmd |= SPI_CMD_START_IMMEDIATE;
 +                      cmd |= (0 << SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+                      bcm_spi_writeb(cmd, bs->regs, SPI_CMD);
++                      bcm_spi_writew(cmd, bs->regs, SPI_CMD);
 +              } else
 +                      complete(&bs->done);
 +      }
@@ -882,10 +891,10 @@ Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c
 +MODULE_DESCRIPTION("Broadcom BCM63xx SPI Controller driver");
 +MODULE_LICENSE("GPL");
 +MODULE_VERSION(DRV_VER);
-Index: linux-2.6.32.10/drivers/spi/Kconfig
+Index: linux-2.6.32.13/drivers/spi/Kconfig
 ===================================================================
---- linux-2.6.32.10.orig/drivers/spi/Kconfig   2010-04-22 17:35:20.000000000 +0200
-+++ linux-2.6.32.10/drivers/spi/Kconfig        2010-04-22 17:35:21.000000000 +0200
+--- linux-2.6.32.13.orig/drivers/spi/Kconfig   2010-05-27 21:34:54.000000000 -0400
++++ linux-2.6.32.13/drivers/spi/Kconfig        2010-05-27 21:48:23.000000000 -0400
 @@ -60,6 +60,13 @@
          This selects a driver for the Atmel SPI Controller, present on
          many AT32 (AVR32) and AT91 (ARM) chips.
@@ -900,10 +909,10 @@ Index: linux-2.6.32.10/drivers/spi/Kconfig
  config SPI_BFIN
        tristate "SPI controller driver for ADI Blackfin5xx"
        depends on BLACKFIN
-Index: linux-2.6.32.10/drivers/spi/Makefile
+Index: linux-2.6.32.13/drivers/spi/Makefile
 ===================================================================
---- linux-2.6.32.10.orig/drivers/spi/Makefile  2010-04-22 17:35:20.000000000 +0200
-+++ linux-2.6.32.10/drivers/spi/Makefile       2010-04-22 17:35:21.000000000 +0200
+--- linux-2.6.32.13.orig/drivers/spi/Makefile  2010-05-27 21:34:54.000000000 -0400
++++ linux-2.6.32.13/drivers/spi/Makefile       2010-05-27 21:48:23.000000000 -0400
 @@ -34,6 +34,7 @@
  obj-$(CONFIG_SPI_XILINX)              += xilinx_spi.o
  obj-$(CONFIG_SPI_SH_SCI)              += spi_sh_sci.o
@@ -912,10 +921,10 @@ Index: linux-2.6.32.10/drivers/spi/Makefile
  #     ... add above this line ...
  
  # SPI protocol drivers (device/link on bus)
-Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
+Index: linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h       2010-04-22 17:35:21.000000000 +0200
++++ linux-2.6.32.13/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h       2010-05-27 21:48:23.000000000 -0400
 @@ -0,0 +1,15 @@
 +#ifndef BCM63XX_DEV_SPI_H
 +#define BCM63XX_DEV_SPI_H
@@ -932,10 +941,10 @@ Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
 +};
 +
 +#endif /* BCM63XX_DEV_SPI_H */
-Index: linux-2.6.32.10/arch/mips/bcm63xx/Makefile
+Index: linux-2.6.32.13/arch/mips/bcm63xx/Makefile
 ===================================================================
---- linux-2.6.32.10.orig/arch/mips/bcm63xx/Makefile    2010-04-22 17:35:21.000000000 +0200
-+++ linux-2.6.32.10/arch/mips/bcm63xx/Makefile 2010-04-22 17:35:21.000000000 +0200
+--- linux-2.6.32.13.orig/arch/mips/bcm63xx/Makefile    2010-05-27 21:44:19.000000000 -0400
++++ linux-2.6.32.13/arch/mips/bcm63xx/Makefile 2010-05-27 21:48:23.000000000 -0400
 @@ -1,6 +1,6 @@
  obj-y         += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
                   dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \
@@ -944,11 +953,11 @@ Index: linux-2.6.32.10/arch/mips/bcm63xx/Makefile
  obj-$(CONFIG_EARLY_PRINTK)    += early_printk.o
  
  obj-y         += boards/
-Index: linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c
+Index: linux-2.6.32.13/arch/mips/bcm63xx/boards/board_bcm963xx.c
 ===================================================================
---- linux-2.6.32.10.orig/arch/mips/bcm63xx/boards/board_bcm963xx.c     2010-04-22 17:35:21.000000000 +0200
-+++ linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c  2010-04-22 17:35:21.000000000 +0200
-@@ -29,6 +29,7 @@
+--- linux-2.6.32.13.orig/arch/mips/bcm63xx/boards/board_bcm963xx.c     2010-05-27 21:46:39.000000000 -0400
++++ linux-2.6.32.13/arch/mips/bcm63xx/boards/board_bcm963xx.c  2010-05-27 21:48:23.000000000 -0400
+@@ -30,6 +30,7 @@
  #include <bcm63xx_dev_usb_ohci.h>
  #include <bcm63xx_dev_usb_ehci.h>
  #include <bcm63xx_dev_usb_udc.h>
@@ -956,7 +965,7 @@ Index: linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c
  #include <board_bcm963xx.h>
  
  #define PFX   "board_bcm963xx: "
-@@ -998,6 +999,9 @@
+@@ -1479,6 +1480,9 @@
        if (board.has_udc0)
                bcm63xx_udc_register();
  
This page took 0.031388 seconds and 4 git commands to generate.