Changeset 21096


Ignore:
Timestamp:
2010-04-22T18:35:49+02:00 (8 years ago)
Author:
florian
Message:

[brcm63xx] register spi controller, remove whitespaces

Location:
trunk/target/linux/brcm63xx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm63xx/patches-2.6.32/240-spi.patch

    r21087 r21096  
    1 --- a/arch/mips/bcm63xx/cpu.c 
    2 +++ b/arch/mips/bcm63xx/cpu.c 
    3 @@ -55,6 +55,7 @@ static const unsigned long bcm96338_regs 
     1Index: linux-2.6.32.10/arch/mips/bcm63xx/cpu.c 
     2=================================================================== 
     3--- linux-2.6.32.10.orig/arch/mips/bcm63xx/cpu.c        2010-03-15 16:52:04.000000000 +0100 
     4+++ linux-2.6.32.10/arch/mips/bcm63xx/cpu.c     2010-04-22 17:35:21.000000000 +0200 
     5@@ -55,6 +55,7 @@ 
    46  
    57 static const int bcm96338_irqs[] = { 
     
    911        [IRQ_DSL]               = BCM_6338_DSL_IRQ, 
    1012        [IRQ_ENET0]             = BCM_6338_ENET0_IRQ, 
    11 @@ -127,6 +128,7 @@ static const unsigned long bcm96348_regs 
     13@@ -127,6 +128,7 @@ 
    1214  
    1315 static const int bcm96348_irqs[] = { 
     
    1719        [IRQ_DSL]               = BCM_6348_DSL_IRQ, 
    1820        [IRQ_ENET0]             = BCM_6348_ENET0_IRQ, 
    19 @@ -169,6 +171,7 @@ static const unsigned long bcm96358_regs 
     21@@ -169,6 +171,7 @@ 
    2022  
    2123 static const int bcm96358_irqs[] = { 
     
    2527        [IRQ_DSL]               = BCM_6358_DSL_IRQ, 
    2628        [IRQ_ENET0]             = BCM_6358_ENET0_IRQ, 
    27 --- /dev/null 
    28 +++ b/arch/mips/bcm63xx/dev-spi.c 
     29Index: linux-2.6.32.10/arch/mips/bcm63xx/dev-spi.c 
     30=================================================================== 
     31--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
     32+++ linux-2.6.32.10/arch/mips/bcm63xx/dev-spi.c 2010-04-22 17:35:21.000000000 +0200 
    2933@@ -0,0 +1,60 @@ 
    3034+/* 
     
    3337+ * for more details. 
    3438+ * 
    35 + * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>  
     39+ * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org> 
    3640+ */ 
    3741+ 
     
    8589+       if (BCMCPU_IS_6358()) 
    8690+               spi_pdata.fifo_size = SPI_BCM_6358_SPI_MSG_DATA_SIZE; 
    87 +        
     91+ 
    8892+       return platform_device_register(&bcm63xx_spi_device); 
    8993+} 
    90 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 
    91 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 
    92 @@ -428,6 +428,7 @@ static inline unsigned long bcm63xx_regs 
     94Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 
     95=================================================================== 
     96--- linux-2.6.32.10.orig/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h       2010-04-22 17:35:21.000000000 +0200 
     97+++ linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h    2010-04-22 17:43:33.000000000 +0200 
     98@@ -108,6 +108,7 @@ 
     99 #define RSET_WDT_SIZE                  12 
     100 #define RSET_ENET_SIZE                 2048 
     101 #define RSET_ENETDMA_SIZE              2048 
     102+#define RSET_SPI_SIZE                  256 
     103 #define RSET_UART_SIZE                 24 
     104 #define RSET_UDC_SIZE                  256 
     105 #define RSET_OHCI_SIZE                 256 
     106@@ -428,6 +429,7 @@ 
    93107  */ 
    94108 enum bcm63xx_irq { 
     
    98112        IRQ_DSL, 
    99113        IRQ_UDC0, 
    100 @@ -493,6 +494,7 @@ enum bcm63xx_irq { 
     114@@ -493,6 +495,7 @@ 
    101115  * 6348 irqs 
    102116  */ 
     
    106120 #define BCM_6348_DSL_IRQ               (IRQ_INTERNAL_BASE + 4) 
    107121 #define BCM_6348_UDC0_IRQ              (IRQ_INTERNAL_BASE + 6) 
    108 @@ -517,6 +519,7 @@ enum bcm63xx_irq { 
     122@@ -517,6 +520,7 @@ 
    109123  * 6358 irqs 
    110124  */ 
     
    114128 #define BCM_6358_OHCI0_IRQ             (IRQ_INTERNAL_BASE + 5) 
    115129 #define BCM_6358_ENET1_IRQ             (IRQ_INTERNAL_BASE + 6) 
    116 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 
    117 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 
     130Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 
     131=================================================================== 
     132--- linux-2.6.32.10.orig/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h      2010-03-15 16:52:04.000000000 +0100 
     133+++ linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h   2010-04-22 17:35:21.000000000 +0200 
    118134@@ -769,5 +769,117 @@ 
    119135 #define DMIPSPLLCFG_N2_SHIFT           29 
     
    234250 #endif /* BCM63XX_REGS_H_ */ 
    235251  
    236 --- /dev/null 
    237 +++ b/drivers/spi/bcm63xx_spi.c 
     252Index: linux-2.6.32.10/drivers/spi/bcm63xx_spi.c 
     253=================================================================== 
     254--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
     255+++ linux-2.6.32.10/drivers/spi/bcm63xx_spi.c   2010-04-22 17:35:21.000000000 +0200 
    238256@@ -0,0 +1,628 @@ 
    239257+/* 
     
    598616+                        bcm_spi_writeb(*bs->tx_ptr++, bs->regs, SPI_MSG_DATA); 
    599617+               else 
    600 +                       bcm_spi_writeb(0, bs->regs, SPI_MSG_DATA);  
     618+                       bcm_spi_writeb(0, bs->regs, SPI_MSG_DATA); 
    601619+                bs->remaining_bytes--; 
    602620+               tail = bcm_spi_readb(bs->regs, SPI_MSG_TAIL); 
     
    637655+       bcm_spi_writeb(cmd, bs->regs, SPI_CMD); 
    638656+ 
    639 +       wait_for_completion(&bs->done);  
     657+       wait_for_completion(&bs->done); 
    640658+ 
    641659+       /* Disable the CMD_DONE interrupt */ 
     
    645663+} 
    646664+ 
    647 +/* This driver supports single master mode only. Hence  
     665+/* This driver supports single master mode only. Hence 
    648666+ * CMD_DONE is the only interrupt we care about 
    649667+ */ 
     
    865883+MODULE_LICENSE("GPL"); 
    866884+MODULE_VERSION(DRV_VER); 
    867 --- a/drivers/spi/Kconfig 
    868 +++ b/drivers/spi/Kconfig 
    869 @@ -60,6 +60,13 @@ config SPI_ATMEL 
     885Index: linux-2.6.32.10/drivers/spi/Kconfig 
     886=================================================================== 
     887--- linux-2.6.32.10.orig/drivers/spi/Kconfig    2010-04-22 17:35:20.000000000 +0200 
     888+++ linux-2.6.32.10/drivers/spi/Kconfig 2010-04-22 17:35:21.000000000 +0200 
     889@@ -60,6 +60,13 @@ 
    870890          This selects a driver for the Atmel SPI Controller, present on 
    871891          many AT32 (AVR32) and AT91 (ARM) chips. 
     
    881901        tristate "SPI controller driver for ADI Blackfin5xx" 
    882902        depends on BLACKFIN 
    883 --- a/drivers/spi/Makefile 
    884 +++ b/drivers/spi/Makefile 
    885 @@ -34,6 +34,7 @@ obj-$(CONFIG_SPI_TXX9)                        += spi_txx9.o 
     903Index: linux-2.6.32.10/drivers/spi/Makefile 
     904=================================================================== 
     905--- linux-2.6.32.10.orig/drivers/spi/Makefile   2010-04-22 17:35:20.000000000 +0200 
     906+++ linux-2.6.32.10/drivers/spi/Makefile        2010-04-22 17:35:21.000000000 +0200 
     907@@ -34,6 +34,7 @@ 
    886908 obj-$(CONFIG_SPI_XILINX)               += xilinx_spi.o 
    887909 obj-$(CONFIG_SPI_SH_SCI)               += spi_sh_sci.o 
     
    891913  
    892914 # SPI protocol drivers (device/link on bus) 
    893 --- /dev/null 
    894 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h 
     915Index: linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h 
     916=================================================================== 
     917--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
     918+++ linux-2.6.32.10/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h        2010-04-22 17:35:21.000000000 +0200 
    895919@@ -0,0 +1,15 @@ 
    896920+#ifndef BCM63XX_DEV_SPI_H 
     
    909933+ 
    910934+#endif /* BCM63XX_DEV_SPI_H */ 
     935Index: linux-2.6.32.10/arch/mips/bcm63xx/Makefile 
     936=================================================================== 
     937--- linux-2.6.32.10.orig/arch/mips/bcm63xx/Makefile     2010-04-22 17:35:21.000000000 +0200 
     938+++ linux-2.6.32.10/arch/mips/bcm63xx/Makefile  2010-04-22 17:35:21.000000000 +0200 
     939@@ -1,6 +1,6 @@ 
     940 obj-y          += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \ 
     941                   dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \ 
     942-                  dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o 
     943+                  dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o dev-spi.o 
     944 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o 
     945  
     946 obj-y          += boards/ 
     947Index: linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c 
     948=================================================================== 
     949--- linux-2.6.32.10.orig/arch/mips/bcm63xx/boards/board_bcm963xx.c      2010-04-22 17:35:21.000000000 +0200 
     950+++ linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c   2010-04-22 17:35:21.000000000 +0200 
     951@@ -29,6 +29,7 @@ 
     952 #include <bcm63xx_dev_usb_ohci.h> 
     953 #include <bcm63xx_dev_usb_ehci.h> 
     954 #include <bcm63xx_dev_usb_udc.h> 
     955+#include <bcm63xx_dev_spi.h> 
     956 #include <board_bcm963xx.h> 
     957  
     958 #define PFX    "board_bcm963xx: " 
     959@@ -998,6 +999,9 @@ 
     960        if (board.has_udc0) 
     961                bcm63xx_udc_register(); 
     962  
     963+       if (!BCMCPU_IS_6345()) 
     964+               bcm63xx_spi_register(); 
     965+ 
     966        /* Generate MAC address for WLAN and 
     967         * register our SPROM */ 
     968 #ifdef CONFIG_SSB_PCIHOST 
  • trunk/target/linux/brcm63xx/patches-2.6.33/240-spi.patch

    r21087 r21096  
    3333+ * for more details. 
    3434+ * 
    35 + * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>  
     35+ * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org> 
    3636+ */ 
    3737+ 
     
    8585+       if (BCMCPU_IS_6358()) 
    8686+               spi_pdata.fifo_size = SPI_BCM_6358_SPI_MSG_DATA_SIZE; 
    87 +        
     87+ 
    8888+       return platform_device_register(&bcm63xx_spi_device); 
    8989+} 
    9090--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 
    9191+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h 
    92 @@ -428,6 +428,7 @@ static inline unsigned long bcm63xx_regs 
     92@@ -108,6 +108,7 @@ enum bcm63xx_regs_set { 
     93 #define RSET_WDT_SIZE                  12 
     94 #define RSET_ENET_SIZE                 2048 
     95 #define RSET_ENETDMA_SIZE              2048 
     96+#define RSET_SPI_SIZE                  256 
     97 #define RSET_UART_SIZE                 24 
     98 #define RSET_UDC_SIZE                  256 
     99 #define RSET_OHCI_SIZE                 256 
     100@@ -428,6 +429,7 @@ static inline unsigned long bcm63xx_regs 
    93101  */ 
    94102 enum bcm63xx_irq { 
     
    98106        IRQ_DSL, 
    99107        IRQ_UDC0, 
    100 @@ -493,6 +494,7 @@ enum bcm63xx_irq { 
     108@@ -493,6 +495,7 @@ enum bcm63xx_irq { 
    101109  * 6348 irqs 
    102110  */ 
     
    106114 #define BCM_6348_DSL_IRQ               (IRQ_INTERNAL_BASE + 4) 
    107115 #define BCM_6348_UDC0_IRQ              (IRQ_INTERNAL_BASE + 6) 
    108 @@ -517,6 +519,7 @@ enum bcm63xx_irq { 
     116@@ -517,6 +520,7 @@ enum bcm63xx_irq { 
    109117  * 6358 irqs 
    110118  */ 
     
    598606+                        bcm_spi_writeb(*bs->tx_ptr++, bs->regs, SPI_MSG_DATA); 
    599607+               else 
    600 +                       bcm_spi_writeb(0, bs->regs, SPI_MSG_DATA);  
     608+                       bcm_spi_writeb(0, bs->regs, SPI_MSG_DATA); 
    601609+                bs->remaining_bytes--; 
    602610+               tail = bcm_spi_readb(bs->regs, SPI_MSG_TAIL); 
     
    637645+       bcm_spi_writeb(cmd, bs->regs, SPI_CMD); 
    638646+ 
    639 +       wait_for_completion(&bs->done);  
     647+       wait_for_completion(&bs->done); 
    640648+ 
    641649+       /* Disable the CMD_DONE interrupt */ 
     
    645653+} 
    646654+ 
    647 +/* This driver supports single master mode only. Hence  
     655+/* This driver supports single master mode only. Hence 
    648656+ * CMD_DONE is the only interrupt we care about 
    649657+ */ 
     
    909917+ 
    910918+#endif /* BCM63XX_DEV_SPI_H */ 
     919--- a/arch/mips/bcm63xx/Makefile 
     920+++ b/arch/mips/bcm63xx/Makefile 
     921@@ -1,6 +1,6 @@ 
     922 obj-y          += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \ 
     923                   dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \ 
     924-                  dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o 
     925+                  dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o dev-spi.o 
     926 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o 
     927  
     928 obj-y          += boards/ 
     929--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
     930+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
     931@@ -29,6 +29,7 @@ 
     932 #include <bcm63xx_dev_usb_ohci.h> 
     933 #include <bcm63xx_dev_usb_ehci.h> 
     934 #include <bcm63xx_dev_usb_udc.h> 
     935+#include <bcm63xx_dev_spi.h> 
     936 #include <board_bcm963xx.h> 
     937  
     938 #define PFX    "board_bcm963xx: " 
     939@@ -998,6 +999,9 @@ int __init board_register_devices(void) 
     940        if (board.has_udc0) 
     941                bcm63xx_udc_register(); 
     942  
     943+       if (!BCMCPU_IS_6345()) 
     944+               bcm63xx_spi_register(); 
     945+ 
     946        /* Generate MAC address for WLAN and 
     947         * register our SPROM */ 
     948 #ifdef CONFIG_SSB_PCIHOST 
Note: See TracChangeset for help on using the changeset viewer.