[brcm63xx] add missing alice gate2 leds (#6743)
[openwrt.git] / target / linux / brcm63xx / patches-2.6.33 / 240-spi.patch
index bcae323..2323661 100644 (file)
  #define RSET_UART_SIZE                        24
  #define RSET_UDC_SIZE                 256
  #define RSET_OHCI_SIZE                        256
+@@ -209,7 +210,7 @@ enum bcm63xx_regs_set {
+ #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 @@ static inline unsigned long bcm63xx_regs
   */
  enum bcm63xx_irq {
 +      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);
 +}
 +      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);
 +
 +                      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);
 +      }
  obj-y         += boards/
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -29,6 +29,7 @@
+@@ -30,6 +30,7 @@
  #include <bcm63xx_dev_usb_ohci.h>
  #include <bcm63xx_dev_usb_ehci.h>
  #include <bcm63xx_dev_usb_udc.h>
  #include <board_bcm963xx.h>
  
  #define PFX   "board_bcm963xx: "
-@@ -998,6 +999,9 @@ int __init board_register_devices(void)
+@@ -1525,6 +1526,9 @@ int __init board_register_devices(void)
        if (board.has_udc0)
                bcm63xx_udc_register();
  
This page took 0.028755 seconds and 4 git commands to generate.